dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
-AC_DEFUN(SIGNAL_CHECK,
-[AC_REQUIRE([AC_TYPE_SIGNAL])
-AC_MSG_CHECKING(for type of signal functions)
-AC_CACHE_VAL(bash_cv_signal_vintage,
-[
- AC_TRY_LINK([#include <signal.h>],[
- sigset_t ss;
- struct sigaction sa;
- sigemptyset(&ss); sigsuspend(&ss);
- sigaction(SIGINT, &sa, (struct sigaction *) 0);
- sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
- ], bash_cv_signal_vintage=posix,
+
+AC_DEFUN([SIGNAL_CHECK],
+ [AC_REQUIRE([AC_TYPE_SIGNAL])
+ AC_MSG_CHECKING(for type of signal functions)
+ AC_CACHE_VAL(bash_cv_signal_vintage,
[
- AC_TRY_LINK([#include <signal.h>], [
- int mask = sigmask(SIGINT);
- sigsetmask(mask); sigblock(mask); sigpause(mask);
- ], bash_cv_signal_vintage=4.2bsd,
+ AC_TRY_LINK([#include <signal.h>],[
+ sigset_t ss;
+ struct sigaction sa;
+ sigemptyset(&ss); sigsuspend(&ss);
+ sigaction(SIGINT, &sa, (struct sigaction *) 0);
+ sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
+ ], bash_cv_signal_vintage="posix",
[
- AC_TRY_LINK([
- #include <signal.h>
- RETSIGTYPE foo() { }], [
- int mask = sigmask(SIGINT);
- sigset(SIGINT, foo); sigrelse(SIGINT);
- sighold(SIGINT); sigpause(SIGINT);
- ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7
- )]
- )]
-)
-])
-AC_MSG_RESULT($bash_cv_signal_vintage)
-if test "$bash_cv_signal_vintage" = posix; then
-AC_DEFINE(HAVE_POSIX_SIGNALS)
-elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
-AC_DEFINE(HAVE_BSD_SIGNALS)
-elif test "$bash_cv_signal_vintage" = svr3; then
-AC_DEFINE(HAVE_USG_SIGHOLD)
-fi
+ AC_TRY_LINK([#include <signal.h>], [
+ int mask = sigmask(SIGINT);
+ sigsetmask(mask); sigblock(mask); sigpause(mask);
+ ], bash_cv_signal_vintage="4.2bsd",
+ [
+ AC_TRY_LINK([
+ #include <signal.h>
+ RETSIGTYPE foo() { }], [
+ int mask = sigmask(SIGINT);
+ sigset(SIGINT, foo); sigrelse(SIGINT);
+ sighold(SIGINT); sigpause(SIGINT);
+ ], bash_cv_signal_vintage="svr3", bash_cv_signal_vintage="v7"
+ )]
+ )]
+ )
+ ])
+ AC_MSG_RESULT($bash_cv_signal_vintage)
+ if test "$bash_cv_signal_vintage" = "posix"; then
+ AC_DEFINE(HAVE_POSIX_SIGNALS)
+ elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
+ AC_DEFINE(HAVE_BSD_SIGNALS)
+ elif test "$bash_cv_signal_vintage" = "svr3"; then
+ AC_DEFINE(HAVE_USG_SIGHOLD)
+ fi
])
-AC_DEFUN(BA_CONDITIONAL,
+AC_DEFUN([BA_CONDITIONAL],
[AC_SUBST($1_TRUE)
AC_SUBST($1_FALSE)
if $2; then
fi])
-AC_DEFUN(BA_CHECK_OPSYS,
+AC_DEFUN([BA_CHECK_OPSYS],
[
AC_CYGWIN
if test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
BA_CONDITIONAL(HAVE_SGI_OS, $FALSEPRG)
fi
-if test $HAVE_UNAME=yes -a x`uname -s` = xIRIX
+if test $HAVE_UNAME=yes -a x`uname -s` = xIRIX -o x`uname -s` = xIRIX64
then
BA_CONDITIONAL(HAVE_IRIX_OS, $TRUEPRG)
AC_DEFINE(HAVE_IRIX_OS)
fi
])
-AC_DEFUN(BA_CHECK_OPSYS_DISTNAME,
+AC_DEFUN([BA_CHECK_OPSYS_DISTNAME],
[AC_MSG_CHECKING(for Operating System Distribution)
if test "x$DISTNAME" != "x"
then
elif test -f /etc/slackware-version
then
DISTNAME=slackware
+elif test x$host_vendor = xapple
+then
+ DISTNAME=osx
elif test $HAVE_UNAME=yes -a x`uname -s` = xDarwin
then
DISTNAME=darwin
elif test -f /etc/engarde-version
then
DISTNAME=engarde
+elif test -f /etc/arch-release
+then
+ DISTNAME=archlinux
elif test "$CYGWIN" = yes
then
DISTNAME=cygwin