1 dnl***************************************************************************
2 dnl Copyright (c) 1998 Free Software Foundation, Inc. *
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: *
12 dnl The above copyright notice and this permission notice shall be included *
13 dnl in all copies or substantial portions of the Software. *
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. *
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 *
27 dnl***************************************************************************
29 dnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
31 dnl $Id: configure.in,v 1.126 1998/02/12 23:10:43 tom Exp $
32 dnl Process this file with autoconf to produce a configure script.
33 AC_PREREQ(2.12.971222)
34 AC_REVISION($Revision: 1.126 $)
35 AC_INIT(ncurses/lib_initscr.c)
36 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
38 CF_SUBST_NCURSES_VERSION
40 AC_ARG_WITH(system-type,
41 [ --with-system-type=XXX test: override derived host system-type],
42 [AC_MSG_WARN(overriding system type to $withval)
43 cf_cv_system_name=$withval])
45 # We need a configure script only when compiling as part of GNU C library.
46 # Here we have to generate one of the files we need while compiling.
48 # The only problem is that users of the package might think they have to
49 # run configure themself and find it irritating when nothing happens.
51 # So we try here to find out whether we are called from the glibc configure
54 dnl Check if we are a drop-in addition to glibc.
55 AC_ARG_ENABLE(add-ons, dnl
56 [ --enable-add-ons=DIR... used to check if we are a glibc add-on.],
60 dnl We need to use [ and ] for other purposes for a while now.
62 if test x"$glibc_add_on" = "xyes" ; then
65 rm -f $srcdir/Makefile
66 cp $srcdir/Makefile.glibc $srcdir/Makefile
67 echo "ncurses `grep \"^[ ]*ncurses-version[ ]*=.*$\" \
68 $srcdir/Makefile | sed -e \
69 's/^[ ]*ncurses-version[ ]*=[ ]*\([^ ^ ]*\)[ ]*$/\1/'`" > $srcdir/Banner
74 ### Save the given $CFLAGS to allow user-override.
75 cf_user_CFLAGS="$CFLAGS"
77 ### Default install-location
80 ### Checks for programs.
82 if test -n "$GCC" ; then
83 AC_MSG_CHECKING(version of gcc)
87 AC_PROG_GCC_TRADITIONAL
89 AC_PATH_PROG(LDCONFIG,ldconfig,,$PATH:/sbin:/usr/sbin)
91 dnl DEFECT in autoconf 2.12: an attempt to set policy, this breaks the
92 dnl configure script by not letting us test if C++
93 dnl is present, making this option necessary.
94 AC_MSG_CHECKING(if you want to build with C++)
96 [ --without-cxx suppress check for C++, don't build demo],
97 [cf_with_cxx=$withval],
99 AC_MSG_RESULT($cf_with_cxx)
100 if test "X$cf_with_cxx" != Xno ; then
104 if test -n "$GXX" ; then case "`${CXX-g++} --version`" in 1*|2.[0-6]*) GXX=""; CXX=""; ac_cv_prog_gxx=no; cf_cxx_library=no ; echo No: templates do not work;; esac; fi
107 AC_MSG_CHECKING(if you want to build programs such as tic)
109 [ --without-progs suppress build with programs (e.g., tic)],
110 [cf_with_progs=$withval],
112 AC_MSG_RESULT($cf_with_progs)
114 modules_to_build="ncurses"
115 if test "X$cf_with_progs" != Xno ; then
116 modules_to_build="$modules_to_build progs tack"
118 modules_to_build="$modules_to_build panel menu form"
123 AC_SYS_LONG_FILE_NAMES
126 AC_CHECK_PROGS(LINT, tdlint lint alint)
127 AC_CHECK_PROGS(MAN, man man_db)
130 dnl These are standard among *NIX systems, but not when cross-compiling
131 CF_SUBST(loader,LD,ld)
132 CF_SUBST(archiver,AR,ar)
133 CF_SUBST(archiver options,AR_OPTS,rv)
138 dnl Special option for use by system-builders: the install-prefix is used to
139 dnl adjust the location into which the actual install is done, so that an
140 dnl archive can be built without modifying the host system's configuration.
141 AC_MSG_CHECKING(if you have specified an install-prefix)
142 AC_ARG_WITH(install-prefix,
143 [ --with-install-prefix prefixes actual install-location],
144 [case "$withval" in #(vi
147 *) INSTALL_PREFIX="$withval"
150 AC_MSG_RESULT($INSTALL_PREFIX)
151 AC_SUBST(INSTALL_PREFIX)
153 ###############################################################################
154 CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
156 ### Options to allow the user to specify the set of libraries which are used.
157 ### Use "--without-normal --with-shared" to allow the default model to be
158 ### shared, for example.
161 AC_MSG_CHECKING(if you want to build shared libraries)
163 [ --with-shared generate shared-libraries],
164 [with_shared=$withval],
166 AC_MSG_RESULT($with_shared)
167 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
169 AC_MSG_CHECKING(if you want to build static libraries)
171 [ --with-normal generate normal-libraries (default)],
172 [with_normal=$withval],
174 AC_MSG_RESULT($with_normal)
175 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
177 AC_MSG_CHECKING(if you want to build debug libraries)
179 [ --with-debug generate debug-libraries (default)],
180 [with_debug=$withval],
182 AC_MSG_RESULT($with_debug)
183 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
185 AC_MSG_CHECKING(if you want to build profiling libraries)
187 [ --with-profile generate profile-libraries],
188 [with_profile=$withval],
190 AC_MSG_RESULT($with_profile)
191 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
193 AC_MSG_CHECKING(if you want to build a separate terminfo library)
195 [ --with-termlib generate separate terminfo library],
196 [with_termlib=$withval],
198 AC_MSG_RESULT($with_termlib)
200 ### Checks for special libraries, must be done up-front.
201 AC_MSG_CHECKING(if you want to link with dbmalloc for testing)
202 AC_ARG_WITH(dbmalloc,
203 [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
206 AC_MSG_RESULT($with_dbmalloc)
207 if test $with_dbmalloc = yes ; then
208 AC_CHECK_LIB(dbmalloc,debug_malloc)
211 AC_MSG_CHECKING(if you want to link with dmalloc for testing)
213 [ --with-dmalloc test: use Gray Watson's dmalloc library],
216 AC_MSG_RESULT($with_dmalloc)
217 if test $with_dmalloc = yes ; then
218 AC_CHECK_LIB(dmalloc,dmalloc_debug)
221 AC_MSG_CHECKING(if you want to link with the gpm mouse library)
223 [ --with-gpm use Alessandro Rubini's GPM library],
226 AC_MSG_RESULT($with_gpm)
227 if test $with_gpm = yes ; then
228 AC_CHECK_LIB(gpm,Gpm_Open,[
229 EXTRA_LIBS="$EXTRA_LIBS -lgpm -lncurses"
230 SHLIB_LIST="$SHLIB_DEPS -lgpm "
231 AC_DEFINE(HAVE_LIBGPM)
232 AC_CHECK_HEADERS(gpm.h)
233 ],,-lcurses -ltermcap)
239 AC_MSG_CHECKING(for specified models)
240 test -z "$cf_list_models" && cf_list_models=normal
241 AC_MSG_RESULT($cf_list_models)
243 ### Use the first model as the default, and save its suffix for use in building
244 ### up test-applications.
245 DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
246 CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
247 CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl
248 CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
249 CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
250 AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
251 AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal")
252 AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL")
253 AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
254 AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
255 AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug")
264 CF_LIB_PREFIX(cf_prefix)
265 LIB_PREFIX=$LIB_DIR/$cf_prefix
268 dnl Not all ports of gcc support the -g option
269 dnl autoconf 2.12 uses different symbol for -g option than autoconf 2.10, etc.
271 if test X"$CC_G_OPT" = X"" ; then
273 test -n "$GCC" && test "${ac_cv_prog_cc_g}${ac_cv_prog_gcc_g}" != yes && CC_G_OPT=''
277 if test X"$CXX_G_OPT" = X"" ; then
279 test -n "$GXX" && test "${ac_cv_prog_cxx_g}${ac_cv_prog_gxx_g}" != yes && CXX_G_OPT=''
283 case $DFT_LWR_MODEL in
284 normal) LD_MODEL='' ;;
285 debug) LD_MODEL=$CC_G_OPT ;;
286 profile) LD_MODEL='-pg';;
287 shared) LD_MODEL='' ;;
289 AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)
291 AC_MSG_CHECKING(if rpath option should be used)
293 [ --enable-rpath use rpath option when generating shared libraries],
294 [cf_cv_ld_rpath=$enableval],
296 AC_MSG_RESULT($cf_cv_ld_rpath)
300 if test "$CC_SHARED_OPTS" = "unknown"; then
301 for model in $cf_list_models; do
302 if test "$model" = "shared"; then
303 AC_ERROR(Shared libraries are not supported in this version)
308 ###############################################################################
309 CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
311 ### use option --disable-overwrite to leave out the link to -lcurses
312 AC_MSG_CHECKING(if you wish to install ncurses overwriting curses)
313 AC_ARG_ENABLE(overwrite,
314 [ --disable-overwrite leave out the link to -lcurses],
315 [with_overwrite=$enableval
316 test "$with_overwrite" = no && \
317 test "x$includedir" = 'x${prefix}/include' && \
318 includedir='$(prefix)/include/ncurses'
320 [with_overwrite=yes])
321 AC_MSG_RESULT($with_overwrite)
322 AC_MSG_CHECKING(where we will install curses.h)
323 AC_MSG_RESULT($includedir)
325 AC_MSG_CHECKING(if external terminfo-database is used)
326 AC_ARG_ENABLE(database,
327 [ --disable-database use only built-in data],
328 [with_database=$enableval],
330 AC_MSG_RESULT($with_database)
331 test $with_database != no && AC_DEFINE(USE_DATABASE)
333 AC_MSG_CHECKING(if you want to build with function extensions)
334 AC_ARG_ENABLE(ext-funcs,
335 [ --disable-ext-funcs disable function-extensions],
336 [with_ext_funcs=$enableval],
337 [with_ext_funcs=yes])
338 AC_MSG_RESULT($with_ext_funcs)
339 test "$with_ext_funcs" = yes && AC_DEFINE(NCURSES_EXT_FUNCS)
341 AC_MSG_CHECKING(for list of fallback descriptions)
342 AC_ARG_WITH(fallbacks,
343 [ --with-fallbacks=XXX specify list of fallback terminal descriptions],
344 [with_fallback=$withval],
346 AC_MSG_RESULT($with_fallback)
347 FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /'`
348 AC_SUBST(FALLBACK_LIST)
350 if test $with_database = no ; then
351 if test -z $with_fallback ; then
352 AC_ERROR(You have disabled the database w/o specifying fallbacks)
356 ### use option --enable-big-core to make tic run faster on big machines
357 AC_MSG_CHECKING(if big-core option selected)
358 AC_ARG_ENABLE(big-core,
359 [ --enable-big-core assume machine has lots of memory],
360 [with_big_core=$enableval],
362 AC_MSG_RESULT($with_big_core)
363 test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE)
365 ### use option --enable-termcap to compile in the termcap fallback support
366 AC_MSG_CHECKING(if you want termcap-fallback support)
367 AC_ARG_ENABLE(termcap,
368 [ --enable-termcap compile in termcap fallback support],
369 [with_termcap=$enableval],
371 AC_MSG_RESULT($with_termcap)
373 if test "$with_termcap" != "yes" ; then
374 AC_DEFINE(PURE_TERMINFO)
377 ### use option --enable-getcap to use a hacked getcap for reading termcaps
378 AC_MSG_CHECKING(if fast termcap-loader is needed)
379 AC_ARG_ENABLE(getcap,
380 [ --enable-getcap fast termcap load, no xrefs to terminfo],
381 [with_getcap=$enableval],
383 AC_MSG_RESULT($with_getcap)
384 test "$with_getcap" = "yes" && AC_DEFINE(USE_GETCAP)
386 AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo)
387 AC_ARG_ENABLE(getcap-cache,
388 [ --enable-getcap-cache cache translated termcaps in ~/.terminfo],
389 [with_getcap_cache=$enableval],
390 [with_getcap_cache=no])
391 AC_MSG_RESULT($with_getcap_cache)
392 test "$with_getcap_cache" = "yes" && AC_DEFINE(USE_GETCAP_CACHE)
396 ### Use option --enable-symlinks to make tic use symlinks, not hard links
397 ### to reduce storage requirements for the terminfo database.
399 ### Most Unix systems have both link and symlink, a few don't have symlink.
400 ### A few non-Unix systems implement symlink, but not link.
401 ### A few non-systems implement neither.
410 if test "$ac_cv_func_link" != yes ; then
411 AC_MSG_CHECKING(if tic should use symbolic links)
412 if test "$ac_cv_func_symlink" = yes ; then
417 AC_MSG_RESULT($with_symlinks)
418 elif test "$ac_cv_func_symlink" != yes ; then
419 AC_MSG_CHECKING(if tic should use hard links)
420 if test "$ac_cv_func_link" = yes ; then
425 AC_MSG_RESULT($with_links)
427 AC_MSG_CHECKING(if tic should use symbolic links)
428 AC_ARG_ENABLE(symlinks,
429 [ --enable-symlinks make tic use symbolic links not hard links],
430 [with_symlinks=$enableval],
432 AC_MSG_RESULT($with_symlinks)
435 test "$with_links" = yes && AC_DEFINE(USE_LINKS)
436 test "$with_symlinks" = yes && AC_DEFINE(USE_SYMLINKS)
438 ### use option --enable-bsdpad to have tputs process BSD-style prefix padding
439 AC_MSG_CHECKING(if tputs should process BSD-style prefix padding)
440 AC_ARG_ENABLE(bsdpad,
441 [ --enable-bsdpad recognize BSD-style prefix padding],
442 [with_bsdpad=$enableval],
444 AC_MSG_RESULT($with_bsdpad)
445 test "$with_bsdpad" = yes && AC_DEFINE(BSD_TPUTS)
447 ### use option --enable-const to turn on use of const beyond that in XSI.
448 AC_MSG_CHECKING(for extended use of const keyword)
450 [ --enable-const compile with extra/non-standard const],
451 [with_ext_const=$enableval],
453 AC_MSG_RESULT($with_ext_const)
454 test "$with_ext_const" = yes && AC_DEFINE(NCURSES_CONST,const)
456 ### Enable compiling-in rcs id's
457 AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
459 [ --with-rcs-ids compile-in RCS identifiers],
460 [with_rcs_ids=$enableval],
462 AC_MSG_RESULT($with_rcs_ids)
463 test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
465 ###############################################################################
466 CF_HELP_MESSAGE(Experimental Code:)
467 AC_MSG_CHECKING(if you want all experimental code)
469 [ --with-develop enable all experimental options for testing],
470 [with_develop=$withval],
472 AC_MSG_RESULT($with_develop)
474 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize
475 AC_MSG_CHECKING(if you want experimental hard-tabs code)
476 AC_ARG_ENABLE(hard-tabs,
477 [ --enable-hard-tabs compile with experimental hard-tabs code],
478 [with_hardtabs=$enableval],
479 [with_hardtabs=$with_develop])
480 AC_MSG_RESULT($with_hardtabs)
481 test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS)
483 ### use option --enable-hashmap to turn on use of hashmap scrolling logic
484 AC_MSG_CHECKING(if you want experimental hashmap code)
485 AC_ARG_ENABLE(hashmap,
486 [ --enable-hashmap compile with experimental hashmap code],
487 [with_hashmap=$enableval],
488 [with_hashmap=$with_develop])
489 AC_MSG_RESULT($with_hashmap)
490 test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP)
492 AC_MSG_CHECKING(if you want experimental safe-sprintf code)
493 AC_ARG_ENABLE(safe-sprintf,
494 [ --disable-safe-sprintf compile with experimental safe-sprintf code],
495 [with_safe_sprintf=$enableval],
496 [with_safe_sprintf=no])
497 AC_MSG_RESULT($with_safe_sprintf)
498 test "$with_safe_sprintf" = yes && AC_DEFINE(USE_SAFE_SPRINTF)
500 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
501 AC_MSG_CHECKING(if you want to experiment without scrolling-hints code)
502 AC_ARG_ENABLE(scroll-hints,
503 [ --disable-scroll-hints compile hashmap without scroll-hints code],
504 [with_scroll_hints=$enableval],
505 [with_scroll_hints=yes])
506 AC_MSG_RESULT($with_scroll_hints)
507 test "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS)
509 ### use option --enable-sigwinch to turn on use of SIGWINCH logic
510 AC_MSG_CHECKING(if you want experimental SIGWINCH handler)
511 AC_ARG_ENABLE(sigwinch,
512 [ --enable-sigwinch compile with experimental SIGWINCH handler],
513 [with_sigwinch=$enableval],
514 [with_sigwinch=$with_develop])
515 AC_MSG_RESULT($with_sigwinch)
516 test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH)
518 ### use option --enable-widec to turn on use of wide-character support
519 AC_MSG_CHECKING(if you want experimental wide-character code)
521 [ --enable-widec compile with experimental wide-char code],
522 [with_widec=$enableval],
524 AC_MSG_RESULT($with_widec)
525 test "$with_widec" = yes && AC_DEFINE(USE_WIDEC_SUPPORT)
527 ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
528 AC_MSG_CHECKING(if you want experimental xmc code)
529 AC_ARG_ENABLE(xmc-glitch,
530 [ --enable-xmc-glitch compile with experimental xmc code],
531 [with_xmc_glitch=$enableval],
532 [with_xmc_glitch=$with_develop])
533 AC_MSG_RESULT($with_xmc_glitch)
534 test "$with_xmc_glitch" = yes && AC_DEFINE(USE_XMC_SUPPORT)
536 ###############################################################################
537 CF_HELP_MESSAGE(Testing/development Options:)
539 ### use option --disable-echo to suppress full display compiling commands
541 [ --enable-echo build: display "compiling" commands (default)],
542 [with_echo=$enableval],
544 if test "$with_echo" = yes; then
547 ECHO_LINK='@ echo linking $@ ... ;'
551 ### use option --enable-warnings to turn on all gcc warnings
552 AC_ARG_ENABLE(warnings,
553 [ --enable-warnings build: turn on GCC compiler warnings],
554 [with_warnings=$enableval])
555 if test -n "$with_warnings"; then
556 ADAFLAGS="$ADAFLAGS -gnatg"
561 ### use option --enable-assertions to turn on generation of assertion code
562 AC_ARG_ENABLE(assertions,
563 [ --enable-assertions test: turn on generation of assertion code],
564 [with_assertions=$enableval],
565 [with_assertions=no])
568 if test $with_assertions = no
571 CPPFLAGS="$CPPFLAGS -DNDEBUG"
573 ADAFLAGS="$ADAFLAGS -gnata"
577 ### use option --disable-leaks to suppress "permanent" leaks, for testing
579 [ --disable-leaks test: suppress permanent memory-leaks],
580 [test $enableval = no && AC_DEFINE(NO_LEAKS)])
581 AC_DEFINE(HAVE_NC_ALLOC_H)
583 ### use option --enable-expanded to generate certain macros as functions
584 AC_ARG_ENABLE(expanded,
585 [ --enable-expanded test: generate functions for certain macros],
586 [test $enableval = yes && AC_DEFINE(NCURSES_EXPANDED)])
588 ### use option --disable-macros to suppress macros in favor of functions
589 AC_ARG_ENABLE(macros,
590 [ --disable-macros test: use functions rather than macros],
591 [test $enableval = no && AC_DEFINE(NCURSES_NOMACROS)])
593 ### Checks for libraries.
594 AC_CHECK_FUNC(gettimeofday,
595 AC_DEFINE(HAVE_GETTIMEOFDAY),[
597 AC_CHECK_LIB(bsd, gettimeofday,
598 AC_DEFINE(HAVE_GETTIMEOFDAY)
599 LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
603 AC_CHECK_LIB(m, sin,[MATH_LIB="-lm"]))
606 ### Checks for header files.
611 dnl These are some other potentially nonportable headers.
634 case $cf_cv_system_name in
636 # check for HPUX's ANSI compiler
637 if test -z "$GCC"; then
638 AC_MSG_CHECKING([for HP/UX ANSI compiler])
639 cf_save_CFLAGS="$CFLAGS"
641 AC_TRY_COMPILE([],[void (*f)(void)=0],[cf_hpux_cc=yes],[cf_hpux_cc=no])
642 AC_MSG_RESULT($cf_hpux_cc)
643 if test $cf_hpux_cc = yes; then
644 AC_DEFINE(_HPUX_SOURCE)
646 CFLAGS="$cf_save_CFLAGS"
651 # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
652 CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
653 LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
659 # check for ISC (this may also define _POSIX_SOURCE)
660 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
661 if test "$ISC" = yes ; then
662 AC_CHECK_LIB(cposix,main)
663 AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()'
664 AC_CHECK_HEADERS( sys/termio.h )
669 ### checks for compiler characteristics
673 test $ac_cv_c_inline != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)
678 ### Checks for external-data
683 ### Checks for library functions.
705 if test "$with_getcap" = "yes" ; then
713 dnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLS
714 if test "$cross_compiling" = yes ; then
715 AC_MSG_WARN(cross compiling: assume setvbuf params not reversed)
717 AC_FUNC_SETVBUF_REVERSED
723 dnl FIXME checks we don't do (but neither does the old Configure script):
724 case "$cf_cv_system_name" in
726 AC_DEFINE(GOOD_SELECT)
730 dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
731 if test -z "$cf_user_CFLAGS" ; then
732 CF_STRIP_G_OPT(CFLAGS)
733 CF_STRIP_G_OPT(CXXFLAGS)
736 dnl Check for C++ compiler characteristics (and ensure that it's there!)
737 if test -n "$CXX" ; then
738 AC_CHECK_PROG(CXX_EXISTS, $CXX, yes, no)
740 ac_cv_prog_CXX_EXISTS=no
742 if test "$ac_cv_prog_CXX_EXISTS" = yes; then
745 AC_CHECK_HEADERS(builtin.h typeinfo)
750 AC_CACHE_VAL(cf_cv_builtin_bool,[cf_cv_builtin_bool=0])
751 AC_CACHE_VAL(cf_cv_sizeof_bool,[cf_cv_sizeof_bool=int])
755 CF_HELP_MESSAGE(Ada95 Binding Options:)
757 dnl Check for availability of GNU Ada Translator (GNAT).
758 dnl At the moment we support no other Ada95 compiler.
760 AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
761 if test "$ac_cv_prog_gnat_exists" = no; then
765 AC_CHECK_PROG(m4_exists, m4, yes, no)
766 if test "$ac_cv_prog_m4_exists" = no; then
767 ac_cv_prog_gnat_correct=no
768 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
771 if test "$ac_cv_prog_gnat_correct" = yes; then
772 ADAFLAGS="-O3 $ADAFLAGS"
774 cf_ada_package=terminal_interface
776 AC_SUBST(cf_ada_make)
777 AC_SUBST(cf_ada_compiler)
778 AC_SUBST(cf_ada_package)
780 AC_SUBST(cf_compile_generics)
782 CF_WITH_PATH(ada-include,
783 [ --with-ada-include=DIR Ada includes are in DIR],
786 [$]exec_prefix/ada_include)
787 AC_SUBST(ADA_INCLUDE)
789 CF_WITH_PATH(ada-objects,
790 [ --with-ada-objects=DIR Ada objects are in DIR],
793 [$]exec_prefix/ada_objects)
794 AC_SUBST(ADA_OBJECTS)
798 ### It's not possible to appease gcc 2.6.3's conversion-warnings if we're
799 ### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too
800 ### badly to consider using for development purposes, but 2.5.8 is okay.
801 if test -n "$with_warnings"; then
802 if test -n "$GCC"; then
803 case "`$CC --version`" in
805 if test "$cf_cv_sizeof_bool" != "char"; then
806 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
810 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
816 ### Construct the library-subsets, if any, from this set of keywords:
817 ### none, base, ext_funcs, termlib.
818 AC_MSG_CHECKING(for library subsets)
819 if test "$with_termlib" = yes ; then
820 LIB_SUBSETS="termlib "
822 LIB_SUBSETS="termlib+"
824 LIB_SUBSETS="${LIB_SUBSETS}base"
825 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
826 AC_MSG_RESULT($LIB_SUBSETS)
828 ### Construct the list of include-directories to be generated
832 ### Set up low-level terminfo dependencies for makefiles. Note that we
833 ### could override this.
834 if test "$with_termlib" = yes ; then
835 TEST_DEPS="${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
836 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
838 PROG_DEPS="$TEST_DEPS"
839 PROG_ARGS="$TEST_ARGS"
841 ### Construct the list of subdirectories for which we'll customize makefiles
842 ### with the appropriate compile-rules.
844 CF_SRC_MODULES($modules_to_build)
847 ### Now that we're done running tests, add the compiler-warnings, if any
848 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
850 ################################################################################
852 include/MKterm.h.awk \
860 ### Special initialization commands, used to pass information from the
861 ### configuration-run into config.status
864 CF_LIST_MODELS="$cf_list_models"
865 DFT_LWR_MODEL="$DFT_LWR_MODEL"
868 LIB_SUBSETS="$LIB_SUBSETS"
869 SRC_SUBDIRS="$SRC_SUBDIRS"
870 TINFO_NAME="$TINFO_NAME"
871 WITH_ECHO="$with_echo"
872 WITH_OVERWRITE="$with_overwrite"
873 cf_cv_abi_version="$cf_cv_abi_version"
874 cf_cv_do_symlinks="$cf_cv_do_symlinks"
875 cf_cv_rel_version="$cf_cv_rel_version"
876 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
877 cf_cv_system_name="$cf_cv_system_name"
878 cf_cxx_library="$cf_cxx_library"
882 ${MAKE-make} preinstall