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 timegm 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"
90 AC_CHECK_HEADER([log4shib/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
92 [#include <log4shib/CategoryStream.hh>],
93 [log4shib::Category::getInstance("foo").errorStream() << log4shib::eol],
94 [AC_DEFINE(SHIBSP_LOG4SHIB,1,[Define if log4shib library is used.])],
95 [AC_MSG_ERROR([unable to link with log4shib])])
97 AC_MSG_WARN([log4shib-config not found, may need to use --with-log4shib option])
98 AC_MSG_WARN([will look for original log4cpp library])
101 AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
103 AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp-config is installed]),
105 LOG4CPP_CONFIG="${with_log4cpp}"
106 if ! test -f "${LOG4CPP_CONFIG}" ; then
107 LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"
110 if test -f "${LOG4CPP_CONFIG}"; then
111 AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe])
112 LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
113 CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
114 AC_CHECK_HEADER([log4cpp/CategoryStream.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
116 [#include <log4cpp/CategoryStream.hh>],
117 [log4cpp::Category::getInstance("foo").errorStream() << log4cpp::eol],
118 [AC_DEFINE(SHIBSP_LOG4CPP,1,[Define if log4cpp library is used.])],
119 [AC_MSG_ERROR([unable to link with log4cpp, need version 1.0 or later])])
121 AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option])
127 AC_HELP_STRING([--with-xerces=PATH], [where xerces-c is installed]),
128 [if test x_$with_xerces != x_/usr; then
129 LDFLAGS="-L${with_xerces}/lib $LDFLAGS"
130 CPPFLAGS="-I${with_xerces}/include $CPPFLAGS"
132 LIBS="-lxerces-c $LIBS"
133 AC_CHECK_HEADER([xercesc/dom/DOM.hpp],,
134 AC_MSG_ERROR([unable to find xerces header files]))
135 AC_MSG_CHECKING([Xerces version])
137 [AC_LANG_PROGRAM([#include <xercesc/util/XercesVersion.hpp>],
138 [#if _XERCES_VERSION != 20600
141 #error cannot use version 2.6.0
144 [AC_MSG_FAILURE([Xerces-C v2.6.0 has bugs that inhibit use with signed XML, please use a newer version])])
146 [#include <xercesc/util/PlatformUtils.hpp>],
147 [xercesc::XMLPlatformUtils::Initialize()],
148 [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
149 [AC_MSG_ERROR([unable to link with Xerces])])
152 #XML-Tooling settings
153 AC_ARG_WITH(xmltooling,
154 AC_HELP_STRING([--with-xmltooling=PATH], [where xmltooling-c is installed]),
155 [if test x_$with_xmltooling != x_/usr; then
156 LDFLAGS="-L${with_xmltooling}/lib $LDFLAGS"
157 CPPFLAGS="-I${with_xmltooling}/include $CPPFLAGS"
159 LITE_LIBS="-lxmltooling-lite"
160 XMLSEC_LIBS="-lxmltooling"
161 AC_CHECK_HEADER([xmltooling/base.h],,
162 AC_MSG_ERROR([unable to find xmltooling header files]))
165 # XML-Security settings
167 AC_HELP_STRING([--with-xmlsec=PATH], [where xmlsec is installed]),,
170 if test x_$with_xmlsec != x_/usr; then
171 LDFLAGS="-L${with_xmlsec}/lib $LDFLAGS"
172 CPPFLAGS="-I${with_xmlsec}/include $CPPFLAGS"
174 XMLSEC_LIBS="-lxml-security-c $XMLSEC_LIBS"
176 # save and append master libs
178 LIBS="$XMLSEC_LIBS $LIBS"
180 AC_CHECK_HEADER([xsec/utils/XSECPlatformUtils.hpp],,AC_MSG_ERROR([unable to find XML-Security header files]))
181 AC_MSG_CHECKING([XML-Security version])
183 [AC_LANG_PROGRAM([#include <xsec/utils/XSECPlatformUtils.hpp>],
184 [#if XSEC_VERSION_MAJOR > 1 || (XSEC_VERSION_MAJOR == 1 && XSEC_VERSION_MEDIUM > 3)
187 #error need version 1.4.0 or later
190 [AC_MSG_FAILURE([XML-Security version 1.4.0 or greater is required.])])
192 [#include <xsec/utils/XSECPlatformUtils.hpp>],
193 [XSECPlatformUtils::Initialise()],,
194 [AC_MSG_ERROR([unable to link with XML-Security])])
196 # restore master libs
201 AC_HELP_STRING([--with-saml=PATH], [where saml is installed]),
202 [if test x_$with_saml != x_/usr; then
203 LDFLAGS="-L${with_saml}/lib $LDFLAGS"
204 CPPFLAGS="-I${with_saml}/include $CPPFLAGS"
206 XMLSEC_LIBS="-lsaml $XMLSEC_LIBS"
208 # save and append master libs
210 LIBS="$XMLSEC_LIBS $LIBS"
212 AC_CHECK_HEADER([saml/saml2/metadata/Metadata.h],,
213 AC_MSG_ERROR([unable to find OpenSAML header files]))
215 [#include <saml/SAMLConfig.h>
216 #include <saml/version.h>],
217 [#if _OPENSAML_VERSION >= 20000
218 opensaml::SAMLConfig::getConfig();
220 #error Need OpenSAML version 2.0 or higher
222 [AC_DEFINE(HAVE_SAML,1,[Define if saml library was found])],
223 [AC_MSG_ERROR([unable to link with OpenSAML, or version was too old])])
225 # restore master libs
229 AC_SUBST(XMLSEC_LIBS)
231 # output the underlying makefiles
232 WANT_SUBDIRS="doc schemas configs shibsp shibd util"
233 AC_CONFIG_FILES([Makefile doc/Makefile schemas/Makefile \
234 configs/Makefile shibsp/Makefile shibd/Makefile \
235 util/Makefile selinux/Makefile])
238 AC_CONFIG_FILES([adfs/Makefile])
239 AC_ARG_ENABLE([adfs],
240 AC_HELP_STRING([--disable-adfs], [don't build the ADFS module]),
241 [adfs_enabled=$enableval], [adfs_enabled=yes])
242 if test "x$adfs_enabled" = "x" ; then
245 AC_MSG_CHECKING(whether to build the ADFS module)
246 if test "$adfs_enabled" = "no" ; then
250 WANT_SUBDIRS="$WANT_SUBDIRS adfs"
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 # If no --enable-apache-xx specified
299 # find a default and fake the specific parameters
302 # simple macro to peek at an enable or a with
304 if test "[${[$1]_][$2]+set}" = set; then
305 peekval="${[$1]_[$2]}"
310 AC_MSG_CHECKING(if default apache needed)
312 Peek(enable,apache_13,need_default=no)
313 Peek(enable,apache_20,need_default=no)
314 Peek(enable,apache_22,need_default=no)
315 AC_MSG_RESULT($need_default)
317 if test "$need_default" = "yes"; then
318 # find an apxs, then the httpd
320 Peek(with,apxs,xs="$peekval")
321 Peek(with,apxs2,xs="$peekval")
322 Peek(with,apxs22,xs="$peekval")
323 if test "x$xs" = "x"; then
324 AC_PATH_PROGS(xs, apxs2 apxs,
325 AC_MSG_ERROR(No apxs, no apache found. Try --with-apxs),
326 [/usr/local/apache2/bin:/usr/local/apache/bin:/usr/sbin:$PATH])
328 # ask the daemon for the version and set parameters
329 AC_MSG_CHECKING(default apache version)
330 httpd="`$xs -q SBINDIR`/`$xs -q TARGET`"
331 if test "x$httpd" != "x" && test -f $httpd ; then
332 v=`$httpd -v|$SED -n -e 's/.*Apache\/\.*//p'`
334 1.3*) [enable_apache_13]=yes
338 2.0*) [enable_apache_20]=yes
342 2.2*) [enable_apache_22]=yes
346 *) AC_MSG_ERROR(unusable apache versions: $v. Try setting --with-apxs)
349 AC_MSG_RESULT(cannot determine version. Try setting --with-apxs)
353 # Apache 1.3 (mod_shib_13)
355 # --with-apxs (DSO build, the normal way, uses apxs to derive build flags)
357 AC_ARG_ENABLE(apache-13,
358 AC_HELP_STRING([--enable-apache-13], [enable the Apache 1.3 module]),
359 [ if test "x$enableval" = "x" ; then
362 WANT_APACHE_13="$enableval"
364 ],[ WANT_APACHE_13=no ])
365 AC_MSG_CHECKING(whether to build Apache 1.3 module)
366 if test "$WANT_APACHE_13" != yes && test "$WANT_APACHE_13" != no ; then
369 AC_MSG_RESULT($WANT_APACHE_13)
371 if test "$WANT_APACHE_13" = "yes" ; then
373 AC_HELP_STRING([--with-apxs=FILE], [Specifies where to find the Apache 1.3 apxs script.]),
375 AC_MSG_CHECKING(for user-specified apxs name/location)
376 if test "$withval" != "no" ; then
377 if test "$withval" != "yes"; then
379 AC_MSG_RESULT("$withval")
384 AC_PATH_PROG(APXS, apxs, no)
385 if test "$APXS" = "no" ; then
386 for i in /usr/sbin /usr/local/apache/bin ; do
387 if test "$APXS" = "no" && test -f "$i/apxs"; then
394 AC_MSG_CHECKING([to see if apxs was located])
395 if test ! -f "$APXS" ; then
397 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.])
402 # extract settings we need from APXS -q
403 APXS_CC="`$APXS -q CC`"
404 APXS_CFLAGS="`$APXS -q CPPFLAGS` `$APXS -q CFLAGS` `$APXS -q CFLAGS_SHLIB`"
405 APXS_INCLUDE="`$APXS -q INCLUDEDIR`"
408 AC_SUBST(APXS_CFLAGS)
409 AC_SUBST(APXS_INCLUDE)
412 # Apache 2.0 (mod_shib_20)
414 # --with-apxs2 (DSO build, the normal way, uses apxs to derive build flags)
415 # --with-apr (DSO build, APR development package installed separately)
417 AC_ARG_ENABLE(apache-20,
418 AC_HELP_STRING([--enable-apache-20], [enable the Apache 2.0 module]),
419 [ if test "x$enableval" = "x" ; then
422 WANT_APACHE_20="$enableval"
424 ],[ WANT_APACHE_20=no ])
425 AC_MSG_CHECKING(whether to build Apache 2.0 module)
426 if test "$WANT_APACHE_20" != yes && test "$WANT_APACHE_20" != no ; then
429 AC_MSG_RESULT($WANT_APACHE_20)
431 if test "$WANT_APACHE_20" = "yes" ; then
433 AC_HELP_STRING([--with-apxs2=FILE], [Specifies where to find the Apache 2.0 apxs script.]),
435 AC_MSG_CHECKING(for user-specified Apache2 apxs name/location)
436 if test "$withval" != "no" ; then
437 if test "$withval" != "yes"; then
439 AC_MSG_RESULT("$withval")
444 AC_PATH_PROG(APXS2, apxs2, no)
445 if test "$APXS2" = "no" ; then
446 AC_PATH_PROG(APXS2, apxs, no)
448 if test "$APXS2" = "no" ; then
449 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
450 if test "$APXS2" = "no" && test -f "$i/apxs2" ; then
454 if test "$APXS2" = "no" ; then
455 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
456 if test "$APXS2" = "no" && test -f "$i/apxs" ; then
464 AC_MSG_CHECKING([to see if Apache2 apxs was located])
465 if test ! -f "$APXS2" ; then
467 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.])
469 AC_MSG_RESULT($APXS2)
474 AC_HELP_STRING([--with-apr=PATH], [where apr-config is installed]),
476 AC_MSG_CHECKING(for user-specified apr-config name/location)
477 if test "$withval" != "no" ; then
478 if test "$withval" != "yes"; then
480 AC_MSG_RESULT("$withval")
485 AC_PATH_PROG(APR_CONFIG, apr-config)
487 if test -f "${APR_CONFIG}"; then
488 APR_CFLAGS="`${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags` `${APR_CONFIG} --includes`"
490 AC_MSG_ERROR([Unable to locate apr-config, may need --with-apr option.])
493 # extract settings we need from APXS2 -q
494 APXS2_CC="`$APXS2 -q CC`"
495 APXS2_CFLAGS="`$APXS2 -q CPPFLAGS` `$APXS2 -q CFLAGS` `$APXS2 -q CFLAGS_SHLIB` $APR_CFLAGS"
496 APXS2_INCLUDE="`$APXS2 -q INCLUDEDIR`"
499 AC_SUBST(APXS2_CFLAGS)
500 AC_SUBST(APXS2_INCLUDE)
503 # Apache 2.2 (mod_shib_22)
505 # --with-apxs22 (DSO build, the normal way, uses apxs to derive build flags)
506 # --with-apr1 (DSO build, APR development package installed separately)
508 AC_ARG_ENABLE(apache-22,
509 AC_HELP_STRING([--enable-apache-22], [enable the Apache 2.2 module]),
510 [ if test "x$enableval" = "x" ; then
513 WANT_APACHE_22="$enableval"
515 ],[ WANT_APACHE_22=no ])
516 AC_MSG_CHECKING(whether to build Apache 2.2 module)
517 if test "$WANT_APACHE_22" != yes && test "$WANT_APACHE_22" != no ; then
520 AC_MSG_RESULT($WANT_APACHE_22)
522 if test "$WANT_APACHE_22" = "yes" ; then
524 AC_HELP_STRING([--with-apxs22=FILE], [Specifies where to find the Apache 2.2 apxs script.]),
526 AC_MSG_CHECKING(for user-specified Apache2.2 apxs name/location)
527 if test "$withval" != "no" ; then
528 if test "$withval" != "yes"; then
530 AC_MSG_RESULT("$withval")
535 AC_PATH_PROG(APXS22, apxs2, no)
536 if test "$APXS22" = "no" ; then
537 AC_PATH_PROG(APXS22, apxs, no)
539 if test "$APXS22" = "no" ; then
540 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
541 if test "$APXS22" = "no" && test -f "$i/apxs2" ; then
545 if test "$APXS22" = "no" ; then
546 for i in /usr/sbin /usr/local/apache2/bin /usr/local/apache/bin ; do
547 if test "$APXS22" = "no" && test -f "$i/apxs" ; then
555 AC_MSG_CHECKING([to see if Apache2.2 apxs was located])
556 if test ! -f "$APXS22" ; then
558 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.])
560 AC_MSG_RESULT($APXS22)
565 AC_HELP_STRING([--with-apr1=PATH], [where apr-1-config is installed]),
567 AC_MSG_CHECKING(for user-specified apr-1-config name/location)
568 if test "$withval" != "no" ; then
569 if test "$withval" != "yes"; then
571 AC_MSG_RESULT("$withval")
576 AC_PATH_PROG(APR1_CONFIG, apr-1-config)
578 if test -f "${APR1_CONFIG}"; then
579 APR1_CFLAGS="`${APR1_CONFIG} --cflags` `${APR1_CONFIG} --cppflags` `${APR1_CONFIG} --includes`"
581 AC_MSG_ERROR([Unable to locate apr-1-config, may need --with-apr1 option.])
584 # extract settings we need from APXS22 -q
585 APXS22_CC="`$APXS22 -q CC`"
586 APXS22_CFLAGS="`$APXS22 -q CPPFLAGS` `$APXS22 -q CFLAGS` `$APXS22 -q CFLAGS_SHLIB` $APR1_CFLAGS"
587 APXS22_INCLUDE="`$APXS22 -q INCLUDEDIR`"
590 AC_SUBST(APXS22_CFLAGS)
591 AC_SUBST(APXS22_INCLUDE)
593 # always output the Makefile, even if you don't use it
594 AC_CONFIG_FILES([apache/Makefile])
595 AM_CONDITIONAL(BUILD_AP13,test "$WANT_APACHE_13" = "yes")
596 AM_CONDITIONAL(BUILD_AP20,test "$WANT_APACHE_20" = "yes")
597 AM_CONDITIONAL(BUILD_AP22,test "$WANT_APACHE_22" = "yes")
599 # add the apache module to the list of wanted subdirs..
600 if test "$WANT_APACHE_13" = "yes" || test "$WANT_APACHE_20" = "yes" || test "$WANT_APACHE_22" = "yes" ; then
601 WANT_SUBDIRS="$WANT_SUBDIRS apache"
606 # Implement the checks of the ODBC Storage Service
608 # 1) Assume the user wants ODBC; if it's not found then just continue without
609 # 2) If the user specifically requested odbc, look for it and ERROR if not found
610 # 3) If the user specifically requested no odbc, don't build it.
613 AC_CONFIG_FILES([odbc-store/Makefile])
615 # determine whether we should enable the odbc ccache
616 AC_ARG_ENABLE([odbc],
617 AC_HELP_STRING([--disable-odbc], [disable the ODBC Storage Service]),
618 [odbc_enabled=$enableval], [odbc_enabled=default])
620 if test "x$odbc_enabled" = "x" ; then
624 # Are we trying to build ODBC?
625 AC_MSG_CHECKING(whether to build the ODBC storage service)
626 if test "$odbc_enabled" = "yes" ; then
629 elif test "$odbc_enabled" = "default" ; then
631 AC_MSG_RESULT([yes, if it can be found])
637 # If we're trying to build ODBC, try to find the odbc_config program.
638 if test "$build_odbc" = "yes" ; then
641 AC_HELP_STRING([--with-odbc=PATH], [directory where odbc is installed]),
642 [if test "$with_odbc" = no ; then
643 AC_MSG_ERROR([Try running --disable-odbc instead.])
644 elif test "$with_odbc" != yes ; then
645 odbc_dir="$with_odbc/bin"
648 AC_PATH_PROG(ODBC_CONFIG, odbc_config, no, $odbc_dir $PATH )
650 if test "$ODBC_CONFIG" = no ; then
651 if test "$odbc_enabled" = "yes" ; then
652 AC_MSG_ERROR(Cannot find odbc_config)
654 AC_MSG_WARN(ODBC not found, skipping.)
659 if test "$build_odbc" = yes ; then
660 ODBC_CFLAGS=`$ODBC_CONFIG --cflags`
661 ODBC_CFLAGS=`eval echo $ODBC_CFLAGS`
662 ODBC_LIBS=`$ODBC_CONFIG --libs`
663 ODBC_LIBS=`eval echo $ODBC_LIBS`
665 save_CPPFLAGS="$CPPFLAGS"
666 CPPFLAGS="$CPPFLAGS $ODBC_CFLAGS"
668 AC_CHECK_HEADER([sql.h], [have_sql_h=yes], [have_sql_h=no])
669 if test "$have_sql_h" = no -a "$odbc_enabled" = "yes" ; then
670 AC_MSG_ERROR(unable to find ODBC header files)
673 if test "$have_sql_h" = yes ; then
675 LIBS="$LIBS $ODBC_LIBS"
676 AC_MSG_CHECKING(if we can link againt ODBC)
681 [SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)SQL_CP_ONE_PER_HENV, 0)],
682 [have_odbc_libs=yes],
686 if test "$have_odbc_libs" = no ; then
687 if test "$odbc_enabled" = "yes" ; then
688 AC_MSG_ERROR([unable to link with ODBC Library])
690 AC_MSG_RESULT(no, skipping ODBC)
695 CPPFLAGS="$save_CPPFLAGS"
698 # if have_odbc_libs=yes then go ahead with building ODBC
699 if test "$have_odbc_libs" = yes ; then
700 # this AC_MSG_RESULT is from above!
702 WANT_SUBDIRS="$WANT_SUBDIRS odbc-store"
703 AC_SUBST(ODBC_CFLAGS)
708 AC_SUBST(WANT_SUBDIRS)
710 if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then
711 echo "=================================================================="
712 echo "WARNING: You have chosen to compile Apache-1.3 modules with a different"
713 echo " compiler than the one used to compile Apache."
715 echo " Current compiler: $CC"
716 echo " Apache's compiler: $APXS_CC"
718 echo "This could cause problems."
719 echo "=================================================================="
722 if test -n "$APXS2_CC" && test "$APXS2_CC" != "$CC" ; then
723 echo "=================================================================="
724 echo "WARNING: You have chosen to compile Apache-2.0 modules with a different"
725 echo " compiler than the one used to compile Apache."
727 echo " Current compiler: $CC"
728 echo " Apache's compiler: $APXS2_CC"
730 echo "This could cause problems."
731 echo "=================================================================="
734 if test -n "$APXS22_CC" && test "$APXS22_CC" != "$CC" ; then
735 echo "=================================================================="
736 echo "WARNING: You have chosen to compile Apache-2.2 modules with a different"
737 echo " compiler than the one used to compile Apache."
739 echo " Current compiler: $CC"
740 echo " Apache's compiler: $APXS22_CC"
742 echo "This could cause problems."
743 echo "=================================================================="
746 LIBTOOL="$LIBTOOL --silent"