$NetBSD: patch-al,v 1.3 2007/12/28 01:00:11 gdt Exp $

Fix the test and fix the output for the braces test needed on
Solaris.

(Note that previous versions of this patch adjusted the AC_SUBST call,
and that change seems incorrect.)

--- configure.in.orig	2007-05-09 16:22:03.000000000 -0400
+++ configure.in
@@ -635,7 +635,7 @@ AC_CHECK_HEADERS([assert.h crt_externs.h
 #   isblank - available as a GNU extension or in C99
 #   _NSGetEnviron - Darwin specific
 #
-AC_CHECK_FUNCS([DINFINITY DQNAN chsize clog10 ctermid fesetround ftime ftruncate fchown getcwd geteuid gettimeofday gmtime_r ioctl lstat mkdir mknod nice pipe _pipe readdir_r readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt stat64 strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron])
+AC_CHECK_FUNCS([DINFINITY DQNAN chsize clog10 clog cexp ctermid fesetround ftime ftruncate fchown getcwd geteuid gettimeofday gmtime_r ioctl lstat mkdir mknod nice pipe _pipe readdir_r readlink rename rmdir select setegid seteuid setlocale setpgid setsid sigaction siginterrupt stat64 strftime strptime symlink sync sysconf tcgetpgrp tcsetpgrp times uname waitpid strdup system usleep atexit on_exit chown link fcntl ttyname getpwent getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron])
 
 # Reasons for testing:
 #   netdb.h - not in mingw
@@ -1120,6 +1120,15 @@ case "$with_threads" in
     # glibc (2.3.6 at least) works both with or without braces, so the
     # test checks whether it works without.
     #
+    # If we're using GCC, ask for aggressive warnings.  Otherwise the test
+    # below for braces may pass but then fail during compilation due to 
+    # stricter checks at compile time
+    case "$GCC" in
+        yes )
+            CFLAGS="${CFLAGS} -Wall -Werror"
+            ;;
+    esac
+
     AC_CACHE_CHECK([whether PTHREAD_ONCE_INIT needs braces],
       guile_cv_need_braces_on_pthread_once_init,
       [AC_TRY_COMPILE([#include <pthread.h>],
