X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=configure.in;h=3166457ef8322b8921a23629784325c2381d2848;hp=dcb6bfb7296c4de2062594f5add1bd55bc82f677;hb=f5504e5413d8c260ef4dcfd22e5e0fdbee402156;hpb=bd73117103358c5ee4f02a8fad5dc45123c7a5cc diff --git a/configure.in b/configure.in index dcb6bfb..3166457 100644 --- a/configure.in +++ b/configure.in @@ -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 @@ -163,9 +202,10 @@ dnl AC_ARG_WITH([ldopts], [ --with-ldopts=LDOPTS select linker command line options], AC_MSG_RESULT(LDFLAGS is $withval) -LDFLAGS=$withval, -LDFLAGS=)dnl -AC_SUBST(LDFLAGS) +LDOPTS=$withval +LDFLAGS="$LDFLAGS $withval", +LDOPTS=)dnl +AC_SUBST(LDOPTS) dnl dnl set $(BINOWNER) from --with-binowner @@ -246,7 +286,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,13 +300,48 @@ 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 +#ifdef HAVE_EXT2FS_EXT2_FS_H +#include +#else +#include +#endif +#include ], +[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 +#ifdef HAVE_EXT2FS_EXT2_FS_H +#include +#else +#include +#endif +#include ], +[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 AC_CHECK_LIB(termcap, tgetent, [termcap_lib=yes], [termcap_lib=no]) if test "$termcap_lib" = no; then if test "$READLINE" = "-lreadline -ltermcap"; then - AC_MSG_ERROR(You need to install the GNU termcap libraries first) + AC_MSG_ERROR(You need to install the GNU termcap library or configure without --enable-readline) fi fi @@ -277,10 +352,52 @@ AC_CHECK_HEADER(readline/readline.h, [readline_h=yes], [readline_h=no]) AC_CHECK_LIB(readline, readline, [readline_lib=yes], [readline_lib=no], "-ltermcap") if test "$readline_h" = no -o "$readline_lib" = no; then if test "$READLINE" = "-lreadline -ltermcap"; then - AC_MSG_ERROR(You need to install the GNU readline libraries first) + AC_MSG_ERROR(You need to install the GNU readline library or configure without --enable-readline) fi fi +dnl +dnl Check for rl_completion_matches +dnl +AC_CHECK_LIB(readline, rl_completion_matches, [rlcm=yes], [rlcm=no], "-ltermcap") +if test "$rlcm" = yes; then + AC_DEFINE(HAVE_READLINE_RLCM) +fi + +dnl +dnl Check for rl_completion_append_character +dnl +AC_CHECK_LIB(readline, rl_completion_append_character, [rcac=yes], [rcac=no], "-ltermcap") +if test "$rcac" = yes; then + AC_DEFINE(HAVE_READLINE_CAC) +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 bzlib headers and libraries +dnl +AC_CHECK_HEADER(bzlib.h, [bzlib_h=yes], [bzlib_h=no]) +AC_CHECK_LIB(bz2, BZ2_bzBuffToBuffCompress, [bzlib_lib=yes], [bzlib_lib=no]) +if test "$bzlib_h" = yes -a "$bzlib_lib" = yes; then + BZLIB="-lbz2" + AC_DEFINE(HAVE_BZLIB) +else + BZLIB="" +fi +AC_SUBST(BZLIB) + dnl dnl Check for library functions dnl @@ -290,6 +407,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,10 +415,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 + ], + [ + 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