]> git.wh0rd.org - dump.git/blobdiff - configure.in
Added a configure check for sa_sigaction member of struct sigaction.
[dump.git] / configure.in
index a35359cbd363144c12acfa34275bc49c661e8072..802f31a560cad4e276078aac381179f0ff171812 100644 (file)
@@ -100,7 +100,7 @@ if test "$enableval" = "no"
 then
        READLINE=""
 else
-       READLINE="-lreadline"
+       READLINE="-lreadline -ltermcap"
        AC_DEFINE(HAVE_READLINE)
 fi
 ,
@@ -198,7 +198,7 @@ AC_ARG_WITH([binmode],
 [  --with-binmode=MODE        select mode for binaries],
 AC_MSG_RESULT(BINMODE is $withval)
 BINMODE=$withval,
-BINMODE=6555
+BINMODE=0755
 echo "BINMODE defaults to $BINMODE"
 )dnl
 AC_SUBST(BINMODE)
@@ -234,7 +234,7 @@ AC_ARG_WITH([manmode],
 [  --with-manmode=MODE        select mode for manual pages],
 AC_MSG_RESULT(MANMODE is $withval)
 MANMODE=$withval,
-MANMODE=0444
+MANMODE=0644
 echo "MANMODE defaults to $MANMODE"
 )dnl
 AC_SUBST(MANMODE)
@@ -260,13 +260,23 @@ 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 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)
+       fi
+fi
+
 dnl
 dnl Check for readline headers and libraries
 dnl
 AC_CHECK_HEADER(readline/readline.h, [readline_h=yes], [readline_h=no])
-AC_CHECK_LIB(readline, readline, [readline_lib=yes], [readline_lib=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"; then
+       if test "$READLINE" = "-lreadline -ltermcap"; then
                AC_MSG_ERROR(You need to install the GNU readline libraries first)
        fi
 fi
@@ -293,6 +303,22 @@ if test "$ac_cv_func_glob" = "yes"; then
        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)
+fi
+
 dnl
 dnl Check for types
 dnl