-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Derek R. Price wrote: > Thanks. I'll see what I can do about getting the c99 autodetect in > at least GNULIB and maybe autoconf.
Does the attached patch do what you wanted? You'll need to `autoreconf -m' after installing it. I'll submit the full patch to bug-gnulib if it enables C99 on IRIX. Thanks, Derek - -- Derek R. Price CVS Solutions Architect Get CVS support at Ximbiot <http://ximbiot.com>! v: +1 248.835.1260 f: +1 248.835.1263 <mailto:[EMAIL PROTECTED]> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEQAaPLD1OTBfyMaQRAkhQAJ9hpJtqhe6hxEIId1A7cTUoWb3+cACfUbfI 2S7E1vw9YB0FhF9F6isGLIM= =M9JN -----END PGP SIGNATURE-----
Index: m4/c99.m4 =================================================================== RCS file: m4/c99.m4 diff -N m4/c99.m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ m4/c99.m4 14 Apr 2006 20:28:00 -0000 @@ -0,0 +1,44 @@ +# Enable C99 on systems that normally disable it (currently, at least +# IRIX64 6.5). + +# Copyright (C) 2006 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# From Derek Price. + +# gl_USE_C99 +# ------------------------ +# Enable C99 on systems that normally disable it, +# (currently, at least IRIX64 6.5). +AC_DEFUN([gl_USE_C99], [ + AC_BEFORE([$0], [AC_PREPROC_IFELSE]) + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) + AC_BEFORE([$0], [AC_RUN_IFELSE]) + + AC_REQUIRE([AC_PROG_CC]) + + AC_CACHE_CHECK([whether the C compiler requires an option to enable C99], + [gl_cv_cc_needs_c99_option], + [# When compiling on IRIX64 6.5, at least, the following program would + # compile successfully with a warning issued via the #error pragma to + # the effect that <stdint.h> is meaningless in c89 mode. None of the + # objects from <stdint.h> would be defined after inclusion, either. + AC_EGREP_CPP([#error],[#include <stdint.h>], + [gl_cv_cc_needs_c99_option=yes], + [gl_cv_cc_needs_c99_option=no]) + if test $gl_cv_cc_needs_c99_option = yes; then + gl_save_CC=$CC + CC="$CC -c99" + AC_EGREP_CPP([#error],[#include <stdint.h>], + [gl_cv_cc_needs_c99_option=no], + [#gl_cv_cc_needs_c99_option=yes + :]) + CC=$gl_save_CC + fi + ]) + if test $gl_cv_cc_needs_c99_option = yes; then + CC="$CC -c99" + fi +]) Index: m4/gnulib-comp.m4 =================================================================== RCS file: /cvsroot/cvs/ccvs/m4/gnulib-comp.m4,v retrieving revision 1.14 diff -u -p -r1.14 gnulib-comp.m4 --- m4/gnulib-comp.m4 12 Apr 2006 19:51:23 -0000 1.14 +++ m4/gnulib-comp.m4 14 Apr 2006 20:28:00 -0000 @@ -20,6 +20,7 @@ AC_DEFUN([gl_EARLY], [ AC_REQUIRE([AC_PROG_RANLIB]) AC_REQUIRE([AC_GNU_SOURCE]) + AC_REQUIRE([gl_USE_C99]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) ]) @@ -31,6 +32,7 @@ AC_DEFUN([gl_INIT], gl_FUNC_ALLOCA gl_ALLOCSA gl_FUNC_ATEXIT + dnl gl_USE_C99 must be added quite early to configure.ac. gl_CANON_HOST AC_FUNC_CANONICALIZE_FILE_NAME gl_FUNC_CHDIR_LONG @@ -305,6 +307,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/allocsa.m4 m4/atexit.m4 m4/bison.m4 + m4/c99.m4 m4/canon-host.m4 m4/canonicalize.m4 m4/chdir-long.m4
_______________________________________________ Bug-cvs mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/bug-cvs
