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