https://issues.shibboleth.net/jira/browse/SSPCPP-326
[shibboleth/cpp-sp.git] / configure.ac
index 2ae3d2a..29326dd 100644 (file)
@@ -1,5 +1,5 @@
 AC_PREREQ([2.50])
-AC_INIT([shibboleth],[2.5],[https://bugs.internet2.edu/],[shibboleth])
+AC_INIT([shibboleth],[2.5],[https://issues.shibboleth.net/],[shibboleth])
 AC_CONFIG_SRCDIR(shibsp)
 AC_CONFIG_AUX_DIR(build-aux)
 AC_CONFIG_MACRO_DIR(m4)
@@ -32,7 +32,7 @@ else
 fi
 
 AC_CONFIG_HEADERS([config.h shibsp/config_pub.h])
-AC_CONFIG_FILES([shibboleth.spec pkginfo Portfile])
+AC_CONFIG_FILES([shibboleth.spec])
 
 AC_PROG_CC([gcc gcc3 cc])
 AC_PROG_CXX([g++ g++3 c++ CC])
@@ -72,8 +72,10 @@ AC_STRUCT_TM
 # Checks for library functions.
 AC_FUNC_STRFTIME
 AC_FUNC_STRERROR_R
-AC_CHECK_HEADERS([sys/utsname.h])
-AC_CHECK_FUNCS([strchr strdup strstr timegm gmtime_r strtok_r strcasecmp])
+AC_CHECK_HEADERS([sys/utsname.h grp.h pwd.h])
+AC_CHECK_HEADERS([sys/socket.h], [AC_DEFINE([SHIBSP_HAVE_SYS_SOCKET_H],[1],[Define to 1 if you have the <sys/socket> header file.])], [])
+AC_CHECK_FUNCS([strchr strdup strstr timegm gmtime_r strtok_r strcasecmp getpwnam getgrnam])
+AC_CHECK_TYPES([struct sockaddr_storage], [], [], [[#include <sys/socket.h>]])
 
 # checks for pthreads
 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
@@ -291,10 +293,10 @@ LIBS="$XMLSEC_LIBS $LIBS"
 AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[#include <xmltooling/XMLToolingConfig.h>
 #include <xmltooling/version.h>]],
-        [[#if _XMLTOOLING_VERSION >= 10400
+        [[#if _XMLTOOLING_VERSION >= 10500
 xmltooling::XMLToolingConfig::getConfig();
 #else
-#error Need XMLTooling version 1.4 or higher
+#error Need XMLTooling version 1.5 or higher
 #endif]])],
     ,[AC_MSG_ERROR([unable to link with XMLTooling, or version was too old])])
 
@@ -337,10 +339,10 @@ AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],,AC_MSG_ERROR([unable to find O
 AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[#include <saml/SAMLConfig.h>
 #include <saml/version.h>]],
-[[#if _OPENSAML_VERSION >= 20400
+[[#if _OPENSAML_VERSION >= 20500
 opensaml::SAMLConfig::getConfig();
 #else
-#error Need OpenSAML version 2.4 or higher
+#error Need OpenSAML version 2.5 or higher
 #endif]])],
     ,[AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])
        ])
@@ -1083,14 +1085,30 @@ if test x"$want_gss" = xyes; then
 
   AC_MSG_CHECKING([whether GSS-API naming extensions are available])
   AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <gssapi/gssapi_ext.h>]],
+    [AC_LANG_PROGRAM([[
+#ifdef SHIBSP_HAVE_GSSGNU
+# include <gss.h>
+#elif defined SHIBSP_HAVE_GSSMIT
+# include <gssapi/gssapi.h>
+# include <gssapi/gssapi_ext.h>
+#else
+# include <gssapi.h>
+#endif]],
     [[gss_get_name_attribute(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);]])],
     [AC_MSG_RESULT([yes])AC_DEFINE([HAVE_GSSAPI_NAMINGEXTS],[1],[Define to 1 if GSS-API naming extensions are available.])],
     [AC_MSG_RESULT([no])])
 
   AC_MSG_CHECKING([whether GSS-API composite name import is available])
   AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <gssapi/gssapi_ext.h>]],
+    [AC_LANG_PROGRAM([[
+#ifdef SHIBSP_HAVE_GSSGNU
+# include <gss.h>
+#elif defined SHIBSP_HAVE_GSSMIT
+# include <gssapi/gssapi.h>
+# include <gssapi/gssapi_ext.h>
+#else
+# include <gssapi.h>
+#endif]],
     [[
     OM_uint32 minor;
     gss_name_t srcname;