[evolution-data-server] Bug 721733 - Tweak Berkeley DB detection logic



commit 3bb0c0e98965387dfaac8cdc14e7347217e6f68e
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Jan 7 16:10:13 2014 -0500

    Bug 721733 - Tweak Berkeley DB detection logic
    
    Make two changes to the logic that we use to find the Berkeley DB:
    
     - in the default case where --with-libdb is not given, do not attempt
       to add the default ${prefix}/include and ${prefix}/lib to the CFLAGS
       and LIBS.  Only do this if --with-libdb is explicitly given.
    
     - in the case where --with-libdb is not given, and DB_CFLAGS or DB_LIBS
       is already set, use those values instead of our own guesses
    
    This allows the build to proceed on FreeBSD, where the headers are in an
    unusual location and the library has an unusual name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721733

 configure.ac |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d178a80..c7803a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -604,10 +604,16 @@ dnl ******************************
 AC_ARG_WITH([libdb],
        AS_HELP_STRING([--with-libdb=PREFIX],
        [Prefix where libdb is installed]),
-       [libdb_prefix="$withval"], [libdb_prefix='${prefix}'])
-
-DB_CFLAGS="-I$libdb_prefix/include"
-DB_LIBS="-L$libdb_prefix/lib -ldb"
+       [
+               DB_CFLAGS="-I$withval/include"
+               DB_LIBS="-L$withval/lib -ldl"
+       ],
+       [
+               if test -z "$DB_CFLAGS" -a -z "$DB_LIBS"; then
+                       DB_CFLAGS=""
+                       DB_LIBS="-ldb"
+               fi
+       ])
 
 AC_MSG_CHECKING([Berkeley DB])
 save_cflags=$CFLAGS; CFLAGS=$DB_CFLAGS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]