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