]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure.in
a46fbf1d43ed64f08eaa9d8ad4f9a7f6daea224d
[ncurses.git] / configure.in
1 dnl***************************************************************************
2 dnl Copyright (c) 1998,1999,2000 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 <dickey@clark.net> 1996,1997
30 dnl
31 dnl $Id: configure.in,v 1.220 2000/10/15 00:54:36 tom Exp $
32 dnl Process this file with autoconf to produce a configure script.
33 dnl
34 dnl See http://dickey.his.com/autoconf/ for additional information.
35 dnl
36 dnl ---------------------------------------------------------------------------
37 AC_PREREQ(2.13.20000819)
38 AC_REVISION($Revision: 1.220 $)
39 AC_INIT(ncurses/base/lib_initscr.c)
40 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
41
42 CF_SUBST_NCURSES_VERSION
43 CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
44 AC_ARG_WITH(system-type,
45 [  --with-system-type=XXX  test: override derived host system-type],
46 [AC_MSG_WARN(overriding system type to $withval)
47  cf_cv_system_name=$withval])
48
49 # We need a configure script only when compiling as part of GNU C library.
50 # Here we have to generate one of the files we need while compiling.
51 #
52 # The only problem is that users of the package might think they have to
53 # run configure themself and find it irritating when nothing happens.
54 #
55 # So we try here to find out whether we are called from the glibc configure
56 # or by a user.
57 #
58 dnl Check if we are a drop-in addition to glibc.
59 AC_ARG_ENABLE(add-ons, dnl
60 [  --enable-add-ons=DIR... used to check if we are a glibc add-on.],
61                 [glibc_add_on=yes],
62                 [glibc_add_on=])
63
64 dnl We need to use [ and ] for other purposes for a while now.
65 changequote(,)dnl
66 if test x"$glibc_add_on" = "xyes" ; then
67   rm -f $srcdir/Banner
68   # We are in glibc.
69   rm -f $srcdir/Makefile
70   cp $srcdir/Makefile.glibc $srcdir/Makefile
71   echo "ncurses `grep \"^[      ]*ncurses-version[      ]*=.*$\" \
72                 $srcdir/Makefile | sed -e \
73                 's/^[   ]*ncurses-version[      ]*=[    ]*\([^  ^ ]*\)[         ]*$/\1/'`" > $srcdir/Banner
74   exit 0
75 fi
76 changequote([,])dnl
77
78 ###     Save the given $CFLAGS to allow user-override.
79 cf_user_CFLAGS="$CFLAGS"
80
81 ###     Default install-location
82 CF_CFG_DEFAULTS
83
84 ###     Checks for programs.
85 AC_PROG_CC
86 if test "$GCC" = yes ; then
87         AC_MSG_CHECKING(version of gcc)
88         eval "$CC --version"
89 fi
90 if test "$host" != $build; then
91         AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)
92 else
93         BUILD_CC="$CC"
94 fi
95 AC_SUBST(BUILD_CC)
96 AC_PROG_CPP
97 AC_PROG_GCC_TRADITIONAL
98 AC_ISC_POSIX
99 CF_ANSI_CC_REQD
100 CF_PROG_EXT
101
102 case "$cf_cv_system_name" in
103 freebsd*) #(vi
104   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
105   ;;
106 *) LDPATH=$PATH:/sbin:/usr/sbin
107   AC_PATH_PROG(LDCONFIG,ldconfig,,$LDPATH)
108   ;;
109 esac
110 AC_SUBST(LDCONFIG)
111
112 dnl DEFECT in autoconf 2.12:    an attempt to set policy, this breaks the
113 dnl                             configure script by not letting us test if C++
114 dnl                             is present, making this option necessary.
115 AC_MSG_CHECKING(if you want to ensure bool is consistent with C++)
116 AC_ARG_WITH(cxx,
117         [  --without-cxx           do not adjust ncurses bool to match C++],
118         [cf_with_cxx=$withval],
119         [cf_with_cxx=yes])
120 AC_MSG_RESULT($cf_with_cxx)
121 if test "X$cf_with_cxx" = Xno ; then
122         CXX=""
123         GXX=""
124 else
125         pushdef([AC_MSG_ERROR],
126                 [AC_MSG_RESULT([You don't have any C++ compiler, too bad]); dnl
127                 cf_with_cxx=no; CXX=""; GXX="";])dnl
128         AC_PROG_CXX
129         popdef([AC_MSG_ERROR])dnl
130 fi
131
132 changequote(,)dnl
133 if test "$GXX" = yes; then
134         case "`${CXX-g++} --version`" in
135         1*|2.[0-6]*)
136                 GXX=""; CXX=""; ac_cv_prog_gxx=no
137                 cf_cxx_library=no
138                 echo No: templates do not work
139                 ;;
140         esac
141 fi
142 changequote([,])dnl
143
144 AC_MSG_CHECKING(if you want to build C++ binding and demo)
145 AC_ARG_WITH(cxx-binding,
146         [  --without-cxx-binding   do not build C++ binding and demo],
147         [cf_with_cxx_binding=$withval],
148         [cf_with_cxx_binding=$cf_with_cxx])
149 AC_MSG_RESULT($cf_with_cxx_binding)
150
151 AC_MSG_CHECKING(if you want to build with Ada95)
152 AC_ARG_WITH(ada,
153         [  --without-ada           suppress check for Ada95, don't build demo],
154         [cf_with_ada=$withval],
155         [cf_with_ada=yes])
156 AC_MSG_RESULT($cf_with_ada)
157
158 AC_MSG_CHECKING(if you want to build programs such as tic)
159 AC_ARG_WITH(progs,
160         [  --without-progs         suppress build with programs (e.g., tic)],
161         [cf_with_progs=$withval],
162         [cf_with_progs=yes])
163 AC_MSG_RESULT($cf_with_progs)
164
165 AC_MSG_CHECKING(if you wish to install curses.h)
166 AC_ARG_WITH(curses-h,
167         [  --without-curses-h      install curses.h as ncurses.h only],
168         [with_curses_h=$withval],
169         [with_curses_h=yes])
170 AC_MSG_RESULT($with_curses_h)
171
172 modules_to_build="ncurses"
173 if test "X$cf_with_progs" != Xno ; then
174 modules_to_build="$modules_to_build progs tack"
175 fi
176 modules_to_build="$modules_to_build panel menu form"
177
178 AC_ARG_PROGRAM
179 AC_PROG_AWK
180 AC_PROG_MAKE_SET
181 CF_PROG_INSTALL
182 AC_SYS_LONG_FILE_NAMES
183 CF_MIXEDCASE_FILENAMES
184 AC_PROG_LN_S
185 AC_PROG_RANLIB
186 CF_MAKE_TAGS
187 AC_CHECK_PROGS(LINT, tdlint lint alint)
188 AC_CHECK_PROGS(MAN, man man_db)
189 AC_SUBST(LINT_OPTS)
190
191 dnl These are standard among *NIX systems, but not when cross-compiling
192 CF_SUBST(loader,LD,ld)
193 CF_SUBST(archiver,AR,ar)
194 CF_SUBST(archiver options,AR_OPTS,rv)
195
196 CF_MAKEFLAGS
197
198 dnl Special option for use by system-builders: the install-prefix is used to
199 dnl adjust the location into which the actual install is done, so that an
200 dnl archive can be built without modifying the host system's configuration.
201 AC_MSG_CHECKING(if you have specified an install-prefix)
202 AC_ARG_WITH(install-prefix,
203         [  --with-install-prefix   prefixes actual install-location],
204         [case "$withval" in #(vi
205         yes|no) #(vi
206                 ;;
207         *)      DESTDIR="$withval"
208                 ;;
209         esac])
210 AC_MSG_RESULT($DESTDIR)
211 AC_SUBST(DESTDIR)
212
213 ###############################################################################
214 CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
215
216 ### Options to allow the user to specify the set of libraries which are used.
217 ### Use "--without-normal --with-shared" to allow the default model to be
218 ### shared, for example.
219 cf_list_models=""
220 AC_SUBST(cf_list_models)dnl     the complete list of models ("normal debug")
221
222 AC_MSG_CHECKING(if you want to build libraries with libtool)
223 AC_ARG_WITH(libtool,
224         [  --with-libtool          generate libraries with libtool],
225         [with_libtool=$withval],
226         [with_libtool=no])
227 AC_MSG_RESULT($with_libtool)
228 if test "$with_libtool" = "yes"; then
229         cf_list_models="$cf_list_models libtool"
230         test -z "$LIBTOOL" && LIBTOOL=libtool
231 else
232         LIBTOOL=""
233 fi
234 AC_SUBST(LIBTOOL)
235
236 AC_MSG_CHECKING(if you want to build shared libraries)
237 AC_ARG_WITH(shared,
238         [  --with-shared           generate shared-libraries],
239         [with_shared=$withval],
240         [with_shared=no])
241 AC_MSG_RESULT($with_shared)
242 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
243
244 AC_MSG_CHECKING(if you want to build static libraries)
245 AC_ARG_WITH(normal,
246         [  --with-normal           generate normal-libraries (default)],
247         [with_normal=$withval],
248         [with_normal=yes])
249 AC_MSG_RESULT($with_normal)
250 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
251
252 AC_MSG_CHECKING(if you want to build debug libraries)
253 AC_ARG_WITH(debug,
254         [  --with-debug            generate debug-libraries (default)],
255         [with_debug=$withval],
256         [with_debug=yes])
257 AC_MSG_RESULT($with_debug)
258 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
259
260 AC_MSG_CHECKING(if you want to build profiling libraries)
261 AC_ARG_WITH(profile,
262         [  --with-profile          generate profile-libraries],
263         [with_profile=$withval],
264         [with_profile=no])
265 AC_MSG_RESULT($with_profile)
266 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
267
268 ###############################################################################
269
270 AC_MSG_CHECKING(for specified models)
271 test -z "$cf_list_models" && cf_list_models=normal
272 dnl If we use libtool to generate libraries, then it must be the only
273 dnl specified model.
274 test "$with_libtool" = "yes" && cf_list_models=libtool
275 AC_MSG_RESULT($cf_list_models)
276
277 ### Use the first model as the default, and save its suffix for use in building
278 ### up test-applications.
279 AC_MSG_CHECKING(for default model)
280 DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
281 AC_MSG_RESULT($DFT_LWR_MODEL)
282
283 CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
284
285 AC_SUBST(DFT_LWR_MODEL)dnl      the default model ("normal")
286 AC_SUBST(DFT_UPR_MODEL)dnl      the default model ("NORMAL")
287
288 TINFO_NAME=tinfo
289 AC_SUBST(TINFO_NAME)
290
291 LIB_NAME=ncurses
292 AC_SUBST(LIB_NAME)
293
294 LIB_DIR=../lib
295 CF_LIB_PREFIX(cf_prefix)
296 LIB_PREFIX=$cf_prefix
297 AC_SUBST(LIB_PREFIX)
298
299 LIB_SUFFIX=
300 AC_SUBST(LIB_SUFFIX)
301
302 ###############################################################################
303
304 AC_MSG_CHECKING(if you want to build a separate terminfo library)
305 AC_ARG_WITH(termlib,
306         [  --with-termlib          generate separate terminfo library],
307         [with_termlib=$withval],
308         [with_termlib=no])
309 AC_MSG_RESULT($with_termlib)
310
311 ### Checks for special libraries, must be done up-front.
312 AC_MSG_CHECKING(if you want to link with dbmalloc for testing)
313 AC_ARG_WITH(dbmalloc,
314         [  --with-dbmalloc         test: use Conor Cahill's dbmalloc library],
315         [with_dbmalloc=$withval],
316         [with_dbmalloc=no])
317 AC_MSG_RESULT($with_dbmalloc)
318 if test "$with_dbmalloc" = yes ; then
319         AC_CHECK_LIB(dbmalloc,debug_malloc)
320 fi
321
322 AC_MSG_CHECKING(if you want to link with dmalloc for testing)
323 AC_ARG_WITH(dmalloc,
324         [  --with-dmalloc          test: use Gray Watson's dmalloc library],
325         [with_dmalloc=$withval],
326         [with_dmalloc=no])
327 AC_MSG_RESULT($with_dmalloc)
328 if test "$with_dmalloc" = yes ; then
329         AC_CHECK_LIB(dmalloc,dmalloc_debug)
330 fi
331
332 SHLIB_LIST=""
333 AC_MSG_CHECKING(if you want to link with the gpm mouse library)
334 AC_ARG_WITH(gpm,
335         [  --with-gpm              use Alessandro Rubini's GPM library],
336         [with_gpm=$withval],
337         [with_gpm=no])
338 AC_MSG_RESULT($with_gpm)
339 if test "$with_gpm" = yes ; then
340         AC_CHECK_LIB(gpm,Gpm_Open,[
341                 EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
342                 SHLIB_LIST="-lgpm $SHLIB_LIST"
343                 AC_DEFINE(HAVE_LIBGPM)
344                 AC_CHECK_HEADERS(gpm.h)
345         ],AC_MSG_WARN(Cannot link with gpm library - read the FAQ))
346 fi
347
348 dnl Not all ports of gcc support the -g option
349
350 if test X"$CC_G_OPT" = X"" ; then
351         CC_G_OPT='-g'
352         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
353 fi
354 AC_SUBST(CC_G_OPT)
355
356 if test X"$CXX_G_OPT" = X"" ; then
357         CXX_G_OPT='-g'
358         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
359 fi
360 AC_SUBST(CXX_G_OPT)
361
362 AC_MSG_CHECKING(for default loader flags)
363 case $DFT_LWR_MODEL in
364 libtool) LD_MODEL=''   ;;
365 normal)  LD_MODEL=''   ;;
366 debug)   LD_MODEL=$CC_G_OPT ;;
367 profile) LD_MODEL='-pg';;
368 shared)  LD_MODEL=''   ;;
369 esac
370 AC_SUBST(LD_MODEL)dnl           the type of link (e.g., -g or -pg)
371 AC_MSG_RESULT($LD_MODEL)
372
373 AC_MSG_CHECKING(if rpath option should be used)
374 AC_ARG_ENABLE(rpath,
375 [  --enable-rpath          use rpath option when generating shared libraries],
376 [cf_cv_ld_rpath=$enableval],
377 [cf_cv_ld_rpath=no])
378 AC_MSG_RESULT($cf_cv_ld_rpath)
379
380 CF_SHARED_OPTS
381 if test "$CC_SHARED_OPTS" = "unknown"; then
382         for model in $cf_list_models; do
383                 if test "$model" = "shared"; then
384                         AC_ERROR(Shared libraries are not supported in this version)
385                 fi
386         done
387 fi
388
389 ###############################################################################
390 CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
391
392 ###     use option --disable-overwrite to leave out the link to -lcurses
393 AC_MSG_CHECKING(if you wish to install ncurses overwriting curses)
394 AC_ARG_ENABLE(overwrite,
395         [  --disable-overwrite     leave out the link to -lcurses],
396         [with_overwrite=$enableval],
397         [with_overwrite=yes])
398 AC_MSG_RESULT($with_overwrite)
399
400 AC_MSG_CHECKING(if external terminfo-database is used)
401 AC_ARG_ENABLE(database,
402         [  --disable-database      use only built-in data],
403         [use_database=$enableval],
404         [use_database=yes])
405 AC_MSG_RESULT($use_database)
406
407 case $host_os in #(vi
408 os2*) #(vi
409         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
410         ;;
411 *) #(vi
412         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
413         ;;
414 esac
415 AC_SUBST(TERMINFO_SRC)
416
417 if test "$use_database" != no ; then
418         AC_DEFINE(USE_DATABASE)
419         AC_MSG_CHECKING(which terminfo source-file will be installed)
420         AC_ARG_ENABLE(database,
421                 [  --with-database=XXX     specify terminfo source to install],
422                 [TERMINFO_SRC=$withval])
423         AC_MSG_RESULT($TERMINFO_SRC)
424 fi
425
426 AC_MSG_CHECKING(for list of fallback descriptions)
427 AC_ARG_WITH(fallbacks,
428         [  --with-fallbacks=XXX    specify list of fallback terminal descriptions],
429         [with_fallback=$withval],
430         [with_fallback=])
431 AC_MSG_RESULT($with_fallback)
432 FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
433 AC_SUBST(FALLBACK_LIST)
434
435 if test "$use_database" = no ; then
436         if test -z $with_fallback ; then
437                 AC_ERROR(You have disabled the database w/o specifying fallbacks)
438         fi
439         TERMINFO="${datadir}/terminfo"
440 else
441
442 AC_MSG_CHECKING(for list of terminfo directories)
443 CF_WITH_PATHLIST(terminfo-dirs,
444         [  --with-terminfo-dirs=XXX specify list of terminfo directories],
445         TERMINFO_DIRS,
446         DATADIR/terminfo,
447         ${datadir}/terminfo)
448 AC_MSG_RESULT($TERMINFO_DIRS)
449 test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS")
450
451 AC_MSG_CHECKING(for default terminfo directory)
452 CF_WITH_PATH(default-terminfo-dir,
453         [  --with-default-terminfo-dir=DIR default terminfo directory],
454         TERMINFO,
455         DATADIR/terminfo,
456         ${datadir}/terminfo)
457 AC_MSG_RESULT($TERMINFO)
458 AC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO")
459
460 fi
461
462 AC_SUBST(TERMINFO)
463
464 ###     use option --disable-big-core to make tic run on small machines
465 ###     We need 4Mb, check if we can allocate 50% more than that.
466 AC_MSG_CHECKING(if big-core option selected)
467 AC_ARG_ENABLE(big-core,
468         [  --disable-big-core      assume machine has little memory],
469         [with_big_core=$enableval],
470         [AC_TRY_RUN([
471 #include <stdlib.h>
472 #include <string.h>
473 int main() {
474         unsigned long n = 6000000L;
475         char *s = malloc(n);
476         if (s != 0)
477                 s[0] = s[n-1] = 0;
478         exit(s == 0);
479 }],
480         [with_big_core=yes],
481         [with_big_core=no],
482         [with_big_core=no])])
483 AC_MSG_RESULT($with_big_core)
484 test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE)
485
486 ###     use option --enable-termcap to compile in the termcap fallback support
487 AC_MSG_CHECKING(if you want termcap-fallback support)
488 AC_ARG_ENABLE(termcap,
489         [  --enable-termcap        compile in termcap fallback support],
490         [with_termcap=$enableval],
491         [with_termcap=no])
492 AC_MSG_RESULT($with_termcap)
493
494 if test "$with_termcap" != "yes" ; then
495         AC_DEFINE(PURE_TERMINFO)
496 else
497
498 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
499 AC_MSG_CHECKING(if fast termcap-loader is needed)
500 AC_ARG_ENABLE(getcap,
501         [  --enable-getcap         fast termcap load, no xrefs to terminfo],
502         [with_getcap=$enableval],
503         [with_getcap=no])
504 AC_MSG_RESULT($with_getcap)
505 test "$with_getcap" = "yes" && AC_DEFINE(USE_GETCAP)
506
507 AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo)
508 AC_ARG_ENABLE(getcap-cache,
509         [  --enable-getcap-cache   cache translated termcaps in ~/.terminfo],
510         [with_getcap_cache=$enableval],
511         [with_getcap_cache=no])
512 AC_MSG_RESULT($with_getcap_cache)
513 test "$with_getcap_cache" = "yes" && AC_DEFINE(USE_GETCAP_CACHE)
514
515 fi
516
517 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
518 ###   to reduce storage requirements for the terminfo database.
519 CF_LINK_FUNCS
520
521 with_links=no
522 with_symlinks=no
523
524 if test "$ac_cv_func_link" != yes ; then
525     AC_MSG_CHECKING(if tic should use symbolic links)
526     if test "$ac_cv_func_symlink" = yes ; then
527         with_symlinks=yes
528     else
529         with_symlinks=no
530     fi
531     AC_MSG_RESULT($with_symlinks)
532 elif test "$ac_cv_func_symlink" != yes ; then
533     AC_MSG_CHECKING(if tic should use hard links)
534     if test "$ac_cv_func_link" = yes ; then
535         with_links=yes
536     else
537         with_links=no
538     fi
539     AC_MSG_RESULT($with_links)
540 else
541     AC_MSG_CHECKING(if tic should use symbolic links)
542     AC_ARG_ENABLE(symlinks,
543         [  --enable-symlinks       make tic use symbolic links not hard links],
544         [with_symlinks=$enableval],
545         [with_symlinks=no])
546     AC_MSG_RESULT($with_symlinks)
547 fi
548
549 test "$with_links" = yes && AC_DEFINE(USE_LINKS)
550 test "$with_symlinks" = yes && AC_DEFINE(USE_SYMLINKS)
551
552 ###   use option --enable-broken-linker to force on use of broken-linker support
553 AC_MSG_CHECKING(if you want broken-linker support code)
554 AC_ARG_ENABLE(broken_linker,
555         [  --enable-broken_linker  compile with broken-linker support code],
556         [with_broken_linker=$enableval],
557         [with_broken_linker=$BROKEN_LINKER])
558 AC_MSG_RESULT($with_broken_linker)
559 test "$with_broken_linker" = yes && AC_DEFINE(BROKEN_LINKER)
560
561 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
562 AC_MSG_CHECKING(if tputs should process BSD-style prefix padding)
563 AC_ARG_ENABLE(bsdpad,
564         [  --enable-bsdpad         recognize BSD-style prefix padding],
565         [with_bsdpad=$enableval],
566         [with_bsdpad=no])
567 AC_MSG_RESULT($with_bsdpad)
568 test "$with_bsdpad" = yes && AC_DEFINE(BSD_TPUTS)
569
570 ### Enable compiling-in rcs id's
571 AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
572 AC_ARG_WITH(rcs-ids,
573         [  --with-rcs-ids          compile-in RCS identifiers],
574         [with_rcs_ids=$withval],
575         [with_rcs_ids=no])
576 AC_MSG_RESULT($with_rcs_ids)
577 test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
578
579 ###############################################################################
580 CF_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
581
582 ###############################################################################
583 CF_HELP_MESSAGE(Extensions:)
584
585 ### Note that some functions (such as const) are normally disabled anyway.
586 AC_MSG_CHECKING(if you want to build with function extensions)
587 AC_ARG_ENABLE(ext-funcs,
588         [  --disable-ext-funcs     disable function-extensions],
589         [with_ext_funcs=$enableval],
590         [with_ext_funcs=yes])
591 AC_MSG_RESULT($with_ext_funcs)
592 if test "$with_ext_funcs" = yes ; then
593         AC_DEFINE(HAVE_CURSES_VERSION)
594         AC_DEFINE(HAVE_HAS_KEY)
595         AC_DEFINE(HAVE_RESIZETERM)
596         AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
597         AC_DEFINE(HAVE_WRESIZE)
598         AC_DEFINE(NCURSES_EXT_FUNCS)
599 fi
600
601 ###   use option --enable-const to turn on use of const beyond that in XSI.
602 AC_MSG_CHECKING(for extended use of const keyword)
603 AC_ARG_ENABLE(const,
604         [  --enable-const          compile with extra/non-standard const],
605         [with_ext_const=$enableval],
606         [with_ext_const=no])
607 AC_MSG_RESULT($with_ext_const)
608 NCURSES_CONST='/*nothing*/'
609 if test "$with_ext_const" = yes ; then
610         NCURSES_CONST=const
611 fi
612 AC_SUBST(NCURSES_CONST)
613
614 AC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code)
615 AC_ARG_ENABLE(no-padding,
616         [  --enable-no-padding     compile with \$NCURSES_NO_PADDING code],
617         [with_no_padding=$enableval],
618         [with_no_padding=$with_ext_funcs])
619 AC_MSG_RESULT($with_no_padding)
620 test "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING)
621
622 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
623 AC_MSG_CHECKING(if you want SIGWINCH handler)
624 AC_ARG_ENABLE(sigwinch,
625         [  --enable-sigwinch       compile with SIGWINCH handler],
626         [with_sigwinch=$enableval],
627         [with_sigwinch=$with_ext_funcs])
628 AC_MSG_RESULT($with_sigwinch)
629 test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH)
630
631 ###   use option --enable-tcap-names to allow user to define new capabilities
632 AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap)
633 AC_ARG_ENABLE(tcap-names,
634         [  --enable-tcap-names     compile with user-definable terminal capabilities],
635         [with_tcap_names=$enableval],
636         [with_tcap_names=$with_ext_funcs])
637 AC_MSG_RESULT($with_tcap_names)
638 NCURSES_XNAMES=0
639 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
640 AC_SUBST(NCURSES_XNAMES)
641
642 ###############################################################################
643 # These options are relatively safe to experiment with.
644 CF_HELP_MESSAGE(Development Code:)
645 AC_MSG_CHECKING(if you want all development code)
646 AC_ARG_WITH(develop,
647         [  --with-develop          enable all development options],
648         [with_develop=$withval],
649         [with_develop=no])
650 AC_MSG_RESULT($with_develop)
651
652 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
653 AC_MSG_CHECKING(if you want colorfgbg code)
654 AC_ARG_ENABLE(hard-tabs,
655         [  --enable-colorfgbg      compile with \$COLORFGBG code],
656         [with_colorfgbg=$enableval],
657         [with_colorfgbg=$with_develop])
658 AC_MSG_RESULT($with_colorfgbg)
659 test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
660
661 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
662 AC_MSG_CHECKING(if you want hard-tabs code)
663 AC_ARG_ENABLE(hard-tabs,
664         [  --enable-hard-tabs      compile with hard-tabs code],
665         [with_hardtabs=$enableval],
666         [with_hardtabs=$with_develop])
667 AC_MSG_RESULT($with_hardtabs)
668 test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS)
669
670 AC_MSG_CHECKING(if you want to use restrict environment when running as root)
671 AC_ARG_ENABLE(root-environ,
672         [  --disable-root-environ  limit environment when running as root],
673         [with_root_environ=$enableval],
674         [with_root_environ=yes])
675 AC_MSG_RESULT($with_root_environ)
676 test "$with_root_environ" = yes && AC_DEFINE(USE_ROOT_ENVIRON)
677
678 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
679 AC_MSG_CHECKING(if you want limited support for xmc)
680 AC_ARG_ENABLE(xmc-glitch,
681         [  --enable-xmc-glitch     compile with limited support for xmc],
682         [with_xmc_glitch=$enableval],
683         [with_xmc_glitch=$with_develop])
684 AC_MSG_RESULT($with_xmc_glitch)
685 test "$with_xmc_glitch" = yes && AC_DEFINE(USE_XMC_SUPPORT)
686
687 ###############################################################################
688 # These are just experimental, probably should not be in a package:
689 CF_HELP_MESSAGE(Experimental Code:)
690
691 AC_MSG_CHECKING(if you do not want to assume colors are white-on-black)
692 AC_ARG_ENABLE(assumed-color,
693         [  --disable-assumed-color do not assume anything about default-colors],
694         [with_assumed_color=$enableval],
695         [with_assumed_color=yes])
696 AC_MSG_RESULT($with_assumed_color)
697 test "$with_assumed_color" = yes && AC_DEFINE(USE_ASSUMED_COLOR)
698
699 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
700 AC_MSG_CHECKING(if you want hashmap scrolling-optimization code)
701 AC_ARG_ENABLE(hashmap,
702         [  --disable-hashmap       compile without hashmap scrolling-optimization],
703         [with_hashmap=$enableval],
704         [with_hashmap=yes])
705 AC_MSG_RESULT($with_hashmap)
706 test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP)
707
708 AC_MSG_CHECKING(if you want experimental safe-sprintf code)
709 AC_ARG_ENABLE(safe-sprintf,
710         [  --enable-safe-sprintf   compile with experimental safe-sprintf code],
711         [with_safe_sprintf=$enableval],
712         [with_safe_sprintf=no])
713 AC_MSG_RESULT($with_safe_sprintf)
714 test "$with_safe_sprintf" = yes && AC_DEFINE(USE_SAFE_SPRINTF)
715
716 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
717 # when hashmap is used scroll hints are useless
718 if test "$with_hashmap" = no ; then
719 AC_MSG_CHECKING(if you want to experiment without scrolling-hints code)
720 AC_ARG_ENABLE(scroll-hints,
721         [  --disable-scroll-hints  compile without scroll-hints code],
722         [with_scroll_hints=$enableval],
723         [with_scroll_hints=yes])
724 AC_MSG_RESULT($with_scroll_hints)
725 test "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS)
726 fi
727
728 ###   use option --enable-widec to turn on use of wide-character support
729 AC_MSG_CHECKING(if you want experimental wide-character code)
730 AC_ARG_ENABLE(widec,
731         [  --enable-widec          compile with experimental wide-char/UTF-8 code],
732         [with_widec=$enableval],
733         [with_widec=no])
734 AC_MSG_RESULT($with_widec)
735 if test "$with_widec" = yes ; then
736         LIB_SUFFIX="w${LIB_SUFFIX}"
737         AC_DEFINE(USE_WIDEC_SUPPORT)
738 fi
739
740 ###############################################################################
741 CF_HELP_MESSAGE(Testing/development Options:)
742
743 ###     use option --disable-echo to suppress full display compiling commands
744 AC_MSG_CHECKING(if you want to display full commands during build)
745 AC_ARG_ENABLE(echo,
746         [  --enable-echo           build: display "compiling" commands (default)],
747         [with_echo=$enableval],
748         [with_echo=yes])
749 if test "$with_echo" = yes; then
750         ECHO_LINK=
751 else
752         ECHO_LINK='@ echo linking $@ ... ;'
753         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
754 fi
755 AC_MSG_RESULT($with_echo)
756 AC_SUBST(ECHO_LINK)
757
758 ###     use option --enable-warnings to turn on all gcc warnings
759 AC_MSG_CHECKING(if you want to see compiler warnings)
760 AC_ARG_ENABLE(warnings,
761         [  --enable-warnings       build: turn on GCC compiler warnings],
762         [with_warnings=$enableval])
763 AC_MSG_RESULT($with_warnings)
764
765 if test -n "$with_warnings"; then
766         ADAFLAGS="$ADAFLAGS -gnatg"
767         CF_GCC_WARNINGS
768 fi
769 CF_GCC_ATTRIBUTES
770
771 ###     use option --enable-assertions to turn on generation of assertion code
772 AC_MSG_CHECKING(if you want to enable runtime assertions)
773 AC_ARG_ENABLE(assertions,
774         [  --enable-assertions     test: turn on generation of assertion code],
775         [with_assertions=$enableval],
776         [with_assertions=no])
777 AC_MSG_RESULT($with_assertions)
778 if test -n "$GCC"
779 then
780         if test "$with_assertions" = no
781         then
782                 AC_DEFINE(NDEBUG)
783                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
784         else
785                 ADAFLAGS="$ADAFLAGS -gnata"
786         fi
787 fi
788
789 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
790 AC_ARG_ENABLE(leaks,
791         [  --disable-leaks         test: suppress permanent memory-leaks],
792         [test "$enableval" = no && AC_DEFINE(NO_LEAKS)])
793 AC_DEFINE(HAVE_NC_ALLOC_H)
794
795 ###     use option --enable-expanded to generate certain macros as functions
796 AC_ARG_ENABLE(expanded,
797         [  --enable-expanded       test: generate functions for certain macros],
798         [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED)])
799
800 ###     use option --disable-macros to suppress macros in favor of functions
801 AC_ARG_ENABLE(macros,
802         [  --disable-macros        test: use functions rather than macros],
803         [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)])
804
805 ###     Checks for libraries.
806 AC_CHECK_FUNC(gettimeofday,
807         AC_DEFINE(HAVE_GETTIMEOFDAY),[
808
809 AC_CHECK_LIB(bsd, gettimeofday,
810         AC_DEFINE(HAVE_GETTIMEOFDAY)
811         LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
812
813 CF_MATH_LIB(MATH_LIB,sin(x))
814 AC_SUBST(MATH_LIB)
815
816 ###     Checks for header files.
817 AC_STDC_HEADERS
818 AC_HEADER_DIRENT
819 CF_REGEX
820
821 dnl These are some other potentially nonportable headers.
822 AC_CHECK_HEADERS( \
823 fcntl.h \
824 getopt.h \
825 libc.h \
826 limits.h \
827 locale.h \
828 poll.h \
829 sys/bsdtypes.h \
830 sys/ioctl.h \
831 sys/param.h \
832 sys/poll.h \
833 sys/select.h \
834 sys/time.h \
835 sys/times.h \
836 ttyent.h \
837 unistd.h \
838 )
839
840 # check for ISC (this may also define _POSIX_SOURCE)
841 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
842 if test "$ISC" = yes ; then
843         AC_CHECK_LIB(cposix,main)
844         AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()'
845 fi
846
847 CF_SYS_TIME_SELECT
848
849 ###     checks for compiler characteristics
850 AC_LANG_C
851 AC_C_CONST
852 AC_C_INLINE
853 test "$ac_cv_c_inline" != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)
854
855 CF_TYPEOF_CHTYPE
856 CF_WIDEC_SHIFT
857
858 ###     Checks for external-data
859 CF_ERRNO
860 CF_LINK_DATAONLY
861
862 ###     Checks for library functions.
863 AC_CHECK_FUNCS( \
864 getcwd \
865 getegid \
866 geteuid \
867 getttynam \
868 issetugid \
869 memccpy \
870 mkstemp \
871 nanosleep \
872 poll \
873 remove \
874 select \
875 setbuf \
876 setbuffer \
877 setvbuf \
878 sigaction \
879 sigvec \
880 strdup \
881 strstr \
882 tcgetpgrp \
883 times \
884 vfscanf \
885 vsnprintf \
886 vsscanf \
887 )
888 if test "$with_getcap" = "yes" ; then
889         CF_CGETENT
890 fi
891
892 CF_ISASCII
893 CF_STRUCT_SIGACTION
894 CF_FUNC_TERMIOS
895
896 dnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLS
897 if test "$cross_compiling" = yes ; then
898         AC_MSG_WARN(cross compiling: assume setvbuf params not reversed)
899 else
900         AC_FUNC_SETVBUF_REVERSED
901 fi
902 AC_TYPE_SIGNAL
903 CF_TYPE_SIGACTION
904 CF_SIZECHANGE
905 CF_FUNC_MEMMOVE
906 CF_FUNC_POLL
907
908 dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
909 if test -z "$cf_user_CFLAGS" ; then
910         CF_STRIP_G_OPT(CFLAGS)
911         CF_STRIP_G_OPT(CXXFLAGS)
912 fi
913
914 dnl Check for C++ compiler characteristics (and ensure that it's there!)
915 CF_BOOL_DECL(cf_cv_cc_bool_type)
916 if test -n "$CXX" ; then
917         AC_LANG_CPLUSPLUS
918         CF_STDCPP_LIBRARY
919         if test "$GXX" = yes; then
920                 case "`${CXX-g++} --version`" in
921                 1*|2.[0-6]*)
922                         cf_cxx_library=yes
923                         ;;
924                 2.7*)
925                         CF_GPP_LIBRARY
926                         ;;
927                 *)
928                         cf_cxx_library=no
929                         ;;
930                 esac
931         else
932                 cf_cxx_library=no
933         fi
934         AC_CHECK_HEADERS(typeinfo)
935         CF_BOOL_DECL
936         CF_BOOL_SIZE
937         CF_ETIP_DEFINES
938         CF_CPP_PARAM_INIT
939         case $cf_cv_system_name in #(vi
940         sco3.2v5*)
941             CXXLDFLAGS="-u main"
942             ;;
943         esac
944         AC_SUBST(CXXLDFLAGS)
945 else
946         cf_cxx_library=no
947         cf_cv_builtin_bool=1
948
949         # Just because we are not configuring against C++ right now does not
950         # mean that a user will not want to use C++.  Some distributors disable
951         # the C++ portion of this configuration as a shortcut (or just to avoid
952         # compiling the demo in the c++ directory).  So we need a reasonable
953         # default for the 'bool' type.
954         #
955         # Caveat: since the storage of the bool type is not standardized, it
956         # may change.
957
958         AC_MSG_CHECKING(for fallback type of bool)
959         case "$host_cpu" in #(vi
960         i?86)   cf_cv_type_of_bool=char ;; #(vi
961         *)      cf_cv_type_of_bool=int  ;;
962         esac
963         AC_MSG_RESULT($cf_cv_type_of_bool)
964 fi
965 AC_SUBST(CXXLIBS)
966
967 CF_HELP_MESSAGE(Ada95 Binding Options:)
968
969 dnl Check for availability of GNU Ada Translator (GNAT).
970 dnl At the moment we support no other Ada95 compiler.
971 if test "$cf_with_ada" != "no" ; then
972 cf_ada_make=gnatmake
973 AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
974 if test "$ac_cv_prog_gnat_exists" = no; then
975    cf_ada_make=
976 else
977    CF_GNAT_VERSION
978    AC_CHECK_PROG(M4_exists, m4, yes, no)
979    if test "$ac_cv_prog_M4_exists" = no; then
980       cf_cv_prog_gnat_correct=no
981       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
982    fi
983    if test "$cf_cv_prog_gnat_correct" = yes; then
984       AC_MSG_CHECKING(if GNAT works)
985       CF_GNAT_TRY_RUN([procedure conftest;],
986 [with Text_IO;
987 with GNAT.OS_Lib;
988 procedure conftest is
989 begin
990    Text_IO.Put ("Hello World");
991    Text_IO.New_Line;
992    GNAT.OS_Lib.OS_Exit (0);
993 end conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no])
994       AC_MSG_RESULT($cf_cv_prog_gnat_correct)
995    fi
996 fi
997 if test "$cf_cv_prog_gnat_correct" = yes; then
998    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
999
1000    AC_ARG_WITH(ada-compiler,
1001         [  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
1002         [cf_ada_compiler=$withval],
1003         [cf_ada_compiler=gnatmake])
1004
1005    cf_ada_package=terminal_interface
1006
1007    AC_SUBST(cf_ada_make)
1008    AC_SUBST(cf_ada_compiler)
1009    AC_SUBST(cf_ada_package)
1010    AC_SUBST(ADAFLAGS)
1011    AC_SUBST(cf_compile_generics)
1012    AC_SUBST(cf_generic_objects)
1013
1014    CF_WITH_PATH(ada-include,
1015        [  --with-ada-include=DIR  Ada includes are in DIR],
1016        ADA_INCLUDE,
1017        PREFIX/lib/ada/adainclude,
1018        [$]prefix/lib/ada/adainclude)
1019    AC_SUBST(ADA_INCLUDE)
1020
1021    CF_WITH_PATH(ada-objects,
1022        [  --with-ada-objects=DIR  Ada objects are in DIR],
1023        ADA_OBJECTS,
1024        PREFIX/lib/ada/adalib,
1025        [$]prefix/lib/ada/adalib)
1026    AC_SUBST(ADA_OBJECTS)
1027
1028 fi
1029 fi
1030
1031 ### It's not possible to appease gcc 2.6.3's conversion-warnings if we're
1032 ### using a 'char' for bools.  gcc 2.7.0's conversion-warnings are broken too
1033 ### badly to consider using for development purposes, but 2.5.8 is okay.
1034 if test -n "$with_warnings"; then
1035         if test "$GCC" = yes; then
1036                 case "`$CC --version`" in
1037                 2.6.3)
1038                         if test "$cf_cv_type_of_bool" != "char"; then
1039                                 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
1040                         fi
1041                         ;;
1042                 2.5*)
1043                         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
1044                         ;;
1045                 esac
1046         fi
1047 fi
1048
1049 ### Construct the library-subsets, if any, from this set of keywords:
1050 ### none, base, ext_funcs, termlib.
1051 AC_MSG_CHECKING(for library subsets)
1052 if test "$with_termlib" = yes ; then
1053         LIB_SUBSETS="termlib "
1054 else
1055         LIB_SUBSETS="termlib+"
1056 fi
1057 LIB_SUBSETS="${LIB_SUBSETS}base"
1058 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
1059 AC_MSG_RESULT($LIB_SUBSETS)
1060
1061 LIB_TRACING=DEBUG
1062 case "$CFLAGS" in
1063 *-DTRACE*)
1064         LIB_TRACING=all
1065         ;;
1066 esac
1067
1068 ### Construct the list of include-directories to be generated
1069 CF_INCLUDE_DIRS
1070 CF_ADA_INCLUDE_DIRS
1071
1072 ### Build up pieces for makefile rules
1073 AC_MSG_CHECKING(default library suffix)
1074 CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
1075 AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
1076 AC_MSG_RESULT($DFT_ARG_SUFFIX)
1077
1078 AC_MSG_CHECKING(default library-dependency suffix)
1079 CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl
1080 AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
1081 AC_MSG_RESULT($DFT_DEP_SUFFIX)
1082
1083 AC_MSG_CHECKING(default object directory)
1084 CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
1085 AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
1086 AC_MSG_RESULT($DFT_OBJ_SUBDIR)
1087
1088 # libtool thinks it can make c++ shared libraries (perhaps only g++)
1089 AC_MSG_CHECKING(c++ library-dependency suffux)
1090 if test "$with_libtool" = "yes"; then
1091         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
1092 else
1093         CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX)dnl we normally make a static library
1094 fi
1095 AC_MSG_RESULT($CXX_LIB_SUFFIX)
1096 AC_SUBST(CXX_LIB_SUFFIX)
1097
1098 TINFO_LIST="$SHLIB_LIST"
1099 test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
1100
1101 AC_MSG_CHECKING(where we will install curses.h)
1102 test "$with_overwrite" = no && \
1103 test "x$includedir" = 'x${prefix}/include' && \
1104         includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
1105 AC_MSG_RESULT($includedir)
1106
1107 AC_SUBST(EXTRA_LIBS)
1108 AC_SUBST(TINFO_LIST)
1109 AC_SUBST(SHLIB_LIST)
1110
1111 ### Set up low-level terminfo dependencies for makefiles.  Note that we
1112 ### could override this.
1113 if test "$with_termlib" = yes ; then
1114         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
1115         if test "$DFT_LWR_MODEL" = "libtool"; then
1116                 TEST_ARGS="${TEST_DEPS}"
1117         else
1118                 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
1119         fi
1120 fi
1121 PROG_DEPS="$TEST_DEPS"
1122 PROG_ARGS="$TEST_ARGS"
1123
1124 ### Construct the list of subdirectories for which we'll customize makefiles
1125 ### with the appropriate compile-rules.
1126
1127 CF_SRC_MODULES($modules_to_build)
1128 CF_DIRS_TO_MAKE
1129
1130 ### Now that we're done running tests, add the compiler-warnings, if any
1131 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
1132
1133 ################################################################################
1134 AC_OUTPUT( \
1135         include/MKterm.h.awk \
1136         include/curses.h \
1137         include/termcap.h \
1138         include/unctrl.h \
1139         misc/run_tic.sh:misc/run_tic.in \
1140         $SUB_MAKEFILES \
1141         Makefile,[
1142 CF_LIB_RULES
1143 ],[
1144 ### Special initialization commands, used to pass information from the
1145 ### configuration-run into config.status
1146
1147 AWK="$AWK"
1148 CF_LIST_MODELS="$cf_list_models"
1149 DFT_LWR_MODEL="$DFT_LWR_MODEL"
1150 LDCONFIG="$LDCONFIG"
1151 LIB_NAME="$LIB_NAME"
1152 LIB_SUFFIX="$LIB_SUFFIX"
1153 LIB_SUBSETS="$LIB_SUBSETS"
1154 LIB_TRACING="$LIB_TRACING"
1155 SRC_SUBDIRS="$SRC_SUBDIRS"
1156 TERMINFO="$TERMINFO"
1157 TINFO_NAME="$TINFO_NAME"
1158 WITH_ECHO="$with_echo"
1159 WITH_OVERWRITE="$with_overwrite"
1160 WITH_CURSES_H="$with_curses_h"
1161 cf_cv_abi_version="$cf_cv_abi_version"
1162 cf_cv_do_symlinks="$cf_cv_do_symlinks"
1163 cf_cv_rel_version="$cf_cv_rel_version"
1164 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
1165 cf_cv_system_name="$cf_cv_system_name"
1166 cf_with_cxx_binding="$cf_with_cxx_binding"
1167 cf_cv_shlib_version="$cf_cv_shlib_version"
1168 target="$target"
1169
1170 ],sort)dnl
1171 ${MAKE-make} preinstall