Changeset 3715


Ignore:
Timestamp:
Nov 10, 2017, 4:00:22 AM (5 years ago)
Author:
Peter
Message:

Introduce variables 'YAT_CONFIG_CPPFLAGS', 'YAT_CONFIG_CXXFLAGS' and
'YAT_CONFIG_LDFLAGS' which are propagated to yat-config. These can be
used to tailor 'yat-config' return values as wanted without affecting
the actual build of the library.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build_support/Makefile.am

    r3550 r3715  
    5050  -e 's|@YAT_STATIC_LIBS[@]|$(YAT_STATIC_LIBS)|g' \
    5151  -e 's|@LIBM[@]|$(LIBM)|g' \
     52  -e 's|@YAT_CONFIG_CPPFLAGS[@]|$(YAT_CONFIG_CPPFLAGS)|g' \
     53  -e 's|@YAT_CONFIG_CXXFLAGS[@]|$(YAT_CONFIG_CXXFLAGS)|g' \
     54  -e 's|@YAT_CONFIG_LDFLAGS[@]|$(YAT_CONFIG_LDFLAGS)|g' \
    5255  -e 's|@PACKAGE[@]|$(PACKAGE)|g' \
    5356  -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
  • trunk/build_support/yat-config.in

    r3505 r3715  
    4242YAT_STATIC_LIBS="@YAT_STATIC_LIBS@"
    4343LIBM="@LIBM@"
    44 
    45 # user is always right
    46 test -z "$YAT_CBLAS_LIB" && YAT_CBLAS_LIB="@YAT_CBLAS_LIB@"
     44# let user override these four variables
     45: ${YAT_CONFIG_CPPFLAGS="@YAT_CONFIG_CPPFLAGS@"}
     46: ${YAT_CONFIG_CXXFLAGS="@YAT_CONFIG_CXXFLAGS@"}
     47: ${YAT_CONFIG_LDFLAGS="@YAT_CONFIG_LDFLAGS@"}
     48: ${YAT_CBLAS_LIB="@YAT_CBLAS_LIB@"}
    4749
    4850LA_FILE="$libdir/libyat.la"
     
    141143       flags="$flags -I$abs_top_srcdir"
    142144    fi
    143     flags="$flags $YAT_CPPFLAGS $CPPFLAGS"
     145    flags="$flags $YAT_CPPFLAGS $CPPFLAGS $YAT_CONFIG_CPPFLAGS"
    144146    ;;
    145147    --cxxflags)
    146     flags="$flags $YAT_CXXFLAGS $CXXFLAGS"
     148    flags="$flags $YAT_CXXFLAGS $CXXFLAGS $YAT_CONFIG_CXXFLAGS"
    147149    ;;
    148150    --libs)
     
    161163      flags="$flags -L$libdir"
    162164    fi
    163     flags="$flags $YAT_LDFLAGS $LDFLAGS"
     165    flags="$flags $YAT_LDFLAGS $LDFLAGS $YAT_CONFIG_LDFLAGS"
    164166    ;;
    165167    --link-libtool)
  • trunk/configure.ac

    r3690 r3715  
    619619AC_SUBST([YAT_PC_REQUIRES_PRIVATE])
    620620
     621# propagate some variables to 'yat-config'
     622AC_ARG_VAR([YAT_CONFIG_CPPFLAGS],
     623           [Similar to CPPFLAGS but value is only propagated to yat-config])
     624AC_ARG_VAR([YAT_CONFIG_CXXFLAGS],
     625           [Similar to CXXFLAGS but value is only propagated to yat-config])
     626AC_ARG_VAR([YAT_CONFIG_LDFLAGS],
     627           [Similar to LDFLAGS but value is only propagated to yat-config])
     628AC_SUBST([YAT_CONFIG_CPPFLAGS])
     629AC_SUBST([YAT_CONFIG_CXXFLAGS])
     630AC_SUBST([YAT_CONFIG_LDFLAGS])
     631
    621632AC_SUBST(YAT_LIBS)
    622633AC_SUBST(YAT_CBLAS_LIB)
Note: See TracChangeset for help on using the changeset viewer.