Changeset 640 for trunk


Ignore:
Timestamp:
May 31, 2008, 6:06:33 AM (13 years ago)
Author:
Peter Johansson
Message:

fixes #333

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Makefile.am

    r585 r640  
    3030noinst_HEADERS = Parameter.h
    3131
    32 LDADD = $(STATICFLAG) @top_builddir@/lib/libsvndigest.la
     32LDADD = @top_builddir@/lib/libsvndigest.la $(SVNDIGEST_LIBS)
     33AM_LDFLAGS = $(STATICFLAG) $(SVNDIGEST_LDFLAGS)
    3334
    34 AM_CPPFLAGS = -I@top_srcdir@/lib
     35AM_CPPFLAGS = -I@top_srcdir@/lib $(SVNDIGEST_CPPFLAGS)
     36AM_CXXFLAGS = $(SVNDIGEST_CXXFLAGS)
     37
    3538
    3639# install versioned binary (excluding patch version)
  • trunk/configure.ac

    r618 r640  
    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` $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
     
    252283AC_MSG_NOTICE([   The following flags and libs will be used:])
    253284AC_MSG_NOTICE([   +++++++++++++++++++++++++++++++++++++++++++++++])
    254 AC_MSG_NOTICE([    Compiler:           CXX=\"$CXX\"])
    255 AC_MSG_NOTICE([    Preprocessor flags: CPPFLAGS=\"$CPPFLAGS\"])
    256 AC_MSG_NOTICE([    C++ flags:          CXXFLAGS=\"$CXXFLAGS\"])
    257 AC_MSG_NOTICE([    Linker flags:       LDFLAGS=\"$LDFLAGS\"])
    258 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])
    259290AC_MSG_NOTICE([   +++++++++++++++++++++++++++++++++++++++++++++++])
    260291AC_MSG_NOTICE([])
  • trunk/lib/Makefile.am

    r625 r640  
    2323# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    2424# 02111-1307, USA.
     25
     26AM_CPPFLAGS = $(SVNDIGEST_CPPFLAGS)
     27AM_CXXFLAGS = $(SVNDIGEST_CXXFLAGS)
    2528
    2629noinst_LTLIBRARIES = libsvndigest.la
  • trunk/test/Makefile.am

    r633 r640  
    4545
    4646
    47 LDADD = $(STATICFLAG) @builddir@/libsvndigesttest.la \
    48   @top_builddir@/lib/libsvndigest.la
     47LDADD = @builddir@/libsvndigesttest.la \
     48  @top_builddir@/lib/libsvndigest.la \
     49  $(SVNDIGEST_LIBS)
     50AM_LDFLAGS = $(STATICFLAG) $(SVNDIGEST_LDFLAGS)
    4951
    50 AM_CPPFLAGS = -I@top_srcdir@/lib
     52AM_CPPFLAGS = -I@top_srcdir@/lib $(SVNDIGEST_CPPFLAGS)
     53AM_CXXFLAGS = $(SVNDIGEST_CXXFLAGS)
    5154
    5255libsvndigesttest_la_SOURCES = Suite.cc
Note: See TracChangeset for help on using the changeset viewer.