From 2871976de2f2c34f7254c60c1c70daa178ffcfc8 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 29 Jul 2009 15:55:27 +0200 Subject: [PATCH] Fix requirement of inotify when loopback support is disabled --- configure.ac | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 7bbd8b2..9c21164 100644 --- a/configure.ac +++ b/configure.ac @@ -60,12 +60,6 @@ AC_ARG_ENABLE(threads, AC_HELP_STRING([--enable-threads], [enable threading support]), [enable_threads=${enableval}], [enable_threads="no"]) -AC_ARG_ENABLE(loopback, - AC_HELP_STRING([--enable-loopback], [enable loopback support]), - [enable_loopback=${enableval}], [enable_loopback="no"]) -AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no") -AM_CONDITIONAL(LOOPBACK_BUILTIN, test "${enable_loopback}" = "builtin") - AC_ARG_ENABLE(ethernet, AC_HELP_STRING([--enable-ethernet], [enable Ethernet support]), [enable_ethernet=${enableval}], [enable_ethernet="no"]) @@ -151,6 +145,19 @@ fi AM_CONDITIONAL(RESOLVCONF, test "${enable_resolvconf}" != "no") AM_CONDITIONAL(RESOLVCONF_BUILTIN, test "${enable_resolvconf}" = "builtin") +AC_ARG_ENABLE(loopback, + AC_HELP_STRING([--enable-loopback], [enable loopback support]), + [enable_loopback=${enableval}], [enable_loopback="no"]) +if (test "${enable_loopback}" != "no"); then + AC_CHECK_HEADERS(sys/inotify.h, dummy=yes, + AC_MSG_ERROR(inotify header files are required)) + + AC_CHECK_LIB(c, inotify_init, dummy=yes, + AC_MSG_ERROR(inotify library support is required)) +fi +AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no") +AM_CONDITIONAL(LOOPBACK_BUILTIN, test "${enable_loopback}" = "builtin") + AC_ARG_ENABLE(dnsproxy, AC_HELP_STRING([--enable-dnsproxy], [enable DNS proxy support]), [enable_dnsproxy=${enableval}], [enable_dnsproxy="no"]) @@ -195,12 +202,6 @@ if (test "${enable_ppp}" = "yes" || test "${enable_novatel}" = "yes" || fi AM_CONDITIONAL(PPPD, test "${enable_ppp}" = "yes") -AC_CHECK_HEADERS(sys/inotify.h, dummy=yes, - AC_MSG_ERROR(inotify header files are required)) - -AC_CHECK_LIB(c, inotify_init, dummy=yes, - AC_MSG_ERROR(inotify library support is required)) - AC_CHECK_LIB(dl, dlopen, dummy=yes, AC_MSG_ERROR(dynamic linking loader is required)) -- 2.7.4