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