Fix test so that sig.inc isn't built if sys_siglist, _sys_siglist or strsignal

is available.

In the long-run sig.inc should be built by a Makefile target.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@169 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2012-05-10 09:16:25 +00:00
parent 5d1953946e
commit 822522affa
2 changed files with 20 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01]
* configure - only create sig.inc if it's actually needed. (caf)
* configure - use the right dependencies when checking for net/if.h, i
arpa/inet.h and resolv.h. Reported by flashback. (caf)

View File

@@ -230,10 +230,12 @@ dnl Well, most of it. Couple of tweaks to make it work better.
dnl This fails on cygwin, and probably emxos2, because the header files aren't
dnl in the standard "/usr/include" location. There's got to be a better way.
AC_CACHE_CHECK(for a list of signal names, ac_cv_signal_names,
[ if test x"$ac_cv_decl_sys_siglist" != x"yes"; then
if test -f "$srcdir/include/sig.inc"; then
rm -f $srcdir/include/sig.inc
fi
[ if test x"$ac_cv_have_decl_sys_siglist" != x"yes"; then
if test x"$ac_cv_have_decl__sys_siglist" != x"yes"; then
if test x"$ac_cv_have_decl_strsignal" != x"yes"; then
if test -f "$srcdir/include/sig.inc"; then
rm -f $srcdir/include/sig.inc
fi
set X `cat $oldincludedir/signal.h $oldincludedir/sys/signal.h \
$oldincludedir/linux/signal.h 2>&1 | sed 's/^#[ ]*/#/' | \
$AWK '$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
@@ -279,13 +281,20 @@ AC_CACHE_CHECK(for a list of signal names, ac_cv_signal_names,
sig_name="ZERO $*"
[ echo "$sig_name" | sed -e 's/$/"};/' -e 's/ /", "/g' -e 's/^/char *sys_siglist[] = { "/' -e 's/};/, NULL};/' > $srcdir/include/sig.inc ]
if test -f "$srcdir/include/sig.inc"; then
ac_cv_signal_names="yes"
if test -f "$srcdir/include/sig.inc"; then
ac_cv_signal_names="sig.inc"
else
ac_cv_signal_names="none"
fi
else
ac_cv_signal_names="strsignal"
fi
else
ac_cv_signal_names="none"
fi
ac_cv_signal_names="_sys_siglist"
fi
else
ac_cv_signal_names="yes"
ac_cv_signal_names="sys_siglist"
fi
])
if test x"$ac_cv_signal_names" = x"none"; then