OSDN Git Service

Android: avoid the second check_mntent_file()
[android-x86/external-e2fsprogs.git] / configure.ac
index 5fa1ddb..f37b7df 100644 (file)
@@ -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],
@@ -922,6 +920,7 @@ AC_CHECK_HEADERS(m4_flatten([
        linux/fd.h
        linux/major.h
        linux/loop.h
+       linux/types.h
        net/if_dl.h
        netinet/in.h
        sys/acl.h
@@ -1081,6 +1080,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,12 +1090,15 @@ AC_CHECK_FUNCS(m4_flatten([
        blkid_probe_get_topology
        blkid_probe_enable_partitions
        chflags
+       dlopen
        fadvise64
        fallocate
        fallocate64
        fchown
+       fcntl
        fdatasync
        fstat64
+       fsync
        ftruncate64
        futimes
        getcwd
@@ -1155,11 +1160,16 @@ 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)
 dnl
+dnl Check to see if librt is required for clock_gettime() (glibc < 2.17)
+dnl
+AC_CHECK_LIB(rt, clock_gettime, [CLOCK_GETTIME_LIB=-lrt])
+AC_SUBST(CLOCK_GETTIME_LIB)
+dnl
 dnl Check to see if the FUSE library is -lfuse or -losxfuse
 dnl
 FUSE_CMT=
@@ -1393,13 +1403,6 @@ darwin*)
        ;;
 esac
 dnl
-dnl Make the ss and et directories work correctly.
-dnl
-SS_DIR=`cd ${srcdir}/lib/ss; pwd`
-ET_DIR=`cd ${srcdir}/lib/et; pwd`
-AC_SUBST(SS_DIR)
-AC_SUBST(ET_DIR)
-dnl
 dnl Only try to run the test suite if we're not cross compiling.
 dnl
 if test "$cross_compiling" = yes ; then