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)])
+AC_SUBST(DLOPEN_LIB)
+dnl
dnl Use diet libc
dnl
WITH_DIET_LIBC=
WITH_DIET_LIBC=yes
AC_MSG_RESULT(CC=$CC))dnl
dnl
-dnl set $(CC) from --with-cc=value
-dnl
AC_ARG_WITH([cc],
-[ --with-cc=COMPILER select compiler to use],
-AC_MSG_RESULT(CC=$withval)
-CC=$withval,
-if test -z "$CC" ; then CC=cc; fi
-[AC_MSG_RESULT(CC defaults to $CC)])dnl
-export CC
-AC_SUBST([CC])
-AC_PROG_CC
-AC_PROG_CPP
+AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
+AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
dnl
-dnl set $(LD) from --with-linker=value
-dnl
-AC_ARG_WITH([linker],
-[ --with-linker=LINKER select linker to use],
-AC_MSG_RESULT(LD=$withval)
-LD=$withval,
-if test -z "$LD" ; then LD=$CC; fi
-[AC_MSG_RESULT(LD defaults to $LD)])dnl
-export LD
-AC_SUBST([LD])
+AC_ARG_WITH([ccopts],
+AC_HELP_STRING([--with-ccopts],[no longer supported, use CFLAGS= instead]),
+AC_MSG_ERROR([--with-ccopts no longer supported; use CFLAGS= instead]))
dnl
-dnl set $(CCOPTS) from --with-ccopts=value
+AC_ARG_WITH([ldopts],
+AC_HELP_STRING([--with-ldopts],[no longer supported, use LDFLAGS= instead]),
+AC_MSG_ERROR([--with-ldopts no longer supported; use LDFLAGS= instead]))
dnl
-AC_ARG_WITH([ccopts],
-[ --with-ccopts=CCOPTS select compiler command line options],
-AC_MSG_RESULT(CCOPTS is $withval)
-CFLAGS=$withval,
-)dnl
+AC_PROG_CC
+AC_PROG_CPP
dnl
dnl On systems without linux header files, we add an extra include directory
dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here
STATIC_LIB_EXT=.a
PROFILED_LIB_EXT=.a
dnl
-dnl set $(LDFLAGS) from --with-ldopts=value
-dnl
-AC_ARG_WITH([ldopts],
-[ --with-ldopts=LDOPTS select linker command line options],
-AC_MSG_RESULT(LDFLAGS is $withval)
-LDFLAGS=$withval,
-)dnl
-AC_SUBST(LDFLAGS)
-dnl
dnl Allow separate `root_prefix' to be specified
dnl
AC_ARG_WITH([root-prefix],
)
AC_SUBST(MAINTAINER_CMT)
dnl
+dnl handle --enable-symlink-install
+dnl
+AC_ARG_ENABLE([symlink-install],
+[ --enable-symlink-install use symlinks when installing instead of hard links],
+if test "$enableval" = "no"
+then
+ LINK_INSTALL_FLAGS=-f
+ AC_MSG_RESULT([Disabling symlinks for install])
+else
+ LINK_INSTALL_FLAGS=-sf
+ AC_MSG_RESULT([Enabling symlinks for install])
+fi
+,
+LINK_INSTALL_FLAGS=-f
+AC_MSG_RESULT([Disabling symlinks for install])
+)
+AC_SUBST(LINK_INSTALL_FLAGS)
+dnl
+dnl handle --enable-symlink-build
+dnl
+AC_ARG_ENABLE([symlink-build],
+[ --enable-symlink-build use symlinks while building instead of hard links],
+if test "$enableval" = "no"
+then
+ LINK_BUILD_FLAGS=
+ AC_MSG_RESULT([Disabling symlinks for build])
+else
+ LINK_BUILD_FLAGS=-s
+ AC_MSG_RESULT([Enabling symlinks for build])
+fi
+,
+LINK_BUILD_FLAGS=
+AC_MSG_RESULT([Disabling symlinks for build])
+)
+AC_SUBST(LINK_BUILD_FLAGS)
+dnl
dnl handle --enable-verbose-makecmds
dnl
AC_ARG_ENABLE([verbose-makecmds],
-[ --enable-verbose-makecmds enable verbose make command output],
+[ --enable-verbose-makecmds enable verbose make command output],
if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling verbose make commands])
)
AC_SUBST(RESIZER_CMT)
dnl
+dnl handle --enable-defrag
+dnl
+AC_ARG_ENABLE([defrag],
+[ --disable-defrag disable support of e4defrag program],
+if test "$enableval" = "no"
+then
+ AC_MSG_RESULT([Disabling e4defrag support])
+ DEFRAG_CMT="#"
+else
+ DEFRAG_CMT=
+ AC_MSG_RESULT([Enabling e4defrag support])
+fi
+,
+AC_MSG_RESULT([Enabling e4defrag support by default])
+DEFRAG_CMT=
+)
+AC_SUBST(DEFRAG_CMT)
+dnl
dnl See whether to install the `fsck' wrapper program (that calls e2fsck)
dnl
AC_ARG_ENABLE([fsck],
[#include <sys/types.h>
#include <sys/socket.h>])
dnl
-AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate)
+dnl This will add -lblkid to the AC_CHECK_FUNCS search if we are using
+dnl the system-provided blkid library
+dnl
+if test -n "$BLKID_CMT"; then
+ AC_SEARCH_LIBS([blkid_probe_all], [blkid])
+fi
+dnl
+AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit sync_file_range posix_fadvise fallocate fallocate64 blkid_probe_get_topology mbstowcs)
dnl
dnl Check to see if -lsocket is required (solaris) to make something
dnl that uses socket() to compile; this is needed for the UUID library
AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket])
AC_SUBST(SOCKET_LIB)
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)])
-AC_SUBST(DLOPEN_LIB)
-dnl
dnl See if optreset exists
dnl
AC_MSG_CHECKING(for optreset)