diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c80e6b8..5c93f41 100644 --- a/configure.ac +++ b/configure.ac @@ -17,6 +17,7 @@ AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET +AC_CHECK_PROG(have_df, [df], yes, no) ORIG_LIBS=$LIBS @@ -64,6 +65,33 @@ AC_FUNC_REALLOC AC_TYPE_SIGNAL AC_CHECK_FUNCS([dup2 gethostname memmove memset socket strcasecmp strchr strdup strerror strrchr strtol]) +with_systembackend_proc=no + +AC_CHECK_FILES([/proc/uptime /proc/meminfo /proc/loadavg], with_systembackend_proc=yes) + +AC_ARG_WITH([systembackend_posix], [AS_HELP_STRING([--with-systembackend-posix], + [enable POSIX system backend @<:@default=yes@:>@])]) +AC_ARG_WITH([systembackend_proc], [AS_HELP_STRING([--with-systembackend-proc], + [enable /proc system backend])]) +AC_ARG_WITH([userbackend_mysql], [AS_HELP_STRING([--with-userbackend-mysql], + [enable MySQL user backend @<:@default=yes@:>@])]) + +AC_CHECK_FUNCS([posix_spawnp], , [with_systembackend_posix=no]) +if test x"$have_df" = xno; then + with_systembackend_posix=no +fi + +if test x"$found_mysql" = xno; then + with_userbackend_mysql=no +fi + + + +AM_CONDITIONAL(SYSTEMBACKEND_POSIX, test x"$with_systembackend_posix" != xno) +AM_CONDITIONAL(SYSTEMBACKEND_PROC, test x"$with_systembackend_proc" != xno) +AM_CONDITIONAL(USERBACKEND_MYSQL, test x"$with_userbackend_mysql" != xno) + + AC_CONFIG_FILES([ Makefile libltdl/Makefile |