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