summaryrefslogtreecommitdiffstats
path: root/sys/modules
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-12-06 14:55:46 +0000
committerru <ru@FreeBSD.org>2005-12-06 14:55:46 +0000
commit81478391e33cb75f5c7feb6d0c45389a3f244a0b (patch)
tree9d078b31bfe315aca325ebf94ab245540b5e2cf4 /sys/modules
parentae00167101acb4da65678c5b8cee25a40ba4f207 (diff)
downloadFreeBSD-src-81478391e33cb75f5c7feb6d0c45389a3f244a0b.zip
FreeBSD-src-81478391e33cb75f5c7feb6d0c45389a3f244a0b.tar.gz
When compiling with the kernel, detect if INET6 support should be disabled.
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/if_gif/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/modules/if_gif/Makefile b/sys/modules/if_gif/Makefile
index bc52dcf..c9d073b 100644
--- a/sys/modules/if_gif/Makefile
+++ b/sys/modules/if_gif/Makefile
@@ -5,13 +5,8 @@
KMOD= if_gif
SRCS= if_gif.c in_gif.c opt_inet.h opt_inet6.h opt_mac.h \
opt_mrouting.h
-.if !defined(NO_INET6)
-SRCS+= in6_gif.c
-.endif
-# XXX The new way of building modules with the kernel can't handle
-# dynamic SRCS depending on build options yet.
-##.if !defined(KERNBUILDDIR)
+.if !defined(KERNBUILDDIR)
opt_inet.h:
echo "#define INET 1" > ${.TARGET}
@@ -22,6 +17,15 @@ opt_inet6.h:
opt_mrouting.h:
echo "#define MROUTING 1" > ${.TARGET}
-##.endif
+.else
+OPT_INET6!= cat ${KERNBUILDDIR}/opt_inet6.h
+.if empty(OPT_INET6)
+NO_INET6=
+.endif
+.endif
+
+.if !defined(NO_INET6)
+SRCS+= in6_gif.c
+.endif
.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud