Modernise autoconf checks for sys_siglist and strsignal.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@156 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
298
configure
vendored
298
configure
vendored
@@ -4567,6 +4567,225 @@ _ACEOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking whether strsignal is declared" >&5
|
||||||
|
echo $ECHO_N "checking whether strsignal is declared... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_have_decl_strsignal+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
$ac_includes_default
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
#ifndef strsignal
|
||||||
|
char *p = (char *) strsignal;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag"
|
||||||
|
|| test ! -s conftest.err'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_have_decl_strsignal=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_have_decl_strsignal=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsignal" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_have_decl_strsignal" >&6
|
||||||
|
if test $ac_cv_have_decl_strsignal = yes; then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_STRSIGNAL 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_STRSIGNAL 0
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
|
||||||
|
echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
$ac_includes_default
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
#ifndef sys_siglist
|
||||||
|
char *p = (char *) sys_siglist;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag"
|
||||||
|
|| test ! -s conftest.err'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_have_decl_sys_siglist=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_have_decl_sys_siglist=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
|
||||||
|
if test $ac_cv_have_decl_sys_siglist = yes; then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_SYS_SIGLIST 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_SYS_SIGLIST 0
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: checking whether _sys_siglist is declared" >&5
|
||||||
|
echo $ECHO_N "checking whether _sys_siglist is declared... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_have_decl__sys_siglist+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
$ac_includes_default
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
#ifndef _sys_siglist
|
||||||
|
char *p = (char *) _sys_siglist;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag"
|
||||||
|
|| test ! -s conftest.err'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_have_decl__sys_siglist=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_have_decl__sys_siglist=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_have_decl__sys_siglist" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_have_decl__sys_siglist" >&6
|
||||||
|
if test $ac_cv_have_decl__sys_siglist = yes; then
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL__SYS_SIGLIST 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL__SYS_SIGLIST 0
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
|
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
|
||||||
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
|
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
|
||||||
@@ -5117,85 +5336,6 @@ cat >>confdefs.h <<_ACEOF
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
|
|
||||||
echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
|
|
||||||
if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
|
||||||
else
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
|
||||||
/* confdefs.h. */
|
|
||||||
_ACEOF
|
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
|
||||||
/* end confdefs.h. */
|
|
||||||
#include <signal.h>
|
|
||||||
/* NetBSD declares sys_siglist in unistd.h. */
|
|
||||||
#if HAVE_UNISTD_H
|
|
||||||
# include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
#ifndef sys_siglist
|
|
||||||
char *p = (char *) sys_siglist;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
rm -f conftest.$ac_objext
|
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
||||||
(eval $ac_compile) 2>conftest.er1
|
|
||||||
ac_status=$?
|
|
||||||
grep -v '^ *+' conftest.er1 >conftest.err
|
|
||||||
rm -f conftest.er1
|
|
||||||
cat conftest.err >&5
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); } &&
|
|
||||||
{ ac_try='test -z "$ac_c_werror_flag"
|
|
||||||
|| test ! -s conftest.err'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; } &&
|
|
||||||
{ ac_try='test -s conftest.$ac_objext'
|
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
|
||||||
(eval $ac_try) 2>&5
|
|
||||||
ac_status=$?
|
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
||||||
(exit $ac_status); }; }; then
|
|
||||||
ac_cv_have_decl_sys_siglist=yes
|
|
||||||
else
|
|
||||||
echo "$as_me: failed program was:" >&5
|
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
|
||||||
|
|
||||||
ac_cv_have_decl_sys_siglist=no
|
|
||||||
fi
|
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
|
|
||||||
echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
|
|
||||||
if test $ac_cv_have_decl_sys_siglist = yes; then
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define HAVE_DECL_SYS_SIGLIST 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
|
|
||||||
else
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define HAVE_DECL_SYS_SIGLIST 0
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
|
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
|
||||||
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
|
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
|
||||||
if test "${ac_cv_header_time+set}" = set; then
|
if test "${ac_cv_header_time+set}" = set; then
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ dnl configure.in for BitchX 1.0
|
|||||||
dnl Copyright (c) 1999-2001 David Walluck
|
dnl Copyright (c) 1999-2001 David Walluck
|
||||||
dnl All rights reserved.
|
dnl All rights reserved.
|
||||||
|
|
||||||
AC_PREREQ(2.49b)
|
AC_PREREQ(2.59)
|
||||||
AC_REVISION($Revision$)
|
AC_REVISION($Revision$)
|
||||||
AC_INIT
|
AC_INIT
|
||||||
AC_CONFIG_SRCDIR([$srcdir/source/irc.c])
|
AC_CONFIG_SRCDIR([$srcdir/source/irc.c])
|
||||||
@@ -74,6 +74,10 @@ AC_CHECK_DECLARATION(struct linger, struct_linger, [struct( | )*linger], sys/soc
|
|||||||
AC_CHECK_DECLARATION(sun_len, sun_len, sun_len, sys/un.h, HAVE_SUN_LEN)
|
AC_CHECK_DECLARATION(sun_len, sun_len, sun_len, sys/un.h, HAVE_SUN_LEN)
|
||||||
AC_CHECK_DECLARATION(bcopy, bcopy, bcopy, string.h, BCOPY_DECLARED)
|
AC_CHECK_DECLARATION(bcopy, bcopy, bcopy, string.h, BCOPY_DECLARED)
|
||||||
|
|
||||||
|
AC_CHECK_DECLS([strsignal, sys_siglist, _sys_siglist], , ,
|
||||||
|
[AC_INCLUDES_DEFAULT
|
||||||
|
#include <signal.h>])
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_PROG_CC_STDC
|
AC_PROG_CC_STDC
|
||||||
AC_C_CONST
|
AC_C_CONST
|
||||||
@@ -84,7 +88,6 @@ AC_TYPE_OFF_T
|
|||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_DECL_SYS_SIGLIST
|
|
||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
|
|
||||||
AC_CHECK_SIZEOF(unsigned int, 4)
|
AC_CHECK_SIZEOF(unsigned int, 4)
|
||||||
|
|||||||
@@ -72,10 +72,18 @@
|
|||||||
/* Define to 1 if you have the <curses.h> header file. */
|
/* Define to 1 if you have the <curses.h> header file. */
|
||||||
#undef HAVE_CURSES_H
|
#undef HAVE_CURSES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `strsignal', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_STRSIGNAL
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
|
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_SYS_SIGLIST
|
#undef HAVE_DECL_SYS_SIGLIST
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL__SYS_SIGLIST
|
||||||
|
|
||||||
/* Define to 1 if you have the <dirent.h> header file. */
|
/* Define to 1 if you have the <dirent.h> header file. */
|
||||||
#undef HAVE_DIRENT_H
|
#undef HAVE_DIRENT_H
|
||||||
|
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ int ioctl (int, int, ...);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_SYS_SIGLIST_DECLARED) && !defined(SYS_SIGLIST_DECLARED)
|
#if !HAVE_DECL_SYS_SIGLIST && HAVE_DECL__SYS_SIGLIST
|
||||||
#define sys_siglist _sys_siglist
|
#define sys_siglist _sys_siglist
|
||||||
#endif
|
#endif
|
||||||
#endif /* __irc_std_h */
|
#endif /* __irc_std_h */
|
||||||
|
|||||||
@@ -90,14 +90,14 @@ extern char *next_expr (char **, char);
|
|||||||
* A nice array of the possible signals. Used by the coredump trapping
|
* A nice array of the possible signals. Used by the coredump trapping
|
||||||
* routines and in the exec.c package.
|
* routines and in the exec.c package.
|
||||||
*/
|
*/
|
||||||
#if !defined(SYS_SIGLIST_DECLARED) && !defined(_SYS_SIGLIST_DECLARED) && !defined(__QNX__)
|
#if !HAVE_DECL_SYS_SIGLIST && !HAVE_DECL__SYS_SIGLIST && !defined(__QNX__)
|
||||||
#if defined(WINNT) || defined(__EMX__)
|
#if defined(WINNT) || defined(__EMX__)
|
||||||
char *sys_siglist[] = { "ZERO", "SIGINT", "SIGKILL", "SIGPIPE", "SIGFPE",
|
char *sys_siglist[] = { "ZERO", "SIGINT", "SIGKILL", "SIGPIPE", "SIGFPE",
|
||||||
"SIGHUP", "SIGTERM", "SIGSEGV", "SIGTSTP",
|
"SIGHUP", "SIGTERM", "SIGSEGV", "SIGTSTP",
|
||||||
"SIGQUIT", "SIGTRAP", "SIGILL", "SIGEMT", "SIGALRM",
|
"SIGQUIT", "SIGTRAP", "SIGILL", "SIGEMT", "SIGALRM",
|
||||||
"SIGBUS", "SIGLOST", "SIGSTOP", "SIGABRT", "SIGUSR1",
|
"SIGBUS", "SIGLOST", "SIGSTOP", "SIGABRT", "SIGUSR1",
|
||||||
"SIGUSR2", "SIGCHLD", "SIGTTOU", "SIGTTIN", "SIGCONT" };
|
"SIGUSR2", "SIGCHLD", "SIGTTOU", "SIGTTIN", "SIGCONT" };
|
||||||
#elif defined(__GLIBC__)
|
#elif HAVE_DECL_STRSIGNAL
|
||||||
#define USING_STRSIGNAL
|
#define USING_STRSIGNAL
|
||||||
/* use strsignal() from <string.h> */
|
/* use strsignal() from <string.h> */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user