]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/MKada_config.in
ncurses 6.4 - patch 20230909
[ncurses.git] / man / MKada_config.in
1 .\"***************************************************************************
2 .\" Copyright 2019-2021,2023 Thomas E. Dickey                                *
3 .\" Copyright 2010-2014,2016 Free Software Foundation, Inc.                  *
4 .\"                                                                          *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
6 .\" copy of this software and associated documentation files (the            *
7 .\" "Software"), to deal in the Software without restriction, including      *
8 .\" without limitation the rights to use, copy, modify, merge, publish,      *
9 .\" distribute, distribute with modifications, sublicense, and/or sell       *
10 .\" copies of the Software, and to permit persons to whom the Software is    *
11 .\" furnished to do so, subject to the following conditions:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 .\"                                                                          *
24 .\" Except as contained in this notice, the name(s) of the above copyright   *
25 .\" holders shall not be used in advertising or otherwise to promote the     *
26 .\" sale, use or other dealings in this Software without prior written       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: MKada_config.in,v 1.18 2023/09/09 23:32:29 tom Exp $
31 .ds C adacurses@USE_CFG_SUFFIX@\-config
32 .TH ADACURSES 1 2023-09-09 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User commands"
33 .ie n .ds CW R
34 .el   \{
35 .ie \n(.g .ds CW CR
36 .el       .ds CW CW
37 .\}
38 .SH NAME
39 adacurses@USE_CFG_SUFFIX@\-config \- helper script for @ADA_LIBNAME@ libraries
40 .SH SYNOPSIS
41 .B \*C
42 [\fIoptions\fP]
43 .SH DESCRIPTION
44 This is a shell script which simplifies configuring an application to use
45 the @ADA_LIBNAME@ library binding to ncurses.
46 .SH OPTIONS
47 .TP
48 \fB\-\-cflags\fP
49 echos the gnat (Ada compiler) flags needed to compile with @ADA_LIBNAME@.
50 .TP
51 \fB\-\-libs\fP
52 echos the gnat libraries needed to link with @ADA_LIBNAME@.
53 .TP
54 \fB\-\-version\fP
55 echos the release+patchdate version of the ncurses libraries used
56 to configure and build @ADA_LIBNAME@.
57 .TP
58 \fB\-\-help\fP
59 prints a list of the \fB\*C\fP script's options.
60 .PP
61 If no options are given, \fB\*C\fP prints the combination
62 of
63 \fB\-\-cflags\fP and
64 \fB\-\-libs\fP
65 that \fBgnatmake\fP expects (see example).
66 .SH EXAMPLE
67 For example, supposing that you want to compile the "Hello World!"
68 program for @ADA_LIBNAME@.
69 Make a file named "hello.adb":
70 .RS
71 .nf
72 .ft \*(CW
73 with Terminal_Interface.Curses; use Terminal_Interface.Curses;
74
75 procedure Hello is
76
77    Visibility : Cursor_Visibility := Invisible;
78    done : Boolean := False;
79    c : Key_Code;
80
81 begin
82
83    Init_Screen;
84    Set_Echo_Mode (False);
85
86    Set_Cursor_Visibility (Visibility);
87    Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
88
89    Move_Cursor (Line => Lines / 2, Column => (Columns - 12) / 2);
90    Add (Str => "Hello World!");
91
92    while not done loop
93
94       c := Get_Keystroke (Standard_Window);
95       case c is
96       when Character'Pos ('q') => done := True;
97       when others => null;
98       end case;
99
100       Nap_Milli_Seconds (50);
101    end loop;
102
103    End_Windows;
104
105 end Hello;
106 .fi
107 .RE
108 .PP
109 Then, using
110 .RS
111 .ft \*(CW
112 gnatmake `adacurses-config --cflags` hello -largs `adacurses-config --libs`
113 .ft
114 .RE
115 .PP
116 or (simpler):
117 .RS
118 .ft \*(CW
119 gnatmake hello `adacurses-config`
120 .ft
121 .RE
122 .PP
123 you will compile and link the program.
124 .SH "SEE ALSO"
125 \fBcurses\fP(3X)
126 .PP
127 This describes \fBncurses\fP
128 version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).