From bug-octave-request at bevo dot che dot wisc dot edu Sun Nov 24 13:44:14 2002 Subject: [PATCH] (ugly) fix for glibc-2.x sys_siglist[] failures in 2.1.40 From: Nix To: bug-octave at bevo dot che dot wisc dot edu Date: Sun, 24 Nov 2002 13:30:24 -0600 Systems using recent glibcs can't compile Octave 2.1 at the moment because sys_siglist[] isn't found by configure even though it is present in , leading to mismatching duplicate definitions and compilation failure when compiling help.cc (and probably other files too). This is because the (recently obsoleted) AC_DECL_SYS_SIGLIST macro's list of headers to check doesn't include signal.h. I've `fixed' it with the ugly patch below, which tries to search all the existing places as well as . I have a feeling that this is a step too far, and that we could get away without the call to AC_DECL_SYS_SIGLIST entirely, searching only for sys_siglist. If so the appropriate change is obvious. :) (Also, AC_DECL_SYS_SIGLIST sets the HAVE_DECL_SYS_SIGLIST define, not SYS_SIGLIST_DECLARED; probably either src/siglist.h needs fixing, or AC_DECL_SYS_SIGLIST should be dropped.) With this applied, Octave compiles and passes all its tests (well, except for eval-catch-9.m, eval-catch-10.m, detrend-3.m, try-9.m, and try-10.m, but I don't think that five test failures out of 1277 is too terrible.) 2002-11-24 Nix * configure.in: Use AC_CHECK_DECL in conjunction with AC_DECL_SYS_SIGLIST to ensure signal.h is searched. Index: configure.in =================================================================== RCS file: /cvs/octave/configure.in,v retrieving revision 1.396 diff -u -r1.396 configure.in --- configure.in 2002/11/23 19:36:21 1.396 +++ configure.in 2002/11/24 15:51:47 at @ -1124,7 +1124,9 @@ ### Signal stuff. AC_TYPE_SIGNAL -AC_DECL_SYS_SIGLIST +AC_CHECK_DECL([sys_siglist], + [AC_DEFINE(SYS_SIGLIST_DECLARED, 1, [Define if your system has a declaration of sys_siglist.])], + [AC_DECL_SYS_SIGLIST],[#include ]) AC_MSG_CHECKING([for sys_siglist variable]) AC_TRY_LINK([#include ], [extern char *sys_siglist[]; printf ("%s\n", sys_siglist[1]);], -- `I keep hearing about SF writers dying, but I never hear about SF writers being born. So I guess eventually there'll be none left.' -- Keith F. Lynch ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------