From d5eab47e15e299b082c731c9d060d67c371ebbed Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 15 Jul 2009 10:29:40 +0200 Subject: [PATCH] Add option to disable udev support (for testing) --- configure.ac | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index 8c10060..b63808d 100644 --- a/configure.ac +++ b/configure.ac @@ -197,25 +197,6 @@ AC_CHECK_LIB(c, inotify_init, dummy=yes, AC_CHECK_LIB(dl, dlopen, dummy=yes, AC_MSG_ERROR(dynamic linking loader is required)) -PKG_CHECK_MODULES(UDEV, libudev >= 141, - [enable_udev="yes"], [enable_udev="no"]) -if (test "${enable_udev}" = "yes"); then - AC_CHECK_LIB(udev, udev_monitor_filter_update, dummy=yes, - AC_DEFINE(NEED_UDEV_MONITOR_FILTER, 1, - [Define to 1 if you need the - udev_monitor_filter...() functions.])) - UDEV_DATADIR="`$PKG_CONFIG --variable=udevdir udev`" - if (test -z "${UDEV_DATADIR}"); then - UDEV_DATADIR="${sysconfdir}/udev/rules.d" - else - UDEV_DATADIR="${UDEV_DATADIR}/rules.d" - fi - AC_SUBST(UDEV_DATADIR) -fi -AC_SUBST(UDEV_CFLAGS) -AC_SUBST(UDEV_LIBS) -AM_CONDITIONAL(UDEV, test "${enable_udev}" = "yes") - AC_ARG_WITH(iwmxsdk, AC_HELP_STRING([--with-iwmxsdk=PATH], [path to Intel WiMAX SDK]), [pkgconfig_iwmxsdk=${withval}/lib/pkgconfig]) @@ -306,6 +287,30 @@ AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake], [enable fake device support]), [enable_fake=${enableval}]) AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes") +AC_ARG_ENABLE(udev, AC_HELP_STRING([--disable-udev], + [don't use udev support even if available]), + [enable_udev=${enableval}]) +if (test "${enable_udev}" != "no"); then + PKG_CHECK_MODULES(UDEV, libudev >= 141, + [enable_udev="yes"], [enable_udev="no"]) +fi +if (test "${enable_udev}" = "yes"); then + AC_CHECK_LIB(udev, udev_monitor_filter_update, dummy=yes, + AC_DEFINE(NEED_UDEV_MONITOR_FILTER, 1, + [Define to 1 if you need the + udev_monitor_filter...() functions.])) + UDEV_DATADIR="`$PKG_CONFIG --variable=udevdir udev`" + if (test -z "${UDEV_DATADIR}"); then + UDEV_DATADIR="${sysconfdir}/udev/rules.d" + else + UDEV_DATADIR="${UDEV_DATADIR}/rules.d" + fi + AC_SUBST(UDEV_DATADIR) +fi +AC_SUBST(UDEV_CFLAGS) +AC_SUBST(UDEV_LIBS) +AM_CONDITIONAL(UDEV, test "${enable_udev}" = "yes") + AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles], [don't install configuration and data files]), [enable_datafiles=${enableval}]) -- 2.7.4