blob: e29c3099db2db4c60767e9a4ca6639f2b8f3ccdb [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301#! /bin/sh
Steve Kondikae271bc2015-11-15 02:50:53 +01002# $Id: adacurses-config.in,v 1.9 2014/06/07 19:32:22 Pascal.Pignard Exp $
3##############################################################################
4# Copyright (c) 2007-2010,2014 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##############################################################################
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030#
Steve Kondikae271bc2015-11-15 02:50:53 +010031# This script returns the options to add to `gnatmake' for using AdaCurses.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053032
Steve Kondikae271bc2015-11-15 02:50:53 +010033DESTDIR=@DESTDIR@
34prefix=@prefix@
35exec_prefix=@exec_prefix@
36libdir=@libdir@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053037
Steve Kondikae271bc2015-11-15 02:50:53 +010038ADA_INCLUDE=@ADA_INCLUDE@
39ADA_OBJECTS=@ADA_OBJECTS@
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053040
Steve Kondikae271bc2015-11-15 02:50:53 +010041VERSION=@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@
42
43CFLAGS="-aI$ADA_INCLUDE -aO$ADA_OBJECTS"
44LIBS="-L$ADA_OBJECTS -lAdaCurses"
45
46THIS="adacurses"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053047
48case "x$1" in
Steve Kondikae271bc2015-11-15 02:50:53 +010049 x--version)
50 echo AdaCurses $VERSION
51 ;;
52 x--cflags)
53 echo $CFLAGS
54 ;;
55 x--libs)
56 echo $LIBS
57 ;;
58 x)
59 # if no parameter is given, give what gnatmake needs
60 echo "$CFLAGS -largs $LIBS"
61 ;;
62 x--help)
63 cat <<ENDHELP
64Usage: ${THIS}-config [options]
65
66Options:
67 --cflags echos the gnat (Ada compiler) flags needed to compile with ${THIS}
68 --libs echos the gnat libraries needed to link with ${THIS}
69
70 --version echos the release+patchdate version of ${THIS}
71
72 --help prints this message
73
74If no options are given, echos the full set of flags needed by gnatmake.
75ENDHELP
76 ;;
77 *)
78 echo 'Usage: adacurses@DFT_ARG_SUFFIX@-config [--version | --cflags | --libs]' >&2
79 exit 1
80 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053081esac