Added AC_DEFINE for ONC library.
[shibboleth/sp.git] / configure.ac
index 76a04e4..c2b95ef 100644 (file)
@@ -20,7 +20,7 @@ AC_STRUCT_TM
 
 # Checks for library functions.
 AC_FUNC_STRFTIME
-AC_CHECK_FUNCS([strchr strdup strstr gmtime_r strcasecmp])
+AC_CHECK_FUNCS([strchr strdup strstr gmtime_r strtok_r strcasecmp])
 AC_CHECK_HEADERS([dlfcn.h])
 
 # C++ requirements
@@ -48,6 +48,20 @@ fi
 # Test RPC now -- deal with it later
 ACX_RPCTEST([rpctest="yes"],[rpctest="no"])
 
+# Determine whether to use TCP for the shar socket
+AC_ARG_ENABLE([tcp],
+    AC_HELP_STRING([--enable-tcp], [enable the SHAR to use a TCP socket on Unix]),
+    [tcp_enabled=$enableval], [tcp_enabled=default])
+
+if test "x$tcp_enabled" = "x" ; then
+   tcp_enabled=yes
+fi
+
+if test "$tcp_enabled" = "yes" ; then
+    CFLAGS="$CFLAGS -DWANT_TCP_SHAR"
+    CXXFLAGS="$CXXFLAGS -DWANT_TCP_SHAR"
+fi
+
 AC_ARG_WITH(dmalloc,
             AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
             [if test x_$with_dmalloc != x_/usr; then
@@ -161,6 +175,7 @@ AC_CONFIG_FILES([Makefile doc/Makefile shib/Makefile schemas/Makefile \
 # now deal with the rpc library, to see if we need to build our own
 if test $rpctest = "no"; then
     WANT_SUBDIRS="oncrpc $WANT_SUBDIRS"
+       AC_DEFINE(USE_OUR_ONCRPC,1,[Define if using embedded version of ONC RPC.])
 fi
 AM_CONDITIONAL(USE_OUR_ONCRPC,test "$rpctest" = "no")