summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorhpa <hpa>2001-03-30 01:08:12 +0000
committerhpa <hpa>2001-03-30 01:08:12 +0000
commit7a15e40374151363f72a29aae78c3b890584dfac (patch)
treedf2b77931961e4a543010fb446fb193a5dc14585 /aclocal.m4
parent0ba1a99f5d2cafe313479d26e5e93554daa601a5 (diff)
downloadtftp-hpa-7a15e40374151363f72a29aae78c3b890584dfac.tar.gz
Fix massive lossage: 0.15 based on an outdated repository!!!
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m461
1 files changed, 12 insertions, 49 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 1a3cfef..fc82c1d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -14,54 +14,17 @@ AC_DEFUN(PA_ADD_CFLAGS,
CFLAGS="$pa_add_cflags__old_cflags")])
dnl --------------------------------------------------------------------------
-dnl PA_BSD_SIGNAL()
+dnl PA_SIGSETJMP
dnl
-dnl Test for BSD signal semantics. Set shell variable BSD_SIGNAL=1 if OK.
-dnl May modify CFLAGS and/or LIBS.
+dnl Do we have sigsetjmp/siglongjmp?
dnl --------------------------------------------------------------------------
-AC_DEFUN(PA_CHECK_BSD_SIGNAL,
-[AC_TRY_RUN([
-#include <unistd.h>
-#include <signal.h>
-int count=0;
-handle() { count++; }
-int main() {
- int pid=getpid();
- signal(SIGINT, handle);
- kill(pid,SIGINT);
- kill(pid,SIGINT);
- kill(pid,SIGINT);
- if (count!=3) return 1;
- return 0;
-}
-], BSD_SIGNAL=1)])
-
-AC_DEFUN(PA_BSD_SIGNAL,
-[AC_MSG_CHECKING([for BSD signal semantics])
-PA_CHECK_BSD_SIGNAL()
-if test -z "$BSD_SIGNAL"; then
- AC_MSG_RESULT([no])
- AC_MSG_CHECKING([if -D__USE_BSD_SIGNAL helps])
- pa_bsd_signal__old_cflags="$CFLAGS"
- CFLAGS="$CFLAGS -D__USE_BSD_SIGNAL"
- PA_CHECK_BSD_SIGNAL()
- if test -z "$BSD_SIGNAL"; then
- AC_MSG_RESULT([no])
- CFLAGS="$pa_bsd_signal__old_cflags"
- AC_MSG_CHECKING([if -lbsd helps])
- pa_bsd_signal__old_libs="$LIBS"
- LIBS="$LIBS -lbsd"
- PA_CHECK_BSD_SIGNAL()
- if test -z "$BSD_SIGNAL"; then
- AC_MSG_RESULT([no])
- LIBS="$pa_bsd_signal__old_libs"
- else
- AC_MSG_RESULT([yes])
- fi
- else
- AC_MSG_RESULT([yes])
- fi
-else
- AC_MSG_RESULT([yes])
-fi
-])
+AC_DEFUN(PA_SIGSETJMP,
+[AC_MSG_CHECKING([for sigsetjmp])
+ AC_TRY_LINK(
+ [#include <setjmp.h>],
+ [sigjmp_buf buf;
+ sigsetjmp(buf,1);],
+ AC_MSG_RESULT([yes])
+ $1,
+ AC_MSG_RESULT([no])
+ $2)])