X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fautoconf%2Fbacula-macros%2Fos.m4;h=7a3ce55d5a67c58d78b28b79e3d699cc9808e4b0;hb=ab3b720b4f86a56808dab9156de44a4596f1dd9a;hp=092179f8185cb3f3ec2cbbfd867caf8e386d9265;hpb=c10ebba745484090af5d7edae02238af0a1ff0fd;p=bacula%2Fbacula diff --git a/bacula/autoconf/bacula-macros/os.m4 b/bacula/autoconf/bacula-macros/os.m4 index 092179f818..7a3ce55d5a 100644 --- a/bacula/autoconf/bacula-macros/os.m4 +++ b/bacula/autoconf/bacula-macros/os.m4 @@ -1,44 +1,45 @@ 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 ],[ - 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 ], [ - int mask = sigmask(SIGINT); - sigsetmask(mask); sigblock(mask); sigpause(mask); - ], bash_cv_signal_vintage=4.2bsd, + AC_TRY_LINK([#include ],[ + 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 - 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 ], [ + int mask = sigmask(SIGINT); + sigsetmask(mask); sigblock(mask); sigpause(mask); + ], bash_cv_signal_vintage="4.2bsd", + [ + AC_TRY_LINK([ + #include + 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 @@ -50,7 +51,7 @@ else fi]) -AC_DEFUN(BA_CHECK_OPSYS, +AC_DEFUN([BA_CHECK_OPSYS], [ AC_CYGWIN if test $HAVE_UNAME=yes -a x`uname -s` = xSunOS @@ -133,7 +134,7 @@ else 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) @@ -150,7 +151,7 @@ else 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 @@ -206,6 +207,9 @@ 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