3 # $Id: lib-config.in,v 1.3 2004/04/08 01:36:24 mdw Exp $
5 # Provide configuration information for library clients
7 # (c) 1999 Straylight/Edgeware
10 #----- Licensing notice -----------------------------------------------------
12 # This file is part of the Common Files Distribution (`common').
14 # `Common' is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of the License, or
17 # (at your option) any later version.
19 # `Common' is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with `common'; if not, write to the Free Software Foundation,
26 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 #----- Configuration --------------------------------------------------------
31 exec_prefix
=@exec_prefix@
33 includedir
=@includedir@
34 archincludedir
=${libdir}/@LIBRARY@
/include
38 #----- Command-line parsing and output --------------------------------------
40 ego
=`echo "$0" | sed 's:.*/::'`
42 if [ -z
"${1+x}" ]; then
43 echo >&2 "Usage: $ego OPTION"
44 echo >&2 "Run \`$ego --help' for more information."
51 @LIBNAME@, version $VERSION
55 Provides configuration parameters for @LIBNAME@ client programs. Options
58 --help Display this help text.
59 --version Display @LIBNAME@ version number.
60 --check VERSION Verifies that the given version number is supported.
61 --cflags Display appropriate compiler flags.
62 --libs Display appropriate linker flags and library names.
69 version
=${2-1.0.0pre0}
70 set `echo $VERSION | sed 's/[^0-9][^0-9]*/ /g'`
71 MAJOR
=${1-1} MINOR
=${2-0} PATCH
=${3-0} PRE
=$4
72 set `echo $version | sed 's/[^0-9][^0-9]*/ /g'`
73 major
=${1-1} minor
=${2-0} patch=${3-0} pre
=$4
74 [ $major -gt
$MAJOR ] && exit 1
75 [ $major -lt
$MAJOR ] && exit 0
76 [ $minor -gt
$MINOR ] && exit 1
77 [ $minor -lt
$MINOR ] && exit 0
78 [ $patch -gt
$PATCH ] && exit 1
79 [ $patch -lt
$PATCH ] && exit 0
81 [ -z
"$pre" ] && exit 1
82 [ $pre -gt
$PRE ] && exit 1
83 [ $pre -lt
$PRE ] && exit 0
88 echo "-I${includedir} -I${archincludedir}"
91 echo "-L${libdir} -l@LIBRARY@"
94 echo >&2 "$ego: unrecognized option \`$1'"
98 #----- That's all, folks ----------------------------------------------------