1 AC_INIT(radsecproxy, 1.6-dev, radsecproxy@uninett.no)
8 [ --enable-udp whether to enable UDP transport: yes/no; default yes ],
9 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
12 echo "--enable-udp argument must be yes or no"
19 [ --enable-tcp whether to enable TCP transport: yes/no; default yes ],
20 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
23 echo "--enable-tcp argument must be yes or no"
30 [ --enable-tls whether to enable TLS (RadSec) transport: yes/no; default yes ],
31 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
34 echo "--enable-tls argument must be yes or no"
41 [ --enable-dtls whether to enable DTLS transport: yes/no; default yes ],
42 [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
45 echo "--enable-dtls argument must be yes or no"
51 AC_HELP_STRING([--enable-fticks],[build with F-Ticks support [default=no]]),
54 *) AC_MSG_ERROR([bad value $enableval for --enable-fticks, need yes or no]) ;;
58 if test "$enable_fticks" = "yes"; then
59 AC_CHECK_LIB([nettle], [nettle_sha256_init],,
60 [AC_MSG_WARN([required library nettle not found, fticks support disabled])
64 if test "$enable_fticks" = "yes"; then
65 AC_DEFINE([WANT_FTICKS], [1])
67 AM_CONDITIONAL(WANT_FTICKS, test "$enable_fticks" = "yes")
69 dnl Check if we're on Solaris and set CFLAGS accordingly
71 case "${target_os}" in
73 TARGET_CFLAGS="-DSYS_SOLARIS9 -D_POSIX_PTHREAD_SEMANTICS"
74 if test "$GCC" != yes ; then
75 TARGET_CFLAGS="$TARGET_CFLAGS -mt"
77 TARGET_CFLAGS="$TARGET_CFLAGS -pthreads"
79 TARGET_LDFLAGS="-lpthread -lsocket -lnsl"
82 TARGET_CFLAGS="-Wall -pedantic -Wno-long-long -pthread"
85 dnl Adding enabled options
86 if test "x$udp" = "xyes" ; then
87 echo "UDP transport enabled"
88 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_UDP"
90 if test "x$tcp" = "xyes" ; then
91 echo "TCP transport enabled"
92 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TCP"
94 if test "x$tls" = "xyes" ; then
95 echo "TLS (RadSec) transport enabled"
96 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TLS"
98 if test "x$dtls" = "xyes" ; then
99 echo "DTLS transport enabled"
100 TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_DTLS"
103 AC_ARG_VAR([DOCBOOK2X_MAN], [docbook2x-man])
104 AC_CHECK_PROG([DOCBOOK2X_MAN], [docbook2x-man], [yes])
105 AM_CONDITIONAL(HAVE_DOCBOOK2X_MAN, test "$DOCBOOK2X_MAN" = "yes")
107 AC_SUBST(TARGET_CFLAGS)
108 AC_SUBST(TARGET_LDFLAGS)