AC_PREREQ(2.54)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADERS([lib/config.h])
-AH_BOTTOM([#include "dirpaths.h"])
+AH_BOTTOM([#include <dirpaths.h>])
MCONFIG=./MCONFIG
AC_SUBST_FILE(MCONFIG)
BINARY_TYPE=bin
AC_SUBST(E2FSPROGS_DAY)
AC_SUBST(E2FSPROGS_VERSION)
AC_SUBST(E2FSPROGS_PKGVER)
-AC_CANONICAL_HOST
-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_SUBST(DLOPEN_LIB)
dnl
dnl Use diet libc
dnl
[ --with-diet-libc use diet libc],
CC="diet cc -nostdinc"
WITH_DIET_LIBC=yes
+if test -z "$LIBS"
+then
+ LIBS="-lcompat"
+else
+ LIBS="$LIBS -lcompat"
+fi
AC_MSG_RESULT(CC=$CC))dnl
dnl
+AC_CANONICAL_HOST
+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_SUBST(DLOPEN_LIB)
+dnl
AC_ARG_WITH([cc],
AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
else
AC_MSG_RESULT([[(none)]])
fi
+AC_USE_SYSTEM_EXTENSIONS
dnl
dnl Set default values for library extentions. Will be dealt with after
dnl parsing configuration opions, which may modify these
AC_SUBST(PROFILE_CMT)
AC_SUBST_FILE(MAKEFILE_PROFILE)
dnl
-dnl handle --enable-checker
+dnl handle --enable-gcov
dnl
-AC_ARG_ENABLE([checker],
-[ --enable-checker build checker libraries],
-if test "$enableval" = "no"
+AC_ARG_ENABLE([gcov],
+[ --enable-gcov build for coverage testing using gcov],
+if test "$enableval" = "yes"
then
- CHECKER_CMT=#
- MAKEFILE_CHECKER=/dev/null
- AC_MSG_RESULT([Disabling checker libraries])
-else
- CHECKER_CMT=
- MAKEFILE_CHECKER=$srcdir/lib/Makefile.checker
- AC_MSG_RESULT([Building checker libraries])
+ CFLAGS="-g -fprofile-arcs -ftest-coverage"
+ LDFLAGS="-fprofile-arcs -ftest-coverage"
+ AC_MSG_RESULT([Enabling gcov support])
fi
-,
-CHECKER_CMT=#
-MAKEFILE_CHECKER=/dev/null
-AC_MSG_RESULT([Disabling checker libraries by default])
)
-AC_SUBST(CHECKER_CMT)
-AC_SUBST_FILE(MAKEFILE_CHECKER)
+
dnl
dnl Substitute library extensions
dnl
AC_MSG_RESULT([Enabling e4defrag support])
fi
,
-AC_MSG_RESULT([Enabling e4defrag support by default])
-DEFRAG_CMT=
+if test -z "$WITH_DIET_LIBC"
+then
+ AC_MSG_RESULT([Enabling e4defrag support by default])
+ DEFRAG_CMT=
+else
+ AC_MSG_RESULT([Disabling e4defrag support by default])
+ DEFRAG_CMT="#"
+fi
)
AC_SUBST(DEFRAG_CMT)
dnl
linux/falloc.h
linux/fd.h
linux/major.h
+ linux/loop.h
net/if_dl.h
netinet/in.h
sys/disklabel.h
AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT, 1,
[Define to 1 if dirent has d_reclen])],,
[#include <dirent.h>])
+AC_CHECK_MEMBERS([struct stat.st_atim])
dnl Check to see if ssize_t was declared
AC_CHECK_TYPE(ssize_t,[AC_DEFINE(HAVE_TYPE_SSIZE_T, 1,
[Define to 1 if ssize_t declared])],,
AC_SUBST(SIZEOF_LONG_LONG)
AC_SUBST(SIZEOF_OFF_T)
AC_C_BIGENDIAN
-BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+if test $cross_compiling = no; then
+ BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+else
+ CROSS_COMPILE="1" BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
+fi
ASM_TYPES_HEADER=./asm_types.h
AC_SUBST_FILE(ASM_TYPES_HEADER)
dnl
__secure_getenv
backtrace
blkid_probe_get_topology
+ blkid_probe_enable_partitions
chflags
+ fadvise64
fallocate
fallocate64
fchown
fdatasync
fstat64
ftruncate64
+ futimes
+ getcwd
getdtablesize
getmntinfo
getpwuid_r
mallinfo
mbstowcs
memalign
+ mempcpy
mmap
msync
nanosleep
open64
pathconf
posix_fadvise
+ posix_fadvise64
posix_memalign
prctl
secure_getenv
setresgid
setresuid
srandom
+ stpcpy
strcasecmp
strdup
strnlen
dnl
AC_ARG_WITH([multiarch],
[ --with-multiarch=ARCH specify the multiarch triplet],
-libdir=$libdir/$withval
-root_libdir=$root_libdir/$withval
+if test "$withval" = "lib64"; then
+ libdir=/usr/lib64
+ root_libdir=/lib64
+else
+ libdir=$libdir/$withval
+ root_libdir=$root_libdir/$withval
+fi
)dnl
dnl
dnl See if -static works. This could fail if the linker does not
if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl'
fi
+if test -n "$WITH_DIET_LIBC" ; then
+ INCLUDES="$INCLUDES -D_REENTRANT"
+fi
AC_SUBST(INCLUDES)
dnl
dnl Build CFLAGS
dnl
if test $cross_compiling = no; then
- BUILD_CFLAGS="$CFLAGS $CPPFLAGS"
+ BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
BUILD_LDFLAGS="$LDFLAGS"
else
BUILD_CFLAGS=