b6d022874e022e949668ff906991b4df409cbfe6
[ncurses.git] / Ada95 / configure.in
1 dnl***************************************************************************
2 dnl Copyright (c) 2010,2011 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.32 2011/07/16 21:53:28 tom Exp $
32 dnl Process this file with autoconf to produce a configure script.
33 dnl
34 dnl See http://invisible-island.net/autoconf/ for additional information.
35 dnl
36 dnl ---------------------------------------------------------------------------
37 AC_PREREQ(2.13.20020210)
38 AC_REVISION($Revision: 1.32 $)
39 AC_INIT(gen/gen.c)
40 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
41
42 CF_TOP_BUILDDIR
43
44 CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
45 AC_ARG_WITH(system-type,
46 [  --with-system-type=XXX  test: override derived host system-type],
47 [AC_MSG_WARN(overriding system type to $withval)
48  cf_cv_system_name=$withval])
49
50 ###     Save the given $CFLAGS to allow user-override.
51 cf_user_CFLAGS="$CFLAGS"
52
53 ###     Default install-location
54 CF_CFG_DEFAULTS
55
56 ###     Checks for programs.
57 AC_PROG_CC
58 CF_GCC_VERSION
59
60 AC_PROG_CPP
61 AC_PROG_GCC_TRADITIONAL
62 CF_PROG_CC_C_O(CC)
63 AC_ISC_POSIX
64 CF_ANSI_CC_REQD
65 CF_PROG_EXT
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 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_ENABLE_PC_FILES
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
113 dnl Special option for use by system-builders: the install-prefix is used to
114 dnl adjust the location into which the actual install is done, so that an
115 dnl archive can be built without modifying the host system's configuration.
116 AC_MSG_CHECKING(if you have specified an install-prefix)
117 AC_ARG_WITH(install-prefix,
118         [  --with-install-prefix   prefixes actual install-location ($DESTDIR)],
119         [case "$withval" in #(vi
120         yes|no) #(vi
121                 ;;
122         *)      DESTDIR="$withval"
123                 ;;
124         esac])
125 AC_MSG_RESULT($DESTDIR)
126 AC_SUBST(DESTDIR)
127
128 ###############################################################################
129 CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:)
130 # If we're cross-compiling, allow the user to override the tools and their
131 # options.  The configure script is oriented toward identifying the host
132 # compiler, etc., but we need a build compiler to generate parts of the source.
133 CF_BUILD_CC
134
135 ###############################################################################
136 CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
137
138 ### Options to allow the user to specify the set of libraries which are used.
139 ### Use "--without-normal --with-shared" to allow the default model to be
140 ### shared, for example.
141 cf_list_models=""
142
143 AC_MSG_CHECKING(if you want to build shared C-objects)
144 AC_ARG_WITH(shared,
145         [  --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)],
146         [with_shared=$withval],
147         [with_shared=no])
148 AC_MSG_RESULT($with_shared)
149 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
150
151 AC_MSG_CHECKING(for specified models)
152 test -z "$cf_list_models" && cf_list_models=normal
153 AC_MSG_RESULT($cf_list_models)
154
155 ### Use the first model as the default, and save its suffix for use in building
156 ### up test-applications.
157 AC_MSG_CHECKING(for default model)
158 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
159 AC_MSG_RESULT($DFT_LWR_MODEL)
160
161 CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
162
163 AC_SUBST(DFT_LWR_MODEL)dnl      the default model ("normal")
164 AC_SUBST(DFT_UPR_MODEL)dnl      the default model ("NORMAL")
165
166 CF_NCURSES_ADDON
167
168 CF_LIB_PREFIX(cf_prefix)
169 LIB_PREFIX=$cf_prefix
170 AC_SUBST(LIB_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 AC_MSG_CHECKING(if you want broken-linker support code)
219 AC_ARG_ENABLE(broken_linker,
220         [  --enable-broken_linker  compile with broken-linker support code],
221         [with_broken_linker=$enableval],
222         [with_broken_linker=${BROKEN_LINKER:-no}])
223 AC_MSG_RESULT($with_broken_linker)
224
225 BROKEN_LINKER=0
226 if test "$with_broken_linker" = yes ; then
227         AC_DEFINE(BROKEN_LINKER)
228         BROKEN_LINKER=1
229 elif test "$DFT_LWR_MODEL" = shared ; then
230         case $cf_cv_system_name in #(vi
231         cygwin*)
232                 AC_DEFINE(BROKEN_LINKER)
233                 BROKEN_LINKER=1
234                 CF_VERBOSE(cygwin linker is broken anyway)
235                 ;;
236         esac
237 fi
238 AC_SUBST(BROKEN_LINKER)
239
240 # Check to define _XOPEN_SOURCE "automatically"
241 CF_XOPEN_SOURCE
242
243 CF_LARGEFILE
244
245 ### Enable compiling-in rcs id's
246 AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
247 AC_ARG_WITH(rcs-ids,
248         [  --with-rcs-ids          compile-in RCS identifiers],
249         [with_rcs_ids=$withval],
250         [with_rcs_ids=no])
251 AC_MSG_RESULT($with_rcs_ids)
252 test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
253
254 ###############################################################################
255 CF_HELP_MESSAGE(Extensions:)
256
257 ### Note that some functions (such as const) are normally disabled anyway.
258 AC_MSG_CHECKING(if you want to build with function extensions)
259 AC_ARG_ENABLE(ext-funcs,
260         [  --disable-ext-funcs     disable function-extensions],
261         [with_ext_funcs=$enableval],
262         [with_ext_funcs=yes])
263 AC_MSG_RESULT($with_ext_funcs)
264 if test "$with_ext_funcs" = yes ; then
265         NCURSES_EXT_FUNCS=1
266         AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
267         AC_DEFINE(NCURSES_EXT_FUNCS)
268 else
269         NCURSES_EXT_FUNCS=0
270 fi
271 AC_SUBST(NCURSES_EXT_FUNCS)
272
273 ###   use option --enable-const to turn on use of const beyond that in XSI.
274 AC_MSG_CHECKING(for extended use of const keyword)
275 AC_ARG_ENABLE(const,
276         [  --enable-const          compile with extra/non-standard const],
277         [with_ext_const=$enableval],
278         [with_ext_const=no])
279 AC_MSG_RESULT($with_ext_const)
280 NCURSES_CONST='/*nothing*/'
281 if test "$with_ext_const" = yes ; then
282         NCURSES_CONST=const
283 fi
284 AC_SUBST(NCURSES_CONST)
285
286 ###############################################################################
287 # These options are relatively safe to experiment with.
288 CF_HELP_MESSAGE(Development Code:)
289 AC_MSG_CHECKING(if you want all development code)
290 AC_ARG_WITH(develop,
291         [  --without-develop       disable development options],
292         [with_develop=$withval],
293         [with_develop=no])
294 AC_MSG_RESULT($with_develop)
295
296 ###############################################################################
297 # These are just experimental, probably should not be in a package:
298 CF_HELP_MESSAGE(Experimental Code:)
299
300 # This is still experimental (20080329), but should ultimately be moved to
301 # the script-block --with-normal, etc.
302 CF_WITH_PTHREAD
303
304 AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
305 AC_ARG_ENABLE(weak-symbols,
306     [  --enable-weak-symbols   enable weak-symbols for pthreads],
307     [use_weak_symbols=$withval],
308     [use_weak_symbols=no])
309 AC_MSG_RESULT($use_weak_symbols)
310 if test "$use_weak_symbols" = yes ; then
311     CF_WEAK_SYMBOLS
312 else
313     cf_cv_weak_symbols=no
314 fi
315
316 if test $cf_cv_weak_symbols = yes ; then
317     AC_DEFINE(USE_WEAK_SYMBOLS)
318 fi
319
320 PTHREAD=
321 if test "$with_pthread" = "yes" ; then
322     AC_DEFINE(USE_PTHREADS)
323     enable_reentrant=yes
324     if test $cf_cv_weak_symbols = yes ; then
325         PTHREAD=-lpthread
326     fi
327 fi
328 AC_SUBST(PTHREAD)
329
330 # OpenSUSE is installing ncurses6, using reentrant option.
331 AC_CHECK_FUNC(_nc_TABSIZE,[assume_reentrant=yes], [assume_reentrant=no])
332
333 # Reentrant code has to be opaque; there's little advantage to making ncurses
334 # opaque outside of that, so there is no --enable-opaque option.  We can use
335 # this option without --with-pthreads, but this will be always set for
336 # pthreads.
337 AC_MSG_CHECKING(if you want experimental reentrant code)
338 AC_ARG_ENABLE(reentrant,
339         [  --enable-reentrant      compile with experimental reentrant code],
340         [with_reentrant=$enableval],
341         [with_reentrant=$assume_reentrant])
342 AC_MSG_RESULT($with_reentrant)
343 if test "$with_reentrant" = yes ; then
344         cf_cv_enable_reentrant=1
345         if test $cf_cv_weak_symbols = yes ; then
346                 CF_REMOVE_LIB(LIBS,$LIBS,pthread)
347         elif test "$assume_reentrant" = no ; then
348                 LIB_SUFFIX="t${LIB_SUFFIX}"
349         fi
350         AC_DEFINE(USE_REENTRANT)
351 else
352         cf_cv_enable_reentrant=0
353 fi
354 AC_SUBST(cf_cv_enable_reentrant)
355
356 ### Allow using a different wrap-prefix
357 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
358         AC_MSG_CHECKING(for prefix used to wrap public variables)
359         AC_ARG_WITH(wrap-prefix,
360                 [  --with-wrap-prefix=XXX  override prefix used for public variables],
361                 [NCURSES_WRAP_PREFIX=$withval],
362                 [NCURSES_WRAP_PREFIX=_nc_])
363         AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
364 else
365         NCURSES_WRAP_PREFIX=_nc_
366 fi
367 AC_SUBST(NCURSES_WRAP_PREFIX)
368 AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX")
369
370 ###############################################################################
371 CF_HELP_MESSAGE(Testing/development Options:)
372
373 ###     use option --disable-echo to suppress full display compiling commands
374 AC_MSG_CHECKING(if you want to display full commands during build)
375 AC_ARG_ENABLE(echo,
376         [  --enable-echo           build: display "compiling" commands (default)],
377         [with_echo=$enableval],
378         [with_echo=yes])
379 if test "$with_echo" = yes; then
380         ECHO_LINK=
381 else
382         ECHO_LINK='@ echo linking $@ ... ;'
383 fi
384 AC_MSG_RESULT($with_echo)
385 AC_SUBST(ECHO_LINK)
386
387 ###     use option --enable-warnings to turn on all gcc warnings
388 AC_MSG_CHECKING(if you want to see compiler warnings)
389 AC_ARG_ENABLE(warnings,
390         [  --enable-warnings       build: turn on GCC compiler warnings],
391         [with_warnings=$enableval])
392 AC_MSG_RESULT($with_warnings)
393
394 if test "x$with_warnings" = "xyes"; then
395         CF_ADD_ADAFLAGS(-gnatg)
396         CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
397 fi
398 CF_GCC_ATTRIBUTES
399
400 ###     use option --enable-assertions to turn on generation of assertion code
401 AC_MSG_CHECKING(if you want to enable runtime assertions)
402 AC_ARG_ENABLE(assertions,
403         [  --enable-assertions     test: turn on generation of assertion code],
404         [with_assertions=$enableval],
405         [with_assertions=no])
406 AC_MSG_RESULT($with_assertions)
407 if test -n "$GCC"
408 then
409         if test "$with_assertions" = no
410         then
411                 AC_DEFINE(NDEBUG)
412                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
413         else
414                 CF_ADD_ADAFLAGS(-gnata)
415         fi
416 fi
417
418 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
419 AC_DEFINE(HAVE_NC_ALLOC_H)
420
421 ###     use option --enable-expanded to generate certain macros as functions
422 AC_ARG_ENABLE(expanded,
423         [  --enable-expanded       test: generate functions for certain macros],
424         [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED)])
425
426 ###     use option --disable-macros to suppress macros in favor of functions
427 AC_ARG_ENABLE(macros,
428         [  --disable-macros        test: use functions rather than macros],
429         [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)])
430
431 # Normally we only add trace() to the debug-library.  Allow this to be
432 # extended to all models of the ncurses library:
433 cf_all_traces=no
434 case "$CFLAGS $CPPFLAGS" in
435 *-DTRACE*)
436         cf_all_traces=yes
437         ;;
438 esac
439
440 AC_MSG_CHECKING(whether to add trace feature to all models)
441 AC_ARG_WITH(trace,
442 [  --with-trace            test: add trace() function to all models of ncurses],
443 [cf_with_trace=$withval],
444 [cf_with_trace=$cf_all_traces])
445 AC_MSG_RESULT($cf_with_trace)
446
447 if test "$cf_with_trace" = yes ; then
448         ADA_TRACE=TRUE
449         CF_ADD_CFLAGS(-DTRACE)
450 else
451         ADA_TRACE=FALSE
452 fi
453
454 AC_SUBST(ADA_TRACE)
455
456 ###     Checks for libraries.
457 case $cf_cv_system_name in #(vi
458 *mingw32*) #(vi
459         ;;
460 *)
461 AC_CHECK_FUNC(gettimeofday,
462         AC_DEFINE(HAVE_GETTIMEOFDAY),[
463
464 AC_CHECK_LIB(bsd, gettimeofday,
465         AC_DEFINE(HAVE_GETTIMEOFDAY)
466         LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
467         ;;
468 esac
469
470 ###     Checks for header files.
471 AC_STDC_HEADERS
472 AC_HEADER_DIRENT
473 AC_HEADER_TIME
474
475 ###     checks for compiler characteristics
476 AC_LANG_C
477 AC_C_CONST
478
479 ###     Checks for external-data
480 CF_LINK_DATAONLY
481
482 ###     Checks for library functions.
483 CF_MKSTEMP
484
485 AC_TYPE_SIGNAL
486
487 dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
488 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
489         CF_STRIP_G_OPT(CFLAGS)
490         CF_STRIP_G_OPT(CXXFLAGS)
491 fi
492
493 CF_HELP_MESSAGE(Ada95 Binding Options:)
494
495 dnl Check for availability of GNU Ada Translator (GNAT).
496 dnl At the moment we support no other Ada95 compiler.
497 if test "$cf_with_ada" != "no" ; then
498         CF_PROG_GNAT
499         if test "$cf_cv_prog_gnat_correct" = yes; then
500
501                 # make ADAFLAGS consistent with CFLAGS
502                 case "$CFLAGS" in
503                 *-g*)
504                         CF_ADD_ADAFLAGS(-g)
505                         ;;
506                 esac
507                 case "$CFLAGS" in
508                 *-O*)
509                         CF_ADD_ADAFLAGS(-O3)
510                         ;;
511                 esac
512
513                 CF_GNAT_GENERICS
514                 CF_GNAT_SIGINT
515                 CF_GNAT_PRAGMA_UNREF
516                 CF_GNAT_PROJECTS
517
518                 CF_WITH_ADA_COMPILER
519
520                 cf_ada_package=terminal_interface
521                 AC_SUBST(cf_ada_package)
522
523                 CF_WITH_ADA_INCLUDE
524                 CF_WITH_ADA_OBJECTS
525                 CF_WITH_ADA_SHAREDLIB
526         else
527                 AC_MSG_ERROR(No usable Ada compiler found)
528         fi
529 else
530         AC_MSG_ERROR(The Ada compiler is needed for this package)
531 fi
532
533 ################################################################################
534
535 # not needed
536 TINFO_ARGS2=
537 AC_SUBST(TINFO_ARGS2)
538
539 ### Construct the list of include-directories to be generated
540 CF_INCLUDE_DIRS
541 CF_ADA_INCLUDE_DIRS
542
543 ### Build up pieces for makefile rules
544 AC_MSG_CHECKING(default library suffix)
545 CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
546 AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
547 AC_MSG_RESULT($DFT_ARG_SUFFIX)
548
549 AC_MSG_CHECKING(default library-dependency suffix)
550 CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_LIB_SUFFIX,DFT_DEP_SUFFIX)dnl
551 AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
552 AC_MSG_RESULT($DFT_DEP_SUFFIX)
553
554 AC_MSG_CHECKING(default object directory)
555 CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
556 AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
557 AC_MSG_RESULT($DFT_OBJ_SUBDIR)
558
559 ### Set up low-level terminfo dependencies for makefiles.
560
561 if test "$DFT_LWR_MODEL" = shared ; then
562         case $cf_cv_system_name in #(vi
563         cygwin*)
564                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
565                 ;;
566         esac
567 fi
568
569 ### Construct the list of subdirectories for which we'll customize makefiles
570 ### with the appropriate compile-rules.
571
572 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
573
574 AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR')
575
576 ### Now that we're done running tests, add the compiler-warnings, if any
577 CF_ADD_CFLAGS($EXTRA_CFLAGS)
578
579 ################################################################################
580
581 if test x"$enable_pc_files" = xyes ; then \
582 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
583 MAKE_PC_FILES=
584 else
585 MAKE_PC_FILES="#"
586 fi
587 AC_SUBST(MAKE_PC_FILES)
588 AC_SUBST(cross_compiling)
589
590 ################################################################################
591
592 TEST_ARG2=
593 AC_SUBST(TEST_ARG2)
594
595 TEST_LIBS2=
596 AC_SUBST(TEST_LIBS2)
597
598 dnl for separate build, this is good enough for "sh $(top_srcdir)/misc/shlib"
599 NCURSES_SHLIB2="sh -c"
600 AC_SUBST(NCURSES_SHLIB2)
601
602 ADA_SUBDIRS="include gen src doc"
603 if test "x$cf_with_tests" != "xno" ; then
604         ADA_SUBDIRS="$ADA_SUBDIRS samples"
605 fi
606 for cf_dir in $ADA_SUBDIRS
607 do
608         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
609 done
610 AC_SUBST(ADA_SUBDIRS)
611
612 NCURSES_TREE="#"
613 AC_SUBST(NCURSES_TREE)
614
615 EXTERNAL_TREE=
616 AC_SUBST(EXTERNAL_TREE)
617
618 # match layout used by make-tar.sh
619 ADAHTML_DIR=../doc/ada
620 AC_SUBST(ADAHTML_DIR)
621
622 AC_OUTPUT( \
623         $SUB_MAKEFILES \
624         doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in \
625         Makefile,[
626 if test -z "$USE_OLD_MAKERULES" ; then
627         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
628 fi
629 ],[
630 ### Special initialization commands, used to pass information from the
631 ### configuration-run into config.status
632
633 AWK="$AWK"
634 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
635 DFT_LWR_MODEL="$DFT_LWR_MODEL"
636 ECHO_LINK="$ECHO_LINK"
637 LIB_NAME="$LIB_NAME"
638 LIB_SUFFIX="$LIB_SUFFIX"
639 LN_S="$LN_S"
640 NCURSES_MAJOR="$NCURSES_MAJOR"
641 NCURSES_MINOR="$NCURSES_MINOR"
642 NCURSES_PATCH="$NCURSES_PATCH"
643 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
644 cf_cv_abi_version="$cf_cv_abi_version"
645 cf_cv_rel_version="$cf_cv_rel_version"
646 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
647 cf_cv_shared_soname='$cf_cv_shared_soname'
648 cf_cv_shlib_version="$cf_cv_shlib_version"
649 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
650 cf_cv_system_name="$cf_cv_system_name"
651 host="$host"
652 target="$target"
653
654 ],cat)dnl
655 ${MAKE:-make} preinstall