2418 |
30 Jan 11 |
peter |
# $Id$ |
2418 |
30 Jan 11 |
peter |
# @configure_input@ |
2418 |
30 Jan 11 |
peter |
3 |
|
3417 |
25 May 15 |
peter |
# Copyright (C) 2011, 2012, 2013, 2014 Peter Johansson |
2418 |
30 Jan 11 |
peter |
5 |
# |
2418 |
30 Jan 11 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
2418 |
30 Jan 11 |
peter |
7 |
# |
2418 |
30 Jan 11 |
peter |
# The yat library is free software; you can redistribute it |
2418 |
30 Jan 11 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
2418 |
30 Jan 11 |
peter |
# published by the Free Software Foundation; either version 3 of the |
2418 |
30 Jan 11 |
peter |
# License, or (at your option) any later version. |
2418 |
30 Jan 11 |
peter |
12 |
# |
2418 |
30 Jan 11 |
peter |
# The yat library is distributed in the hope that it will be useful, |
2418 |
30 Jan 11 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2418 |
30 Jan 11 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2418 |
30 Jan 11 |
peter |
# General Public License for more details. |
2418 |
30 Jan 11 |
peter |
17 |
# |
2418 |
30 Jan 11 |
peter |
# You should have received a copy of the GNU General Public License |
2418 |
30 Jan 11 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
2418 |
30 Jan 11 |
peter |
20 |
|
2418 |
30 Jan 11 |
peter |
input=yat.pc.in |
2418 |
30 Jan 11 |
peter |
22 |
|
2418 |
30 Jan 11 |
peter |
while test $# -gt 0; do |
2623 |
07 Nov 11 |
peter |
optarg=`echo "$1" | @SED@ 's|.*=||'` |
2418 |
30 Jan 11 |
peter |
case "$1" in |
2418 |
30 Jan 11 |
peter |
--prefix=*) |
2418 |
30 Jan 11 |
peter |
prefix=${optarg} |
2418 |
30 Jan 11 |
peter |
28 |
;; |
2418 |
30 Jan 11 |
peter |
--exec-prefix=*) |
2418 |
30 Jan 11 |
peter |
exec_prefix=${optarg} |
2418 |
30 Jan 11 |
peter |
31 |
;; |
2418 |
30 Jan 11 |
peter |
--libdir=*) |
2418 |
30 Jan 11 |
peter |
libdir=${optarg} |
2418 |
30 Jan 11 |
peter |
34 |
;; |
2418 |
30 Jan 11 |
peter |
--includedir=*) |
2418 |
30 Jan 11 |
peter |
includedir=${optarg} |
2418 |
30 Jan 11 |
peter |
37 |
;; |
2418 |
30 Jan 11 |
peter |
--input=*) |
2418 |
30 Jan 11 |
peter |
input=${optarg} |
2418 |
30 Jan 11 |
peter |
40 |
;; |
2418 |
30 Jan 11 |
peter |
41 |
*) |
2418 |
30 Jan 11 |
peter |
echo "error: unknown option: $1" >&2 |
2418 |
30 Jan 11 |
peter |
exit 1 |
2418 |
30 Jan 11 |
peter |
44 |
;; |
2418 |
30 Jan 11 |
peter |
esac |
2418 |
30 Jan 11 |
peter |
# next please |
2418 |
30 Jan 11 |
peter |
shift |
2418 |
30 Jan 11 |
peter |
done |
2418 |
30 Jan 11 |
peter |
49 |
|
2418 |
30 Jan 11 |
peter |
# prefix is what it is, i.e., no variables in string |
2418 |
30 Jan 11 |
peter |
my_prefix=${prefix} |
2418 |
30 Jan 11 |
peter |
52 |
|
2418 |
30 Jan 11 |
peter |
my_exec_prefix=${exec_prefix} |
2418 |
30 Jan 11 |
peter |
# Check if exec_prefix has been modified via make commandline. If |
2418 |
30 Jan 11 |
peter |
# exec_prefix was not set at make time, the comparison below is |
2418 |
30 Jan 11 |
peter |
# true (also in the case when prefix was set at make time). |
2418 |
30 Jan 11 |
peter |
if test x"${exec_prefix}" = x"@exec_prefix@"; then |
2418 |
30 Jan 11 |
peter |
my_exec_prefix='@exec_prefix@'; |
2418 |
30 Jan 11 |
peter |
fi |
2418 |
30 Jan 11 |
peter |
60 |
|
2418 |
30 Jan 11 |
peter |
# likewise for libdir |
2418 |
30 Jan 11 |
peter |
my_libdir=${libdir} |
2418 |
30 Jan 11 |
peter |
if test x"${libdir}" = x"@libdir@"; then |
2418 |
30 Jan 11 |
peter |
my_libdir='@libdir@'; |
2418 |
30 Jan 11 |
peter |
fi |
2418 |
30 Jan 11 |
peter |
66 |
|
2418 |
30 Jan 11 |
peter |
# likewise for includedir |
2418 |
30 Jan 11 |
peter |
my_includedir=${includedir} |
2418 |
30 Jan 11 |
peter |
if test x"${includedir}" = x"@includedir@"; then |
2418 |
30 Jan 11 |
peter |
my_includedir='@includedir@'; |
2418 |
30 Jan 11 |
peter |
fi |
2418 |
30 Jan 11 |
peter |
72 |
|
2623 |
07 Nov 11 |
peter |
@SED@ -e 's|@PACKAGE_URL[@]|@PACKAGE_URL@|g' \ |
2418 |
30 Jan 11 |
peter |
-e "s|@prefix[@]|${my_prefix}|g" \ |
2418 |
30 Jan 11 |
peter |
-e "s|@exec_prefix[@]|${my_exec_prefix}|g" \ |
2418 |
30 Jan 11 |
peter |
-e "s|@libdir[@]|${my_libdir}|g" \ |
2418 |
30 Jan 11 |
peter |
-e "s|@includedir[@]|${my_includedir}|g" \ |
2418 |
30 Jan 11 |
peter |
-e 's|@VERSION[@]|@VERSION@|g' \ |
2418 |
30 Jan 11 |
peter |
-e 's|@CPPFLAGS[@]|@CPPFLAGS@|g' \ |
2418 |
30 Jan 11 |
peter |
-e 's|@YAT_CPPFLAGS[@]|@YAT_CPPFLAGS@|g' \ |
2418 |
30 Jan 11 |
peter |
-e 's|@CXXFLAGS[@]|@CXXFLAGS@|g' \ |
2418 |
30 Jan 11 |
peter |
-e 's|@YAT_CXXFLAGS[@]|@YAT_CXXFLAGS@|g' \ |
2418 |
30 Jan 11 |
peter |
-e 's|@LDFLAGS[@]|@LDFLAGS@|g' \ |
2418 |
30 Jan 11 |
peter |
-e 's|@YAT_LDFLAGS[@]|@YAT_LDFLAGS@|g' \ |
3111 |
10 Nov 13 |
peter |
-e 's|@YAT_PC_LIBS[@]|@YAT_PC_LIBS@|g' \ |
3366 |
03 Dec 14 |
peter |
-e 's|@YAT_PC_LIBS_PRIVATE[@]|@YAT_PC_LIBS_PRIVATE@|g' \ |
3365 |
01 Dec 14 |
peter |
-e 's|@YAT_PC_REQUIRES[@]|@YAT_PC_REQUIRES@|g' \ |
3366 |
03 Dec 14 |
peter |
-e 's|@YAT_PC_REQUIRES_PRIVATE[@]|@YAT_PC_REQUIRES_PRIVATE@|g' \ |
2960 |
17 Jan 13 |
peter |
-e 's|@LIBS[@]|@LIBS@|g' \ |
2418 |
30 Jan 11 |
peter |
< $input |