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