1166124Srafan#!@SHELL@
2174993Srafan# $Id: ncurses-config.in,v 1.12 2007/03/17 20:02:19 tom Exp $
3166124Srafan##############################################################################
4174993Srafan# Copyright (c) 2006,2007 Free Software Foundation, Inc.                     #
5166124Srafan#                                                                            #
6166124Srafan# Permission is hereby granted, free of charge, to any person obtaining a    #
7166124Srafan# copy of this software and associated documentation files (the "Software"), #
8166124Srafan# to deal in the Software without restriction, including without limitation  #
9166124Srafan# the rights to use, copy, modify, merge, publish, distribute, distribute    #
10166124Srafan# with modifications, sublicense, and/or sell copies of the Software, and to #
11166124Srafan# permit persons to whom the Software is furnished to do so, subject to the  #
12166124Srafan# following conditions:                                                      #
13166124Srafan#                                                                            #
14166124Srafan# The above copyright notice and this permission notice shall be included in #
15166124Srafan# all copies or substantial portions of the Software.                        #
16166124Srafan#                                                                            #
17166124Srafan# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
18166124Srafan# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
19166124Srafan# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
20166124Srafan# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
21166124Srafan# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
22166124Srafan# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
23166124Srafan# DEALINGS IN THE SOFTWARE.                                                  #
24166124Srafan#                                                                            #
25166124Srafan# Except as contained in this notice, the name(s) of the above copyright     #
26166124Srafan# holders shall not be used in advertising or otherwise to promote the sale, #
27166124Srafan# use or other dealings in this Software without prior written               #
28166124Srafan# authorization.                                                             #
29166124Srafan##############################################################################
30166124Srafan#
31166124Srafan# Author: Thomas E. Dickey, 2006
32166124Srafan
33166124Srafanprefix="@prefix@"
34166124Srafanexec_prefix="@exec_prefix@"
35166124Srafan
36166124Srafanbindir="@bindir@"
37166124Srafanlibdir="@libdir@"
38166124Srafandatadir="@datadir@"
39166124Srafanmandir="@mandir@"
40166124Srafan
41166124SrafanTHIS="ncurses@DFT_ARG_SUFFIX@"
42166124Srafan
43174993SrafanLANG=C;		export LANG
44174993SrafanLANGUAGE=C;	export LANGUAGE
45174993SrafanLC_ALL=C;	export LC_ALL
46174993SrafanLC_CTYPE=C;	export LC_CTYPE
47174993Srafan
48166124Srafantest $# = 0 && exec @SHELL@ $0 --error
49166124Srafan
50166124Srafanwhile test $# -gt 0; do
51166124Srafan	case "$1" in
52166124Srafan	-*=*)
53166124Srafan		ARG=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
54166124Srafan		;;
55166124Srafan	*)
56166124Srafan		ARG=
57166124Srafan		;;
58166124Srafan	esac
59166124Srafan
60166124Srafan	case "$1" in
61166124Srafan	# basic configuration
62166124Srafan	--prefix=*)
63166124Srafan		prefix="$ARG"
64166124Srafan		test -z "$exec_prefix" && exec_prefix="$ARG"
65166124Srafan		;;
66166124Srafan	--prefix)
67166124Srafan		echo "$prefix"
68166124Srafan		;;
69166124Srafan	--exec-prefix=*)
70166124Srafan		exec_prefix="$ARG"
71166124Srafan		;;
72166124Srafan	--exec-prefix)
73166124Srafan		echo "$exec_prefix"
74166124Srafan		;;
75166124Srafan	# compile/link
76166124Srafan	--cflags)
77166124Srafan		INCS=
78166124Srafan		if test "${prefix}/include" != /usr/include ; then
79166124Srafan			INCS="-I${prefix}/include"
80166124Srafan		fi
81166124Srafan		if test "@WITH_OVERWRITE@" != no ; then
82166124Srafan			INCS="$INCS -I${prefix}/include/${THIS}"
83166124Srafan		fi
84166124Srafan		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
85166124Srafan			$INCS
86166124SrafanENDECHO
87166124Srafan		;;
88166124Srafan	--libs)
89166124Srafan		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
90166124Srafan			-L${exec_prefix}/lib @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
91166124SrafanENDECHO
92166124Srafan		;;
93166124Srafan	# identification
94166124Srafan	--version)
95166124Srafan		echo "@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@"
96166124Srafan		;;
97166124Srafan	--abi-version)
98166124Srafan		echo "@cf_cv_abi_version@"
99166124Srafan		;;
100166124Srafan	--mouse-version)
101166124Srafan		echo "@NCURSES_MOUSE_VERSION@"
102166124Srafan		;;
103166124Srafan	# locations
104166124Srafan	--bindir)
105166124Srafan		echo "${bindir}"
106166124Srafan		;;
107166124Srafan	--datadir)
108166124Srafan		echo "${datadir}"
109166124Srafan		;;
110166124Srafan	--libdir)
111166124Srafan		echo "${libdir}"
112166124Srafan		;;
113166124Srafan	--mandir)
114166124Srafan		echo "${mandir}"
115166124Srafan		;;
116166124Srafan	--terminfo)
117166124Srafan		echo "@TERMINFO@"
118166124Srafan		;;
119166124Srafan	--terminfo-dirs)
120166124Srafan		echo "@TERMINFO_DIRS@"
121166124Srafan		;;
122166124Srafan	--termpath)
123166124Srafan		echo "@TERMPATH@"
124166124Srafan		;;
125166124Srafan	# general info
126166124Srafan	--help)
127166124Srafan		cat <<ENDHELP
128166124SrafanUsage: ${THIS}-config [options]
129166124Srafan
130166124SrafanOptions:
131166124Srafan  --prefix           echos the package-prefix of ${THIS}
132166124Srafan  --prefix=ARG       sets the package-prefix of ${THIS}
133166124Srafan  --exec-prefix      echos the executable-prefix of ${THIS}
134166124Srafan  --exec-prefix=ARG  sets the executable-prefix of ${THIS}
135166124Srafan
136166124Srafan  --cflags           echos the C compiler flags needed to compile with ${THIS}
137166124Srafan  --libs             echos the libraries needed to link with ${THIS}
138166124Srafan
139166124Srafan  --version          echos the release+patchdate version of ${THIS}
140166124Srafan  --abi-version      echos the ABI version of ${THIS}
141166124Srafan  --mouse-version    echos the mouse-interface version of ${THIS}
142166124Srafan
143166124Srafan  --bindir           echos the directory containing ${THIS} programs
144166124Srafan  --datadir          echos the directory containing ${THIS} data
145166124Srafan  --libdir           echos the directory containing ${THIS} libraries
146166124Srafan  --mandir           echos the directory containing ${THIS} manpages
147166124Srafan  --terminfo         echos the \$TERMINFO terminfo database path
148166124Srafan  --terminfo-dirs    echos the \$TERMINFO_DIRS directory list
149166124Srafan  --termpath         echos the \$TERMPATH termcap list
150166124Srafan
151166124Srafan  --help             prints this message
152166124SrafanENDHELP
153166124Srafan		;;
154166124Srafan	--error|*)
155166124Srafan		@SHELL@ $0 --help 1>&2
156166124Srafan		exit 1
157166124Srafan		;;
158166124Srafan	esac
159166124Srafan	shift
160166124Srafandone
161166124Srafan# vile:shmode
162