diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-01-22 09:17:33 -0700 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-01-22 12:13:27 -0700 |
commit | 1292eef3093c98a7f92ad9d7071c03ad76bb43db (patch) | |
tree | 056ff79281f9cc5a49375f0989eda95540e1858c /m4/db.m4 | |
parent | b5e653a844af60596f9bc6b16349ee902ddb51f5 (diff) | |
download | ds-1292eef3093c98a7f92ad9d7071c03ad76bb43db.tar.gz ds-1292eef3093c98a7f92ad9d7071c03ad76bb43db.tar.xz ds-1292eef3093c98a7f92ad9d7071c03ad76bb43db.zip |
Bug 519459 - Semi-hardcoded include and lib directories in db.m4
https://bugzilla.redhat.com/show_bug.cgi?id=519459
Resolves: bug 519459
Bug Description: Semi-hardcoded include and lib directories in db.m4
Reviewed by: nkinder (Thanks!)
Branch: HEAD
Fix Description: Added --with-db-inc and --with-db-lib to configure. For the
default case, check first in /usr/include/db4, then in /usr/include.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Diffstat (limited to 'm4/db.m4')
-rw-r--r-- | m4/db.m4 | 40 |
1 files changed, 39 insertions, 1 deletions
@@ -54,10 +54,48 @@ AC_ARG_WITH(db, [ --with-db=PATH Berkeley DB directory], AC_MSG_RESULT(no)) dnl default path for the db tools (see [210947] for more details) +# check for --with-db-inc +AC_MSG_CHECKING(for --with-db-inc) +AC_ARG_WITH(db-inc, [ --with-db-inc=PATH Berkeley DB include file directory], +[ + if test -e "$withval"/db.h + then + AC_MSG_RESULT([using $withval]) + db_incdir="$withval" + db_inc="-I$withval" + else + echo + AC_MSG_ERROR([$withval not found]) + fi +], +AC_MSG_RESULT(no)) + +# check for --with-db-lib +AC_MSG_CHECKING(for --with-db-lib) +AC_ARG_WITH(db-lib, [ --with-db-lib=PATH Berkeley DB library directory], +[ + if test -d "$withval" + then + AC_MSG_RESULT([using $withval]) + db_lib="-L$withval" + db_libdir="$withval" + else + echo + AC_MSG_ERROR([$withval not found]) + fi +], +AC_MSG_RESULT(no)) + dnl - check in system locations if test -z "$db_inc"; then AC_MSG_CHECKING(for db.h) - if test -f "/usr/include/db.h"; then + if test -f "/usr/include/db4/db.h"; then + AC_MSG_RESULT([using /usr/include/db4/db.h]) + db_incdir="/usr/include/db4" + db_inc="-I/usr/include/db4" + db_lib='-L$(libdir)' + db_libdir='$(libdir)' + elif test -f "/usr/include/db.h"; then AC_MSG_RESULT([using /usr/include/db.h]) db_incdir="/usr/include" db_inc="-I/usr/include" |