Commit 9406a04b authored by venaas's avatar venaas Committed by venaas

adding configure options for various transports, and -v output which transports are enabled

git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@448 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent e0c9e33c
This diff is collapsed.
......@@ -27,7 +27,7 @@ radsecproxy_SOURCES = radsecproxy.c \
tls.h \
dtls.h
radsecproxy_CFLAGS = -g -Wall -pedantic -pthread -DRADPROT_UDP -DRADPROT_TCP -DRADPROT_TLS -DRADPROT_DTLS @SSL_CFLAGS@ @TARGET_CFLAGS@
radsecproxy_CFLAGS = -g -Wall -pedantic -pthread @SSL_CFLAGS@ @TARGET_CFLAGS@
radsecproxy_LDFLAGS = @SSL_LDFLAGS@ @TARGET_LDFLAGS@
radsecproxy_LDADD = @SSL_LIBS@
......
......@@ -2,6 +2,50 @@ AC_INIT(radsecproxy, 2.0-devel, venaas@uninett.no)
AM_INIT_AUTOMAKE
AC_PROG_CC
AM_PROG_CC_C_O
udp=yes
AC_ARG_ENABLE(udp,
[ --enable-udp whether to enable UDP transport: yes/no; default yes ],
[ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
udp=$enableval
else
echo "--enable-udp argument must be yes or no"
exit -1
fi
])
tcp=yes
AC_ARG_ENABLE(tcp,
[ --enable-tcp whether to enable TCP transport: yes/no; default yes ],
[ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
tcp=$enableval
else
echo "--enable-tcp argument must be yes or no"
exit -1
fi
])
tls=yes
AC_ARG_ENABLE(tls,
[ --enable-tls whether to enable TLS (RadSec) transport: yes/no; default yes ],
[ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
tls=$enableval
else
echo "--enable-tls argument must be yes or no"
exit -1
fi
])
dtls=yes
AC_ARG_ENABLE(dtls,
[ --enable-dtls whether to enable DTLS transport: yes/no; default yes ],
[ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
dtls=$enableval
else
echo "--enable-dtls argument must be yes or no"
exit -1
fi
])
dnl Check if we're on Solaris and set CFLAGS accordingly
AC_CANONICAL_SYSTEM
case "${target_os}" in
......@@ -13,6 +57,24 @@ case "${target_os}" in
TARGET_CFLAGS=""
TARGET_LDFLAGS=""
esac
dnl Adding enabled options
if test "x$udp" = "xyes" ; then
echo "UDP transport enabled"
TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_UDP"
fi
if test "x$tcp" = "xyes" ; then
echo "TCP transport enabled"
TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TCP"
fi
if test "x$tls" = "xyes" ; then
echo "TLS (RadSec) transport enabled"
TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TLS"
fi
if test "x$dtls" = "xyes" ; then
echo "DTLS transport enabled"
TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_DTLS"
fi
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LDFLAGS)
AX_CHECK_SSL
......
......@@ -3145,7 +3145,21 @@ void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *pretend, uint8
*pretend = 1;
break;
case 'v':
debugx(0, DBG_ERR, "radsecproxy revision $Rev$");
debug(DBG_ERR, "radsecproxy revision $Rev$");
debug(DBG_ERR, "This binary was built with support for the following transports:");
#ifdef RADPROT_UDP
debug(DBG_ERR, " UDP");
#endif
#ifdef RADPROT_TCP
debug(DBG_ERR, " TCP");
#endif
#ifdef RADPROT_TLS
debug(DBG_ERR, " TLS");
#endif
#ifdef RADPROT_DTLS
debug(DBG_ERR, " DTLS");
#endif
exit(0);
default:
goto usage;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment