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
-dnl
-dnl set $(LD) from --with-linker=value
+AC_HELP_STRING([--with-cc],[no longer supported, use CC= instead]),
+AC_MSG_ERROR([--with-cc no longer supported; use CC= instead]))
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
+if test "$GCC" = yes; then
+ RDYNAMIC="-rdynamic"
+ AC_SUBST(RDYNAMIC)
+fi
+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(DEPPROFILED_LIBBLKID)
AC_SUBST(BLKID_CMT)
dnl
+dnl handle --disable-libquota
+dnl
+PKG_PROG_PKG_CONFIG
+LIBQUOTA=
+DEPLIBQUOTA=
+STATIC_LIBQUOTA=
+DEPSTATIC_LIBQUOTA=
+PROFILED_LIBQUOTA=
+DEPPROFILED_LIBQUOTA=
+QUOTA_CMT=
+AC_ARG_ENABLE([libquota],
+[ --disable-libquota do not build private quota library],
+if test "$enableval" = "no"
+then
+ if test -z "$PKG_CONFIG"; then
+ AC_MSG_ERROR([pkg-config not installed; please install it.])
+ fi
+
+ AC_CHECK_LIB(quota,
+ [LIBQUOTA=`$PKG_CONFIG --libs quota`;
+ STATIC_LIBQUOTA=`$PKG_CONFIG --static --libs quota`],
+ [AC_MSG_ERROR([external quota library not found])],
+ [$LIBQUOTA])
+ QUOTA_CMT=#
+ AC_MSG_RESULT([Disabling private quota library])
+else
+ LIBQUOTA='$(LIB)/libquota'$LIB_EXT
+ DEPLIBQUOTA=$LIBQUOTA
+ STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT
+ DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA
+ PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT
+ DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA
+ AC_MSG_RESULT([Enabling private quota library])
+fi
+,
+LIBQUOTA='$(LIB)/libquota'$LIB_EXT
+DEPLIBQUOTA=$LIBQUOTA
+STATIC_LIBQUOTA='$(LIB)/libquota'$STATIC_LIB_EXT
+DEPSTATIC_LIBQUOTA=$STATIC_LIBQUOTA
+PROFILED_LIBQUOTA='$(LIB)/libquota'$PROFILED_LIB_EXT
+DEPPROFILED_LIBQUOTA=$PROFILED_LIBQUOTA
+AC_MSG_RESULT([Enabling private quota library by default])
+)
+AC_SUBST(LIBQUOTA)
+AC_SUBST(DEPLIBQUOTA)
+AC_SUBST(STATIC_LIBQUOTA)
+AC_SUBST(DEPSTATIC_LIBQUOTA)
+AC_SUBST(PROFILED_LIBQUOTA)
+AC_SUBST(DEPPROFILED_LIBQUOTA)
+AC_SUBST(QUOTA_CMT)
+dnl
dnl handle --enable-debugfs
dnl
AC_ARG_ENABLE([debugfs],
)
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],
else
AC_CHECK_PROGS(BUILD_CC, gcc cc)
fi
-AC_CHECK_HEADERS(dirent.h errno.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h linux/fd.h linux/major.h net/if_dl.h netinet/in.h sys/disklabel.h sys/file.h sys/ioctl.h sys/mkdev.h sys/mman.h sys/prctl.h sys/queue.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h)
+AC_CHECK_HEADERS(dirent.h errno.h execinfo.h getopt.h malloc.h mntent.h paths.h semaphore.h setjmp.h signal.h stdarg.h stdint.h stdlib.h termios.h termio.h unistd.h utime.h linux/fd.h linux/major.h net/if_dl.h netinet/in.h sys/disklabel.h sys/file.h sys/ioctl.h sys/mkdev.h sys/mman.h sys/prctl.h sys/queue.h sys/resource.h sys/select.h sys/socket.h sys/sockio.h sys/stat.h sys/syscall.h sys/sysmacros.h sys/time.h sys/types.h sys/un.h sys/wait.h)
AC_CHECK_HEADERS(sys/disk.h sys/mount.h,,,
[[
#if HAVE_SYS_QUEUE_H
[#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 backtrace)
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)
lib/et/Makefile lib/ss/Makefile lib/e2p/Makefile \
lib/ext2fs/Makefile lib/ext2fs/ext2_types.h \
lib/uuid/Makefile lib/uuid/uuid_types.h \
- lib/blkid/Makefile lib/blkid/blkid_types.h \
+ lib/blkid/Makefile lib/blkid/blkid_types.h lib/quota/Makefile \
lib/ss/ss.pc lib/uuid/uuid.pc lib/et/com_err.pc \
lib/e2p/e2p.pc lib/blkid/blkid.pc lib/ext2fs/ext2fs.pc \
misc/Makefile ext2ed/Makefile e2fsck/Makefile \