summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2013-09-12 21:43:17 +0000
committerRoy Marples <roy@marples.name>2013-09-12 21:43:17 +0000
commit077eb0643c8ebd33de846745a54a3969e5077af2 (patch)
treed5395fb1cca29a8f9bce488b613f86ebe2b42cdd /configure
parent81ff1cbf91aed72be6eb8371b81e4e39d0c8be4b (diff)
downloaddhcpcd-077eb0643c8ebd33de846745a54a3969e5077af2.tar.xz
It seems that some older udev versions support filtering but not
per device initialization checks. Add a test for this.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index dbd4c6f7..c54028ad 100755
--- a/configure
+++ b/configure
@@ -634,6 +634,24 @@ EOF
echo "no"
fi
rm -f _udev.c _udev
+
+ printf "Checking udev_device_get_is_initialized ... "
+ cat <<EOF >_udev.c
+#include <libudev.h>
+#include <stdlib.h>
+int main(void) {
+ udev_device_get_is_initialized(NULL);
+ return 0;
+}
+EOF
+ if $XCC $LIBUDEV_CFLAGS _udev.c -o _udev $LIBUDEV_LIBS 2>/dev/null
+ then
+ echo "yes"
+ else
+ echo "LIBUDEV_CPPFLAGS+= -DLIBUDEV_NOINIT" >>$CONFIG_MK
+ echo "no"
+ fi
+ rm -f _udev.c _udev
elif [ "$DEV" != no -a "$UDEV" != no ]; then
echo "no"
fi