summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-07-05 16:37:41 +0000
committerRoy Marples <roy@marples.name>2012-07-05 16:37:41 +0000
commiteebe9a1887bbf2f3bbb4fdb72e8d46ece25cdd0c (patch)
treeda2e3069767ce09c41eb2b32e6a3b7f01b164eca /configure
parent359e9d397807079db8d68d5e60eb4396f41d1738 (diff)
downloaddhcpcd-eebe9a1887bbf2f3bbb4fdb72e8d46ece25cdd0c.tar.xz
Improve IPv6 RA support by allowing dhcpcd to manage the address and routesdhcpcd-5.6.0
instead of the kernel. dhcpcd will only do this if RA is disabled in the kernel or dhcpcd has been instructed to do this via dhcpcd.conf(5) ipv6ra_own and ipv6ra_own_default directives. Send and process IPv6 Neighbor Solicitions and Adverts to prove router reachability. If a router cannot be reached in this way then it is expired. When debugging, all ND messages are displayed which will create a lot of log spam. To ease packaging, ./configure now accepts LDFLAGS and --enable-static.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure37
1 files changed, 37 insertions, 0 deletions
diff --git a/configure b/configure
index b3344970..7e3bfafe 100755
--- a/configure
+++ b/configure
@@ -13,6 +13,7 @@ HOST=
TARGET=
DEBUG=
FORK=
+STATIC=
INCLUDEDIR=
for x do
@@ -27,6 +28,8 @@ for x do
--fork) FORK=$var;;
--disable-fork) FORK=no;;
--enable-fork) FORK=yes;;
+ --disable-static) STATIC=no;;
+ --enable-static) STATIC=yes;;
--prefix) prefix=$var;;
--sysconfdir) SYSCONFDIR=$var;;
--bindir|--sbindir) SBINDIR=$var;;
@@ -194,6 +197,12 @@ fi
if [ -n "$CPPLAGS" ]; then
echo "CPPLAGS= $CPPLAGS" >>$CONFIG_MK
fi
+if [ -n "$LDFLAGS" ]; then
+ echo "LDFLAGS= $LDFLAGS" >>$CONFIG_MK
+fi
+if [ "$STATIC" = yes ]; then
+ echo "LDFLAGS+= -static" >>$CONFIG_MK
+fi
for x in $INCLUDEDIR; do
echo "CPPFLAGS+= -I$x" >>$CONFIG_MK
done
@@ -370,6 +379,34 @@ if [ "$STRLCPY" = no ]; then
echo "#include \"compat/strlcpy.h\"" >>$CONFIG_H
fi
+if [ -z "$TAILQ_FOREACH_SAFE" ]; then
+ printf "Testing for TAILQ_FOREACH_SAFE ... "
+ cat <<EOF >_queue.c
+#include <sys/queue.h>
+int main(void) {
+#ifndef TAILQ_FOREACH_SAFE
+#error TAILQ_FOREACH_SAFE
+#endif
+ return 0;
+}
+EOF
+ if $XCC _queue.c -o _queue 2>/dev/null; then
+ TAILQ_FOREACH_SAFE=yes
+ else
+ TAILQ_FOREACH_SAFE=no
+ fi
+ echo "$TAILQ_FOREACH_SAFE"
+ rm -f _queue.c _queue
+fi
+if [ "$TAILQ_FOREACH_SAFE" = no ]; then
+ cat <<EOF >>$CONFIG_H
+#define TAILQ_FOREACH_SAFE(var, head, field, next) \
+ for ((var) = TAILQ_FIRST((head)); \
+ (var) && ((next) = TAILQ_NEXT((var), field), 1); \
+ (var) = (next))
+EOF
+fi
+
if [ -z "$SERVICECMD" ]; then
printf "Checking for OpenRC ... "
if [ -x /sbin/rc-service ]; then