Changeset 694


Ignore:
Timestamp:
Oct 25, 2006, 10:04:31 AM (15 years ago)
Author:
Peter
Message:

refs #118 Added flag to configure '--enable-debug'. If this flag is not used
(default) CXXFLAFS and CPPFLAGS are set in production mode, i.e.
CPPFLAGS="-DHAVE_INLINE=1 -DNDEBUG -DGSL_RANGE_CHECK_OFF"
CXXFLAGS="-Wall -pedantic -O3"
is used. On the other hand if you use configure --enable-debug you will get
CPPFLAGS="-DHAVE_INLINE=1"
CXXFLAGS="-Wall -pedantic -g -O".

NOTE since this is a change of configure.ac you need to run bootstrap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r690 r694  
    6161AC_CHECK_FUNCS([pow sqrt])
    6262
    63 CXXFLAGS="-g -O -Wall -pedantic"
     63CXXFLAGS="-Wall -pedantic"
    6464CPPFLAGS="-DHAVE_INLINE=1"
    65 # Use these flags when compiling a production library
    66 #CXXFLAGS="-O3 -Wall -pedantic"
    67 #CPPFLAGS="-DNDEBUG -DGSL_RANGE_CHECK_OFF -DHAVE_INLINE=1"
     65AC_ARG_ENABLE(debug,
     66  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])])
     67if test "${enable_debug}" = "yes" ; then
     68  CXXFLAGS="$CXXFLAGS -g -O"
     69else
     70  CXXFLAGS="$CXXFLAGS -O3"
     71  CPPFLAGS="$CPPFLAGS -DNDEBUG -DGSL_RANGE_CHECK_OFF"
     72fi
    6873
    6974AC_CHECK_LIB(m,main,[MATH_LIB="-lm" LIBS="-lm $LIBS"])
     
    96101AC_OUTPUT
    97102
     103# Some more messages.
     104AC_MSG_NOTICE([])
     105AC_MSG_NOTICE([ Ready to compile the yat library])
     106AC_MSG_NOTICE([ The following compilers and flags will be used:])
     107AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
     108AC_MSG_NOTICE([  CPPFLAGS=\"$CPPFLAGS\"])
     109AC_MSG_NOTICE([  CXXFLAGS=\"$CXXFLAGS\"])
     110AC_MSG_NOTICE([  LIBS=\"$LIBS\"])
     111AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
     112AC_MSG_NOTICE([])
     113AC_MSG_NOTICE([ Now type 'make ; make check'.])
Note: See TracChangeset for help on using the changeset viewer.