mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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>
This commit is contained in:
@@ -30,16 +30,15 @@ AC_DEFUN([AC_PACKAGE_WANT_GDBM],
|
||||
|
||||
if test $found = true; then
|
||||
libgdbm="${libgdbm} -lgdbm"
|
||||
fi
|
||||
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)
|
||||
|
||||
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"
|
||||
if test $found = true ; then
|
||||
libgdbm="${libgdbm} -lgdbm_compat -lgdbm"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user