1 AC_INIT(radsecproxy, 1.6.4, radsecproxy@uninett.no)
6 AC_CHECK_FUNCS([mallopt])
10 [ --enable-udp whether to enable UDP transport: yes/no; default yes ],
11 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
14 echo "--enable-udp argument must be yes or no"
21 [ --enable-tcp whether to enable TCP transport: yes/no; default yes ],
22 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
25 echo "--enable-tcp argument must be yes or no"
32 [ --enable-tls whether to enable TLS (RadSec) transport: yes/no; default yes ],
33 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
36 echo "--enable-tls argument must be yes or no"
43 [ --enable-dtls whether to enable DTLS transport: yes/no; default yes ],
44 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
47 echo "--enable-dtls argument must be yes or no"
53 AC_HELP_STRING([--enable-fticks],[build with F-Ticks support [default=no]]),
56 *) AC_MSG_ERROR([bad value $enableval for --enable-fticks, need yes or no]) ;;
60 if test "$enable_fticks" = "yes"; then
61 AC_CHECK_LIB([nettle], [nettle_sha256_init],,
62 [AC_MSG_WARN([required library nettle not found, fticks support disabled])
66 if test "$enable_fticks" = "yes"; then
67 AC_DEFINE([WANT_FTICKS], [1])
69 AM_CONDITIONAL(WANT_FTICKS, test "$enable_fticks" = "yes")
71 dnl Check if we're on Solaris and set CFLAGS accordingly
73 case "${target_os}" in
75 TARGET_CFLAGS="-DSYS_SOLARIS9 -D_POSIX_PTHREAD_SEMANTICS"
76 if test "$GCC" != yes ; then
77 TARGET_CFLAGS="$TARGET_CFLAGS -mt"
79 TARGET_CFLAGS="$TARGET_CFLAGS -pthreads"
81 TARGET_LDFLAGS="-lpthread -lsocket -lnsl"
84 TARGET_CFLAGS="-Wall -pedantic -Wno-long-long -pthread"
87 dnl Adding enabled options
88 if test "x$udp" = "xyes" ; then
89 echo "UDP transport enabled"
90 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_UDP"
92 if test "x$tcp" = "xyes" ; then
93 echo "TCP transport enabled"
94 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TCP"
96 if test "x$tls" = "xyes" ; then
97 echo "TLS (RadSec) transport enabled"
98 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TLS"
100 if test "x$dtls" = "xyes" ; then
101 echo "DTLS transport enabled"
102 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_DTLS"
106 experimental_dyndisc,
107 AC_HELP_STRING([--enable-experimental-dyndisc],
108 [enable experimental code for dynamic discovery [default=no]]),
111 *) AC_MSG_ERROR([bad value $enableval for --enable-experimental-dyndisc, need yes or no]) ;;
113 [enable_experimental_dyndisc=no])
114 if test "$enable_experimental_dyndisc" = "yes"; then
115 AC_DEFINE([ENABLE_EXPERIMENTAL_DYNDISC], [1])
117 AM_CONDITIONAL(ENABLE_EXPERIMENTAL_DYNDISC,
118 test "$enable_experimental_dyndisc" = "yes")
121 AC_ARG_VAR([DOCBOOK2X_MAN], [docbook2x-man])
122 AC_CHECK_PROG([DOCBOOK2X_MAN], [docbook2x-man], [yes])
123 AM_CONDITIONAL(HAVE_DOCBOOK2X_MAN, test "$DOCBOOK2X_MAN" = "yes")
125 AC_SUBST(TARGET_CFLAGS)
126 AC_SUBST(TARGET_LDFLAGS)