diff options
author | Rich Megginson <rmeggins@redhat.com> | 2007-10-19 20:05:12 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2007-10-19 20:05:12 +0000 |
commit | a390e490aa4d30655f42e2f311f093d74962ddc5 (patch) | |
tree | 7a9c5a0120d208369b240e7036f56cd6eee0ccbe /m4/db.m4 | |
parent | 563b0a42e0b707d86edae8792e0a86e63ed7e90e (diff) | |
download | ds-a390e490aa4d30655f42e2f311f093d74962ddc5.tar.gz ds-a390e490aa4d30655f42e2f311f093d74962ddc5.tar.xz ds-a390e490aa4d30655f42e2f311f093d74962ddc5.zip |
Resolves: bug 340361
Bug Description: build links wrong libdb on 64-bit systems
Reviewed by: nhosoi (Thanks!)
Fix Description: Once again, libtool attempts to be helpful but is instead harmful. If you have both db4-devel.i386 and db4-devel.x86_64 installed, this will install /usr/lib/libdb-4.N.la. If you use libtool to link with -ldb-4.N, and you do not specify a search path, libtool will attempt to find this library in it's default search path, which is something like /usr/lib/gcc/x86_64/blahblahblah/../../../lib. This will find /usr/lib/libdb-4.N.la and will use the information in that file and link the object with /usr/lib/libdb-4.N.so, instead of just passing -ldb-4.N through to the linker which is what it ought to do (darn libtool). In order to make libtool do the right thing, we must pass in -L$libdir -ldb-4.N to libtool so that it will use $libdir first in its search path.
Platforms tested: RHEL5 x86_64, RHEL4 x86_64
Flag Day: yes - autotool file changes
Doc impact: no
Diffstat (limited to 'm4/db.m4')
-rw-r--r-- | m4/db.m4 | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -30,6 +30,8 @@ AC_ARG_WITH(db, [ --with-db=PATH Berkeley DB directory], if test -f "/usr/include/db.h"; then db_incdir="/usr/include" db_inc="-I/usr/include" + db_lib='-L$(libdir)' + db_libdir='$(libdir)' else AC_MSG_ERROR([db.h not found]) fi @@ -59,6 +61,8 @@ if test -z "$db_inc"; then AC_MSG_RESULT([using /usr/include/db.h]) db_incdir="/usr/include" db_inc="-I/usr/include" + db_lib='-L$(libdir)' + db_libdir='$(libdir)' else AC_MSG_RESULT(no) AC_MSG_ERROR([db not found, specify with --with-db.]) |