Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | #! /bin/sh |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 2 | # $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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 30 | # |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 31 | # This script returns the options to add to `gnatmake' for using AdaCurses. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 32 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 33 | DESTDIR=@DESTDIR@ |
| 34 | prefix=@prefix@ |
| 35 | exec_prefix=@exec_prefix@ |
| 36 | libdir=@libdir@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 37 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 38 | ADA_INCLUDE=@ADA_INCLUDE@ |
| 39 | ADA_OBJECTS=@ADA_OBJECTS@ |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 40 | |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 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" |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 47 | |
| 48 | case "x$1" in |
Steve Kondik | ae271bc | 2015-11-15 02:50:53 +0100 | [diff] [blame] | 49 | 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 |
| 64 | Usage: ${THIS}-config [options] |
| 65 | |
| 66 | Options: |
| 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 | |
| 74 | If no options are given, echos the full set of flags needed by gnatmake. |
| 75 | ENDHELP |
| 76 | ;; |
| 77 | *) |
| 78 | echo 'Usage: adacurses@DFT_ARG_SUFFIX@-config [--version | --cflags | --libs]' >&2 |
| 79 | exit 1 |
| 80 | ;; |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 81 | esac |