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