diff options
| author | Roy Marples <roy@marples.name> | 2013-02-04 13:30:35 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2013-02-04 13:30:35 +0000 |
| commit | aae24feb3d75af5ac07a97959c944f3d5537fdd6 (patch) | |
| tree | b8effb23300a215983c453f14e71c88283d97028 /configure | |
| parent | e88c525f5026816627d4892e8c4595e6becebd91 (diff) | |
| download | dhcpcd-aae24feb3d75af5ac07a97959c944f3d5537fdd6.tar.xz | |
It's now possible to compile out IPv4 and IPv6 support by passing
--disable-ipv4 or --disable-ipv6 to configure.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -3,6 +3,8 @@ # Ensure that we do not inherit these from env HOOKSET=false +INET= +INET6= ARC4RANDOM= CLOSEFROM= GETLINE= @@ -30,6 +32,10 @@ for x do --enable-fork) FORK=yes;; --disable-static) STATIC=no;; --enable-static) STATIC=yes;; + --disable-ipv4) INET=no;; + --enable-ipv4) INET=yes;; + --disable-ipv6) INET6=no;; + --enable-ipv6) INET6=yes;; --prefix) prefix=$var;; --sysconfdir) SYSCONFDIR=$var;; --bindir|--sbindir) SBINDIR=$var;; @@ -241,21 +247,39 @@ fi case "$OS" in linux) echo "CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=700" >>$CONFIG_MK - echo "SRCS+= if-linux.c if-linux-wireless.c lpf.c" >>$CONFIG_MK + if [ -z "$INET" -o "$INET" = yes ]; then + echo "SRCS+= lpf.c" >>$CONFIG_MK + fi + echo "SRCS+= if-linux.c if-linux-wireless.c" >>$CONFIG_MK echo "SRCS+= platform-linux.c" >>$CONFIG_MK echo "LDADD+= -lrt" >>$CONFIG_MK ;; kfreebsd) echo "CPPFLAGS+= -D_GNU_SOURCE" >>$CONFIG_MK - echo "SRCS+= bpf.c if-bsd.c platform-bsd.c" >>$CONFIG_MK + if [ -z "$INET" -o "$INET" = yes ]; then + echo "SRCS+= bpf.c" >>$CONFIG_MK + fi + echo "SRCS+= if-bsd.c platform-bsd.c" >>$CONFIG_MK echo "COMPAT_SRCS+= compat/linkaddr.c" >>$CONFIG_MK echo "LDADD+= -lrt" >>$CONFIG_MK ;; *) - echo "SRCS+= bpf.c if-bsd.c platform-bsd.c" >>$CONFIG_MK + if [ -z "$INET" -o "$INET" = yes ]; then + echo "SRCS+= bpf.c" >>$CONFIG_MK + fi + echo "SRCS+= if-bsd.c platform-bsd.c" >>$CONFIG_MK ;; esac +if [ -z "$INET" -o "$INET" = yes ]; then + echo "CPPFLAGS+= -DINET" >>$CONFIG_MK + echo "SRCS+= arp.c dhcp.c ipv4.c ipv4ll.c" >>$CONFIG_MK +fi +if [ -z "$INET6" -o "$INET6" = yes ]; then + echo "CPPFLAGS+= -DINET6" >>$CONFIG_MK + echo "SRCS+= ipv6.c ipv6rs.c ipv6ns.c dhcp6.c" >>$CONFIG_MK +fi + # NetBSD: Even if we build for $PREFIX, the clueless user might move us to / LDELF=/libexec/ld.elf_so if [ -e "$LDELF" ]; then |
