22d4022a6b44abe342f1f13bcc1ba1a551a3daab
[moonshot.git] / moonshot / configure.ac
1 AC_PREREQ([2.61])
2 AC_INIT([mech_eap], [0.1], [bugs@project-moonshot.org])
3 dnl AC_CONFIG_MACRO_DIR([m4])
4 dnl AM_INIT_AUTOMAKE([silent-rules])
5 AM_INIT_AUTOMAKE
6 AM_MAINTAINTER_MODE()
7 LT_PREREQ([2.2])
8 LT_INIT([dlopen disable-static])
9
10 AC_GNU_SOURCE
11 AC_PROG_CC
12 AC_PROG_CXX
13 AC_CONFIG_HEADERS([config.h])
14
15 dnl Check if we're on Solaris and set CFLAGS accordingly
16 dnl AC_CANONICAL_TARGET
17 dnl case "${target_os}" in
18 dnl   solaris*)
19 dnl     TARGET_CFLAGS="-DSYS_SOLARIS9 -D_POSIX_PTHREAD_SEMANTICS"
20 dnl     if test "$GCC" != yes ; then
21 dnl       TARGET_CFLAGS="$TARGET_CFLAGS -mt"
22 dnl     else
23 dnl       TARGET_CFLAGS="$TARGET_CFLAGS -pthreads"
24 dnl     fi
25 dnl     TARGET_LDFLAGS="-lpthread -lsocket -lnsl"
26 dnl     ;;
27 dnl   *)
28 dnl     TARGET_CFLAGS="-Wall -pedantic -pthread"
29 dnl     TARGET_LDFLAGS=""
30 dnl   esac
31
32 reauth=no
33 AC_ARG_ENABLE(reauth,
34   [  --enable-reauth whether to enable fast reauthentication protocol: yes/no; default no ],
35   [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
36       reauth=$enableval
37     else
38       echo "--enable-reauth argument must be yes or no"
39       exit -1
40     fi
41   ])
42
43 if test "x$reauth" = "xyes" ; then
44   echo "Fast reauthentication protocol enabled"
45   TARGET_CFLAGS="$TARGET_CFLAGS -DGSSEAP_ENABLE_REAUTH"
46 fi
47 AM_CONDITIONAL(GSSEAP_ENABLE_REAUTH, test "x$reauth" != "xno")
48
49 AC_SUBST(TARGET_CFLAGS)
50 AC_SUBST(TARGET_LDFLAGS)
51 AX_CHECK_KRB5
52 dnl AX_CHECK_EAP
53 AX_CHECK_SHIBSP
54 AX_CHECK_SHIBRESOLVER
55 AX_CHECK_RADSEC
56 AX_CHECK_JANSSON
57 AC_CONFIG_FILES([Makefile libeap/Makefile mech_eap/Makefile])
58 AC_OUTPUT