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