diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-06-01 09:02:12 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-06-01 09:02:12 +0800 |
commit | 8f183d269e13e528442def98657e040b3728597d (patch) | |
tree | b6de7454fd22221b7e49bf7b8a408424fb8af6b5 /configure.in | |
parent | 9d1e57701a113ad29c920cfa26b9966115570f08 (diff) | |
download | gsoc2013-evolution-8f183d269e13e528442def98657e040b3728597d.tar gsoc2013-evolution-8f183d269e13e528442def98657e040b3728597d.tar.gz gsoc2013-evolution-8f183d269e13e528442def98657e040b3728597d.tar.bz2 gsoc2013-evolution-8f183d269e13e528442def98657e040b3728597d.tar.lz gsoc2013-evolution-8f183d269e13e528442def98657e040b3728597d.tar.xz gsoc2013-evolution-8f183d269e13e528442def98657e040b3728597d.tar.zst gsoc2013-evolution-8f183d269e13e528442def98657e040b3728597d.zip |
Included information about db3.
2001-05-31 Christopher James Lahey <clahey@ximian.com>
* README: Included information about db3.
* acconfig.h: Added HAVE_DB_H and HAVE_DB3_DB_H.
* configure.in: Added various checks for db3 libraries and
includes. Of note are the new configure options
--with-db3-includes=PREFIX and --with-db3-libs=PREFIX to specify
the location for your db3 library.
From addressbook/ChangeLog:
2001-05-31 Christopher James Lahey <clahey@ximian.com>
* backend/pas/Makefile.am (INCLUDES): Added db3 cflags.
* backend/pas/pas-backend-file.c: Updated this to use db3.
From e-util/ChangeLog:
2001-05-31 Christopher James Lahey <clahey@ximian.com>
* Makefile.am (INCLUDES): Added db3 cflags.
* e-dbhash.c: Made this use db3.
* e-db3-utils.c, e-db3-utils.h: New files with some helper
functions.
From wombat/ChangeLog:
2001-05-31 Christopher James Lahey <clahey@ximian.com>
* Makefile.am (wombat_LDADD): Added db3 libs.
svn path=/trunk/; revision=10077
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 156 |
1 files changed, 151 insertions, 5 deletions
diff --git a/configure.in b/configure.in index 3304686ff0..652af381b2 100644 --- a/configure.in +++ b/configure.in @@ -206,12 +206,158 @@ fi dnl ************************************************** dnl * pas-backend-file stuff. -dnl * check for db_185.h. if it's there, we use it. -dnl * otherwise, we use db.h (since it'll be 185). -dnl * Except on RH7.0, which puts db in yet another place +dnl * check for version 3.1.17 of db.h. First check +dnl * in db.h, then in db3/db.h (For Red Hat Linux +dnl * 7.0). dnl ************************************************** -AC_CHECK_HEADERS(db_185.h) -AC_CHECK_HEADERS(db1/db.h) + +AC_ARG_WITH(db3-includes, [ --with-db3-includes=PREFIX Location of db3 includes.], + with_db3_includes="$withval") + +DB3_CFLAGS= + +AC_CACHE_CHECK([for libdb3 version 3.1.17], ac_cv_db3_version_check, +[ + CPPFLAGS_save="$CPPFLAGS" + if test "x${with_db3_includes}" != "x"; then + CPPFLAGS="-I$with_db3_includes $CPPFLAGS" + fi + + AC_TRY_COMPILE([ + #include <db.h> + ],[ + #if DB_VERSION_MAJOR != 3 || \ + DB_VERSION_MINOR != 1 || \ + DB_VERSION_PATCH != 17 + #error + #endif + ], ac_cv_db3_version_check=yes, ac_cv_db3_version_check=no) + + CPPFLAGS="$CPPFLAGS_save" +]) + +if test $ac_cv_db3_version_check = yes; then + AC_DEFINE(HAVE_DB_H) + if test "x${with_db3_includes}" != "x"; then + DB3_CFLAGS="-I$with_db3_includes" + fi +else + AC_CACHE_CHECK([for libdb3 version 3.1.17 in db3/db.h], ac_cv_db3_db3_db_h_version_check, + [ + CPPFLAGS_save="$CPPFLAGS" + if test "x${with_db3_includes}" != "x"; then + CPPFLAGS="-I$with_db3_includes $CPPFLAGS" + fi + + AC_TRY_COMPILE([ + #include <db3/db.h> + ],[ + #if DB_VERSION_MAJOR != 3 || \ + DB_VERSION_MINOR != 1 || \ + DB_VERSION_PATCH != 17 + #error + #endif + ], ac_cv_db3_db3_db_h_version_check=yes, ac_cv_db3_db3_db_h_version_check=no) + + CPPFLAGS="$CPPFLAGS_save" + ]) + if test $ac_cv_db3_db3_db_h_version_check = yes; then + AC_DEFINE(HAVE_DB3_DB_H) + if test "x${with_db3_includes}" != "x"; then + DB3_CFLAGS="-I$with_db3_includes" + fi + else + AC_ERROR(You must have libdb3 version 3.1.17 installed to compile evolution) + fi +fi + +AC_SUBST(DB3_CFLAGS) + + +AC_ARG_WITH(db3-libs, [ --with-db3-libs=PREFIX Location of db3 libs.], + with_db3_libs="$withval", with_db3_libs="/usr/lib/") + +DB3_LDADD= + +if test $ac_cv_db3_version_check = yes; then + HAVE_DB3_DB_H_INTERNAL=0 +else + HAVE_DB3_DB_H_INTERNAL=1 +fi + +AC_CACHE_CHECK([for -ldb 3.1.17], ac_cv_db3_lib_check, +[ + LIBS_save="$LIBS" + LIBS="$with_db3_libs/libdb.a $LIBS" + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $DB3_CFLAGS" + + AC_TRY_RUN([ +#if $HAVE_DB3_DB_H_INTERNAL +#include <db3/db.h> +#else +#include <db.h> +#endif +int +main (void) +{ + int major, minor, patch; + db_version (&major, &minor, &patch); + if (major == 3 && + minor == 1 && + patch == 17) + return 0; + else + return 1; +} +], ac_cv_db3_lib_check=yes, ac_cv_db3_lib_check=no) + + LIBS="$LIBS_save" + CPPFLAGS="$CPPFLAGS_save" +]) + +if test $ac_cv_db3_lib_check = yes; then + DB3_LDADD="$with_db3_libs/libdb.a" +else + AC_CACHE_CHECK([for -ldb3 3.1.17], ac_cv_db3_lib_db3_check, + [ + LIBS_save="$LIBS" + LIBS="$with_db3_libs/libdb3.a $LIBS" + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $DB3_CFLAGS" + + AC_TRY_RUN([ +#if $HAVE_DB3_DB_H_INTERNAL +#include <db3/db.h> +#else +#include <db.h> +#endif +int +main (void) +{ + int major, minor, patch; + db_version (&major, &minor, &patch); + if (major == 3 && + minor == 1 && + patch == 17) + return 0; + else + return 1; +} +], ac_cv_db3_lib_db3_check=yes, ac_cv_db3_lib_db3_check=no) + + LIBS="$LIBS_save" + CPPFLAGS="$CPPFLAGS_save" + ]) + + if test $ac_cv_db3_lib_db3_check = yes; then + DB3_LDADD="$with_db3_libs/libdb3.a" + else + AC_ERROR(Didn't find libdb 3.1.17 libraries. You must have libdb version 3.1.17 installed to compile evolution) + fi +fi + +AC_SUBST(DB3_LDADD) dnl ************************************************** dnl * ldap related stuff. |