2 AC_INIT([shibboleth], [1.2.1], [shibboleth-users@internet2.edu], [shibboleth])
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE([shibboleth],[1.2.1])
6 sinclude(acx_pthread.m4)
7 sinclude(acx_rpctest.m4)
10 AC_HELP_STRING(--enable-debug, [Have GCC compile with symbols (Default = no)
12 enable_debug=$enableval, enable_debug=no)
14 if test "$enable_debug" = "yes" ; then
15 GCC_CFLAGS="$CFLAGS -g -D_DEBUG"
16 GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG"
18 GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG"
19 GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
22 AC_PROG_CC([gcc gcc3 cc])
23 AC_PROG_CXX([g++ g++3 c++ CC])
25 if test "$GCC" = "yes" ; then
27 CXXFLAGS="$GCC_CXXFLAGS"
41 # Checks for typedefs, structures, and compiler characteristics.
46 # Checks for library functions.
49 AC_CHECK_FUNCS([strchr strdup strstr gmtime_r strtok_r strcasecmp])
50 AC_CHECK_HEADERS([dlfcn.h])
53 # AC_SEARCH_LIBS(xdr_uint64_t,nsl,,
54 # [CFLAGS="$CFLAGS -DNEED_XDR_LONGLONG"
55 # CXXFLAGS="$CXXFLAGS -DNEED_XDR_LONGLONG"])
59 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
60 if test $enable_threads != "pthread"; then
61 AC_MSG_ERROR([unable to find pthreads, currently this is required])
63 AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
64 LIBS="$PTHREAD_LIBS $LIBS"
65 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
66 CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
69 # what SunRPC library should we use?
70 AC_MSG_NOTICE([checking for which SunRPC library to use])
71 AC_ARG_ENABLE(native-rpc,
72 AC_HELP_STRING([--enable-native-rpc], [Use the OS-supplied Sun RPC library]),
73 [if test "x$enableval" = "x" ; then
76 enable_native_rpc="$enableval"
78 [enable_native_rpc=unknown])
80 *-*-linux*) if test $enable_native_rpc = "no" ; then
81 AC_MSG_WARN([appears to be Linux, but you said not to use native RPC library])
82 elif test $enable_native_rpc = "unknown" ; then
87 *) if test $enable_native_rpc = "yes" ; then
88 AC_MSG_ERROR([Native RPC library not known to be safe on any non-Linux platform])
89 elif test $enable_native_rpc = "unknown" ; then
94 AC_MSG_NOTICE([using native SunRPC library: $enable_native_rpc])
97 AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
98 [if test x_$with_dmalloc != x_/usr; then
99 LDFLAGS="-L${with_dmalloc}/lib $LDFLAGS"
100 CPPFLAGS="-I${with_dmalloc}/include $CPPFLAGS"
102 AC_CHECK_LIB(dmallocxx, dmalloc_shutdown,,
103 AC_MSG_ERROR([unable to find dmallocxx library]))
107 AC_PATH_PROG(PKG_CONFIG, pkg-config)
108 if test "x$PKG_CONFIG" = x || test "x$PKG_CONFIG" = "xno" ; then
110 AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]),
111 [if test x_$with_openssl != x_/usr; then
112 SSLLIBS="-L${with_openssl}/lib"
113 SSLFLAGS="-I${with_openssl}/include"
115 SSLLIBS="$SSLLIBS -lssl -lcrypto"
117 SSLLIBS="`$PKG_CONFIG --libs openssl`"
118 SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
120 AC_MSG_CHECKING(for OpenSSL libraries)
121 AC_MSG_RESULT($SSLLIBS)
122 LIBS="$LIBS $SSLLIBS"
123 AC_MSG_CHECKING(for OpenSSL cflags)
124 AC_MSG_RESULT($SSLFLAGS)
125 CPPFLAGS="$SSLFLAGS $CPPFLAGS"
127 AC_CHECK_HEADER([openssl/ssl.h],,
128 AC_MSG_ERROR([unable to find openssl header files]))
129 AC_MSG_CHECKING(for ERR_load_CRYPTO_string)
130 AC_TRY_LINK_FUNC([ERR_load_CRYPTO_strings],,
131 AC_MSG_ERROR([unable to link with openssl libraries]))
133 AC_MSG_CHECKING(for SSL_library_init)
134 AC_TRY_LINK_FUNC([SSL_library_init],,
135 AC_MSG_ERROR([unable to link with openssl libraries]))
141 AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
143 AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp is installed]),
144 [LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"])
145 if test -f "${LOG4CPP_CONFIG}"; then
146 LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
147 CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
149 AC_MSG_WARN([log4cpp-config not found, guessing at log4cpp build settings])
150 LIBS="-llog4cpp $LIBS"
152 AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
154 [#include <log4cpp/Category.hh>],
155 [log4cpp::Category::getInstance("foo")],
156 [AC_DEFINE(HAVE_LIBLOG4CPP,1,[Define if log4cpp library was found])],
157 [AC_MSG_ERROR([unable to link with log4cpp])])
161 AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
162 [if test x_$with_xerces != x_/usr; then
163 LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
164 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
166 LIBS="-lxerces-c $LIBS"
167 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
168 AC_MSG_ERROR([unable to find xerces header files]))
170 [#include <xercesc/util/PlatformUtils.hpp>
171 #include <xercesc/util/XercesVersion.hpp>],
172 [#if _XERCES_VERSION >= 20300
173 xercesc::XMLPlatformUtils::Initialize();
175 #error Need Xerces-C version 2.3+ only
177 [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
178 [AC_MSG_ERROR([unable to link with Xerces])])
180 # XML-Security settings
182 AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),
183 [if test x_$with_xmlsec != x_/usr; then
184 LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
185 CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
187 LIBS="-lxml-security-c $LIBS"
188 AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find xsec header files]))
190 [#include <xsec/utils/XSECPlatformUtils.hpp>],
191 [XSECPlatformUtils::Initialise()],
192 [AC_DEFINE(HAVE_LIBXSEC,1,[Define if XML-Sec library was found])],
193 [AC_MSG_ERROR([unable to link with XML-Sec])])
197 AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
198 [if test x_$with_saml != x_/usr; then
199 LDFLAGS="-L${with_saml}/lib $LDFLAGS"
200 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
202 AC_CHECK_HEADER([saml/saml.h],,
203 AC_MSG_ERROR([unable to find saml header files]))
206 [#include <saml/saml.h>
207 #include <saml/version.h>],
208 [#if _OPENSAML_VERSION >= 10000
209 saml::SAMLConfig::getConfig();
211 #error Need OpenSAML version 1.0 or higher
213 [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
214 [AC_MSG_ERROR([unable to link with saml, or version too old])])
216 # output the underlying makefiles
217 WANT_SUBDIRS="doc shib schemas configs shib-target shar siterefresh test xmlproviders"
218 AC_CONFIG_FILES([Makefile doc/Makefile shib/Makefile schemas/Makefile \
219 configs/Makefile oncrpc/Makefile oncrpc/rpc/Makefile \
220 shib-target/Makefile shar/Makefile siterefresh/Makefile \
221 test/Makefile xmlproviders/Makefile])
223 if test $enable_native_rpc = "no"; then
224 WANT_SUBDIRS="oncrpc $WANT_SUBDIRS"
225 AC_DEFINE(USE_OUR_ONCRPC,1,[Define if using embedded version of ONC RPC.])
227 AM_CONDITIONAL(USE_OUR_ONCRPC,test "$enable_native_rpc" = "no")
230 # Apache 1.3 (mod_shib_13)
232 # --with-apxs (DSO build, the normal way, uses apxs to derive build flags)
233 # --without-apxs (DSO build, you tell us how to build using the environment)
235 AC_ARG_ENABLE(apache-13,
236 AC_HELP_STRING([--enable-apache-13], [enable the Apache 1.3 modules]),
237 [ if test "x$enableval" = "x" ; then
240 WANT_APACHE_13="$enableval"
242 ], [ WANT_APACHE_13=no ])
243 AC_MSG_CHECKING(whether to build Apache-1.3 support)
244 if test "$WANT_APACHE_13" != yes && test "$WANT_APACHE_13" != no ; then
247 AC_MSG_RESULT($WANT_APACHE_13)
249 if test "$WANT_APACHE_13" = yes ; then
252 [ --with-apxs[=FILE] Build shared Apache module(s). FILE is the optional
253 pathname to the Apache apxs tool; defaults to "apxs".],
255 if test "$withval" = "yes"; then
256 for i in /usr/sbin /usr/local/apache/bin ; do
257 if test -f "$i/apxs"; then
261 if test -z "$APXS"; then
269 AC_PATH_PROG(APXS, apxs, no)
272 AC_MSG_CHECKING([for dynamic Apache-1.3 module support (w/ or w/o APXS)])
273 if test "$APXS" = "no"; then
275 # --without-apxs means you want the modules,
276 # but want to tell us how to build them
277 AC_MSG_RESULT(yes, but use environment, not apxs)
279 echo "Did you set one or more of these?"
281 echo "APXS_CFLAGS APXS_PREFIX APXS_INCLUDE APXS_LIBEXEC APXS_SYSCONFDIR"
284 AC_MSG_NOTICE([APXS_CFLAGS is $APXS_CFLAGS])
286 # try and find the Apache root
287 if test -z "$APXS_PREFIX"; then
288 if test -d "/usr/local/apache"; then
289 APXS_PREFIX="/usr/local/apache"
291 AC_MSG_ERROR([You MUST set APXS_PREFIX so the right Apache can be located!])
293 elif test ! -d "$APXS_PREFIX"; then
294 AC_MSG_ERROR([APXS_PREFIX of $APXS_PREFIX cannot be found])
296 AC_MSG_NOTICE([APXS_PREFIX is $APXS_PREFIX])
299 # other subfolders might be derived from APXS_PREFIX
300 if test -z "$APXS_INCLUDE"; then
301 if test -f "$APXS_PREFIX/include/httpd.h"; then
302 APXS_INCLUDE="$APXS_PREFIX/include"
304 AC_MSG_ERROR([can't find Apache include files beneath $APXS_PREFIX])
306 elif ! test -f "$APXS_INCLUDE/httpd.h"; then
307 AC_MSG_ERROR([APXS_INCLUDE of $APXS_INCLUDE does not contain Apache headers])
309 AC_MSG_NOTICE([APXS_INCLUDE is $APXS_INCLUDE])
311 if test -z "$APXS_LIBEXEC"; then
312 if test -d "$APXS_PREFIX/libexec"; then
313 APXS_LIBEXEC="$APXS_PREFIX/libexec"
314 elif test -d "$APXS_PREFIX/modules"; then
315 APXS_LIBEXEC="$APXS_PREFIX/modules"
317 AC_MSG_ERROR([can't find Apache libexec/module directory beneath $APXS_PREFIX])
319 elif ! test -d "$APXS_LIBEXEC"; then
320 AC_MSG_ERROR([APXS_LIBEXEC of $APXS_LIBEXEC does not exist])
322 AC_MSG_NOTICE([APXS_LIBEXEC is $APXS_LIBEXEC])
324 if test -z "$APXS_SYSCONFDIR"; then
325 if test -d "$APXS_PREFIX/conf"; then
326 APXS_SYSCONFDIR="$APXS_PREFIX/conf"
328 AC_MSG_ERROR([can't find Apache conf directory beneath $APXS_PREFIX])
330 elif ! test -d "$APXS_SYSCONFDIR"; then
331 AC_MSG_ERROR([APXS_SYSCONFDIR of $APXS_SYSCONFDIR does not exist])
333 AC_MSG_NOTICE([APXS_SYSCONFDIR is $APXS_SYSCONFDIR])
337 elif test -n "$APXS"; then
339 # extract settings we need from APXS -q
340 APXS_CC="`$APXS -q CC`"
341 APXS_CFLAGS="`$APXS -q CFLAGS` `$APXS -q CFLAGS_SHLIB`"
342 APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
343 APXS_LIBEXEC="`$APXS -q LIBEXECDIR`"
344 APXS_SYSCONFDIR="`$APXS -q SYSCONFDIR`"
347 AC_MSG_RESULT(found at $APXS)
349 if test -z "`$APXS -q LD_SHLIB`" || test "$APXS_LIBEXEC" = "modules"; then
351 [Your APXS installation is broken and cannot be used.
352 Please see http://www.webdav.org/mod_dav/install.html#apxs for
359 # guess we're not doing Apache 1.3
365 AC_SUBST(APXS_CFLAGS)
366 AC_SUBST(APXS_INCLUDE)
367 AC_SUBST(APXS_LIBEXEC)
368 AC_SUBST(APXS_SYSCONFDIR)
369 AM_CONDITIONAL(HAVE_APXS,test -n "$APXS")
372 # Apache 2.0 (mod_shib_20)
374 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags)
375 # --with-apr (DSO build, APR development package installed separately)
376 # --without-apxs2 (DSO build, you tell us how to build using the environment)
378 AC_ARG_ENABLE(apache-20,
379 AC_HELP_STRING([--enable-apache-20], [enable the Apache 2.0 modules]),
380 [ if test "x$enableval" = "x" ; then
383 WANT_APACHE_20="$enableval"
385 ], [ WANT_APACHE_20=no ])
387 AC_MSG_CHECKING(whether to build Apache-2.0 support)
388 if test "$WANT_APACHE_20" != yes && test "$WANT_APACHE_20" != no ; then
391 AC_MSG_RESULT($WANT_APACHE_20)
393 if test "$WANT_APACHE_20" = yes ; then
396 [ --with-apxs2[=FILE] Build shared Apache module(s). FILE is the optional
397 pathname to the Apache apxs tool; defaults to "apxs".],
399 if test "$withval" = "yes"; then
400 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
401 if test -f "$i/apxs"; then
405 if test -z "$APXS2"; then
413 AC_PATH_PROG(APXS2, apxs, no)
416 AC_MSG_CHECKING([for dynamic Apache-2 module support (w/ or w/o APXS)])
417 if test "$APXS2" = "no"; then
419 # --without-apxs2 means you want the modules,
420 # but want to tell us how to build them
421 AC_MSG_RESULT(yes, but use environment, not apxs)
423 echo "Did you set one or more of these?"
425 echo "APXS2_CFLAGS APXS2_PREFIX APXS2_INCLUDE APXS2_LIBEXEC APXS2_SYSCONFDIR"
428 AC_MSG_NOTICE([APXS2_CFLAGS is $APXS2_CFLAGS])
430 # try and find the Apache root
431 if test -z "$APXS2_PREFIX"; then
432 if test -d "/usr/local/apache"; then
433 APXS2_PREFIX="/usr/local/apache"
435 AC_MSG_ERROR([You MUST set APXS2_PREFIX so the right Apache-2 can be located!])
437 elif test ! -d "$APXS2_PREFIX"; then
438 AC_MSG_ERROR([APXS2_PREFIX of $APXS2_PREFIX cannot be found])
440 AC_MSG_NOTICE([APXS2_PREFIX is $APXS2_PREFIX])
443 # other subfolders might be derived from APXS2_PREFIX
444 if test -z "$APXS2_INCLUDE"; then
445 if test -f "$APXS2_PREFIX/include/httpd.h"; then
446 APXS2_INCLUDE="$APXS2_PREFIX/include"
448 AC_MSG_ERROR([can't find Apache-2 include files beneath $APXS2_PREFIX])
450 elif ! test -f "$APXS2_INCLUDE/httpd.h"; then
451 AC_MSG_ERROR([APXS2_INCLUDE of $APXS2_INCLUDE does not contain Apache-2 headers])
453 AC_MSG_NOTICE([APXS2_INCLUDE is $APXS2_INCLUDE])
455 if test -z "$APXS2_LIBEXEC"; then
456 if test -d "$APXS2_PREFIX/libexec"; then
457 APXS2_LIBEXEC="$APXS2_PREFIX/libexec"
458 elif test -d "$APXS2_PREFIX/modules"; then
459 APXS2_LIBEXEC="$APXS2_PREFIX/modules"
461 AC_MSG_ERROR([can't find Apache-2 libexec/module directory beneath $APXS2_PREFIX])
463 elif ! test -d "$APXS2_LIBEXEC"; then
464 AC_MSG_ERROR([APXS2_LIBEXEC of $APXS2_LIBEXEC does not exist])
466 AC_MSG_NOTICE([APXS2_LIBEXEC is $APXS2_LIBEXEC])
468 if test -z "$APXS2_SYSCONFDIR"; then
469 if test -d "$APXS2_PREFIX/conf"; then
470 APXS2_SYSCONFDIR="$APXS2_PREFIX/conf"
472 AC_MSG_ERROR([can't find Apache-2 conf directory beneath $APXS2_PREFIX])
474 elif ! test -d "$APXS2_SYSCONFDIR"; then
475 AC_MSG_ERROR([APXS2_SYSCONFDIR of $APXS2_SYSCONFDIR does not exist])
477 AC_MSG_NOTICE([APXS2_SYSCONFDIR is $APXS2_SYSCONFDIR])
481 elif test -n "$APXS2"; then
484 AC_PATH_PROG(APR_CONFIG,apr-config)
486 AC_HELP_STRING([--with-apr=PATH], [where APR is installed]),
487 [APR_CONFIG="${with_apr}/bin/apr-config"])
488 if test -f "${APR_CONFIG}"; then
489 APR_CFLAGS="`${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags` `${APR_CONFIG} --includes`"
492 # extract settings we need from APXS2 -q
493 APXS2_CC="`$APXS2 -q CC`"
494 APXS2_CFLAGS="`$APXS2 -q CFLAGS` `$APXS2 -q CFLAGS_SHLIB` $APR_CFLAGS"
495 APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
496 APXS2_LIBEXEC="`$APXS2 -q LIBEXECDIR`"
497 APXS2_SYSCONFDIR="`$APXS2 -q SYSCONFDIR`"
500 AC_MSG_RESULT(found at $APXS2)
502 if test -z "`$APXS2 -q LD_SHLIB`" && test -z "`$APXS2 -q LIBEXECDIR`" \
503 || test "$APXS2_LIBEXEC" = "modules"; then
505 [Your APXS installation is broken and cannot be used.
506 Please see http://www.webdav.org/mod_dav/install.html#apxs for
513 # guess we're not doing Apache 2.0
519 AC_SUBST(APXS2_CFLAGS)
520 AC_SUBST(APXS2_INCLUDE)
521 AC_SUBST(APXS2_LIBEXEC)
522 AC_SUBST(APXS2_SYSCONFDIR)
523 AM_CONDITIONAL(HAVE_APXS2,test -n "$APXS2")
525 # always output the Makefile, even if you don't use it
526 AC_CONFIG_FILES([apache/Makefile])
527 AM_CONDITIONAL(BUILD_AP13,test "$WANT_APACHE_13" = "yes")
528 AM_CONDITIONAL(BUILD_AP20,test "$WANT_APACHE_20" = "yes")
530 # add the apache module to the list of wanted subdirs..
531 if test "$WANT_APACHE_13" = "yes" || test "$WANT_APACHE_20" = "yes" ; then
532 WANT_SUBDIRS="$WANT_SUBDIRS apache"
537 # Implement the checks of the MySQL Credential Cache
539 # 1) Assume the user wants MySQL; if it's not found then just continue without
540 # 2) If the user specifically requested Mysql, look for it and ERROR if not found
541 # 3) If the user specifically requested no-mysql, don't build it.
544 AC_CONFIG_FILES([shib-mysql-ccache/Makefile])
546 # determine whether we should enable the mysql ccache
547 AC_ARG_ENABLE([mysql],
548 AC_HELP_STRING([--disable-mysql], [disable the MySQL Credential Cache]),
549 [mysql_enabled=$enableval], [mysql_enabled=default])
551 if test "x$mysql_enabled" = "x" ; then
555 # Are we trying to build MySQL?
556 AC_MSG_CHECKING(whether to build the MySQL ccache)
557 if test "$mysql_enabled" = "yes" ; then
560 elif test "$mysql_enabled" = "default" ; then
562 AC_MSG_RESULT([yes, if it can be found])
568 # If we're trying to build MySQL, try to find the mysql_config program,
569 # verify we've got mysql >= 4, and make sure we can build with mysqld
570 if test "$build_mysql" = "yes" ; then
573 AC_HELP_STRING([--with-mysql=PATH], [directory where mysql is installed]),
574 [if test "$with_mysql" = no ; then
575 AC_MSG_ERROR([Try running --disable-mysql instead.])
576 elif test "$with_mysql" != yes ; then
577 mysql_dir="$with_mysql/bin"
580 # Try to find the mysql_config program
581 AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no, $mysql_dir $PATH )
583 if test "$MYSQL_CONFIG" = no ; then
584 if test "$mysql_enabled" = "yes" ; then
585 AC_MSG_ERROR(Cannot find mysql_config)
587 AC_MSG_WARN(MySQL not found. skipping.)
592 # if we found mysql_config then build_mysql is 'yes'
593 if test "$MYSQL_CONFIG" != no ; then
594 AC_MSG_CHECKING(for mysql version >= 4)
595 mysql_version=`$MYSQL_CONFIG --version`
596 mysql_major_version=`echo $mysql_version | awk -F. '{print $1}'`
598 if test $mysql_major_version -lt 4 ; then
600 if test "$mysql_enabled" = "yes" ; then
601 AC_MSG_ERROR(You need MySQL version >= 4, found $mysql_version)
603 AC_MSG_RESULT(no.. skipping MySQL)
609 # if mysql_version_ok is 'yes', then we've made it this far.. ;)
610 if test "$mysql_version_ok" = "yes" ; then
611 AC_MSG_CHECKING(for embedded-MySQL libraries)
612 MYSQL_LIBS=`$MYSQL_CONFIG --libmysqld-libs`
613 if test $? != 0 ; then
615 if test "$mysql_enabled" = "yes" ; then
616 AC_MSG_ERROR(Could not find the MySQL Embedded-server libraries.)
618 AC_MSG_RESULT(no.. skipping MySQL)
626 # if found_mysql=yes then test that we can actually build mysql
627 if test "$found_mysql" = yes ; then
628 MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
629 MYSQL_CFLAGS=`eval echo $MYSQL_CFLAGS`
630 MYSQL_LIBS=`eval echo $MYSQL_LIBS`
632 save_CPPFLAGS="$CPPFLAGS"
633 CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
635 AC_CHECK_HEADER([mysql.h], [have_mysql_h=yes], [have_mysql_h=no])
636 if test "$have_mysql_h" = no -a "$mysql_enabled" = "yes" ; then
637 AC_MSG_ERROR(unable to find MySQL header files)
640 if test "$have_mysql_h" = yes ; then
642 LIBS="$LIBS $MYSQL_LIBS"
643 AC_MSG_CHECKING(if we can link againt mysql)
647 [mysql_server_init(0, NULL, NULL)],
648 [have_mysql_libs=yes],
649 [have_mysql_libs=no])
652 if test "$have_mysql_libs" = no ; then
653 if test "$mysql_enabled" = "yes" ; then
654 AC_MSG_ERROR([unable to link with MySQL Embedded Server Library])
656 AC_MSG_RESULT(no. skipping MySQL)
661 CPPFLAGS="$save_CPPFLAGS"
664 # if have_mysql_libs=yes then go ahead with building MySQL
665 if test "$have_mysql_libs" = yes ; then
666 # this AC_MSG_RESULT is from above!
668 WANT_SUBDIRS="$WANT_SUBDIRS shib-mysql-ccache"
669 AC_SUBST(MYSQL_CFLAGS)
674 AC_SUBST(WANT_SUBDIRS)
676 if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
677 echo "=================================================================="
678 echo "WARNING: You have chosen to compile Apache-1.3 modules with a different"
679 echo " compiler than the one used to compile Apache."
681 echo " Current compiler: $CC"
682 echo " Apache's compiler: $APXS_CC"
684 echo "This could cause some problems."
685 echo "=================================================================="
688 if test -n "$APXS2_CC" && test "$APXS2_CC" != "$CC" ; then
689 echo "=================================================================="
690 echo "WARNING: You have chosen to compile Apache-2 modules with a different"
691 echo " compiler than the one used to compile Apache."
693 echo " Current compiler: $CC"
694 echo " Apache's compiler: $APXS2_CC"
696 echo "This could cause some problems."
697 echo "=================================================================="