-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
47 lines (38 loc) · 1.3 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
dnl $Id$
define([extraquote],[[[$1]]])
define([defnsubst],[define([$1],patsubst(extraquote(defn([$1])),[$2],[$3])))])
defnsubst([AC_INIT_PARSE_ARGS], ['${prefix}/var'], ['/var'])
defnsubst([AC_INIT_PARSE_ARGS], [PREFIX/var], [/var])
AC_INIT(u6rd.8.in)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
dnl Checks for libraries.
dnl Checks for header files.
AC_CHECK_HEADERS(net/if_tun.h net/if_utun.h net/tun/if_tun.h linux/if_tun.h,
break, ac_hdr=)
case $ac_hdr in
net/if_tun.h|net/tun/if_tun.h) P_SRCS="$P_SRCS tun_bsd.c" ;;
net/if_utun.h) P_SRCS="$P_SRCS tun_darwin.c" ;;
linux/if_tun.h) P_SRCS="$P_SRCS tun_linux.c" ;;
*) AC_MSG_ERROR([No supported tunneling device.]) ;;
esac
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
dnl dnl cap_rights_limit() in FreeBSD 10 replaced cap_new() in FreeBSD 9.
dnl AC_ARG_ENABLE(capsicum,
dnl [ --enable-capsicum support Capsicum capability mode],
dnl [],
dnl [AC_CHECK_HEADER(sys/capability.h, AC_CHECK_FUNC(cap_rights_limit,
dnl enable_capsicum=yes))])
dnl if test x"$enable_capsicum" = xyes; then
dnl AC_DEFINE(ENABLE_CAPSICUM)
dnl fi
AC_REPLACE_FUNCS(getprogname strlcpy)
dnl Package options
if test x"$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall -W"
fi
AC_SUBST(P_SRCS)
AC_OUTPUT(Makefile)