2 AC_INIT([shibboleth], [2.0], [shibboleth-users@internet2.edu], [shibboleth])
3 AM_CONFIG_HEADER(config.h)
4 AM_INIT_AUTOMAKE([shibboleth],[2.0])
6 sinclude(acx_pthread.m4)
9 AC_HELP_STRING(--enable-debug, [Have GCC compile with symbols (Default = no)
11 enable_debug=$enableval, enable_debug=no)
13 if test "$enable_debug" = "yes" ; then
14 GCC_CFLAGS="$CFLAGS -g -D_DEBUG"
15 GCC_CXXFLAGS="$CXXFLAGS -g -D_DEBUG"
17 GCC_CFLAGS="$CFLAGS -O2 -DNDEBUG"
18 GCC_CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
21 AC_PROG_CC([gcc gcc3 cc])
22 AC_PROG_CXX([g++ g++3 c++ CC])
24 if test "$GCC" = "yes" ; then
25 # AC_HAVE_GCC_VERSION(4,0,0,0,
27 # AC_DEFINE(GCC_HASCLASSVISIBILITY,1,
28 # [Define to enable class visibility control in gcc.])
29 # GCC_CFLAGS="$GCC_CFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
30 # GCC_CXXFLAGS="$GCC_CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
32 CFLAGS="-Wall $GCC_CFLAGS"
33 CXXFLAGS="-Wall $GCC_CXXFLAGS"
35 # Fix for Sun Workshop compiler in debug mode, may be Sun case #6360993
36 case "${host_cpu}-${host_os}" in
38 if test "$CXX" = "CC" ; then
39 CXXFLAGS="$CXXFLAGS -Qoption ccfe -stabs=no%dfltlit+no%dflthlp"
50 # Checks for typedefs, structures, and compiler characteristics.
55 # Checks for library functions.
58 AC_CHECK_FUNCS([strchr strdup strstr gmtime_r ctime_r strtok_r strcasecmp])
61 ACX_PTHREAD([enable_threads="pthread"],[enable_threads="no"])
62 if test $enable_threads != "pthread"; then
63 AC_MSG_ERROR([unable to find pthreads, currently this is required])
65 AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
66 LIBS="$PTHREAD_LIBS $LIBS"
67 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
68 CXXFLAGS="$PTHREAD_CFLAGS $CXXFLAGS"
77 # log4shib settings (favor this version over the log4cpp code)
78 AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config)
80 AC_HELP_STRING([--with-log4shib=PATH], [where log4shib-config is installed]),
82 LOG4SHIB_CONFIG="${with_log4shib}"
83 if ! test -f "${LOG4SHIB_CONFIG}" ; then
84 LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config"
87 if test -f "${LOG4SHIB_CONFIG}"; then
88 LDFLAGS="`${LOG4SHIB_CONFIG} --libs` $LDFLAGS"
89 CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS"
91 AC_MSG_WARN([log4shib-config not found, may need to use --with-log4shib option])
92 AC_MSG_WARN([will look for original log4cpp library])
95 AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
97 AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp-config is installed]),
99 LOG4CPP_CONFIG="${with_log4cpp}"
100 if ! test -f "${LOG4CPP_CONFIG}" ; then
101 LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"
104 if test -f "${LOG4CPP_CONFIG}"; then
105 AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe])
106 LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
107 CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
109 AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option])
111 AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
112 AC_CHECK_HEADER([log4cpp/PropertyConfigurator.hh],,AC_MSG_ERROR([you need at least log4cpp 0.3.x]))
114 [#include <log4cpp/Category.hh>],
115 [log4cpp::Category::getInstance("foo")],
116 [AC_DEFINE(SHIBSP_LOG4CPP,1,[Define if log4cpp library is used.])],
117 [AC_MSG_ERROR([unable to link with log4cpp])])
119 AC_CHECK_HEADER([log4shib/Category.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
121 [#include <log4shib/Category.hh>],
122 [log4shib::Category::getInstance("foo")],
123 [AC_DEFINE(SHIBSP_LOG4SHIB,1,[Define if log4shib library is used.])],
124 [AC_MSG_ERROR([unable to link with log4shib])])
129 AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
130 [if test x_$with_xerces != x_/usr; then
131 LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
132 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
134 LIBS="-lxerces-c $LIBS"
135 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
136 AC_MSG_ERROR([unable to find xerces header files]))
137 AC_MSG_CHECKING([Xerces version])
139 [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
140 [#if _XERCES_VERSION != 20600
143 #error cannot use version 2.6.0
146 [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version])])
148 [#include <xercesc/util/PlatformUtils.hpp>],
149 [xercesc::XMLPlatformUtils::Initialize()],
150 [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
151 [AC_MSG_ERROR([unable to link with Xerces])])
154 #XML-Tooling settings
155 AC_ARG_WITH(xmltooling,
156 AC_HELP_STRING([--with-xmltooling=PATH], [where xmltooling-c is installed]),
157 [if test x_$with_xmltooling != x_/usr; then
158 LDFLAGS="-L${with_xmltooling}/lib $LDFLAGS"
159 CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
161 LITE_LIBS="-lxmltooling-lite"
162 XMLSEC_LIBS="-lxmltooling"
163 AC_CHECK_HEADER([xmltooling/base.h],,
164 AC_MSG_ERROR([unable to find xmltooling header files]))
167 # XML-Security settings
169 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 XMLSEC_LIBS="-lxml-security-c $XMLSEC_LIBS"
178 # save and append master libs
180 LIBS="$XMLSEC_LIBS $LIBS"
182 AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security header files]))
183 AC_MSG_CHECKING([XML-Security version])
185 [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
186 [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3) || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM == 3 && XSEC_VERSION_MINOR > 0)
189 #error need version 1.3.1 or later
192 [AC_MSG_FAILURE([XML-Security version 1.3.1 or greater is required.])])
194 [#include <xsec/utils/XSECPlatformUtils.hpp>],
195 [XSECPlatformUtils::Initialise()],,
196 [AC_MSG_ERROR([unable to link with XML-Sec])])
198 # restore master libs
203 AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
204 [if test x_$with_saml != x_/usr; then
205 LDFLAGS="-L${with_saml}/lib $LDFLAGS"
206 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
208 XMLSEC_LIBS="-lsaml $XMLSEC_LIBS"
210 # save and append master libs
212 LIBS="$XMLSEC_LIBS $LIBS"
214 AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],,
215 AC_MSG_ERROR([unable to find OpenSAML header files]))
217 [#include <saml/SAMLConfig.h>
218 #include <saml/version.h>],
219 [#if _OPENSAML_VERSION >= 20000
220 opensaml::SAMLConfig::getConfig();
222 #error Need OpenSAML version 2.0 or higher
224 [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
225 [AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])])
227 # restore master libs
231 AC_SUBST(XMLSEC_LIBS)
233 # output the underlying makefiles
234 WANT_SUBDIRS="doc schemas configs shibsp shibd adfs util"
235 AC_CONFIG_FILES([Makefile doc/Makefile schemas/Makefile \
236 configs/Makefile shibsp/Makefile shibd/Makefile \
237 adfs/Makefile util/Makefile selinux/Makefile])
240 # Build NSAPI module?
242 AC_MSG_CHECKING(for NSAPI module option)
244 AC_HELP_STRING([--with-nsapi=DIR], [Build NSAPI module for Netscape/iPlanet/SunONE]),
245 [WANT_NSAPI=$withval],[WANT_NSAPI=no])
246 AC_MSG_RESULT($WANT_NSAPI)
248 if test "$WANT_NSAPI" != "no"; then
249 if test ! -d $WANT_NSAPI/bin ; then
250 AC_MSG_ERROR(Please specify the path to the root of your Netscape/iPlanet/SunONE server using --with-nsapi=DIR)
252 AC_MSG_CHECKING(for NSAPI include files)
253 if test -d $WANT_NSAPI/include ; then
254 NSAPI_INCLUDE=$WANT_NSAPI/include
255 AC_MSG_RESULT(Netscape-Enterprise 3.x style)
256 AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h])
257 NSAPI_INCLUDE="$NSAPI_INC_DIR -I$NSAPI_INCLUDE"
259 if test -d $WANT_NSAPI/plugins/include ; then
260 test -n "$NSAPI_INCLUDE" && NSAPI_INC_DIR="-I$NSAPI_INCLUDE"
261 NSAPI_INCLUDE="$WANT_NSAPI/plugins/include"
262 AC_MSG_RESULT(iPlanet 4.x / SunONE 6.x style)
263 AC_CHECK_HEADERS([$NSAPI_INCLUDE/nsapi.h])
264 NSAPI_INCLUDE="$NSAPI_INC_DIR -I$NSAPI_INCLUDE"
266 if test "$NSAPI_INCLUDE" = ""; then
267 AC_MSG_ERROR(Please check you have nsapi.h in either $WANT_NSAPI/include or $WANT_NSAPI/plugins/include)
271 AC_SUBST(NSAPI_INCLUDE)
273 # always output the Makefile, even if you don't use it
274 AC_CONFIG_FILES([nsapi_shib/Makefile])
275 AM_CONDITIONAL(BUILD_NSAPI,test ! "$WANT_NSAPI" = "no")
277 # add the NSAPI module to the list of wanted subdirs..
278 if test ! "$WANT_NSAPI" = "no" ; then
279 WANT_SUBDIRS="$WANT_SUBDIRS nsapi_shib"
283 # If no --enable-apache-xx specified
284 # find a default and fake the specific parameters
287 # simple macro to peek at an enable or a with
289 if test "[${[$1]_][$2]+set}" = set; then
290 peekval="${[$1]_[$2]}"
295 AC_MSG_CHECKING(if default apache needed)
297 Peek(enable,apache_13,need_default=no)
298 Peek(enable,apache_20,need_default=no)
299 Peek(enable,apache_22,need_default=no)
300 AC_MSG_RESULT($need_default)
302 if test "$need_default" = "yes"; then
303 # find an apxs, then the httpd
305 Peek(with,apxs,xs="$peekval")
306 Peek(with,apxs2,xs="$peekval")
307 Peek(with,apxs22,xs="$peekval")
308 if test "x$xs" = "x"; then
309 AC_PATH_PROGS(xs, apxs2 apxs,
310 AC_MSG_ERROR(No apxs, no apache found. Try --with-apxs),
311 [/usr/local/apache2/bin:/usr/local/apache/bin:/usr/sbin:$PATH])
313 # ask the daemon for the version and set parameters
314 AC_MSG_CHECKING(default apache version)
315 httpd="`$xs -q SBINDIR`/`$xs -q TARGET`"
316 if test "x$httpd" != "x"; then
317 v=`$httpd -v|$SED -n -e 's/.*Apache\/\.*//p'`
319 1.3*) [enable_apache_13]=yes
323 2.0*) [enable_apache_20]=yes
327 2.2*) [enable_apache_22]=yes
331 *) AC_MSG_ERROR(unusable apache versions: $v. Try setting --with-apxs)
334 AC_MSG_RESULT(cannot determine version. Try setting --with-apxs)
338 # Apache 1.3 (mod_shib_13)
340 # --with-apxs (DSO build, the normal way, uses apxs to derive build flags)
342 AC_ARG_ENABLE(apache-13,
343 AC_HELP_STRING([--enable-apache-13], [enable the Apache 1.3 module]),
344 [ if test "x$enableval" = "x" ; then
347 WANT_APACHE_13="$enableval"
349 ],[ WANT_APACHE_13=no ])
350 AC_MSG_CHECKING(whether to build Apache 1.3 module)
351 if test "$WANT_APACHE_13" != yes && test "$WANT_APACHE_13" != no ; then
354 AC_MSG_RESULT($WANT_APACHE_13)
356 if test "$WANT_APACHE_13" = "yes" ; then
358 AC_HELP_STRING([--with-apxs=FILE], [Specifies where to find the Apache 1.3 apxs script.]),
360 AC_MSG_CHECKING(for user-specified apxs name/location)
361 if test "$withval" != "no" ; then
362 if test "$withval" != "yes"; then
364 AC_MSG_RESULT("$withval")
369 AC_PATH_PROG(APXS, apxs, no)
370 if test "$APXS" = "no" ; then
371 for i in /usr/sbin /usr/local/apache/bin ; do
372 if test "$APXS" = "no" && test -f "$i/apxs"; then
379 AC_MSG_CHECKING([to see if apxs was located])
380 if test ! -f "$APXS" ; then
382 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.])
387 # extract settings we need from APXS -q
388 APXS_CC="`$APXS -q CC`"
389 APXS_CFLAGS="`$APXS -q CPPFLAGS` `$APXS -q CFLAGS` `$APXS -q CFLAGS_SHLIB`"
390 APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
393 AC_SUBST(APXS_CFLAGS)
394 AC_SUBST(APXS_INCLUDE)
397 # Apache 2.0 (mod_shib_20)
399 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags)
400 # --with-apr (DSO build, APR development package installed separately)
402 AC_ARG_ENABLE(apache-20,
403 AC_HELP_STRING([--enable-apache-20], [enable the Apache 2.0 module]),
404 [ if test "x$enableval" = "x" ; then
407 WANT_APACHE_20="$enableval"
409 ],[ WANT_APACHE_20=no ])
410 AC_MSG_CHECKING(whether to build Apache 2.0 module)
411 if test "$WANT_APACHE_20" != yes && test "$WANT_APACHE_20" != no ; then
414 AC_MSG_RESULT($WANT_APACHE_20)
416 if test "$WANT_APACHE_20" = "yes" ; then
418 AC_HELP_STRING([--with-apxs2=FILE], [Specifies where to find the Apache 2.0 apxs script.]),
420 AC_MSG_CHECKING(for user-specified Apache2 apxs name/location)
421 if test "$withval" != "no" ; then
422 if test "$withval" != "yes"; then
424 AC_MSG_RESULT("$withval")
429 AC_PATH_PROG(APXS2, apxs2, no)
430 if test "$APXS2" = "no" ; then
431 AC_PATH_PROG(APXS2, apxs, no)
433 if test "$APXS2" = "no" ; then
434 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
435 if test "$APXS2" = "no" && test -f "$i/apxs2" ; then
439 if test "$APXS2" = "no" ; then
440 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
441 if test "$APXS2" = "no" && test -f "$i/apxs" ; then
449 AC_MSG_CHECKING([to see if Apache2 apxs was located])
450 if test ! -f "$APXS2" ; then
452 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.])
454 AC_MSG_RESULT($APXS2)
459 AC_HELP_STRING([--with-apr=PATH], [where apr-config is installed]),
461 AC_MSG_CHECKING(for user-specified apr-config name/location)
462 if test "$withval" != "no" ; then
463 if test "$withval" != "yes"; then
465 AC_MSG_RESULT("$withval")
470 AC_PATH_PROG(APR_CONFIG, apr-config)
472 if test -f "${APR_CONFIG}"; then
473 APR_CFLAGS="`${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags` `${APR_CONFIG} --includes`"
475 AC_MSG_ERROR([Unable to locate apr-config, may need --with-apr option.])
478 # extract settings we need from APXS2 -q
479 APXS2_CC="`$APXS2 -q CC`"
480 APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` `$APXS2 -q CFLAGS_SHLIB` $APR_CFLAGS"
481 APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
484 AC_SUBST(APXS2_CFLAGS)
485 AC_SUBST(APXS2_INCLUDE)
488 # Apache 2.2 (mod_shib_22)
490 # --with-apxs22 (DSO build, the normal way, uses apxs to derive build flags)
491 # --with-apr1 (DSO build, APR development package installed separately)
493 AC_ARG_ENABLE(apache-22,
494 AC_HELP_STRING([--enable-apache-22], [enable the Apache 2.2 module]),
495 [ if test "x$enableval" = "x" ; then
498 WANT_APACHE_22="$enableval"
500 ],[ WANT_APACHE_22=no ])
501 AC_MSG_CHECKING(whether to build Apache 2.2 module)
502 if test "$WANT_APACHE_22" != yes && test "$WANT_APACHE_22" != no ; then
505 AC_MSG_RESULT($WANT_APACHE_22)
507 if test "$WANT_APACHE_22" = "yes" ; then
509 AC_HELP_STRING([--with-apxs22=FILE], [Specifies where to find the Apache 2.2 apxs script.]),
511 AC_MSG_CHECKING(for user-specified Apache2.2 apxs name/location)
512 if test "$withval" != "no" ; then
513 if test "$withval" != "yes"; then
515 AC_MSG_RESULT("$withval")
520 AC_PATH_PROG(APXS22, apxs2, no)
521 if test "$APXS22" = "no" ; then
522 AC_PATH_PROG(APXS22, apxs, no)
524 if test "$APXS22" = "no" ; then
525 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
526 if test "$APXS22" = "no" && test -f "$i/apxs2" ; then
530 if test "$APXS22" = "no" ; then
531 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
532 if test "$APXS22" = "no" && test -f "$i/apxs" ; then
540 AC_MSG_CHECKING([to see if Apache2.2 apxs was located])
541 if test ! -f "$APXS22" ; then
543 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.])
545 AC_MSG_RESULT($APXS22)
550 AC_HELP_STRING([--with-apr1=PATH], [where apr-1-config is installed]),
552 AC_MSG_CHECKING(for user-specified apr-1-config name/location)
553 if test "$withval" != "no" ; then
554 if test "$withval" != "yes"; then
556 AC_MSG_RESULT("$withval")
561 AC_PATH_PROG(APR1_CONFIG, apr-1-config)
563 if test -f "${APR1_CONFIG}"; then
564 APR1_CFLAGS="`${APR1_CONFIG} --cflags` `${APR1_CONFIG} --cppflags` `${APR1_CONFIG} --includes`"
566 AC_MSG_ERROR([Unable to locate apr-1-config, may need --with-apr1 option.])
569 # extract settings we need from APXS22 -q
570 APXS22_CC="`$APXS22 -q CC`"
571 APXS22_CFLAGS="`$APXS22 -q CPPFLAGS` `$APXS22 -q CFLAGS` `$APXS22 -q CFLAGS_SHLIB` $APR1_CFLAGS"
572 APXS22_INCLUDE="`$APXS22 -q INCLUDEDIR`"
575 AC_SUBST(APXS22_CFLAGS)
576 AC_SUBST(APXS22_INCLUDE)
578 # always output the Makefile, even if you don't use it
579 AC_CONFIG_FILES([apache/Makefile])
580 AM_CONDITIONAL(BUILD_AP13,test "$WANT_APACHE_13" = "yes")
581 AM_CONDITIONAL(BUILD_AP20,test "$WANT_APACHE_20" = "yes")
582 AM_CONDITIONAL(BUILD_AP22,test "$WANT_APACHE_22" = "yes")
584 # add the apache module to the list of wanted subdirs..
585 if test "$WANT_APACHE_13" = "yes" || test "$WANT_APACHE_20" = "yes" || test "$WANT_APACHE_22" = "yes" ; then
586 WANT_SUBDIRS="$WANT_SUBDIRS apache"
591 # Implement the checks of the ODBC Storage Service
593 # 1) Assume the user wants ODBC; if it's not found then just continue without
594 # 2) If the user specifically requested odbc, look for it and ERROR if not found
595 # 3) If the user specifically requested no odbc, don't build it.
598 AC_CONFIG_FILES([odbc-store/Makefile])
600 # determine whether we should enable the odbc ccache
601 AC_ARG_ENABLE([odbc],
602 AC_HELP_STRING([--disable-odbc], [disable the ODBC Storage Service]),
603 [odbc_enabled=$enableval], [odbc_enabled=default])
605 if test "x$odbc_enabled" = "x" ; then
609 # Are we trying to build ODBC?
610 AC_MSG_CHECKING(whether to build the ODBC storage service)
611 if test "$odbc_enabled" = "yes" ; then
614 elif test "$odbc_enabled" = "default" ; then
616 AC_MSG_RESULT([yes, if it can be found])
622 # If we're trying to build ODBC, try to find the odbc_config program.
623 if test "$build_odbc" = "yes" ; then
626 AC_HELP_STRING([--with-odbc=PATH], [directory where odbc is installed]),
627 [if test "$with_odbc" = no ; then
628 AC_MSG_ERROR([Try running --disable-odbc instead.])
629 elif test "$with_odbc" != yes ; then
630 odbc_dir="$with_odbc/bin"
633 AC_PATH_PROG(ODBC_CONFIG, odbc_config, no, $odbc_dir $PATH )
635 if test "$ODBC_CONFIG" = no ; then
636 if test "$odbc_enabled" = "yes" ; then
637 AC_MSG_ERROR(Cannot find odbc_config)
639 AC_MSG_WARN(ODBC not found, skipping.)
644 if test "$build_odbc" = yes ; then
645 ODBC_CFLAGS=`$ODBC_CONFIG --cflags`
646 ODBC_CFLAGS=`eval echo $ODBC_CFLAGS`
647 ODBC_LIBS=`$ODBC_CONFIG --libs`
648 ODBC_LIBS=`eval echo $ODBC_LIBS`
650 save_CPPFLAGS="$CPPFLAGS"
651 CPPFLAGS="$CPPFLAGS $ODBC_CFLAGS"
653 AC_CHECK_HEADER([sql.h], [have_sql_h=yes], [have_sql_h=no])
654 if test "$have_sql_h" = no -a "$odbc_enabled" = "yes" ; then
655 AC_MSG_ERROR(unable to find ODBC header files)
658 if test "$have_sql_h" = yes ; then
660 LIBS="$LIBS $ODBC_LIBS"
661 AC_MSG_CHECKING(if we can link againt ODBC)
666 [SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)SQL_CP_ONE_PER_HENV, 0)],
667 [have_odbc_libs=yes],
671 if test "$have_odbc_libs" = no ; then
672 if test "$odbc_enabled" = "yes" ; then
673 AC_MSG_ERROR([unable to link with ODBC Library])
675 AC_MSG_RESULT(no, skipping ODBC)
680 CPPFLAGS="$save_CPPFLAGS"
683 # if have_odbc_libs=yes then go ahead with building ODBC
684 if test "$have_odbc_libs" = yes ; then
685 # this AC_MSG_RESULT is from above!
687 WANT_SUBDIRS="$WANT_SUBDIRS odbc-store"
688 AC_SUBST(ODBC_CFLAGS)
693 AC_SUBST(WANT_SUBDIRS)
695 if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
696 echo "=================================================================="
697 echo "WARNING: You have chosen to compile Apache-1.3 modules with a different"
698 echo " compiler than the one used to compile Apache."
700 echo " Current compiler: $CC"
701 echo " Apache's compiler: $APXS_CC"
703 echo "This could cause problems."
704 echo "=================================================================="
707 if test -n "$APXS2_CC" && test "$APXS2_CC" != "$CC" ; then
708 echo "=================================================================="
709 echo "WARNING: You have chosen to compile Apache-2.0 modules with a different"
710 echo " compiler than the one used to compile Apache."
712 echo " Current compiler: $CC"
713 echo " Apache's compiler: $APXS2_CC"
715 echo "This could cause problems."
716 echo "=================================================================="
719 if test -n "$APXS22_CC" && test "$APXS22_CC" != "$CC" ; then
720 echo "=================================================================="
721 echo "WARNING: You have chosen to compile Apache-2.2 modules with a different"
722 echo " compiler than the one used to compile Apache."
724 echo " Current compiler: $CC"
725 echo " Apache's compiler: $APXS22_CC"
727 echo "This could cause problems."
728 echo "=================================================================="
731 LIBTOOL="$LIBTOOL --silent"