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_WORKING_SVC_DESTROY,1,[Define if RPC SVC macros work on this platform])
86 AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
87 [if test x_$with_dmalloc != x_/usr; then
88 LDFLAGS="-L${with_dmalloc}/lib $LDFLAGS"
89 CPPFLAGS="-I${with_dmalloc}/include $CPPFLAGS"
91 AC_CHECK_LIB(dmallocxx, dmalloc_shutdown,,
92 AC_MSG_ERROR([unable to find dmallocxx library]))
96 AC_PATH_PROG(PKG_CONFIG, pkg-config)
97 if test "x$PKG_CONFIG" = x || test "x$PKG_CONFIG" = "xno" ; then
99 AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]),
100 [if test x_$with_openssl != x_/usr; then
101 SSLLIBS="-L${with_openssl}/lib"
102 SSLFLAGS="-I${with_openssl}/include"
104 SSLLIBS="$SSLLIBS -lssl -lcrypto"
106 SSLLIBS="`$PKG_CONFIG --libs openssl`"
107 SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
109 AC_MSG_CHECKING(for OpenSSL libraries)
110 AC_MSG_RESULT($SSLLIBS)
111 LIBS="$LIBS $SSLLIBS"
112 AC_MSG_CHECKING(for OpenSSL cflags)
113 AC_MSG_RESULT($SSLFLAGS)
114 CPPFLAGS="$SSLFLAGS $CPPFLAGS"
116 AC_CHECK_HEADER([openssl/ssl.h],,
117 AC_MSG_ERROR([unable to find openssl header files]))
118 AC_MSG_CHECKING(for ERR_load_CRYPTO_string)
119 AC_TRY_LINK_FUNC([ERR_load_CRYPTO_strings],,
120 AC_MSG_ERROR([unable to link with openssl libraries]))
122 AC_MSG_CHECKING(for SSL_library_init)
123 AC_TRY_LINK_FUNC([SSL_library_init],,
124 AC_MSG_ERROR([unable to link with openssl libraries]))
130 AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
132 AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp is installed]),
133 [LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"])
134 if test -f "${LOG4CPP_CONFIG}"; then
135 LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
136 CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
138 AC_MSG_WARN([log4cpp-config not found, guessing at log4cpp build settings])
139 LIBS="-llog4cpp $LIBS"
141 AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
143 [#include <log4cpp/Category.hh>],
144 [log4cpp::Category::getInstance("foo")],
145 [AC_DEFINE(HAVE_LIBLOG4CPP,1,[Define if log4cpp library was found])],
146 [AC_MSG_ERROR([unable to link with log4cpp])])
150 AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
151 [if test x_$with_xerces != x_/usr; then
152 LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
153 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
155 LIBS="-lxerces-c $LIBS"
156 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
157 AC_MSG_ERROR([unable to find xerces header files]))
159 [#include <xercesc/util/PlatformUtils.hpp>
160 #include <xercesc/util/XercesVersion.hpp>],
161 [#if _XERCES_VERSION >= 20300
162 xercesc::XMLPlatformUtils::Initialize();
164 #error Need Xerces-C version 2.3+ only
166 [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
167 [AC_MSG_ERROR([unable to link with Xerces])])
169 # XML-Security settings
171 AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),
172 [if test x_$with_xmlsec != x_/usr; then
173 LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
174 CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
176 LIBS="-lxml-security-c $LIBS"
177 AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find xsec header files]))
179 [#include <xsec/utils/XSECPlatformUtils.hpp>],
180 [XSECPlatformUtils::Initialise()],
181 [AC_DEFINE(HAVE_LIBXSEC,1,[Define if XML-Sec library was found])],
182 [AC_MSG_ERROR([unable to link with XML-Sec])])
186 AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
187 [if test x_$with_saml != x_/usr; then
188 LDFLAGS="-L${with_saml}/lib $LDFLAGS"
189 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
191 AC_CHECK_HEADER([saml/saml.h],,
192 AC_MSG_ERROR([unable to find saml header files]))
195 [#include <saml/saml.h>
196 #include <saml/version.h>],
197 [#if _OPENSAML_VERSION >= 10000
198 saml::SAMLConfig::getConfig();
200 #error Need OpenSAML version 1.0 or higher
202 [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
203 [AC_MSG_ERROR([unable to link with saml, or version too old])])
205 # output the underlying makefiles
206 WANT_SUBDIRS="doc shib schemas configs shib-target shar siterefresh test xmlproviders"
207 AC_CONFIG_FILES([Makefile doc/Makefile shib/Makefile schemas/Makefile \
208 configs/Makefile oncrpc/Makefile oncrpc/rpc/Makefile \
209 shib-target/Makefile shar/Makefile siterefresh/Makefile \
210 test/Makefile xmlproviders/Makefile])
213 # now deal with the rpc library, to see if we need to build our own
214 if test $rpctest = "no"; then
215 WANT_SUBDIRS="oncrpc $WANT_SUBDIRS"
216 AC_DEFINE(USE_OUR_ONCRPC,1,[Define if using embedded version of ONC RPC.])
218 AM_CONDITIONAL(USE_OUR_ONCRPC,test "$rpctest" = "no")
221 # Apache 1.3 (mod_shib_13)
223 # --with-apxs (DSO build, the normal way, uses apxs to derive build flags)
224 # --without-apxs (DSO build, you tell us how to build using the environment)
226 AC_ARG_ENABLE(apache-13,
227 AC_HELP_STRING([--enable-apache-13], [enable the Apache 1.3 modules]),
228 [ if test "x$enableval" = "x" ; then
231 WANT_APACHE_13="$enableval"
233 ], [ WANT_APACHE_13=no ])
234 AC_MSG_CHECKING(whether to build Apache-1.3 support)
235 if test "$WANT_APACHE_13" != yes && test "$WANT_APACHE_13" != no ; then
238 AC_MSG_RESULT($WANT_APACHE_13)
240 if test "$WANT_APACHE_13" = yes ; then
243 [ --with-apxs[=FILE] Build shared Apache module(s). FILE is the optional
244 pathname to the Apache apxs tool; defaults to "apxs".],
246 if test "$withval" = "yes"; then
247 for i in /usr/sbin /usr/local/apache/bin ; do
248 if test -f "$i/apxs"; then
252 if test -z "$APXS"; then
260 AC_PATH_PROG(APXS, apxs, no)
263 AC_MSG_CHECKING([for dynamic Apache-1.3 module support (w/ or w/o APXS)])
264 if test "$APXS" = "no"; then
266 # --without-apxs means you want the modules,
267 # but want to tell us how to build them
268 AC_MSG_RESULT(yes, but use environment, not apxs)
270 echo "Did you set one or more of these?"
272 echo "APXS_CFLAGS APXS_PREFIX APXS_INCLUDE APXS_LIBEXEC APXS_SYSCONFDIR"
275 AC_MSG_NOTICE([APXS_CFLAGS is $APXS_CFLAGS])
277 # try and find the Apache root
278 if test -z "$APXS_PREFIX"; then
279 if test -d "/usr/local/apache"; then
280 APXS_PREFIX="/usr/local/apache"
282 AC_MSG_ERROR([You MUST set APXS_PREFIX so the right Apache can be located!])
284 elif test ! -d "$APXS_PREFIX"; then
285 AC_MSG_ERROR([APXS_PREFIX of $APXS_PREFIX cannot be found])
287 AC_MSG_NOTICE([APXS_PREFIX is $APXS_PREFIX])
290 # other subfolders might be derived from APXS_PREFIX
291 if test -z "$APXS_INCLUDE"; then
292 if test -f "$APXS_PREFIX/include/httpd.h"; then
293 APXS_INCLUDE="$APXS_PREFIX/include"
295 AC_MSG_ERROR([can't find Apache include files beneath $APXS_PREFIX])
297 elif ! test -f "$APXS_INCLUDE/httpd.h"; then
298 AC_MSG_ERROR([APXS_INCLUDE of $APXS_INCLUDE does not contain Apache headers])
300 AC_MSG_NOTICE([APXS_INCLUDE is $APXS_INCLUDE])
302 if test -z "$APXS_LIBEXEC"; then
303 if test -d "$APXS_PREFIX/libexec"; then
304 APXS_LIBEXEC="$APXS_PREFIX/libexec"
305 elif test -d "$APXS_PREFIX/modules"; then
306 APXS_LIBEXEC="$APXS_PREFIX/modules"
308 AC_MSG_ERROR([can't find Apache libexec/module directory beneath $APXS_PREFIX])
310 elif ! test -d "$APXS_LIBEXEC"; then
311 AC_MSG_ERROR([APXS_LIBEXEC of $APXS_LIBEXEC does not exist])
313 AC_MSG_NOTICE([APXS_LIBEXEC is $APXS_LIBEXEC])
315 if test -z "$APXS_SYSCONFDIR"; then
316 if test -d "$APXS_PREFIX/conf"; then
317 APXS_SYSCONFDIR="$APXS_PREFIX/conf"
319 AC_MSG_ERROR([can't find Apache conf directory beneath $APXS_PREFIX])
321 elif ! test -d "$APXS_SYSCONFDIR"; then
322 AC_MSG_ERROR([APXS_SYSCONFDIR of $APXS_SYSCONFDIR does not exist])
324 AC_MSG_NOTICE([APXS_SYSCONFDIR is $APXS_SYSCONFDIR])
328 elif test -n "$APXS"; then
330 # extract settings we need from APXS -q
331 APXS_CC="`$APXS -q CC`"
332 APXS_CFLAGS="`$APXS -q CFLAGS` `$APXS -q CFLAGS_SHLIB`"
333 APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
334 APXS_LIBEXEC="`$APXS -q LIBEXECDIR`"
335 APXS_SYSCONFDIR="`$APXS -q SYSCONFDIR`"
338 AC_MSG_RESULT(found at $APXS)
340 if test -z "`$APXS -q LD_SHLIB`" || test "$APXS_LIBEXEC" = "modules"; then
342 [Your APXS installation is broken and cannot be used.
343 Please see http://www.webdav.org/mod_dav/install.html#apxs for
350 # guess we're not doing Apache 1.3
356 AC_SUBST(APXS_CFLAGS)
357 AC_SUBST(APXS_INCLUDE)
358 AC_SUBST(APXS_LIBEXEC)
359 AC_SUBST(APXS_SYSCONFDIR)
360 AM_CONDITIONAL(HAVE_APXS,test -n "$APXS")
363 # Apache 2.0 (mod_shib_20)
365 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags)
366 # --with-apr (DSO build, APR development package installed separately)
367 # --without-apxs2 (DSO build, you tell us how to build using the environment)
369 AC_ARG_ENABLE(apache-20,
370 AC_HELP_STRING([--enable-apache-20], [enable the Apache 2.0 modules]),
371 [ if test "x$enableval" = "x" ; then
374 WANT_APACHE_20="$enableval"
376 ], [ WANT_APACHE_20=no ])
378 AC_MSG_CHECKING(whether to build Apache-2.0 support)
379 if test "$WANT_APACHE_20" != yes && test "$WANT_APACHE_20" != no ; then
382 AC_MSG_RESULT($WANT_APACHE_20)
384 if test "$WANT_APACHE_20" = yes ; then
387 [ --with-apxs2[=FILE] Build shared Apache module(s). FILE is the optional
388 pathname to the Apache apxs tool; defaults to "apxs".],
390 if test "$withval" = "yes"; then
391 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
392 if test -f "$i/apxs"; then
396 if test -z "$APXS2"; then
404 AC_PATH_PROG(APXS2, apxs, no)
407 AC_MSG_CHECKING([for dynamic Apache-2 module support (w/ or w/o APXS)])
408 if test "$APXS2" = "no"; then
410 # --without-apxs2 means you want the modules,
411 # but want to tell us how to build them
412 AC_MSG_RESULT(yes, but use environment, not apxs)
414 echo "Did you set one or more of these?"
416 echo "APXS2_CFLAGS APXS2_PREFIX APXS2_INCLUDE APXS2_LIBEXEC APXS2_SYSCONFDIR"
419 AC_MSG_NOTICE([APXS2_CFLAGS is $APXS2_CFLAGS])
421 # try and find the Apache root
422 if test -z "$APXS2_PREFIX"; then
423 if test -d "/usr/local/apache"; then
424 APXS2_PREFIX="/usr/local/apache"
426 AC_MSG_ERROR([You MUST set APXS2_PREFIX so the right Apache-2 can be located!])
428 elif test ! -d "$APXS2_PREFIX"; then
429 AC_MSG_ERROR([APXS2_PREFIX of $APXS2_PREFIX cannot be found])
431 AC_MSG_NOTICE([APXS2_PREFIX is $APXS2_PREFIX])
434 # other subfolders might be derived from APXS2_PREFIX
435 if test -z "$APXS2_INCLUDE"; then
436 if test -f "$APXS2_PREFIX/include/httpd.h"; then
437 APXS2_INCLUDE="$APXS2_PREFIX/include"
439 AC_MSG_ERROR([can't find Apache-2 include files beneath $APXS2_PREFIX])
441 elif ! test -f "$APXS2_INCLUDE/httpd.h"; then
442 AC_MSG_ERROR([APXS2_INCLUDE of $APXS2_INCLUDE does not contain Apache-2 headers])
444 AC_MSG_NOTICE([APXS2_INCLUDE is $APXS2_INCLUDE])
446 if test -z "$APXS2_LIBEXEC"; then
447 if test -d "$APXS2_PREFIX/libexec"; then
448 APXS2_LIBEXEC="$APXS2_PREFIX/libexec"
449 elif test -d "$APXS2_PREFIX/modules"; then
450 APXS2_LIBEXEC="$APXS2_PREFIX/modules"
452 AC_MSG_ERROR([can't find Apache-2 libexec/module directory beneath $APXS2_PREFIX])
454 elif ! test -d "$APXS2_LIBEXEC"; then
455 AC_MSG_ERROR([APXS2_LIBEXEC of $APXS2_LIBEXEC does not exist])
457 AC_MSG_NOTICE([APXS2_LIBEXEC is $APXS2_LIBEXEC])
459 if test -z "$APXS2_SYSCONFDIR"; then
460 if test -d "$APXS2_PREFIX/conf"; then
461 APXS2_SYSCONFDIR="$APXS2_PREFIX/conf"
463 AC_MSG_ERROR([can't find Apache-2 conf directory beneath $APXS2_PREFIX])
465 elif ! test -d "$APXS2_SYSCONFDIR"; then
466 AC_MSG_ERROR([APXS2_SYSCONFDIR of $APXS2_SYSCONFDIR does not exist])
468 AC_MSG_NOTICE([APXS2_SYSCONFDIR is $APXS2_SYSCONFDIR])
472 elif test -n "$APXS2"; then
475 AC_PATH_PROG(APR_CONFIG,apr-config)
477 AC_HELP_STRING([--with-apr=PATH], [where APR is installed]),
478 [APR_CONFIG="${with_apr}/bin/apr-config"])
479 if test -f "${APR_CONFIG}"; then
480 APR_CFLAGS="`${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags` `${APR_CONFIG} --includes`"
483 # extract settings we need from APXS2 -q
484 APXS2_CC="`$APXS2 -q CC`"
485 APXS2_CFLAGS="`$APXS2 -q CFLAGS` `$APXS2 -q CFLAGS_SHLIB` $APR_CFLAGS"
486 APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
487 APXS2_LIBEXEC="`$APXS2 -q LIBEXECDIR`"
488 APXS2_SYSCONFDIR="`$APXS2 -q SYSCONFDIR`"
491 AC_MSG_RESULT(found at $APXS2)
493 if test -z "`$APXS2 -q LD_SHLIB`" && test -z "`$APXS2 -q LIBEXECDIR`" \
494 || test "$APXS2_LIBEXEC" = "modules"; then
496 [Your APXS installation is broken and cannot be used.
497 Please see http://www.webdav.org/mod_dav/install.html#apxs for
504 # guess we're not doing Apache 2.0
510 AC_SUBST(APXS2_CFLAGS)
511 AC_SUBST(APXS2_INCLUDE)
512 AC_SUBST(APXS2_LIBEXEC)
513 AC_SUBST(APXS2_SYSCONFDIR)
514 AM_CONDITIONAL(HAVE_APXS2,test -n "$APXS2")
516 # always output the Makefile, even if you don't use it
517 AC_CONFIG_FILES([apache/Makefile])
518 AM_CONDITIONAL(BUILD_AP13,test "$WANT_APACHE_13" = "yes")
519 AM_CONDITIONAL(BUILD_AP20,test "$WANT_APACHE_20" = "yes")
521 # add the apache module to the list of wanted subdirs..
522 if test "$WANT_APACHE_13" = "yes" || test "$WANT_APACHE_20" = "yes" ; then
523 WANT_SUBDIRS="$WANT_SUBDIRS apache"
528 # Implement the checks of the MySQL Credential Cache
530 # 1) Assume the user wants MySQL; if it's not found then just continue without
531 # 2) If the user specifically requested Mysql, look for it and ERROR if not found
532 # 3) If the user specifically requested no-mysql, don't build it.
535 AC_CONFIG_FILES([shib-mysql-ccache/Makefile])
537 # determine whether we should enable the mysql ccache
538 AC_ARG_ENABLE([mysql],
539 AC_HELP_STRING([--disable-mysql], [disable the MySQL Credential Cache]),
540 [mysql_enabled=$enableval], [mysql_enabled=default])
542 if test "x$mysql_enabled" = "x" ; then
546 # Are we trying to build MySQL?
547 AC_MSG_CHECKING(whether to build the MySQL ccache)
548 if test "$mysql_enabled" = "yes" ; then
551 elif test "$mysql_enabled" = "default" ; then
553 AC_MSG_RESULT([yes, if it can be found])
559 # If we're trying to build MySQL, try to find the mysql_config program,
560 # verify we've got mysql >= 4, and make sure we can build with mysqld
561 if test "$build_mysql" = "yes" ; then
564 AC_HELP_STRING([--with-mysql=PATH], [directory where mysql is installed]),
565 [if test "$with_mysql" = no ; then
566 AC_MSG_ERROR([Try running --disable-mysql instead.])
567 elif test "$with_mysql" != yes ; then
568 mysql_dir="$with_mysql/bin"
571 # Try to find the mysql_config program
572 AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no, $mysql_dir $PATH )
574 if test "$MYSQL_CONFIG" = no ; then
575 if test "$mysql_enabled" = "yes" ; then
576 AC_MSG_ERROR(Cannot find mysql_config)
578 AC_MSG_WARN(MySQL not found. skipping.)
583 # if we found mysql_config then build_mysql is 'yes'
584 if test "$MYSQL_CONFIG" != no ; then
585 AC_MSG_CHECKING(for mysql version >= 4)
586 mysql_version=`$MYSQL_CONFIG --version`
587 mysql_major_version=`echo $mysql_version | awk -F. '{print $1}'`
589 if test $mysql_major_version -lt 4 ; then
591 if test "$mysql_enabled" = "yes" ; then
592 AC_MSG_ERROR(You need MySQL version >= 4, found $mysql_version)
594 AC_MSG_RESULT(no.. skipping MySQL)
600 # if mysql_version_ok is 'yes', then we've made it this far.. ;)
601 if test "$mysql_version_ok" = "yes" ; then
602 AC_MSG_CHECKING(for embedded-MySQL libraries)
603 MYSQL_LIBS=`$MYSQL_CONFIG --libmysqld-libs`
604 if test $? != 0 ; then
606 if test "$mysql_enabled" = "yes" ; then
607 AC_MSG_ERROR(Could not find the MySQL Embedded-server libraries.)
609 AC_MSG_RESULT(no.. skipping MySQL)
617 # if found_mysql=yes then test that we can actually build mysql
618 if test "$found_mysql" = yes ; then
619 MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
620 MYSQL_CFLAGS=`eval echo $MYSQL_CFLAGS`
621 MYSQL_LIBS=`eval echo $MYSQL_LIBS`
623 save_CPPFLAGS="$CPPFLAGS"
624 CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
626 AC_CHECK_HEADER([mysql.h], [have_mysql_h=yes], [have_mysql_h=no])
627 if test "$have_mysql_h" = no -a "$mysql_enabled" = "yes" ; then
628 AC_MSG_ERROR(unable to find MySQL header files)
631 if test "$have_mysql_h" = yes ; then
633 LIBS="$LIBS $MYSQL_LIBS"
634 AC_MSG_CHECKING(if we can link againt mysql)
638 [mysql_server_init(0, NULL, NULL)],
639 [have_mysql_libs=yes],
640 [have_mysql_libs=no])
643 if test "$have_mysql_libs" = no ; then
644 if test "$mysql_enabled" = "yes" ; then
645 AC_MSG_ERROR([unable to link with MySQL Embedded Server Library])
647 AC_MSG_RESULT(no. skipping MySQL)
652 CPPFLAGS="$save_CPPFLAGS"
655 # if have_mysql_libs=yes then go ahead with building MySQL
656 if test "$have_mysql_libs" = yes ; then
657 # this AC_MSG_RESULT is from above!
659 WANT_SUBDIRS="$WANT_SUBDIRS shib-mysql-ccache"
660 AC_SUBST(MYSQL_CFLAGS)
665 AC_SUBST(WANT_SUBDIRS)
667 if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
668 echo "=================================================================="
669 echo "WARNING: You have chosen to compile Apache-1.3 modules with a different"
670 echo " compiler than the one used to compile Apache."
672 echo " Current compiler: $CC"
673 echo " Apache's compiler: $APXS_CC"
675 echo "This could cause some problems."
676 echo "=================================================================="
679 if test -n "$APXS2_CC" && test "$APXS2_CC" != "$CC" ; then
680 echo "=================================================================="
681 echo "WARNING: You have chosen to compile Apache-2 modules with a different"
682 echo " compiler than the one used to compile Apache."
684 echo " Current compiler: $CC"
685 echo " Apache's compiler: $APXS2_CC"
687 echo "This could cause some problems."
688 echo "=================================================================="