*-linux*)
# many systems don't have -ldbm
DBM_LIB=""
- if ./helpers/TestCompile lib dbm dbm_open; then
- DBM_LIB="-ldbm"
- elif ./helpers/TestCompile lib ndbm dbm_open; then
+ if ./helpers/TestCompile lib ndbm dbm_open; then
DBM_LIB="-lndbm"
if ./helpers/TestCompile lib db1 dbm_open; then
# Red Hat needs this; ndbm.h lives in db1
# For Red Hat 7, if not handled by the ndbm case above
DBM_LIB="-ldb1"
CFLAGS="$CFLAGS -I/usr/include/db1"
+ elif ./helpers/TestCompile lib gdbm dbm_open; then
+ DBM_LIB="-lgdbm"
+ CFLAGS="$CFLAGS -I/usr/include/gdbm"
+ elif ./helpers/TestCompile lib dbm dbm_open; then
+ DBM_LIB="-ldbm"
fi
if [ "x$DBM_LIB" != "x" ]; then
LIBS="$LIBS $DBM_LIB"