]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure.in
ncurses 5.9 - patch 20111112
[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.36 2011/10/22 19:02:53 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.36 $)
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_WITH_PKG_CONFIG_LIBDIR
79 CF_ENABLE_PC_FILES
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
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 #(vi
121         yes|no) #(vi
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_LIB_PREFIX(cf_prefix)
170 LIB_PREFIX=$cf_prefix
171 AC_SUBST(LIB_PREFIX)
172
173 LIB_SUFFIX=
174 AC_SUBST(LIB_SUFFIX)
175
176 ###############################################################################
177
178 dnl Not all ports of gcc support the -g option
179
180 if test X"$CC_G_OPT" = X"" ; then
181         CC_G_OPT='-g'
182         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
183 fi
184 AC_SUBST(CC_G_OPT)
185
186 AC_MSG_CHECKING(for default loader flags)
187 case $DFT_LWR_MODEL in
188 normal)  LD_MODEL=''   ;;
189 debug)   LD_MODEL=$CC_G_OPT ;;
190 profile) LD_MODEL='-pg';;
191 shared)  LD_MODEL=''   ;;
192 esac
193 AC_SUBST(LD_MODEL)dnl           the type of link (e.g., -g or -pg)
194 AC_MSG_RESULT($LD_MODEL)
195
196 CF_SHARED_OPTS
197
198 # The test/sample programs in the original tree link using rpath option.
199 # Make it optional for packagers.
200 if test -n "$LOCAL_LDFLAGS"
201 then
202         AC_MSG_CHECKING(if you want to link sample programs with rpath option)
203         AC_ARG_ENABLE(rpath-link,
204                 [  --enable-rpath-link     link sample programs with rpath option],
205                 [with_rpath_link=$enableval],
206                 [with_rpath_link=yes])
207         AC_MSG_RESULT($with_rpath_link)
208         if test "$with_rpath_link" = no
209         then
210                 LOCAL_LDFLAGS=
211                 LOCAL_LDFLAGS2=
212         fi
213 fi
214
215 ###############################################################################
216 CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
217
218 ###   use option --enable-broken-linker to force on use of broken-linker support
219 AC_MSG_CHECKING(if you want broken-linker support code)
220 AC_ARG_ENABLE(broken_linker,
221         [  --enable-broken_linker  compile with broken-linker support code],
222         [with_broken_linker=$enableval],
223         [with_broken_linker=${BROKEN_LINKER:-no}])
224 AC_MSG_RESULT($with_broken_linker)
225
226 BROKEN_LINKER=0
227 if test "$with_broken_linker" = yes ; then
228         AC_DEFINE(BROKEN_LINKER)
229         BROKEN_LINKER=1
230 elif test "$DFT_LWR_MODEL" = shared ; then
231         case $cf_cv_system_name in #(vi
232         cygwin*)
233                 AC_DEFINE(BROKEN_LINKER)
234                 BROKEN_LINKER=1
235                 CF_VERBOSE(cygwin linker is broken anyway)
236                 ;;
237         esac
238 fi
239 AC_SUBST(BROKEN_LINKER)
240
241 # Check to define _XOPEN_SOURCE "automatically"
242 CF_XOPEN_SOURCE
243
244 CF_LARGEFILE
245
246 ### Enable compiling-in rcs id's
247 AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
248 AC_ARG_WITH(rcs-ids,
249         [  --with-rcs-ids          compile-in RCS identifiers],
250         [with_rcs_ids=$withval],
251         [with_rcs_ids=no])
252 AC_MSG_RESULT($with_rcs_ids)
253 test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
254
255 ###############################################################################
256 CF_HELP_MESSAGE(Extensions:)
257
258 ### Note that some functions (such as const) are normally disabled anyway.
259 AC_MSG_CHECKING(if you want to build with function extensions)
260 AC_ARG_ENABLE(ext-funcs,
261         [  --disable-ext-funcs     disable function-extensions],
262         [with_ext_funcs=$enableval],
263         [with_ext_funcs=yes])
264 AC_MSG_RESULT($with_ext_funcs)
265 if test "$with_ext_funcs" = yes ; then
266         NCURSES_EXT_FUNCS=1
267         AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
268         AC_DEFINE(NCURSES_EXT_FUNCS)
269 else
270         NCURSES_EXT_FUNCS=0
271 fi
272 AC_SUBST(NCURSES_EXT_FUNCS)
273
274 ###   use option --enable-const to turn on use of const beyond that in XSI.
275 AC_MSG_CHECKING(for extended use of const keyword)
276 AC_ARG_ENABLE(const,
277         [  --enable-const          compile with extra/non-standard const],
278         [with_ext_const=$enableval],
279         [with_ext_const=no])
280 AC_MSG_RESULT($with_ext_const)
281 NCURSES_CONST='/*nothing*/'
282 if test "$with_ext_const" = yes ; then
283         NCURSES_CONST=const
284 fi
285 AC_SUBST(NCURSES_CONST)
286
287 ###############################################################################
288 # These options are relatively safe to experiment with.
289 CF_HELP_MESSAGE(Development Code:)
290 AC_MSG_CHECKING(if you want all development code)
291 AC_ARG_WITH(develop,
292         [  --without-develop       disable development options],
293         [with_develop=$withval],
294         [with_develop=no])
295 AC_MSG_RESULT($with_develop)
296
297 ###############################################################################
298 # These are just experimental, probably should not be in a package:
299 CF_HELP_MESSAGE(Experimental Code:)
300
301 # This is still experimental (20080329), but should ultimately be moved to
302 # the script-block --with-normal, etc.
303 CF_WITH_PTHREAD
304
305 AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
306 AC_ARG_ENABLE(weak-symbols,
307     [  --enable-weak-symbols   enable weak-symbols for pthreads],
308     [use_weak_symbols=$withval],
309     [use_weak_symbols=no])
310 AC_MSG_RESULT($use_weak_symbols)
311 if test "$use_weak_symbols" = yes ; then
312     CF_WEAK_SYMBOLS
313 else
314     cf_cv_weak_symbols=no
315 fi
316
317 if test $cf_cv_weak_symbols = yes ; then
318     AC_DEFINE(USE_WEAK_SYMBOLS)
319 fi
320
321 PTHREAD=
322 if test "$with_pthread" = "yes" ; then
323     AC_DEFINE(USE_PTHREADS)
324     enable_reentrant=yes
325     if test $cf_cv_weak_symbols = yes ; then
326         PTHREAD=-lpthread
327     fi
328 fi
329 AC_SUBST(PTHREAD)
330
331 # OpenSUSE is installing ncurses6, using reentrant option.
332 AC_CHECK_FUNC(_nc_TABSIZE,[assume_reentrant=yes], [assume_reentrant=no])
333
334 # Reentrant code has to be opaque; there's little advantage to making ncurses
335 # opaque outside of that, so there is no --enable-opaque option.  We can use
336 # this option without --with-pthreads, but this will be always set for
337 # pthreads.
338 AC_MSG_CHECKING(if you want experimental reentrant code)
339 AC_ARG_ENABLE(reentrant,
340         [  --enable-reentrant      compile with experimental reentrant code],
341         [with_reentrant=$enableval],
342         [with_reentrant=$assume_reentrant])
343 AC_MSG_RESULT($with_reentrant)
344 if test "$with_reentrant" = yes ; then
345         cf_cv_enable_reentrant=1
346         if test $cf_cv_weak_symbols = yes ; then
347                 CF_REMOVE_LIB(LIBS,$LIBS,pthread)
348         elif test "$assume_reentrant" = no ; then
349                 LIB_SUFFIX="t${LIB_SUFFIX}"
350         fi
351         AC_DEFINE(USE_REENTRANT)
352 else
353         cf_cv_enable_reentrant=0
354 fi
355 AC_SUBST(cf_cv_enable_reentrant)
356
357 ### Allow using a different wrap-prefix
358 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
359         AC_MSG_CHECKING(for prefix used to wrap public variables)
360         AC_ARG_WITH(wrap-prefix,
361                 [  --with-wrap-prefix=XXX  override prefix used for public variables],
362                 [NCURSES_WRAP_PREFIX=$withval],
363                 [NCURSES_WRAP_PREFIX=_nc_])
364         AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
365 else
366         NCURSES_WRAP_PREFIX=_nc_
367 fi
368 AC_SUBST(NCURSES_WRAP_PREFIX)
369 AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX")
370
371 ###############################################################################
372 CF_HELP_MESSAGE(Testing/development Options:)
373
374 ###     use option --disable-echo to suppress full display compiling commands
375 AC_MSG_CHECKING(if you want to display full commands during build)
376 AC_ARG_ENABLE(echo,
377         [  --enable-echo           build: display "compiling" commands (default)],
378         [with_echo=$enableval],
379         [with_echo=yes])
380 if test "$with_echo" = yes; then
381         ECHO_LINK=
382 else
383         ECHO_LINK='@ echo linking $@ ... ;'
384 fi
385 AC_MSG_RESULT($with_echo)
386 AC_SUBST(ECHO_LINK)
387
388 ###     use option --enable-warnings to turn on all gcc warnings
389 AC_MSG_CHECKING(if you want to see compiler warnings)
390 AC_ARG_ENABLE(warnings,
391         [  --enable-warnings       build: turn on GCC compiler warnings],
392         [with_warnings=$enableval])
393 AC_MSG_RESULT($with_warnings)
394
395 if test "x$with_warnings" = "xyes"; then
396         CF_ADD_ADAFLAGS(-gnatg)
397         CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
398 fi
399 CF_GCC_ATTRIBUTES
400
401 ###     use option --enable-assertions to turn on generation of assertion code
402 AC_MSG_CHECKING(if you want to enable runtime assertions)
403 AC_ARG_ENABLE(assertions,
404         [  --enable-assertions     test: turn on generation of assertion code],
405         [with_assertions=$enableval],
406         [with_assertions=no])
407 AC_MSG_RESULT($with_assertions)
408 if test -n "$GCC"
409 then
410         if test "$with_assertions" = no
411         then
412                 AC_DEFINE(NDEBUG)
413                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
414         else
415                 CF_ADD_ADAFLAGS(-gnata)
416         fi
417 fi
418
419 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
420 AC_DEFINE(HAVE_NC_ALLOC_H)
421
422 ###     use option --enable-expanded to generate certain macros as functions
423 AC_ARG_ENABLE(expanded,
424         [  --enable-expanded       test: generate functions for certain macros],
425         [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED)])
426
427 ###     use option --disable-macros to suppress macros in favor of functions
428 AC_ARG_ENABLE(macros,
429         [  --disable-macros        test: use functions rather than macros],
430         [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)])
431
432 # Normally we only add trace() to the debug-library.  Allow this to be
433 # extended to all models of the ncurses library:
434 cf_all_traces=no
435 case "$CFLAGS $CPPFLAGS" in
436 *-DTRACE*)
437         cf_all_traces=yes
438         ;;
439 esac
440
441 AC_MSG_CHECKING(whether to add trace feature to all models)
442 AC_ARG_WITH(trace,
443 [  --with-trace            test: add trace() function to all models of ncurses],
444 [cf_with_trace=$withval],
445 [cf_with_trace=$cf_all_traces])
446 AC_MSG_RESULT($cf_with_trace)
447
448 if test "$cf_with_trace" = yes ; then
449         ADA_TRACE=TRUE
450         CF_ADD_CFLAGS(-DTRACE)
451 else
452         ADA_TRACE=FALSE
453 fi
454
455 AC_SUBST(ADA_TRACE)
456
457 ###     Checks for libraries.
458 case $cf_cv_system_name in #(vi
459 *mingw32*) #(vi
460         ;;
461 *)
462 AC_CHECK_FUNC(gettimeofday,
463         AC_DEFINE(HAVE_GETTIMEOFDAY),[
464
465 AC_CHECK_LIB(bsd, gettimeofday,
466         AC_DEFINE(HAVE_GETTIMEOFDAY)
467         LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
468         ;;
469 esac
470
471 ###     Checks for header files.
472 AC_STDC_HEADERS
473 AC_HEADER_DIRENT
474 AC_HEADER_TIME
475
476 ###     checks for compiler characteristics
477 AC_LANG_C
478 AC_C_CONST
479
480 ###     Checks for external-data
481 CF_LINK_DATAONLY
482
483 ###     Checks for library functions.
484 CF_MKSTEMP
485
486 AC_TYPE_SIGNAL
487
488 dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
489 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
490         CF_STRIP_G_OPT(CFLAGS)
491         CF_STRIP_G_OPT(CXXFLAGS)
492 fi
493
494 CF_HELP_MESSAGE(Ada95 Binding Options:)
495 cf_with_ada=yes
496 dnl Check for availability of GNU Ada Translator (GNAT).
497 dnl At the moment we support no other Ada95 compiler.
498 if test "$cf_with_ada" != "no" ; then
499         CF_PROG_GNAT
500         if test "$cf_cv_prog_gnat_correct" = yes; then
501
502                 # make ADAFLAGS consistent with CFLAGS
503                 case "$CFLAGS" in
504                 *-g*)
505                         CF_ADD_ADAFLAGS(-g)
506                         ;;
507                 esac
508                 case "$CFLAGS" in
509                 *-O*)
510                         CF_ADD_ADAFLAGS(-O3)
511                         ;;
512                 esac
513
514                 CF_GNAT_GENERICS
515                 CF_GNAT_SIGINT
516                 CF_GNAT_PRAGMA_UNREF
517                 CF_GNAT_PROJECTS
518
519                 CF_WITH_ADA_COMPILER
520
521                 cf_ada_package=terminal_interface
522                 AC_SUBST(cf_ada_package)
523
524                 CF_WITH_ADA_INCLUDE
525                 CF_WITH_ADA_OBJECTS
526                 CF_WITH_ADA_SHAREDLIB
527         else
528                 AC_MSG_ERROR(No usable Ada compiler found)
529         fi
530 else
531         AC_MSG_ERROR(The Ada compiler is needed for this package)
532 fi
533
534 ################################################################################
535
536 # not needed
537 TINFO_LDFLAGS2=
538 AC_SUBST(TINFO_LDFLAGS2)
539 TINFO_LIBS=
540 AC_SUBST(TINFO_LIBS)
541
542 ### Construct the list of include-directories to be generated
543 CF_INCLUDE_DIRS
544 CF_ADA_INCLUDE_DIRS
545
546 ### Build up pieces for makefile rules
547 AC_MSG_CHECKING(default library suffix)
548 CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
549 AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
550 AC_MSG_RESULT($DFT_ARG_SUFFIX)
551
552 AC_MSG_CHECKING(default library-dependency suffix)
553 CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_LIB_SUFFIX,DFT_DEP_SUFFIX)dnl
554 AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
555 AC_MSG_RESULT($DFT_DEP_SUFFIX)
556
557 AC_MSG_CHECKING(default object directory)
558 CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
559 AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
560 AC_MSG_RESULT($DFT_OBJ_SUBDIR)
561
562 ### Set up low-level terminfo dependencies for makefiles.
563
564 if test "$DFT_LWR_MODEL" = shared ; then
565         case $cf_cv_system_name in #(vi
566         cygwin*)
567                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
568                 ;;
569         esac
570 fi
571
572 ### Construct the list of subdirectories for which we'll customize makefiles
573 ### with the appropriate compile-rules.
574
575 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
576
577 AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR')
578
579 ### Now that we're done running tests, add the compiler-warnings, if any
580 CF_ADD_CFLAGS($EXTRA_CFLAGS)
581
582 ################################################################################
583
584 if test x"$enable_pc_files" = xyes ; then \
585 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
586 MAKE_PC_FILES=
587 else
588 MAKE_PC_FILES="#"
589 fi
590 AC_SUBST(MAKE_PC_FILES)
591 AC_SUBST(cross_compiling)
592
593 ################################################################################
594
595 TEST_ARG2=
596 AC_SUBST(TEST_ARG2)
597
598 TEST_LIBS2=
599 AC_SUBST(TEST_LIBS2)
600
601 dnl for separate build, this is good enough for "sh $(top_srcdir)/misc/shlib"
602 NCURSES_SHLIB2="sh -c"
603 AC_SUBST(NCURSES_SHLIB2)
604
605 ADA_SUBDIRS="include gen src doc"
606 if test "x$cf_with_tests" != "xno" ; then
607         ADA_SUBDIRS="$ADA_SUBDIRS samples"
608 fi
609 for cf_dir in $ADA_SUBDIRS
610 do
611         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
612 done
613 AC_SUBST(ADA_SUBDIRS)
614
615 NCURSES_TREE="#"
616 AC_SUBST(NCURSES_TREE)
617
618 EXTERNAL_TREE=
619 AC_SUBST(EXTERNAL_TREE)
620
621 # match layout used by make-tar.sh
622 ADAHTML_DIR=../doc/ada
623 AC_SUBST(ADAHTML_DIR)
624
625 AC_OUTPUT( \
626         $SUB_MAKEFILES \
627         doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in \
628         Makefile,[
629 if test -z "$USE_OLD_MAKERULES" ; then
630         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
631 fi
632 ],[
633 ### Special initialization commands, used to pass information from the
634 ### configuration-run into config.status
635
636 AWK="$AWK"
637 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
638 DFT_LWR_MODEL="$DFT_LWR_MODEL"
639 ECHO_LINK="$ECHO_LINK"
640 LIB_NAME="$LIB_NAME"
641 LIB_SUFFIX="$LIB_SUFFIX"
642 LN_S="$LN_S"
643 NCURSES_MAJOR="$NCURSES_MAJOR"
644 NCURSES_MINOR="$NCURSES_MINOR"
645 NCURSES_PATCH="$NCURSES_PATCH"
646 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
647 cf_cv_abi_version="$cf_cv_abi_version"
648 cf_cv_rel_version="$cf_cv_rel_version"
649 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
650 cf_cv_shared_soname='$cf_cv_shared_soname'
651 cf_cv_shlib_version="$cf_cv_shlib_version"
652 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
653 cf_cv_system_name="$cf_cv_system_name"
654 host="$host"
655 target="$target"
656
657 ],cat)dnl
658 ${MAKE:-make} preinstall