Whamcloud - gitweb
misc: clean up compiler warnings
[tools/e2fsprogs.git] / configure.in
index c278d83..af639c3 100644 (file)
@@ -63,6 +63,14 @@ 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)])
+AC_SUBST(DLOPEN_LIB)
+dnl
 dnl Use diet libc
 dnl 
 WITH_DIET_LIBC=
@@ -146,10 +154,46 @@ AC_MSG_RESULT([Disabling maintainer mode by default])
 )
 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])
@@ -533,6 +577,24 @@ RESIZER_CMT=
 )
 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],
@@ -809,7 +871,7 @@ 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 blkid_probe_get_topology2)
+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
@@ -818,14 +880,6 @@ SOCKET_LIB=''
 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)