Ignore:
Timestamp:
Jun 4, 2008, 12:05:22 AM (13 years ago)
Author:
Jari Häkkinen
Message:

Merged trunk changes r608:645 to replacing_gnuplot branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/replacing_gnuplot/configure.ac

    r606 r646  
    7676AC_CHECK_PROG([GNUPLOT],[gnuplot],[ok])
    7777
     78# Save FLAGS
     79SAVE_CPPFLAGS="$CPPFLAGS"
     80SAVE_CXXFLAGS="$CXXFLAGS"
     81SAVE_LDFLAGS="$LDFLAGS"
     82SAVE_LIBS="$LIBS"
     83
    7884# -Wno-long-long is needed to suppress compiler diagnostics regarding
    7985# using extension beyond the C++ standard (usage of non C++ standard
    8086# 'long long' types).
    81 CXXFLAGS="$CXXFLAGS -Wall -pedantic -Wno-long-long"
     87SD_CXXFLAGS="$SD_CXXFLAGS-Wall -pedantic -Wno-long-long"
    8288AC_TYPE_LONG_LONG_INT()
    8389
    8490AC_ARG_ENABLE(debug,
    8591  [AS_HELP_STRING([--enable-debug],[turn on debug options and code])],
    86   [CXXFLAGS="$CXXFLAGS -g -O"],
    87   [CPPFLAGS="$CPPFLAGS -DNDEBUG" CXXFLAGS="$CXXFLAGS -O3"])
     92  [SD_CXXFLAGS="$SD_CXXFLAGS -g -O"],
     93  [SD_CPPFLAGS="-DNDEBUG" SD_CXXFLAGS="$SD_CXXFLAGS -O3"])
    8894
    8995# optionally prepare for building static libraries.
     
    98104    # Keychain on Mac OSX. In consequence the below
    99105    # frameworks are needed for succesful static builds.
    100     LIBS="$LIBS -framework Security"
    101     LIBS="$LIBS -framework CoreFoundation"
    102     LIBS="$LIBS -framework CoreServices"
     106    SD_LIBS="$SD_LIBS -framework Security"
     107    SD_LIBS="$SD_LIBS -framework CoreFoundation"
     108    SD_LIBS="$SD_LIBS -framework CoreServices"
    103109    ;;
    104110  esac
     
    118124# AC_SEARCH_LIBS([apr_allocator_create],[apr-0],,apr_found="no") but
    119125# apr-0 must be prior knowledge.
    120 sinclude(./build_support/find_apr.m4)
     126m4_sinclude(./build_support/find_apr.m4)
    121127APR_FIND_APR(,,1,[1 0])
    122128if test "$apr_found" = "yes" ; then
    123     LDFLAGS="`$apr_config --link-ld` $LDFLAGS"
    124     CPPFLAGS="`$apr_config --includes` $CPPFLAGS"
    125     AC_CHECK_HEADER([apr_allocator.h],,apr_found="no")
     129    SD_LDFLAGS="`$apr_config --link-ld` $SD_LDFLAGS"
     130    SD_CPPFLAGS="`$apr_config --includes --cppflags` $SD_CPPFLAGS"
    126131fi
    127132
     
    130135AC_ARG_WITH(svn,
    131136  [AS_HELP_STRING([--with-svn=DIR],[prefix for svn developer files [[PREFIX]]])],
    132   [ LDFLAGS="-L$withval/lib $LDFLAGS" CPPFLAGS="-I$withval/include $CPPFLAGS"])
     137  [ SD_LDFLAGS="-L$withval/lib $SD_LDFLAGS"
     138    SD_CPPFLAGS="-I$withval/include $SD_CPPFLAGS"])
     139
     140
     141# Use SD_*FLAGS in tests
     142CPPFLAGS="$SD_CPPFLAGS $CPPFLAGS"
     143CXXFLAGS="$SD_CXXFLAGS $CXXFLAGS"
     144LDFLAGS="$SD_LDFLAGS $LDFLAGS"
     145LIBS="$SD_LIBS $LIBS"
     146
     147AC_CHECK_HEADER([apr_allocator.h],,apr_found="no")
    133148AC_CHECK_HEADER([subversion-1/svn_types.h],,svn_found="no")
    134149# The library checks below may match shared libs even when
     
    136151# pose any problems since in a properly installed system the shared
    137152# and static libraries should be the same.
    138 AC_SEARCH_LIBS([svn_cmdline_setup_auth_baton],[svn_subr-1],,svn_found="no")
    139 AC_SEARCH_LIBS([svn_ra_initialize],[svn_ra-1],,svn_found="no")
    140 AC_SEARCH_LIBS([svn_wc_adm_open3],[svn_wc-1],,svn_found="no")
    141 AC_SEARCH_LIBS([svn_diff_file_options_create],[svn_diff-1],,svn_found="no")
    142 AC_SEARCH_LIBS([svn_client_log3],[svn_client-1],,svn_found="no")
    143 
     153AC_SEARCH_LIBS([svn_cmdline_setup_auth_baton],[svn_subr-1],
     154               [SD_LIBS="-lsvn_subr-1 $SD_LIBS"],svn_found="no")
     155AC_SEARCH_LIBS([svn_ra_initialize],[svn_ra-1],
     156               [SD_LIBS="-lsvn_ra-1 $SD_LIBS"],svn_found="no")
     157AC_SEARCH_LIBS([svn_wc_adm_open3],[svn_wc-1],
     158               [SD_LIBS="-lsvn_wc-1 $SD_LIBS"],svn_found="no")
     159AC_SEARCH_LIBS([svn_diff_file_options_create],[svn_diff-1],
     160               [SD_LIBS="-lsvn_diff-1 $SD_LIBS"],svn_found="no")
     161AC_SEARCH_LIBS([svn_client_log3],[svn_client-1],
     162               [SD_LIBS="-lsvn_client-1 $SD_LIBS"],svn_found="no")
     163
     164# Export flags
     165AC_SUBST([SVNDIGEST_CPPFLAGS], $SD_CPPFLAGS)
     166AC_SUBST([SVNDIGEST_CXXFLAGS], $SD_CXXFLAGS)
     167AC_SUBST([SVNDIGEST_LDFLAGS], $SD_LDFLAGS)
     168AC_SUBST([SVNDIGEST_LIBS], $SD_LIBS)
     169
     170# Reset FLAGS
     171CPPFLAGS="$SAVE_CPPFLAGS"
     172CXXFLAGS="$SAVE_CXXFLAGS"
     173LDFLAGS="$SAVE_LDFLAGS"
     174LIBS="$SAVE_LIBS"
    144175
    145176# check if svnversion is installed
     
    147178AC_PATH_PROG(SVNVERSION, svnversion, have_svnversion="no")
    148179
     180# checking if we build in a subversion WC
    149181wc_found="no";
    150182if (test $have_svnversion != "no" &&
     
    155187AC_CHECK_FILE("$srcdir/lib/subversion_info.cc",info_found="yes",info_found="no")
    156188
    157 # Checking that a release (non-dev) has no pre in VERSION
     189# checking that DEV_BUILD is set to false at time of release
    158190# Failure should be captured by distcheck
    159 if (test "$wc_found" = "no" && test "$DEV_BUILD" = "yes") ; then
    160    AC_MSG_ERROR([Incorrect version number: $VERSION
    161                  Version number of an official release should have format
    162                  MAJOR.MINOR or MAJOR.MINOR.PATCH])
    163 fi
     191if (test "$wc_found" = "no" && test "$SVNDIGEST_DEV_BUILD" = "true") ; then
     192  AC_MSG_ERROR([Incorrect version:
     193               [SVNDIGEST_DEV_BUILD] is set to SVNDIGEST_DEV_BUILD.
     194         [SVNDIGEST_DEV_BUILD] should be set to false at time of release.
     195               Please, update version.m4.])
     196fi
     197
    164198
    165199# devel version should have svn WC and SVNVERSION installed
     
    249283AC_MSG_NOTICE([   The following flags and libs will be used:])
    250284AC_MSG_NOTICE([   +++++++++++++++++++++++++++++++++++++++++++++++])
    251 AC_MSG_NOTICE([    Compiler:           CXX=\"$CXX\"])
    252 AC_MSG_NOTICE([    Preprocessor flags: CPPFLAGS=\"$CPPFLAGS\"])
    253 AC_MSG_NOTICE([    C++ flags:          CXXFLAGS=\"$CXXFLAGS\"])
    254 AC_MSG_NOTICE([    Linker flags:       LDFLAGS=\"$LDFLAGS\"])
    255 AC_MSG_NOTICE([    LIBS:               LIBS=\"$LIBS\"])
     285AC_MSG_NOTICE([    Compiler:           $CXX])
     286AC_MSG_NOTICE([    Preprocessor flags: $SD_CPPFLAGS $CPPFLAGS])
     287AC_MSG_NOTICE([    C++ flags:          $SD_CXXFLAGS $CXXFLAGS])
     288AC_MSG_NOTICE([    Linker flags:       $SD_LDFLAGS $LDFLAGS])
     289AC_MSG_NOTICE([    LIBS:               $SD_LIBS $LIBS])
    256290AC_MSG_NOTICE([   +++++++++++++++++++++++++++++++++++++++++++++++])
    257291AC_MSG_NOTICE([])
Note: See TracChangeset for help on using the changeset viewer.