X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=47e7291de8a18660de9dffa45eeccb155fb33da7;hb=de23afd;hp=bed0c5df98a70f96e0efe0eeb6f0325bc845c7cf;hpb=3d4a8f9e3dc4e28ec671b7743f29f14fb3347430;p=collectd.git diff --git a/configure.in b/configure.in index bed0c5df..47e7291d 100644 --- a/configure.in +++ b/configure.in @@ -1481,6 +1481,7 @@ with_java_home="$JAVA_HOME" with_java_vmtype="client" with_java_cflags="" with_java_libs="" +JAVAC="$JAVAC" AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])], [ if test "x$withval" = "xno" @@ -1500,7 +1501,7 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPDIR=`find -L "$with_java_home" -name jni.h -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1510,7 +1511,7 @@ then fi AC_MSG_CHECKING([for jni_md.h]) - TMPDIR=`find -L "$with_java_home" -name jni_md.h -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1520,7 +1521,7 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPDIR=`find -L "$with_java_home" -name libjvm.so -exec 'dirname' '{}' ';' | head -n 1` + TMPDIR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1` if test "x$TMPDIR" != "x" then AC_MSG_RESULT([found in $TMPDIR]) @@ -1528,6 +1529,19 @@ then else AC_MSG_RESULT([not found]) fi + + if test "x$JAVAC" = "x" + then + AC_MSG_CHECKING([for javac]) + TMPDIR=`find -L "$with_java_home" -name javac -type f | head -n 1` + if test "x$TMPDIR" != "x" + then + JAVAC="$TMPDIR" + AC_MSG_RESULT([$JAVAC]) + else + AC_MSG_RESULT([not found]) + fi + fi else if test "x$with_java_home" != "x" then AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home]) @@ -1546,6 +1560,24 @@ if test "x$JAVA_LDFLAGS" != "x" then AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS]) fi +if test "x$JAVAC" = "x" +then + with_javac_path="$PATH" + if test "x$with_java_home" != "x" + then + with_javac_path="$with_java_home:with_javac_path" + if test -d "$with_java_home/bin" + then + with_javac_path="$with_java_home/bin:with_javac_path" + fi + fi + + AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path") +fi +if test "x$JAVAC" = "x" +then + with_java="no (javac not found)" +fi SAVE_CPPFLAGS="$CPPFLAGS" SAVE_CFLAGS="$CFLAGS" @@ -3191,28 +3223,42 @@ AC_DEFUN( [AC_PLUGIN], [ enable_plugin="no" + force="no" AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]), [ if test "x$enableval" = "xyes" then enable_plugin="yes" - else - enable_plugin="no" - fi - ], - [ - if test "x$2" = "xyes" + else if test "x$enableval" = "xforce" then enable_plugin="yes" + force="yes" else enable_plugin="no" - fi + fi; fi + ], + [ + if test "x$enable_all_plugins" = "xauto" + then + if test "x$2" = "xyes" + then + enable_plugin="yes" + else + enable_plugin="no" + fi + else + enable_plugin="$enable_all_plugins" + fi ]) if test "x$enable_plugin" = "xyes" then - if test "x$2" = "xyes" + if test "x$2" = "xyes" || test "x$force" = "xyes" then AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.]) + if test "x$2" != "xyes" + then + dependency_warning="yes" + fi else # User passed "yes" but dependency checking yielded "no" => Dependency problem. dependency_error="yes" enable_plugin="no (dependency error)" @@ -3230,7 +3276,9 @@ AC_COLLECTD([debug], [enable], [feature], [debugging]) AC_COLLECTD([daemon], [disable], [feature], [daemon mode]) AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux]) +dependency_warning="no" dependency_error="no" + plugin_ascent="no" plugin_battery="no" plugin_bind="no" @@ -3474,6 +3522,24 @@ fi m4_divert_once([HELP_ENABLE], [ collectd plugins:]) +AC_ARG_ENABLE([all-plugins], + AC_HELP_STRING([--enable-all-plugins], + [enable all plugins (auto by def)]), + [ + if test "x$enableval" = "xyes" + then + enable_all_plugins="yes" + else if test "x$enableval" = "xauto" + then + enable_all_plugins="auto" + else + enable_all_plugins="no" + fi; fi + ], + [enable_all_plugins="auto"]) + +m4_divert_once([HELP_ENABLE], []) + AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics]) AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC]) AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors]) @@ -3691,7 +3757,7 @@ AC_SUBST(LCC_VERSION_STRING) AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h) -AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile) +AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile) if test "x$with_librrd" = "xyes" \ && test "x$librrd_threadsafe" != "xyes" @@ -3844,7 +3910,11 @@ Configuration: EOF if test "x$dependency_error" = "xyes"; then - AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details") + AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details") +fi + +if test "x$dependency_warning" = "xyes"; then + AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details") fi # vim: set fdm=marker :