]> git.wh0rd.org - dump.git/blobdiff - configure.in
Bug in getvol() when making a wrong answer to the 'Mount next volume' prompt.
[dump.git] / configure.in
index 802f31a560cad4e276078aac381179f0ff171812..a99ea2f26a1f90bac4716c9aeffac7131084e6e6 100644 (file)
@@ -122,6 +122,45 @@ fi
 echo "Using new style F script"
 )
 
+dnl
+dnl Handle --enable-largefile
+dnl
+AC_ARG_ENABLE([largefile],
+[  --enable-largefile         enable Large File System support (your glibc needs to support it)],
+if test "$enableval" = "yes"
+then
+       AC_DEFINE(USE_LFS)
+fi
+,
+echo "Not enabling Large File System support"
+)
+
+dnl
+dnl Handle --enable-qfa
+dnl
+AC_ARG_ENABLE([qfa],
+[  --enable-qfa               enable Quick File Access support],
+if test "$enableval" = "yes"
+then
+       AC_DEFINE(USE_QFA)
+fi
+,
+echo "Not enabling Quick File Access support"
+)
+
+dnl
+dnl Handle --enable-qfadebug
+dnl
+AC_ARG_ENABLE([qfadebug],
+[  --enable-qfadebug          include Quick File Access debugging code],
+if test "$enableval" = "yes"
+then
+       AC_DEFINE(DEBUG_QFA)
+fi
+,
+echo "Not including Quick File Access debugging code"
+)
+
 dnl
 dnl set $(CC) from --with-cc=value
 dnl
@@ -246,7 +285,7 @@ AC_ARG_WITH([dumpdatespath],
 [  --with-dumpdatespath=PATH  select path for dumpdates file],
 AC_MSG_RESULT(DUMPDATESPATH is $withval)
 DUMPDATESPATH=$withval,
-DUMPDATESPATH="/etc/dumpdates"
+DUMPDATESPATH="${sysconfdir}/dumpdates"
 echo "DUMPDATESPATH defaults to $DUMPDATESPATH"
 )dnl
 AC_SUBST(DUMPDATESPATH)
@@ -260,6 +299,41 @@ if test "$ext2fs_h" = no -o "$ext2fs_lib" = no; then
        AC_MSG_ERROR(You need to install the Ext2fs libraries from the E2fsprogs distribution first - hint: make install-libs)
 fi
 
+dnl
+dnl Try to use ext2_fs.h header from libext2fs instead of from the kernel
+dnl
+AC_CHECK_HEADERS(ext2fs/ext2_fs.h)
+
+dnl
+dnl Check for ext2_ino_t type
+dnl
+AC_MSG_CHECKING(for ext2_ino_t type in libext2fs headers)
+AC_TRY_COMPILE([#include <stdio.h>
+#ifdef HAVE_EXT2FS_EXT2_FS_H
+#include <ext2fs/ext2_fs.h>
+#else
+#include <linux/ext2_fs.h>
+#endif
+#include <ext2fs/ext2fs.h>],
+[ext2_ino_t ino = 0;], 
+[AC_DEFINE(HAVE_EXT2_INO_T) AC_MSG_RESULT(yes)],
+AC_MSG_RESULT(no))
+
+dnl
+dnl Check for s_journal_inum field in ext2_super_block struct
+dnl
+AC_MSG_CHECKING(for s_journal_inum field in ext2_super_block struct)
+AC_TRY_COMPILE([#include <stdio.h>
+#ifdef HAVE_EXT2FS_EXT2_FS_H
+#include <ext2fs/ext2_fs.h>
+#else
+#include <linux/ext2_fs.h>
+#endif
+#include <ext2fs/ext2fs.h>],
+[struct ext2_super_block es; es.s_journal_inum = 0;],
+[AC_DEFINE(HAVE_EXT2_JOURNAL_INUM) AC_MSG_RESULT(yes)],
+AC_MSG_RESULT(no))
+
 dnl
 dnl Check for termcap libraries
 dnl
@@ -281,6 +355,19 @@ if test "$readline_h" = no -o "$readline_lib" = no; then
        fi
 fi
 
+dnl
+dnl Check for zlib headers and libraries
+dnl
+AC_CHECK_HEADER(zlib.h, [zlib_h=yes], [zlib_h=no])
+AC_CHECK_LIB(z, compress2, [zlib_lib=yes], [zlib_lib=no])
+if test "$zlib_h" = yes -a "$zlib_lib" = yes; then
+       ZLIB="-lz"
+       AC_DEFINE(HAVE_ZLIB)
+else
+       ZLIB=""
+fi
+AC_SUBST(ZLIB)
+
 dnl
 dnl Check for library functions
 dnl
@@ -290,6 +377,7 @@ AC_CHECK_FUNC(glob)
 dnl
 dnl Check for GLOB_ALTDIRFUNC
 dnl
+AC_MSG_CHECKING(for extended glob routines)
 if test "$ac_cv_func_glob" = "yes"; then
        AC_EGREP_CPP(yes, 
        [
@@ -297,26 +385,15 @@ if test "$ac_cv_func_glob" = "yes"; then
 #      ifdef GLOB_ALTDIRFUNC
        yes
 #      endif
-       ], AC_DEFINE(HAVE_GLOB), noglob=yes)
-       if test "$noglob" = "yes"; then
-               echo "Your system does not support extended glob, will use the internal routines"
-       fi
-fi
-
-dnl
-dnl Check if sigaction structure has a sa_sigaction field
-dnl
-AC_MSG_CHECKING(whether struct sigaction has a sa_sigaction field)
-AC_CACHE_VAL(dump_cv_struct_sa_sigaction,
-AC_TRY_COMPILE(
-[#include <stdio.h>
-#include <signal.h>],
-[struct sigaction action; action.sa_sigaction = NULL;],
-[dump_cv_struct_sa_sigaction=yes],
-[dump_cv_struct_sa_sigaction=no]))
-AC_MSG_RESULT($dump_cv_struct_sa_sigaction)
-if test "$dump_cv_struct_sa_sigaction" = yes; then
-  AC_DEFINE(HAVE_SIGACTION_SA_SIGACTION)
+       ], 
+       [
+       AC_DEFINE(HAVE_GLOB)
+       AC_MSG_RESULT(yes)
+       ],
+       [
+       AC_MSG_RESULT(no)
+       echo "Your system does not support extended glob, will use the internal routines"
+       ])
 fi
 
 dnl