Changeset da83f8 for util/configure.ac


Ignore:
Timestamp:
Apr 24, 2008, 1:52:02 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
bd7b85
Parents:
054af7
Message:

added --enable-optimization, thrown -g -O specifics out of Makefile.am's

--enable-optimization is added to each configure.ac and is linked with --enable-debug (no debug and optimization at the same time, debug is normally off and -O2 on), implemented via C(XX)FLAGS
Henceforth, -g, -O and -cc=... specifics are thrown out of the Makefile.am's, so that the optimiziation and debugging is streamlined throughout the whole package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified util/configure.ac

    r054af7 rda83f8  
    2626AC_TYPE_SIZE_T
    2727
     28# debugging info
     29AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Output debugging information, argument is yes or debugging level (default is no).]),
     30              [enable_debug=$enableval], [enable_debug=no])
     31if ! test x"$enable_debug" = xno; then
     32        if test x"${enable_debug}" = xyes; then
     33                CFLAGS="-g3"
     34                CXXFLAGS="-g3"
     35        else
     36                CFLAGS="-g${enable_debug}"
     37                CXXFLAGS="-g${enable_debug}"
     38        fi
     39  AC_DEFINE(HAVE_DEBUG,1, ["Output debugging info"])
     40  AC_SUBST(HAVE_DEBUG)
     41fi
     42
     43# optimization level
     44AC_ARG_ENABLE([optimization],AS_HELP_STRING([--enable-optimization],[Optimization level of compiler. Argument is yes or debugging level. (default is 2)]),
     45              [enable_optimization=$enableval], [enable_optimization=yes])
     46if test ! x"$enable_optimization" = xno; then
     47        if test x"$enable_debug" = xno; then
     48                if test x"${enable_optimization}" = xyes; then
     49                        CFLAGS="-O2"
     50                        CXXFLAGS="-O2"
     51                else
     52                        CFLAGS="-O${enable_optimization}"
     53                        CXXFLAGS="-O${enable_optimization}"
     54                fi
     55        else
     56                AC_MSG_WARN(["Already specified --enable-debug!"])
     57        fi
     58fi
     59
    2860# Checks for library functions.
    2961AC_FUNC_MALLOC
Note: See TracChangeset for help on using the changeset viewer.