2 # $Id: ncurses-config.in,v 1.24 2010/02/06 22:12:16 Miroslav.Lichvar Exp $
3 ##############################################################################
4 # Copyright (c) 2006-2009,2010 Free Software Foundation, Inc. #
6 # Permission is hereby granted, free of charge, to any person obtaining a #
7 # copy of this software and associated documentation files (the "Software"), #
8 # to deal in the Software without restriction, including without limitation #
9 # the rights to use, copy, modify, merge, publish, distribute, distribute #
10 # with modifications, sublicense, and/or sell copies of the Software, and to #
11 # permit persons to whom the Software is furnished to do so, subject to the #
12 # following conditions: #
14 # The above copyright notice and this permission notice shall be included in #
15 # all copies or substantial portions of the Software. #
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
18 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
19 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
20 # THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
21 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
22 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
23 # DEALINGS IN THE SOFTWARE. #
25 # Except as contained in this notice, the name(s) of the above copyright #
26 # holders shall not be used in advertising or otherwise to promote the sale, #
27 # use or other dealings in this Software without prior written #
29 ##############################################################################
31 # Author: Thomas E. Dickey, 2006-on
34 exec_prefix="@exec_prefix@"
37 includedir="@includedir@"
42 THIS="@LIB_NAME@@DFT_ARG_SUFFIX@"
43 TINFO_LIB="@TINFO_ARG_SUFFIX@"
46 LANGUAGE=C; export LANGUAGE
47 LC_ALL=C; export LC_ALL
48 LC_CTYPE=C; export LC_CTYPE
50 # with --disable-overwrite, we installed into a subdirectory, but transformed
51 # the headers to include like this:
52 # <ncurses@LIB_SUFFIX@/curses.h>
53 if test x@WITH_OVERWRITE@ = xno ; then
55 $prefix/include/ncurses@LIB_SUFFIX@)
56 includedir=`echo "$includedir" | sed -e 's,/[^/]*$,,'`
61 test $# = 0 && exec @SHELL@ $0 --error
63 while test $# -gt 0; do
75 if test "${includedir}" != /usr/include ; then
76 INCS="-I${includedir}"
78 if test "x@WITH_OVERWRITE@" = xno ; then
79 INCS="$INCS -I${includedir}/${THIS}"
81 sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
86 if test @TINFO_NAME@ = @LIB_NAME@ ; then
87 sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
88 -L$libdir @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
91 sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
92 -L$libdir @EXTRA_LDFLAGS@ -l${THIS} -l${TINFO_LIB} @LIBS@
98 echo "@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@"
101 echo "@cf_cv_abi_version@"
104 echo "@NCURSES_MOUSE_VERSION@"
126 echo "@TERMINFO_DIRS@"
134 Usage: ${THIS}-config [options]
137 --prefix echos the package-prefix of ${THIS}
138 --exec-prefix echos the executable-prefix of ${THIS}
140 --cflags echos the C compiler flags needed to compile with ${THIS}
141 --libs echos the libraries needed to link with ${THIS}
143 --version echos the release+patchdate version of ${THIS}
144 --abi-version echos the ABI version of ${THIS}
145 --mouse-version echos the mouse-interface version of ${THIS}
147 --bindir echos the directory containing ${THIS} programs
148 --datadir echos the directory containing ${THIS} data
149 --includedir echos the directory containing ${THIS} header files
150 --libdir echos the directory containing ${THIS} libraries
151 --mandir echos the directory containing ${THIS} manpages
152 --terminfo echos the \$TERMINFO terminfo database path
153 --terminfo-dirs echos the \$TERMINFO_DIRS directory list
154 --termpath echos the \$TERMPATH termcap list
156 --help prints this message
160 @SHELL@ $0 --help 1>&2