Mixed changes to configure.ac
[moonshot.git] / moonshot / configure.ac
index 4bbffd5..a637f9a 100644 (file)
@@ -1,14 +1,17 @@
 AC_PREREQ([2.61])
 AC_INIT([mech_eap], [0.1], [bugs@project-moonshot.org])
 dnl AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([silent-rules])
+dnl AM_INIT_AUTOMAKE([silent-rules])
+AC_USE_SYSTEM_EXTENSIONS
+AC_GNU_SOURCE
+AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE()
 LT_PREREQ([2.2])
-LT_INIT([dlopen disable-static])
+LT_INIT([dlopen disable-static win32-dll])
 
 AC_PROG_CC
 AC_PROG_CXX
 AC_CONFIG_HEADERS([config.h])
-AC_GNU_SOURCE
 
 dnl Check if we're on Solaris and set CFLAGS accordingly
 dnl AC_CANONICAL_TARGET
@@ -44,13 +47,33 @@ if test "x$reauth" = "xyes" ; then
 fi
 AM_CONDITIONAL(GSSEAP_ENABLE_REAUTH, test "x$reauth" != "xno")
 
+acceptor=yes
+AC_ARG_ENABLE(acceptor,
+  [  --enable-acceptor whether to enable acceptor codepaths: yes/no; default yes ],
+  [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
+      acceptor=$enableval
+    else
+      echo "--enable-acceptor argument must be yes or no"
+      exit -1
+    fi
+  ])
+
+if test "x$acceptor" = "xyes" ; then
+  echo "acceptor enabled"
+  TARGET_CFLAGS="$TARGET_CFLAGS -DGSSEAP_ENABLE_ACCEPTOR"
+fi
+AM_CONDITIONAL(GSSEAP_ENABLE_ACCEPTOR, test "x$acceptor" != "xno")
+
 AC_SUBST(TARGET_CFLAGS)
 AC_SUBST(TARGET_LDFLAGS)
-AX_CHECK_KRB5
+dnl AX_CHECK_KRB5
+AM_CONDITIONAL(HEIMDAL, test "x$heimdal" != "xno")
 dnl AX_CHECK_EAP
-AX_CHECK_SHIBSP
-AX_CHECK_SHIBRESOLVER
-AX_CHECK_RADSEC
-AX_CHECK_JANSSON
+if test "x$acceptor" = "xyes" ; then
+  AX_CHECK_SHIBSP
+  AX_CHECK_SHIBRESOLVER
+  AX_CHECK_RADSEC
+  AX_CHECK_JANSSON
+fi
 AC_CONFIG_FILES([Makefile libeap/Makefile mech_eap/Makefile])
 AC_OUTPUT