diff options
author | Jeff Mahoney <jeffm@suse.com> | 2018-03-15 17:54:53 -0400 |
---|---|---|
committer | Eryu Guan <guaneryu@gmail.com> | 2018-03-23 11:25:25 +0800 |
commit | 156dafb888a66c0d85f21bb008537f537655689a (patch) | |
tree | f6d913b74eee0b37a18d9eb92aaafd88757310f5 | |
parent | 81d27bdc0a10163be54de50df4c92499d3c90c62 (diff) | |
download | xfstests-156dafb888a66c0d85f21bb008537f537655689a.tar.gz |
build: AC_PACKAGE_WANT_GDBM, fall back to compat if libgdbm detection fails
We currently check if libgdbm_compat contains the required symbols
even if libgdbm does. Let's fall back only when necessary (which is
pretty much always anyway).
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rw-r--r-- | m4/package_gdbmdev.m4 | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/m4/package_gdbmdev.m4 b/m4/package_gdbmdev.m4 index 484b751a40..3e5f33d056 100644 --- a/m4/package_gdbmdev.m4 +++ b/m4/package_gdbmdev.m4 @@ -30,16 +30,15 @@ AC_DEFUN([AC_PACKAGE_WANT_GDBM], if test $found = true; then libgdbm="${libgdbm} -lgdbm" - fi - - 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 -lgdbm" + else + 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="false",-lgdbm) + + if test $found = true ; then + libgdbm="${libgdbm} -lgdbm_compat -lgdbm" + fi fi fi |