Revision: 42427
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42427&view=rev
Author:   brlcad
Date:     2011-01-19 01:20:43 +0000 (Wed, 19 Jan 2011)

Log Message:
-----------
enable a test for -std=c99 since we cannot compile glx/gl.h-using code on Mac 
OS X 10.6 with -pedantic due to // comments in the gl.h header.  use the flag 
in the dirs where we interface with glx (src/mged src/libdm src/libfb)

Modified Paths:
--------------
    brlcad/trunk/configure.ac
    brlcad/trunk/src/libdm/Makefile.am
    brlcad/trunk/src/libfb/Makefile.am
    brlcad/trunk/src/mged/Makefile.am

Modified: brlcad/trunk/configure.ac
===================================================================
--- brlcad/trunk/configure.ac   2011-01-19 00:52:34 UTC (rev 42426)
+++ brlcad/trunk/configure.ac   2011-01-19 01:20:43 UTC (rev 42427)
@@ -1535,10 +1535,12 @@
 
 # make our minimum compliance goal explicit (needs to be tested here
 # so header files and types are tested properly)
-dnl BC_COMPILER_AND_LINKER_RECOGNIZES([-std=c99], [cstd], [no])
-dnl if test "x$bc_cstd_works" = "xyes" ; then
-dnl     CFLAGS="$CFLAGS -std=c99"
-dnl fi
+BC_COMPILER_AND_LINKER_RECOGNIZES([-std=c99], [cstd], [no])
+STD_C99_FLAGS=""
+if test "x$bc_cstd_works" = "xyes" ; then
+   STD_C99_FLAGS="-std=c99"
+fi
+AC_SUBST(STD_C99_FLAGS)
 
 # C89 headers: assert.h, ctype.h, errno.h, float.h, limits.h, locale.h,
 # math.h, setjmp.h, signal.h, stdarg.h, stddef.h, stdio.h, stdlib.h,

Modified: brlcad/trunk/src/libdm/Makefile.am
===================================================================
--- brlcad/trunk/src/libdm/Makefile.am  2011-01-19 00:52:34 UTC (rev 42426)
+++ brlcad/trunk/src/libdm/Makefile.am  2011-01-19 01:20:43 UTC (rev 42427)
@@ -66,6 +66,7 @@
 
 # per-program CPPFLAGS wasn't added until automake 1.7
 libdm_la_CFLAGS = \
+       ${STD_C99_FLAGS} \
        ${STRICT_FLAGS} \
        ${DM_X_CFLAGS} \
        ${DM_TK_CFLAGS} \

Modified: brlcad/trunk/src/libfb/Makefile.am
===================================================================
--- brlcad/trunk/src/libfb/Makefile.am  2011-01-19 00:52:34 UTC (rev 42426)
+++ brlcad/trunk/src/libfb/Makefile.am  2011-01-19 01:20:43 UTC (rev 42427)
@@ -55,7 +55,10 @@
        vers.c
 
 libfb_la_LDFLAGS = -version-info 19:1 -no-undefined
+
+# STD_C99_FLAG is needed due to gl.h on Mac OS X 10.6 having // comments
 libfb_la_CFLAGS = \
+       ${STD_C99_FLAGS} \
        ${STRICT_FLAGS} \
        -DIF_REMOTE \
        -DIF_AB \

Modified: brlcad/trunk/src/mged/Makefile.am
===================================================================
--- brlcad/trunk/src/mged/Makefile.am   2011-01-19 00:52:34 UTC (rev 42426)
+++ brlcad/trunk/src/mged/Makefile.am   2011-01-19 01:20:43 UTC (rev 42427)
@@ -125,6 +125,7 @@
 
 # per-program CPPFLAGS wasn't added until automake 1.7
 mged_CFLAGS = \
+       ${STD_C99_FLAGS} \
        $(OGL_CFLAGS) \
        $(RTGL_CFLAGS) \
        $(WGL_CFLAGS) \


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to