aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2016-06-07 00:14:35 -0400
committerTheodore Ts'o <tytso@mit.edu>2016-06-07 01:01:37 -0400
commit32179ce25bff497e2e75a479ef97e9ae0b4bfd9c (patch)
tree0528600b4fd60e0e71795241eabb6e46ecec2ff3 /configure.ac
parent770d9f5e28ad65afba627d9096ddc8d4e990faca (diff)
downloadandroid_external_e2fsprogs-32179ce25bff497e2e75a479ef97e9ae0b4bfd9c.tar.gz
android_external_e2fsprogs-32179ce25bff497e2e75a479ef97e9ae0b4bfd9c.tar.bz2
android_external_e2fsprogs-32179ce25bff497e2e75a479ef97e9ae0b4bfd9c.zip
configure: fix detection of dlopen() for BSD systems
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 6 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 5fa1ddba..67d72318 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,9 +84,7 @@ dnl
dnl Check to see if libdl exists for the sake of dlopen
dnl
DLOPEN_LIB=''
-AC_CHECK_LIB(dl, dlopen,
-[DLOPEN_LIB=-ldl
-AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if dlopen/libdl exists])])
+AC_CHECK_LIB(dl, dlopen,DLOPEN_LIB=-ldl)
AC_SUBST(DLOPEN_LIB)
dnl
AC_ARG_WITH([cc],
@@ -1081,6 +1079,9 @@ if test -n "$BLKID_CMT"; then
AC_SEARCH_LIBS([blkid_probe_all], [blkid])
fi
dnl
+if test -n "$DLOPEN_LIB" ; then
+ ac_cv_func_dlopen=yes
+fi
AC_CHECK_FUNCS(m4_flatten([
__secure_getenv
add_key
@@ -1088,6 +1089,7 @@ AC_CHECK_FUNCS(m4_flatten([
blkid_probe_get_topology
blkid_probe_enable_partitions
chflags
+ dlopen
fadvise64
fallocate
fallocate64
@@ -1155,7 +1157,7 @@ dnl See if libmagic exists
dnl
AC_CHECK_LIB(magic, magic_file, [MAGIC_LIB=-lmagic
AC_CHECK_HEADERS([magic.h])])
-if test "$ac_cv_lib_dl_dlopen" = yes ; then
+if test "$ac_cv_func_dlopen" = yes ; then
MAGIC_LIB=$DLOPEN_LIB
fi
AC_SUBST(MAGIC_LIB)