summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-12-16 22:35:25 +0100
committerMatthias Schiffer <matthias@gamezock.de>2008-12-16 22:35:25 +0100
commite28a9c25c143635ffe8a1f9cee1d377a69a4f923 (patch)
tree4e35f3051c85eb5f4c055cacb9e777d77c7d9c45 /configure.ac
parent75119a974616d7bfff5d4552f00377186e227740 (diff)
downloadmad-e28a9c25c143635ffe8a1f9cee1d377a69a4f923.tar
mad-e28a9c25c143635ffe8a1f9cee1d377a69a4f923.zip
Module koennen per configure (de)aktiviert werden
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
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