Changeset 1503 for trunk/configure.ac


Ignore:
Timestamp:
Sep 16, 2008, 5:43:57 PM (13 years ago)
Author:
Peter
Message:

checking that compiler and link flags are supported by compiler and linker, respectively

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r1502 r1503  
    127127fi
    128128if test ${atlas_found} = "yes"; then
    129   CXXFLAGS="$CXXFLAGS -m64" LDFLAGS="$LDFLAGS -m64"
     129  YAT_CXX_ADD_FLAG([CXXFLAGS], [-m64])
     130  YAT_LD_ADD_FLAG([LDFLAGS], [-m64])
    130131  gsl_cblas_lib=-latlas
    131132fi
     
    143144   for i in $GSL_LIBS; do
    144145     if test ${i:0:2} = "-L"; then
    145        LDFLAGS="$LDFLAGS $i"
     146       YAT_LD_ADD_FLAG([LDFLAGS], [$i])
    146147     fi
    147148   done
     
    153154AX_BOOST_BASE("$boost_version")
    154155boost_version_check=$succeeded;
    155 CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
     156YAT_CPP_ADD_FLAG([CPPFLAGS], [$BOOST_CPPFLAGS])
    156157
    157158# Checks for library functions.
     
    168169# i.e., they are not needed for a user of yat and are not propagated
    169170# to yat-config or yat.m4.
    170 AM_CXXFLAGS="$AM_CXXFLAGS -Wall -pedantic"
    171 CPPFLAGS="$CPPFLAGS -DHAVE_INLINE=1"
     171YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-Wall])
     172YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-pedantic])
     173YAT_CPP_ADD_FLAG([CPPFLAGS], [-DHAVE_INLINE=1])
    172174AC_ARG_ENABLE(debug,
    173175  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])])
    174176if test "${enable_debug}" = "yes" ; then
    175   AM_CXXFLAGS="$AM_CXXFLAGS -g -O"
    176   AM_CPPFLAGS="$AM_CPPFLAGS -DYAT_DEBUG=1"
     177  YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DYAT_DEBUG=1])
     178  YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-g])
     179  YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-O])
    177180else
    178   AM_CXXFLAGS="$AM_CXXFLAGS -O3"
    179   CPPFLAGS="$CPPFLAGS -DGSL_RANGE_CHECK_OFF"
    180   AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
     181  YAT_CPP_ADD_FLAG([CPPFLAGS], [-DGSL_RANGE_CHECK_OFF])
     182  YAT_CPP_ADD_FLAG([AM_CPPFLAGS], [-DNDEBUG])
     183  YAT_CXX_ADD_FLAG([AM_CXXFLAGS], [-O3])
    181184fi
    182185
Note: See TracChangeset for help on using the changeset viewer.