Bump version, version schema directories.
[shibboleth/sp.git] / configure.ac
index 819e749..c6daede 100644 (file)
@@ -1,7 +1,7 @@
 AC_PREREQ([2.50])
-AC_INIT([shibboleth], [2.3.1], [shibboleth-users@internet2.edu], [shibboleth])
+AC_INIT([shibboleth], [2.4], [shibboleth-users@internet2.edu], [shibboleth])
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE([shibboleth],[2.3.1])
+AM_INIT_AUTOMAKE([shibboleth],[2.4])
 
 sinclude(doxygen.m4)
 sinclude(acx_pthread.m4)
@@ -61,6 +61,7 @@ fi
 
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
+AC_PATH_PROG(PKG_CONFIG, pkg-config)
 
 AC_LANG(C)
 
@@ -93,7 +94,6 @@ AC_ARG_WITH(openssl,
     fi])
 
 if test "x$SSLFLAGS" = "x" ; then
-    AC_PATH_PROG(PKG_CONFIG, pkg-config)
     if test "x$PKG_CONFIG" != x && test "x$PKG_CONFIG" != "xno" ; then
         if pkg-config openssl ; then
             SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
@@ -253,6 +253,7 @@ AC_ARG_WITH(xmltooling,
             [if test x_$with_xmltooling != x_/usr; then
                 LDFLAGS="-L${with_xmltooling}/lib $LDFLAGS"
                 CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
+                export PKG_CONFIG_PATH="${with_xmltooling}/lib/pkgconfig"
             fi])
 LITE_LIBS="-lxmltooling-lite"
 XMLSEC_LIBS="-lxmltooling"
@@ -273,22 +274,33 @@ AC_TRY_LINK(
 # restore master libs
 LIBS="$save_LIBS"
 
+# Determine xmltooling version.
+XMLTOOLINGVER="1.4"
+AC_ARG_WITH(xmltoolingver,
+    AC_HELP_STRING([--with-xmltoolingver=VERSION], [xmltooling version, normally derived via pkg-config]),
+    [XMLTOOLINGVER="$with_xmltoolingver"],
+    [if test "x$PKG_CONFIG" != "x" && test "x$PKG_CONFIG" != "xno" ; then
+        if pkg-config xmltooling ; then
+            XMLTOOLINGVER="`$PKG_CONFIG --modversion xmltooling`"
+        fi
+    fi])
+
 # Establish location of xmltooling catalog.
 XMLTOOLINGXMLDIR=""
 if test "x$with_xmltooling" = "x" ; then
    with_xmltooling="/usr"
 fi
-if test -f $with_xmltooling/share/xml/xmltooling/catalog.xml ; then
+if test -f $with_xmltooling/share/xml/xmltooling-$XMLTOOLINGVER/catalog.xml ; then
     XMLTOOLINGXMLDIR="$with_xmltooling"
-elif test -f $with_xerces/share/xml/xmltooling/catalog.xml ; then
+elif test -f $with_xerces/share/xml/xmltooling-$XMLTOOLINGVER/catalog.xml ; then
     XMLTOOLINGXMLDIR="$with_xerces"
-elif test -f $with_log4shib/share/xml/xmltooling/catalog.xml ; then
+elif test -f $with_log4shib/share/xml/xmltooling-$XMLTOOLINGVER/catalog.xml ; then
     XMLTOOLINGXMLDIR="$with_log4shib"
 fi
 if test "x$XMLTOOLINGXMLDIR" = "x" ; then
     AC_MSG_ERROR([xmltooling XML catalog not found, may need to use --with-xmltooling option])
 fi
-XMLTOOLINGXMLDIR="$XMLTOOLINGXMLDIR/share/xml/xmltooling"
+XMLTOOLINGXMLDIR="$XMLTOOLINGXMLDIR/share/xml/xmltooling-$XMLTOOLINGVER"
 AC_SUBST(XMLTOOLINGXMLDIR)
 
 # XML-Security settings
@@ -354,24 +366,35 @@ opensaml::SAMLConfig::getConfig();
 # restore master libs
 LIBS="$save_LIBS"
 
+# Determine opensaml version.
+OPENSAMLVER="2.4"
+AC_ARG_WITH(samlver,
+    AC_HELP_STRING([--with-samlver=VERSION], [opensaml version, normally derived via pkg-config]),
+    [OPENSAMLVER="$with_samlver"],
+    [if test "x$PKG_CONFIG" != "x" && test "x$PKG_CONFIG" != "xno" ; then
+        if pkg-config opensaml ; then
+            OPENSAMLVER="`$PKG_CONFIG --modversion opensaml`"
+        fi
+    fi])
+
 # Establish location of opensaml catalogs.
 OPENSAMLXMLDIR=""
 if test "x$with_saml" = "x" ; then
     with_saml="/usr"
 fi
-if test -f $with_saml/share/xml/opensaml/saml20-catalog.xml ; then
+if test -f $with_saml/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
     OPENSAMLXMLDIR="$with_saml"
-elif test -f $with_xmltooling/share/xml/opensaml/saml20-catalog.xml ; then
+elif test -f $with_xmltooling/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
     OPENSAMLXMLDIR="$with_xmltooling"
-elif test -f $with_xerces/share/xml/opensaml/saml20-catalog.xml ; then
+elif test -f $with_xerces/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
     OPENSAMLXMLDIR="$with_xerces"
-elif test -f $with_log4shib/share/xml/opensaml/saml20-catalog.xml ; then
+elif test -f $with_log4shib/share/xml/opensaml-$OPENSAMLVER/saml20-catalog.xml ; then
     OPENSAMLXMLDIR="$with_log4shib"
 fi
 if test "x$OPENSAMLXMLDIR" = "x" ; then
     AC_MSG_ERROR([opensaml XML catalogs not found, may need to use --with-saml option])
 fi
-OPENSAMLXMLDIR="$OPENSAMLXMLDIR/share/xml/opensaml"
+OPENSAMLXMLDIR="$OPENSAMLXMLDIR/share/xml/opensaml-$OPENSAMLVER"
 AC_SUBST(OPENSAMLXMLDIR)
 
 AC_SUBST(LITE_LIBS)