summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-07-18 11:31:56 +0000
committerRoy Marples <roy@marples.name>2009-07-18 11:31:56 +0000
commitb4d060d86df8be419d6f03fda2de3b0950b31297 (patch)
tree1675255fca8bbcfbec9379aad9e5c64c9fa5d785 /configure
parent11a66d6dbd236c0913d15211da9a9be29508b496 (diff)
downloaddhcpcd-b4d060d86df8be419d6f03fda2de3b0950b31297.tar.xz
Test for getifaddrs support.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index b3a24238..b6ac9395 100755
--- a/configure
+++ b/configure
@@ -120,6 +120,24 @@ if [ -e "$LDELF" ]; then
echo "LDFLAGS+= -Wl,-dynamic-linker=$LDELF" >>$CONFIG_MK
fi
+# We require the libc to support non standard functions, like getifaddrs
+printf "Testing for getifaddrs support ... "
+cat <<EOF >_getifaddrs.c
+#include <sys/types.h>
+#include <ifaddrs.h>
+int main(void) {
+ struct ifaddrs *ifap;
+ return getifaddrs(&ifap);
+}
+EOF
+if $CC _getifaddrs.c -o _getifaddrs 2>/dev/null; then
+ echo "yes"
+else
+ echo "no"
+ echo "libc support for getifaddrs is required - aborting" >&2
+ exit 1
+fi
+
printf "Testing for arc4random support ... "
cat <<EOF >_arc4random.c
#include <stdlib.h>