2 AC_INIT([shibboleth],[2.5.6],[https://issues.shibboleth.net/],[shibboleth-sp])
\r
3 AC_CONFIG_SRCDIR(shibsp)
\r
4 AC_CONFIG_AUX_DIR(build-aux)
\r
5 AC_CONFIG_MACRO_DIR(m4)
\r
19 DX_INIT_DOXYGEN(shibboleth, doxygen.cfg, doc/api)
\r
22 AC_ARG_ENABLE(debug,
\r
23 AS_HELP_STRING([--enable-debug],[Have GCC compile with symbols (Default = no)]),
\r
24 enable_debug=$enableval, enable_debug=no)
\r
26 if test "$enable_debug" = "yes" ; then
\r
27 GCC_CFLAGS="$CFLAGS -g -D_DEBUG"
\r
28 GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG"
\r
30 GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG"
\r
31 GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
\r
34 AC_CONFIG_HEADERS([config.h shibsp/config_pub.h])
\r
35 AC_CONFIG_FILES([shibboleth.spec])
\r
37 AC_PROG_CC([gcc gcc3 cc])
\r
38 AC_PROG_CXX([g++ g++3 c++ CC])
\r
41 if test "$GCC" = "yes" ; then
\r
42 # AC_HAVE_GCC_VERSION(4,0,0,0,
\r
44 # AC_DEFINE(GCC_HASCLASSVISIBILITY,1,
\r
45 # [Define to enable class visibility control in gcc.])
\r
46 # GCC_CFLAGS="$GCC_CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
\r
47 # GCC_CXXFLAGS="$GCC_CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
\r
49 CFLAGS="-Wall $GCC_CFLAGS"
\r
50 CXXFLAGS="-Wall $GCC_CXXFLAGS"
\r
53 # Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993
\r
54 # Also enables POSIX semantics for some functions.
\r
55 case "${host_cpu}-${host_os}" in
\r
57 CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS"
\r
58 CXXFLAGS="$CXXFLAGS -D_POSIX_PTHREAD_SEMANTICS"
\r
59 if test "$CXX" = "CC" ; then
\r
60 CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
\r
64 CXXFLAGS="$CXXFLAGS -D_POSIX_PII_SOCKET"
\r
70 # Checks for typedefs, structures, and compiler characteristics.
\r
75 # Checks for library functions.
\r
78 AC_CHECK_HEADERS([sys/utsname.h grp.h pwd.h])
\r
79 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.])], [])
\r
80 AC_CHECK_FUNCS([strchr strdup strstr timegm gmtime_r localtime_r strtok_r strcasecmp getpwnam getgrnam initgroups])
\r
81 AC_CHECK_TYPES([struct sockaddr_storage], [], [], [[#include <sys/socket.h>]])
\r
82 AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [[#include <sys/socket.h>]])
\r
84 AC_CACHE_CHECK([for SOCK_CLOEXEC support], [shib_cv_sock_cloexec],
\r
86 #include <sys/types.h>
\r
87 #include <sys/socket.h>
\r
90 return socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0) == -1;
\r
91 }], [shib_cv_sock_cloexec=yes], [shib_cv_sock_cloexec=no], [shib_cv_sock_cloexec=no])])
\r
93 if test "$shib_cv_sock_cloexec" = "yes"; then
\r
94 AC_DEFINE([HAVE_SOCK_CLOEXEC], 1, [Define if the SOCK_CLOEXEC flag is supported])
\r
97 # checks for pthreads
\r
98 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
\r
99 if test $enable_threads != "pthread"; then
\r
100 AC_MSG_ERROR([unable to find pthreads, currently this is required])
\r
102 AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])
\r
103 LIBS="$PTHREAD_LIBS $LIBS"
\r
104 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
\r
105 CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
\r
109 AC_ARG_WITH(openssl,
\r
110 AS_HELP_STRING([--with-openssl=PATH],[where openssl is installed]),
\r
111 [if test x_$with_openssl != x_/usr; then
\r
112 SSLFLAGS="-I${with_openssl}/include"
\r
115 if test "x$with_openssl" = "x" ; then
\r
116 AC_PATH_PROG(PKG_CONFIG, pkg-config)
\r
117 if test "x$PKG_CONFIG" != x && test "x$PKG_CONFIG" != "xno" ; then
\r
118 if pkg-config openssl ; then
\r
119 SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
\r
121 AC_MSG_WARN([OpenSSL not supported by pkg-config, try --with-openssl instead])
\r
126 AC_MSG_CHECKING(for OpenSSL cflags)
\r
127 AC_MSG_RESULT($SSLFLAGS)
\r
128 CPPFLAGS="$SSLFLAGS $CPPFLAGS"
\r
130 AC_CHECK_HEADER([openssl/x509.h],,AC_MSG_ERROR([unable to find openssl header files]))
\r
142 BOOST_POINTER_CONTAINER
\r
146 CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
\r
148 # Thank you Solaris, really.
\r
149 AC_MSG_CHECKING(for ctime_r)
\r
150 if test -z "$ac_cv_ctime_args"; then
\r
152 [AC_LANG_PROGRAM([[#include <time.h>]], [[time_t clock; char buf[26]; ctime_r(&clock, buf);]])],
\r
153 [ac_cv_ctime_args=2],[])
\r
156 [AC_LANG_PROGRAM([[#include <time.h>]], [[time_t clock; char buf[26]; ctime_r(&clock, buf, 26);]])],
\r
157 [ac_cv_ctime_args=3],[])
\r
159 if test -z "$ac_cv_ctime_args"; then
\r
162 if test "$ac_cv_ctime_args" = 2; then
\r
163 AC_DEFINE([HAVE_CTIME_R_2],[1],[Define if ctime_r is present with 2 parameters.])
\r
164 elif test "$ac_cv_ctime_args" = 3; then
\r
165 AC_DEFINE([HAVE_CTIME_R_3],[1],[Define if ctime_r is present with 3 parameters.])
\r
167 AC_MSG_RESULT([yes, and it takes $ac_cv_ctime_args arguments])
\r
170 # log4shib settings (favor this version over the log4cpp code)
\r
171 AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config)
\r
172 AC_ARG_WITH(log4shib,
\r
173 AS_HELP_STRING([--with-log4shib=PATH],[where log4shib-config is installed]),
\r
175 LOG4SHIB_CONFIG="${with_log4shib}"
\r
176 if ! test -f "${LOG4SHIB_CONFIG}"; then
\r
177 LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config"
\r
180 if test -f "${LOG4SHIB_CONFIG}" ; then
\r
181 LIBS="`${LOG4SHIB_CONFIG} --libs` $LIBS"
\r
182 CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS"
\r
183 AC_CHECK_HEADER([log4shib/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
\r
185 [AC_LANG_PROGRAM([[#include <log4shib/Category.hh>
\r
186 #include <log4shib/CategoryStream.hh>]],
\r
187 [[log4shib::Category::getInstance("foo").errorStream() << log4shib::eol]])],
\r
188 [AC_DEFINE([SHIBSP_LOG4SHIB],[1],[Define to 1 if log4shib library is used.])],
\r
189 [AC_MSG_ERROR([unable to link with log4shib])])
\r
191 AC_MSG_WARN([log4shib-config not found, may need to use --with-log4shib option])
\r
192 AC_MSG_WARN([will look for original log4cpp library])
\r
195 AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
\r
196 AC_ARG_WITH(log4cpp,
\r
197 AS_HELP_STRING([--with-log4cpp=PATH],[where log4cpp-config is installed]),
\r
199 LOG4CPP_CONFIG="${with_log4cpp}"
\r
200 if ! test -f "${LOG4CPP_CONFIG}"; then
\r
201 LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"
\r
204 if test -f "${LOG4CPP_CONFIG}"; then
\r
205 AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe])
\r
206 LIBS="`${LOG4CPP_CONFIG} --libs` $LIBS"
\r
207 CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
\r
208 AC_CHECK_HEADER([log4cpp/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
\r
210 [AC_LANG_PROGRAM([[#include <log4cpp/Category.hh>
\r
211 #include <log4cpp/CategoryStream.hh>]],
\r
212 [[log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol]])],
\r
213 [AC_DEFINE([SHIBSP_LOG4CPP],[1],[Define to 1 if log4cpp library is used.])],
\r
214 [AC_MSG_ERROR([unable to link with log4cpp, need version 1.0 or later])])
\r
216 AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option])
\r
221 AC_ARG_WITH(xerces,
\r
222 AS_HELP_STRING([--with-xerces=PATH],[where xerces-c is installed]),,
\r
223 [with_xerces=/usr])
\r
224 if test x_$with_xerces != x_/usr; then
\r
225 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
\r
226 LIBS="-L${with_xerces}/lib -lxerces-c $LIBS"
\r
228 LIBS="-lxerces-c $LIBS"
\r
231 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,AC_MSG_ERROR([unable to find xerces header files]))
\r
232 AC_MSG_CHECKING([Xerces version])
\r
234 [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
\r
235 [#if _XERCES_VERSION >= 20700
\r
238 #error version 2.7.0 or above required
\r
240 [AC_MSG_RESULT(OK)],
\r
241 [AC_MSG_FAILURE([Xerces-C v2.7.0 or higher is required, v3.x preferred])])
\r
243 [AC_LANG_PROGRAM([[#include <xercesc/util/PlatformUtils.hpp>]],[[xercesc::XMLPlatformUtils::Initialize()]])],
\r
244 ,[AC_MSG_ERROR([unable to link with Xerces])])
\r
246 AC_MSG_CHECKING([whether Xerces XMLString::release(XMLByte**) exists])
\r
248 [AC_LANG_PROGRAM([[#include <xercesc/util/XMLString.hpp>]],
\r
249 [[using namespace XERCES_CPP_NAMESPACE; XMLByte* buf=NULL; XMLString::release(&buf);]])],
\r
250 [AC_MSG_RESULT([yes])AC_DEFINE([SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE],[1],[Define to 1 if Xerces XMLString includes XMLByte release.])],
\r
251 [AC_MSG_RESULT([no])])
\r
253 AC_MSG_CHECKING([whether Xerces DOMNodeFilter API returns a short])
\r
255 [AC_LANG_PROGRAM([[#include <xercesc/dom/DOM.hpp>]],
\r
256 [[using namespace XERCES_CPP_NAMESPACE;
\r
257 class Blocker : public DOMNodeFilter {
\r
259 short acceptNode(const DOMNode* node) const {
\r
260 return FILTER_REJECT;
\r
263 static Blocker g_Blocker;
\r
265 [AC_MSG_RESULT([yes])AC_DEFINE([SHIBSP_XERCESC_SHORT_ACCEPTNODE],[1],[Define to 1 if Xerces DOMNodeFilter API returns a short.])],
\r
266 [AC_MSG_RESULT([no])])
\r
268 # XML-Security settings
\r
269 AC_ARG_WITH(xmlsec,
\r
270 AS_HELP_STRING([--with-xmlsec=PATH],[where xmlsec is installed]),,
\r
271 [with_xmlsec=/usr])
\r
272 if test x_$with_xmlsec != x_/usr; then
\r
273 CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
\r
274 XMLSEC_LIBS="-L${with_xmlsec}/lib -lxml-security-c $XMLSEC_LIBS"
\r
276 XMLSEC_LIBS="-lxml-security-c $XMLSEC_LIBS"
\r
279 # save and append master libs
\r
281 LIBS="$XMLSEC_LIBS $LIBS"
\r
283 AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security-C header files]))
\r
284 AC_MSG_CHECKING([XML-Security-C version])
\r
286 [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
\r
287 [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
\r
290 #error need version 1.4.0 or later
\r
292 [AC_MSG_RESULT(OK)],
\r
293 [AC_MSG_FAILURE([XML-Security-C version 1.4.0 or greater is required.])])
\r
295 [AC_LANG_PROGRAM([[#include <xsec/utils/XSECPlatformUtils.hpp>]],
\r
296 [[XSECPlatformUtils::Initialise()]])],,
\r
297 [AC_MSG_ERROR([unable to link with XML-Security])])
\r
299 AC_MSG_CHECKING([whether XML-Security-C supports white/blacklisting of algorithms])
\r
300 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <xsec/framework/XSECAlgorithmMapper.hpp>]], [[XSECAlgorithmMapper* mapper; mapper->whitelistAlgorithm(NULL);]])],[AC_MSG_RESULT([yes])
\r
301 AC_DEFINE([SHIBSP_XMLSEC_WHITELISTING],[1],[Define to 1 if XML-Security-C supports white/blacklisting algorithms.])],[AC_MSG_RESULT([no])])
\r
303 # restore master libs
\r
306 #XML-Tooling settings
\r
307 AC_ARG_WITH(xmltooling,
\r
308 AS_HELP_STRING([--with-xmltooling=PATH],[where xmltooling is installed]),,
\r
309 [with_xmltooling=/usr])
\r
310 if test x_$with_xmltooling != x_/usr; then
\r
311 CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
\r
312 DX_INCLUDE="${with_xmltooling}/include"
\r
313 LITE_LIBS="-L${with_xmltooling}/lib -lxmltooling-lite"
\r
314 XMLSEC_LIBS="-L${with_xmltooling}/lib -lxmltooling $XMLSEC_LIBS"
\r
316 LITE_LIBS="-lxmltooling-lite"
\r
317 XMLSEC_LIBS="-lxmltooling $XMLSEC_LIBS"
\r
320 AC_CHECK_HEADER([xmltooling/base.h],,AC_MSG_ERROR([unable to find xmltooling header files]))
\r
322 # save and append master libs
\r
324 LIBS="$XMLSEC_LIBS $LIBS"
\r
327 [AC_LANG_PROGRAM([[#include <xmltooling/XMLToolingConfig.h>
\r
328 #include <xmltooling/version.h>]],
\r
329 [[#if _XMLTOOLING_VERSION >= 10500
\r
330 xmltooling::XMLToolingConfig::getConfig();
\r
332 #error Need XMLTooling version 1.5 or higher
\r
334 ,[AC_MSG_ERROR([unable to link with XMLTooling, or version was too old])])
\r
336 # restore master libs
\r
339 # Establish location of xmltooling catalog.
\r
340 XMLTOOLINGXMLDIR=""
\r
341 if test "x$with_xmltooling" = "x" ; then
\r
342 with_xmltooling="/usr"
\r
344 if test -f $with_xmltooling/share/xml/xmltooling/catalog.xml ; then
\r
345 XMLTOOLINGXMLDIR="$with_xmltooling"
\r
346 elif test -f $with_xerces/share/xml/xmltooling/catalog.xml ; then
\r
347 XMLTOOLINGXMLDIR="$with_xerces"
\r
348 elif test -f $with_log4shib/share/xml/xmltooling/catalog.xml ; then
\r
349 XMLTOOLINGXMLDIR="$with_log4shib"
\r
351 if test "x$XMLTOOLINGXMLDIR" = "x" ; then
\r
352 AC_MSG_ERROR([xmltooling XML catalog not found, may need to use --with-xmltooling option])
\r
354 XMLTOOLINGXMLDIR="$XMLTOOLINGXMLDIR/share/xml/xmltooling"
\r
355 AC_SUBST(XMLTOOLINGXMLDIR)
\r
357 # OpenSAML settings
\r
359 AS_HELP_STRING([--with-saml=PATH],[where opensaml is installed]),,
\r
361 if test x_$with_saml != x_/usr; then
\r
362 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
\r
363 DX_INCLUDE="$DX_INCLUDE ${with_saml}/include"
\r
364 XMLSEC_LIBS="-L${with_saml}/lib -lsaml $XMLSEC_LIBS"
\r
366 XMLSEC_LIBS="-lsaml $XMLSEC_LIBS"
\r
369 # save and append master libs
\r
371 LIBS="$XMLSEC_LIBS $LIBS"
\r
373 AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],,AC_MSG_ERROR([unable to find OpenSAML header files]))
\r
375 [AC_LANG_PROGRAM([[#include <saml/SAMLConfig.h>
\r
376 #include <saml/version.h>]],
\r
377 [[#if _OPENSAML_VERSION >= 20500
\r
378 opensaml::SAMLConfig::getConfig();
\r
380 #error Need OpenSAML version 2.5 or higher
\r
382 ,[AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])
\r
385 # restore master libs
\r
388 # Establish location of opensaml catalogs.
\r
390 if test "x$with_saml" = "x" ; then
\r
393 if test -f $with_saml/share/xml/opensaml/saml20-catalog.xml ; then
\r
394 OPENSAMLXMLDIR="$with_saml"
\r
395 elif test -f $with_xmltooling/share/xml/opensaml/saml20-catalog.xml ; then
\r
396 OPENSAMLXMLDIR="$with_xmltooling"
\r
397 elif test -f $with_xerces/share/xml/opensaml/saml20-catalog.xml ; then
\r
398 OPENSAMLXMLDIR="$with_xerces"
\r
399 elif test -f $with_log4shib/share/xml/opensaml/saml20-catalog.xml ; then
\r
400 OPENSAMLXMLDIR="$with_log4shib"
\r
402 if test "x$OPENSAMLXMLDIR" = "x" ; then
\r
403 AC_MSG_ERROR([opensaml XML catalogs not found, may need to use --with-saml option])
\r
405 OPENSAMLXMLDIR="$OPENSAMLXMLDIR/share/xml/opensaml"
\r
406 AC_SUBST(OPENSAMLXMLDIR)
\r
408 AC_SUBST(LITE_LIBS)
\r
409 AC_SUBST(XMLSEC_LIBS)
\r
411 # output the underlying makefiles
\r
412 WANT_SUBDIRS="doc schemas configs shibsp plugins shibd util"
\r
413 AC_CONFIG_FILES([Makefile doc/Makefile schemas/Makefile \
\r
414 configs/Makefile shibsp/Makefile plugins/Makefile \
\r
415 shibd/Makefile util/Makefile selinux/Makefile])
\r
418 AC_CONFIG_FILES([adfs/Makefile])
\r
419 AC_ARG_ENABLE([adfs],
\r
420 AS_HELP_STRING([--disable-adfs],[don't build the ADFS module]),
\r
421 [adfs_enabled=$enableval], [adfs_enabled=yes])
\r
422 if test "x$adfs_enabled" = "x" ; then
\r
425 AC_MSG_CHECKING(whether to build the ADFS module)
\r
426 if test "$adfs_enabled" = "no" ; then
\r
430 WANT_SUBDIRS="$WANT_SUBDIRS adfs"
\r
434 dnl Systemd will be disabled by default and requires you to run configure with
\r
435 dnl --enable-systemd to look for and enable systemd.
\r
436 AC_ARG_ENABLE(systemd,
\r
437 AS_HELP_STRING([--enable-systemd],[Build with systemd (Default = no)]),
\r
438 [if test "x$enableval" = "x" ; then
\r
441 WANT_SYSTEMD="$enableval"
\r
443 ],[ WANT_SYSTEMD=no ])
\r
444 AC_MSG_CHECKING(whether to build with systemd)
\r
446 AC_MSG_RESULT($WANT_SYSTEMD)
\r
447 if test "$WANT_SYSTEMD" = "yes" ; then
\r
448 AC_CHECK_HEADER([systemd/sd-daemon.h], [
\r
449 AC_CHECK_LIB([systemd-daemon], [sd_notify], [hassdnotify="y"])])
\r
450 AS_IF([test "x$hassdnotify=" = x], [
\r
451 AC_MSG_ERROR([Unable to find a suitable libsystemd-daemon library])
\r
453 AC_DEFINE([HAVE_SD_NOTIFY],[1],[Define to 1 if you have the sd_notify function.])
\r
454 PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon])
\r
455 AC_SUBST([SYSTEMD_CFLAGS])
\r
456 AC_SUBST([SYSTEMD_LIBS])
\r
460 # Build NSAPI module?
\r
462 AC_MSG_CHECKING(for NSAPI module option)
\r
464 AS_HELP_STRING([--with-nsapi=DIR],[Build NSAPI module for Netscape/iPlanet/SunONE]),
\r
465 [WANT_NSAPI=$withval],[WANT_NSAPI=no])
\r
466 AC_MSG_RESULT($WANT_NSAPI)
\r
468 if test "$WANT_NSAPI" != "no"; then
\r
469 if test ! -d $WANT_NSAPI/bin ; then
\r
470 AC_MSG_ERROR([Please specify the path to the root of your Netscape/iPlanet/SunONE server using --with-nsapi=DIR])
\r
472 AC_MSG_CHECKING(for NSAPI include files)
\r
473 if test -d $WANT_NSAPI/include ; then
\r
474 NSAPI_INCLUDE=$WANT_NSAPI/include
\r
475 AC_MSG_RESULT(Netscape-Enterprise 3.x style)
\r
476 AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h],,,[#define XP_UNIX])
\r
477 NSAPI_INCLUDE="$NSAPI_INC_DIR -I$NSAPI_INCLUDE"
\r
479 if test -d $WANT_NSAPI/plugins/include ; then
\r
480 test -n "$NSAPI_INCLUDE" && NSAPI_INC_DIR="-I$NSAPI_INCLUDE"
\r
481 NSAPI_INCLUDE="$WANT_NSAPI/plugins/include"
\r
482 AC_MSG_RESULT(iPlanet 4.x / SunONE 6.x style)
\r
483 AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h],,,[#define XP_UNIX])
\r
484 NSAPI_INCLUDE="$NSAPI_INC_DIR -I$NSAPI_INCLUDE"
\r
486 if test "$NSAPI_INCLUDE" = ""; then
\r
487 AC_MSG_ERROR([Please check you have nsapi.h in either $WANT_NSAPI/include or $WANT_NSAPI/plugins/include])
\r
491 AC_SUBST(NSAPI_INCLUDE)
\r
493 # always output the Makefile, even if you don't use it
\r
494 AC_CONFIG_FILES([nsapi_shib/Makefile])
\r
495 AM_CONDITIONAL(BUILD_NSAPI,test ! "$WANT_NSAPI" = "no")
\r
497 # add the NSAPI module to the list of wanted subdirs..
\r
498 if test ! "$WANT_NSAPI" = "no" ; then
\r
499 WANT_SUBDIRS="$WANT_SUBDIRS nsapi_shib"
\r
504 # Build FastCGI support?
\r
506 AC_MSG_CHECKING(for FastCGI support)
\r
507 AC_ARG_WITH(fastcgi,
\r
508 AS_HELP_STRING([--with-fastcgi=DIR],[Build FastCGI support]),
\r
509 [WANT_FASTCGI=$withval],[WANT_FASTCGI=no])
\r
510 AC_MSG_RESULT($WANT_FASTCGI)
\r
512 if test "$WANT_FASTCGI" != "no"; then
\r
514 if test "$WANT_FASTCGI" != "yes"; then
\r
515 if test x_$WANT_FASTCGI != x_/usr; then
\r
516 FASTCGI_INCLUDE="-I$WANT_FASTCGI/include"
\r
517 FASTCGI_LDFLAGS="-L$WANT_FASTCGI/lib"
\r
521 # save and append master flags
\r
522 save_CPPFLAGS="$CPPFLAGS"
\r
523 CPPFLAGS="$FASTCGI_INCLUDE $CPPFLAGS"
\r
525 AC_CHECK_HEADER([fcgio.h],,AC_MSG_ERROR([unable to find FastCGI header files]))
\r
526 FASTCGI_LIBS="-lfcgi -lfcgi++"
\r
528 # restore standard flags
\r
529 CPPFLAGS="$save_CPPFLAGS"
\r
532 AC_SUBST(FASTCGI_INCLUDE)
\r
533 AC_SUBST(FASTCGI_LDFLAGS)
\r
534 AC_SUBST(FASTCGI_LIBS)
\r
536 # always output the Makefile, even if you don't use it
\r
537 AC_CONFIG_FILES([fastcgi/Makefile])
\r
538 AM_CONDITIONAL(BUILD_FASTCGI,test ! "$WANT_FASTCGI" = "no")
\r
540 if test ! "$WANT_FASTCGI" = "no" ; then
\r
541 WANT_SUBDIRS="$WANT_SUBDIRS fastcgi"
\r
545 # Build Memcached support?
\r
547 AC_MSG_CHECKING(for Memcached support)
\r
548 AC_ARG_WITH(memcached,
\r
549 AS_HELP_STRING([--with-memcached=DIR],[Build Memcached support]),
\r
550 [WANT_MEMCACHED=$withval],[WANT_MEMCACHED=no])
\r
551 AC_MSG_RESULT($WANT_MEMCACHED)
\r
553 if test "$WANT_MEMCACHED" != "no"; then
\r
555 if test "$WANT_MEMCACHED" != "yes"; then
\r
556 if test x_$WANT_MEMCACHED != x_/usr; then
\r
557 MEMCACHED_INCLUDE="-I$WANT_MEMCACHED/include"
\r
558 MEMCACHED_LDFLAGS="-L$WANT_MEMCACHED/lib"
\r
562 # save and append master flags
\r
563 save_CPPFLAGS="$CPPFLAGS"
\r
564 CPPFLAGS="$MEMCACHED_INCLUDE $CPPFLAGS"
\r
566 AC_CHECK_HEADER([libmemcached/memcached.h],,
\r
567 AC_MSG_ERROR([unable to find Memcached header files]))
\r
568 AC_CHECK_DECL([memcached_last_error_message],
\r
569 [AC_DEFINE([HAVE_MEMCACHED_LAST_ERROR_MESSAGE],[1],[Define to 1 if libmemcached supports error handling function.])],,
\r
570 [#include <libmemcached/memcached.h>])
\r
571 MEMCACHED_LIBS="-lmemcached"
\r
573 # restore standard flags
\r
574 CPPFLAGS="$save_CPPFLAGS"
\r
577 AC_SUBST(MEMCACHED_INCLUDE)
\r
578 AC_SUBST(MEMCACHED_LDFLAGS)
\r
579 AC_SUBST(MEMCACHED_LIBS)
\r
581 # always output the Makefile, even if you don't use it
\r
582 AC_CONFIG_FILES([memcache-store/Makefile])
\r
583 AM_CONDITIONAL(BUILD_MEMCACHED,test ! "$WANT_MEMCACHED" = "no")
\r
585 if test ! "$WANT_MEMCACHED" = "no" ; then
\r
586 WANT_SUBDIRS="$WANT_SUBDIRS memcache-store"
\r
591 # If no --enable-apache-xx specified
\r
592 # find a default and fake the specific parameters
\r
595 # simple macro to peek at an enable or a with
\r
597 if test "[${[$1]_][$2]+set}" = set; then
\r
598 peekval="${[$1]_[$2]}"
\r
603 AC_MSG_CHECKING(if default apache needed)
\r
605 Peek(enable,apache_13,need_default=no)
\r
606 Peek(enable,apache_20,need_default=no)
\r
607 Peek(enable,apache_22,need_default=no)
\r
608 Peek(enable,apache_24,need_default=no)
\r
609 AC_MSG_RESULT($need_default)
\r
611 if test "$need_default" = "yes"; then
\r
612 # find an apxs, then the httpd
\r
614 Peek(with,apxs,xs="$peekval")
\r
615 Peek(with,apxs2,xs="$peekval")
\r
616 Peek(with,apxs22,xs="$peekval")
\r
617 Peek(with,apxs24,xs="$peekval")
\r
618 if test "x$xs" = "x"; then
\r
619 AC_PATH_PROGS(xs, apxs2 apxs,
\r
620 AC_MSG_ERROR(No apxs, no Apache found. Try --with-apxs, --with-apxs2, etc.),
\r
621 [/usr/local/apache2/bin:/usr/local/apache/bin:/usr/sbin:$PATH])
\r
623 # ask the daemon for the version and set parameters
\r
624 AC_MSG_CHECKING(default apache version)
\r
625 httpd="`$xs -q SBINDIR`/`$xs -q TARGET`"
\r
626 if test "x$httpd" != "x" && test -f $httpd ; then
\r
627 v=`$httpd -v|$SED -n -e 's/.*Apache\/\.*//p'`
\r
629 1.3*) [enable_apache_13]=yes
\r
633 2.0*) [enable_apache_20]=yes
\r
637 2.2*) [enable_apache_22]=yes
\r
641 2.4*) [enable_apache_24]=yes
\r
645 *) AC_MSG_ERROR(unusable Apache versions: $v. Try setting --with-apxs, --with=apxs2, etc.)
\r
648 AC_MSG_RESULT(cannot determine Apache version. Try setting --with-apxs, --with-apxs2, etc.)
\r
652 # Apache 1.3 (mod_shib_13)
\r
653 # --enable-apache-13
\r
654 # --with-apxs (DSO build, the normal way, uses apxs to derive build flags)
\r
656 AC_ARG_ENABLE(apache-13,
\r
657 AS_HELP_STRING([--enable-apache-13],[enable the Apache 1.3 module]),
\r
658 [if test "x$enableval" = "x" ; then
\r
661 WANT_APACHE_13="$enableval"
\r
663 ],[ WANT_APACHE_13=no ])
\r
664 AC_MSG_CHECKING(whether to build Apache 1.3 module)
\r
665 if test "$WANT_APACHE_13" != yes && test "$WANT_APACHE_13" != no ; then
\r
668 AC_MSG_RESULT($WANT_APACHE_13)
\r
670 if test "$WANT_APACHE_13" = "yes" ; then
\r
672 AS_HELP_STRING([--with-apxs=FILE],[Specifies where to find the Apache 1.3 apxs script.]),
\r
674 AC_MSG_CHECKING(for user-specified apxs name/location)
\r
675 if test "$withval" != "no" ; then
\r
676 if test "$withval" != "yes"; then
\r
678 AC_MSG_RESULT("$withval")
\r
683 AC_PATH_PROG(APXS, apxs, no)
\r
684 if test "$APXS" = "no" ; then
\r
685 for i in /usr/sbin /usr/local/apache/bin ; do
\r
686 if test "$APXS" = "no" && test -f "$i/apxs"; then
\r
693 AC_MSG_CHECKING([to see if apxs was located])
\r
694 if test ! -f "$APXS" ; then
\r
696 AC_MSG_ERROR([Unable to locate apxs script. An Apache development package may be missing from your server, or you may need to use the --with-apxs option.])
\r
698 AC_MSG_RESULT($APXS)
\r
701 # extract settings we need from APXS -q
\r
702 APXS_CC="`$APXS -q CC`"
\r
703 APXS_CFLAGS="`$APXS -q CFLAGS` `$APXS -q CFLAGS_SHLIB`"
\r
704 APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
\r
707 AC_SUBST(APXS_CFLAGS)
\r
708 AC_SUBST(APXS_INCLUDE)
\r
711 # Apache 2.0 (mod_shib_20)
\r
712 # --enable-apache-20
\r
713 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags)
\r
714 # --with-apr (DSO build, APR development package installed separately)
\r
715 # --with-apu (DSO build, APR-UTIL development package installed separately)
\r
717 AC_ARG_ENABLE(apache-20,
\r
718 AS_HELP_STRING([--enable-apache-20],[enable the Apache 2.0 module]),
\r
719 [if test "x$enableval" = "x" ; then
\r
722 WANT_APACHE_20="$enableval"
\r
724 ],[ WANT_APACHE_20=no ])
\r
725 AC_MSG_CHECKING(whether to build Apache 2.0 module)
\r
726 if test "$WANT_APACHE_20" != yes && test "$WANT_APACHE_20" != no ; then
\r
729 AC_MSG_RESULT($WANT_APACHE_20)
\r
731 if test "$WANT_APACHE_20" = "yes" ; then
\r
732 AC_ARG_WITH(apxs2,
\r
733 AS_HELP_STRING([--with-apxs2=FILE],[Specifies where to find the Apache 2.0 apxs script.]),
\r
735 AC_MSG_CHECKING(for user-specified Apache 2.0 apxs name/location)
\r
736 if test "$withval" != "no" ; then
\r
737 if test "$withval" != "yes"; then
\r
739 AC_MSG_RESULT("$withval")
\r
744 AC_PATH_PROG(APXS2, apxs2, no)
\r
745 if test "$APXS2" = "no" ; then
\r
746 AC_PATH_PROG(APXS2, apxs, no)
\r
748 if test "$APXS2" = "no" ; then
\r
749 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
\r
750 if test "$APXS2" = "no" && test -f "$i/apxs2" ; then
\r
754 if test "$APXS2" = "no" ; then
\r
755 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
\r
756 if test "$APXS2" = "no" && test -f "$i/apxs" ; then
\r
764 AC_MSG_CHECKING([to see if Apache 2.0 apxs was located])
\r
765 if test ! -f "$APXS2" ; then
\r
767 AC_MSG_ERROR([Unable to locate Apache 2.0 apxs script. An Apache development package may be missing from your server, or you may need to use the --with-apxs2 option.])
\r
769 AC_MSG_RESULT($APXS2)
\r
774 AS_HELP_STRING([--with-apr=PATH],[where apr-config is installed]),
\r
776 AC_MSG_CHECKING(for user-specified apr-config name/location)
\r
777 if test "$withval" != "no" ; then
\r
778 if test "$withval" != "yes"; then
\r
779 APR_CONFIG=$withval
\r
780 AC_MSG_RESULT("$withval")
\r
785 AC_PATH_PROG(APR_CONFIG, apr-config,,[`$APXS2 -q SBINDIR`]:[$PATH])
\r
787 if test -f "${APR_CONFIG}"; then
\r
788 APR_CFLAGS="`${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags` `${APR_CONFIG} --includes`"
\r
790 AC_MSG_ERROR([Unable to locate apr-config, may need --with-apr option.])
\r
795 AS_HELP_STRING([--with-apu=PATH],[where apu-config is installed]),
\r
797 AC_MSG_CHECKING(for user-specified apu-config name/location)
\r
798 if test "$withval" != "no" ; then
\r
799 if test "$withval" != "yes"; then
\r
800 APU_CONFIG=$withval
\r
801 AC_MSG_RESULT("$withval")
\r
806 AC_PATH_PROG(APU_CONFIG, apu-config,,[`$APXS2 -q SBINDIR`]:[$PATH])
\r
808 if test -f "${APU_CONFIG}"; then
\r
809 APU_CFLAGS="`${APU_CONFIG} --includes`"
\r
811 AC_MSG_ERROR([Unable to locate apu-config, may need --with-apu option.])
\r
814 # extract settings we need from APXS2 -q
\r
815 APXS2_CC="`$APXS2 -q CC`"
\r
816 APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` $APR_CFLAGS $APU_CFLAGS"
\r
817 APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
\r
820 AC_SUBST(APXS2_CFLAGS)
\r
821 AC_SUBST(APXS2_INCLUDE)
\r
824 # Apache 2.2 (mod_shib_22)
\r
825 # --enable-apache-22
\r
826 # --with-apxs22 (DSO build, the normal way, uses apxs to derive build flags)
\r
827 # --with-apr1 (DSO build, APR development package installed separately)
\r
828 # --with-apu1 (DSO build, APR-UTIL development package installed separately)
\r
830 AC_ARG_ENABLE(apache-22,
\r
831 AS_HELP_STRING([--enable-apache-22],[enable the Apache 2.2 module]),
\r
832 [if test "x$enableval" = "x" ; then
\r
835 WANT_APACHE_22="$enableval"
\r
837 ],[ WANT_APACHE_22=no ])
\r
838 AC_MSG_CHECKING(whether to build Apache 2.2 module)
\r
839 if test "$WANT_APACHE_22" != yes && test "$WANT_APACHE_22" != no ; then
\r
842 AC_MSG_RESULT($WANT_APACHE_22)
\r
844 if test "$WANT_APACHE_22" = "yes" ; then
\r
845 AC_ARG_WITH(apxs22,
\r
846 AS_HELP_STRING([--with-apxs22=FILE],[Specifies where to find the Apache 2.2 apxs script.]),
\r
848 AC_MSG_CHECKING(for user-specified Apache 2.2 apxs name/location)
\r
849 if test "$withval" != "no" ; then
\r
850 if test "$withval" != "yes"; then
\r
852 AC_MSG_RESULT("$withval")
\r
857 AC_PATH_PROG(APXS22, apxs2, no)
\r
858 if test "$APXS22" = "no" ; then
\r
859 AC_PATH_PROG(APXS22, apxs, no)
\r
861 if test "$APXS22" = "no" ; then
\r
862 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
\r
863 if test "$APXS22" = "no" && test -f "$i/apxs2" ; then
\r
867 if test "$APXS22" = "no" ; then
\r
868 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
\r
869 if test "$APXS22" = "no" && test -f "$i/apxs" ; then
\r
877 AC_MSG_CHECKING([to see if Apache 2.2 apxs was located])
\r
878 if test ! -f "$APXS22" ; then
\r
880 AC_MSG_ERROR([Unable to locate Apache 2.2 apxs script. An Apache development package may be missing from your server, or you may need to use the --with-apxs22 option.])
\r
882 AC_MSG_RESULT($APXS22)
\r
887 AS_HELP_STRING([--with-apr1=PATH],[where apr-1-config is installed]),
\r
889 AC_MSG_CHECKING(for user-specified apr-1-config name/location)
\r
890 if test "$withval" != "no" ; then
\r
891 if test "$withval" != "yes"; then
\r
892 APR1_CONFIG=$withval
\r
893 AC_MSG_RESULT("$withval")
\r
898 AC_PATH_PROG(APR1_CONFIG, apr-1-config,,[`$APXS22 -q SBINDIR`]:[$PATH])
\r
900 if test -f "${APR1_CONFIG}"; then
\r
901 APR1_CFLAGS="`${APR1_CONFIG} --cflags` `${APR1_CONFIG} --cppflags` `${APR1_CONFIG} --includes`"
\r
903 AC_MSG_ERROR([Unable to locate apr-1-config, may need --with-apr1 option.])
\r
908 AS_HELP_STRING([--with-apu1=PATH],[where apu-1-config is installed]),
\r
910 AC_MSG_CHECKING(for user-specified apu-1-config name/location)
\r
911 if test "$withval" != "no" ; then
\r
912 if test "$withval" != "yes"; then
\r
913 APU1_CONFIG=$withval
\r
914 AC_MSG_RESULT("$withval")
\r
919 AC_PATH_PROG(APU1_CONFIG, apu-1-config,,[`$APXS22 -q SBINDIR`]:[$PATH])
\r
921 if test -f "${APU1_CONFIG}"; then
\r
922 APU1_CFLAGS="`${APU1_CONFIG} --includes`"
\r
924 AC_MSG_ERROR([Unable to locate apu-1-config, may need --with-apu1 option.])
\r
927 # extract settings we need from APXS22 -q
\r
928 APXS22_CC="`$APXS22 -q CC`"
\r
929 APXS22_CFLAGS="`$APXS22 -q CPPFLAGS` `$APXS22 -q CFLAGS` $APR1_CFLAGS $APU1_CFLAGS"
\r
930 APXS22_INCLUDE="`$APXS22 -q INCLUDEDIR`"
\r
933 AC_SUBST(APXS22_CFLAGS)
\r
934 AC_SUBST(APXS22_INCLUDE)
\r
936 # Apache 2.4 (mod_shib_24)
\r
937 # --enable-apache-24
\r
938 # --with-apxs24 (DSO build, the normal way, uses apxs to derive build flags)
\r
939 # --with-apr1 (DSO build, APR development package installed separately)
\r
940 # --with-apu1 (DSO build, APR-UTIL development package installed separately)
\r
942 AC_ARG_ENABLE(apache-24,
\r
943 AS_HELP_STRING([--enable-apache-24],[enable the Apache 2.4 module]),
\r
944 [if test "x$enableval" = "x" ; then
\r
947 WANT_APACHE_24="$enableval"
\r
949 ],[ WANT_APACHE_24=no ])
\r
950 AC_MSG_CHECKING(whether to build Apache 2.4 module)
\r
951 if test "$WANT_APACHE_24" != yes && test "$WANT_APACHE_24" != no ; then
\r
954 AC_MSG_RESULT($WANT_APACHE_24)
\r
956 if test "$WANT_APACHE_24" = "yes" ; then
\r
957 AC_ARG_WITH(apxs24,
\r
958 AS_HELP_STRING([--with-apxs24=FILE],[Specifies where to find the Apache 2.4 apxs script.]),
\r
960 AC_MSG_CHECKING(for user-specified Apache 2.4 apxs name/location)
\r
961 if test "$withval" != "no" ; then
\r
962 if test "$withval" != "yes"; then
\r
964 AC_MSG_RESULT("$withval")
\r
969 AC_PATH_PROG(APXS24, apxs2, no)
\r
970 if test "$APXS24" = "no" ; then
\r
971 AC_PATH_PROG(APXS24, apxs, no)
\r
973 if test "$APXS24" = "no" ; then
\r
974 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
\r
975 if test "$APXS24" = "no" && test -f "$i/apxs2" ; then
\r
979 if test "$APXS24" = "no" ; then
\r
980 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
\r
981 if test "$APXS24" = "no" && test -f "$i/apxs" ; then
\r
989 AC_MSG_CHECKING([to see if Apache 2.4 apxs was located])
\r
990 if test ! -f "$APXS24" ; then
\r
992 AC_MSG_ERROR([Unable to locate Apache 2.4 apxs script. An Apache development package may be missing from your server, or you may need to use the --with-apxs24 option.])
\r
994 AC_MSG_RESULT($APXS24)
\r
997 # If we haven't done this work already for Apache 2.2
\r
998 if test "$WANT_APACHE_22" != "yes" ; then
\r
1001 AS_HELP_STRING([--with-apr1=PATH],[where apr-1-config is installed]),
\r
1003 AC_MSG_CHECKING(for user-specified apr-1-config name/location)
\r
1004 if test "$withval" != "no" ; then
\r
1005 if test "$withval" != "yes"; then
\r
1006 APR1_CONFIG=$withval
\r
1007 AC_MSG_RESULT("$withval")
\r
1012 AC_PATH_PROG(APR1_CONFIG, apr-1-config,,[`$APXS24 -q SBINDIR`]:[$PATH])
\r
1014 if test -f "${APR1_CONFIG}"; then
\r
1015 APR1_CFLAGS="`${APR1_CONFIG} --cflags` `${APR1_CONFIG} --cppflags` `${APR1_CONFIG} --includes`"
\r
1017 AC_MSG_ERROR([Unable to locate apr-1-config, may need --with-apr1 option.])
\r
1022 AS_HELP_STRING([--with-apu1=PATH],[where apu-1-config is installed]),
\r
1024 AC_MSG_CHECKING(for user-specified apu-1-config name/location)
\r
1025 if test "$withval" != "no" ; then
\r
1026 if test "$withval" != "yes"; then
\r
1027 APU1_CONFIG=$withval
\r
1028 AC_MSG_RESULT("$withval")
\r
1033 AC_PATH_PROG(APU1_CONFIG, apu-1-config,,[`$APXS24 -q SBINDIR`]:[$PATH])
\r
1035 if test -f "${APU1_CONFIG}"; then
\r
1036 APU1_CFLAGS="`${APU1_CONFIG} --includes`"
\r
1038 AC_MSG_ERROR([Unable to locate apu-1-config, may need --with-apu1 option.])
\r
1042 # extract settings we need from APXS24 -q
\r
1043 APXS24_CC="`$APXS24 -q CC`"
\r
1044 APXS24_CFLAGS="`$APXS24 -q CPPFLAGS` `$APXS24 -q CFLAGS` $APR1_CFLAGS $APU1_CFLAGS"
\r
1045 APXS24_INCLUDE="`$APXS24 -q INCLUDEDIR`"
\r
1048 AC_SUBST(APXS24_CFLAGS)
\r
1049 AC_SUBST(APXS24_INCLUDE)
\r
1051 # always output the Makefile, even if you don't use it
\r
1052 AC_CONFIG_FILES([apache/Makefile])
\r
1053 AM_CONDITIONAL(BUILD_AP13,test "$WANT_APACHE_13" = "yes")
\r
1054 AM_CONDITIONAL(BUILD_AP20,test "$WANT_APACHE_20" = "yes")
\r
1055 AM_CONDITIONAL(BUILD_AP22,test "$WANT_APACHE_22" = "yes")
\r
1056 AM_CONDITIONAL(BUILD_AP24,test "$WANT_APACHE_24" = "yes")
\r
1058 # add the apache module to the list of wanted subdirs..
\r
1059 if test "$WANT_APACHE_13" = "yes" || test "$WANT_APACHE_20" = "yes" || test "$WANT_APACHE_22" = "yes" || test "$WANT_APACHE_24" = "yes" ; then
\r
1060 WANT_SUBDIRS="$WANT_SUBDIRS apache"
\r
1065 # Implement the checks of the ODBC Storage Service
\r
1067 # 1) Assume the user wants ODBC; if it's not found then just continue without
\r
1068 # 2) If the user specifically requested odbc, look for it and ERROR if not found
\r
1069 # 3) If the user specifically requested no odbc, don't build it.
\r
1072 AC_CONFIG_FILES([odbc-store/Makefile])
\r
1074 # determine whether we should enable the odbc ccache
\r
1075 AC_ARG_ENABLE([odbc],
\r
1076 AS_HELP_STRING([--disable-odbc],[disable the ODBC Storage Service]),
\r
1077 [odbc_enabled=$enableval], [odbc_enabled=default])
\r
1078 if test "x$odbc_enabled" = "x" ; then
\r
1082 # Are we trying to build ODBC?
\r
1083 AC_MSG_CHECKING(whether to build the ODBC storage service)
\r
1084 if test "$odbc_enabled" = "yes" ; then
\r
1086 AC_MSG_RESULT(yes)
\r
1087 elif test "$odbc_enabled" = "default" ; then
\r
1089 AC_MSG_RESULT([yes, if it can be found])
\r
1095 # If we're trying to build ODBC, try to find the odbc_config program.
\r
1096 if test "$build_odbc" = "yes" ; then
\r
1099 AS_HELP_STRING([--with-odbc=PATH],[directory where odbc is installed]),
\r
1100 [if test "$with_odbc" = no ; then
\r
1101 AC_MSG_ERROR([Try running --disable-odbc instead.])
\r
1102 elif test "$with_odbc" != yes ; then
\r
1103 odbc_dir="$with_odbc/bin"
\r
1104 if test "$with_odbc" != /usr ; then
\r
1105 ODBC_CFLAGS="-I$with_odbc/include"
\r
1106 ODBC_LIBS="-L$with_odbc/lib"
\r
1110 AC_PATH_PROG(ODBC_CONFIG, odbc_config, no, $odbc_dir $PATH )
\r
1111 if test "$ODBC_CONFIG" = no ; then
\r
1112 AC_MSG_WARN([Cannot find odbc_config, will try to guess settings.])
\r
1113 ODBC_LIBS="$ODBC_LIBS -lodbc"
\r
1115 ODBC_CFLAGS=`$ODBC_CONFIG --cflags`
\r
1116 ODBC_LIBS=`$ODBC_CONFIG --libs`
\r
1119 save_CPPFLAGS="$CPPFLAGS"
\r
1120 CPPFLAGS="$CPPFLAGS $ODBC_CFLAGS"
\r
1122 AC_CHECK_HEADER([sql.h], [have_sql_h=yes], [have_sql_h=no])
\r
1123 if test "$have_sql_h" = no -a "$odbc_enabled" = "yes" ; then
\r
1124 AC_MSG_ERROR(unable to find ODBC header files)
\r
1127 if test "$have_sql_h" = yes ; then
\r
1129 LIBS="$LIBS $ODBC_LIBS"
\r
1130 AC_MSG_CHECKING(if we can link againt ODBC)
\r
1132 [AC_LANG_PROGRAM([[#include <sql.h>
\r
1133 #include <sqlext.h>
\r
1134 #include <stdio.h>]],
\r
1135 [[SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)SQL_CP_ONE_PER_HENV, 0)]])],
\r
1136 [have_odbc_libs=yes],[have_odbc_libs=no])
\r
1138 if test "$have_odbc_libs" = no ; then
\r
1139 if test "$odbc_enabled" = "yes" ; then
\r
1140 AC_MSG_ERROR([unable to link with ODBC Library])
\r
1142 AC_MSG_RESULT([no, skipping ODBC])
\r
1147 CPPFLAGS="$save_CPPFLAGS"
\r
1150 # if have_odbc_libs=yes then go ahead with building ODBC
\r
1151 if test "$have_odbc_libs" = yes ; then
\r
1152 # this AC_MSG_RESULT is from above!
\r
1153 AC_MSG_RESULT(yes)
\r
1154 WANT_SUBDIRS="$WANT_SUBDIRS odbc-store"
\r
1155 AC_SUBST(ODBC_CFLAGS)
\r
1156 AC_SUBST(ODBC_LIBS)
\r
1159 # GSS-API checking
\r
1161 GSSAPI_ROOT="/usr"
\r
1162 AC_ARG_WITH(gssapi-includes,
\r
1163 AS_HELP_STRING([--with-gssapi-includes=DIR],[Specify location of GSSAPI header]),
\r
1164 [ GSSAPI_INCS="-I$withval"
\r
1168 AC_ARG_WITH(gssapi-libs,
\r
1169 AS_HELP_STRING([--with-gssapi-libs=DIR],[Specify location of GSSAPI libs]),
\r
1170 [ GSSAPI_LIB_DIR="-L$withval"
\r
1174 AC_ARG_WITH(gssapi,
\r
1175 AS_HELP_STRING([--with-gssapi=DIR],[Where to look for GSSAPI]),
\r
1176 [ GSSAPI_ROOT="$withval"
\r
1177 if test x"$GSSAPI_ROOT" != xno; then
\r
1179 if test x"$GSSAPI_ROOT" = xyes; then
\r
1180 dnl if yes, then use default root
\r
1181 GSSAPI_ROOT="/usr"
\r
1186 save_CPPFLAGS="$CPPFLAGS"
\r
1187 AC_MSG_CHECKING([if GSSAPI support is requested])
\r
1188 if test x"$want_gss" = xyes; then
\r
1189 AC_MSG_RESULT(yes)
\r
1191 if test -z "$GSSAPI_INCS"; then
\r
1192 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
\r
1193 GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi`
\r
1194 elif test "$GSSAPI_ROOT" != "yes"; then
\r
1195 GSSAPI_INCS="-I$GSSAPI_ROOT/include"
\r
1199 CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
\r
1201 AC_CHECK_HEADER(gss.h,
\r
1203 dnl found in the given dirs
\r
1204 AC_DEFINE([SHIBSP_HAVE_GSSGNU],[1],[if you have the GNU gssapi libraries])
\r
1208 dnl not found, check Heimdal or MIT
\r
1209 AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
\r
1211 [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
\r
1215 AC_INCLUDES_DEFAULT
\r
1216 #ifdef HAVE_GSSAPI_GSSAPI_H
\r
1217 #include <gssapi/gssapi.h>
\r
1220 if test "x$not_mit" = "x1"; then
\r
1221 dnl MIT not found, check for Heimdal
\r
1222 AC_CHECK_HEADER([gssapi.h],
\r
1225 AC_DEFINE([SHIBSP_HAVE_GSSHEIMDAL],[1],[if you have the Heimdal gssapi libraries])
\r
1228 dnl no header found, disabling GSS
\r
1230 AC_MSG_WARN([disabling GSSAPI since no header files was found])
\r
1235 AC_DEFINE([SHIBSP_HAVE_GSSMIT],[1],[if you have the MIT gssapi libraries])
\r
1236 dnl check if we have a really old MIT kerberos (<= 1.2)
\r
1237 AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE])
\r
1238 AC_COMPILE_IFELSE([
\r
1239 AC_LANG_PROGRAM([[
\r
1240 #include <gssapi/gssapi.h>
\r
1241 #include <gssapi/gssapi_generic.h>
\r
1242 #include <gssapi/gssapi_krb5.h>
\r
1247 GSS_C_NT_HOSTBASED_SERVICE,
\r
1251 AC_MSG_RESULT([yes])
\r
1253 AC_MSG_RESULT([no])
\r
1254 AC_DEFINE([HAVE_OLD_GSSMIT],[1],[if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE])
\r
1262 if test x"$want_gss" = xyes; then
\r
1263 AC_DEFINE([SHIBSP_HAVE_GSSAPI],[1],[if you have the gssapi libraries])
\r
1265 if test -n "$gnu_gss"; then
\r
1266 LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
\r
1267 LIBS="$LIBS -lgss"
\r
1269 if test -z "$GSSAPI_LIB_DIR"; then
\r
1270 GSSAPI_LIB_DIR="$GSSAPI_ROOT/lib$libsuff"
\r
1272 if test "$GSSAPI_ROOT" != "yes"; then
\r
1273 LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
\r
1275 if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
\r
1276 dnl krb5-config doesn't have --libs-only-L or similar, put everything
\r
1278 gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
\r
1280 if test "x$not_mit" = "x1"; then
\r
1281 gss_libs="-lgssapi"
\r
1283 gss_libs="-lgssapi_krb5"
\r
1286 LIBS="$LIBS $gss_libs"
\r
1289 AC_MSG_CHECKING([whether GSS-API naming extensions are available])
\r
1290 AC_COMPILE_IFELSE(
\r
1291 [AC_LANG_PROGRAM([[
\r
1292 #ifdef SHIBSP_HAVE_GSSGNU
\r
1294 #elif defined SHIBSP_HAVE_GSSMIT
\r
1295 # include <gssapi/gssapi.h>
\r
1296 # include <gssapi/gssapi_ext.h>
\r
1298 # include <gssapi.h>
\r
1300 [[gss_get_name_attribute(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);]])],
\r
1301 [AC_MSG_RESULT([yes])AC_DEFINE([HAVE_GSSAPI_NAMINGEXTS],[1],[Define to 1 if GSS-API naming extensions are available.])],
\r
1302 [AC_MSG_RESULT([no])])
\r
1304 AC_MSG_CHECKING([whether GSS-API composite name import is available])
\r
1305 AC_COMPILE_IFELSE(
\r
1306 [AC_LANG_PROGRAM([[
\r
1307 #ifdef SHIBSP_HAVE_GSSGNU
\r
1309 #elif defined SHIBSP_HAVE_GSSMIT
\r
1310 # include <gssapi/gssapi.h>
\r
1311 # include <gssapi/gssapi_ext.h>
\r
1313 # include <gssapi.h>
\r
1317 gss_name_t srcname;
\r
1318 gss_buffer_desc importbuf;
\r
1319 gss_import_name(&minor, &importbuf, GSS_C_NT_EXPORT_NAME_COMPOSITE, &srcname);
\r
1321 [AC_MSG_RESULT([yes])AC_DEFINE([HAVE_GSSAPI_COMPOSITE_NAME],[1],[Define to 1 if GSS-API composite name import is available.])],
\r
1322 [AC_MSG_RESULT([no])])
\r
1325 CPPFLAGS="$save_CPPFLAGS"
\r
1329 AC_SUBST(WANT_SUBDIRS)
\r
1331 if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
\r
1332 echo "=================================================================="
\r
1333 echo "WARNING: You have chosen to compile Apache-1.3 modules with a different"
\r
1334 echo " compiler than the one used to compile Apache."
\r
1336 echo " Current compiler: $CC"
\r
1337 echo " Apache's compiler: $APXS_CC"
\r
1339 echo "This could cause problems."
\r
1340 echo "=================================================================="
\r
1343 if test -n "$APXS2_CC" && test "$APXS2_CC" != "$CC" ; then
\r
1344 echo "=================================================================="
\r
1345 echo "WARNING: You have chosen to compile Apache-2.0 modules with a different"
\r
1346 echo " compiler than the one used to compile Apache."
\r
1348 echo " Current compiler: $CC"
\r
1349 echo " Apache's compiler: $APXS2_CC"
\r
1351 echo "This could cause problems."
\r
1352 echo "=================================================================="
\r
1355 if test -n "$APXS22_CC" && test "$APXS22_CC" != "$CC" ; then
\r
1356 echo "=================================================================="
\r
1357 echo "WARNING: You have chosen to compile Apache-2.2 modules with a different"
\r
1358 echo " compiler than the one used to compile Apache."
\r
1360 echo " Current compiler: $CC"
\r
1361 echo " Apache's compiler: $APXS22_CC"
\r
1363 echo "This could cause problems."
\r
1364 echo "=================================================================="
\r
1367 if test -n "$APXS24_CC" && test "$APXS24_CC" != "$CC" ; then
\r
1368 echo "=================================================================="
\r
1369 echo "WARNING: You have chosen to compile Apache-2.4 modules with a different"
\r
1370 echo " compiler than the one used to compile Apache."
\r
1372 echo " Current compiler: $CC"
\r
1373 echo " Apache's compiler: $APXS24_CC"
\r
1375 echo "This could cause problems."
\r
1376 echo "=================================================================="
\r
1379 LIBTOOL="$LIBTOOL --silent"
\r