No longer need to test for xdr_uint64_t -- we've got it ourselves
[shibboleth/sp.git] / configure.ac
index 38ae407..1c24eee 100644 (file)
@@ -3,7 +3,7 @@ dnl $Id$
 AC_PREREQ([2.50])
 AC_INIT([shibboleth], [0.1], [mace-shib-users@internet2.edu], [shibboleth])
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE(shibboleth, 0.1)
 
 sinclude(acx_pthread.m4)
 sinclude(acx_rpctest.m4)
@@ -23,24 +23,18 @@ AC_STRUCT_TM
 # Checks for library functions.
 AC_FUNC_STRFTIME
 AC_CHECK_FUNCS([strchr strdup strstr gmtime_r])
-AC_CHECK_HEADERS([dlfcn.h stropts.h])
+AC_CHECK_HEADERS([dlfcn.h])
 
 # C++ requirements
 AC_CXX_REQUIRE_STL
 AC_CXX_NAMESPACES
 
 
-old_LIBS="$LIBS"
-AC_SEARCH_LIBS(xdr_uint64_t,nsl,,
-       [CFLAGS="$CFLAGS -DNEED_XDR_LONGLONG"
-        CXXFLAGS="$CXXFLAGS -DNEED_XDR_LONGLONG"])
-LIBS="$old_LIBS"
-
-ACX_RPCTEST([rpctest="yes"],[rpctest="no"])
-if test $rpctest = "no"; then
-    CFLAGS="-DNEED_RPC_TLI $CFLAGS"
-    ACX_RPCTEST(,AC_MSG_ERROR([neither style of ONC RPC worked]))
-fi
+# old_LIBS="$LIBS"
+# AC_SEARCH_LIBS(xdr_uint64_t,nsl,,
+#      [CFLAGS="$CFLAGS -DNEED_XDR_LONGLONG"
+#       CXXFLAGS="$CXXFLAGS -DNEED_XDR_LONGLONG"])
+# LIBS="$old_LIBS"
 
 # checks for pthreads
 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
@@ -53,6 +47,9 @@ else
     CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
 fi
 
+# Test RPC now -- deal with it later
+ACX_RPCTEST([rpctest="yes"],[rpctest="no"])
+
 AC_ARG_WITH(dmalloc,
             AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
             [if test x_$with_dmalloc != x_/usr; then
@@ -155,9 +152,16 @@ AC_TRY_LINK(
         ])
 
 # output the underlying makefiles
-WANT_SUBDIRS="shib schemas eduPerson shib-target shar test"
+WANT_SUBDIRS="shib schemas configs eduPerson shib-target shar test"
 AC_CONFIG_FILES([Makefile shib/Makefile schemas/Makefile eduPerson/Makefile \
-                           shib-target/Makefile shar/Makefile test/Makefile])
+                configs/Makefile oncrpc/Makefile oncrpc/rpc/Makefile \
+                shib-target/Makefile shar/Makefile test/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"
+fi
+AM_CONDITIONAL(USE_OUR_ONCRPC,test "$rpctest" = "no")
 
 # Much of this is taken from mod_dav.
 # The basic idea is to use configure options to control whether/which types