source: branches/0.9-stable/build_support/gen_yat_pc.sh.in @ 2849

Last change on this file since 2849 was 2849, checked in by Peter, 11 years ago

update copyright years

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: gen_yat_pc.sh.in 2849 2012-09-23 23:00:02Z peter $
2# @configure_input@
3
4# Copyright (C) 2011, 2012 Peter Johansson
5#
6# This file is part of the yat library, http://dev.thep.lu.se/yat
7#
8# The yat library is free software; you can redistribute it
9# and/or modify it under the terms of the GNU General Public License as
10# published by the Free Software Foundation; either version 3 of the
11# License, or (at your option) any later version.
12#
13# The yat library is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16# General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with yat. If not, see <http://www.gnu.org/licenses/>.
20
21input=yat.pc.in
22
23while test $# -gt 0; do
24    optarg=`echo "$1" | @SED@ 's|.*=||'`
25    case "$1" in
26    --prefix=*)
27    prefix=${optarg}
28    ;;
29    --exec-prefix=*)
30    exec_prefix=${optarg}
31    ;;
32    --libdir=*)
33    libdir=${optarg}
34    ;;
35    --includedir=*)
36    includedir=${optarg}
37    ;;
38    --input=*)
39    input=${optarg}
40    ;;
41    *)
42    echo "error: unknown option: $1" >&2
43    exit 1
44    ;;
45    esac
46    # next please
47    shift
48done
49
50# prefix is what it is, i.e., no variables in string
51my_prefix=${prefix}
52
53my_exec_prefix=${exec_prefix}
54# Check if exec_prefix has been modified via make commandline. If
55# exec_prefix was not set at make time, the comparison below is
56# true (also in the case when prefix was set at make time).
57if test x"${exec_prefix}" = x"@exec_prefix@"; then
58  my_exec_prefix='@exec_prefix@';
59fi
60
61# likewise for libdir
62my_libdir=${libdir}
63if test x"${libdir}" = x"@libdir@"; then
64  my_libdir='@libdir@';
65fi
66
67# likewise for includedir
68my_includedir=${includedir}
69if test x"${includedir}" = x"@includedir@"; then
70  my_includedir='@includedir@';
71fi
72
73@SED@ -e 's|@PACKAGE_URL[@]|@PACKAGE_URL@|g' \
74-e "s|@prefix[@]|${my_prefix}|g" \
75-e "s|@exec_prefix[@]|${my_exec_prefix}|g" \
76-e "s|@libdir[@]|${my_libdir}|g" \
77-e "s|@includedir[@]|${my_includedir}|g" \
78-e 's|@VERSION[@]|@VERSION@|g' \
79-e 's|@gsl_version[@]|@gsl_version@|g' \
80-e 's|@CPPFLAGS[@]|@CPPFLAGS@|g' \
81-e 's|@YAT_CPPFLAGS[@]|@YAT_CPPFLAGS@|g' \
82-e 's|@CXXFLAGS[@]|@CXXFLAGS@|g' \
83-e 's|@YAT_CXXFLAGS[@]|@YAT_CXXFLAGS@|g' \
84-e 's|@LDFLAGS[@]|@LDFLAGS@|g' \
85-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< $input
Note: See TracBrowser for help on using the repository browser.