summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-09-07 16:12:57 +0000
committerRoy Marples <roy@marples.name>2015-09-07 16:12:57 +0000
commitcf18ee57e6243103147e37fdaa3f74faa20632c8 (patch)
tree54e74a9de8aaa1ff517caf23af81f9b2b82c9007 /configure
parent0d4ecb9c1c1a323a6488ca3517d816698a5cdd0a (diff)
downloaddhcpcd-cf18ee57e6243103147e37fdaa3f74faa20632c8.tar.xz
Instead of forcing a #define for IFLA_AF_SPEC, add a configure check to
ensure it exists.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure b/configure
index 86bcfca1..8f5607e7 100755
--- a/configure
+++ b/configure
@@ -455,6 +455,23 @@ EOF
# where the SSID associated to won't be reported by nl80211
# but will be via WEXT.
echo "DHCPCD_SRCS+= if-linux-wext.c" >>$CONFIG_MK
+
+ printf "Testing for IFLA_AF_SPEC ... "
+ cat <<EOF >_IFLA_AF_SPEC.c
+#include <linux/if_link.h>
+int main(void) {
+ int x = IFLA_AF_SPEC;
+ return x;
+}
+EOF
+ if $XCC _IFLA_AF_SPEC.c -o _IFLA_AF_SPEC 2>&3; then
+ echo "yes"
+ echo "#define HAVE_IFLA_AF_SPEC" >>$CONFIG_H
+ else
+ echo "no"
+ fi
+ rm -f _IFLA_AF_SPEC.c IFLA_AF_SPEC
+
fi
abort=false