#! @SHELL@ # $Id: yat-config.in 1505 2008-09-16 17:03:27Z peter $ # Generated from yat-config.in by make # Copyright (C) 2008 Peter Johansson # # This file is part of the yat library, http://dev.thep.lu.se/yat # # The yat library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # The yat library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with yat. If not, see . prefix="@prefix@" exec_prefix="@exec_prefix@" bindir="@bindir@" libdir="@libdir@" includedir="@includedir@" CXX="@CXX@" CXXCPP="@CXXCPP@" CPPFLAGS="@CPPFLAGS@" CXXFLAGS="@CXXFLAGS@" LDFLAGS="@LDFLAGS@" LIBS="@LIBS@" EXTRA_CPPFLAGS="@EXTRA_CPPFLAGS@" EXTRA_CXXFLAGS="@EXTRA_CXXFLAGS@" EXTRA_LDFLAGS="@EXTRA_LDFLAGS@" LA_FILE="$libdir/lib@YAT_LIBNAME@.la" usage() { cat <. EOF exit $1 } if test $# -eq 0; then usage exit 1 fi flags="" while test $# -gt 0; do case "$1" in --prefix) @ECHO@ $prefix exit 0 ;; --bindir) @ECHO@ $bindir exit 0 ;; --includedir) @ECHO@ $includedir exit 0 ;; --libdir) @ECHO@ $libdir exit 0 ;; --cxx) @ECHO@ $CXX exit 0 ;; --cxxcpp) @ECHO@ $CXXCPP exit 0 ;; --cppflags) flags="$flags -I$includedir $EXTRA_CPPFLAGS $CPPFLAGS" ;; --cxxflags) flags="$flags $EXTRA_CXXFLAGS $CXXFLAGS" ;; --libs) flags="$flags -l@YAT_LIBNAME@ $LIBS" ;; --ldflags) flags="$flags -L$libdir $EXTRA_LDFLAGS $LDFLAGS" ;; --link-libtool) flags="$flags $LA_FILE" ;; --atleast-version=*) optarg=`@ECHO@ "$1" | sed 's/--atleast-version=//'` min_major=`@ECHO@ "$optarg" | sed 's/\([0-9]*\).*/\1/'` if test "$optarg" = "$min_major"; then min_minor="0"; else min_minor=`@ECHO@ "$optarg" | sed 's/[0-9]*.\([0-9]*\).*/\1/'` fi if test "$optarg" = "$min_major.$min_minor"; then min_patch="0"; else min_patch=`@ECHO@ "$optarg" | sed 's/[0-9]*.[0-9]*.\([0-9]*\).*/\1/'` fi if test "$optarg" = "$min_patch"; then echo "yat-config: \`$optarg' is not a valid VERSION" exit 255 fi if !(test -n "$min_major" && test -n "$min_minor" \ && test -n "$min_patch"); then echo "yat-config: \`$optarg' is not a valid VERSION" exit 255 fi if ( test $min_major -gt @YAT_MAJOR_VERSION@ || \ ( test $min_major -eq @YAT_MAJOR_VERSION@ && \ ( test $min_minor -gt @YAT_MINOR_VERSION@ || \ ( test $min_minor -eq @YAT_MINOR_VERSION@ && \ ( test $min_patch -gt @YAT_PATCH_VERSION@ || (test $min_patch -eq @YAT_PATCH_VERSION@ && test "@YAT_DEV_BUILD@" = "true" )))))) ; then exit 1; fi exit 0 ;; --version) @ECHO@ @VERSION@ exit 0 ;; --version-major) @ECHO@ @YAT_MAJOR_VERSION@ exit 0 ;; --version-minor) @ECHO@ @YAT_MINOR_VERSION@ exit 0 ;; --version-patch) @ECHO@ @YAT_PATCH_VERSION@ exit 0 ;; --help) usage exit 0 ;; *) usage exit 1 ;; esac # Next please. shift done # only keep last of replicates if test -n "$flags"; then reversed_flags= for opt in $flags; do reversed_flags="$opt $reversed_flags" done unique_flags= for opt in $reversed_flags; do unique=1; for opt2 in $unique_flags; do if test $opt = $opt2; then unique=0 fi done if test $unique -eq 1; then unique_flags="$opt $unique_flags" fi done @ECHO@ $unique_flags fi exit 0