Changeset 841


Ignore:
Timestamp:
Nov 30, 2008, 12:46:12 AM (13 years ago)
Author:
Peter Johansson
Message:

avoid setting CPPFLAGS and friends in configure.ac
and updating Makefile.ams accordingly

Location:
plugins/base1/se.lu.thep.wenni/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • plugins/base1/se.lu.thep.wenni/trunk/base/base1/BaseFileConverter/Makefile.am

    r825 r841  
    44
    55# Copyright (C) 2005, 2006 Jari Häkkinen
    6 # Copyright (C) 2007 Peter Johansson
     6# Copyright (C) 2007 2008 Peter Johansson
    77#
    88# This file is part of WeNNI,
     
    2424bin_PROGRAMS = BaseFileConverter
    2525
    26 AM_CPPFLAGS = $(BASECPPFLAGS) -I@top_srcdir@/lib
     26AM_CPPFLAGS += $(BASECPPFLAGS)
    2727
    28 LDADD = $(BASELDFLAGS) -L@top_builddir@/$(CPP_TOOLS_LIBPATH) -lc++_tools
     28AM_LDFLAGS = $(BASELDFLAGS)
     29LDADD =  $(top_builddir)/$(CPP_TOOLS_LIBPATH)/libc++_tool.la -lbase
    2930
    3031BaseFileConverter_SOURCES = BaseFileConverter.cc Clone.cc Data.cc Parameter.cc
  • plugins/base1/se.lu.thep.wenni/trunk/bin/NNIFileConverter/Makefile.am

    r825 r841  
    44
    55# Copyright (C) 2005, 2006 Jari Häkkinen
    6 # Copyright (C) 2007 Peter Johansson
     6# Copyright (C) 2007 2008 Peter Johansson
    77#
    88# This file is part of WeNNI,
     
    2424bin_PROGRAMS = NNIFileConverter
    2525
    26 AM_CPPFLAGS = -I@top_srcdir@/lib
     26AM_CPPFLAGS += $(GSL_CPPFLAGS) -I$(top_srcdir)/lib
    2727
    28 LDADD = -L@top_builddir@/$(CPP_TOOLS_LIBPATH) -lc++_tools
     28LDADD = $(top_builddir)/$(CPP_TOOLS_LIBPATH)/libc++_tools.la
    2929
    3030NNIFileConverter_SOURCES = NNIFileConverter.cc Parameter.cc
  • plugins/base1/se.lu.thep.wenni/trunk/bin/nni/Makefile.am

    r825 r841  
    44
    55# Copyright (C) 2005, 2006 Jari Häkkinen
    6 # Copyright (C) 2007 Peter Johansson
     6# Copyright (C) 2007 2008 Peter Johansson
    77#
    88# This file is part of WeNNI,
     
    2424bin_PROGRAMS = nni
    2525
    26 AM_CPPFLAGS = -I@top_srcdir@/lib
    27 
    28 LDADD = -L@top_builddir@/$(CPP_TOOLS_LIBPATH) -lc++_tools
     26LDADD = $(top_builddir)/$(CPP_TOOLS_LIBPATH)/libc++_tools.la
    2927
    3028nni_SOURCES = nni.cc Parameter.cc
  • plugins/base1/se.lu.thep.wenni/trunk/configure.ac

    r840 r841  
    4141# Set default programming language
    4242AC_LANG(C++)
     43
     44# Let user overide default CXXFLAGS
     45if test "${CXXFLAGS+set}" != set; then
     46  CXXFLAGS=""  # Setting CXXFLAGS here to prevent expansion in AC_PROG_CXX
     47fi
    4348
    4449# Checks for programs.
     
    5055AC_PROG_SED
    5156
    52 CXXFLAGS="-Wall -pedantic"
    53 CPPFLAGS="-DHAVE_INLINE=1"
     57AM_CXXFLAGS="-Wall -pedantic"
     58AM_CPPFLAGS="-DHAVE_INLINE=1"
    5459AC_ARG_ENABLE(debug,
    5560              [ AS_HELP_STRING([--enable-debug],
    5661                               [turn on debug options and code]) ],
    57               [ CXXFLAGS="$CXXFLAGS -g -O" ],
    58               [ CXXFLAGS="$CXXFLAGS -O3"
    59                 CPPFLAGS="$CPPFLAGS -DNDEBUG -DGSL_RANGE_CHECK_OFF" ])
     62              [AM_CXXFLAGS="$AM_CXXFLAGS -g -O"],
     63              [AM_CXXFLAGS="$AM_CXXFLAGS -O3"
     64               AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG -DGSL_RANGE_CHECK_OFF"])
    6065
    6166AC_ARG_ENABLE(state,
     
    95100  OLD_CPPFLAGS=$CPPFLAGS;
    96101  OLD_LDFLAGS=$LDFLAGS;
    97   LDFLAGS="-L$BASEDIR/lib"
    98   AC_CHECK_LIB([base], [base_finite], [BASELDFLAGS="-L$BASEDIR/lib -lbase"],
     102  LDFLAGS="$LDFLAGS -L$BASEDIR/lib"
     103  AC_CHECK_LIB([base], [base_finite], [BASELDFLAGS="-L$BASEDIR/lib"],
    99104               [AC_MSG_FAILURE([cannot find base library])])
    100105  CPPFLAGS="-I$BASEDIR/include/cxx $CPPFLAGS"
     
    120125fi
    121126
    122 AC_ARG_WITH(gsl,[AS_HELP_STRING([--with-gsl=DIR], [prefix for gsl files])],
    123             [CPPFLAGS="-I$withval/include $CPPFLAGS"
    124              LDFLAGS="-L$withval/lib $LDFLAGS"], [])
    125 
    126127AC_SEARCH_LIBS([sqrt], [m],, AC_MSG_FAILURE([cannot find math library]))
    127128AC_SEARCH_LIBS([ATL_ctrsv], [atlas],,
    128129               AC_SEARCH_LIBS(cblas_sdsdot, gslcblas,,
    129130                        AC_MSG_FAILURE([cannot find cblas library])))
     131
     132save_LDFLAGS="$LDFLAGS"
     133AC_ARG_WITH(gsl,[AS_HELP_STRING([--with-gsl=DIR], [prefix for gsl files])],
     134            [GSL_CPPFLAGS="-I$withval/include"; GSL_LDFLAGS="-L$withval/lib"])
     135LDFLAGS="$LDFLAGS $GSL_LDFLAGS"
    130136AC_SEARCH_LIBS([gsl_vector_alloc], [gsl],,
    131137               AC_MSG_FAILURE([cannot find library GSL]))
     138LDFLAGS="$save_LDFLAGS"
     139
     140AC_SUBST(GSL_LDFLAGS)
     141AM_CPPFLAGS="-I\$(top_srcdir)/lib $GSL_CPPFLAGS $AM_CPPFLAGS"
     142AC_SUBST(AM_CPPFLAGS)
     143AC_SUBST(AM_CXXFLAGS)
    132144
    133145CPP_TOOLS_LIBPATH="lib/c++_tools"
  • plugins/base1/se.lu.thep.wenni/trunk/lib/c++_tools/Makefile.am

    r825 r841  
    2222# along with WeNNI. If not, see <http://www.gnu.org/licenses/>.
    2323
    24 AM_CPPFLAGS = -I@top_srcdir@/lib
    25 
    2624SUBDIRS = gslapi utility
    2725
  • plugins/base1/se.lu.thep.wenni/trunk/lib/c++_tools/gslapi/Makefile.am

    r824 r841  
    2828
    2929libgslapi_la_SOURCES = matrix.cc vector.cc
    30 
    31 AM_CPPFLAGS = -I@top_srcdir@/lib
  • plugins/base1/se.lu.thep.wenni/trunk/lib/c++_tools/utility/Makefile.am

    r824 r841  
    3030libutility_la_SOURCES = \
    3131  FileIO.cc kNNI.cc NNI.cc stl_utility.cc utility.cc WeNNI.cc
    32 
    33 AM_CPPFLAGS = -I@top_srcdir@/lib
Note: See TracChangeset for help on using the changeset viewer.