summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-08-13 11:20:54 +1000
committerDave Chinner <david@fromorbit.com>2014-08-13 11:20:54 +1000
commit2345aae984e1163b33a60ef80f1a5437d87427fc (patch)
treee15160b0ef62cbd8b1d1e929e83c3382d215f8cf /m4
parent12022071971df086195011bddf0f6dba1cb2be48 (diff)
build: Fix test for libgdbm_compat when building statically
When building statically, -lgdbm_compat will not automatically pull in -lgdbm. So this needs to be specified explicitly in AC_CHECK_LIB and in the list of libraries passed to the linker. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/package_gdbmdev.m410
1 files changed, 5 insertions, 5 deletions
diff --git a/m4/package_gdbmdev.m4 b/m4/package_gdbmdev.m4
index ae76e340..734a192b 100644
--- a/m4/package_gdbmdev.m4
+++ b/m4/package_gdbmdev.m4
@@ -45,13 +45,13 @@ AC_DEFUN([AC_PACKAGE_WANT_GDBM],
fi
found="no"
- AC_CHECK_LIB(gdbm_compat,dbm_open,found=true,found=false)
- AC_CHECK_LIB(gdbm_compat,dbm_fetch,,found=false)
- AC_CHECK_LIB(gdbm_compat,dbm_store,,found=false)
- AC_CHECK_LIB(gdbm_compat,dbm_close,,found="no")
+ AC_CHECK_LIB(gdbm_compat,dbm_open,found=true,found=false,-lgdbm)
+ AC_CHECK_LIB(gdbm_compat,dbm_fetch,,found=false,-lgdbm)
+ AC_CHECK_LIB(gdbm_compat,dbm_store,,found=false,-lgdbm)
+ AC_CHECK_LIB(gdbm_compat,dbm_close,,found="no",-lgdbm)
if test $found = true ; then
- libgdbm="${libgdbm} -lgdbm_compat"
+ libgdbm="${libgdbm} -lgdbm_compat -lgdbm"
fi
fi