summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-07-14 21:01:59 +0000
committerRoy Marples <roy@marples.name>2009-07-14 21:01:59 +0000
commitcab5f5506f3652567d54bde16db25de1da245487 (patch)
treee5ea447eb70acc12cc74b0372f8196094fcc45f8 /configure
parent2dd8d70da070c20fa13d6184e8ab9c8b9e95cd99 (diff)
downloaddhcpcd-cab5f5506f3652567d54bde16db25de1da245487.tar.xz
Fix compile without memory debug
Add configure option for --with-hook=ntp Add debug CFLAGS for git clones Fix manpage installation
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure36
1 files changed, 35 insertions, 1 deletions
diff --git a/configure b/configure
index 2b54e131..885cc555 100755
--- a/configure
+++ b/configure
@@ -23,6 +23,7 @@ for x; do
--mandir) MANDIR=$var;;
--with-ccopts|CFLAGS) CFLAGS=$var;;
CPPFLAGS) CPPFLAGS=$var;;
+ --with-hook|--with-hooks|HOOKSCRIPTS) HOOKSCRIPTS=$var;;
esac
done
@@ -68,6 +69,13 @@ if [ -n "$CPPLAGS" ]; then
fi
if [ "$DEBUG" != no -a "$DEBUG" != false ]; then
+ echo "Enabling memory debugging"
+ echo "CPPFLAGS+= -DDEBUG_MEMORY" >>$CONFIG_MK
+elif [ -d .git ]; then
+ printf "Found git ... "
+ DEBUG=yes
+fi
+if [ "$DEBUG" != no -a "$DEBUG" != false ] || [ -e .git ]; then
echo "Adding debugging CFLAGS"
cat <<EOF >>$CONFIG_MK
CFLAGS+= -Wall -Wextra -Wimplicit -Wshadow -Wformat=2
@@ -77,7 +85,6 @@ CFLAGS+= -Wredundant-decls -Wnested-externs
CFLAGS+= -Winline -Wwrite-strings -Wcast-align -Wcast-qual
CFLAGS+= -Wpointer-arith
CFLAGS+= -Wdeclaration-after-statement -Wsequence-point
-CPPFLAGS+= -DDEBUG_MEMORY
EOF
fi
@@ -176,3 +183,30 @@ else
echo "#include \"compat/strlcpy.h\"" >>$CONFIG_H
fi
rm -f _strlcpy.c _strlcpy
+
+cd dhcpcd-hooks
+HOOKS=
+for x in $HOOKSCRIPTS; do
+ printf "Finding hook $x ... "
+ for h in [0-9][0-9]"-$x" [0-9][0-9]"-$x.sh" [0-9][0-9]"-$x.conf"; do
+ [ -e "$h" ] && break
+ done
+ if [ ! -e "$h" ]; then
+ echo "no"
+ else
+ echo "$h"
+ HOOKS="$HOOKS${HOOKS:+ }$h"
+ fi
+done
+cd -
+echo "HOOKSCRIPTS= $HOOKS" >>$CONFIG_MK
+
+echo
+echo " SYSCONFDIR = $SYSCONFDIR"
+echo " SBINDIR = $SBINDIR"
+echo " LIBEXECDIR = $LIBEXECDIR"
+echo " DBDIR = $DBDIR"
+echo " RUNDIR = $RUNDIR"
+echo " MANDIR = $MANDIR"
+echo " HOOKSCRIPTS = $HOOKSCRIPTS"
+echo