Changeset 3111


Ignore:
Timestamp:
Nov 10, 2013, 2:22:53 AM (8 years ago)
Author:
Peter
Message:

refs #737

configure.ac: Define new variables YAT_LIBS, YAT_STATIC_LIBS, yat_libyat_la_LIBADD, YAT_PRIMARY_LIBS, and YAT_PC_LIBS (see code for definitions).

build_support/yat.pc.in: reflect new variables
build_support/yat-config.in: reflect new variables
build_support/gen_yat_pc.sh.in: reflect new variables
build_support/Makefile.am: reflect new variables
yat/Makefile.am: use AC_SUBSTed yat_libyat_la_LIBADD
test/static_test.sh: avoid redeclaring variable in generated Makefile.am

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/build_support/Makefile.am

    r3075 r3111  
    4646  -e 's|@YAT_CXXFLAGS[@]|$(YAT_CXXFLAGS)|g' \
    4747  -e 's|@YAT_LDFLAGS[@]|$(YAT_LDFLAGS)|g' \
     48  -e 's|@YAT_PC_LIBS[@]|$(YAT_PC_LIBS)|g' \
    4849  -e 's|@YAT_PRIMARY_LIBS[@]|$(YAT_PRIMARY_LIBS)|g' \
    49   -e 's|@BAM_LIBS[@]|$(BAM_LIBS)|g' \
     50  -e 's|@YAT_STATIC_LIBS[@]|$(YAT_STATIC_LIBS)|g' \
    5051  -e 's|@LIBM[@]|$(LIBM)|g' \
    5152  -e 's|@PACKAGE[@]|$(PACKAGE)|g' \
  • trunk/build_support/gen_yat_pc.sh.in

    r2960 r3111  
    8484-e 's|@LDFLAGS[@]|@LDFLAGS@|g' \
    8585-e 's|@YAT_LDFLAGS[@]|@YAT_LDFLAGS@|g' \
    86 -e 's|@BOOST_THREAD_LIB[@]|@BOOST_THREAD_LIB@|g' \
    87 -e 's|@BOOST_SYSTEM_LIB[@]|@BOOST_SYSTEM_LIB@|g' \
    88 -e 's|@BAM_LIBS[@]|@BAM_LIBS@|g' \
     86-e 's|@YAT_PC_LIBS[@]|@YAT_PC_LIBS@|g' \
    8987-e 's|@LIBS[@]|@LIBS@|g' \
    9088< $input
  • trunk/build_support/yat-config.in

    r2960 r3111  
    4040YAT_LDFLAGS="@YAT_LDFLAGS@"
    4141YAT_PRIMARY_LIBS="@YAT_PRIMARY_LIBS@"
    42 BAM_LIBS="@BAM_LIBS@"
     42YAT_STATIC_LIBS="@YAT_STATIC_LIBS@"
    4343LIBM="@LIBM@"
    4444
    45 if test "x$YAT_CBLAS_LIB" = "x"; then
    46   YAT_CBLAS_LIB="@YAT_CBLAS_LIB@"
    47 fi
     45# user is always right
     46test -z "$YAT_CBLAS_LIB" && YAT_CBLAS_LIB="@YAT_CBLAS_LIB@"
    4847
    4948LA_FILE="$libdir/libyat.la"
     
    143142    ;;
    144143    --libs)
    145     flags="$flags -lyat $BAM_LIBS $YAT_PRIMARY_LIBS $YAT_CBLAS_LIB $LIBM $LIBS"
     144    flags="$flags -lyat $YAT_STATIC_LIBS $YAT_PRIMARY_LIBS $YAT_CBLAS_LIB $LIBM $LIBS"
    146145    ;;
    147146    --libs-without-cblas)
    148     flags="$flags -lyat $BAM_LIBS $YAT_PRIMARY_LIBS $LIBM $LIBS"
     147    flags="$flags -lyat $YAT_STATIC_LIBS $YAT_PRIMARY_LIBS $LIBM $LIBS"
    149148    ;;
    150149    --ldflags)
     
    160159    ;;
    161160    --link-libtool)
    162     flags="$flags $LA_FILE $BAM_LIBS $YAT_CBLAS_LIB"
     161    flags="$flags $LA_FILE $YAT_STATIC_LIBS $YAT_CBLAS_LIB"
    163162    ;;
    164163    --yat-la-file)
  • trunk/build_support/yat.pc.in

    r2960 r3111  
    2929Version: @VERSION@
    3030Requires: gsl >= @gsl_version@
    31 Libs: -L${libdir} -lyat @BAM_LIBS@ @YAT_LDFLAGS@ @LDFLAGS@ @LIBS@
    32 Libs.private: -lz @BOOST_THREAD_LIB@ @BOOST_SYSTEM_LIB@
     31Libs: -L${libdir} -lyat @YAT_PC_LIBS@ @YAT_LDFLAGS@ @LDFLAGS@ @LIBS@
     32Libs.private:
    3333Cflags: @YAT_CPPFLAGS@ @YAT_CXXFLAGS@ @CPPFLAGS@ @CXXFLAGS@ -I${includedir}
  • trunk/configure.ac

    r3110 r3111  
    473473APR_RESTORE_THE_ENVIRONMENT(LIBS, YAT_)
    474474
    475 # YAT_LIBS minus cblas and math libraries
    476 YAT_PRIMARY_LIBS=$YAT_LIBS
     475# Set some variables useful when linking
     476AC_SUBST([YAT_STATIC_LIBS])
     477
     478# libs used in libyat.la
     479yat_libyat_la_LIBADD="$YAT_LIBS"
     480# We avoid linking in cblas in libyat.la, to let users choose
     481# favourite cblas library at link time.
     482YAT_VAR_REMOVE([yat_libyat_la_LIBADD], [$YAT_CBLAS_LIB])
     483# we avoid linking in YAT_STATIC_LIBS as they have been detected to
     484# not be suitable libtool archive.
     485YAT_VAR_REMOVE([yat_libyat_la_LIBADD], [$YAT_STATIC_LIBS])
     486AC_SUBST([yat_libyat_la_LIBADD])
     487
     488# Primary LIBS are same as linked into libyat.la excluding LIBM
     489YAT_PRIMARY_LIBS=$yat_libyat_la_LIBADD
    477490YAT_VAR_REMOVE([YAT_PRIMARY_LIBS], [$LIBM])
    478 YAT_VAR_REMOVE([YAT_PRIMARY_LIBS], [$YAT_CBLAS_LIB])
    479 # workaround for ticket #736
    480 YAT_VAR_REMOVE([YAT_PRIMARY_LIBS], [$BAM_LIBS])
    481 AC_SUBST(BAM_LIBS)
    482491AC_SUBST(YAT_PRIMARY_LIBS)
     492
     493# Assign LIBS variables for yat.pc
     494YAT_PC_LIBS=$YAT_LIBS
     495# Dependency to GSL is noted via 'Requires' field
     496YAT_VAR_REMOVE([YAT_PRIMARY_LIBS], [-lgsl $YAT_CBLAS_LIB $LIBM])
     497AC_SUBST([YAT_PC_LIBS])
     498
    483499AC_SUBST(YAT_LIBS)
    484500AC_SUBST(YAT_CBLAS_LIB)
  • trunk/test/static_test.sh

    r3036 r3111  
    4040EOF
    4141
    42 echo "AM_LDFLAGS = -all-static" >> Makefile.am
     42sed -i 's,^AM_LDFLAGS =,AM_LDFLAGS = -all-static,' Makefile.am
     43grep '^AM_LDFLAGS' Makefile.am || exit_fail
    4344
    4445bootstrap
  • trunk/yat/Makefile.am

    r2932 r3111  
    2727yat_libyat_la_LDFLAGS = -version-info $(YAT_LT_VERSION) $(AM_LDFLAGS)
    2828
    29 yat_libyat_la_LIBADD = \
    30   $(YAT_PRIMARY_LIBS) $(LIBM)
    31 
    3229noinst_LTLIBRARIES =
    3330nobase_include_HEADERS =
Note: See TracChangeset for help on using the changeset viewer.