make reauth support conditionaly compilable
[mech_eap.orig] / configure.ac
index 79826d3..43ca2ec 100644 (file)
@@ -6,6 +6,8 @@ LT_PREREQ([2.2])
 LT_INIT([dlopen disable-static])
 
 AC_PROG_CC
+AC_PROG_CXX
+AC_CONFIG_HEADERS([config.h])
 
 dnl Check if we're on Solaris and set CFLAGS accordingly
 dnl AC_CANONICAL_TARGET
@@ -24,8 +26,28 @@ dnl     TARGET_CFLAGS="-Wall -pedantic -pthread"
 dnl     TARGET_LDFLAGS=""
 dnl   esac
 
+reauth=no
+AC_ARG_ENABLE(reauth,
+  [  --enable-reauth whether to enable fast reauthentication protocol: yes/no; default no ],
+  [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
+      reauth=$enableval
+    else
+      echo "--enable-reauth argument must be yes or no"
+      exit -1
+    fi
+  ])
+
+if test "x$reauth" = "xyes" ; then
+  echo "Fast reauthentication protocol enabled"
+  TARGET_CFLAGS="$TARGET_CFLAGS -DGSSEAP_ENABLE_REAUTH"
+fi
+AM_CONDITIONAL(GSSEAP_ENABLE_REAUTH, test "$reauth" = "yes")
+
 AC_SUBST(TARGET_CFLAGS)
 AC_SUBST(TARGET_LDFLAGS)
 AX_CHECK_KRB5
+AX_CHECK_EAP
+AX_CHECK_SHIBSP
+AX_CHECK_SHIBRESOLVER
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT