/src/rt/release.sh: avoid requiring another MSys install
[msysgit.git] / bin / autoopts-config
bloba5b0ff70cf03eba26ec40f066799e47f4eb6e951
1 #!/bin/sh
2 ## ---------------------------------------------------------------------
3 ## autoopts-config.in -- Tell a client where to find installed autoopts
4 ##
5 ## Autoopts copyright 1992-2002 Bruce Korb
6 ##
7 ## Time-stamp: "2002-09-14 11:28:43 bkorb"
8 ## Author: Bruce Korb <bkorb@gnu.org>
9 ## Maintainer: Bruce Korb <bkorb@gnu.org>
10 ## Created: Mon Jun 30 15:35:12 1997
11 ## by: bkorb
12 ## ---------------------------------------------------------------------
13 ## $Id: autoopts-config.in,v 2.14 2002/09/14 18:36:27 bkorb Exp $
14 ## ---------------------------------------------------------------------
15 ## Code:
17 # Configured values:
19 prefix=/usr
20 datadir=${prefix}/share
21 includedir=${prefix}/include
22 exec_prefix=${prefix}
23 bindir=${exec_prefix}/bin
24 libdir=${exec_prefix}/lib
25 exeext=.exe
26 package=autogen
27 version=18:4:9
29 # Derived values:
31 tag=libopts-`echo ${version} | sed 's,:,.,g'`
32 autogen="${bindir}/autogen${exeext}"
33 ldflags="-L${libdir} -lopts"
34 libs="${ldflags}"
35 pkgdatadir="${datadir}/${package}"
36 libsrc="${pkgdatadir}/${tag}.tar.gz"
37 static_libs="${libdir}/libopts.a"
38 everything="NOT FOR DISPLAY"
40 [ "${includedir}" = "/usr/include" ] && cflags="" || cflags="-I${includedir}"
42 # Displayable values:
44 optlist="autogen bindir cflags exec_prefix ldflags libs libsrc package
45 pkgdatadir prefix static_libs version everything"
47 for o in $optlist
48 do eval echo_${o}=false ; done
50 usage()
52 cat <<EOF
53 Usage: autoopts-config <<OPTION>> [ ... ]
54 Options may be one or more of:
55 EOF
56 for o in $optlist
58 echo " ${o}"
59 done | sed 's,_,-,g'
60 echo '"everything" will print out the list of names and values.'
61 exit $1
64 if test $# -eq 0; then
65 usage 1 1>&2
68 # Figure out what's wanted
70 while test $# -gt 0; do
71 o=`echo $1 | sed 's,^-*,,;s/-/_/g'`
73 case $o in
74 everything | \
75 \*) for o in $optlist
76 do eval echo_${o}=true
77 done ;;
79 help | h | \? ) usage 0 ;;
81 *) eval "f=\$echo_${o}" || usage 1 2>&1
82 [ -n "$f" ] || usage 1 2>&1
83 eval echo_${o}=true || usage 1 2>&1
85 esac
86 shift
87 done
89 if ${echo_everything}
90 then
91 echo_everything=false
92 for o in $optlist
93 do if eval \${echo_${o}}
94 then eval printf \""%-12s --> %s\\n"\" ${o} \"\${${o}}\" ; fi
95 done
96 else
97 for o in $optlist
98 do if eval \${echo_${o}}
99 then eval echo \${${o}} ; fi
100 done
103 exit 0
104 ## end autoopts-config.in