Changeset 1096


Ignore:
Timestamp:
05/15/06 13:24:29 (8 years ago)
Author:
lafisk
Message:

Don't apply optimization default if compile flags were already defined
either with environment variables or on the configure command line.

( Links to Acro-related mail archives at  http://software.sandia.gov/Acro/ )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utilib/trunk/config/acro_compiler_flags.m4

    r1095 r1096  
    2121dnl 
    2222dnl Flags specified on configure command line with --with-*flags= 
     23dnl override environment variable settings 
    2324dnl 
    2425if test -n "${USERDEF_CPPFLAGS}" ; then 
     
    3839dnl Extra configure command line options --with-debugging, --with-optimization 
    3940dnl 
    40 dnl Only apply optimization default if debugging is turned off. 
    41 dnl 
     41 
    4242if test "X${WITH_DEBUGGING}" != "Xnotset" ; then 
    4343  FFLAGS="${WITH_DEBUGGING} ${FFLAGS}" 
    4444  CFLAGS="${WITH_DEBUGGING} ${CFLAGS}" 
    4545  CXXFLAGS="${WITH_DEBUGGING} ${CXXFLAGS}" 
    46   ac_temp_debugging=${WITH_DEBUGGING} 
    47 else 
    48   FFLAGS="${debugging_default} ${FFLAGS}" 
    49   CFLAGS="${debugging_default} ${CFLAGS}" 
    50   CXXFLAGS="${debugging_default} ${CXXFLAGS}" 
    51   ac_temp_debugging=${debugging_default} 
    5246fi 
    5347 
     
    5650  CFLAGS="${WITH_OPT} ${CFLAGS}" 
    5751  CXXFLAGS="${WITH_OPT} ${CXXFLAGS}" 
    58 else 
    59   if test "X${ac_temp_debugging}" = "X"; then 
    60     FFLAGS="${optimization_default} ${FFLAGS}" 
    61     CFLAGS="${optimization_default} ${CFLAGS}" 
    62     CXXFLAGS="${optimization_default} ${CXXFLAGS}" 
    63   fi 
    6452fi 
     53 
    6554 
    6655dnl 
    6756dnl Special flags: apply only if they did not specify --with-*flags= 
    6857dnl 
    69 CPPFLAGS="${CPPFLAGS} ${SPECIAL_CPPFLAGS}" 
    70 CFLAGS="${CFLAGS} ${SPECIAL_CFLAGS}" 
    71 CXXFLAGS="${CXXFLAGS} ${SPECIAL_CXXFLAGS}" 
    72 LDFLAGS="${LDFLAGS} ${SPECIAL_LDFLAGS}" 
     58if test -z "${USERDEF_CPPFLAGS}" ; then 
     59  CPPFLAGS="${CPPFLAGS} ${SPECIAL_CPPFLAGS}" 
     60fi 
     61if test -z "${USERDEF_CFLAGS}" ; then 
     62  CFLAGS="${CFLAGS} ${SPECIAL_CFLAGS}" 
     63fi 
     64if test -z "${USERDEF_CXXFLAGS}" ; then 
     65  CXXFLAGS="${CXXFLAGS} ${SPECIAL_CXXFLAGS}" 
     66fi 
     67 
     68dnl 
     69dnl Default optimization level - apply if they didn't specify any flags 
     70dnl 
     71 
     72if test -z ${FFLAGS} ; then 
     73  FFLAGS=${optimization_default} 
     74fi 
     75if test -z ${CFLAGS} ; then 
     76  CFLAGS=${optimization_default} 
     77fi 
     78if test -z ${CXXFLAGS} ; then 
     79  CXXFLAGS=${optimization_default} 
     80fi 
    7381 
    7482dnl 
Note: See TracChangeset for help on using the changeset viewer.