]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure.in
ncurses 6.3 - patch 20221217
[ncurses.git] / Ada95 / configure.in
1 dnl***************************************************************************
2 dnl Copyright 2018-2021,2022 Thomas E. Dickey                                *
3 dnl Copyright 2010-2016,2018 Free Software Foundation, Inc.                  *
4 dnl                                                                          *
5 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
6 dnl copy of this software and associated documentation files (the            *
7 dnl "Software"), to deal in the Software without restriction, including      *
8 dnl without limitation the rights to use, copy, modify, merge, publish,      *
9 dnl distribute, distribute with modifications, sublicense, and/or sell       *
10 dnl copies of the Software, and to permit persons to whom the Software is    *
11 dnl furnished to do so, subject to the following conditions:                 *
12 dnl                                                                          *
13 dnl The above copyright notice and this permission notice shall be included  *
14 dnl in all copies or substantial portions of the Software.                   *
15 dnl                                                                          *
16 dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
17 dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
18 dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
19 dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
20 dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
21 dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
22 dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
23 dnl                                                                          *
24 dnl Except as contained in this notice, the name(s) of the above copyright   *
25 dnl holders shall not be used in advertising or otherwise to promote the     *
26 dnl sale, use or other dealings in this Software without prior written       *
27 dnl authorization.                                                           *
28 dnl***************************************************************************
29 dnl
30 dnl Author: Thomas E. Dickey
31 dnl
32 dnl $Id: configure.in,v 1.88 2022/12/17 22:05:22 tom Exp $
33 dnl Process this file with autoconf to produce a configure script.
34 dnl
35 dnl For additional information, see
36 dnl     https://invisible-island.net/autoconf/
37 dnl     https://invisible-island.net/autoconf/my-autoconf.html
38 dnl
39 dnl ---------------------------------------------------------------------------
40 AC_PREREQ(2.52.20210509)
41 AC_REVISION($Revision: 1.88 $)
42 AC_INIT(gen/gen.c)
43 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
44
45 AC_DEFUN([AC_PATH_XTRA],[])dnl ignore dependencies on this
46
47 PACKAGE="AdaCurses"             AC_SUBST(PACKAGE)
48
49 CF_TOP_BUILDDIR
50
51 CF_HELP_MESSAGE(General Options:)
52
53 CF_WITH_SYSTYPE
54
55 ###     Save the given $CFLAGS to allow user-override.
56 cf_user_CFLAGS="$CFLAGS"
57
58 ###     Default install-location
59 CF_CFG_DEFAULTS
60
61 ###     Checks for programs.
62 CF_PROG_CC(gnatgcc gcc cc)
63 AC_PROG_CPP
64 AC_PROG_GCC_TRADITIONAL
65 CF_PROG_CC_C_O(CC,[$CFLAGS $CPPFLAGS])
66
67 AC_ARG_PROGRAM
68
69 CF_PROG_AWK
70 CF_PROG_EGREP
71 AC_PROG_INSTALL
72 CF_PROG_LN_S
73
74 CF_PROG_INSTALL
75 CF_INSTALL_OPTS
76
77 AC_SYS_LONG_FILE_NAMES
78
79 # if we find pkg-config, check if we should install the ".pc" files.
80 CF_PKG_CONFIG
81 CF_WITH_PKG_CONFIG_LIBDIR
82
83 AC_MSG_CHECKING(if you want to build test-programs)
84 AC_ARG_WITH(tests,
85         [  --without-tests         suppress build with test-programs],
86         [cf_with_tests=$withval],
87         [cf_with_tests=yes])
88 AC_MSG_RESULT($cf_with_tests)
89
90 AC_MSG_CHECKING(if we should assume mixed-case filenames)
91 AC_ARG_ENABLE(mixed-case,
92         [  --enable-mixed-case     tic should assume mixed-case filenames],
93         [enable_mixedcase=$enableval],
94         [enable_mixedcase=auto])
95 AC_MSG_RESULT($enable_mixedcase)
96 if test "$enable_mixedcase" = "auto" ; then
97         CF_MIXEDCASE_FILENAMES
98 else
99         cf_cv_mixedcase=$enable_mixedcase
100         if test "$enable_mixedcase" = "yes" ; then
101                 AC_DEFINE(MIXEDCASE_FILENAMES)
102         fi
103 fi
104
105 # do this after mixed-case option (tags/TAGS is not as important as tic).
106 AC_PROG_MAKE_SET
107 CF_MAKE_PHONY
108 CF_MAKE_TAGS
109 CF_MAKEFLAGS
110
111 dnl These are standard among *NIX systems, but not when cross-compiling
112 AC_CHECK_TOOL(RANLIB, ranlib, ':')
113 AC_CHECK_TOOL(LD, ld, ld)
114 AC_CHECK_TOOL(AR, ar, ar)
115 CF_AR_FLAGS
116 CF_PATHSEP
117
118 dnl Special option for use by system-builders: the install-prefix is used to
119 dnl adjust the location into which the actual install is done, so that an
120 dnl archive can be built without modifying the host system's configuration.
121 AC_MSG_CHECKING(if you have specified an install-prefix)
122 AC_ARG_WITH(install-prefix,
123         [  --with-install-prefix   prefixes actual install-location ($DESTDIR)],
124         [case "$withval" in
125         (yes|no)
126                 ;;
127         (*)     DESTDIR="$withval"
128                 ;;
129         esac])
130 AC_MSG_RESULT($DESTDIR)
131 AC_SUBST(DESTDIR)
132
133 ###############################################################################
134 CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:)
135 # If we're cross-compiling, allow the user to override the tools and their
136 # options.  The configure script is oriented toward identifying the host
137 # compiler, etc., but we need a build compiler to generate parts of the source.
138 CF_BUILD_CC
139
140 ###############################################################################
141 CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
142
143 ### Options to allow the user to specify the set of libraries which are used.
144 ### Use "--without-normal --with-shared" to allow the default model to be
145 ### shared, for example.
146 cf_list_models=""
147
148 AC_MSG_CHECKING(if you want to build shared C-objects)
149 AC_ARG_WITH(shared,
150         [  --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)],
151         [with_shared=$withval],
152         [with_shared=no])
153 AC_MSG_RESULT($with_shared)
154 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
155
156 AC_MSG_CHECKING(for specified models)
157 test -z "$cf_list_models" && cf_list_models=normal
158 AC_MSG_RESULT($cf_list_models)
159
160 ### Use the first model as the default, and save its suffix for use in building
161 ### up test-applications.
162 AC_MSG_CHECKING(for default model)
163 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
164 AC_MSG_RESULT($DFT_LWR_MODEL)
165
166 CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
167
168 AC_SUBST(DFT_LWR_MODEL)dnl      the default model ("normal")
169 AC_SUBST(DFT_UPR_MODEL)dnl      the default model ("NORMAL")
170
171 CF_NCURSES_ADDON
172
173 CF_WITH_LIB_PREFIX(cf_prefix)
174
175 LIB_SUFFIX=
176 AC_SUBST(LIB_SUFFIX)
177
178 ###############################################################################
179
180 dnl Not all ports of gcc support the -g option
181
182 if test X"$CC_G_OPT" = X"" ; then
183         CC_G_OPT='-g'
184         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
185 fi
186 AC_SUBST(CC_G_OPT)
187
188 AC_MSG_CHECKING(for default loader flags)
189 case $DFT_LWR_MODEL in
190 (normal)  LD_MODEL=''   ;;
191 (debug)   LD_MODEL=$CC_G_OPT ;;
192 (profile) LD_MODEL='-pg';;
193 (shared)  LD_MODEL=''   ;;
194 esac
195 AC_SUBST(LD_MODEL)dnl           the type of link (e.g., -g or -pg)
196 AC_MSG_RESULT($LD_MODEL)
197
198 CF_SHARED_OPTS
199
200 # The test/sample programs in the original tree link using rpath option.
201 # Make it optional for packagers.
202 if test -n "$LOCAL_LDFLAGS"
203 then
204         AC_MSG_CHECKING(if you want to link sample programs with rpath option)
205         AC_ARG_ENABLE(rpath-link,
206                 [  --enable-rpath-link     link sample programs with rpath option],
207                 [with_rpath_link=$enableval],
208                 [with_rpath_link=yes])
209         AC_MSG_RESULT($with_rpath_link)
210         if test "$with_rpath_link" = no
211         then
212                 LOCAL_LDFLAGS=
213                 LOCAL_LDFLAGS2=
214         fi
215 fi
216
217 ###############################################################################
218 CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
219
220 ###   use option --enable-broken-linker to force on use of broken-linker support
221 CF_ENABLE_BROKEN_LINKER
222
223 # Check to define _XOPEN_SOURCE "automatically"
224 CF_XOPEN_SOURCE(600)
225
226 CF_LARGEFILE
227
228 ### Enable compiling-in rcs id's
229 AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
230 AC_ARG_WITH(rcs-ids,
231         [  --with-rcs-ids          compile-in RCS identifiers],
232         [with_rcs_ids=$withval],
233         [with_rcs_ids=no])
234 AC_MSG_RESULT($with_rcs_ids)
235 test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS,1,[Define to 1 if RCS identifiers should be compiled-in)])
236
237 ###############################################################################
238 CF_HELP_MESSAGE(Extensions:)
239
240 ### Note that some functions (such as const) are normally disabled anyway.
241 AC_MSG_CHECKING(if you want to build with function extensions)
242 AC_ARG_ENABLE(ext-funcs,
243         [  --disable-ext-funcs     disable function-extensions],
244         [with_ext_funcs=$enableval],
245         [with_ext_funcs=yes])
246 AC_MSG_RESULT($with_ext_funcs)
247 if test "$with_ext_funcs" = yes ; then
248         NCURSES_EXT_FUNCS=1
249         AC_DEFINE(HAVE_USE_DEFAULT_COLORS,1,[Define to 1 if we have use_default_colors function])
250         AC_DEFINE(NCURSES_EXT_FUNCS,1,[Define to 1 if we have ncurses extended functions])
251 else
252         NCURSES_EXT_FUNCS=0
253 fi
254 AC_SUBST(NCURSES_EXT_FUNCS)
255
256 ###   use option --enable-const to turn on use of const beyond that in XSI.
257 AC_MSG_CHECKING(for extended use of const keyword)
258 AC_ARG_ENABLE(const,
259         [  --enable-const          compile with extra/non-standard const],
260         [with_ext_const=$enableval],
261         [with_ext_const=no])
262 AC_MSG_RESULT($with_ext_const)
263 NCURSES_CONST='/*nothing*/'
264 if test "$with_ext_const" = yes ; then
265         NCURSES_CONST=const
266 fi
267 AC_SUBST(NCURSES_CONST)
268
269 ###############################################################################
270 # These options are relatively safe to experiment with.
271 CF_HELP_MESSAGE(Development Code:)
272 AC_MSG_CHECKING(if you want all development code)
273 AC_ARG_WITH(develop,
274         [  --without-develop       disable development options],
275         [with_develop=$withval],
276         [with_develop=no])
277 AC_MSG_RESULT($with_develop)
278
279 ###############################################################################
280 # These are just experimental, probably should not be in a package:
281 CF_HELP_MESSAGE(Experimental Code:)
282
283 # This is still experimental (20080329), but should ultimately be moved to
284 # the script-block --with-normal, etc.
285 CF_WITH_PTHREAD
286
287 AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
288 AC_ARG_ENABLE(weak-symbols,
289         [  --enable-weak-symbols   enable weak-symbols for pthreads],
290         [use_weak_symbols=$withval],
291         [use_weak_symbols=no])
292 AC_MSG_RESULT($use_weak_symbols)
293 if test "$use_weak_symbols" = yes ; then
294         CF_WEAK_SYMBOLS
295 else
296         cf_cv_weak_symbols=no
297 fi
298
299 if test $cf_cv_weak_symbols = yes ; then
300         AC_DEFINE(USE_WEAK_SYMBOLS,1,[Define to 1 to enable weak-symbols for pthreads])
301 fi
302
303 PTHREAD=
304 if test "$with_pthread" = "yes" ; then
305         AC_DEFINE(USE_PTHREADS,1,[Define to 1 to use the pthreads library])
306         enable_reentrant=yes
307         if test $cf_cv_weak_symbols = yes ; then
308                 PTHREAD=-lpthread
309         fi
310 fi
311 AC_SUBST(PTHREAD)
312
313 # OpenSUSE is installing ncurses6, using reentrant option.
314 AC_CHECK_FUNC(_nc_TABSIZE,[assume_reentrant=yes], [assume_reentrant=no])
315
316 # Reentrant code has to be opaque; there's little advantage to making ncurses
317 # opaque outside of that, so there is no --enable-opaque option.  We can use
318 # this option without --with-pthreads, but this will be always set for
319 # pthreads.
320 AC_MSG_CHECKING(if you want experimental reentrant code)
321 AC_ARG_ENABLE(reentrant,
322         [  --enable-reentrant      compile with experimental reentrant code],
323         [with_reentrant=$enableval],
324         [with_reentrant=$assume_reentrant])
325 AC_MSG_RESULT($with_reentrant)
326 if test "$with_reentrant" = yes ; then
327         cf_cv_enable_reentrant=1
328         if test $cf_cv_weak_symbols = yes ; then
329                 CF_REMOVE_LIB(LIBS,$LIBS,pthread)
330         elif test "$assume_reentrant" = no ; then
331                 LIB_SUFFIX="t${LIB_SUFFIX}"
332         fi
333         AC_DEFINE(USE_REENTRANT,1,[Define to 1 to compile with experimental reentrant code])
334 else
335         cf_cv_enable_reentrant=0
336 fi
337 AC_SUBST(cf_cv_enable_reentrant)
338
339 ### Allow using a different wrap-prefix
340 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
341         AC_MSG_CHECKING(for prefix used to wrap public variables)
342         AC_ARG_WITH(wrap-prefix,
343                 [  --with-wrap-prefix=XXX  override prefix used for public variables],
344                 [NCURSES_WRAP_PREFIX=$withval],
345                 [NCURSES_WRAP_PREFIX=_nc_])
346         AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
347 else
348         NCURSES_WRAP_PREFIX=_nc_
349 fi
350 AC_SUBST(NCURSES_WRAP_PREFIX)
351 AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX",[Define to override _nc_ ncurses internal prefix])
352
353 ###############################################################################
354 CF_HELP_MESSAGE(Testing/development Options:)
355
356 ###     use option --disable-echo to suppress full display compiling commands
357 CF_DISABLE_ECHO
358
359 CF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes)
360 if test "x$enable_warnings" = "xyes"; then
361         CF_ADD_ADAFLAGS(-gnatwa -gnatyg)
362 fi
363
364 ###     use option --enable-assertions to turn on generation of assertion code
365 AC_MSG_CHECKING(if you want to enable runtime assertions)
366 AC_ARG_ENABLE(assertions,
367         [  --enable-assertions     test: turn on generation of assertion code],
368         [with_assertions=$enableval],
369         [with_assertions=no])
370 AC_MSG_RESULT($with_assertions)
371 if test -n "$GCC"
372 then
373         if test "$with_assertions" = no
374         then
375                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
376         else
377                 CF_ADD_ADAFLAGS(-gnata)
378         fi
379 fi
380
381 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
382 AC_DEFINE(HAVE_NC_ALLOC_H,1,[Define to 1 if we have nc_alloc.h header])
383
384 ###     use option --enable-expanded to generate certain macros as functions
385 AC_ARG_ENABLE(expanded,
386         [  --enable-expanded       test: generate functions for certain macros],
387         [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED,1,[Define to 1 if ncurses macros should be expanded as functions])])
388
389 ###     use option --disable-macros to suppress macros in favor of functions
390 AC_ARG_ENABLE(macros,
391         [  --disable-macros        test: use functions rather than macros],
392         [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS,1,[Define to 1 if ncurses macros should be expanded as functions])])
393
394 # Normally we only add trace() to the debug-library.  Allow this to be
395 # extended to all models of the ncurses library:
396 cf_all_traces=no
397 case "$CFLAGS $CPPFLAGS" in
398 (*-DTRACE*)
399         cf_all_traces=yes
400         ;;
401 esac
402
403 AC_MSG_CHECKING(whether to add trace feature to all models)
404 AC_ARG_WITH(trace,
405 [  --with-trace            test: add trace() function to all models of ncurses],
406 [cf_with_trace=$withval],
407 [cf_with_trace=$cf_all_traces])
408 AC_MSG_RESULT($cf_with_trace)
409
410 if test "$cf_with_trace" = yes ; then
411         ADA_TRACE=TRUE
412         CF_ADD_CFLAGS(-DTRACE)
413 else
414         ADA_TRACE=FALSE
415 fi
416
417 AC_SUBST(ADA_TRACE)
418
419 CF_DISABLE_GNAT_PROJECTS
420
421 ###     Checks for libraries.
422 case $cf_cv_system_name in
423 (*mingw32*)
424         CF_CHECK_LIBSSP
425         ;;
426 (*)
427 AC_CHECK_FUNC(gettimeofday,
428         AC_DEFINE(HAVE_GETTIMEOFDAY),[
429
430 AC_CHECK_LIB(bsd, gettimeofday,
431         AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday])
432         LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
433         ;;
434 esac
435
436 ###     Checks for header files.
437 AC_CHECK_SIZEOF([signed char])
438 AC_STDC_HEADERS
439 AC_HEADER_DIRENT
440 AC_HEADER_TIME
441
442 ###     checks for compiler characteristics
443 AC_LANG_C
444 AC_C_CONST
445
446 ###     Checks for external-data
447 CF_LINK_DATAONLY
448
449 ###     Checks for library functions.
450 CF_MKSTEMP
451
452 dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
453 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
454         CF_STRIP_G_OPT(CFLAGS)
455         CF_STRIP_G_OPT(CXXFLAGS)
456 fi
457
458 CF_HELP_MESSAGE(Ada95 Binding Options:)
459 cf_with_ada=yes
460 dnl Check for availability of GNU Ada Translator (GNAT).
461 dnl At the moment we support no other Ada95 compiler.
462 if test "$cf_with_ada" != "no" ; then
463         CF_PROG_GNAT
464         if test "$cf_cv_prog_gnat_correct" = yes; then
465                 CF_FIXUP_ADAFLAGS
466
467                 CF_GNATPREP_OPT_T
468
469                 CF_GNAT_GENERICS
470                 CF_GNAT_SIGINT
471                 CF_GNAT_PROJECTS
472
473                 CF_WITH_ADA_COMPILER
474
475                 cf_ada_package=terminal_interface
476                 AC_SUBST(cf_ada_package)
477
478                 CF_WITH_ADA_INCLUDE
479                 CF_WITH_ADA_OBJECTS
480                 CF_WITH_ADA_SHAREDLIB
481
482                 # allow the Ada binding to be renamed
483                 CF_WITH_ADA_LIBNAME(AdaCurses)
484         else
485                 AC_MSG_ERROR(No usable Ada compiler found)
486         fi
487 else
488         AC_MSG_ERROR(The Ada compiler is needed for this package)
489 fi
490
491 ################################################################################
492
493 # not needed
494 TINFO_LDFLAGS2=
495 AC_SUBST(TINFO_LDFLAGS2)
496 TINFO_LIBS=
497 AC_SUBST(TINFO_LIBS)
498
499 ### Construct the list of include-directories to be generated
500 CF_INCLUDE_DIRS
501 CF_ADA_INCLUDE_DIRS
502
503 ### Build up pieces for makefile rules
504 AC_MSG_CHECKING(default library suffix)
505 CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
506 AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
507 AC_MSG_RESULT($DFT_ARG_SUFFIX)
508
509 AC_MSG_CHECKING(default library-dependency suffix)
510 CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_LIB_SUFFIX,DFT_DEP_SUFFIX)dnl
511 AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
512 AC_MSG_RESULT($DFT_DEP_SUFFIX)
513
514 AC_MSG_CHECKING(default object directory)
515 CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
516 AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
517 AC_MSG_RESULT($DFT_OBJ_SUBDIR)
518
519 ### Set up low-level terminfo dependencies for makefiles.
520
521 if test "$DFT_LWR_MODEL" = shared ; then
522         case $cf_cv_system_name in
523         (cygwin*)
524                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
525                 ;;
526         (msys*)
527                 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
528                 ;;
529         esac
530 fi
531
532 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
533 AC_SUBST(USE_ARG_SUFFIX)
534
535 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
536 AC_SUBST(USE_LIB_SUFFIX)
537
538 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
539 AC_SUBST(USE_CFG_SUFFIX)
540
541 ### Construct the list of subdirectories for which we'll customize makefiles
542 ### with the appropriate compile-rules.
543
544 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
545
546 AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR',[Define to override ':' as the library path-separator])
547
548 ################################################################################
549
550 TEST_ARG2=
551 AC_SUBST(TEST_ARG2)
552
553 TEST_LIBS2=
554 AC_SUBST(TEST_LIBS2)
555
556 dnl for separate build, this is good enough for "sh $(top_srcdir)/misc/shlib"
557 NCURSES_SHLIB2="sh -c"
558 AC_SUBST(NCURSES_SHLIB2)
559
560 ADA_SUBDIRS="include gen src doc"
561 if test "x$cf_with_tests" != "xno" ; then
562         ADA_SUBDIRS="$ADA_SUBDIRS samples"
563 fi
564 for cf_dir in $ADA_SUBDIRS
565 do
566         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
567 done
568 AC_SUBST(ADA_SUBDIRS)
569
570 NCURSES_TREE="#"
571 AC_SUBST(NCURSES_TREE)
572
573 EXTERNAL_TREE=
574 AC_SUBST(EXTERNAL_TREE)
575
576 # match layout used by make-tar.sh
577 ADAHTML_DIR=../doc/ada
578 AC_SUBST(ADAHTML_DIR)
579
580 if test "x$cross_compiling" = xyes ; then
581         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
582 else
583         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
584 fi
585
586 AC_SUBST(ADAGEN_LDFLAGS)
587
588 AC_OUTPUT( \
589         $SUB_MAKEFILES \
590         src/library.gpr:src/library.gpr.in \
591         doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in \
592         Makefile,[
593 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
594 if test -z "$USE_OLD_MAKERULES" ; then
595         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
596 fi
597 ],[
598 ### Special initialization commands, used to pass information from the
599 ### configuration-run into config.status
600
601 AWK="$AWK"
602 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
603 DFT_LWR_MODEL="$DFT_LWR_MODEL"
604 LIB_NAME="$LIB_NAME"
605 LIB_PREFIX="$LIB_PREFIX"
606 LIB_SUFFIX="$LIB_SUFFIX"
607 LN_S="$LN_S"
608 NCURSES_MAJOR="$NCURSES_MAJOR"
609 NCURSES_MINOR="$NCURSES_MINOR"
610 NCURSES_PATCH="$NCURSES_PATCH"
611 PACKAGE="$PACKAGE"
612 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
613 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
614 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
615 cf_cv_abi_version="$cf_cv_abi_version"
616 cf_cv_rel_version="$cf_cv_rel_version"
617 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
618 cf_cv_shared_soname='$cf_cv_shared_soname'
619 cf_cv_shlib_version="$cf_cv_shlib_version"
620 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
621 cf_cv_system_name="$cf_cv_system_name"
622 host="$host"
623 target="$target"
624
625 ],cat)dnl
626 ${MAKE:-make} preinstall