]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/gen/adacurses-config.in
ncurses 6.1 - patch 20180616
[ncurses.git] / Ada95 / gen / adacurses-config.in
1 #! /bin/sh
2 # $Id: adacurses-config.in,v 1.11 2016/11/05 20:48:35 tom Exp $
3 ##############################################################################
4 # Copyright (c) 2007-2012,2016 Free Software Foundation, Inc.                #
5 #                                                                            #
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:                                                      #
13 #                                                                            #
14 # The above copyright notice and this permission notice shall be included in #
15 # all copies or substantial portions of the Software.                        #
16 #                                                                            #
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.                                                  #
24 #                                                                            #
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               #
28 # authorization.                                                             #
29 ##############################################################################
30 #
31 # This script returns the options to add to `gnatmake' for using AdaCurses.
32
33 DESTDIR=@DESTDIR@
34 prefix=@prefix@
35 exec_prefix=@exec_prefix@
36 libdir=@libdir@
37
38 ADA_INCLUDE=@ADA_INCLUDE@
39 ADA_OBJECTS=@ADA_OBJECTS@
40
41 VERSION=@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@
42
43 CFLAGS="-aI$ADA_INCLUDE -aO$ADA_OBJECTS"
44 LIBS="-L$ADA_OBJECTS -lAdaCurses"
45
46 THIS="adacurses"
47 THIS_CFG="$THIS@DFT_ARG_SUFFIX@-config"
48
49 case "x$1" in
50         x--version)
51                 echo AdaCurses $VERSION
52                 ;;
53         x--cflags)
54                 echo $CFLAGS
55                 ;;
56         x--libs)
57                 echo $LIBS
58                 ;;
59         x)
60                 # if no parameter is given, give what gnatmake needs
61                 echo "$CFLAGS -largs $LIBS"
62                 ;;
63         x--help)
64                 cat <<ENDHELP
65 Usage: ${THIS_CFG} [options]
66
67 Options:
68   --cflags           echos the gnat (Ada compiler) flags needed to compile with ${THIS}
69   --libs             echos the gnat libraries needed to link with ${THIS}
70
71   --version          echos the release+patchdate version of ${THIS}
72
73   --help             prints this message
74
75 If no options are given, echos the full set of flags needed by gnatmake.
76 ENDHELP
77                 ;;
78         *)
79                 echo 'Usage: $THIS_CFG [--version | --cflags | --libs]' >&2
80                 exit 1
81                 ;;
82 esac