2 AC_INIT([shibboleth], [1.3], [shibboleth-users@internet2.edu], [shibboleth])
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE([shibboleth],[1.3])
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 -Wall -g -D_DEBUG"
16 GCC_CXXFLAGS="$CXXFLAGS -Wall -g -D_DEBUG"
18 GCC_CFLAGS="$CFLAGS -Wall -O2 -DNDEBUG"
19 GCC_CXXFLAGS="$CXXFLAGS -Wall -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 AC_ARG_ENABLE(native-rpc,
71 AC_HELP_STRING([--enable-native-rpc], [use the OS-supplied Sun RPC library, default is NO, except Linux]),
72 [ if test "x$enableval" = "x" ; then
75 NATIVE_RPC="$enableval"
78 ACX_RPCTEST([rpctest="yes"],[rpctest="no"])
79 AC_MSG_NOTICE([does the native Sun RPC library support svcfd_create...$rpctest])
80 if test $NATIVE_RPC = "no"; then
83 if test $rpctest = "yes"; then
84 AC_MSG_WARN([embedded Sun RPC library does not support Linux])
87 AC_MSG_ERROR([embedded Sun RPC library won't work, but neither will native version])
92 if test $NATIVE_RPC = "yes" && test $rpctest = "no"; then
93 AC_MSG_WARN([native Sun RPC won't work, using internal version])
96 if test $NATIVE_RPC = "yes"; then
97 AC_CHECK_DECLS([svcfd_create],,,[#include <rpc/rpc.h>])
101 [[#include <rpc/rpc.h>
102 static SVCXPRT* xprt = NULL;]],
103 [[svc_destroy(xprt);]]),
104 AC_DEFINE(HAVE_WORKING_SVC_DESTROY,1,[Define if RPC SVC macros work on this platform]),)
107 AC_CHECK_TYPES([struct rpcent],,,[#include <netdb.h>])
108 AC_CHECK_DECLS(sys_errlist)
109 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.])
110 AC_DEFINE(HAVE_WORKING_SVC_DESTROY,1,[Define if RPC SVC macros work on this platform])
114 AC_HELP_STRING([--with-dmalloc=PATH], [where dmalloc is installed]),
115 [if test x_$with_dmalloc != x_/usr; then
116 LDFLAGS="-L${with_dmalloc}/lib $LDFLAGS"
117 CPPFLAGS="-I${with_dmalloc}/include $CPPFLAGS"
119 AC_CHECK_LIB(dmallocxx, dmalloc_shutdown,,
120 AC_MSG_ERROR([unable to find dmallocxx library]))
124 AC_PATH_PROG(PKG_CONFIG, pkg-config)
125 if test "x$PKG_CONFIG" = x || test "x$PKG_CONFIG" = "xno" ; then
127 AC_HELP_STRING([--with-openssl=PATH], [where openssl is installed]),
128 [if test x_$with_openssl != x_/usr; then
129 SSLLIBS="-L${with_openssl}/lib"
130 SSLFLAGS="-I${with_openssl}/include"
132 SSLLIBS="$SSLLIBS -lssl -lcrypto"
134 SSLLIBS="`$PKG_CONFIG --libs openssl`"
135 SSLFLAGS="`$PKG_CONFIG --cflags openssl`"
137 AC_MSG_CHECKING(for OpenSSL libraries)
138 AC_MSG_RESULT($SSLLIBS)
139 LIBS="$LIBS $SSLLIBS"
140 AC_MSG_CHECKING(for OpenSSL cflags)
141 AC_MSG_RESULT($SSLFLAGS)
142 CPPFLAGS="$SSLFLAGS $CPPFLAGS"
144 AC_CHECK_HEADER([openssl/ssl.h],,
145 AC_MSG_ERROR([unable to find openssl header files]))
146 AC_MSG_CHECKING(for ERR_load_CRYPTO_string)
147 AC_TRY_LINK_FUNC([ERR_load_CRYPTO_strings],,
148 AC_MSG_ERROR([unable to link with openssl libraries]))
150 AC_MSG_CHECKING(for SSL_library_init)
151 AC_TRY_LINK_FUNC([SSL_library_init],,
152 AC_MSG_ERROR([unable to link with openssl libraries]))
158 AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
160 AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp is installed]),
161 [LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"])
162 if test -f "${LOG4CPP_CONFIG}"; then
163 LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
164 CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
166 AC_MSG_WARN([log4cpp-config not found, guessing at log4cpp build settings])
167 LIBS="-llog4cpp $LIBS"
169 AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
171 [#include <log4cpp/Category.hh>],
172 [log4cpp::Category::getInstance("foo")],
173 [AC_DEFINE(HAVE_LIBLOG4CPP,1,[Define if log4cpp library was found])],
174 [AC_MSG_ERROR([unable to link with log4cpp])])
178 AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
179 [if test x_$with_xerces != x_/usr; then
180 LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
181 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
183 LIBS="-lxerces-c $LIBS"
184 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
185 AC_MSG_ERROR([unable to find xerces header files]))
186 AC_MSG_CHECKING([Xerces version])
188 [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
189 [#if _XERCES_VERSION > 20200 && _XERCES_VERSION != 20600
192 #error requires version > 2.2.0 but not 2.6.0
195 [AC_MSG_ERROR([Shibboleth requires patched Xerces version 2.6.1 (http://shibboleth.internet2.edu/downloads/)])])
197 [#include <xercesc/util/PlatformUtils.hpp>],
198 [xercesc::XMLPlatformUtils::Initialize()],
199 [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
200 [AC_MSG_ERROR([unable to link with Xerces])])
203 # XML-Security settings
205 AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),
206 [if test x_$with_xmlsec != x_/usr; then
207 LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
208 CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
210 LIBS="-lxml-security-c $LIBS"
211 AC_CHECK_HEADER([xsec/xenc/XENCEncryptionMethod.hpp],,AC_MSG_ERROR([unable to find xml-security 1.1 header files]),[#include <xercesc/dom/DOM.hpp>])
213 [#include <xsec/utils/XSECPlatformUtils.hpp>],
214 [XSECPlatformUtils::Initialise()],
215 [AC_DEFINE(HAVE_LIBXSEC,1,[Define if XML-Sec library was found])],
216 [AC_MSG_ERROR([unable to link with xml-security])])
220 AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
221 [if test x_$with_saml != x_/usr; then
222 LDFLAGS="-L${with_saml}/lib $LDFLAGS"
223 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
225 AC_CHECK_HEADER([saml/saml.h],,
226 AC_MSG_ERROR([unable to find saml header files]))
229 [#include <saml/saml.h>
230 #include <saml/version.h>],
231 [#if _OPENSAML_VERSION >= 10100
232 saml::SAMLConfig::getConfig();
234 #error Need OpenSAML version 1.1 or higher
236 [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
237 [AC_MSG_ERROR([unable to link with saml, or version too old])])
239 # output the underlying makefiles
240 WANT_SUBDIRS="doc shib schemas configs shib-target shar siterefresh test xmlproviders adfs"
241 AC_CONFIG_FILES([Makefile doc/Makefile shib/Makefile schemas/Makefile \
242 configs/Makefile oncrpc/Makefile oncrpc/rpc/Makefile \
243 shib-target/Makefile shar/Makefile siterefresh/Makefile \
244 test/Makefile xmlproviders/Makefile adfs/Makefile selinux/Makefile])
247 # now deal with the rpc library, to see if we need to build our own
248 if test $NATIVE_RPC = "no"; then
249 WANT_SUBDIRS="oncrpc $WANT_SUBDIRS"
250 AC_DEFINE(USE_OUR_ONCRPC,1,[Define if using embedded version of ONC RPC.])
252 AM_CONDITIONAL(USE_OUR_ONCRPC,test "$NATIVE_RPC" = "no")
255 # Build NSAPI module?
257 AC_MSG_CHECKING(for NSAPI module option)
259 AC_HELP_STRING([--with-nsapi=DIR], [Build NSAPI module for Netscape/iPlanet/SunONE]),
260 [WANT_NSAPI=$withval],[WANT_NSAPI=no])
261 AC_MSG_RESULT($WANT_NSAPI)
263 if test "$WANT_NSAPI" != "no"; then
264 if test ! -d $WANT_NSAPI/bin ; then
265 AC_MSG_ERROR(Please specify the path to the root of your Netscape/iPlanet/SunONE server using --with-nsapi=DIR)
267 AC_MSG_CHECKING(for NSAPI include files)
268 if test -d $WANT_NSAPI/include ; then
269 NSAPI_INCLUDE=$WANT_NSAPI/include
270 AC_MSG_RESULT(Netscape-Enterprise 3.x style)
271 AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h])
272 NSAPI_INCLUDE="$NSAPI_INC_DIR -I$NSAPI_INCLUDE"
274 if test -d $WANT_NSAPI/plugins/include ; then
275 test -n "$NSAPI_INCLUDE" && NSAPI_INC_DIR="-I$NSAPI_INCLUDE"
276 NSAPI_INCLUDE="$WANT_NSAPI/plugins/include"
277 AC_MSG_RESULT(iPlanet 4.x / SunONE 6.x style)
278 AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h])
279 NSAPI_INCLUDE="$NSAPI_INC_DIR -I$NSAPI_INCLUDE"
281 if test "$NSAPI_INCLUDE" = ""; then
282 AC_MSG_ERROR(Please check you have nsapi.h in either $WANT_NSAPI/include or $WANT_NSAPI/plugins/include)
286 AC_SUBST(NSAPI_INCLUDE)
288 # always output the Makefile, even if you don't use it
289 AC_CONFIG_FILES([nsapi_shib/Makefile])
290 AM_CONDITIONAL(BUILD_NSAPI,test ! "$WANT_NSAPI" = "no")
292 # add the NSAPI module to the list of wanted subdirs..
293 if test ! "$WANT_NSAPI" = "no" ; then
294 WANT_SUBDIRS="$WANT_SUBDIRS nsapi_shib"
298 # Apache 1.3 (mod_shib_13)
300 # --with-apxs (DSO build, the normal way, uses apxs to derive build flags)
302 AC_ARG_ENABLE(apache-13,
303 AC_HELP_STRING([--enable-apache-13], [enable the Apache 1.3 module]),
304 [ if test "x$enableval" = "x" ; then
307 WANT_APACHE_13="$enableval"
309 ],[ WANT_APACHE_13=no ])
310 AC_MSG_CHECKING(whether to build Apache 1.3 module)
311 if test "$WANT_APACHE_13" != yes && test "$WANT_APACHE_13" != no ; then
314 AC_MSG_RESULT($WANT_APACHE_13)
316 if test "$WANT_APACHE_13" = "yes" ; then
318 AC_HELP_STRING([--with-apxs=FILE], [Specifies where to find the Apache 1.3 apxs script.]),
320 AC_MSG_CHECKING(for user-specified apxs name/location)
321 if test "$withval" != "no" ; then
322 if test "$withval" != "yes"; then
324 AC_MSG_RESULT("$withval")
329 AC_PATH_PROG(APXS, apxs, no)
330 if test -z "$APXS" ; then
331 for i in /usr/sbin /usr/local/apache/bin ; do
332 if test -f "$i/apxs"; then
339 AC_MSG_CHECKING([to see if apxs was located])
340 if test ! -f "$APXS" ; then
342 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.])
347 # extract settings we need from APXS -q
348 APXS_CC="`$APXS -q CC`"
349 APXS_CFLAGS="`$APXS -q CPPFLAGS` `$APXS -q CFLAGS` `$APXS -q CFLAGS_SHLIB`"
350 APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
353 AC_SUBST(APXS_CFLAGS)
354 AC_SUBST(APXS_INCLUDE)
357 # Apache 2.0 (mod_shib_20)
359 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags)
360 # --with-apr (DSO build, APR development package installed separately)
362 AC_ARG_ENABLE(apache-20,
363 AC_HELP_STRING([--enable-apache-20], [enable the Apache 2.0 module]),
364 [ if test "x$enableval" = "x" ; then
367 WANT_APACHE_20="$enableval"
369 ],[ WANT_APACHE_20=no ])
370 AC_MSG_CHECKING(whether to build Apache 2.0 module)
371 if test "$WANT_APACHE_20" != yes && test "$WANT_APACHE_20" != no ; then
374 AC_MSG_RESULT($WANT_APACHE_20)
376 if test "$WANT_APACHE_20" = "yes" ; then
378 AC_HELP_STRING([--with-apxs2=FILE], [Specifies where to find the Apache 2.0 apxs script.]),
380 AC_MSG_CHECKING(for user-specified Apache2 apxs name/location)
381 if test "$withval" != "no" ; then
382 if test "$withval" != "yes"; then
384 AC_MSG_RESULT("$withval")
389 AC_PATH_PROG(APXS2, apxs, no)
390 if test -z "$APXS2" ; then
391 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
392 if test -f "$i/apxs"; then
399 AC_MSG_CHECKING([to see if Apache2 apxs was located])
400 if test ! -f "$APXS2" ; then
402 AC_MSG_ERROR([Unable to locate Apache2 apxs script. An Apache development package may be missing from your server, or you may need to use the --with-apxs2 option.])
404 AC_MSG_RESULT($APXS2)
409 AC_HELP_STRING([--with-apr=PATH], [where apr-config is installed]),
411 AC_MSG_CHECKING(for user-specified apr-config name/location)
412 if test "$withval" != "no" ; then
413 if test "$withval" != "yes"; then
415 AC_MSG_RESULT("$withval")
420 AC_PATH_PROG(APR_CONFIG, apr-config)
422 if test -f "${APR_CONFIG}"; then
423 APR_CFLAGS="`${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags` `${APR_CONFIG} --includes`"
425 AC_MSG_ERROR([Unable to locate apr-config, may need --with-apr option.])
428 # extract settings we need from APXS2 -q
429 APXS2_CC="`$APXS2 -q CC`"
430 APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` `$APXS2 -q CFLAGS_SHLIB` $APR_CFLAGS"
431 APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
434 AC_SUBST(APXS2_CFLAGS)
435 AC_SUBST(APXS2_INCLUDE)
438 # Apache 2.2 (mod_shib_22)
440 # --with-apxs22 (DSO build, the normal way, uses apxs to derive build flags)
441 # --with-apr1 (DSO build, APR development package installed separately)
443 AC_ARG_ENABLE(apache-22,
444 AC_HELP_STRING([--enable-apache-22], [enable the Apache 2.2 module]),
445 [ if test "x$enableval" = "x" ; then
448 WANT_APACHE_22="$enableval"
450 ],[ WANT_APACHE_22=no ])
451 AC_MSG_CHECKING(whether to build Apache 2.2 module)
452 if test "$WANT_APACHE_22" != yes && test "$WANT_APACHE_22" != no ; then
455 AC_MSG_RESULT($WANT_APACHE_22)
457 if test "$WANT_APACHE_22" = "yes" ; then
459 AC_HELP_STRING([--with-apxs22=FILE], [Specifies where to find the Apache 2.2 apxs script.]),
461 AC_MSG_CHECKING(for user-specified Apache2.2 apxs name/location)
462 if test "$withval" != "no" ; then
463 if test "$withval" != "yes"; then
465 AC_MSG_RESULT("$withval")
470 AC_PATH_PROG(APXS22, apxs, no)
471 if test -z "$APXS22" ; then
472 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
473 if test -f "$i/apxs"; then
480 AC_MSG_CHECKING([to see if Apache2.2 apxs was located])
481 if test ! -f "$APXS22" ; then
483 AC_MSG_ERROR([Unable to locate Apache2.2 apxs script. An Apache development package may be missing from your server, or you may need to use the --with-apxs22 option.])
485 AC_MSG_RESULT($APXS22)
490 AC_HELP_STRING([--with-apr1=PATH], [where apr-1-config is installed]),
492 AC_MSG_CHECKING(for user-specified apr-1-config name/location)
493 if test "$withval" != "no" ; then
494 if test "$withval" != "yes"; then
496 AC_MSG_RESULT("$withval")
501 AC_PATH_PROG(APR1_CONFIG, apr-1-config)
503 if test -f "${APR1_CONFIG}"; then
504 APR1_CFLAGS="`${APR1_CONFIG} --cflags` `${APR1_CONFIG} --cppflags` `${APR1_CONFIG} --includes`"
506 AC_MSG_ERROR([Unable to locate apr-1-config, may need --with-apr1 option.])
509 # extract settings we need from APXS22 -q
510 APXS22_CC="`$APXS22 -q CC`"
511 APXS22_CFLAGS="`$APXS22 -q CPPFLAGS` `$APXS22 -q CFLAGS` `$APXS22 -q CFLAGS_SHLIB` $APR1_CFLAGS"
512 APXS22_INCLUDE="`$APXS22 -q INCLUDEDIR`"
515 AC_SUBST(APXS22_CFLAGS)
516 AC_SUBST(APXS22_INCLUDE)
518 # always output the Makefile, even if you don't use it
519 AC_CONFIG_FILES([apache/Makefile])
520 AM_CONDITIONAL(BUILD_AP13,test "$WANT_APACHE_13" = "yes")
521 AM_CONDITIONAL(BUILD_AP20,test "$WANT_APACHE_20" = "yes")
522 AM_CONDITIONAL(BUILD_AP22,test "$WANT_APACHE_22" = "yes")
524 # add the apache module to the list of wanted subdirs..
525 if test "$WANT_APACHE_13" = "yes" || test "$WANT_APACHE_20" = "yes" || test "$WANT_APACHE_22" = "yes" ; then
526 WANT_SUBDIRS="$WANT_SUBDIRS apache"
531 # Implement the checks of the MySQL Credential Cache
533 # 1) Assume the user wants MySQL; if it's not found then just continue without
534 # 2) If the user specifically requested Mysql, look for it and ERROR if not found
535 # 3) If the user specifically requested no-mysql, don't build it.
538 AC_CONFIG_FILES([shib-mysql-ccache/Makefile])
540 # determine whether we should enable the mysql ccache
541 AC_ARG_ENABLE([mysql],
542 AC_HELP_STRING([--disable-mysql], [disable the MySQL Credential Cache]),
543 [mysql_enabled=$enableval], [mysql_enabled=default])
545 if test "x$mysql_enabled" = "x" ; then
549 # Are we trying to build MySQL?
550 AC_MSG_CHECKING(whether to build the MySQL ccache)
551 if test "$mysql_enabled" = "yes" ; then
554 elif test "$mysql_enabled" = "default" ; then
556 AC_MSG_RESULT([yes, if it can be found])
562 # If we're trying to build MySQL, try to find the mysql_config program,
563 # verify we've got mysql >= 4, and make sure we can build with mysqld
564 if test "$build_mysql" = "yes" ; then
567 AC_HELP_STRING([--with-mysql=PATH], [directory where mysql is installed]),
568 [if test "$with_mysql" = no ; then
569 AC_MSG_ERROR([Try running --disable-mysql instead.])
570 elif test "$with_mysql" != yes ; then
571 mysql_dir="$with_mysql/bin"
574 # Try to find the mysql_config program
575 AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no, $mysql_dir $PATH )
577 if test "$MYSQL_CONFIG" = no ; then
578 if test "$mysql_enabled" = "yes" ; then
579 AC_MSG_ERROR(Cannot find mysql_config)
581 AC_MSG_WARN(MySQL not found. skipping.)
586 # if we found mysql_config then build_mysql is 'yes'
587 if test "$MYSQL_CONFIG" != no ; then
588 AC_MSG_CHECKING(for mysql version >= 4)
589 mysql_version=`$MYSQL_CONFIG --version`
590 mysql_major_version=`echo $mysql_version | awk -F. '{print $1}'`
592 if test $mysql_major_version -lt 4 ; then
594 if test "$mysql_enabled" = "yes" ; then
595 AC_MSG_ERROR(You need MySQL version >= 4, found $mysql_version)
597 AC_MSG_RESULT(no.. skipping MySQL)
603 # if mysql_version_ok is 'yes', then we've made it this far.. ;)
604 if test "$mysql_version_ok" = "yes" ; then
605 AC_MSG_CHECKING(for embedded-MySQL libraries)
606 MYSQL_LIBS=`$MYSQL_CONFIG --libmysqld-libs`
607 if test $? != 0 ; then
609 if test "$mysql_enabled" = "yes" ; then
610 AC_MSG_ERROR(Could not find the MySQL Embedded-server libraries.)
612 AC_MSG_RESULT(no.. skipping MySQL)
620 # if found_mysql=yes then test that we can actually build mysql
621 if test "$found_mysql" = yes ; then
622 MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
623 MYSQL_CFLAGS=`eval echo $MYSQL_CFLAGS`
624 MYSQL_LIBS=`eval echo $MYSQL_LIBS`
626 save_CPPFLAGS="$CPPFLAGS"
627 CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
629 AC_CHECK_HEADER([mysql.h], [have_mysql_h=yes], [have_mysql_h=no])
630 if test "$have_mysql_h" = no -a "$mysql_enabled" = "yes" ; then
631 AC_MSG_ERROR(unable to find MySQL header files)
634 if test "$have_mysql_h" = yes ; then
636 LIBS="$LIBS $MYSQL_LIBS"
637 AC_MSG_CHECKING(if we can link againt mysql)
641 [mysql_server_init(0, NULL, NULL)],
642 [have_mysql_libs=yes],
643 [have_mysql_libs=no])
646 if test "$have_mysql_libs" = no ; then
647 if test "$mysql_enabled" = "yes" ; then
648 AC_MSG_ERROR([unable to link with MySQL Embedded Server Library])
650 AC_MSG_RESULT(no. skipping MySQL)
655 CPPFLAGS="$save_CPPFLAGS"
658 # if have_mysql_libs=yes then go ahead with building MySQL
659 if test "$have_mysql_libs" = yes ; then
660 # this AC_MSG_RESULT is from above!
662 WANT_SUBDIRS="$WANT_SUBDIRS shib-mysql-ccache"
663 AC_SUBST(MYSQL_CFLAGS)
668 AC_SUBST(WANT_SUBDIRS)
670 if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
671 echo "=================================================================="
672 echo "WARNING: You have chosen to compile Apache-1.3 modules with a different"
673 echo " compiler than the one used to compile Apache."
675 echo " Current compiler: $CC"
676 echo " Apache's compiler: $APXS_CC"
678 echo "This could cause problems."
679 echo "=================================================================="
682 if test -n "$APXS2_CC" && test "$APXS2_CC" != "$CC" ; then
683 echo "=================================================================="
684 echo "WARNING: You have chosen to compile Apache-2 modules with a different"
685 echo " compiler than the one used to compile Apache."
687 echo " Current compiler: $CC"
688 echo " Apache's compiler: $APXS2_CC"
690 echo "This could cause problems."
691 echo "=================================================================="
694 LIBTOOL="$LIBTOOL --silent"