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