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 # Test RPC now -- finish dealing with it later
70 ACX_RPCTEST([rpctest="yes"],[rpctest="no"])
71 if test $rpctest = "yes" ; then
72 AC_CHECK_DECLS([svcfd_create],,,[#include <rpc/rpc.h>])
76 [[#include <rpc/rpc.h>
77 static SVCXPRT* xprt = NULL;]],
78 [[svc_destroy(xprt);]]),
79 AC_DEFINE(HAVE_WORKING_SVC_DESTROY,1,[Define if RPC SVC macros work on this platform]),)
82 AC_DEFINE(HAVE_DECL_SVCFD_CREATE,1,[ Define to 1 if you have the declaration of svcfd_create, and to 0 if you don't.])
83 AC_DEFINE(HAVE_WORKING_SVC_DESTROY,1,[Define if RPC SVC macros work on this platform])
87 AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
88 [if test x_$with_dmalloc != x_/usr; then
89 LDFLAGS="-L${with_dmalloc}/lib $LDFLAGS"
90 CPPFLAGS="-I${with_dmalloc}/include $CPPFLAGS"
92 AC_CHECK_LIB(dmallocxx, dmalloc_shutdown,,
93 AC_MSG_ERROR([unable to find dmallocxx library]))
97 AC_PATH_PROG(PKG_CONFIG, pkg-config)
98 if test "x$PKG_CONFIG" = x || test "x$PKG_CONFIG" = "xno" ; then
100 AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]),
101 [if test x_$with_openssl != x_/usr; then
102 SSLLIBS="-L${with_openssl}/lib"
103 SSLFLAGS="-I${with_openssl}/include"
105 SSLLIBS="$SSLLIBS -lssl -lcrypto"
107 SSLLIBS="`$PKG_CONFIG --libs openssl`"
108 SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
110 AC_MSG_CHECKING(for OpenSSL libraries)
111 AC_MSG_RESULT($SSLLIBS)
112 LIBS="$LIBS $SSLLIBS"
113 AC_MSG_CHECKING(for OpenSSL cflags)
114 AC_MSG_RESULT($SSLFLAGS)
115 CPPFLAGS="$SSLFLAGS $CPPFLAGS"
117 AC_CHECK_HEADER([openssl/ssl.h],,
118 AC_MSG_ERROR([unable to find openssl header files]))
119 AC_MSG_CHECKING(for ERR_load_CRYPTO_string)
120 AC_TRY_LINK_FUNC([ERR_load_CRYPTO_strings],,
121 AC_MSG_ERROR([unable to link with openssl libraries]))
123 AC_MSG_CHECKING(for SSL_library_init)
124 AC_TRY_LINK_FUNC([SSL_library_init],,
125 AC_MSG_ERROR([unable to link with openssl libraries]))
131 AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
133 AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp is installed]),
134 [LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"])
135 if test -f "${LOG4CPP_CONFIG}"; then
136 LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
137 CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
139 AC_MSG_WARN([log4cpp-config not found, guessing at log4cpp build settings])
140 LIBS="-llog4cpp $LIBS"
142 AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
144 [#include <log4cpp/Category.hh>],
145 [log4cpp::Category::getInstance("foo")],
146 [AC_DEFINE(HAVE_LIBLOG4CPP,1,[Define if log4cpp library was found])],
147 [AC_MSG_ERROR([unable to link with log4cpp])])
151 AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
152 [if test x_$with_xerces != x_/usr; then
153 LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
154 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
156 LIBS="-lxerces-c $LIBS"
157 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
158 AC_MSG_ERROR([unable to find xerces header files]))
160 [#include <xercesc/util/PlatformUtils.hpp>
161 #include <xercesc/util/XercesVersion.hpp>],
162 [#if _XERCES_VERSION >= 20300
163 xercesc::XMLPlatformUtils::Initialize();
165 #error Need Xerces-C version 2.3+ only
167 [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
168 [AC_MSG_ERROR([unable to link with Xerces])])
170 # XML-Security settings
172 AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),
173 [if test x_$with_xmlsec != x_/usr; then
174 LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
175 CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
177 LIBS="-lxml-security-c $LIBS"
178 AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find xsec header files]))
180 [#include <xsec/utils/XSECPlatformUtils.hpp>],
181 [XSECPlatformUtils::Initialise()],
182 [AC_DEFINE(HAVE_LIBXSEC,1,[Define if XML-Sec library was found])],
183 [AC_MSG_ERROR([unable to link with XML-Sec])])
187 AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
188 [if test x_$with_saml != x_/usr; then
189 LDFLAGS="-L${with_saml}/lib $LDFLAGS"
190 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
192 AC_CHECK_HEADER([saml/saml.h],,
193 AC_MSG_ERROR([unable to find saml header files]))
196 [#include <saml/saml.h>
197 #include <saml/version.h>],
198 [#if _OPENSAML_VERSION >= 10000
199 saml::SAMLConfig::getConfig();
201 #error Need OpenSAML version 1.0 or higher
203 [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
204 [AC_MSG_ERROR([unable to link with saml, or version too old])])
206 # output the underlying makefiles
207 WANT_SUBDIRS="doc shib schemas configs shib-target shar siterefresh test xmlproviders"
208 AC_CONFIG_FILES([Makefile doc/Makefile shib/Makefile schemas/Makefile \
209 configs/Makefile oncrpc/Makefile oncrpc/rpc/Makefile \
210 shib-target/Makefile shar/Makefile siterefresh/Makefile \
211 test/Makefile xmlproviders/Makefile])
214 # now deal with the rpc library, to see if we need to build our own
215 if test $rpctest = "no"; then
216 WANT_SUBDIRS="oncrpc $WANT_SUBDIRS"
217 AC_DEFINE(USE_OUR_ONCRPC,1,[Define if using embedded version of ONC RPC.])
219 AM_CONDITIONAL(USE_OUR_ONCRPC,test "$rpctest" = "no")
222 # Apache 1.3 (mod_shib_13)
224 # --with-apxs (DSO build, the normal way, uses apxs to derive build flags)
225 # --without-apxs (DSO build, you tell us how to build using the environment)
227 AC_ARG_ENABLE(apache-13,
228 AC_HELP_STRING([--enable-apache-13], [enable the Apache 1.3 modules]),
229 [ if test "x$enableval" = "x" ; then
232 WANT_APACHE_13="$enableval"
234 ], [ WANT_APACHE_13=no ])
235 AC_MSG_CHECKING(whether to build Apache-1.3 support)
236 if test "$WANT_APACHE_13" != yes && test "$WANT_APACHE_13" != no ; then
239 AC_MSG_RESULT($WANT_APACHE_13)
241 if test "$WANT_APACHE_13" = yes ; then
244 [ --with-apxs[=FILE] Build shared Apache module(s). FILE is the optional
245 pathname to the Apache apxs tool; defaults to "apxs".],
247 if test "$withval" = "yes"; then
248 for i in /usr/sbin /usr/local/apache/bin ; do
249 if test -f "$i/apxs"; then
253 if test -z "$APXS"; then
261 AC_PATH_PROG(APXS, apxs, no)
264 AC_MSG_CHECKING([for dynamic Apache-1.3 module support (w/ or w/o APXS)])
265 if test "$APXS" = "no"; then
267 # --without-apxs means you want the modules,
268 # but want to tell us how to build them
269 AC_MSG_RESULT(yes, but use environment, not apxs)
271 echo "Did you set one or more of these?"
273 echo "APXS_CFLAGS APXS_PREFIX APXS_INCLUDE APXS_LIBEXEC APXS_SYSCONFDIR"
276 AC_MSG_NOTICE([APXS_CFLAGS is $APXS_CFLAGS])
278 # try and find the Apache root
279 if test -z "$APXS_PREFIX"; then
280 if test -d "/usr/local/apache"; then
281 APXS_PREFIX="/usr/local/apache"
283 AC_MSG_ERROR([You MUST set APXS_PREFIX so the right Apache can be located!])
285 elif test ! -d "$APXS_PREFIX"; then
286 AC_MSG_ERROR([APXS_PREFIX of $APXS_PREFIX cannot be found])
288 AC_MSG_NOTICE([APXS_PREFIX is $APXS_PREFIX])
291 # other subfolders might be derived from APXS_PREFIX
292 if test -z "$APXS_INCLUDE"; then
293 if test -f "$APXS_PREFIX/include/httpd.h"; then
294 APXS_INCLUDE="$APXS_PREFIX/include"
296 AC_MSG_ERROR([can't find Apache include files beneath $APXS_PREFIX])
298 elif ! test -f "$APXS_INCLUDE/httpd.h"; then
299 AC_MSG_ERROR([APXS_INCLUDE of $APXS_INCLUDE does not contain Apache headers])
301 AC_MSG_NOTICE([APXS_INCLUDE is $APXS_INCLUDE])
303 if test -z "$APXS_LIBEXEC"; then
304 if test -d "$APXS_PREFIX/libexec"; then
305 APXS_LIBEXEC="$APXS_PREFIX/libexec"
306 elif test -d "$APXS_PREFIX/modules"; then
307 APXS_LIBEXEC="$APXS_PREFIX/modules"
309 AC_MSG_ERROR([can't find Apache libexec/module directory beneath $APXS_PREFIX])
311 elif ! test -d "$APXS_LIBEXEC"; then
312 AC_MSG_ERROR([APXS_LIBEXEC of $APXS_LIBEXEC does not exist])
314 AC_MSG_NOTICE([APXS_LIBEXEC is $APXS_LIBEXEC])
316 if test -z "$APXS_SYSCONFDIR"; then
317 if test -d "$APXS_PREFIX/conf"; then
318 APXS_SYSCONFDIR="$APXS_PREFIX/conf"
320 AC_MSG_ERROR([can't find Apache conf directory beneath $APXS_PREFIX])
322 elif ! test -d "$APXS_SYSCONFDIR"; then
323 AC_MSG_ERROR([APXS_SYSCONFDIR of $APXS_SYSCONFDIR does not exist])
325 AC_MSG_NOTICE([APXS_SYSCONFDIR is $APXS_SYSCONFDIR])
329 elif test -n "$APXS"; then
331 # extract settings we need from APXS -q
332 APXS_CC="`$APXS -q CC`"
333 APXS_CFLAGS="`$APXS -q CFLAGS` `$APXS -q CFLAGS_SHLIB`"
334 APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
335 APXS_LIBEXEC="`$APXS -q LIBEXECDIR`"
336 APXS_SYSCONFDIR="`$APXS -q SYSCONFDIR`"
339 AC_MSG_RESULT(found at $APXS)
341 if test -z "`$APXS -q LD_SHLIB`" || test "$APXS_LIBEXEC" = "modules"; then
343 [Your APXS installation is broken and cannot be used.
344 Please see http://www.webdav.org/mod_dav/install.html#apxs for
351 # guess we're not doing Apache 1.3
357 AC_SUBST(APXS_CFLAGS)
358 AC_SUBST(APXS_INCLUDE)
359 AC_SUBST(APXS_LIBEXEC)
360 AC_SUBST(APXS_SYSCONFDIR)
361 AM_CONDITIONAL(HAVE_APXS,test -n "$APXS")
364 # Apache 2.0 (mod_shib_20)
366 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags)
367 # --with-apr (DSO build, APR development package installed separately)
368 # --without-apxs2 (DSO build, you tell us how to build using the environment)
370 AC_ARG_ENABLE(apache-20,
371 AC_HELP_STRING([--enable-apache-20], [enable the Apache 2.0 modules]),
372 [ if test "x$enableval" = "x" ; then
375 WANT_APACHE_20="$enableval"
377 ], [ WANT_APACHE_20=no ])
379 AC_MSG_CHECKING(whether to build Apache-2.0 support)
380 if test "$WANT_APACHE_20" != yes && test "$WANT_APACHE_20" != no ; then
383 AC_MSG_RESULT($WANT_APACHE_20)
385 if test "$WANT_APACHE_20" = yes ; then
388 [ --with-apxs2[=FILE] Build shared Apache module(s). FILE is the optional
389 pathname to the Apache apxs tool; defaults to "apxs".],
391 if test "$withval" = "yes"; then
392 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
393 if test -f "$i/apxs"; then
397 if test -z "$APXS2"; then
405 AC_PATH_PROG(APXS2, apxs, no)
408 AC_MSG_CHECKING([for dynamic Apache-2 module support (w/ or w/o APXS)])
409 if test "$APXS2" = "no"; then
411 # --without-apxs2 means you want the modules,
412 # but want to tell us how to build them
413 AC_MSG_RESULT(yes, but use environment, not apxs)
415 echo "Did you set one or more of these?"
417 echo "APXS2_CFLAGS APXS2_PREFIX APXS2_INCLUDE APXS2_LIBEXEC APXS2_SYSCONFDIR"
420 AC_MSG_NOTICE([APXS2_CFLAGS is $APXS2_CFLAGS])
422 # try and find the Apache root
423 if test -z "$APXS2_PREFIX"; then
424 if test -d "/usr/local/apache"; then
425 APXS2_PREFIX="/usr/local/apache"
427 AC_MSG_ERROR([You MUST set APXS2_PREFIX so the right Apache-2 can be located!])
429 elif test ! -d "$APXS2_PREFIX"; then
430 AC_MSG_ERROR([APXS2_PREFIX of $APXS2_PREFIX cannot be found])
432 AC_MSG_NOTICE([APXS2_PREFIX is $APXS2_PREFIX])
435 # other subfolders might be derived from APXS2_PREFIX
436 if test -z "$APXS2_INCLUDE"; then
437 if test -f "$APXS2_PREFIX/include/httpd.h"; then
438 APXS2_INCLUDE="$APXS2_PREFIX/include"
440 AC_MSG_ERROR([can't find Apache-2 include files beneath $APXS2_PREFIX])
442 elif ! test -f "$APXS2_INCLUDE/httpd.h"; then
443 AC_MSG_ERROR([APXS2_INCLUDE of $APXS2_INCLUDE does not contain Apache-2 headers])
445 AC_MSG_NOTICE([APXS2_INCLUDE is $APXS2_INCLUDE])
447 if test -z "$APXS2_LIBEXEC"; then
448 if test -d "$APXS2_PREFIX/libexec"; then
449 APXS2_LIBEXEC="$APXS2_PREFIX/libexec"
450 elif test -d "$APXS2_PREFIX/modules"; then
451 APXS2_LIBEXEC="$APXS2_PREFIX/modules"
453 AC_MSG_ERROR([can't find Apache-2 libexec/module directory beneath $APXS2_PREFIX])
455 elif ! test -d "$APXS2_LIBEXEC"; then
456 AC_MSG_ERROR([APXS2_LIBEXEC of $APXS2_LIBEXEC does not exist])
458 AC_MSG_NOTICE([APXS2_LIBEXEC is $APXS2_LIBEXEC])
460 if test -z "$APXS2_SYSCONFDIR"; then
461 if test -d "$APXS2_PREFIX/conf"; then
462 APXS2_SYSCONFDIR="$APXS2_PREFIX/conf"
464 AC_MSG_ERROR([can't find Apache-2 conf directory beneath $APXS2_PREFIX])
466 elif ! test -d "$APXS2_SYSCONFDIR"; then
467 AC_MSG_ERROR([APXS2_SYSCONFDIR of $APXS2_SYSCONFDIR does not exist])
469 AC_MSG_NOTICE([APXS2_SYSCONFDIR is $APXS2_SYSCONFDIR])
473 elif test -n "$APXS2"; then
476 AC_PATH_PROG(APR_CONFIG,apr-config)
478 AC_HELP_STRING([--with-apr=PATH], [where APR is installed]),
479 [APR_CONFIG="${with_apr}/bin/apr-config"])
480 if test -f "${APR_CONFIG}"; then
481 APR_CFLAGS="`${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags` `${APR_CONFIG} --includes`"
484 # extract settings we need from APXS2 -q
485 APXS2_CC="`$APXS2 -q CC`"
486 APXS2_CFLAGS="`$APXS2 -q CFLAGS` `$APXS2 -q CFLAGS_SHLIB` $APR_CFLAGS"
487 APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
488 APXS2_LIBEXEC="`$APXS2 -q LIBEXECDIR`"
489 APXS2_SYSCONFDIR="`$APXS2 -q SYSCONFDIR`"
492 AC_MSG_RESULT(found at $APXS2)
494 if test -z "`$APXS2 -q LD_SHLIB`" && test -z "`$APXS2 -q LIBEXECDIR`" \
495 || test "$APXS2_LIBEXEC" = "modules"; then
497 [Your APXS installation is broken and cannot be used.
498 Please see http://www.webdav.org/mod_dav/install.html#apxs for
505 # guess we're not doing Apache 2.0
511 AC_SUBST(APXS2_CFLAGS)
512 AC_SUBST(APXS2_INCLUDE)
513 AC_SUBST(APXS2_LIBEXEC)
514 AC_SUBST(APXS2_SYSCONFDIR)
515 AM_CONDITIONAL(HAVE_APXS2,test -n "$APXS2")
517 # always output the Makefile, even if you don't use it
518 AC_CONFIG_FILES([apache/Makefile])
519 AM_CONDITIONAL(BUILD_AP13,test "$WANT_APACHE_13" = "yes")
520 AM_CONDITIONAL(BUILD_AP20,test "$WANT_APACHE_20" = "yes")
522 # add the apache module to the list of wanted subdirs..
523 if test "$WANT_APACHE_13" = "yes" || test "$WANT_APACHE_20" = "yes" ; then
524 WANT_SUBDIRS="$WANT_SUBDIRS apache"
529 # Implement the checks of the MySQL Credential Cache
531 # 1) Assume the user wants MySQL; if it's not found then just continue without
532 # 2) If the user specifically requested Mysql, look for it and ERROR if not found
533 # 3) If the user specifically requested no-mysql, don't build it.
536 AC_CONFIG_FILES([shib-mysql-ccache/Makefile])
538 # determine whether we should enable the mysql ccache
539 AC_ARG_ENABLE([mysql],
540 AC_HELP_STRING([--disable-mysql], [disable the MySQL Credential Cache]),
541 [mysql_enabled=$enableval], [mysql_enabled=default])
543 if test "x$mysql_enabled" = "x" ; then
547 # Are we trying to build MySQL?
548 AC_MSG_CHECKING(whether to build the MySQL ccache)
549 if test "$mysql_enabled" = "yes" ; then
552 elif test "$mysql_enabled" = "default" ; then
554 AC_MSG_RESULT([yes, if it can be found])
560 # If we're trying to build MySQL, try to find the mysql_config program,
561 # verify we've got mysql >= 4, and make sure we can build with mysqld
562 if test "$build_mysql" = "yes" ; then
565 AC_HELP_STRING([--with-mysql=PATH], [directory where mysql is installed]),
566 [if test "$with_mysql" = no ; then
567 AC_MSG_ERROR([Try running --disable-mysql instead.])
568 elif test "$with_mysql" != yes ; then
569 mysql_dir="$with_mysql/bin"
572 # Try to find the mysql_config program
573 AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no, $mysql_dir $PATH )
575 if test "$MYSQL_CONFIG" = no ; then
576 if test "$mysql_enabled" = "yes" ; then
577 AC_MSG_ERROR(Cannot find mysql_config)
579 AC_MSG_WARN(MySQL not found. skipping.)
584 # if we found mysql_config then build_mysql is 'yes'
585 if test "$MYSQL_CONFIG" != no ; then
586 AC_MSG_CHECKING(for mysql version >= 4)
587 mysql_version=`$MYSQL_CONFIG --version`
588 mysql_major_version=`echo $mysql_version | awk -F. '{print $1}'`
590 if test $mysql_major_version -lt 4 ; then
592 if test "$mysql_enabled" = "yes" ; then
593 AC_MSG_ERROR(You need MySQL version >= 4, found $mysql_version)
595 AC_MSG_RESULT(no.. skipping MySQL)
601 # if mysql_version_ok is 'yes', then we've made it this far.. ;)
602 if test "$mysql_version_ok" = "yes" ; then
603 AC_MSG_CHECKING(for embedded-MySQL libraries)
604 MYSQL_LIBS=`$MYSQL_CONFIG --libmysqld-libs`
605 if test $? != 0 ; then
607 if test "$mysql_enabled" = "yes" ; then
608 AC_MSG_ERROR(Could not find the MySQL Embedded-server libraries.)
610 AC_MSG_RESULT(no.. skipping MySQL)
618 # if found_mysql=yes then test that we can actually build mysql
619 if test "$found_mysql" = yes ; then
620 MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
621 MYSQL_CFLAGS=`eval echo $MYSQL_CFLAGS`
622 MYSQL_LIBS=`eval echo $MYSQL_LIBS`
624 save_CPPFLAGS="$CPPFLAGS"
625 CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
627 AC_CHECK_HEADER([mysql.h], [have_mysql_h=yes], [have_mysql_h=no])
628 if test "$have_mysql_h" = no -a "$mysql_enabled" = "yes" ; then
629 AC_MSG_ERROR(unable to find MySQL header files)
632 if test "$have_mysql_h" = yes ; then
634 LIBS="$LIBS $MYSQL_LIBS"
635 AC_MSG_CHECKING(if we can link againt mysql)
639 [mysql_server_init(0, NULL, NULL)],
640 [have_mysql_libs=yes],
641 [have_mysql_libs=no])
644 if test "$have_mysql_libs" = no ; then
645 if test "$mysql_enabled" = "yes" ; then
646 AC_MSG_ERROR([unable to link with MySQL Embedded Server Library])
648 AC_MSG_RESULT(no. skipping MySQL)
653 CPPFLAGS="$save_CPPFLAGS"
656 # if have_mysql_libs=yes then go ahead with building MySQL
657 if test "$have_mysql_libs" = yes ; then
658 # this AC_MSG_RESULT is from above!
660 WANT_SUBDIRS="$WANT_SUBDIRS shib-mysql-ccache"
661 AC_SUBST(MYSQL_CFLAGS)
666 AC_SUBST(WANT_SUBDIRS)
668 if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
669 echo "=================================================================="
670 echo "WARNING: You have chosen to compile Apache-1.3 modules with a different"
671 echo " compiler than the one used to compile Apache."
673 echo " Current compiler: $CC"
674 echo " Apache's compiler: $APXS_CC"
676 echo "This could cause some problems."
677 echo "=================================================================="
680 if test -n "$APXS2_CC" && test "$APXS2_CC" != "$CC" ; then
681 echo "=================================================================="
682 echo "WARNING: You have chosen to compile Apache-2 modules with a different"
683 echo " compiler than the one used to compile Apache."
685 echo " Current compiler: $CC"
686 echo " Apache's compiler: $APXS2_CC"
688 echo "This could cause some problems."
689 echo "=================================================================="