2008-12-24 12:42:12 +02:00
|
|
|
dnl
|
|
|
|
dnl check for signal type
|
|
|
|
dnl
|
|
|
|
dnl AC_RETSIGTYPE isn't quite right, but almost.
|
|
|
|
dnl
|
|
|
|
define(TYPE_SIGNAL,[
|
|
|
|
AC_MSG_CHECKING([POSIX signal handlers])
|
|
|
|
AC_CACHE_VAL(cv_has_posix_signals,
|
|
|
|
[AC_TRY_COMPILE(
|
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#ifdef signal
|
|
|
|
#undef signal
|
|
|
|
#endif
|
|
|
|
extern void (*signal ()) ();], [],
|
|
|
|
cv_has_posix_signals=yes, cv_has_posix_signals=no)])
|
|
|
|
AC_MSG_RESULT($cv_has_posix_signals)
|
|
|
|
if test $cv_has_posix_signals = yes; then
|
2010-12-13 03:47:35 +02:00
|
|
|
AC_DEFINE(RETSIGTYPE, void, [Return type is void])
|
|
|
|
AC_DEFINE(POSIX_SIGTYPE, [], [Have POSIX signals])
|
2008-12-24 12:42:12 +02:00
|
|
|
else
|
|
|
|
if test $ac_cv_type_signal = void; then
|
2010-12-13 03:47:35 +02:00
|
|
|
AC_DEFINE(RETSIGTYPE, void, [Return type is void])
|
2008-12-24 12:42:12 +02:00
|
|
|
else
|
2010-12-13 03:47:35 +02:00
|
|
|
AC_DEFINE(RETSIGTYPE, int, [Return type is int])
|
2008-12-24 12:42:12 +02:00
|
|
|
fi
|
|
|
|
fi])dnl
|