Changeset 2395


Ignore:
Timestamp:
Feb 11, 2013, 4:27:55 PM (6 years ago)
Author:
sam
Message:

build: better check for compiler flags; we no longer try to use
flags that autoconf hasn’t checked first.

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2388 r2395  
    140140AM_CONDITIONAL(USE_DOT, test "${DOT}" != "no")
    141141
    142 dnl No exceptions
    143 AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions -fno-rtti"
    144 dnl Optimizations
     142
     143dnl  No exceptions
     144LOL_TRY_CXXFLAGS(-fno-exceptions, [AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions"])
     145LOL_TRY_CXXFLAGS(-fno-rtti, [AM_CXXFLAGS="${AM_CXXFLAGS} -fno-rtti"])
     146
     147dnl  Optimizations
    145148AM_CXXFLAGS="${AM_CXXFLAGS} ${REL} ${OPT}"
    146 dnl Code qui fait des warnings == code de porc == deux baffes dans ta gueule
    147 AM_CPPFLAGS="${AM_CPPFLAGS} -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare"
     149
     150dnl  Code qui fait des warnings == code de porc == deux baffes dans ta gueule
     151LOL_TRY_CXXFLAGS(-Wall, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wall"])
     152LOL_TRY_CXXFLAGS(-Wextra, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wextra"])
     153LOL_TRY_CXXFLAGS(-Wpointer-arith, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wpointer-arith"])
     154LOL_TRY_CXXFLAGS(-Wcast-align, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wcast-align"])
     155LOL_TRY_CXXFLAGS(-Wcast-qual, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wcast-qual"])
     156LOL_TRY_CXXFLAGS(-Wshadow, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wshadow"])
     157LOL_TRY_CXXFLAGS(-Wsign-compare, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wsign-compare"])
     158
     159dnl  Add these even though they're implicitly set, so that we can safely
     160dnl  remove them from within a Makefile.
     161LOL_TRY_CXXFLAGS(-Wno-maybe-uninitialized, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wno-maybe-uninitialized"])
     162LOL_TRY_CXXFLAGS(-Wno-narrowing, [AM_CPPFLAGS="${AM_CPPFLAGS} -Wno-narrowing"])
     163
    148164
    149165AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
  • trunk/src/bullet/Makefile.am

    r2391 r2395  
    44noinst_LIBRARIES = liblolbullet.a
    55
     6# Only remove flags that were actually set, because we don't know
     7# what the compiler actually accepts.
     8disable_cflags = $(filter $(AM_CPPFLAGS:-W%=-Wno-%), \
     9    -Wno-shadow -Wno-unused -Wno-cast-qual -Wno-strict-aliasing \
     10    -Wno-reorder -Wno-maybe-uninitialized, -Wno-narrowing \
     11    -Wno-parentheses)
     12
    613liblolbullet_a_SOURCES = $(bullet_sources)
    7 liblolbullet_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir) \
    8     -Wno-extra -Wno-shadow -Wno-unused -Wno-cast-qual -Wno-strict-aliasing \
    9     -Wno-parentheses -Wno-reorder
     14liblolbullet_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir) $(disable_cflags)
    1015
    1116bullet_sources =
Note: See TracChangeset for help on using the changeset viewer.