blob: 488d93fc1c02dfecf80e3bf8b1d511bf01d072fb [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301#! /bin/sh
micky3879b9f5e72025-07-08 18:04:53 -04002# From configure.in Revision: 1.779 .
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05303# Guess values for system-dependent variables and create Makefiles.
micky3879b9f5e72025-07-08 18:04:53 -04004# Generated by Autoconf 2.52.20231210.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05305#
micky3879b9f5e72025-07-08 18:04:53 -04006# Copyright 2003-2022,2023 Thomas E. Dickey
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05307# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8# Free Software Foundation, Inc.
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11
12# Avoid depending upon Character Ranges.
13as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16as_cr_digits='0123456789'
17as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19# Sed expression to map a string onto a valid variable name.
20as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22# Sed expression to map a string onto a valid CPP name.
23as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25# Be Bourne compatible
26if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 emulate sh
28 NULLCMD=:
29elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30 set -o posix
31fi
32
33# Name of the executable.
34as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36if expr a : '\(a\)' >/dev/null 2>&1; then
micky3879b9f5e72025-07-08 18:04:53 -040037 as_expr="expr"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053038else
micky3879b9f5e72025-07-08 18:04:53 -040039 as_expr="false"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053040fi
41
42rm -f conf$$ conf$$.exe conf$$.file
43echo >conf$$.file
44if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
49 as_ln_s='cp -p'
50 else
51 as_ln_s='ln -s'
52 fi
53elif ln conf$$.file conf$$ 2>/dev/null; then
micky3879b9f5e72025-07-08 18:04:53 -040054 as_ln_s='ln'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053055else
56 as_ln_s='cp -p'
57fi
58rm -f conf$$ conf$$.exe conf$$.file
59
60as_executable_p="test -f"
61
62# Support unset when possible.
63if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
micky3879b9f5e72025-07-08 18:04:53 -040064 as_unset="unset"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053065else
micky3879b9f5e72025-07-08 18:04:53 -040066 as_unset="false"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053067fi
68
69# NLS nuisances.
70$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79# IFS
80# We need space, tab and new line, in precisely that order.
81as_nl='
82'
83IFS=" $as_nl"
84
85# CDPATH.
86$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88# Name of the host.
89# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90# so uname gets run too.
91ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93exec 6>&1
94
95#
96# Initializations.
97#
98ac_default_prefix=/usr/local
99cross_compiling=no
100subdirs=
micky3879b9f5e72025-07-08 18:04:53 -0400101MFLAGS=
102MAKEFLAGS=
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530103SHELL=${CONFIG_SHELL-/bin/sh}
104
105# Maximum number of lines to put in a shell here document.
106# This variable seems obsolete. It should probably be removed, and
107# only ac_max_sed_lines should be used.
micky3879b9f5e72025-07-08 18:04:53 -0400108: "${ac_max_here_lines=38}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530109
110ac_unique_file="ncurses/base/lib_initscr.c"
111# Factoring default headers for most tests.
112ac_includes_default="\
113#include <stdio.h>
114#if HAVE_SYS_TYPES_H
115# include <sys/types.h>
116#endif
117#if HAVE_SYS_STAT_H
118# include <sys/stat.h>
119#endif
120#if STDC_HEADERS
121# include <stdlib.h>
122# include <stddef.h>
123#else
124# if HAVE_STDLIB_H
125# include <stdlib.h>
126# endif
127#endif
128#if HAVE_STRING_H
129# if !STDC_HEADERS && HAVE_MEMORY_H
130# include <memory.h>
131# endif
132# include <string.h>
133#endif
134#if HAVE_STRINGS_H
135# include <strings.h>
136#endif
137#if HAVE_INTTYPES_H
138# include <inttypes.h>
139#else
140# if HAVE_STDINT_H
141# include <stdint.h>
142# endif
143#endif
144#if HAVE_UNISTD_H
145# include <unistd.h>
146#endif"
147
148# Initialize some variables set by options.
149ac_init_help=
150ac_init_version=false
151# The variables have the same names as the options, with
152# dashes changed to underlines.
153cache_file=/dev/null
154exec_prefix=NONE
155no_create=
156no_recursion=
157prefix=NONE
158program_prefix=NONE
159program_suffix=NONE
160program_transform_name=s,x,x,
161silent=
162site=
163srcdir=
164verbose=
165x_includes=NONE
166x_libraries=NONE
167
168# Installation directory options.
169# These are left unexpanded so users can "make install exec_prefix=/foo"
170# and all the variables that are supposed to be based on exec_prefix
171# by default will actually change.
172# Use braces instead of parens because sh, perl, etc. also accept them.
173bindir='${exec_prefix}/bin'
174sbindir='${exec_prefix}/sbin'
175libexecdir='${exec_prefix}/libexec'
Steve Kondikae271bc2015-11-15 02:50:53 +0100176datarootdir='${prefix}/share'
177datadir='${datarootdir}'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530178sysconfdir='${prefix}/etc'
179sharedstatedir='${prefix}/com'
180localstatedir='${prefix}/var'
micky3879b9f5e72025-07-08 18:04:53 -0400181runstatedir='${localstatedir}/run'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530182libdir='${exec_prefix}/lib'
183includedir='${prefix}/include'
184oldincludedir='/usr/include'
Steve Kondikae271bc2015-11-15 02:50:53 +0100185infodir='${datarootdir}/info'
186mandir='${datarootdir}/man'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530187
188# Identity of this package.
189PACKAGE_NAME=
190PACKAGE_TARNAME=
191PACKAGE_VERSION=
192PACKAGE_STRING=
193PACKAGE_BUGREPORT=
194
195ac_prev=
196for ac_option
197do
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
201 ac_prev=
202 continue
203 fi
204
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207 # Accept the important Cygnus configure options, so we can diagnose typos.
208
micky3879b9f5e72025-07-08 18:04:53 -0400209 case "$ac_option" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530210
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
212 ac_prev=bindir ;;
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214 bindir=$ac_optarg ;;
215
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
220
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
227
228 --config-cache | -C)
229 cache_file=config.cache ;;
230
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232 ac_prev=datadir ;;
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234 | --da=*)
235 datadir=$ac_optarg ;;
236
Steve Kondikae271bc2015-11-15 02:50:53 +0100237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
243
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -0400250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530251 eval "enable_$ac_feature=no" ;;
252
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -0400259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260 case "$ac_option" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262 *) ac_optarg=yes ;;
263 esac
264 eval "enable_$ac_feature='$ac_optarg'" ;;
265
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
274
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
277 with_gas=yes ;;
278
279 -help | --help | --hel | --he | -h)
280 ac_init_help=long ;;
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
285
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
290
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
297
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
299 ac_prev=infodir ;;
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
302
303 -libdir | --libdir | --libdi | --libd)
304 ac_prev=libdir ;;
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
306 libdir=$ac_optarg ;;
307
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
314
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
323
micky3879b9f5e72025-07-08 18:04:53 -0400324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
332
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334 ac_prev=mandir ;;
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336 mandir=$ac_optarg ;;
337
338 -nfp | --nfp | --nf)
339 # Obsolete; use --without-fp.
340 with_fp=no ;;
341
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343 | --no-cr | --no-c)
344 no_create=yes ;;
345
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348 no_recursion=yes ;;
349
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
358
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360 ac_prev=prefix ;;
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362 prefix=$ac_optarg ;;
363
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
370
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
377
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
394
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
397 silent=yes ;;
398
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400 ac_prev=sbindir ;;
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402 | --sbi=* | --sb=*)
403 sbindir=$ac_optarg ;;
404
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
408 | --sha | --sh)
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413 | --sha=* | --sh=*)
414 sharedstatedir=$ac_optarg ;;
415
416 -site | --site | --sit)
417 ac_prev=site ;;
418 -site=* | --site=* | --sit=*)
419 site=$ac_optarg ;;
420
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422 ac_prev=srcdir ;;
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424 srcdir=$ac_optarg ;;
425
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
432
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
437
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
439 verbose=yes ;;
440
441 -version | --version | --versio | --versi | --vers | -V)
442 ac_init_version=: ;;
443
444 -with-* | --with-*)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -0400450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451 case "$ac_option" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453 *) ac_optarg=yes ;;
454 esac
455 eval "with_$ac_package='$ac_optarg'" ;;
456
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -0400463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530464 eval "with_$ac_package=no" ;;
465
466 --x)
467 # Obsolete; use --with-x.
468 with_x=yes ;;
469
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
476
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
483
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
487 ;;
488
489 *=*)
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
micky3879b9f5e72025-07-08 18:04:53 -0400497 export "$ac_envvar" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530498
499 *)
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
micky3879b9f5e72025-07-08 18:04:53 -0400504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530505 ;;
506
507 esac
508done
509
510if test -n "$ac_prev"; then
micky3879b9f5e72025-07-08 18:04:53 -0400511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
514fi
515
516# Be sure to have absolute paths.
517for ac_var in exec_prefix prefix
518do
micky3879b9f5e72025-07-08 18:04:53 -0400519 eval ac_val=$`echo "$ac_var"`
520 case "$ac_val" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
524 esac
525done
526
527# Be sure to have absolute paths.
Steve Kondikae271bc2015-11-15 02:50:53 +0100528for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530529 localstatedir libdir includedir oldincludedir infodir mandir
530do
micky3879b9f5e72025-07-08 18:04:53 -0400531 eval ac_val=$`echo "$ac_var"`
532 case "$ac_val" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
536 esac
537done
538
539# There might be people who depend on the old broken behavior: `$host'
540# used to hold the argument of --host etc.
541build=$build_alias
542host=$host_alias
543target=$target_alias
544
545# FIXME: should be removed in autoconf 3.0.
546if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
552 cross_compiling=yes
553 fi
554fi
555
556ac_tool_prefix=
557test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559test "$silent" = yes && exec 6>/dev/null
560
561# Find the source files, if location was not specified.
562if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
565 ac_prog=$0
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568 srcdir=$ac_confdir
micky3879b9f5e72025-07-08 18:04:53 -0400569 if test ! -r "$srcdir/$ac_unique_file"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530570 srcdir=..
571 fi
572else
573 ac_srcdir_defaulted=no
574fi
micky3879b9f5e72025-07-08 18:04:53 -0400575if test ! -r "$srcdir/$ac_unique_file"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
579 else
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
582 fi
583fi
584srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585ac_env_build_alias_set=${build_alias+set}
586ac_env_build_alias_value=$build_alias
587ac_cv_env_build_alias_set=${build_alias+set}
588ac_cv_env_build_alias_value=$build_alias
589ac_env_host_alias_set=${host_alias+set}
590ac_env_host_alias_value=$host_alias
591ac_cv_env_host_alias_set=${host_alias+set}
592ac_cv_env_host_alias_value=$host_alias
593ac_env_target_alias_set=${target_alias+set}
594ac_env_target_alias_value=$target_alias
595ac_cv_env_target_alias_set=${target_alias+set}
596ac_cv_env_target_alias_value=$target_alias
597ac_env_CC_set=${CC+set}
598ac_env_CC_value=$CC
599ac_cv_env_CC_set=${CC+set}
600ac_cv_env_CC_value=$CC
601ac_env_CFLAGS_set=${CFLAGS+set}
602ac_env_CFLAGS_value=$CFLAGS
603ac_cv_env_CFLAGS_set=${CFLAGS+set}
604ac_cv_env_CFLAGS_value=$CFLAGS
605ac_env_LDFLAGS_set=${LDFLAGS+set}
606ac_env_LDFLAGS_value=$LDFLAGS
607ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608ac_cv_env_LDFLAGS_value=$LDFLAGS
609ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610ac_env_CPPFLAGS_value=$CPPFLAGS
611ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613ac_env_CPP_set=${CPP+set}
614ac_env_CPP_value=$CPP
615ac_cv_env_CPP_set=${CPP+set}
616ac_cv_env_CPP_value=$CPP
617ac_env_CXX_set=${CXX+set}
618ac_env_CXX_value=$CXX
619ac_cv_env_CXX_set=${CXX+set}
620ac_cv_env_CXX_value=$CXX
621ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622ac_env_CXXFLAGS_value=$CXXFLAGS
623ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625ac_env_CXXCPP_set=${CXXCPP+set}
626ac_env_CXXCPP_value=$CXXCPP
627ac_cv_env_CXXCPP_set=${CXXCPP+set}
628ac_cv_env_CXXCPP_value=$CXXCPP
629
630#
631# Report the --help message.
632#
633if test "$ac_init_help" = "long"; then
634 # Omit some internal or obsolete options to make the list less imposing.
635 # This message is too long to be a string in the A/UX 3.1 sh.
636 cat <<EOF
637\`configure' configures this package to adapt to many kinds of systems.
638
639Usage: $0 [OPTION]... [VAR=VALUE]...
640
641To assign environment variables (e.g., CC, CFLAGS...), specify them as
642VAR=VALUE. See below for descriptions of some of the useful variables.
643
644Defaults for the options are specified in brackets.
645
646Configuration:
647 -h, --help display this help and exit
648 --help=short display options specific to this package
649 --help=recursive display the short help of all the included packages
650 -V, --version display version information and exit
651 -q, --quiet, --silent do not print \`checking...' messages
652 --cache-file=FILE cache test results in FILE [disabled]
653 -C, --config-cache alias for \`--cache-file=config.cache'
654 -n, --no-create do not create output files
655 --srcdir=DIR find the sources in DIR [configure dir or \`..']
656
657EOF
658
659 cat <<EOF
660Installation directories:
661 --prefix=PREFIX install architecture-independent files in PREFIX
662 [$ac_default_prefix]
663 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
664 [PREFIX]
665
666By default, \`make install' will install all the files in
667\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
668an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669for instance \`--prefix=\$HOME'.
670
671For better control, use the options below.
672
673Fine tuning of the installation directories:
674 --bindir=DIR user executables [EPREFIX/bin]
675 --sbindir=DIR system admin executables [EPREFIX/sbin]
676 --libexecdir=DIR program executables [EPREFIX/libexec]
Steve Kondikae271bc2015-11-15 02:50:53 +0100677 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
678 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530679 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
680 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
681 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
micky3879b9f5e72025-07-08 18:04:53 -0400682 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530683 --libdir=DIR object code libraries [EPREFIX/lib]
684 --includedir=DIR C header files [PREFIX/include]
685 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Steve Kondikae271bc2015-11-15 02:50:53 +0100686 --infodir=DIR info documentation [DATAROOTDIR/info]
687 --mandir=DIR man documentation [DATAROOTDIR/man]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530688EOF
689
690 cat <<\EOF
691
692Program names:
693 --program-prefix=PREFIX prepend PREFIX to installed program names
694 --program-suffix=SUFFIX append SUFFIX to installed program names
695 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
696
697System types:
698 --build=BUILD configure for building on BUILD [guessed]
699 --host=HOST build programs to run on HOST [BUILD]
700 --target=TARGET configure for building compilers for TARGET [HOST]
701EOF
702fi
703
704if test -n "$ac_init_help"; then
705
706 cat <<\EOF
707
708Optional Packages:
709 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
710 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
711
712Optional Features:
713 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
714 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
715
716 --with-rel-version=XXX override derived release version
717 --with-abi-version=XXX override derived ABI version
718 --with-system-type=XXX test: override derived host system-type
micky3879b9f5e72025-07-08 18:04:53 -0400719 --with-abi-altered=XXX override visible ABI version, for packaging
720 --without-ada suppress check for Ada compiler, don't build demo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530721 --without-cxx do not adjust ncurses bool to match C++
722 --without-cxx-binding do not build C++ binding and demo
Steve Kondikae271bc2015-11-15 02:50:53 +0100723 --disable-db-install suppress install of terminal database
724 --without-manpages suppress install of manpages
725 --without-progs suppress build/install with programs (e.g., tic)
726 --without-tests suppress build/install with test-programs
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530727 --without-curses-h install curses.h as ncurses.h only
micky3879b9f5e72025-07-08 18:04:53 -0400728 --with-config-suffix=X name ncurses*X-config file with X
729 --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
730 --with-pkg-config-libdir[=XXX] use given directory for installing pc-files
Steve Kondikae271bc2015-11-15 02:50:53 +0100731 --enable-pc-files generate and install .pc files for pkg-config
micky3879b9f5e72025-07-08 18:04:53 -0400732 --with-pc-suffix[=XXX] suffix pkg-config files with XXX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530733 --enable-mixed-case tic should assume mixed-case filenames
micky3879b9f5e72025-07-08 18:04:53 -0400734 --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530735Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736 --with-build-cc=XXX the build C compiler ($BUILD_CC)
737 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
738 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
742Options to Specify the Libraries Built/Used:
Steve Kondikae271bc2015-11-15 02:50:53 +0100743 --disable-libtool-version enable to use libtool's incompatible naming scheme
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530744 --with-libtool generate libraries with libtool
745 --with-shared generate shared-libraries
746 --with-normal generate normal-libraries (default)
747 --with-debug generate debug-libraries (default)
748 --with-profile generate profile-libraries
Steve Kondikae271bc2015-11-15 02:50:53 +0100749 --with-cxx-shared generate C++ shared-libraries
750 --with-lib-prefix override library-prefix
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530751 --with-termlib generate separate terminfo library
752 --with-ticlib generate separate tic library
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530753 --enable-rpath use rpath option when generating shared libraries
754 --disable-relink relink shared libraries during install
micky3879b9f5e72025-07-08 18:04:53 -0400755 --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
756 --with-libtool-opts[=XXX] give libtool additional options XXX
757 --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE
758 --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE
759 --with-gpm use Alessandro Rubini's GPM library
760 --without-dlsym do not use dlsym() to load GPM dynamically
761 --with-pcre2 use PCRE2 for regular-expressions
762 --with-sysmouse use sysmouse (FreeBSD console)
Steve Kondikae271bc2015-11-15 02:50:53 +0100763 --disable-lib-suffixes disable library suffixes
764 --disable-rpath-hack don't add rpath options for additional libraries
micky3879b9f5e72025-07-08 18:04:53 -0400765 --disable-pkg-ldflags disable extra LDFLAGS for package-scripts
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530766Fine-Tuning Your Configuration:
micky3879b9f5e72025-07-08 18:04:53 -0400767 --with-extra-suffix[=X] append extra suffix X to header/library paths
Steve Kondikae271bc2015-11-15 02:50:53 +0100768 --disable-overwrite put headers in subdir, omit link to -lcurses
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530769 --disable-database do not use terminfo, only fallbacks/termcap
770 --with-database=XXX specify terminfo source to install
771 --with-hashed-db specify hashed-database library
772 --with-fallbacks=XXX specify list of fallback terminal descriptions
micky3879b9f5e72025-07-08 18:04:53 -0400773 --with-tic-path=XXX specify path of tic for fallbacks
774 --with-infocmp-path=XXX specify path of infocmp for fallbacks
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530775 --without-xterm-new specify if xterm terminfo should be old version
micky3879b9f5e72025-07-08 18:04:53 -0400776 --with-xterm-kbs[=XXX] specify if xterm backspace sends BS or DEL
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530777 --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778 --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779 --disable-big-core assume machine has little memory
780 --disable-big-strings assume compiler has only standard-size strings
781 --enable-termcap compile in termcap fallback support
782 --with-termpath=XXX specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783 --enable-getcap fast termcap load, no xrefs to terminfo
784 --enable-getcap-cache cache translated termcaps in ~/.terminfo
785 --disable-home-terminfo drop ~/.terminfo from terminfo search-path
micky3879b9f5e72025-07-08 18:04:53 -0400786 --disable-root-environ restrict root use of ncurses environment variables
787 --disable-root-access restrict file-access when running setuid
788 --disable-setuid-environ restrict setuid use of ncurses environment variables
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530789 --enable-symlinks make tic use symbolic links not hard links
790 --enable-broken_linker compile with broken-linker support code
791 --enable-bsdpad recognize BSD-style prefix padding
micky3879b9f5e72025-07-08 18:04:53 -0400792 --disable-widec compile without wide character and UTF-8 support
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530793 --disable-lp64 allow chtype to be long (ignore _LP64)
794 --disable-largefile omit support for large files
795 --disable-tparm-varargs compile tparm() without varargs interface
796 --disable-tic-depends link tic library without explicit dependency on ncurses library
micky3879b9f5e72025-07-08 18:04:53 -0400797 --enable-wattr-macros enable wattr* macros
798 --with-x11-rgb=FILE obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
799 --with-bool=TYPE fall back to TYPE for curses 'bool' typedef
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530800 --with-caps=alt compile with alternate Caps file
801 --with-chtype=TYPE override type of chtype
802 --with-ospeed=TYPE override type of ospeed variable
803 --with-mmask-t=TYPE override type of mmask_t
Steve Kondikae271bc2015-11-15 02:50:53 +0100804 --with-ccharw-max=XXX override size CCHARW_MAX
micky3879b9f5e72025-07-08 18:04:53 -0400805 --enable-signed-char use signed chars for Boolean array in term.h
Steve Kondikae271bc2015-11-15 02:50:53 +0100806 --with-tparm-arg=TYPE override parameter type of tparm
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530807 --with-rcs-ids compile-in RCS identifiers
808Options to Specify How Manpages are Installed:
micky3879b9f5e72025-07-08 18:04:53 -0400809 --with-manpage-format specify manpage-format: gzip/compress/bzip2/xz,
810 BSDI/normal and optionally formatted/catonly,
811 e.g., gzip,formatted
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530812 --with-manpage-renames specify manpage-renaming
813 --with-manpage-aliases specify manpage-aliases using .so
814 --with-manpage-symlinks specify manpage-aliases using symlinks
815 --with-manpage-tbl specify manpage processing with tbl
816Extensions:
817 --disable-ext-funcs disable function-extensions
Steve Kondikae271bc2015-11-15 02:50:53 +0100818 --enable-sp-funcs enable SCREEN-extensions
819 --enable-term-driver enable terminal-driver
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530820 --enable-const compile with extra/non-standard const
821 --enable-ext-colors compile for 256-color support
822 --enable-ext-mouse compile for extended mouse-encoding
Steve Kondikae271bc2015-11-15 02:50:53 +0100823 --enable-ext-putwin compile with extended putwin/screendump
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530824 --enable-no-padding compile with $NCURSES_NO_PADDING code
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530825 --enable-sigwinch compile with SIGWINCH handler
826 --enable-tcap-names compile with user-definable terminal capabilities
micky3879b9f5e72025-07-08 18:04:53 -0400827Reentrant Code:
828 --with-pthread use POSIX thread library
829 --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830 --enable-weak-symbols enable weak-symbols for pthreads
831 --enable-reentrant compile with reentrant code
832 --disable-opaque-curses do not make WINDOW, etc., structures opaque
833 --disable-opaque-form do not make form library structures opaque
834 --disable-opaque-menu do not make menu library structures opaque
835 --disable-opaque-panel do not make panel library structures opaque
836 --with-wrap-prefix=XXX override prefix used for public variables
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530837Development Code:
838 --without-develop disable development options
micky3879b9f5e72025-07-08 18:04:53 -0400839 --enable-check-size compile-in code to detect screensize of serial terminals
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530840 --enable-hard-tabs compile with hard-tabs code
841 --enable-xmc-glitch compile with support for xmc (magic-cookie)
842Experimental Code:
843 --disable-assumed-color do not assume anything about default-colors
844 --disable-hashmap compile without hashmap scrolling-optimization
Steve Kondikae271bc2015-11-15 02:50:53 +0100845 --enable-colorfgbg compile-in experimental $COLORFGBG code
micky3879b9f5e72025-07-08 18:04:53 -0400846 --enable-fvisibility compile with -fvisibility=hidden
Steve Kondikae271bc2015-11-15 02:50:53 +0100847 --enable-interop compile-in interop bindings
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530848 --enable-safe-sprintf compile with experimental safe-sprintf code
849 --disable-scroll-hints compile without scroll-hints code
Steve Kondikae271bc2015-11-15 02:50:53 +0100850 --enable-wgetch-events compile with wgetch-events code
micky3879b9f5e72025-07-08 18:04:53 -0400851 --enable-exp-win32 compile with experimental-Windows driver
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530852Testing/development Options:
Steve Kondikae271bc2015-11-15 02:50:53 +0100853 --disable-echo do not display "compiling" commands
micky3879b9f5e72025-07-08 18:04:53 -0400854 --disable-stripping do not strip (debug info) installed executables
855 --with-strip-program=XX specify program to use when stripping in install
856 --enable-warnings test: turn on gcc compiler warnings
857 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
Steve Kondikae271bc2015-11-15 02:50:53 +0100858 --enable-string-hacks work around bogus compiler/loader warnings
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530859 --enable-assertions test: turn on generation of assertion code
860 --with-dmalloc test: use Gray Watson's dmalloc library
861 --with-dbmalloc test: use Conor Cahill's dbmalloc library
862 --with-valgrind test: use valgrind
863 --disable-leaks test: free permanent memory, analyze leaks
864 --enable-expanded test: generate functions for certain macros
865 --disable-macros test: use functions rather than macros
866 --with-trace test: add trace() function to all models of ncurses
Steve Kondikae271bc2015-11-15 02:50:53 +0100867 --disable-gnat-projects test: disable GNAT projects even if usable
micky3879b9f5e72025-07-08 18:04:53 -0400868Ada Binding Options:
869 --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)
870 --with-ada-include=DIR find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
871 --with-ada-objects=DIR find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
872 --with-ada-sharedlib build Ada95 shared library; requires GNAT project support
873 --with-ada-libname[=XXX] use XXX as Ada95 library name
874Library basenames for pkgsrc:
875 --with-form-libname[=XXX] override ifelse(,,form,) basename of library
876 --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library
877 --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library
878 --with-cxx-libname[=XXX] override ifelse(ncurses++,,cxx,ncurses++) basename of library
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530879
880Some influential environment variables:
881 CC C compiler command
882 CFLAGS C compiler flags
883 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
884 nonstandard directory <lib dir>
885 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
886 headers in a nonstandard directory <include dir>
887 CPP C preprocessor
888 CXX C++ compiler command
889 CXXFLAGS C++ compiler flags
890 CXXCPP C++ preprocessor
891
892Use these variables to override the choices made by `configure' or to help
893it to find libraries and programs with nonstandard names/locations.
894
895EOF
896fi
897
898if test "$ac_init_help" = "recursive"; then
899 # If there are subdirs, report their specific --help.
900 ac_popdir=`pwd`
901 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
micky3879b9f5e72025-07-08 18:04:53 -0400902 cd "$ac_subdir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530903 # A "../" for each directory in /$ac_subdir.
micky3879b9f5e72025-07-08 18:04:53 -0400904 ac_dots=`echo "$ac_subdir" |
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530905 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
906
micky3879b9f5e72025-07-08 18:04:53 -0400907 case "$srcdir" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530908 .) # No --srcdir option. We are building in place.
micky3879b9f5e72025-07-08 18:04:53 -0400909 ac_sub_srcdir="$srcdir" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530910 [\\/]* | ?:[\\/]* ) # Absolute path.
micky3879b9f5e72025-07-08 18:04:53 -0400911 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530912 *) # Relative path.
micky3879b9f5e72025-07-08 18:04:53 -0400913 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530914 esac
915
916 # Check for guested configure; otherwise get Cygnus style configure.
micky3879b9f5e72025-07-08 18:04:53 -0400917 if test -f "$ac_sub_srcdir/configure.gnu"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530918 echo
micky3879b9f5e72025-07-08 18:04:53 -0400919 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
920 elif test -f "$ac_sub_srcdir/configure"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530921 echo
micky3879b9f5e72025-07-08 18:04:53 -0400922 $SHELL "$ac_sub_srcdir/configure" --help=recursive
923 elif test -f "$ac_sub_srcdir/configure.ac" ||
924 test -f "$ac_sub_srcdir/configure.in"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530925 echo
micky3879b9f5e72025-07-08 18:04:53 -0400926 "$ac_configure" --help
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530927 else
928 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
929 fi
micky3879b9f5e72025-07-08 18:04:53 -0400930 cd "$ac_popdir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530931 done
932fi
933
934test -n "$ac_init_help" && exit 0
micky3879b9f5e72025-07-08 18:04:53 -0400935if "$ac_init_version"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530936 cat <<\EOF
937
micky3879b9f5e72025-07-08 18:04:53 -0400938Copyright 2003-2022,2023 Thomas E. Dickey
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530939Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
940Free Software Foundation, Inc.
941This configure script is free software; the Free Software Foundation
942gives unlimited permission to copy, distribute and modify it.
943EOF
944 exit 0
945fi
946exec 5>config.log
947cat >&5 <<EOF
948This file contains any messages produced by compilers while
949running configure, to aid debugging if configure makes a mistake.
950
951It was created by $as_me, which was
micky3879b9f5e72025-07-08 18:04:53 -0400952generated by GNU Autoconf 2.52.20231210. Invocation command line was
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530953
954 $ $0 $@
955
956EOF
957{
958cat <<_ASUNAME
959## ---------- ##
960## Platform. ##
961## ---------- ##
962
963hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
964uname -m = `(uname -m) 2>/dev/null || echo unknown`
965uname -r = `(uname -r) 2>/dev/null || echo unknown`
966uname -s = `(uname -s) 2>/dev/null || echo unknown`
967uname -v = `(uname -v) 2>/dev/null || echo unknown`
968
969/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
970/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
971
972/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
973/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
974/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
975hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
976/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
977/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
978/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
979
980PATH = $PATH
981
982_ASUNAME
983} >&5
984
985cat >&5 <<EOF
986## ------------ ##
987## Core tests. ##
988## ------------ ##
989
990EOF
991
992# Keep a trace of the command line.
993# Strip out --no-create and --no-recursion so they do not pile up.
994# Also quote any args containing shell meta-characters.
995ac_configure_args=
996ac_sep=
997for ac_arg
998do
micky3879b9f5e72025-07-08 18:04:53 -0400999 case "$ac_arg" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301000 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1001 | --no-cr | --no-c) ;;
1002 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1003 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1004 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1006 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1007 ac_sep=" " ;;
1008 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1009 ac_sep=" " ;;
1010 esac
1011 # Get rid of the leading space.
1012done
1013
1014# When interrupted or exit'd, cleanup temporary files, and complete
1015# config.log. We remove comments because anyway the quotes in there
1016# would cause problems or look ugly.
1017trap 'exit_status=$?
1018 # Save into config.log some information that might help in debugging.
1019 echo >&5
1020 echo "## ----------------- ##" >&5
1021 echo "## Cache variables. ##" >&5
1022 echo "## ----------------- ##" >&5
1023 echo >&5
1024 # The following way of writing the cache mishandles newlines in values,
1025{
1026 (set) 2>&1 |
1027 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1028 *ac_space=\ *)
1029 sed -n \
1030 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1031 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1032 ;;
1033 *)
1034 sed -n \
1035 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1036 ;;
1037 esac;
1038} >&5
1039 sed "/^$/d" confdefs.h >conftest.log
1040 if test -s conftest.log; then
1041 echo >&5
1042 echo "## ------------ ##" >&5
1043 echo "## confdefs.h. ##" >&5
1044 echo "## ------------ ##" >&5
1045 echo >&5
1046 cat conftest.log >&5
1047 fi
1048 (echo; echo) >&5
1049 test "$ac_signal" != 0 &&
1050 echo "$as_me: caught signal $ac_signal" >&5
1051 echo "$as_me: exit $exit_status" >&5
1052 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1053 exit $exit_status
1054 ' 0
1055for ac_signal in 1 2 13 15; do
micky3879b9f5e72025-07-08 18:04:53 -04001056 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301057done
1058ac_signal=0
1059
1060# confdefs.h avoids OS command line length limits that DEFS can exceed.
1061rm -rf conftest* confdefs.h
1062# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1063echo >confdefs.h
1064
1065# Let the site file select an alternate cache file if it wants to.
1066# Prefer explicitly selected file to automatically selected ones.
1067if test -z "$CONFIG_SITE"; then
1068 if test "x$prefix" != xNONE; then
1069 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1070 else
1071 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1072 fi
1073fi
1074for ac_site_file in $CONFIG_SITE; do
1075 if test -r "$ac_site_file"; then
micky3879b9f5e72025-07-08 18:04:53 -04001076 { echo "$as_me:1076: loading site script $ac_site_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301077echo "$as_me: loading site script $ac_site_file" >&6;}
1078 cat "$ac_site_file" >&5
1079 . "$ac_site_file"
1080 fi
1081done
1082
1083if test -r "$cache_file"; then
1084 # Some versions of bash will fail to source /dev/null (special
1085 # files actually), so we avoid doing that.
1086 if test -f "$cache_file"; then
micky3879b9f5e72025-07-08 18:04:53 -04001087 { echo "$as_me:1087: loading cache $cache_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301088echo "$as_me: loading cache $cache_file" >&6;}
1089 case $cache_file in
1090 [\\/]* | ?:[\\/]* ) . $cache_file;;
1091 *) . ./$cache_file;;
1092 esac
1093 fi
1094else
micky3879b9f5e72025-07-08 18:04:53 -04001095 { echo "$as_me:1095: creating cache $cache_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301096echo "$as_me: creating cache $cache_file" >&6;}
1097 >$cache_file
1098fi
1099
1100# Check that the precious variables saved in the cache have kept the same
1101# value.
1102ac_cache_corrupted=false
1103for ac_var in `(set) 2>&1 |
1104 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1105 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1106 eval ac_new_set=\$ac_env_${ac_var}_set
1107 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1108 eval ac_new_val="\$ac_env_${ac_var}_value"
micky3879b9f5e72025-07-08 18:04:53 -04001109 case "$ac_old_set,$ac_new_set" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301110 set,)
micky3879b9f5e72025-07-08 18:04:53 -04001111 { echo "$as_me:1111: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301112echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1113 ac_cache_corrupted=: ;;
1114 ,set)
micky3879b9f5e72025-07-08 18:04:53 -04001115 { echo "$as_me:1115: error: \`$ac_var' was not set in the previous run" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301116echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1117 ac_cache_corrupted=: ;;
1118 ,);;
1119 *)
1120 if test "x$ac_old_val" != "x$ac_new_val"; then
micky3879b9f5e72025-07-08 18:04:53 -04001121 { echo "$as_me:1121: error: \`$ac_var' has changed since the previous run:" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301122echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
micky3879b9f5e72025-07-08 18:04:53 -04001123 { echo "$as_me:1123: former value: $ac_old_val" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301124echo "$as_me: former value: $ac_old_val" >&2;}
micky3879b9f5e72025-07-08 18:04:53 -04001125 { echo "$as_me:1125: current value: $ac_new_val" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301126echo "$as_me: current value: $ac_new_val" >&2;}
1127 ac_cache_corrupted=:
1128 fi;;
1129 esac
1130 # Pass precious variables to config.status. It doesn't matter if
1131 # we pass some twice (in addition to the command line arguments).
1132 if test "$ac_new_set" = set; then
micky3879b9f5e72025-07-08 18:04:53 -04001133 case "$ac_new_val" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301134 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1135 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1136 ac_configure_args="$ac_configure_args '$ac_arg'"
1137 ;;
1138 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1139 ;;
1140 esac
1141 fi
1142done
micky3879b9f5e72025-07-08 18:04:53 -04001143if "$ac_cache_corrupted"; then
1144 { echo "$as_me:1144: error: changes in the environment can compromise the build" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301145echo "$as_me: error: changes in the environment can compromise the build" >&2;}
micky3879b9f5e72025-07-08 18:04:53 -04001146 { { echo "$as_me:1146: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301147echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1148 { (exit 1); exit 1; }; }
1149fi
1150
1151ac_ext=c
1152ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04001153ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1154ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301155ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04001156ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301157
Steve Kondikae271bc2015-11-15 02:50:53 +01001158case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
micky3879b9f5e72025-07-08 18:04:53 -04001159 *c*,-n*) ECHO_N=
1160 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1161 ECHO_T=' '
1162 ;;
1163 *c*,* ) ECHO_N=-n
1164 ECHO_C=
1165 ECHO_T=
1166 ;;
1167 *) ECHO_N=
1168 ECHO_C='\c'
1169 ECHO_T=
1170 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301171esac
1172echo "#! $SHELL" >conftest.sh
1173echo "exit 0" >>conftest.sh
1174chmod +x conftest.sh
micky3879b9f5e72025-07-08 18:04:53 -04001175if { (echo "$as_me:1175: PATH=\".;.\"; conftest.sh") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301176 (PATH=".;."; conftest.sh) 2>&5
1177 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04001178 echo "$as_me:1178: \$? = $ac_status" >&5
1179 (exit "$ac_status"); }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301180 ac_path_separator=';'
1181else
1182 ac_path_separator=:
1183fi
1184PATH_SEPARATOR="$ac_path_separator"
1185rm -f conftest.sh
1186
1187ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1188
1189top_builddir=`pwd`
1190
micky3879b9f5e72025-07-08 18:04:53 -04001191for ac_prog in ggrep grep
1192do
1193 # Extract the first word of "$ac_prog", so it can be a program name with args.
1194set dummy $ac_prog; ac_word=$2
1195echo "$as_me:1195: checking for $ac_word" >&5
1196echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197if test "${ac_cv_prog_GREP+set}" = set; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301198 echo $ECHO_N "(cached) $ECHO_C" >&6
1199else
micky3879b9f5e72025-07-08 18:04:53 -04001200 if test -n "$GREP"; then
1201 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1202else
1203 ac_save_IFS=$IFS; IFS=$ac_path_separator
1204ac_dummy="$PATH"
1205for ac_dir in $ac_dummy; do
1206 IFS=$ac_save_IFS
1207 test -z "$ac_dir" && ac_dir=.
1208 $as_executable_p "$ac_dir/$ac_word" || continue
1209ac_cv_prog_GREP="$ac_prog"
1210echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211break
1212done
1213
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301214fi
micky3879b9f5e72025-07-08 18:04:53 -04001215fi
1216GREP=$ac_cv_prog_GREP
1217if test -n "$GREP"; then
1218 echo "$as_me:1218: result: $GREP" >&5
1219echo "${ECHO_T}$GREP" >&6
1220else
1221 echo "$as_me:1221: result: no" >&5
1222echo "${ECHO_T}no" >&6
1223fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301224
micky3879b9f5e72025-07-08 18:04:53 -04001225 test -n "$GREP" && break
1226done
1227test -n "$GREP" || GREP=": "
1228
1229echo "$as_me:1229: checking for egrep" >&5
1230echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1231if test "${ac_cv_path_EGREP+set}" = set; then
1232 echo $ECHO_N "(cached) $ECHO_C" >&6
1233else
1234 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1235 then ac_cv_path_EGREP="$GREP -E"
1236 else
1237 for ac_prog in gegrep egrep
1238do
1239 # Extract the first word of "$ac_prog", so it can be a program name with args.
1240set dummy $ac_prog; ac_word=$2
1241echo "$as_me:1241: checking for $ac_word" >&5
1242echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1243if test "${ac_cv_path_EGREP+set}" = set; then
1244 echo $ECHO_N "(cached) $ECHO_C" >&6
1245else
1246 case $EGREP in
1247 [\\/]* | ?:[\\/]*)
1248 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1249 ;;
1250 *)
1251 ac_save_IFS=$IFS; IFS=$ac_path_separator
1252ac_dummy="$PATH"
1253for ac_dir in $ac_dummy; do
1254 IFS=$ac_save_IFS
1255 test -z "$ac_dir" && ac_dir=.
1256 if $as_executable_p "$ac_dir/$ac_word"; then
1257 ac_cv_path_EGREP="$ac_dir/$ac_word"
1258 echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259 break
1260fi
1261done
1262
1263 ;;
1264esac
1265fi
1266EGREP=$ac_cv_path_EGREP
1267
1268if test -n "$EGREP"; then
1269 echo "$as_me:1269: result: $EGREP" >&5
1270echo "${ECHO_T}$EGREP" >&6
1271else
1272 echo "$as_me:1272: result: no" >&5
1273echo "${ECHO_T}no" >&6
1274fi
1275
1276 test -n "$EGREP" && break
1277done
1278test -n "$EGREP" || EGREP=": "
1279
1280 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1280: error: cannot find workable egrep" >&5
1281echo "$as_me: error: cannot find workable egrep" >&2;}
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301282 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -04001283 fi
1284fi
1285echo "$as_me:1285: result: $ac_cv_path_EGREP" >&5
1286echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1287 EGREP="$ac_cv_path_EGREP"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301288
micky3879b9f5e72025-07-08 18:04:53 -04001289NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1291NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[ ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301292cf_cv_abi_version=${NCURSES_MAJOR}
micky3879b9f5e72025-07-08 18:04:53 -04001293cf_cv_abi_default=${NCURSES_MAJOR}
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301294cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1295cf_cv_timestamp=`date`
micky3879b9f5e72025-07-08 18:04:53 -04001296echo "$as_me:1296: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1297echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301298
micky3879b9f5e72025-07-08 18:04:53 -04001299if test -f "$srcdir/VERSION" ; then
1300 echo "$as_me:1300: checking for package version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001301echo $ECHO_N "checking for package version... $ECHO_C" >&6
1302
1303 # if there are not enough fields, cut returns the last one...
micky3879b9f5e72025-07-08 18:04:53 -04001304 cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1305 cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1306 cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
Steve Kondikae271bc2015-11-15 02:50:53 +01001307
1308 # this is how CF_BUNDLED_INTL uses $VERSION:
1309 VERSION="$cf_field1"
1310
1311 VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
micky3879b9f5e72025-07-08 18:04:53 -04001312 test -z "$VERSION_MAJOR" && { { echo "$as_me:1312: error: missing major-version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001313echo "$as_me: error: missing major-version" >&2;}
1314 { (exit 1); exit 1; }; }
1315
1316 VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
micky3879b9f5e72025-07-08 18:04:53 -04001317 test -z "$VERSION_MINOR" && { { echo "$as_me:1317: error: missing minor-version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001318echo "$as_me: error: missing minor-version" >&2;}
1319 { (exit 1); exit 1; }; }
1320
micky3879b9f5e72025-07-08 18:04:53 -04001321 echo "$as_me:1321: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001322echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1323
micky3879b9f5e72025-07-08 18:04:53 -04001324 echo "$as_me:1324: checking for package patch date" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001325echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1326 VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1327 case .$VERSION_PATCH in
1328 (.)
micky3879b9f5e72025-07-08 18:04:53 -04001329 { { echo "$as_me:1329: error: missing patch-date $VERSION_PATCH" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001330echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1331 { (exit 1); exit 1; }; }
1332 ;;
1333 (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1334 ;;
1335 (*)
micky3879b9f5e72025-07-08 18:04:53 -04001336 { { echo "$as_me:1336: error: illegal patch-date $VERSION_PATCH" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001337echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1338 { (exit 1); exit 1; }; }
1339 ;;
1340 esac
micky3879b9f5e72025-07-08 18:04:53 -04001341 echo "$as_me:1341: result: $VERSION_PATCH" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001342echo "${ECHO_T}$VERSION_PATCH" >&6
1343else
micky3879b9f5e72025-07-08 18:04:53 -04001344 { { echo "$as_me:1344: error: did not find $srcdir/VERSION" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001345echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1346 { (exit 1); exit 1; }; }
1347fi
1348
1349# show the actual data that we have for versions:
1350test -n "$verbose" && echo " ABI VERSION $VERSION" 1>&6
1351
micky3879b9f5e72025-07-08 18:04:53 -04001352echo "${as_me:-configure}:1352: testing ABI VERSION $VERSION ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001353
1354test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
1355
micky3879b9f5e72025-07-08 18:04:53 -04001356echo "${as_me:-configure}:1356: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001357
1358test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
1359
micky3879b9f5e72025-07-08 18:04:53 -04001360echo "${as_me:-configure}:1360: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001361
1362test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
1363
micky3879b9f5e72025-07-08 18:04:53 -04001364echo "${as_me:-configure}:1364: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01001365
1366 cf_PACKAGE=NCURSES
1367 PACKAGE=ncurses
1368
1369cat >>confdefs.h <<EOF
1370#define PACKAGE "$PACKAGE"
1371EOF
1372
1373cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1374
1375 cat >>confdefs.h <<EOF
1376#define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1377EOF
1378
1379 cat >>confdefs.h <<EOF
1380#define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1381EOF
1382
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301383test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1384
1385# Check whether --with-rel-version or --without-rel-version was given.
1386if test "${with_rel_version+set}" = set; then
1387 withval="$with_rel_version"
micky3879b9f5e72025-07-08 18:04:53 -04001388 { echo "$as_me:1388: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301389echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1390 cf_cv_rel_version=$withval
1391fi;
1392
1393 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1394 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
micky3879b9f5e72025-07-08 18:04:53 -04001395 test -n "NCURSES_MINOR" || NCURSES_MINOR=0
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301396
1397if test -n "$NCURSES_MAJOR" ; then
micky3879b9f5e72025-07-08 18:04:53 -04001398 case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1399 (0)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301400 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001401 (*)
micky3879b9f5e72025-07-08 18:04:53 -04001402 { { echo "$as_me:1402: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301403echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1404 { (exit 1); exit 1; }; }
1405 ;;
1406 esac
1407else
micky3879b9f5e72025-07-08 18:04:53 -04001408 { { echo "$as_me:1408: error: Release major-version value is empty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301409echo "$as_me: error: Release major-version value is empty" >&2;}
1410 { (exit 1); exit 1; }; }
1411fi
1412
1413if test -n "$NCURSES_MINOR" ; then
micky3879b9f5e72025-07-08 18:04:53 -04001414 case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1415 (0)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301416 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001417 (*)
micky3879b9f5e72025-07-08 18:04:53 -04001418 { { echo "$as_me:1418: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301419echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1420 { (exit 1); exit 1; }; }
1421 ;;
1422 esac
1423else
micky3879b9f5e72025-07-08 18:04:53 -04001424 { { echo "$as_me:1424: error: Release minor-version value is empty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301425echo "$as_me: error: Release minor-version value is empty" >&2;}
1426 { (exit 1); exit 1; }; }
1427fi
1428
1429test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1430
1431# Check whether --with-abi-version or --without-abi-version was given.
1432if test "${with_abi_version+set}" = set; then
1433 withval="$with_abi_version"
Steve Kondikae271bc2015-11-15 02:50:53 +01001434
1435 if test "x$cf_cv_abi_version" != "x$withval"
1436 then
micky3879b9f5e72025-07-08 18:04:53 -04001437 { echo "$as_me:1437: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301438echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
micky3879b9f5e72025-07-08 18:04:53 -04001439 case "$cf_cv_rel_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +01001440 (5.*)
1441 cf_cv_rel_version=$withval.0
1442 ;;
1443 (6.*)
1444 cf_cv_rel_version=$withval.9 # FIXME: should be 10 as of 6.0 release
1445 ;;
1446 esac
1447 fi
1448 cf_cv_abi_version=$withval
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301449fi;
1450
1451if test -n "$cf_cv_abi_version" ; then
micky3879b9f5e72025-07-08 18:04:53 -04001452 case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1453 (0)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301454 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001455 (*)
micky3879b9f5e72025-07-08 18:04:53 -04001456 { { echo "$as_me:1456: error: ABI version is not a number: $cf_cv_abi_version" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301457echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1458 { (exit 1); exit 1; }; }
1459 ;;
1460 esac
1461else
micky3879b9f5e72025-07-08 18:04:53 -04001462 { { echo "$as_me:1462: error: ABI version value is empty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301463echo "$as_me: error: ABI version value is empty" >&2;}
1464 { (exit 1); exit 1; }; }
1465fi
1466
micky3879b9f5e72025-07-08 18:04:53 -04001467cf_cv_abi_default=$cf_cv_abi_version
1468
Steve Kondikae271bc2015-11-15 02:50:53 +01001469if test "x$cf_cv_abi_version" != "x$with_abi_version"
1470then
micky3879b9f5e72025-07-08 18:04:53 -04001471 case "$cf_cv_rel_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +01001472 (5.*)
1473 cf_cv_rel_version=$with_abi_version.0
1474 ;;
1475 esac
1476fi
1477
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301478ac_aux_dir=
1479for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
micky3879b9f5e72025-07-08 18:04:53 -04001480 if test -f "$ac_dir/install-sh"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301481 ac_aux_dir=$ac_dir
1482 ac_install_sh="$ac_aux_dir/install-sh -c"
1483 break
micky3879b9f5e72025-07-08 18:04:53 -04001484 elif test -f "$ac_dir/install.sh"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301485 ac_aux_dir=$ac_dir
1486 ac_install_sh="$ac_aux_dir/install.sh -c"
1487 break
micky3879b9f5e72025-07-08 18:04:53 -04001488 elif test -f "$ac_dir/shtool"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301489 ac_aux_dir=$ac_dir
1490 ac_install_sh="$ac_aux_dir/shtool install -c"
1491 break
1492 fi
1493done
1494if test -z "$ac_aux_dir"; then
micky3879b9f5e72025-07-08 18:04:53 -04001495 { { echo "$as_me:1495: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301496echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1497 { (exit 1); exit 1; }; }
1498fi
1499ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1500ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1501ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1502
1503# Make sure we can run config.sub.
1504$ac_config_sub sun4 >/dev/null 2>&1 ||
micky3879b9f5e72025-07-08 18:04:53 -04001505 { { echo "$as_me:1505: error: cannot run $ac_config_sub" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301506echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1507 { (exit 1); exit 1; }; }
1508
micky3879b9f5e72025-07-08 18:04:53 -04001509echo "$as_me:1509: checking build system type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301510echo $ECHO_N "checking build system type... $ECHO_C" >&6
1511if test "${ac_cv_build+set}" = set; then
1512 echo $ECHO_N "(cached) $ECHO_C" >&6
1513else
1514 ac_cv_build_alias=$build_alias
1515test -z "$ac_cv_build_alias" &&
1516 ac_cv_build_alias=`$ac_config_guess`
1517test -z "$ac_cv_build_alias" &&
micky3879b9f5e72025-07-08 18:04:53 -04001518 { { echo "$as_me:1518: error: cannot guess build type; you must specify one" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301519echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1520 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -04001521ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1522 { { echo "$as_me:1522: error: $ac_config_sub $ac_cv_build_alias failed." >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301523echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1524 { (exit 1); exit 1; }; }
1525
1526fi
micky3879b9f5e72025-07-08 18:04:53 -04001527echo "$as_me:1527: result: $ac_cv_build" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301528echo "${ECHO_T}$ac_cv_build" >&6
1529build=$ac_cv_build
micky3879b9f5e72025-07-08 18:04:53 -04001530build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1531build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1532build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301533
micky3879b9f5e72025-07-08 18:04:53 -04001534echo "$as_me:1534: checking host system type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301535echo $ECHO_N "checking host system type... $ECHO_C" >&6
1536if test "${ac_cv_host+set}" = set; then
1537 echo $ECHO_N "(cached) $ECHO_C" >&6
1538else
1539 ac_cv_host_alias=$host_alias
1540test -z "$ac_cv_host_alias" &&
1541 ac_cv_host_alias=$ac_cv_build_alias
micky3879b9f5e72025-07-08 18:04:53 -04001542ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1543 { { echo "$as_me:1543: error: $ac_config_sub $ac_cv_host_alias failed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301544echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1545 { (exit 1); exit 1; }; }
1546
1547fi
micky3879b9f5e72025-07-08 18:04:53 -04001548echo "$as_me:1548: result: $ac_cv_host" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301549echo "${ECHO_T}$ac_cv_host" >&6
1550host=$ac_cv_host
micky3879b9f5e72025-07-08 18:04:53 -04001551host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1552host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1553host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301554
micky3879b9f5e72025-07-08 18:04:53 -04001555if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1556 echo "$as_me:1556: checking target system type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301557echo $ECHO_N "checking target system type... $ECHO_C" >&6
1558if test "${ac_cv_target+set}" = set; then
1559 echo $ECHO_N "(cached) $ECHO_C" >&6
1560else
1561 ac_cv_target_alias=$target_alias
1562test "x$ac_cv_target_alias" = "x" &&
1563 ac_cv_target_alias=$ac_cv_host_alias
micky3879b9f5e72025-07-08 18:04:53 -04001564ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1565 { { echo "$as_me:1565: error: $ac_config_sub $ac_cv_target_alias failed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301566echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1567 { (exit 1); exit 1; }; }
1568
1569fi
micky3879b9f5e72025-07-08 18:04:53 -04001570echo "$as_me:1570: result: $ac_cv_target" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301571echo "${ECHO_T}$ac_cv_target" >&6
1572target=$ac_cv_target
micky3879b9f5e72025-07-08 18:04:53 -04001573target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1574target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1575target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301576
1577# The aliases save the names the user supplied, while $host etc.
1578# will get canonicalized.
1579test -n "$target_alias" &&
1580 test "$program_prefix$program_suffix$program_transform_name" = \
1581 NONENONEs,x,x, &&
1582 program_prefix=${target_alias}-
1583 system_name="$host_os"
1584else
1585 system_name="`(uname -s -r) 2>/dev/null`"
1586 if test -z "$system_name" ; then
1587 system_name="`(hostname) 2>/dev/null`"
1588 fi
1589fi
Steve Kondikae271bc2015-11-15 02:50:53 +01001590test -n "$system_name" &&
1591cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301592#define SYSTEM_NAME "$system_name"
1593EOF
1594
1595if test "${cf_cv_system_name+set}" = set; then
1596 echo $ECHO_N "(cached) $ECHO_C" >&6
1597else
1598 cf_cv_system_name="$system_name"
1599fi
1600
1601test -z "$system_name" && system_name="$cf_cv_system_name"
micky3879b9f5e72025-07-08 18:04:53 -04001602test -n "$cf_cv_system_name" && echo "$as_me:1602: result: Configuring for $cf_cv_system_name" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301603echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1604
1605if test ".$system_name" != ".$cf_cv_system_name" ; then
micky3879b9f5e72025-07-08 18:04:53 -04001606 echo "$as_me:1606: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301607echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
micky3879b9f5e72025-07-08 18:04:53 -04001608 { { echo "$as_me:1608: error: \"Please remove config.cache and try again.\"" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301609echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1610 { (exit 1); exit 1; }; }
1611fi
1612
1613# Check whether --with-system-type or --without-system-type was given.
1614if test "${with_system_type+set}" = set; then
1615 withval="$with_system_type"
micky3879b9f5e72025-07-08 18:04:53 -04001616 { echo "$as_me:1616: WARNING: overriding system type to $withval" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301617echo "$as_me: WARNING: overriding system type to $withval" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01001618 cf_cv_system_name=$withval
1619 host_os=$withval
1620
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301621fi;
1622
1623### Save the given $CFLAGS to allow user-override.
1624cf_user_CFLAGS="$CFLAGS"
1625
1626### Default install-location
micky3879b9f5e72025-07-08 18:04:53 -04001627echo "$as_me:1627: checking for fgrep" >&5
1628echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1629if test "${ac_cv_path_FGREP+set}" = set; then
1630 echo $ECHO_N "(cached) $ECHO_C" >&6
1631else
1632 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1633 then ac_cv_path_FGREP="$GREP -F"
1634 else
1635 for ac_prog in gfgrep fgrep
1636do
1637 # Extract the first word of "$ac_prog", so it can be a program name with args.
1638set dummy $ac_prog; ac_word=$2
1639echo "$as_me:1639: checking for $ac_word" >&5
1640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641if test "${ac_cv_path_FGREP+set}" = set; then
1642 echo $ECHO_N "(cached) $ECHO_C" >&6
1643else
1644 case $FGREP in
1645 [\\/]* | ?:[\\/]*)
1646 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1647 ;;
1648 *)
1649 ac_save_IFS=$IFS; IFS=$ac_path_separator
1650ac_dummy="$PATH"
1651for ac_dir in $ac_dummy; do
1652 IFS=$ac_save_IFS
1653 test -z "$ac_dir" && ac_dir=.
1654 if $as_executable_p "$ac_dir/$ac_word"; then
1655 ac_cv_path_FGREP="$ac_dir/$ac_word"
1656 echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657 break
1658fi
1659done
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301660
micky3879b9f5e72025-07-08 18:04:53 -04001661 ;;
1662esac
1663fi
1664FGREP=$ac_cv_path_FGREP
1665
1666if test -n "$FGREP"; then
1667 echo "$as_me:1667: result: $FGREP" >&5
1668echo "${ECHO_T}$FGREP" >&6
1669else
1670 echo "$as_me:1670: result: no" >&5
1671echo "${ECHO_T}no" >&6
1672fi
1673
1674 test -n "$FGREP" && break
1675done
1676test -n "$FGREP" || FGREP=": "
1677
1678 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1678: error: cannot find workable fgrep" >&5
1679echo "$as_me: error: cannot find workable fgrep" >&2;}
1680 { (exit 1); exit 1; }; }
1681 fi
1682fi
1683echo "$as_me:1683: result: $ac_cv_path_FGREP" >&5
1684echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1685 FGREP="$ac_cv_path_FGREP"
1686
1687echo "$as_me:1687: checking for prefix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301688echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1689if test "x$prefix" = "xNONE" ; then
1690 case "$cf_cv_system_name" in
1691 # non-vendor systems don't have a conflict
Steve Kondikae271bc2015-11-15 02:50:53 +01001692 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301693 prefix=/usr
1694 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01001695 (*) prefix=$ac_default_prefix
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301696 ;;
1697 esac
1698fi
micky3879b9f5e72025-07-08 18:04:53 -04001699echo "$as_me:1699: result: $prefix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301700echo "${ECHO_T}$prefix" >&6
1701
1702if test "x$prefix" = "xNONE" ; then
micky3879b9f5e72025-07-08 18:04:53 -04001703echo "$as_me:1703: checking for default include-directory" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301704echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1705test -n "$verbose" && echo 1>&6
1706for cf_symbol in \
micky3879b9f5e72025-07-08 18:04:53 -04001707 "$includedir" \
1708 "$includedir/ncurses" \
1709 "$prefix/include" \
1710 "$prefix/include/ncurses" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301711 /usr/local/include \
1712 /usr/local/include/ncurses \
1713 /usr/include \
1714 /usr/include/ncurses
1715do
micky3879b9f5e72025-07-08 18:04:53 -04001716 cf_dir=`eval echo "$cf_symbol"`
1717 if test -f "$cf_dir/curses.h" ; then
1718 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301719 includedir="$cf_symbol"
micky3879b9f5e72025-07-08 18:04:53 -04001720 test -n "$verbose" && echo $ECHO_N " found " 1>&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301721 break
1722 fi
1723 fi
1724 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1725done
micky3879b9f5e72025-07-08 18:04:53 -04001726echo "$as_me:1726: result: $includedir" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301727echo "${ECHO_T}$includedir" >&6
1728fi
1729
Steve Kondikae271bc2015-11-15 02:50:53 +01001730### Defaults for ncurses ABI
1731
micky3879b9f5e72025-07-08 18:04:53 -04001732# ABI 5 defaults:
1733cf_dft_ccharw_max=5
1734cf_dft_chtype=auto
1735cf_dft_ext_colors=no
1736cf_dft_ext_const=no
1737cf_dft_ext_mouse=no
1738cf_dft_ext_putwin=no
1739cf_dft_ext_spfuncs=no
1740cf_dft_filter_syms=no
1741cf_dft_interop=no
1742cf_dft_mmask_t=auto
1743cf_dft_opaque_curses=no
1744cf_dft_ordinate_type=short
1745cf_dft_signed_char=no
1746cf_dft_tparm_arg=long
1747cf_dft_widec=no
1748cf_dft_with_lp64=no
1749
1750# ABI 6 default differences from ABI 5:
1751case x$cf_cv_abi_default in
Steve Kondikae271bc2015-11-15 02:50:53 +01001752(x[6789])
micky3879b9f5e72025-07-08 18:04:53 -04001753 cf_dft_chtype=uint32_t
Steve Kondikae271bc2015-11-15 02:50:53 +01001754 cf_dft_ext_colors=yes
1755 cf_dft_ext_const=yes
1756 cf_dft_ext_mouse=yes
1757 cf_dft_ext_putwin=yes
1758 cf_dft_ext_spfuncs=yes
1759 cf_dft_filter_syms=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01001760 cf_dft_interop=yes
micky3879b9f5e72025-07-08 18:04:53 -04001761 cf_dft_mmask_t=uint32_t
1762 cf_dft_opaque_curses=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01001763 cf_dft_tparm_arg=intptr_t
micky3879b9f5e72025-07-08 18:04:53 -04001764 cf_dft_widec=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01001765 cf_dft_with_lp64=yes
1766 ;;
micky3879b9f5e72025-07-08 18:04:53 -04001767esac
1768
1769# ABI 7 default differences from ABI 6:
1770case x$cf_cv_abi_default in
1771(x[789])
1772 cf_dft_ccharw_max=6
1773 cf_dft_mmask_t=uint64_t
1774 cf_dft_ordinate_type=int
1775 cf_dft_signed_char=yes
1776 # also: remove the wgetch-events feature in ABI 7
Steve Kondikae271bc2015-11-15 02:50:53 +01001777 ;;
1778esac
1779
micky3879b9f5e72025-07-08 18:04:53 -04001780### override ABI version, e.g., packagers
1781
1782# Check whether --with-abi-altered or --without-abi-altered was given.
1783if test "${with_abi_altered+set}" = set; then
1784 withval="$with_abi_altered"
1785
1786if test -n "$withval" ; then
1787 case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1788 (0)
1789 ;;
1790 (*)
1791 { { echo "$as_me:1791: error: ABI altered is not a number: $withval" >&5
1792echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1793 { (exit 1); exit 1; }; }
1794 ;;
1795 esac
1796else
1797 { { echo "$as_me:1797: error: ABI altered value is empty" >&5
1798echo "$as_me: error: ABI altered value is empty" >&2;}
1799 { (exit 1); exit 1; }; }
1800fi
1801
1802 if test "$cf_cv_abi_version" != "$withval"
1803 then
1804 { echo "$as_me:1804: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1805echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1806 cf_cv_abi_version=$withval
1807 fi
1808
1809fi;
1810
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301811### Checks for programs.
Steve Kondikae271bc2015-11-15 02:50:53 +01001812
1813# Check whether --with-ada or --without-ada was given.
1814if test "${with_ada+set}" = set; then
1815 withval="$with_ada"
1816 cf_with_ada=$withval
1817else
1818 cf_with_ada=yes
1819fi;
micky3879b9f5e72025-07-08 18:04:53 -04001820
Steve Kondikae271bc2015-11-15 02:50:53 +01001821if test "x$cf_with_ada" = xyes
1822then
micky3879b9f5e72025-07-08 18:04:53 -04001823 cf_prog_cc="gnatgcc gcc cc"
Steve Kondikae271bc2015-11-15 02:50:53 +01001824else
micky3879b9f5e72025-07-08 18:04:53 -04001825 cf_prog_cc="gcc cc"
Steve Kondikae271bc2015-11-15 02:50:53 +01001826fi
1827
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301828ac_ext=c
1829ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04001830ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1831ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301832ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04001833ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301834if test -n "$ac_tool_prefix"; then
micky3879b9f5e72025-07-08 18:04:53 -04001835 for ac_prog in $cf_prog_cc
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301836 do
1837 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1838set dummy $ac_tool_prefix$ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04001839echo "$as_me:1839: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301840echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1841if test "${ac_cv_prog_CC+set}" = set; then
1842 echo $ECHO_N "(cached) $ECHO_C" >&6
1843else
1844 if test -n "$CC"; then
1845 ac_cv_prog_CC="$CC" # Let the user override the test.
1846else
1847 ac_save_IFS=$IFS; IFS=$ac_path_separator
1848ac_dummy="$PATH"
1849for ac_dir in $ac_dummy; do
1850 IFS=$ac_save_IFS
1851 test -z "$ac_dir" && ac_dir=.
1852 $as_executable_p "$ac_dir/$ac_word" || continue
1853ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04001854echo "$as_me:1854: found $ac_dir/$ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301855break
1856done
1857
1858fi
1859fi
1860CC=$ac_cv_prog_CC
1861if test -n "$CC"; then
micky3879b9f5e72025-07-08 18:04:53 -04001862 echo "$as_me:1862: result: $CC" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301863echo "${ECHO_T}$CC" >&6
1864else
micky3879b9f5e72025-07-08 18:04:53 -04001865 echo "$as_me:1865: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301866echo "${ECHO_T}no" >&6
1867fi
1868
1869 test -n "$CC" && break
1870 done
1871fi
1872if test -z "$CC"; then
1873 ac_ct_CC=$CC
micky3879b9f5e72025-07-08 18:04:53 -04001874 for ac_prog in $cf_prog_cc
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301875do
1876 # Extract the first word of "$ac_prog", so it can be a program name with args.
1877set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04001878echo "$as_me:1878: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1880if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1881 echo $ECHO_N "(cached) $ECHO_C" >&6
1882else
1883 if test -n "$ac_ct_CC"; then
1884 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1885else
1886 ac_save_IFS=$IFS; IFS=$ac_path_separator
1887ac_dummy="$PATH"
1888for ac_dir in $ac_dummy; do
1889 IFS=$ac_save_IFS
1890 test -z "$ac_dir" && ac_dir=.
1891 $as_executable_p "$ac_dir/$ac_word" || continue
1892ac_cv_prog_ac_ct_CC="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04001893echo "$as_me:1893: found $ac_dir/$ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301894break
1895done
1896
1897fi
1898fi
1899ac_ct_CC=$ac_cv_prog_ac_ct_CC
1900if test -n "$ac_ct_CC"; then
micky3879b9f5e72025-07-08 18:04:53 -04001901 echo "$as_me:1901: result: $ac_ct_CC" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301902echo "${ECHO_T}$ac_ct_CC" >&6
1903else
micky3879b9f5e72025-07-08 18:04:53 -04001904 echo "$as_me:1904: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301905echo "${ECHO_T}no" >&6
1906fi
1907
1908 test -n "$ac_ct_CC" && break
1909done
1910
1911 CC=$ac_ct_CC
1912fi
1913
micky3879b9f5e72025-07-08 18:04:53 -04001914test -z "$CC" && { { echo "$as_me:1914: error: no acceptable cc found in \$PATH" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301915echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1916 { (exit 1); exit 1; }; }
1917
1918# Provide some information about the compiler.
micky3879b9f5e72025-07-08 18:04:53 -04001919echo "$as_me:1919:" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301920 "checking for C compiler version" >&5
micky3879b9f5e72025-07-08 18:04:53 -04001921ac_compiler=`set X $ac_compile; echo "$2"`
1922{ (eval echo "$as_me:1922: \"$ac_compiler --version </dev/null >&5\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301923 (eval $ac_compiler --version </dev/null >&5) 2>&5
1924 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04001925 echo "$as_me:1925: \$? = $ac_status" >&5
1926 (exit "$ac_status"); }
1927{ (eval echo "$as_me:1927: \"$ac_compiler -v </dev/null >&5\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301928 (eval $ac_compiler -v </dev/null >&5) 2>&5
1929 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04001930 echo "$as_me:1930: \$? = $ac_status" >&5
1931 (exit "$ac_status"); }
1932{ (eval echo "$as_me:1932: \"$ac_compiler -V </dev/null >&5\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301933 (eval $ac_compiler -V </dev/null >&5) 2>&5
1934 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04001935 echo "$as_me:1935: \$? = $ac_status" >&5
1936 (exit "$ac_status"); }
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301937
micky3879b9f5e72025-07-08 18:04:53 -04001938cat >"conftest.$ac_ext" <<_ACEOF
1939#line 1939 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301940#include "confdefs.h"
1941
1942int
micky3879b9f5e72025-07-08 18:04:53 -04001943main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301944{
1945
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950ac_clean_files_save=$ac_clean_files
1951ac_clean_files="$ac_clean_files a.out a.exe"
1952# Try to create an executable without -o first, disregard a.out.
1953# It will help us diagnose broken compilers, and finding out an intuition
1954# of exeext.
micky3879b9f5e72025-07-08 18:04:53 -04001955echo "$as_me:1955: checking for C compiler default output" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301956echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04001957ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1958if { (eval echo "$as_me:1958: \"$ac_link_default\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301959 (eval $ac_link_default) 2>&5
1960 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04001961 echo "$as_me:1961: \$? = $ac_status" >&5
1962 (exit "$ac_status"); }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301963 # Find the output, starting from the most likely. This scheme is
1964# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1965# resort.
1966for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1967 ls a.out conftest 2>/dev/null;
1968 ls a.* conftest.* 2>/dev/null`; do
1969 case $ac_file in
Steve Kondikae271bc2015-11-15 02:50:53 +01001970 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301971 a.out ) # We found the default executable, but exeext='' is most
1972 # certainly right.
1973 break;;
1974 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1975 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1976 export ac_cv_exeext
1977 break;;
1978 * ) break;;
1979 esac
1980done
1981else
1982 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04001983cat "conftest.$ac_ext" >&5
1984{ { echo "$as_me:1984: error: C compiler cannot create executables" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301985echo "$as_me: error: C compiler cannot create executables" >&2;}
1986 { (exit 77); exit 77; }; }
1987fi
1988
1989ac_exeext=$ac_cv_exeext
micky3879b9f5e72025-07-08 18:04:53 -04001990echo "$as_me:1990: result: $ac_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301991echo "${ECHO_T}$ac_file" >&6
1992
1993# Check the compiler produces executables we can run. If not, either
1994# the compiler is broken, or we cross compile.
micky3879b9f5e72025-07-08 18:04:53 -04001995echo "$as_me:1995: checking whether the C compiler works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301996echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1997# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1998# If not cross compiling, check that we can run a simple program.
1999if test "$cross_compiling" != yes; then
2000 if { ac_try='./$ac_file'
micky3879b9f5e72025-07-08 18:04:53 -04002001 { (eval echo "$as_me:2001: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302002 (eval $ac_try) 2>&5
2003 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002004 echo "$as_me:2004: \$? = $ac_status" >&5
2005 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302006 cross_compiling=no
2007 else
2008 if test "$cross_compiling" = maybe; then
2009 cross_compiling=yes
2010 else
micky3879b9f5e72025-07-08 18:04:53 -04002011 { { echo "$as_me:2011: error: cannot run C compiled programs.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302012If you meant to cross compile, use \`--host'." >&5
2013echo "$as_me: error: cannot run C compiled programs.
2014If you meant to cross compile, use \`--host'." >&2;}
2015 { (exit 1); exit 1; }; }
2016 fi
2017 fi
2018fi
micky3879b9f5e72025-07-08 18:04:53 -04002019echo "$as_me:2019: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302020echo "${ECHO_T}yes" >&6
2021
micky3879b9f5e72025-07-08 18:04:53 -04002022rm -f a.out a.exe "conftest$ac_cv_exeext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302023ac_clean_files=$ac_clean_files_save
2024# Check the compiler produces executables we can run. If not, either
2025# the compiler is broken, or we cross compile.
micky3879b9f5e72025-07-08 18:04:53 -04002026echo "$as_me:2026: checking whether we are cross compiling" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302027echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04002028echo "$as_me:2028: result: $cross_compiling" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302029echo "${ECHO_T}$cross_compiling" >&6
2030
micky3879b9f5e72025-07-08 18:04:53 -04002031echo "$as_me:2031: checking for executable suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302032echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04002033if { (eval echo "$as_me:2033: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302034 (eval $ac_link) 2>&5
2035 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002036 echo "$as_me:2036: \$? = $ac_status" >&5
2037 (exit "$ac_status"); }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302038 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2039# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2040# work properly (i.e., refer to `conftest.exe'), while it won't with
2041# `rm'.
2042for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2043 case $ac_file in
Steve Kondikae271bc2015-11-15 02:50:53 +01002044 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302045 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2046 export ac_cv_exeext
2047 break;;
2048 * ) break;;
2049 esac
2050done
2051else
micky3879b9f5e72025-07-08 18:04:53 -04002052 { { echo "$as_me:2052: error: cannot compute EXEEXT: cannot compile and link" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302053echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2054 { (exit 1); exit 1; }; }
2055fi
2056
micky3879b9f5e72025-07-08 18:04:53 -04002057rm -f "conftest$ac_cv_exeext"
2058echo "$as_me:2058: result: $ac_cv_exeext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302059echo "${ECHO_T}$ac_cv_exeext" >&6
2060
micky3879b9f5e72025-07-08 18:04:53 -04002061rm -f "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302062EXEEXT=$ac_cv_exeext
2063ac_exeext=$EXEEXT
micky3879b9f5e72025-07-08 18:04:53 -04002064echo "$as_me:2064: checking for object suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302065echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2066if test "${ac_cv_objext+set}" = set; then
2067 echo $ECHO_N "(cached) $ECHO_C" >&6
2068else
micky3879b9f5e72025-07-08 18:04:53 -04002069 cat >"conftest.$ac_ext" <<_ACEOF
2070#line 2070 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302071#include "confdefs.h"
2072
2073int
micky3879b9f5e72025-07-08 18:04:53 -04002074main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302075{
2076
2077 ;
2078 return 0;
2079}
2080_ACEOF
2081rm -f conftest.o conftest.obj
micky3879b9f5e72025-07-08 18:04:53 -04002082if { (eval echo "$as_me:2082: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302083 (eval $ac_compile) 2>&5
2084 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002085 echo "$as_me:2085: \$? = $ac_status" >&5
2086 (exit "$ac_status"); }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302087 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2088 case $ac_file in
Steve Kondikae271bc2015-11-15 02:50:53 +01002089 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302090 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2091 break;;
2092 esac
2093done
2094else
2095 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002096cat "conftest.$ac_ext" >&5
2097{ { echo "$as_me:2097: error: cannot compute OBJEXT: cannot compile" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302098echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2099 { (exit 1); exit 1; }; }
2100fi
2101
micky3879b9f5e72025-07-08 18:04:53 -04002102rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302103fi
micky3879b9f5e72025-07-08 18:04:53 -04002104echo "$as_me:2104: result: $ac_cv_objext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302105echo "${ECHO_T}$ac_cv_objext" >&6
2106OBJEXT=$ac_cv_objext
2107ac_objext=$OBJEXT
micky3879b9f5e72025-07-08 18:04:53 -04002108echo "$as_me:2108: checking whether we are using the GNU C compiler" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302109echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2110if test "${ac_cv_c_compiler_gnu+set}" = set; then
2111 echo $ECHO_N "(cached) $ECHO_C" >&6
2112else
micky3879b9f5e72025-07-08 18:04:53 -04002113 cat >"conftest.$ac_ext" <<_ACEOF
2114#line 2114 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302115#include "confdefs.h"
2116
2117int
micky3879b9f5e72025-07-08 18:04:53 -04002118main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302119{
2120#ifndef __GNUC__
2121 choke me
2122#endif
2123
2124 ;
2125 return 0;
2126}
2127_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002128rm -f "conftest.$ac_objext"
2129if { (eval echo "$as_me:2129: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302130 (eval $ac_compile) 2>&5
2131 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002132 echo "$as_me:2132: \$? = $ac_status" >&5
2133 (exit "$ac_status"); } &&
2134 { ac_try='test -s "conftest.$ac_objext"'
2135 { (eval echo "$as_me:2135: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302136 (eval $ac_try) 2>&5
2137 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002138 echo "$as_me:2138: \$? = $ac_status" >&5
2139 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302140 ac_compiler_gnu=yes
2141else
2142 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002143cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302144ac_compiler_gnu=no
2145fi
micky3879b9f5e72025-07-08 18:04:53 -04002146rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302147ac_cv_c_compiler_gnu=$ac_compiler_gnu
2148
2149fi
micky3879b9f5e72025-07-08 18:04:53 -04002150echo "$as_me:2150: result: $ac_cv_c_compiler_gnu" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302151echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2152GCC=`test $ac_compiler_gnu = yes && echo yes`
2153ac_test_CFLAGS=${CFLAGS+set}
2154ac_save_CFLAGS=$CFLAGS
2155CFLAGS="-g"
micky3879b9f5e72025-07-08 18:04:53 -04002156echo "$as_me:2156: checking whether $CC accepts -g" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302157echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2158if test "${ac_cv_prog_cc_g+set}" = set; then
2159 echo $ECHO_N "(cached) $ECHO_C" >&6
2160else
micky3879b9f5e72025-07-08 18:04:53 -04002161 cat >"conftest.$ac_ext" <<_ACEOF
2162#line 2162 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302163#include "confdefs.h"
2164
2165int
micky3879b9f5e72025-07-08 18:04:53 -04002166main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302167{
2168
2169 ;
2170 return 0;
2171}
2172_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002173rm -f "conftest.$ac_objext"
2174if { (eval echo "$as_me:2174: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302175 (eval $ac_compile) 2>&5
2176 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002177 echo "$as_me:2177: \$? = $ac_status" >&5
2178 (exit "$ac_status"); } &&
2179 { ac_try='test -s "conftest.$ac_objext"'
2180 { (eval echo "$as_me:2180: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302181 (eval $ac_try) 2>&5
2182 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002183 echo "$as_me:2183: \$? = $ac_status" >&5
2184 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302185 ac_cv_prog_cc_g=yes
2186else
2187 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002188cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302189ac_cv_prog_cc_g=no
2190fi
micky3879b9f5e72025-07-08 18:04:53 -04002191rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302192fi
micky3879b9f5e72025-07-08 18:04:53 -04002193echo "$as_me:2193: result: $ac_cv_prog_cc_g" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302194echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2195if test "$ac_test_CFLAGS" = set; then
2196 CFLAGS=$ac_save_CFLAGS
2197elif test $ac_cv_prog_cc_g = yes; then
2198 if test "$GCC" = yes; then
2199 CFLAGS="-g -O2"
2200 else
2201 CFLAGS="-g"
2202 fi
2203else
2204 if test "$GCC" = yes; then
2205 CFLAGS="-O2"
2206 else
2207 CFLAGS=
2208 fi
2209fi
2210# Some people use a C++ compiler to compile C. Since we use `exit',
2211# in C++ we need to declare it. In case someone uses the same compiler
2212# for both compiling C and C++ we need to have the C++ compiler decide
2213# the declaration of exit, since it's the most demanding environment.
micky3879b9f5e72025-07-08 18:04:53 -04002214cat >"conftest.$ac_ext" <<_ACEOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302215#ifndef __cplusplus
2216 choke me
2217#endif
2218_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002219rm -f "conftest.$ac_objext"
2220if { (eval echo "$as_me:2220: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302221 (eval $ac_compile) 2>&5
2222 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002223 echo "$as_me:2223: \$? = $ac_status" >&5
2224 (exit "$ac_status"); } &&
2225 { ac_try='test -s "conftest.$ac_objext"'
2226 { (eval echo "$as_me:2226: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302227 (eval $ac_try) 2>&5
2228 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002229 echo "$as_me:2229: \$? = $ac_status" >&5
2230 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302231 for ac_declaration in \
2232 ''\
2233 '#include <stdlib.h>' \
2234 'extern "C" void std::exit (int) throw (); using std::exit;' \
2235 'extern "C" void std::exit (int); using std::exit;' \
2236 'extern "C" void exit (int) throw ();' \
2237 'extern "C" void exit (int);' \
2238 'void exit (int);'
2239do
micky3879b9f5e72025-07-08 18:04:53 -04002240 cat >"conftest.$ac_ext" <<_ACEOF
2241#line 2241 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302242#include "confdefs.h"
2243#include <stdlib.h>
2244$ac_declaration
2245int
micky3879b9f5e72025-07-08 18:04:53 -04002246main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302247{
2248exit (42);
2249 ;
2250 return 0;
2251}
2252_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002253rm -f "conftest.$ac_objext"
2254if { (eval echo "$as_me:2254: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302255 (eval $ac_compile) 2>&5
2256 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002257 echo "$as_me:2257: \$? = $ac_status" >&5
2258 (exit "$ac_status"); } &&
2259 { ac_try='test -s "conftest.$ac_objext"'
2260 { (eval echo "$as_me:2260: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302261 (eval $ac_try) 2>&5
2262 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002263 echo "$as_me:2263: \$? = $ac_status" >&5
2264 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302265 :
2266else
2267 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002268cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302269continue
2270fi
micky3879b9f5e72025-07-08 18:04:53 -04002271rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2272 cat >"conftest.$ac_ext" <<_ACEOF
2273#line 2273 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302274#include "confdefs.h"
2275$ac_declaration
2276int
micky3879b9f5e72025-07-08 18:04:53 -04002277main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302278{
2279exit (42);
2280 ;
2281 return 0;
2282}
2283_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002284rm -f "conftest.$ac_objext"
2285if { (eval echo "$as_me:2285: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302286 (eval $ac_compile) 2>&5
2287 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002288 echo "$as_me:2288: \$? = $ac_status" >&5
2289 (exit "$ac_status"); } &&
2290 { ac_try='test -s "conftest.$ac_objext"'
2291 { (eval echo "$as_me:2291: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302292 (eval $ac_try) 2>&5
2293 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002294 echo "$as_me:2294: \$? = $ac_status" >&5
2295 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302296 break
2297else
2298 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002299cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302300fi
micky3879b9f5e72025-07-08 18:04:53 -04002301rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302302done
Steve Kondikae271bc2015-11-15 02:50:53 +01002303rm -rf conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302304if test -n "$ac_declaration"; then
2305 echo '#ifdef __cplusplus' >>confdefs.h
micky3879b9f5e72025-07-08 18:04:53 -04002306 echo "$ac_declaration" >>confdefs.h
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302307 echo '#endif' >>confdefs.h
2308fi
2309
2310else
2311 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002312cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302313fi
micky3879b9f5e72025-07-08 18:04:53 -04002314rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302315ac_ext=c
2316ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04002317ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2318ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302319ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04002320ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302321
2322GCC_VERSION=none
2323if test "$GCC" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -04002324 echo "$as_me:2324: checking version of $CC" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302325echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04002326 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302327 test -z "$GCC_VERSION" && GCC_VERSION=unknown
micky3879b9f5e72025-07-08 18:04:53 -04002328 echo "$as_me:2328: result: $GCC_VERSION" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302329echo "${ECHO_T}$GCC_VERSION" >&6
2330fi
2331
micky3879b9f5e72025-07-08 18:04:53 -04002332INTEL_COMPILER=no
2333
2334if test "$GCC" = yes ; then
2335 case "$host_os" in
2336 (linux*|gnu*)
2337 echo "$as_me:2337: checking if this is really Intel C compiler" >&5
2338echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2339 cf_save_CFLAGS="$CFLAGS"
2340 CFLAGS="$CFLAGS -no-gcc"
2341 cat >"conftest.$ac_ext" <<_ACEOF
2342#line 2342 "configure"
2343#include "confdefs.h"
2344
2345int
2346main (void)
2347{
2348
2349#ifdef __INTEL_COMPILER
2350#else
2351#error __INTEL_COMPILER is not defined
2352#endif
2353
2354 ;
2355 return 0;
2356}
2357_ACEOF
2358rm -f "conftest.$ac_objext"
2359if { (eval echo "$as_me:2359: \"$ac_compile\"") >&5
2360 (eval $ac_compile) 2>&5
2361 ac_status=$?
2362 echo "$as_me:2362: \$? = $ac_status" >&5
2363 (exit "$ac_status"); } &&
2364 { ac_try='test -s "conftest.$ac_objext"'
2365 { (eval echo "$as_me:2365: \"$ac_try\"") >&5
2366 (eval $ac_try) 2>&5
2367 ac_status=$?
2368 echo "$as_me:2368: \$? = $ac_status" >&5
2369 (exit "$ac_status"); }; }; then
2370 INTEL_COMPILER=yes
2371cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2372
2373else
2374 echo "$as_me: failed program was:" >&5
2375cat "conftest.$ac_ext" >&5
2376fi
2377rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2378 CFLAGS="$cf_save_CFLAGS"
2379 echo "$as_me:2379: result: $INTEL_COMPILER" >&5
2380echo "${ECHO_T}$INTEL_COMPILER" >&6
2381 ;;
2382 esac
2383fi
2384
2385CLANG_COMPILER=no
2386
2387if test "$GCC" = yes ; then
2388 echo "$as_me:2388: checking if this is really Clang C compiler" >&5
2389echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2390 cf_save_CFLAGS="$CFLAGS"
2391 cat >"conftest.$ac_ext" <<_ACEOF
2392#line 2392 "configure"
2393#include "confdefs.h"
2394
2395int
2396main (void)
2397{
2398
2399#ifdef __clang__
2400#else
2401#error __clang__ is not defined
2402#endif
2403
2404 ;
2405 return 0;
2406}
2407_ACEOF
2408rm -f "conftest.$ac_objext"
2409if { (eval echo "$as_me:2409: \"$ac_compile\"") >&5
2410 (eval $ac_compile) 2>&5
2411 ac_status=$?
2412 echo "$as_me:2412: \$? = $ac_status" >&5
2413 (exit "$ac_status"); } &&
2414 { ac_try='test -s "conftest.$ac_objext"'
2415 { (eval echo "$as_me:2415: \"$ac_try\"") >&5
2416 (eval $ac_try) 2>&5
2417 ac_status=$?
2418 echo "$as_me:2418: \$? = $ac_status" >&5
2419 (exit "$ac_status"); }; }; then
2420 CLANG_COMPILER=yes
2421
2422else
2423 echo "$as_me: failed program was:" >&5
2424cat "conftest.$ac_ext" >&5
2425fi
2426rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2427 CFLAGS="$cf_save_CFLAGS"
2428 echo "$as_me:2428: result: $CLANG_COMPILER" >&5
2429echo "${ECHO_T}$CLANG_COMPILER" >&6
2430fi
2431
2432CLANG_VERSION=none
2433
2434if test "x$CLANG_COMPILER" = "xyes" ; then
2435 case "$CC" in
2436 (c[1-9][0-9]|*/c[1-9][0-9])
2437 { echo "$as_me:2437: WARNING: replacing broken compiler alias $CC" >&5
2438echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2439 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2440 CC=clang
2441 ;;
2442 esac
2443
2444 echo "$as_me:2444: checking version of $CC" >&5
2445echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2446 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2447 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2448 echo "$as_me:2448: result: $CLANG_VERSION" >&5
2449echo "${ECHO_T}$CLANG_VERSION" >&6
2450
2451 for cf_clang_opt in \
2452 -Qunused-arguments \
2453 -Wno-error=implicit-function-declaration
2454 do
2455 echo "$as_me:2455: checking if option $cf_clang_opt works" >&5
2456echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2457 cf_save_CFLAGS="$CFLAGS"
2458 CFLAGS="$CFLAGS $cf_clang_opt"
2459 cat >"conftest.$ac_ext" <<_ACEOF
2460#line 2460 "configure"
2461#include "confdefs.h"
2462
2463 #include <stdio.h>
2464int
2465main (void)
2466{
2467
2468 printf("hello!\\n");
2469 ;
2470 return 0;
2471}
2472_ACEOF
2473rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2474if { (eval echo "$as_me:2474: \"$ac_link\"") >&5
2475 (eval $ac_link) 2>&5
2476 ac_status=$?
2477 echo "$as_me:2477: \$? = $ac_status" >&5
2478 (exit "$ac_status"); } &&
2479 { ac_try='test -s "conftest$ac_exeext"'
2480 { (eval echo "$as_me:2480: \"$ac_try\"") >&5
2481 (eval $ac_try) 2>&5
2482 ac_status=$?
2483 echo "$as_me:2483: \$? = $ac_status" >&5
2484 (exit "$ac_status"); }; }; then
2485
2486 cf_clang_optok=yes
2487else
2488 echo "$as_me: failed program was:" >&5
2489cat "conftest.$ac_ext" >&5
2490
2491 cf_clang_optok=no
2492fi
2493rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2494 echo "$as_me:2494: result: $cf_clang_optok" >&5
2495echo "${ECHO_T}$cf_clang_optok" >&6
2496 CFLAGS="$cf_save_CFLAGS"
2497 if test "$cf_clang_optok" = yes; then
2498 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2499
2500echo "${as_me:-configure}:2500: testing adding option $cf_clang_opt ..." 1>&5
2501
2502 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2503 CFLAGS="${CFLAGS}$cf_clang_opt"
2504
2505 fi
2506 done
2507fi
2508
2509echo "$as_me:2509: checking for $CC option to accept ANSI C" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302510echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2511if test "${ac_cv_prog_cc_stdc+set}" = set; then
2512 echo $ECHO_N "(cached) $ECHO_C" >&6
2513else
2514 ac_cv_prog_cc_stdc=no
2515ac_save_CC=$CC
micky3879b9f5e72025-07-08 18:04:53 -04002516cat >"conftest.$ac_ext" <<_ACEOF
2517#line 2517 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302518#include "confdefs.h"
2519#include <stdarg.h>
2520#include <stdio.h>
2521#include <sys/types.h>
2522#include <sys/stat.h>
2523/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2524struct buf { int x; };
2525FILE * (*rcsopen) (struct buf *, struct stat *, int);
micky3879b9f5e72025-07-08 18:04:53 -04002526static char *e (char **p, int i)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302527{
2528 return p[i];
2529}
2530static char *f (char * (*g) (char **, int), char **p, ...)
2531{
2532 char *s;
2533 va_list v;
2534 va_start (v,p);
2535 s = g (p, va_arg (v,int));
2536 va_end (v);
2537 return s;
2538}
2539int test (int i, double x);
2540struct s1 {int (*f) (int a);};
2541struct s2 {int (*f) (double a);};
2542int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2543int argc;
2544char **argv;
2545int
micky3879b9f5e72025-07-08 18:04:53 -04002546main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302547{
2548return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2549 ;
2550 return 0;
2551}
2552_ACEOF
2553# Don't try gcc -ansi; that turns off useful extensions and
2554# breaks some systems' header files.
2555# AIX -qlanglvl=ansi
2556# Ultrix and OSF/1 -std1
2557# HP-UX 10.20 and later -Ae
2558# HP-UX older versions -Aa -D_HPUX_SOURCE
2559# SVR4 -Xc -D__EXTENSIONS__
2560for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2561do
2562 CC="$ac_save_CC $ac_arg"
micky3879b9f5e72025-07-08 18:04:53 -04002563 rm -f "conftest.$ac_objext"
2564if { (eval echo "$as_me:2564: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302565 (eval $ac_compile) 2>&5
2566 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002567 echo "$as_me:2567: \$? = $ac_status" >&5
2568 (exit "$ac_status"); } &&
2569 { ac_try='test -s "conftest.$ac_objext"'
2570 { (eval echo "$as_me:2570: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302571 (eval $ac_try) 2>&5
2572 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002573 echo "$as_me:2573: \$? = $ac_status" >&5
2574 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302575 ac_cv_prog_cc_stdc=$ac_arg
2576break
2577else
2578 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002579cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302580fi
micky3879b9f5e72025-07-08 18:04:53 -04002581rm -f "conftest.$ac_objext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302582done
micky3879b9f5e72025-07-08 18:04:53 -04002583rm -f "conftest.$ac_ext" "conftest.$ac_objext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302584CC=$ac_save_CC
2585
2586fi
2587
2588case "x$ac_cv_prog_cc_stdc" in
2589 x|xno)
micky3879b9f5e72025-07-08 18:04:53 -04002590 echo "$as_me:2590: result: none needed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302591echo "${ECHO_T}none needed" >&6 ;;
2592 *)
micky3879b9f5e72025-07-08 18:04:53 -04002593 echo "$as_me:2593: result: $ac_cv_prog_cc_stdc" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05302594echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2595 CC="$CC $ac_cv_prog_cc_stdc" ;;
2596esac
2597
Steve Kondikae271bc2015-11-15 02:50:53 +01002598# This should have been defined by AC_PROG_CC
micky3879b9f5e72025-07-08 18:04:53 -04002599: "${CC:=cc}"
Steve Kondikae271bc2015-11-15 02:50:53 +01002600
micky3879b9f5e72025-07-08 18:04:53 -04002601echo "$as_me:2601: checking \$CFLAGS variable" >&5
2602echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2603case "x$CFLAGS" in
2604(*-[IUD]*)
2605 echo "$as_me:2605: result: broken" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01002606echo "${ECHO_T}broken" >&6
micky3879b9f5e72025-07-08 18:04:53 -04002607 { echo "$as_me:2607: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2608echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2609 cf_flags="$CFLAGS"
2610 CFLAGS=
2611 for cf_arg in $cf_flags
2612 do
Steve Kondikae271bc2015-11-15 02:50:53 +01002613
2614cf_fix_cppflags=no
2615cf_new_cflags=
2616cf_new_cppflags=
2617cf_new_extra_cppflags=
2618
micky3879b9f5e72025-07-08 18:04:53 -04002619for cf_add_cflags in $cf_arg
Steve Kondikae271bc2015-11-15 02:50:53 +01002620do
micky3879b9f5e72025-07-08 18:04:53 -04002621case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +01002622(no)
micky3879b9f5e72025-07-08 18:04:53 -04002623 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +01002624 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -04002625 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +01002626 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -04002627 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +01002628
2629 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2630 && test -z "${cf_tst_cflags}" \
2631 && cf_fix_cppflags=yes
2632
micky3879b9f5e72025-07-08 18:04:53 -04002633 if test "$cf_fix_cppflags" = yes ; then
2634
2635 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
Steve Kondikae271bc2015-11-15 02:50:53 +01002638 continue
2639 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -04002640
2641 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2642 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2643
Steve Kondikae271bc2015-11-15 02:50:53 +01002644 continue
2645 fi
2646 ;;
2647 esac
2648 case "$CPPFLAGS" in
2649 (*$cf_add_cflags)
2650 ;;
2651 (*)
micky3879b9f5e72025-07-08 18:04:53 -04002652 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +01002653 (-D*)
2654 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2655
2656CPPFLAGS=`echo "$CPPFLAGS" | \
2657 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2658 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2659
2660 ;;
2661 esac
micky3879b9f5e72025-07-08 18:04:53 -04002662
2663 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2664 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2665
Steve Kondikae271bc2015-11-15 02:50:53 +01002666 ;;
2667 esac
2668 ;;
2669 (*)
micky3879b9f5e72025-07-08 18:04:53 -04002670
2671 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2672 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2673
Steve Kondikae271bc2015-11-15 02:50:53 +01002674 ;;
2675 esac
2676 ;;
2677(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +01002678
micky3879b9f5e72025-07-08 18:04:53 -04002679 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2680 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2681
2682 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +01002683
2684 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2685 && test -z "${cf_tst_cflags}" \
2686 && cf_fix_cppflags=no
2687 ;;
2688esac
2689done
2690
2691if test -n "$cf_new_cflags" ; then
2692
micky3879b9f5e72025-07-08 18:04:53 -04002693 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2694 CFLAGS="${CFLAGS}$cf_new_cflags"
2695
Steve Kondikae271bc2015-11-15 02:50:53 +01002696fi
2697
2698if test -n "$cf_new_cppflags" ; then
2699
micky3879b9f5e72025-07-08 18:04:53 -04002700 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2701 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2702
Steve Kondikae271bc2015-11-15 02:50:53 +01002703fi
2704
2705if test -n "$cf_new_extra_cppflags" ; then
2706
micky3879b9f5e72025-07-08 18:04:53 -04002707 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2708 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2709
Steve Kondikae271bc2015-11-15 02:50:53 +01002710fi
2711
micky3879b9f5e72025-07-08 18:04:53 -04002712 done
2713 ;;
2714(*)
2715 echo "$as_me:2715: result: ok" >&5
2716echo "${ECHO_T}ok" >&6
2717 ;;
2718esac
2719
2720echo "$as_me:2720: checking \$CC variable" >&5
2721echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2722case "$CC" in
2723(*[\ \ ]-*)
2724 echo "$as_me:2724: result: broken" >&5
2725echo "${ECHO_T}broken" >&6
2726 { echo "$as_me:2726: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2727echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2728 # humor him...
2729 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2730 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2731 CC="$cf_prog"
2732 for cf_arg in $cf_flags
2733 do
2734 case "x$cf_arg" in
2735 (x-[IUDfgOW]*)
2736
2737cf_fix_cppflags=no
2738cf_new_cflags=
2739cf_new_cppflags=
2740cf_new_extra_cppflags=
2741
2742for cf_add_cflags in $cf_arg
2743do
2744case "$cf_fix_cppflags" in
2745(no)
2746 case "$cf_add_cflags" in
2747 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2748 case "$cf_add_cflags" in
2749 (-D*)
2750 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2751
2752 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2753 && test -z "${cf_tst_cflags}" \
2754 && cf_fix_cppflags=yes
2755
2756 if test "$cf_fix_cppflags" = yes ; then
2757
2758 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761 continue
2762 elif test "${cf_tst_cflags}" = "\"'" ; then
2763
2764 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2765 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2766
2767 continue
2768 fi
2769 ;;
2770 esac
2771 case "$CPPFLAGS" in
2772 (*$cf_add_cflags)
2773 ;;
2774 (*)
2775 case "$cf_add_cflags" in
2776 (-D*)
2777 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2778
2779CPPFLAGS=`echo "$CPPFLAGS" | \
2780 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2781 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2782
2783 ;;
2784 esac
2785
2786 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2787 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2788
2789 ;;
2790 esac
2791 ;;
2792 (*)
2793
2794 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2795 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2796
2797 ;;
2798 esac
2799 ;;
2800(yes)
2801
2802 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2803 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2804
2805 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2806
2807 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2808 && test -z "${cf_tst_cflags}" \
2809 && cf_fix_cppflags=no
2810 ;;
2811esac
2812done
2813
2814if test -n "$cf_new_cflags" ; then
2815
2816 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2817 CFLAGS="${CFLAGS}$cf_new_cflags"
2818
2819fi
2820
2821if test -n "$cf_new_cppflags" ; then
2822
2823 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2824 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2825
2826fi
2827
2828if test -n "$cf_new_extra_cppflags" ; then
2829
2830 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2831 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2832
2833fi
2834
2835 ;;
2836 (*)
2837 CC="$CC $cf_arg"
2838 ;;
2839 esac
2840 done
2841 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2842
2843echo "${as_me:-configure}:2843: testing resulting CC: '$CC' ..." 1>&5
2844
2845 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2846
2847echo "${as_me:-configure}:2847: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2848
2849 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2850
2851echo "${as_me:-configure}:2851: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2852
Steve Kondikae271bc2015-11-15 02:50:53 +01002853 ;;
2854(*)
micky3879b9f5e72025-07-08 18:04:53 -04002855 echo "$as_me:2855: result: ok" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01002856echo "${ECHO_T}ok" >&6
2857 ;;
2858esac
2859
2860ac_ext=c
2861ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04002862ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2863ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +01002864ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04002865ac_main_return="return"
2866echo "$as_me:2866: checking how to run the C preprocessor" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01002867echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2868# On Suns, sometimes $CPP names a directory.
2869if test -n "$CPP" && test -d "$CPP"; then
2870 CPP=
2871fi
2872if test -z "$CPP"; then
2873 if test "${ac_cv_prog_CPP+set}" = set; then
2874 echo $ECHO_N "(cached) $ECHO_C" >&6
2875else
2876 # Double quotes because CPP needs to be expanded
2877 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2878 do
2879 ac_preproc_ok=false
2880for ac_c_preproc_warn_flag in '' yes
2881do
2882 # Use a header file that comes with gcc, so configuring glibc
2883 # with a fresh cross-compiler works.
2884 # On the NeXT, cc -E runs the code through the compiler's parser,
2885 # not just through cpp. "Syntax error" is here to catch this case.
micky3879b9f5e72025-07-08 18:04:53 -04002886 cat >"conftest.$ac_ext" <<_ACEOF
2887#line 2887 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01002888#include "confdefs.h"
2889#include <assert.h>
2890 Syntax error
2891_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002892if { (eval echo "$as_me:2892: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2893 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +01002894 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002895 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +01002896 rm -f conftest.er1
2897 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -04002898 echo "$as_me:2898: \$? = $ac_status" >&5
2899 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +01002900 if test -s conftest.err; then
2901 ac_cpp_err=$ac_c_preproc_warn_flag
2902 else
2903 ac_cpp_err=
2904 fi
2905else
2906 ac_cpp_err=yes
2907fi
2908if test -z "$ac_cpp_err"; then
2909 :
2910else
2911 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002912 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01002913 # Broken: fails on valid input.
2914continue
2915fi
micky3879b9f5e72025-07-08 18:04:53 -04002916rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01002917
2918 # OK, works on sane cases. Now check whether non-existent headers
2919 # can be detected and how.
micky3879b9f5e72025-07-08 18:04:53 -04002920 cat >"conftest.$ac_ext" <<_ACEOF
2921#line 2921 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01002922#include "confdefs.h"
2923#include <ac_nonexistent.h>
2924_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002925if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +01002927 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002928 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +01002929 rm -f conftest.er1
2930 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -04002931 echo "$as_me:2931: \$? = $ac_status" >&5
2932 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +01002933 if test -s conftest.err; then
2934 ac_cpp_err=$ac_c_preproc_warn_flag
2935 else
2936 ac_cpp_err=
2937 fi
2938else
2939 ac_cpp_err=yes
2940fi
2941if test -z "$ac_cpp_err"; then
2942 # Broken: success on invalid input.
2943continue
2944else
2945 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04002946 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01002947 # Passes both tests.
2948ac_preproc_ok=:
2949break
2950fi
micky3879b9f5e72025-07-08 18:04:53 -04002951rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01002952
2953done
2954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
micky3879b9f5e72025-07-08 18:04:53 -04002955rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01002956if $ac_preproc_ok; then
2957 break
2958fi
2959
2960 done
2961 ac_cv_prog_CPP=$CPP
2962
2963fi
2964 CPP=$ac_cv_prog_CPP
2965else
2966 ac_cv_prog_CPP=$CPP
2967fi
micky3879b9f5e72025-07-08 18:04:53 -04002968echo "$as_me:2968: result: $CPP" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01002969echo "${ECHO_T}$CPP" >&6
2970ac_preproc_ok=false
2971for ac_c_preproc_warn_flag in '' yes
2972do
2973 # Use a header file that comes with gcc, so configuring glibc
2974 # with a fresh cross-compiler works.
2975 # On the NeXT, cc -E runs the code through the compiler's parser,
2976 # not just through cpp. "Syntax error" is here to catch this case.
micky3879b9f5e72025-07-08 18:04:53 -04002977 cat >"conftest.$ac_ext" <<_ACEOF
2978#line 2978 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01002979#include "confdefs.h"
2980#include <assert.h>
2981 Syntax error
2982_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04002983if { (eval echo "$as_me:2983: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2984 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +01002985 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04002986 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +01002987 rm -f conftest.er1
2988 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -04002989 echo "$as_me:2989: \$? = $ac_status" >&5
2990 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +01002991 if test -s conftest.err; then
2992 ac_cpp_err=$ac_c_preproc_warn_flag
2993 else
2994 ac_cpp_err=
2995 fi
2996else
2997 ac_cpp_err=yes
2998fi
2999if test -z "$ac_cpp_err"; then
3000 :
3001else
3002 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04003003 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003004 # Broken: fails on valid input.
3005continue
3006fi
micky3879b9f5e72025-07-08 18:04:53 -04003007rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01003008
3009 # OK, works on sane cases. Now check whether non-existent headers
3010 # can be detected and how.
micky3879b9f5e72025-07-08 18:04:53 -04003011 cat >"conftest.$ac_ext" <<_ACEOF
3012#line 3012 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003013#include "confdefs.h"
3014#include <ac_nonexistent.h>
3015_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04003016if { (eval echo "$as_me:3016: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3017 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +01003018 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003019 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +01003020 rm -f conftest.er1
3021 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -04003022 echo "$as_me:3022: \$? = $ac_status" >&5
3023 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003024 if test -s conftest.err; then
3025 ac_cpp_err=$ac_c_preproc_warn_flag
3026 else
3027 ac_cpp_err=
3028 fi
3029else
3030 ac_cpp_err=yes
3031fi
3032if test -z "$ac_cpp_err"; then
3033 # Broken: success on invalid input.
3034continue
3035else
3036 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04003037 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003038 # Passes both tests.
3039ac_preproc_ok=:
3040break
3041fi
micky3879b9f5e72025-07-08 18:04:53 -04003042rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01003043
3044done
3045# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
micky3879b9f5e72025-07-08 18:04:53 -04003046rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01003047if $ac_preproc_ok; then
3048 :
3049else
micky3879b9f5e72025-07-08 18:04:53 -04003050 { { echo "$as_me:3050: error: C preprocessor \"$CPP\" fails sanity check" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003051echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3052 { (exit 1); exit 1; }; }
3053fi
3054
3055ac_ext=c
3056ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04003057ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3058ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +01003059ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04003060ac_main_return="return"
Steve Kondikae271bc2015-11-15 02:50:53 +01003061
3062if test $ac_cv_c_compiler_gnu = yes; then
micky3879b9f5e72025-07-08 18:04:53 -04003063 echo "$as_me:3063: checking whether $CC needs -traditional" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003064echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3065if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3066 echo $ECHO_N "(cached) $ECHO_C" >&6
3067else
3068 ac_pattern="Autoconf.*'x'"
micky3879b9f5e72025-07-08 18:04:53 -04003069 cat >"conftest.$ac_ext" <<_ACEOF
3070#line 3070 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003071#include "confdefs.h"
3072#include <sgtty.h>
3073int Autoconf = TIOCGETP;
3074_ACEOF
3075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
micky3879b9f5e72025-07-08 18:04:53 -04003076 $EGREP "$ac_pattern" >/dev/null 2>&1; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003077 ac_cv_prog_gcc_traditional=yes
3078else
3079 ac_cv_prog_gcc_traditional=no
3080fi
3081rm -rf conftest*
3082
3083 if test $ac_cv_prog_gcc_traditional = no; then
micky3879b9f5e72025-07-08 18:04:53 -04003084 cat >"conftest.$ac_ext" <<_ACEOF
3085#line 3085 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003086#include "confdefs.h"
3087#include <termio.h>
3088int Autoconf = TCGETA;
3089_ACEOF
3090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
micky3879b9f5e72025-07-08 18:04:53 -04003091 $EGREP "$ac_pattern" >/dev/null 2>&1; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003092 ac_cv_prog_gcc_traditional=yes
3093fi
3094rm -rf conftest*
3095
3096 fi
3097fi
micky3879b9f5e72025-07-08 18:04:53 -04003098echo "$as_me:3098: result: $ac_cv_prog_gcc_traditional" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003099echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3100 if test $ac_cv_prog_gcc_traditional = yes; then
3101 CC="$CC -traditional"
3102 fi
3103fi
3104
micky3879b9f5e72025-07-08 18:04:53 -04003105echo "$as_me:3105: checking whether $CC understands -c and -o together" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003106echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3107if test "${cf_cv_prog_CC_c_o+set}" = set; then
3108 echo $ECHO_N "(cached) $ECHO_C" >&6
3109else
3110
3111cat > conftest.$ac_ext <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -04003112int main(void)
Steve Kondikae271bc2015-11-15 02:50:53 +01003113{
3114 ${cf_cv_main_return:-return}(0);
3115}
3116CF_EOF
3117# We do the test twice because some compilers refuse to overwrite an
3118# existing .o file with -o, though they will create one.
micky3879b9f5e72025-07-08 18:04:53 -04003119ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3120if { (eval echo "$as_me:3120: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003121 (eval $ac_try) 2>&5
3122 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003123 echo "$as_me:3123: \$? = $ac_status" >&5
3124 (exit "$ac_status"); } &&
3125 test -f conftest2.$ac_objext && { (eval echo "$as_me:3125: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003126 (eval $ac_try) 2>&5
3127 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003128 echo "$as_me:3128: \$? = $ac_status" >&5
3129 (exit "$ac_status"); };
Steve Kondikae271bc2015-11-15 02:50:53 +01003130then
3131 eval cf_cv_prog_CC_c_o=yes
3132else
3133 eval cf_cv_prog_CC_c_o=no
3134fi
micky3879b9f5e72025-07-08 18:04:53 -04003135rm -rf ./conftest*
Steve Kondikae271bc2015-11-15 02:50:53 +01003136
3137fi
micky3879b9f5e72025-07-08 18:04:53 -04003138if test "$cf_cv_prog_CC_c_o" = yes; then
3139 echo "$as_me:3139: result: yes" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003140echo "${ECHO_T}yes" >&6
3141else
micky3879b9f5e72025-07-08 18:04:53 -04003142 echo "$as_me:3142: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003143echo "${ECHO_T}no" >&6
3144fi
3145
3146if test "$cross_compiling" = yes ; then
3147 LDCONFIG=:
3148else
3149 case "$cf_cv_system_name" in
3150 (dragonfly*|mirbsd*|freebsd*)
3151 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3152 ;;
3153 (*) LDPATH=$PATH:/sbin:/usr/sbin
3154 # Extract the first word of "ldconfig", so it can be a program name with args.
3155set dummy ldconfig; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04003156echo "$as_me:3156: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158if test "${ac_cv_path_LDCONFIG+set}" = set; then
3159 echo $ECHO_N "(cached) $ECHO_C" >&6
3160else
3161 case $LDCONFIG in
3162 [\\/]* | ?:[\\/]*)
3163 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3164 ;;
3165 *)
3166 ac_save_IFS=$IFS; IFS=$ac_path_separator
3167ac_dummy="$LDPATH"
3168for ac_dir in $ac_dummy; do
3169 IFS=$ac_save_IFS
3170 test -z "$ac_dir" && ac_dir=.
3171 if $as_executable_p "$ac_dir/$ac_word"; then
3172 ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
micky3879b9f5e72025-07-08 18:04:53 -04003173 echo "$as_me:3173: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003174 break
3175fi
3176done
3177
3178 ;;
3179esac
3180fi
3181LDCONFIG=$ac_cv_path_LDCONFIG
3182
3183if test -n "$LDCONFIG"; then
micky3879b9f5e72025-07-08 18:04:53 -04003184 echo "$as_me:3184: result: $LDCONFIG" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003185echo "${ECHO_T}$LDCONFIG" >&6
3186else
micky3879b9f5e72025-07-08 18:04:53 -04003187 echo "$as_me:3187: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003188echo "${ECHO_T}no" >&6
3189fi
3190
3191 ;;
3192 esac
3193fi
3194
micky3879b9f5e72025-07-08 18:04:53 -04003195echo "$as_me:3195: checking if you want to ensure bool is consistent with C++" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003196echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3197
3198# Check whether --with-cxx or --without-cxx was given.
3199if test "${with_cxx+set}" = set; then
3200 withval="$with_cxx"
3201 cf_with_cxx=$withval
3202else
3203 cf_with_cxx=yes
3204fi;
micky3879b9f5e72025-07-08 18:04:53 -04003205echo "$as_me:3205: result: $cf_with_cxx" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003206echo "${ECHO_T}$cf_with_cxx" >&6
3207if test "X$cf_with_cxx" = Xno ; then
3208 CXX=""
3209 GXX=""
3210else
3211 # with autoconf 2.13, we can change the error to a warning:
3212 ac_ext=cc
3213ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04003214ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3215ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +01003216ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04003217ac_main_return="return"
Steve Kondikae271bc2015-11-15 02:50:53 +01003218if test -n "$ac_tool_prefix"; then
3219 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3220 do
3221 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3222set dummy $ac_tool_prefix$ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04003223echo "$as_me:3223: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003224echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225if test "${ac_cv_prog_CXX+set}" = set; then
3226 echo $ECHO_N "(cached) $ECHO_C" >&6
3227else
3228 if test -n "$CXX"; then
3229 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3230else
3231 ac_save_IFS=$IFS; IFS=$ac_path_separator
3232ac_dummy="$PATH"
3233for ac_dir in $ac_dummy; do
3234 IFS=$ac_save_IFS
3235 test -z "$ac_dir" && ac_dir=.
3236 $as_executable_p "$ac_dir/$ac_word" || continue
3237ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04003238echo "$as_me:3238: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003239break
3240done
3241
3242fi
3243fi
3244CXX=$ac_cv_prog_CXX
3245if test -n "$CXX"; then
micky3879b9f5e72025-07-08 18:04:53 -04003246 echo "$as_me:3246: result: $CXX" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003247echo "${ECHO_T}$CXX" >&6
3248else
micky3879b9f5e72025-07-08 18:04:53 -04003249 echo "$as_me:3249: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003250echo "${ECHO_T}no" >&6
3251fi
3252
3253 test -n "$CXX" && break
3254 done
3255fi
3256if test -z "$CXX"; then
3257 ac_ct_CXX=$CXX
3258 for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3259do
3260 # Extract the first word of "$ac_prog", so it can be a program name with args.
3261set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04003262echo "$as_me:3262: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003263echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3264if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3265 echo $ECHO_N "(cached) $ECHO_C" >&6
3266else
3267 if test -n "$ac_ct_CXX"; then
3268 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3269else
3270 ac_save_IFS=$IFS; IFS=$ac_path_separator
3271ac_dummy="$PATH"
3272for ac_dir in $ac_dummy; do
3273 IFS=$ac_save_IFS
3274 test -z "$ac_dir" && ac_dir=.
3275 $as_executable_p "$ac_dir/$ac_word" || continue
3276ac_cv_prog_ac_ct_CXX="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04003277echo "$as_me:3277: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003278break
3279done
3280
3281fi
3282fi
3283ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3284if test -n "$ac_ct_CXX"; then
micky3879b9f5e72025-07-08 18:04:53 -04003285 echo "$as_me:3285: result: $ac_ct_CXX" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003286echo "${ECHO_T}$ac_ct_CXX" >&6
3287else
micky3879b9f5e72025-07-08 18:04:53 -04003288 echo "$as_me:3288: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003289echo "${ECHO_T}no" >&6
3290fi
3291
3292 test -n "$ac_ct_CXX" && break
3293done
3294test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3295
3296 CXX=$ac_ct_CXX
3297fi
3298
3299# Provide some information about the compiler.
micky3879b9f5e72025-07-08 18:04:53 -04003300echo "$as_me:3300:" \
Steve Kondikae271bc2015-11-15 02:50:53 +01003301 "checking for C++ compiler version" >&5
3302ac_compiler=`set X $ac_compile; echo $2`
micky3879b9f5e72025-07-08 18:04:53 -04003303{ (eval echo "$as_me:3303: \"$ac_compiler --version </dev/null >&5\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003304 (eval $ac_compiler --version </dev/null >&5) 2>&5
3305 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003306 echo "$as_me:3306: \$? = $ac_status" >&5
3307 (exit "$ac_status"); }
3308{ (eval echo "$as_me:3308: \"$ac_compiler -v </dev/null >&5\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003309 (eval $ac_compiler -v </dev/null >&5) 2>&5
3310 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003311 echo "$as_me:3311: \$? = $ac_status" >&5
3312 (exit "$ac_status"); }
3313{ (eval echo "$as_me:3313: \"$ac_compiler -V </dev/null >&5\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003314 (eval $ac_compiler -V </dev/null >&5) 2>&5
3315 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003316 echo "$as_me:3316: \$? = $ac_status" >&5
3317 (exit "$ac_status"); }
Steve Kondikae271bc2015-11-15 02:50:53 +01003318
micky3879b9f5e72025-07-08 18:04:53 -04003319echo "$as_me:3319: checking whether we are using the GNU C++ compiler" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003320echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3321if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3322 echo $ECHO_N "(cached) $ECHO_C" >&6
3323else
micky3879b9f5e72025-07-08 18:04:53 -04003324 cat >"conftest.$ac_ext" <<_ACEOF
3325#line 3325 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003326#include "confdefs.h"
3327
3328int
micky3879b9f5e72025-07-08 18:04:53 -04003329main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01003330{
3331#ifndef __GNUC__
3332 choke me
3333#endif
3334
3335 ;
3336 return 0;
3337}
3338_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04003339rm -f "conftest.$ac_objext"
3340if { (eval echo "$as_me:3340: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003341 (eval $ac_compile) 2>&5
3342 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003343 echo "$as_me:3343: \$? = $ac_status" >&5
3344 (exit "$ac_status"); } &&
3345 { ac_try='test -s "conftest.$ac_objext"'
3346 { (eval echo "$as_me:3346: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003347 (eval $ac_try) 2>&5
3348 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003349 echo "$as_me:3349: \$? = $ac_status" >&5
3350 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003351 ac_compiler_gnu=yes
3352else
3353 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04003354cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003355ac_compiler_gnu=no
3356fi
micky3879b9f5e72025-07-08 18:04:53 -04003357rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01003358ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3359
3360fi
micky3879b9f5e72025-07-08 18:04:53 -04003361echo "$as_me:3361: result: $ac_cv_cxx_compiler_gnu" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003362echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3363GXX=`test $ac_compiler_gnu = yes && echo yes`
3364ac_test_CXXFLAGS=${CXXFLAGS+set}
3365ac_save_CXXFLAGS=$CXXFLAGS
3366CXXFLAGS="-g"
micky3879b9f5e72025-07-08 18:04:53 -04003367echo "$as_me:3367: checking whether $CXX accepts -g" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003368echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3369if test "${ac_cv_prog_cxx_g+set}" = set; then
3370 echo $ECHO_N "(cached) $ECHO_C" >&6
3371else
micky3879b9f5e72025-07-08 18:04:53 -04003372 cat >"conftest.$ac_ext" <<_ACEOF
3373#line 3373 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003374#include "confdefs.h"
3375
3376int
micky3879b9f5e72025-07-08 18:04:53 -04003377main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01003378{
3379
3380 ;
3381 return 0;
3382}
3383_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04003384rm -f "conftest.$ac_objext"
3385if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003386 (eval $ac_compile) 2>&5
3387 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003388 echo "$as_me:3388: \$? = $ac_status" >&5
3389 (exit "$ac_status"); } &&
3390 { ac_try='test -s "conftest.$ac_objext"'
3391 { (eval echo "$as_me:3391: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003392 (eval $ac_try) 2>&5
3393 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003394 echo "$as_me:3394: \$? = $ac_status" >&5
3395 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003396 ac_cv_prog_cxx_g=yes
3397else
3398 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04003399cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003400ac_cv_prog_cxx_g=no
3401fi
micky3879b9f5e72025-07-08 18:04:53 -04003402rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01003403fi
micky3879b9f5e72025-07-08 18:04:53 -04003404echo "$as_me:3404: result: $ac_cv_prog_cxx_g" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003405echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3406if test "$ac_test_CXXFLAGS" = set; then
3407 CXXFLAGS=$ac_save_CXXFLAGS
3408elif test $ac_cv_prog_cxx_g = yes; then
3409 if test "$GXX" = yes; then
3410 CXXFLAGS="-g -O2"
3411 else
3412 CXXFLAGS="-g"
3413 fi
3414else
3415 if test "$GXX" = yes; then
3416 CXXFLAGS="-O2"
3417 else
3418 CXXFLAGS=
3419 fi
3420fi
3421for ac_declaration in \
3422 ''\
3423 '#include <stdlib.h>' \
3424 'extern "C" void std::exit (int) throw (); using std::exit;' \
3425 'extern "C" void std::exit (int); using std::exit;' \
3426 'extern "C" void exit (int) throw ();' \
3427 'extern "C" void exit (int);' \
3428 'void exit (int);'
3429do
micky3879b9f5e72025-07-08 18:04:53 -04003430 cat >"conftest.$ac_ext" <<_ACEOF
3431#line 3431 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003432#include "confdefs.h"
3433#include <stdlib.h>
3434$ac_declaration
3435int
micky3879b9f5e72025-07-08 18:04:53 -04003436main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01003437{
3438exit (42);
3439 ;
3440 return 0;
3441}
3442_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04003443rm -f "conftest.$ac_objext"
3444if { (eval echo "$as_me:3444: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003445 (eval $ac_compile) 2>&5
3446 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003447 echo "$as_me:3447: \$? = $ac_status" >&5
3448 (exit "$ac_status"); } &&
3449 { ac_try='test -s "conftest.$ac_objext"'
3450 { (eval echo "$as_me:3450: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003451 (eval $ac_try) 2>&5
3452 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003453 echo "$as_me:3453: \$? = $ac_status" >&5
3454 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003455 :
3456else
3457 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04003458cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003459continue
3460fi
micky3879b9f5e72025-07-08 18:04:53 -04003461rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3462 cat >"conftest.$ac_ext" <<_ACEOF
3463#line 3463 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003464#include "confdefs.h"
3465$ac_declaration
3466int
micky3879b9f5e72025-07-08 18:04:53 -04003467main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01003468{
3469exit (42);
3470 ;
3471 return 0;
3472}
3473_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04003474rm -f "conftest.$ac_objext"
3475if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003476 (eval $ac_compile) 2>&5
3477 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003478 echo "$as_me:3478: \$? = $ac_status" >&5
3479 (exit "$ac_status"); } &&
3480 { ac_try='test -s "conftest.$ac_objext"'
3481 { (eval echo "$as_me:3481: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003482 (eval $ac_try) 2>&5
3483 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003484 echo "$as_me:3484: \$? = $ac_status" >&5
3485 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003486 break
3487else
3488 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04003489cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003490fi
micky3879b9f5e72025-07-08 18:04:53 -04003491rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01003492done
3493rm -rf conftest*
3494if test -n "$ac_declaration"; then
3495 echo '#ifdef __cplusplus' >>confdefs.h
micky3879b9f5e72025-07-08 18:04:53 -04003496 echo "$ac_declaration" >>confdefs.h
Steve Kondikae271bc2015-11-15 02:50:53 +01003497 echo '#endif' >>confdefs.h
3498fi
3499
3500ac_ext=c
3501ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04003502ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3503ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +01003504ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04003505ac_main_return="return"
Steve Kondikae271bc2015-11-15 02:50:53 +01003506
3507 ac_ext=cc
3508ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04003509ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3510ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +01003511ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04003512ac_main_return="return"
Steve Kondikae271bc2015-11-15 02:50:53 +01003513
3514 if test "x$cf_with_cxx" != xno
3515 then
3516 # Several of the C++ configurations do not work, particularly when
3517 # cross-compiling (20140913 -TD)
micky3879b9f5e72025-07-08 18:04:53 -04003518 echo "$as_me:3518: checking if $CXX works" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003519echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3520
3521 save_CPPFLAGS="$CPPFLAGS"
3522 eval cf_includedir=${includedir}
3523 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3524
micky3879b9f5e72025-07-08 18:04:53 -04003525cat >"conftest.$ac_ext" <<_ACEOF
3526#line 3526 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01003527#include "confdefs.h"
3528
3529#include <stdlib.h>
3530#include <stdio.h>
3531
3532int
micky3879b9f5e72025-07-08 18:04:53 -04003533main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01003534{
3535
3536 printf("Hello world!\n")
3537
3538 ;
3539 return 0;
3540}
3541_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04003542rm -f "conftest.$ac_objext"
3543if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003544 (eval $ac_compile) 2>&5
3545 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003546 echo "$as_me:3546: \$? = $ac_status" >&5
3547 (exit "$ac_status"); } &&
3548 { ac_try='test -s "conftest.$ac_objext"'
3549 { (eval echo "$as_me:3549: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003550 (eval $ac_try) 2>&5
3551 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04003552 echo "$as_me:3552: \$? = $ac_status" >&5
3553 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003554 cf_cxx_works=yes
3555else
3556 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04003557cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003558cf_cxx_works=no
3559fi
micky3879b9f5e72025-07-08 18:04:53 -04003560rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01003561 CPPFLAGS="$save_CPPFLAGS"
3562
micky3879b9f5e72025-07-08 18:04:53 -04003563 echo "$as_me:3563: result: $cf_cxx_works" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003564echo "${ECHO_T}$cf_cxx_works" >&6
3565 if test "x$cf_cxx_works" = xno
3566 then
micky3879b9f5e72025-07-08 18:04:53 -04003567 { echo "$as_me:3567: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003568echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3569 cf_with_cxx=no; CXX=""; GXX="";
3570 fi
3571 fi
3572 ac_ext=c
3573ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -04003574ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3575ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +01003576ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -04003577ac_main_return="return"
Steve Kondikae271bc2015-11-15 02:50:53 +01003578
3579 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3580 if test "$CXX" = "g++" ; then
3581 # Extract the first word of "g++", so it can be a program name with args.
3582set dummy g++; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04003583echo "$as_me:3583: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003584echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3585if test "${ac_cv_path_CXX+set}" = set; then
3586 echo $ECHO_N "(cached) $ECHO_C" >&6
3587else
3588 case $CXX in
3589 [\\/]* | ?:[\\/]*)
3590 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3591 ;;
3592 *)
3593 ac_save_IFS=$IFS; IFS=$ac_path_separator
3594ac_dummy="$PATH"
3595for ac_dir in $ac_dummy; do
3596 IFS=$ac_save_IFS
3597 test -z "$ac_dir" && ac_dir=.
3598 if $as_executable_p "$ac_dir/$ac_word"; then
3599 ac_cv_path_CXX="$ac_dir/$ac_word"
micky3879b9f5e72025-07-08 18:04:53 -04003600 echo "$as_me:3600: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003601 break
3602fi
3603done
3604
3605 ;;
3606esac
3607fi
3608CXX=$ac_cv_path_CXX
3609
3610if test -n "$CXX"; then
micky3879b9f5e72025-07-08 18:04:53 -04003611 echo "$as_me:3611: result: $CXX" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003612echo "${ECHO_T}$CXX" >&6
3613else
micky3879b9f5e72025-07-08 18:04:53 -04003614 echo "$as_me:3614: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003615echo "${ECHO_T}no" >&6
3616fi
3617
3618 fi
3619 case "x$CXX" in
3620 (x|xg++)
micky3879b9f5e72025-07-08 18:04:53 -04003621 { echo "$as_me:3621: WARNING: You don't have any C++ compiler, too bad" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003622echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3623 cf_with_cxx=no; CXX=""; GXX="";
3624 ;;
3625 esac
3626fi
3627
3628GXX_VERSION=none
3629if test "$GXX" = yes; then
micky3879b9f5e72025-07-08 18:04:53 -04003630 echo "$as_me:3630: checking version of ${CXX:-g++}" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003631echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04003632 GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3633 if test -z "$GXX_VERSION"
3634 then
3635 GXX_VERSION=unknown
3636 GXX=no
3637 fi
3638 echo "$as_me:3638: result: $GXX_VERSION" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003639echo "${ECHO_T}$GXX_VERSION" >&6
3640fi
3641
micky3879b9f5e72025-07-08 18:04:53 -04003642case "$GXX_VERSION" in
3643([1-9][0-9].*)
3644 ;;
3645(1.*|2.[0-6]*)
3646 { echo "$as_me:3646: WARNING: templates do not work" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003647echo "$as_me: WARNING: templates do not work" >&2;}
3648 ;;
3649esac
3650
micky3879b9f5e72025-07-08 18:04:53 -04003651echo "$as_me:3651: checking if you want to build C++ binding and demo" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003652echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3653
3654# Check whether --with-cxx-binding or --without-cxx-binding was given.
3655if test "${with_cxx_binding+set}" = set; then
3656 withval="$with_cxx_binding"
3657 cf_with_cxx_binding=$withval
3658else
3659 cf_with_cxx_binding=$cf_with_cxx
3660fi;
micky3879b9f5e72025-07-08 18:04:53 -04003661echo "$as_me:3661: result: $cf_with_cxx_binding" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003662echo "${ECHO_T}$cf_with_cxx_binding" >&6
3663
micky3879b9f5e72025-07-08 18:04:53 -04003664echo "$as_me:3664: checking if you want to build with Ada" >&5
3665echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3666echo "$as_me:3666: result: $cf_with_ada" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003667echo "${ECHO_T}$cf_with_ada" >&6
3668
micky3879b9f5e72025-07-08 18:04:53 -04003669echo "$as_me:3669: checking if you want to install terminal database" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003670echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3671
3672# Check whether --enable-db-install or --disable-db-install was given.
3673if test "${enable_db_install+set}" = set; then
3674 enableval="$enable_db_install"
3675 cf_with_db_install=$enableval
3676else
3677 cf_with_db_install=yes
3678fi;
micky3879b9f5e72025-07-08 18:04:53 -04003679echo "$as_me:3679: result: $cf_with_db_install" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003680echo "${ECHO_T}$cf_with_db_install" >&6
3681
micky3879b9f5e72025-07-08 18:04:53 -04003682echo "$as_me:3682: checking if you want to install manpages" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003683echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3684
3685# Check whether --with-manpages or --without-manpages was given.
3686if test "${with_manpages+set}" = set; then
3687 withval="$with_manpages"
3688 cf_with_manpages=$withval
3689else
3690 cf_with_manpages=yes
3691fi;
micky3879b9f5e72025-07-08 18:04:53 -04003692echo "$as_me:3692: result: $cf_with_manpages" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003693echo "${ECHO_T}$cf_with_manpages" >&6
3694
micky3879b9f5e72025-07-08 18:04:53 -04003695echo "$as_me:3695: checking if you want to build programs such as tic" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003696echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3697
3698# Check whether --with-progs or --without-progs was given.
3699if test "${with_progs+set}" = set; then
3700 withval="$with_progs"
3701 cf_with_progs=$withval
3702else
3703 cf_with_progs=yes
3704fi;
micky3879b9f5e72025-07-08 18:04:53 -04003705echo "$as_me:3705: result: $cf_with_progs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003706echo "${ECHO_T}$cf_with_progs" >&6
3707
micky3879b9f5e72025-07-08 18:04:53 -04003708echo "$as_me:3708: checking if you want to build test-programs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003709echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3710
3711# Check whether --with-tests or --without-tests was given.
3712if test "${with_tests+set}" = set; then
3713 withval="$with_tests"
3714 cf_with_tests=$withval
3715else
3716 cf_with_tests=yes
3717fi;
micky3879b9f5e72025-07-08 18:04:53 -04003718echo "$as_me:3718: result: $cf_with_tests" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003719echo "${ECHO_T}$cf_with_tests" >&6
3720
micky3879b9f5e72025-07-08 18:04:53 -04003721echo "$as_me:3721: checking if you wish to install curses.h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003722echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3723
3724# Check whether --with-curses-h or --without-curses-h was given.
3725if test "${with_curses_h+set}" = set; then
3726 withval="$with_curses_h"
3727 with_curses_h=$withval
3728else
3729 with_curses_h=yes
3730fi;
micky3879b9f5e72025-07-08 18:04:53 -04003731echo "$as_me:3731: result: $with_curses_h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003732echo "${ECHO_T}$with_curses_h" >&6
3733
3734modules_to_build="ncurses"
micky3879b9f5e72025-07-08 18:04:53 -04003735test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
Steve Kondikae271bc2015-11-15 02:50:53 +01003736modules_to_build="$modules_to_build panel menu form"
3737
3738test "$program_prefix" != NONE &&
3739 program_transform_name="s,^,$program_prefix,;$program_transform_name"
3740# Use a double $ so make ignores it.
3741test "$program_suffix" != NONE &&
3742 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3743# Double any \ or $. echo might interpret backslashes.
3744# By default was `s,x,x', remove it if useless.
3745cat <<\_ACEOF >conftest.sed
3746s/[\\$]/&&/g;s/;s,x,x,$//
3747_ACEOF
3748program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3749rm conftest.sed
3750
3751for ac_prog in mawk gawk nawk awk
3752do
3753 # Extract the first word of "$ac_prog", so it can be a program name with args.
3754set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04003755echo "$as_me:3755: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003756echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757if test "${ac_cv_prog_AWK+set}" = set; then
3758 echo $ECHO_N "(cached) $ECHO_C" >&6
3759else
3760 if test -n "$AWK"; then
3761 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3762else
3763 ac_save_IFS=$IFS; IFS=$ac_path_separator
3764ac_dummy="$PATH"
3765for ac_dir in $ac_dummy; do
3766 IFS=$ac_save_IFS
3767 test -z "$ac_dir" && ac_dir=.
3768 $as_executable_p "$ac_dir/$ac_word" || continue
3769ac_cv_prog_AWK="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04003770echo "$as_me:3770: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003771break
3772done
3773
3774fi
3775fi
3776AWK=$ac_cv_prog_AWK
3777if test -n "$AWK"; then
micky3879b9f5e72025-07-08 18:04:53 -04003778 echo "$as_me:3778: result: $AWK" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003779echo "${ECHO_T}$AWK" >&6
3780else
micky3879b9f5e72025-07-08 18:04:53 -04003781 echo "$as_me:3781: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003782echo "${ECHO_T}no" >&6
3783fi
3784
3785 test -n "$AWK" && break
3786done
3787
micky3879b9f5e72025-07-08 18:04:53 -04003788test -z "$AWK" && { { echo "$as_me:3788: error: No awk program found" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003789echo "$as_me: error: No awk program found" >&2;}
3790 { (exit 1); exit 1; }; }
3791
Steve Kondikae271bc2015-11-15 02:50:53 +01003792# Find a good install program. We prefer a C program (faster),
3793# so one script is as good as another. But avoid the broken or
3794# incompatible versions:
3795# SysV /etc/install, /usr/sbin/install
3796# SunOS /usr/etc/install
3797# IRIX /sbin/install
3798# AIX /bin/install
3799# AmigaOS /C/install, which installs bootblocks on floppy discs
3800# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3801# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3802# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3803# ./install, which can be erroneously created by make from ./install.sh.
micky3879b9f5e72025-07-08 18:04:53 -04003804echo "$as_me:3804: checking for a BSD compatible install" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003805echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3806if test -z "$INSTALL"; then
3807if test "${ac_cv_path_install+set}" = set; then
3808 echo $ECHO_N "(cached) $ECHO_C" >&6
3809else
3810 ac_save_IFS=$IFS; IFS=$ac_path_separator
3811 for ac_dir in $PATH; do
3812 IFS=$ac_save_IFS
3813 # Account for people who put trailing slashes in PATH elements.
3814 case $ac_dir/ in
3815 / | ./ | .// | /cC/* \
3816 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3817 | /usr/ucb/* ) ;;
3818 *)
3819 # OSF1 and SCO ODT 3.0 have their own names for install.
3820 # Don't use installbsd from OSF since it installs stuff as root
3821 # by default.
3822 for ac_prog in ginstall scoinst install; do
3823 if $as_executable_p "$ac_dir/$ac_prog"; then
3824 if test $ac_prog = install &&
3825 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3826 # AIX install. It has an incompatible calling convention.
3827 :
3828 elif test $ac_prog = install &&
3829 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3830 # program-specific install script used by HP pwplus--don't use.
3831 :
3832 else
3833 ac_cv_path_install="$ac_dir/$ac_prog -c"
3834 break 2
3835 fi
3836 fi
3837 done
3838 ;;
3839 esac
3840 done
3841
3842fi
3843 if test "${ac_cv_path_install+set}" = set; then
3844 INSTALL=$ac_cv_path_install
3845 else
3846 # As a last resort, use the slow shell script. We don't cache a
3847 # path for INSTALL within a source directory, because that will
3848 # break other packages using the cache if that directory is
3849 # removed, or if the path is relative.
3850 INSTALL=$ac_install_sh
3851 fi
3852fi
micky3879b9f5e72025-07-08 18:04:53 -04003853echo "$as_me:3853: result: $INSTALL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003854echo "${ECHO_T}$INSTALL" >&6
3855
3856# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3857# It thinks the first close brace ends the variable substitution.
3858test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3859
3860test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3861
3862test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3863
3864case $INSTALL in
3865(/*)
3866 ;;
3867(*)
micky3879b9f5e72025-07-08 18:04:53 -04003868 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
Steve Kondikae271bc2015-11-15 02:50:53 +01003869 test -z "$cf_dir" && cf_dir=.
micky3879b9f5e72025-07-08 18:04:53 -04003870 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
Steve Kondikae271bc2015-11-15 02:50:53 +01003871 ;;
3872esac
3873
micky3879b9f5e72025-07-08 18:04:53 -04003874for ac_prog in lint cppcheck splint
Steve Kondikae271bc2015-11-15 02:50:53 +01003875do
3876 # Extract the first word of "$ac_prog", so it can be a program name with args.
3877set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04003878echo "$as_me:3878: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3880if test "${ac_cv_prog_LINT+set}" = set; then
3881 echo $ECHO_N "(cached) $ECHO_C" >&6
3882else
3883 if test -n "$LINT"; then
3884 ac_cv_prog_LINT="$LINT" # Let the user override the test.
3885else
3886 ac_save_IFS=$IFS; IFS=$ac_path_separator
3887ac_dummy="$PATH"
3888for ac_dir in $ac_dummy; do
3889 IFS=$ac_save_IFS
3890 test -z "$ac_dir" && ac_dir=.
3891 $as_executable_p "$ac_dir/$ac_word" || continue
3892ac_cv_prog_LINT="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04003893echo "$as_me:3893: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003894break
3895done
3896
3897fi
3898fi
3899LINT=$ac_cv_prog_LINT
3900if test -n "$LINT"; then
micky3879b9f5e72025-07-08 18:04:53 -04003901 echo "$as_me:3901: result: $LINT" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003902echo "${ECHO_T}$LINT" >&6
3903else
micky3879b9f5e72025-07-08 18:04:53 -04003904 echo "$as_me:3904: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003905echo "${ECHO_T}no" >&6
3906fi
3907
3908 test -n "$LINT" && break
3909done
3910
micky3879b9f5e72025-07-08 18:04:53 -04003911case "x$LINT" in
3912(xcppcheck|x*/cppcheck)
3913 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3914 ;;
3915esac
3916
3917echo "$as_me:3917: checking whether ln -s works" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003918echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3919LN_S=$as_ln_s
3920if test "$LN_S" = "ln -s"; then
micky3879b9f5e72025-07-08 18:04:53 -04003921 echo "$as_me:3921: result: yes" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003922echo "${ECHO_T}yes" >&6
3923else
micky3879b9f5e72025-07-08 18:04:53 -04003924 echo "$as_me:3924: result: no, using $LN_S" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003925echo "${ECHO_T}no, using $LN_S" >&6
3926fi
3927
micky3879b9f5e72025-07-08 18:04:53 -04003928echo "$as_me:3928: checking if $LN_S -f options work" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003929echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3930
3931rm -f conf$$.src conf$$dst
3932echo >conf$$.dst
3933echo first >conf$$.src
3934if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3935 cf_prog_ln_sf=yes
3936else
3937 cf_prog_ln_sf=no
3938fi
3939rm -f conf$$.dst conf$$src
micky3879b9f5e72025-07-08 18:04:53 -04003940echo "$as_me:3940: result: $cf_prog_ln_sf" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003941echo "${ECHO_T}$cf_prog_ln_sf" >&6
3942
3943test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3944
micky3879b9f5e72025-07-08 18:04:53 -04003945echo "$as_me:3945: checking for long file names" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003946echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3947if test "${ac_cv_sys_long_file_names+set}" = set; then
3948 echo $ECHO_N "(cached) $ECHO_C" >&6
3949else
3950 ac_cv_sys_long_file_names=yes
3951# Test for long file names in all the places we know might matter:
3952# . the current directory, where building will happen
3953# $prefix/lib where we will be installing things
3954# $exec_prefix/lib likewise
3955# eval it to expand exec_prefix.
3956# $TMPDIR if set, where it might want to write temporary files
3957# if $TMPDIR is not set:
3958# /tmp where it might want to write temporary files
3959# /var/tmp likewise
3960# /usr/tmp likewise
3961if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3962 ac_tmpdirs=$TMPDIR
3963else
3964 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3965fi
micky3879b9f5e72025-07-08 18:04:53 -04003966for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3967 test -d "$ac_dir" || continue
3968 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
Steve Kondikae271bc2015-11-15 02:50:53 +01003969 ac_xdir=$ac_dir/cf$$
micky3879b9f5e72025-07-08 18:04:53 -04003970 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
Steve Kondikae271bc2015-11-15 02:50:53 +01003971 ac_tf1=$ac_xdir/conftest9012345
3972 ac_tf2=$ac_xdir/conftest9012346
micky3879b9f5e72025-07-08 18:04:53 -04003973 (echo 1 >"$ac_tf1") 2>/dev/null
3974 (echo 2 >"$ac_tf2") 2>/dev/null
3975 ac_val=`cat "$ac_tf1" 2>/dev/null`
3976 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003977 ac_cv_sys_long_file_names=no
micky3879b9f5e72025-07-08 18:04:53 -04003978 rm -rf "$ac_xdir" 2>/dev/null
Steve Kondikae271bc2015-11-15 02:50:53 +01003979 break
3980 fi
micky3879b9f5e72025-07-08 18:04:53 -04003981 rm -rf "$ac_xdir" 2>/dev/null
Steve Kondikae271bc2015-11-15 02:50:53 +01003982done
3983fi
micky3879b9f5e72025-07-08 18:04:53 -04003984echo "$as_me:3984: result: $ac_cv_sys_long_file_names" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01003985echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
micky3879b9f5e72025-07-08 18:04:53 -04003986if test "$ac_cv_sys_long_file_names" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +01003987
3988cat >>confdefs.h <<\EOF
3989#define HAVE_LONG_FILE_NAMES 1
3990EOF
3991
3992fi
3993
micky3879b9f5e72025-07-08 18:04:53 -04003994# Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3995# of package conflict.
3996cf_config_suffix=
Steve Kondikae271bc2015-11-15 02:50:53 +01003997
micky3879b9f5e72025-07-08 18:04:53 -04003998# Check whether --with-config-suffix or --without-config-suffix was given.
3999if test "${with_config_suffix+set}" = set; then
4000 withval="$with_config_suffix"
4001 case "x$withval" in
4002 (xyes|xno)
4003 { echo "$as_me:4003: WARNING: expected a value for config-suffix option" >&5
4004echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4005 ;;
4006 (*) cf_config_suffix="$withval"
4007 ;;
4008 esac
4009fi;
4010
4011# If we find pkg-config, check if we should install the ".pc" files.
4012
4013echo "$as_me:4013: checking if you want to use pkg-config" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004014echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4015
4016# Check whether --with-pkg-config or --without-pkg-config was given.
4017if test "${with_pkg_config+set}" = set; then
4018 withval="$with_pkg_config"
4019 cf_pkg_config=$withval
4020else
4021 cf_pkg_config=yes
4022fi;
micky3879b9f5e72025-07-08 18:04:53 -04004023echo "$as_me:4023: result: $cf_pkg_config" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004024echo "${ECHO_T}$cf_pkg_config" >&6
4025
micky3879b9f5e72025-07-08 18:04:53 -04004026case "$cf_pkg_config" in
Steve Kondikae271bc2015-11-15 02:50:53 +01004027(no)
4028 PKG_CONFIG=none
4029 ;;
4030(yes)
4031
4032if test -n "$ac_tool_prefix"; then
4033 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4034set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004035echo "$as_me:4035: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004036echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4038 echo $ECHO_N "(cached) $ECHO_C" >&6
4039else
4040 case $PKG_CONFIG in
4041 [\\/]* | ?:[\\/]*)
4042 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4043 ;;
4044 *)
4045 ac_save_IFS=$IFS; IFS=$ac_path_separator
4046ac_dummy="$PATH"
4047for ac_dir in $ac_dummy; do
4048 IFS=$ac_save_IFS
4049 test -z "$ac_dir" && ac_dir=.
4050 if $as_executable_p "$ac_dir/$ac_word"; then
4051 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
micky3879b9f5e72025-07-08 18:04:53 -04004052 echo "$as_me:4052: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004053 break
4054fi
4055done
4056
4057 ;;
4058esac
4059fi
4060PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4061
4062if test -n "$PKG_CONFIG"; then
micky3879b9f5e72025-07-08 18:04:53 -04004063 echo "$as_me:4063: result: $PKG_CONFIG" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004064echo "${ECHO_T}$PKG_CONFIG" >&6
4065else
micky3879b9f5e72025-07-08 18:04:53 -04004066 echo "$as_me:4066: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004067echo "${ECHO_T}no" >&6
4068fi
4069
4070fi
4071if test -z "$ac_cv_path_PKG_CONFIG"; then
4072 ac_pt_PKG_CONFIG=$PKG_CONFIG
4073 # Extract the first word of "pkg-config", so it can be a program name with args.
4074set dummy pkg-config; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004075echo "$as_me:4075: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004076echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4077if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4078 echo $ECHO_N "(cached) $ECHO_C" >&6
4079else
4080 case $ac_pt_PKG_CONFIG in
4081 [\\/]* | ?:[\\/]*)
4082 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4083 ;;
4084 *)
4085 ac_save_IFS=$IFS; IFS=$ac_path_separator
4086ac_dummy="$PATH"
4087for ac_dir in $ac_dummy; do
4088 IFS=$ac_save_IFS
4089 test -z "$ac_dir" && ac_dir=.
4090 if $as_executable_p "$ac_dir/$ac_word"; then
4091 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
micky3879b9f5e72025-07-08 18:04:53 -04004092 echo "$as_me:4092: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004093 break
4094fi
4095done
4096
4097 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4098 ;;
4099esac
4100fi
4101ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4102
4103if test -n "$ac_pt_PKG_CONFIG"; then
micky3879b9f5e72025-07-08 18:04:53 -04004104 echo "$as_me:4104: result: $ac_pt_PKG_CONFIG" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004105echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4106else
micky3879b9f5e72025-07-08 18:04:53 -04004107 echo "$as_me:4107: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004108echo "${ECHO_T}no" >&6
4109fi
4110
4111 PKG_CONFIG=$ac_pt_PKG_CONFIG
4112else
4113 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4114fi
4115
4116 ;;
4117(*)
4118 PKG_CONFIG=$withval
4119 ;;
4120esac
4121
4122test -z "$PKG_CONFIG" && PKG_CONFIG=none
4123if test "$PKG_CONFIG" != none ; then
4124
4125if test "x$prefix" != xNONE; then
4126 cf_path_syntax="$prefix"
4127else
4128 cf_path_syntax="$ac_default_prefix"
4129fi
4130
4131case ".$PKG_CONFIG" in
4132(.\$\(*\)*|.\'*\'*)
4133 ;;
4134(..|./*|.\\*)
4135 ;;
4136(.[a-zA-Z]:[\\/]*) # OS/2 EMX
4137 ;;
micky3879b9f5e72025-07-08 18:04:53 -04004138(.\$\{*prefix\}*|.\$\{*dir\}*)
Steve Kondikae271bc2015-11-15 02:50:53 +01004139 eval PKG_CONFIG="$PKG_CONFIG"
4140 case ".$PKG_CONFIG" in
4141 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04004142 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01004143 ;;
4144 esac
4145 ;;
4146(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04004147 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01004148 ;;
4149(*)
micky3879b9f5e72025-07-08 18:04:53 -04004150 { { echo "$as_me:4150: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004151echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4152 { (exit 1); exit 1; }; }
4153 ;;
4154esac
4155
4156elif test "x$cf_pkg_config" != xno ; then
micky3879b9f5e72025-07-08 18:04:53 -04004157 { echo "$as_me:4157: WARNING: pkg-config is not installed" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004158echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4159fi
4160
micky3879b9f5e72025-07-08 18:04:53 -04004161case "$PKG_CONFIG" in
4162(no|none|yes)
4163 echo "$as_me:4163: checking for pkg-config library directory" >&5
4164echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4165 ;;
4166(*)
4167 echo "$as_me:4167: checking for $PKG_CONFIG library directory" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004168echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04004169 ;;
4170esac
4171
4172# if $PKG_CONFIG_LIBDIR is set, try to use that
4173if test -n "$PKG_CONFIG_PATH"; then
4174 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
4175elif test -n "$PKG_CONFIG_LIBDIR"; then
4176 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
4177else
4178 cf_search_path=auto
4179fi
4180
4181# if the option is used, let that override. otherwise default to "libdir"
Steve Kondikae271bc2015-11-15 02:50:53 +01004182
4183# Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4184if test "${with_pkg_config_libdir+set}" = set; then
4185 withval="$with_pkg_config_libdir"
micky3879b9f5e72025-07-08 18:04:53 -04004186 cf_search_path=$withval
Steve Kondikae271bc2015-11-15 02:50:53 +01004187else
micky3879b9f5e72025-07-08 18:04:53 -04004188 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
Steve Kondikae271bc2015-11-15 02:50:53 +01004189fi;
Steve Kondikae271bc2015-11-15 02:50:53 +01004190
micky3879b9f5e72025-07-08 18:04:53 -04004191case "x$cf_search_path" in
4192(xlibdir)
4193 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4194 echo "$as_me:4194: result: $PKG_CONFIG_LIBDIR" >&5
4195echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4196 cf_search_path=
Steve Kondikae271bc2015-11-15 02:50:53 +01004197 ;;
micky3879b9f5e72025-07-08 18:04:53 -04004198(x)
4199 ;;
4200(x/*\ *)
4201 PKG_CONFIG_LIBDIR=
4202 ;;
4203(x/*)
4204 PKG_CONFIG_LIBDIR="$cf_search_path"
4205 echo "$as_me:4205: result: $PKG_CONFIG_LIBDIR" >&5
4206echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4207 cf_search_path=
4208 ;;
4209(xyes|xauto)
4210 echo "$as_me:4210: result: auto" >&5
4211echo "${ECHO_T}auto" >&6
4212 cf_search_path=
Steve Kondikae271bc2015-11-15 02:50:53 +01004213 # Look for the library directory using the same prefix as the executable
micky3879b9f5e72025-07-08 18:04:53 -04004214 echo "$as_me:4214: checking for search-list" >&5
4215echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4216 if test "x$PKG_CONFIG" != xnone
Steve Kondikae271bc2015-11-15 02:50:53 +01004217 then
micky3879b9f5e72025-07-08 18:04:53 -04004218 # works for pkg-config since version 0.24 (2009)
4219 # works for pkgconf since version 0.8.3 (2012)
4220 for cf_pkg_program in \
4221 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4222 pkg-config \
4223 pkgconf
4224 do
4225 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4226 test -n "$cf_search_path" && break
4227 done
4228
4229 # works for pkg-config since import in 2005 of original 2001 HP code.
4230 test -z "$cf_search_path" && \
4231 cf_search_path=`
4232 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4233/^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4234 sub(\"^[^']*'\",\"\"); \
4235 sub(\"'.*\",\"\"); \
4236 printf \" %s\", \\$0; } \
4237{ next; } \
4238"`
Steve Kondikae271bc2015-11-15 02:50:53 +01004239 fi
4240
micky3879b9f5e72025-07-08 18:04:53 -04004241 echo "$as_me:4241: result: $cf_search_path" >&5
4242echo "${ECHO_T}$cf_search_path" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01004243 ;;
4244(*)
micky3879b9f5e72025-07-08 18:04:53 -04004245 { { echo "$as_me:4245: error: Unexpected option value: $cf_search_path" >&5
4246echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4247 { (exit 1); exit 1; }; }
Steve Kondikae271bc2015-11-15 02:50:53 +01004248 ;;
4249esac
4250
micky3879b9f5e72025-07-08 18:04:53 -04004251if test -n "$cf_search_path"
4252then
4253 echo "$as_me:4253: checking for first directory" >&5
4254echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4255 cf_pkg_config_path=none
4256 for cf_config in $cf_search_path
4257 do
4258 if test -d "$cf_config"
4259 then
4260 cf_pkg_config_path=$cf_config
4261 break
4262 fi
4263 done
4264 echo "$as_me:4264: result: $cf_pkg_config_path" >&5
4265echo "${ECHO_T}$cf_pkg_config_path" >&6
4266
4267 if test "x$cf_pkg_config_path" != xnone ; then
4268 # limit this to the first directory found
4269 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4270 fi
4271
4272 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4273 then
4274 echo "$as_me:4274: checking for workaround" >&5
4275echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4276 if test "$prefix" = "NONE" ; then
4277 cf_prefix="$ac_default_prefix"
4278 else
4279 cf_prefix="$prefix"
4280 fi
4281 eval cf_libdir=$libdir
4282 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4283 cf_backup=
4284 for cf_config in $cf_search_path
4285 do
4286 case $cf_config in
4287 $cf_libdir/pkgconfig)
4288 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4289 break
4290 ;;
4291 *)
4292 test -z "$cf_backup" && cf_backup=$cf_config
4293 ;;
4294 esac
4295 done
4296 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4297 echo "$as_me:4297: result: $PKG_CONFIG_LIBDIR" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004298echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
micky3879b9f5e72025-07-08 18:04:53 -04004299 fi
Steve Kondikae271bc2015-11-15 02:50:53 +01004300fi
4301
4302if test "x$PKG_CONFIG" != xnone
4303then
micky3879b9f5e72025-07-08 18:04:53 -04004304 echo "$as_me:4304: checking if we should install .pc files for $PKG_CONFIG" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004305echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4306else
micky3879b9f5e72025-07-08 18:04:53 -04004307 echo "$as_me:4307: checking if we should install .pc files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004308echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4309fi
4310
4311# Check whether --enable-pc-files or --disable-pc-files was given.
4312if test "${enable_pc_files+set}" = set; then
4313 enableval="$enable_pc_files"
4314 enable_pc_files=$enableval
4315else
4316 enable_pc_files=no
4317fi;
micky3879b9f5e72025-07-08 18:04:53 -04004318echo "$as_me:4318: result: $enable_pc_files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004319echo "${ECHO_T}$enable_pc_files" >&6
4320
4321if test "x$enable_pc_files" != xno
4322then
micky3879b9f5e72025-07-08 18:04:53 -04004323 MAKE_PC_FILES=
Steve Kondikae271bc2015-11-15 02:50:53 +01004324 case "x$PKG_CONFIG_LIBDIR" in
micky3879b9f5e72025-07-08 18:04:53 -04004325 (xno|xnone|xyes|x)
4326 { echo "$as_me:4326: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004327echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01004328 ;;
4329 (*)
micky3879b9f5e72025-07-08 18:04:53 -04004330 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
Steve Kondikae271bc2015-11-15 02:50:53 +01004331
4332if test "x$prefix" != xNONE; then
4333 cf_path_syntax="$prefix"
4334else
4335 cf_path_syntax="$ac_default_prefix"
4336fi
4337
micky3879b9f5e72025-07-08 18:04:53 -04004338case ".$cf_pkg_config_libdir" in
Steve Kondikae271bc2015-11-15 02:50:53 +01004339(.\$\(*\)*|.\'*\'*)
4340 ;;
4341(..|./*|.\\*)
4342 ;;
4343(.[a-zA-Z]:[\\/]*) # OS/2 EMX
4344 ;;
micky3879b9f5e72025-07-08 18:04:53 -04004345(.\$\{*prefix\}*|.\$\{*dir\}*)
4346 eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4347 case ".$cf_pkg_config_libdir" in
Steve Kondikae271bc2015-11-15 02:50:53 +01004348 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04004349 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01004350 ;;
4351 esac
4352 ;;
4353(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04004354 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01004355 ;;
4356(*)
micky3879b9f5e72025-07-08 18:04:53 -04004357 { { echo "$as_me:4357: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4358echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01004359 { (exit 1); exit 1; }; }
4360 ;;
4361esac
4362
Steve Kondikae271bc2015-11-15 02:50:53 +01004363 ;;
4364 esac
4365else
4366 MAKE_PC_FILES="#"
4367fi
4368
4369if test -z "$MAKE_PC_FILES"
4370then
micky3879b9f5e72025-07-08 18:04:53 -04004371 echo "$as_me:4371: checking for suffix to add to pkg-config files" >&5
4372echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01004373
4374# Check whether --with-pc-suffix or --without-pc-suffix was given.
4375if test "${with_pc_suffix+set}" = set; then
4376 withval="$with_pc_suffix"
4377 case "x$withval" in
4378 (xyes|xno)
4379 PC_MODULE_SUFFIX=
4380 ;;
4381 (*) PC_MODULE_SUFFIX="$withval"
4382 ;;
4383 esac
4384fi;
4385 test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
micky3879b9f5e72025-07-08 18:04:53 -04004386 echo "$as_me:4386: result: $PC_MODULE_SUFFIX" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004387echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4388 test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4389
4390fi
4391
micky3879b9f5e72025-07-08 18:04:53 -04004392echo "$as_me:4392: checking if we should assume mixed-case filenames" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004393echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4394
4395# Check whether --enable-mixed-case or --disable-mixed-case was given.
4396if test "${enable_mixed_case+set}" = set; then
4397 enableval="$enable_mixed_case"
4398 enable_mixedcase=$enableval
4399else
4400 enable_mixedcase=auto
4401fi;
micky3879b9f5e72025-07-08 18:04:53 -04004402echo "$as_me:4402: result: $enable_mixedcase" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004403echo "${ECHO_T}$enable_mixedcase" >&6
4404if test "$enable_mixedcase" = "auto" ; then
4405
micky3879b9f5e72025-07-08 18:04:53 -04004406echo "$as_me:4406: checking if filesystem supports mixed-case filenames" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004407echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4408if test "${cf_cv_mixedcase+set}" = set; then
4409 echo $ECHO_N "(cached) $ECHO_C" >&6
4410else
4411
4412if test "$cross_compiling" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -04004413 case "$target_alias" in
4414 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
Steve Kondikae271bc2015-11-15 02:50:53 +01004415 cf_cv_mixedcase=no
4416 ;;
4417 (*)
4418 cf_cv_mixedcase=yes
4419 ;;
4420 esac
4421else
4422 rm -f conftest CONFTEST
4423 echo test >conftest
4424 if test -f CONFTEST ; then
4425 cf_cv_mixedcase=no
4426 else
4427 cf_cv_mixedcase=yes
4428 fi
4429 rm -f conftest CONFTEST
4430fi
4431
4432fi
micky3879b9f5e72025-07-08 18:04:53 -04004433echo "$as_me:4433: result: $cf_cv_mixedcase" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004434echo "${ECHO_T}$cf_cv_mixedcase" >&6
4435test "$cf_cv_mixedcase" = yes &&
4436cat >>confdefs.h <<\EOF
4437#define MIXEDCASE_FILENAMES 1
4438EOF
4439
4440else
4441 cf_cv_mixedcase=$enable_mixedcase
4442 if test "x$enable_mixedcase" = "xyes" ; then
4443
4444cat >>confdefs.h <<\EOF
4445#define MIXEDCASE_FILENAMES 1
4446EOF
4447
4448 fi
4449fi
4450
4451# do this after mixed-case option (tags/TAGS is not as important as tic).
micky3879b9f5e72025-07-08 18:04:53 -04004452echo "$as_me:4452: checking whether ${MAKE-make} sets \${MAKE}" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004453echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4454set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4455if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4456 echo $ECHO_N "(cached) $ECHO_C" >&6
4457else
4458 cat >conftest.make <<\EOF
4459all:
4460 @echo 'ac_maketemp="${MAKE}"'
4461EOF
4462# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4463eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4464if test -n "$ac_maketemp"; then
4465 eval ac_cv_prog_make_${ac_make}_set=yes
4466else
4467 eval ac_cv_prog_make_${ac_make}_set=no
4468fi
4469rm -f conftest.make
4470fi
4471if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
micky3879b9f5e72025-07-08 18:04:53 -04004472 echo "$as_me:4472: result: yes" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004473echo "${ECHO_T}yes" >&6
4474 SET_MAKE=
4475else
micky3879b9f5e72025-07-08 18:04:53 -04004476 echo "$as_me:4476: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004477echo "${ECHO_T}no" >&6
4478 SET_MAKE="MAKE=${MAKE-make}"
4479fi
4480
micky3879b9f5e72025-07-08 18:04:53 -04004481echo "$as_me:4481: checking for \".PHONY\" make-support" >&5
4482echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4483if test "${cf_cv_make_PHONY+set}" = set; then
4484 echo $ECHO_N "(cached) $ECHO_C" >&6
4485else
4486
4487 rm -rf conftest*
4488 (
4489 mkdir conftest || exit 1
4490 cd conftest
4491 cat >makefile <<'CF_EOF'
4492.PHONY: always
4493DATA=0
4494always: always.out
4495 @echo "** making $@ $(DATA)"
4496once: once.out
4497 @echo "** making $@ $(DATA)"
4498always.out:
4499 @echo "** making $@ $(DATA)"
4500 echo $(DATA) > $@
4501once.out:
4502 @echo "** making $@ $(DATA)"
4503 echo $(DATA) > $@
4504CF_EOF
4505 for cf_data in 1 2 3
4506 do
4507 ${MAKE:-make} always DATA=$cf_data
4508 ${MAKE:-make} once DATA=$cf_data
4509 ${MAKE:-make} -t always once
4510 if test -f always ; then
4511 echo "no (case 1)" > ../conftest.tmp
4512 elif test ! -f always.out ; then
4513 echo "no (case 2)" > ../conftest.tmp
4514 elif test ! -f once.out ; then
4515 echo "no (case 3)" > ../conftest.tmp
4516 elif ! cmp -s always.out once.out ; then
4517 echo "no (case 4)" > ../conftest.tmp
4518 diff always.out once.out
4519 else
4520 cf_check="`cat always.out`"
4521 if test "x$cf_check" != "x$cf_data" ; then
4522 echo "no (case 5)" > ../conftest.tmp
4523 else
4524 echo yes > ../conftest.tmp
4525 rm -f ./*.out
4526 continue
4527 fi
4528 fi
4529 break
4530 done
4531 ) >&5 2>&1
4532 cf_cv_make_PHONY="`cat conftest.tmp`"
4533 rm -rf conftest*
4534
4535fi
4536echo "$as_me:4536: result: $cf_cv_make_PHONY" >&5
4537echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4538MAKE_NO_PHONY="#"
4539MAKE_PHONY="#"
4540test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4541test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4542
Steve Kondikae271bc2015-11-15 02:50:53 +01004543for ac_prog in exctags ctags
4544do
4545 # Extract the first word of "$ac_prog", so it can be a program name with args.
4546set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004547echo "$as_me:4547: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004548echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4549if test "${ac_cv_prog_CTAGS+set}" = set; then
4550 echo $ECHO_N "(cached) $ECHO_C" >&6
4551else
4552 if test -n "$CTAGS"; then
4553 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4554else
4555 ac_save_IFS=$IFS; IFS=$ac_path_separator
4556ac_dummy="$PATH"
4557for ac_dir in $ac_dummy; do
4558 IFS=$ac_save_IFS
4559 test -z "$ac_dir" && ac_dir=.
4560 $as_executable_p "$ac_dir/$ac_word" || continue
4561ac_cv_prog_CTAGS="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04004562echo "$as_me:4562: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004563break
4564done
4565
4566fi
4567fi
4568CTAGS=$ac_cv_prog_CTAGS
4569if test -n "$CTAGS"; then
micky3879b9f5e72025-07-08 18:04:53 -04004570 echo "$as_me:4570: result: $CTAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004571echo "${ECHO_T}$CTAGS" >&6
4572else
micky3879b9f5e72025-07-08 18:04:53 -04004573 echo "$as_me:4573: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004574echo "${ECHO_T}no" >&6
4575fi
4576
4577 test -n "$CTAGS" && break
4578done
4579
4580for ac_prog in exetags etags
4581do
4582 # Extract the first word of "$ac_prog", so it can be a program name with args.
4583set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004584echo "$as_me:4584: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004585echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4586if test "${ac_cv_prog_ETAGS+set}" = set; then
4587 echo $ECHO_N "(cached) $ECHO_C" >&6
4588else
4589 if test -n "$ETAGS"; then
4590 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4591else
4592 ac_save_IFS=$IFS; IFS=$ac_path_separator
4593ac_dummy="$PATH"
4594for ac_dir in $ac_dummy; do
4595 IFS=$ac_save_IFS
4596 test -z "$ac_dir" && ac_dir=.
4597 $as_executable_p "$ac_dir/$ac_word" || continue
4598ac_cv_prog_ETAGS="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04004599echo "$as_me:4599: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004600break
4601done
4602
4603fi
4604fi
4605ETAGS=$ac_cv_prog_ETAGS
4606if test -n "$ETAGS"; then
micky3879b9f5e72025-07-08 18:04:53 -04004607 echo "$as_me:4607: result: $ETAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004608echo "${ECHO_T}$ETAGS" >&6
4609else
micky3879b9f5e72025-07-08 18:04:53 -04004610 echo "$as_me:4610: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004611echo "${ECHO_T}no" >&6
4612fi
4613
4614 test -n "$ETAGS" && break
4615done
4616
4617# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4618set dummy ${CTAGS:-ctags}; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004619echo "$as_me:4619: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004620echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4621if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4622 echo $ECHO_N "(cached) $ECHO_C" >&6
4623else
4624 if test -n "$MAKE_LOWER_TAGS"; then
4625 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4626else
4627 ac_save_IFS=$IFS; IFS=$ac_path_separator
4628ac_dummy="$PATH"
4629for ac_dir in $ac_dummy; do
4630 IFS=$ac_save_IFS
4631 test -z "$ac_dir" && ac_dir=.
4632 $as_executable_p "$ac_dir/$ac_word" || continue
4633ac_cv_prog_MAKE_LOWER_TAGS="yes"
micky3879b9f5e72025-07-08 18:04:53 -04004634echo "$as_me:4634: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004635break
4636done
4637
4638 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4639fi
4640fi
4641MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4642if test -n "$MAKE_LOWER_TAGS"; then
micky3879b9f5e72025-07-08 18:04:53 -04004643 echo "$as_me:4643: result: $MAKE_LOWER_TAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004644echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4645else
micky3879b9f5e72025-07-08 18:04:53 -04004646 echo "$as_me:4646: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004647echo "${ECHO_T}no" >&6
4648fi
4649
4650if test "$cf_cv_mixedcase" = yes ; then
4651 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4652set dummy ${ETAGS:-etags}; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004653echo "$as_me:4653: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004654echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4655if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4656 echo $ECHO_N "(cached) $ECHO_C" >&6
4657else
4658 if test -n "$MAKE_UPPER_TAGS"; then
4659 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4660else
4661 ac_save_IFS=$IFS; IFS=$ac_path_separator
4662ac_dummy="$PATH"
4663for ac_dir in $ac_dummy; do
4664 IFS=$ac_save_IFS
4665 test -z "$ac_dir" && ac_dir=.
4666 $as_executable_p "$ac_dir/$ac_word" || continue
4667ac_cv_prog_MAKE_UPPER_TAGS="yes"
micky3879b9f5e72025-07-08 18:04:53 -04004668echo "$as_me:4668: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004669break
4670done
4671
4672 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4673fi
4674fi
4675MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4676if test -n "$MAKE_UPPER_TAGS"; then
micky3879b9f5e72025-07-08 18:04:53 -04004677 echo "$as_me:4677: result: $MAKE_UPPER_TAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004678echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4679else
micky3879b9f5e72025-07-08 18:04:53 -04004680 echo "$as_me:4680: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004681echo "${ECHO_T}no" >&6
4682fi
4683
4684else
4685 MAKE_UPPER_TAGS=no
4686fi
4687
4688if test "$MAKE_UPPER_TAGS" = yes ; then
4689 MAKE_UPPER_TAGS=
4690else
4691 MAKE_UPPER_TAGS="#"
4692fi
4693
4694if test "$MAKE_LOWER_TAGS" = yes ; then
4695 MAKE_LOWER_TAGS=
4696else
4697 MAKE_LOWER_TAGS="#"
4698fi
4699
micky3879b9f5e72025-07-08 18:04:53 -04004700echo "$as_me:4700: checking for makeflags variable" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004701echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4702if test "${cf_cv_makeflags+set}" = set; then
4703 echo $ECHO_N "(cached) $ECHO_C" >&6
4704else
4705
4706 cf_cv_makeflags=''
4707 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4708 do
4709 cat >cf_makeflags.tmp <<CF_EOF
4710SHELL = $SHELL
4711all :
4712 @ echo '.$cf_option'
4713CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -04004714 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
Steve Kondikae271bc2015-11-15 02:50:53 +01004715 case "$cf_result" in
4716 (.*k|.*kw)
micky3879b9f5e72025-07-08 18:04:53 -04004717 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
Steve Kondikae271bc2015-11-15 02:50:53 +01004718 case "$cf_result" in
4719 (.*CC=*) cf_cv_makeflags=
4720 ;;
4721 (*) cf_cv_makeflags=$cf_option
4722 ;;
4723 esac
4724 break
4725 ;;
micky3879b9f5e72025-07-08 18:04:53 -04004726 (.-)
4727 ;;
4728 (*)
4729
4730echo "${as_me:-configure}:4730: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4731
Steve Kondikae271bc2015-11-15 02:50:53 +01004732 ;;
4733 esac
4734 done
4735 rm -f cf_makeflags.tmp
4736
4737fi
micky3879b9f5e72025-07-08 18:04:53 -04004738echo "$as_me:4738: result: $cf_cv_makeflags" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004739echo "${ECHO_T}$cf_cv_makeflags" >&6
4740
4741if test -n "$ac_tool_prefix"; then
4742 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4743set dummy ${ac_tool_prefix}ranlib; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004744echo "$as_me:4744: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004745echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4746if test "${ac_cv_prog_RANLIB+set}" = set; then
4747 echo $ECHO_N "(cached) $ECHO_C" >&6
4748else
4749 if test -n "$RANLIB"; then
4750 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4751else
4752 ac_save_IFS=$IFS; IFS=$ac_path_separator
4753ac_dummy="$PATH"
4754for ac_dir in $ac_dummy; do
4755 IFS=$ac_save_IFS
4756 test -z "$ac_dir" && ac_dir=.
4757 $as_executable_p "$ac_dir/$ac_word" || continue
4758ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
micky3879b9f5e72025-07-08 18:04:53 -04004759echo "$as_me:4759: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004760break
4761done
4762
4763fi
4764fi
4765RANLIB=$ac_cv_prog_RANLIB
4766if test -n "$RANLIB"; then
micky3879b9f5e72025-07-08 18:04:53 -04004767 echo "$as_me:4767: result: $RANLIB" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004768echo "${ECHO_T}$RANLIB" >&6
4769else
micky3879b9f5e72025-07-08 18:04:53 -04004770 echo "$as_me:4770: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004771echo "${ECHO_T}no" >&6
4772fi
4773
4774fi
4775if test -z "$ac_cv_prog_RANLIB"; then
4776 ac_ct_RANLIB=$RANLIB
4777 # Extract the first word of "ranlib", so it can be a program name with args.
4778set dummy ranlib; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004779echo "$as_me:4779: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004780echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4781if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4782 echo $ECHO_N "(cached) $ECHO_C" >&6
4783else
4784 if test -n "$ac_ct_RANLIB"; then
4785 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4786else
4787 ac_save_IFS=$IFS; IFS=$ac_path_separator
4788ac_dummy="$PATH"
4789for ac_dir in $ac_dummy; do
4790 IFS=$ac_save_IFS
4791 test -z "$ac_dir" && ac_dir=.
4792 $as_executable_p "$ac_dir/$ac_word" || continue
4793ac_cv_prog_ac_ct_RANLIB="ranlib"
micky3879b9f5e72025-07-08 18:04:53 -04004794echo "$as_me:4794: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004795break
4796done
4797
4798 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4799fi
4800fi
4801ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4802if test -n "$ac_ct_RANLIB"; then
micky3879b9f5e72025-07-08 18:04:53 -04004803 echo "$as_me:4803: result: $ac_ct_RANLIB" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004804echo "${ECHO_T}$ac_ct_RANLIB" >&6
4805else
micky3879b9f5e72025-07-08 18:04:53 -04004806 echo "$as_me:4806: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004807echo "${ECHO_T}no" >&6
4808fi
4809
4810 RANLIB=$ac_ct_RANLIB
4811else
4812 RANLIB="$ac_cv_prog_RANLIB"
4813fi
4814
4815if test -n "$ac_tool_prefix"; then
4816 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4817set dummy ${ac_tool_prefix}ld; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004818echo "$as_me:4818: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004819echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4820if test "${ac_cv_prog_LD+set}" = set; then
4821 echo $ECHO_N "(cached) $ECHO_C" >&6
4822else
4823 if test -n "$LD"; then
4824 ac_cv_prog_LD="$LD" # Let the user override the test.
4825else
4826 ac_save_IFS=$IFS; IFS=$ac_path_separator
4827ac_dummy="$PATH"
4828for ac_dir in $ac_dummy; do
4829 IFS=$ac_save_IFS
4830 test -z "$ac_dir" && ac_dir=.
4831 $as_executable_p "$ac_dir/$ac_word" || continue
4832ac_cv_prog_LD="${ac_tool_prefix}ld"
micky3879b9f5e72025-07-08 18:04:53 -04004833echo "$as_me:4833: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004834break
4835done
4836
4837fi
4838fi
4839LD=$ac_cv_prog_LD
4840if test -n "$LD"; then
micky3879b9f5e72025-07-08 18:04:53 -04004841 echo "$as_me:4841: result: $LD" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004842echo "${ECHO_T}$LD" >&6
4843else
micky3879b9f5e72025-07-08 18:04:53 -04004844 echo "$as_me:4844: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004845echo "${ECHO_T}no" >&6
4846fi
4847
4848fi
4849if test -z "$ac_cv_prog_LD"; then
4850 ac_ct_LD=$LD
4851 # Extract the first word of "ld", so it can be a program name with args.
4852set dummy ld; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004853echo "$as_me:4853: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004854echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4855if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4856 echo $ECHO_N "(cached) $ECHO_C" >&6
4857else
4858 if test -n "$ac_ct_LD"; then
4859 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4860else
4861 ac_save_IFS=$IFS; IFS=$ac_path_separator
4862ac_dummy="$PATH"
4863for ac_dir in $ac_dummy; do
4864 IFS=$ac_save_IFS
4865 test -z "$ac_dir" && ac_dir=.
4866 $as_executable_p "$ac_dir/$ac_word" || continue
4867ac_cv_prog_ac_ct_LD="ld"
micky3879b9f5e72025-07-08 18:04:53 -04004868echo "$as_me:4868: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004869break
4870done
4871
4872 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4873fi
4874fi
4875ac_ct_LD=$ac_cv_prog_ac_ct_LD
4876if test -n "$ac_ct_LD"; then
micky3879b9f5e72025-07-08 18:04:53 -04004877 echo "$as_me:4877: result: $ac_ct_LD" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004878echo "${ECHO_T}$ac_ct_LD" >&6
4879else
micky3879b9f5e72025-07-08 18:04:53 -04004880 echo "$as_me:4880: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004881echo "${ECHO_T}no" >&6
4882fi
4883
4884 LD=$ac_ct_LD
4885else
4886 LD="$ac_cv_prog_LD"
4887fi
4888
4889if test -n "$ac_tool_prefix"; then
4890 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4891set dummy ${ac_tool_prefix}ar; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004892echo "$as_me:4892: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004893echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4894if test "${ac_cv_prog_AR+set}" = set; then
4895 echo $ECHO_N "(cached) $ECHO_C" >&6
4896else
4897 if test -n "$AR"; then
4898 ac_cv_prog_AR="$AR" # Let the user override the test.
4899else
4900 ac_save_IFS=$IFS; IFS=$ac_path_separator
4901ac_dummy="$PATH"
4902for ac_dir in $ac_dummy; do
4903 IFS=$ac_save_IFS
4904 test -z "$ac_dir" && ac_dir=.
4905 $as_executable_p "$ac_dir/$ac_word" || continue
4906ac_cv_prog_AR="${ac_tool_prefix}ar"
micky3879b9f5e72025-07-08 18:04:53 -04004907echo "$as_me:4907: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004908break
4909done
4910
4911fi
4912fi
4913AR=$ac_cv_prog_AR
4914if test -n "$AR"; then
micky3879b9f5e72025-07-08 18:04:53 -04004915 echo "$as_me:4915: result: $AR" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004916echo "${ECHO_T}$AR" >&6
4917else
micky3879b9f5e72025-07-08 18:04:53 -04004918 echo "$as_me:4918: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004919echo "${ECHO_T}no" >&6
4920fi
4921
4922fi
4923if test -z "$ac_cv_prog_AR"; then
4924 ac_ct_AR=$AR
4925 # Extract the first word of "ar", so it can be a program name with args.
4926set dummy ar; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004927echo "$as_me:4927: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004928echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4929if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4930 echo $ECHO_N "(cached) $ECHO_C" >&6
4931else
4932 if test -n "$ac_ct_AR"; then
4933 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4934else
4935 ac_save_IFS=$IFS; IFS=$ac_path_separator
4936ac_dummy="$PATH"
4937for ac_dir in $ac_dummy; do
4938 IFS=$ac_save_IFS
4939 test -z "$ac_dir" && ac_dir=.
4940 $as_executable_p "$ac_dir/$ac_word" || continue
4941ac_cv_prog_ac_ct_AR="ar"
micky3879b9f5e72025-07-08 18:04:53 -04004942echo "$as_me:4942: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004943break
4944done
4945
4946 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4947fi
4948fi
4949ac_ct_AR=$ac_cv_prog_ac_ct_AR
4950if test -n "$ac_ct_AR"; then
micky3879b9f5e72025-07-08 18:04:53 -04004951 echo "$as_me:4951: result: $ac_ct_AR" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004952echo "${ECHO_T}$ac_ct_AR" >&6
4953else
micky3879b9f5e72025-07-08 18:04:53 -04004954 echo "$as_me:4954: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004955echo "${ECHO_T}no" >&6
4956fi
4957
4958 AR=$ac_ct_AR
4959else
4960 AR="$ac_cv_prog_AR"
4961fi
4962
4963if test -n "$ac_tool_prefix"; then
4964 # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4965set dummy ${ac_tool_prefix}nm; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04004966echo "$as_me:4966: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004967echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4968if test "${ac_cv_prog_NM+set}" = set; then
4969 echo $ECHO_N "(cached) $ECHO_C" >&6
4970else
4971 if test -n "$NM"; then
4972 ac_cv_prog_NM="$NM" # Let the user override the test.
4973else
4974 ac_save_IFS=$IFS; IFS=$ac_path_separator
4975ac_dummy="$PATH"
4976for ac_dir in $ac_dummy; do
4977 IFS=$ac_save_IFS
4978 test -z "$ac_dir" && ac_dir=.
4979 $as_executable_p "$ac_dir/$ac_word" || continue
4980ac_cv_prog_NM="${ac_tool_prefix}nm"
micky3879b9f5e72025-07-08 18:04:53 -04004981echo "$as_me:4981: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004982break
4983done
4984
4985fi
4986fi
4987NM=$ac_cv_prog_NM
4988if test -n "$NM"; then
micky3879b9f5e72025-07-08 18:04:53 -04004989 echo "$as_me:4989: result: $NM" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004990echo "${ECHO_T}$NM" >&6
4991else
micky3879b9f5e72025-07-08 18:04:53 -04004992 echo "$as_me:4992: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01004993echo "${ECHO_T}no" >&6
4994fi
4995
4996fi
4997if test -z "$ac_cv_prog_NM"; then
4998 ac_ct_NM=$NM
4999 # Extract the first word of "nm", so it can be a program name with args.
5000set dummy nm; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005001echo "$as_me:5001: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005002echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5003if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5004 echo $ECHO_N "(cached) $ECHO_C" >&6
5005else
5006 if test -n "$ac_ct_NM"; then
5007 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5008else
5009 ac_save_IFS=$IFS; IFS=$ac_path_separator
5010ac_dummy="$PATH"
5011for ac_dir in $ac_dummy; do
5012 IFS=$ac_save_IFS
5013 test -z "$ac_dir" && ac_dir=.
5014 $as_executable_p "$ac_dir/$ac_word" || continue
5015ac_cv_prog_ac_ct_NM="nm"
micky3879b9f5e72025-07-08 18:04:53 -04005016echo "$as_me:5016: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005017break
5018done
5019
5020 test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5021fi
5022fi
5023ac_ct_NM=$ac_cv_prog_ac_ct_NM
5024if test -n "$ac_ct_NM"; then
micky3879b9f5e72025-07-08 18:04:53 -04005025 echo "$as_me:5025: result: $ac_ct_NM" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005026echo "${ECHO_T}$ac_ct_NM" >&6
5027else
micky3879b9f5e72025-07-08 18:04:53 -04005028 echo "$as_me:5028: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005029echo "${ECHO_T}no" >&6
5030fi
5031
5032 NM=$ac_ct_NM
5033else
5034 NM="$ac_cv_prog_NM"
5035fi
5036
5037if test -n "$ac_tool_prefix"; then
5038 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5039set dummy ${ac_tool_prefix}ar; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005040echo "$as_me:5040: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005041echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5042if test "${ac_cv_prog_AR+set}" = set; then
5043 echo $ECHO_N "(cached) $ECHO_C" >&6
5044else
5045 if test -n "$AR"; then
5046 ac_cv_prog_AR="$AR" # Let the user override the test.
5047else
5048 ac_save_IFS=$IFS; IFS=$ac_path_separator
5049ac_dummy="$PATH"
5050for ac_dir in $ac_dummy; do
5051 IFS=$ac_save_IFS
5052 test -z "$ac_dir" && ac_dir=.
5053 $as_executable_p "$ac_dir/$ac_word" || continue
5054ac_cv_prog_AR="${ac_tool_prefix}ar"
micky3879b9f5e72025-07-08 18:04:53 -04005055echo "$as_me:5055: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005056break
5057done
5058
5059fi
5060fi
5061AR=$ac_cv_prog_AR
5062if test -n "$AR"; then
micky3879b9f5e72025-07-08 18:04:53 -04005063 echo "$as_me:5063: result: $AR" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005064echo "${ECHO_T}$AR" >&6
5065else
micky3879b9f5e72025-07-08 18:04:53 -04005066 echo "$as_me:5066: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005067echo "${ECHO_T}no" >&6
5068fi
5069
5070fi
5071if test -z "$ac_cv_prog_AR"; then
5072 ac_ct_AR=$AR
5073 # Extract the first word of "ar", so it can be a program name with args.
5074set dummy ar; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005075echo "$as_me:5075: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005076echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5077if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5078 echo $ECHO_N "(cached) $ECHO_C" >&6
5079else
5080 if test -n "$ac_ct_AR"; then
5081 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5082else
5083 ac_save_IFS=$IFS; IFS=$ac_path_separator
5084ac_dummy="$PATH"
5085for ac_dir in $ac_dummy; do
5086 IFS=$ac_save_IFS
5087 test -z "$ac_dir" && ac_dir=.
5088 $as_executable_p "$ac_dir/$ac_word" || continue
5089ac_cv_prog_ac_ct_AR="ar"
micky3879b9f5e72025-07-08 18:04:53 -04005090echo "$as_me:5090: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005091break
5092done
5093
5094 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5095fi
5096fi
5097ac_ct_AR=$ac_cv_prog_ac_ct_AR
5098if test -n "$ac_ct_AR"; then
micky3879b9f5e72025-07-08 18:04:53 -04005099 echo "$as_me:5099: result: $ac_ct_AR" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005100echo "${ECHO_T}$ac_ct_AR" >&6
5101else
micky3879b9f5e72025-07-08 18:04:53 -04005102 echo "$as_me:5102: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005103echo "${ECHO_T}no" >&6
5104fi
5105
5106 AR=$ac_ct_AR
5107else
5108 AR="$ac_cv_prog_AR"
5109fi
5110
micky3879b9f5e72025-07-08 18:04:53 -04005111echo "$as_me:5111: checking for options to update archives" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005112echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5113if test "${cf_cv_ar_flags+set}" = set; then
5114 echo $ECHO_N "(cached) $ECHO_C" >&6
5115else
5116
micky3879b9f5e72025-07-08 18:04:53 -04005117 case "$cf_cv_system_name" in
5118 (*-msvc*)
5119 cf_cv_ar_flags=''
5120 cat >mk_static_lib.sh <<-EOF
5121 #!$SHELL
5122 MSVC_BIN="$AR"
5123 out="\$1"
5124 shift
5125 exec \$MSVC_BIN -out:"\$out" \$@
5126 EOF
5127 chmod +x mk_static_lib.sh
5128 AR=`pwd`/mk_static_lib.sh
5129 ;;
5130 (*)
5131 cf_cv_ar_flags=unknown
5132 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5133 do
Steve Kondikae271bc2015-11-15 02:50:53 +01005134
micky3879b9f5e72025-07-08 18:04:53 -04005135 # check if $ARFLAGS already contains this choice
5136 if test "x$ARFLAGS" != "x" ; then
5137 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5138 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5139 cf_cv_ar_flags=
5140 break
5141 fi
Steve Kondikae271bc2015-11-15 02:50:53 +01005142 fi
Steve Kondikae271bc2015-11-15 02:50:53 +01005143
micky3879b9f5e72025-07-08 18:04:53 -04005144 rm -f "conftest.$ac_cv_objext"
5145 rm -f conftest.a
Steve Kondikae271bc2015-11-15 02:50:53 +01005146
micky3879b9f5e72025-07-08 18:04:53 -04005147 cat >"conftest.$ac_ext" <<EOF
5148#line 5148 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01005149int testdata[3] = { 123, 456, 789 };
5150EOF
micky3879b9f5e72025-07-08 18:04:53 -04005151 if { (eval echo "$as_me:5151: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005152 (eval $ac_compile) 2>&5
5153 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04005154 echo "$as_me:5154: \$? = $ac_status" >&5
5155 (exit "$ac_status"); } ; then
5156 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5157 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5158 if test -f conftest.a ; then
5159 cf_cv_ar_flags="$cf_ar_flags"
5160 break
5161 fi
5162 else
5163 test -n "$verbose" && echo " cannot compile test-program" 1>&6
5164
5165echo "${as_me:-configure}:5165: testing cannot compile test-program ..." 1>&5
5166
Steve Kondikae271bc2015-11-15 02:50:53 +01005167 break
5168 fi
micky3879b9f5e72025-07-08 18:04:53 -04005169 done
5170 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5171 ;;
5172 esac
Steve Kondikae271bc2015-11-15 02:50:53 +01005173
5174fi
micky3879b9f5e72025-07-08 18:04:53 -04005175echo "$as_me:5175: result: $cf_cv_ar_flags" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005176echo "${ECHO_T}$cf_cv_ar_flags" >&6
5177
5178if test -n "$ARFLAGS" ; then
5179 if test -n "$cf_cv_ar_flags" ; then
5180 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5181 fi
5182else
5183 ARFLAGS=$cf_cv_ar_flags
5184fi
5185
micky3879b9f5e72025-07-08 18:04:53 -04005186echo "$as_me:5186: checking for an installation directory prefix" >&5
5187echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01005188
5189# Check whether --with-install-prefix or --without-install-prefix was given.
5190if test "${with_install_prefix+set}" = set; then
5191 withval="$with_install_prefix"
5192 case "x$withval" in
5193 (xyes|xno)
5194 ;;
5195 (*) DESTDIR="$withval"
5196 ;;
5197 esac
5198fi;
micky3879b9f5e72025-07-08 18:04:53 -04005199echo "$as_me:5199: result: ${DESTDIR:-(none)}" >&5
5200echo "${ECHO_T}${DESTDIR:-(none)}" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01005201
5202###############################################################################
5203
5204# If we're cross-compiling, allow the user to override the tools and their
5205# options. The configure script is oriented toward identifying the host
5206# compiler, etc., but we need a build compiler to generate parts of the source.
5207
micky3879b9f5e72025-07-08 18:04:53 -04005208case "$cf_cv_system_name" in
5209(*-msvc*)
5210 LDFLAGS="$LDFLAGS user32.lib"
5211 export LDFLAGS
5212 ;;
5213esac
5214
Steve Kondikae271bc2015-11-15 02:50:53 +01005215if test "$cross_compiling" = yes ; then
5216
5217 # defaults that we might want to override
5218 : ${BUILD_CFLAGS:=''}
5219 : ${BUILD_CPPFLAGS:=''}
5220 : ${BUILD_LDFLAGS:=''}
5221 : ${BUILD_LIBS:=''}
5222 : ${BUILD_EXEEXT:='$x'}
5223 : ${BUILD_OBJEXT:='o'}
5224
5225# Check whether --with-build-cc or --without-build-cc was given.
5226if test "${with_build_cc+set}" = set; then
5227 withval="$with_build_cc"
5228 BUILD_CC="$withval"
5229else
micky3879b9f5e72025-07-08 18:04:53 -04005230 for ac_prog in gcc clang c99 c89 cc cl
Steve Kondikae271bc2015-11-15 02:50:53 +01005231do
5232 # Extract the first word of "$ac_prog", so it can be a program name with args.
5233set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005234echo "$as_me:5234: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005235echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5236if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5237 echo $ECHO_N "(cached) $ECHO_C" >&6
5238else
5239 if test -n "$BUILD_CC"; then
5240 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5241else
5242 ac_save_IFS=$IFS; IFS=$ac_path_separator
5243ac_dummy="$PATH"
5244for ac_dir in $ac_dummy; do
5245 IFS=$ac_save_IFS
5246 test -z "$ac_dir" && ac_dir=.
5247 $as_executable_p "$ac_dir/$ac_word" || continue
5248ac_cv_prog_BUILD_CC="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04005249echo "$as_me:5249: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005250break
5251done
5252
5253fi
5254fi
5255BUILD_CC=$ac_cv_prog_BUILD_CC
5256if test -n "$BUILD_CC"; then
micky3879b9f5e72025-07-08 18:04:53 -04005257 echo "$as_me:5257: result: $BUILD_CC" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005258echo "${ECHO_T}$BUILD_CC" >&6
5259else
micky3879b9f5e72025-07-08 18:04:53 -04005260 echo "$as_me:5260: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005261echo "${ECHO_T}no" >&6
5262fi
5263
5264 test -n "$BUILD_CC" && break
5265done
micky3879b9f5e72025-07-08 18:04:53 -04005266test -n "$BUILD_CC" || BUILD_CC="none"
Steve Kondikae271bc2015-11-15 02:50:53 +01005267
5268fi;
micky3879b9f5e72025-07-08 18:04:53 -04005269 echo "$as_me:5269: checking for native build C compiler" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005270echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04005271 echo "$as_me:5271: result: $BUILD_CC" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005272echo "${ECHO_T}$BUILD_CC" >&6
5273
micky3879b9f5e72025-07-08 18:04:53 -04005274 echo "$as_me:5274: checking for native build C preprocessor" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005275echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5276
5277# Check whether --with-build-cpp or --without-build-cpp was given.
5278if test "${with_build_cpp+set}" = set; then
5279 withval="$with_build_cpp"
5280 BUILD_CPP="$withval"
5281else
5282 BUILD_CPP='${BUILD_CC} -E'
5283fi;
micky3879b9f5e72025-07-08 18:04:53 -04005284 echo "$as_me:5284: result: $BUILD_CPP" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005285echo "${ECHO_T}$BUILD_CPP" >&6
5286
micky3879b9f5e72025-07-08 18:04:53 -04005287 echo "$as_me:5287: checking for native build C flags" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005288echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5289
5290# Check whether --with-build-cflags or --without-build-cflags was given.
5291if test "${with_build_cflags+set}" = set; then
5292 withval="$with_build_cflags"
5293 BUILD_CFLAGS="$withval"
5294fi;
micky3879b9f5e72025-07-08 18:04:53 -04005295 echo "$as_me:5295: result: $BUILD_CFLAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005296echo "${ECHO_T}$BUILD_CFLAGS" >&6
5297
micky3879b9f5e72025-07-08 18:04:53 -04005298 echo "$as_me:5298: checking for native build C preprocessor-flags" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005299echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5300
5301# Check whether --with-build-cppflags or --without-build-cppflags was given.
5302if test "${with_build_cppflags+set}" = set; then
5303 withval="$with_build_cppflags"
5304 BUILD_CPPFLAGS="$withval"
5305fi;
micky3879b9f5e72025-07-08 18:04:53 -04005306 echo "$as_me:5306: result: $BUILD_CPPFLAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005307echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5308
micky3879b9f5e72025-07-08 18:04:53 -04005309 echo "$as_me:5309: checking for native build linker-flags" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005310echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5311
5312# Check whether --with-build-ldflags or --without-build-ldflags was given.
5313if test "${with_build_ldflags+set}" = set; then
5314 withval="$with_build_ldflags"
5315 BUILD_LDFLAGS="$withval"
5316fi;
micky3879b9f5e72025-07-08 18:04:53 -04005317 echo "$as_me:5317: result: $BUILD_LDFLAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005318echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5319
micky3879b9f5e72025-07-08 18:04:53 -04005320 echo "$as_me:5320: checking for native build linker-libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005321echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5322
5323# Check whether --with-build-libs or --without-build-libs was given.
5324if test "${with_build_libs+set}" = set; then
5325 withval="$with_build_libs"
5326 BUILD_LIBS="$withval"
5327fi;
micky3879b9f5e72025-07-08 18:04:53 -04005328 echo "$as_me:5328: result: $BUILD_LIBS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005329echo "${ECHO_T}$BUILD_LIBS" >&6
5330
5331 # this assumes we're on Unix.
5332 BUILD_EXEEXT=
5333 BUILD_OBJEXT=o
5334
5335 : ${BUILD_CC:='${CC}'}
5336
micky3879b9f5e72025-07-08 18:04:53 -04005337 echo "$as_me:5337: checking if the build-compiler \"$BUILD_CC\" works" >&5
5338echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5339
5340 cf_save_crossed=$cross_compiling
5341 cf_save_ac_link=$ac_link
5342 cross_compiling=no
5343 cf_build_cppflags=$BUILD_CPPFLAGS
5344 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5345 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5346
5347 if test "$cross_compiling" = yes; then
5348 cf_ok_build_cc=unknown
5349else
5350 cat >"conftest.$ac_ext" <<_ACEOF
5351#line 5351 "configure"
5352#include "confdefs.h"
5353#include <stdio.h>
5354 int main(int argc, char *argv[])
5355 {
5356 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5357 }
5358
5359_ACEOF
5360rm -f "conftest$ac_exeext"
5361if { (eval echo "$as_me:5361: \"$ac_link\"") >&5
5362 (eval $ac_link) 2>&5
5363 ac_status=$?
5364 echo "$as_me:5364: \$? = $ac_status" >&5
5365 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5366 { (eval echo "$as_me:5366: \"$ac_try\"") >&5
5367 (eval $ac_try) 2>&5
5368 ac_status=$?
5369 echo "$as_me:5369: \$? = $ac_status" >&5
5370 (exit "$ac_status"); }; }; then
5371 cf_ok_build_cc=yes
5372else
5373 echo "$as_me: program exited with status $ac_status" >&5
5374echo "$as_me: failed program was:" >&5
5375cat "conftest.$ac_ext" >&5
5376cf_ok_build_cc=no
5377fi
5378rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5379fi
5380
5381 cross_compiling=$cf_save_crossed
5382 ac_link=$cf_save_ac_link
5383
5384 echo "$as_me:5384: result: $cf_ok_build_cc" >&5
5385echo "${ECHO_T}$cf_ok_build_cc" >&6
5386
5387 if test "$cf_ok_build_cc" != yes
5388 then
5389 { { echo "$as_me:5389: error: Cross-build requires two compilers.
Steve Kondikae271bc2015-11-15 02:50:53 +01005390Use --with-build-cc to specify the native compiler." >&5
5391echo "$as_me: error: Cross-build requires two compilers.
5392Use --with-build-cc to specify the native compiler." >&2;}
5393 { (exit 1); exit 1; }; }
5394 fi
5395
5396else
5397 : ${BUILD_CC:='${CC}'}
5398 : ${BUILD_CPP:='${CPP}'}
5399 : ${BUILD_CFLAGS:='${CFLAGS}'}
5400 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5401 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5402 : ${BUILD_LIBS:='${LIBS}'}
5403 : ${BUILD_EXEEXT:='$x'}
5404 : ${BUILD_OBJEXT:='o'}
5405fi
5406
5407###############################################################################
5408
5409### Options to allow the user to specify the set of libraries which are used.
5410### Use "--without-normal --with-shared" to allow the default model to be
5411### shared, for example.
5412cf_list_models=""
5413
micky3879b9f5e72025-07-08 18:04:53 -04005414echo "$as_me:5414: checking if libtool -version-number should be used" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005415echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5416
5417# Check whether --enable-libtool-version or --disable-libtool-version was given.
5418if test "${enable_libtool_version+set}" = set; then
5419 enableval="$enable_libtool_version"
5420 test "$enableval" != no && enableval=yes
5421 if test "$enableval" != "yes" ; then
5422 cf_libtool_version=no
5423 else
5424 cf_libtool_version=yes
5425 fi
5426else
5427 enableval=yes
5428 cf_libtool_version=yes
5429
5430fi;
micky3879b9f5e72025-07-08 18:04:53 -04005431echo "$as_me:5431: result: $cf_libtool_version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005432echo "${ECHO_T}$cf_libtool_version" >&6
5433
5434if test "$cf_libtool_version" = yes ; then
5435 LIBTOOL_VERSION="-version-number"
5436else
5437 LIBTOOL_VERSION="-version-info"
5438 case "x$VERSION" in
5439 (x)
micky3879b9f5e72025-07-08 18:04:53 -04005440 { echo "$as_me:5440: WARNING: VERSION was not set" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005441echo "$as_me: WARNING: VERSION was not set" >&2;}
5442 ;;
5443 (x*.*.*)
5444 ABI_VERSION="$VERSION"
5445 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
5446
micky3879b9f5e72025-07-08 18:04:53 -04005447echo "${as_me:-configure}:5447: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005448
5449 ;;
5450 (x*:*:*)
5451 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5452 test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
5453
micky3879b9f5e72025-07-08 18:04:53 -04005454echo "${as_me:-configure}:5454: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005455
5456 ;;
5457 (*)
micky3879b9f5e72025-07-08 18:04:53 -04005458 { echo "$as_me:5458: WARNING: unexpected VERSION value: $VERSION" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005459echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5460 ;;
5461 esac
5462fi
5463
5464LIBTOOL=
5465
5466# common library maintenance symbols that are convenient for libtool scripts:
5467LIB_CREATE='${AR} -cr'
5468LIB_OBJECT='${OBJECTS}'
5469LIB_SUFFIX=.a
5470LIB_PREP="$RANLIB"
5471
5472# symbols used to prop libtool up to enable it to determine what it should be
5473# doing:
5474LIB_CLEAN=
5475LIB_COMPILE=
5476LIB_LINK='${CC}'
5477LIB_INSTALL=
5478LIB_UNINSTALL=
5479
micky3879b9f5e72025-07-08 18:04:53 -04005480echo "$as_me:5480: checking if you want to build libraries with libtool" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005481echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5482
5483# Check whether --with-libtool or --without-libtool was given.
5484if test "${with_libtool+set}" = set; then
5485 withval="$with_libtool"
5486 with_libtool=$withval
5487else
5488 with_libtool=no
5489fi;
micky3879b9f5e72025-07-08 18:04:53 -04005490echo "$as_me:5490: result: $with_libtool" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005491echo "${ECHO_T}$with_libtool" >&6
5492if test "$with_libtool" != "no"; then
5493
5494 if test "$with_libtool" != "yes" ; then
5495
5496if test "x$prefix" != xNONE; then
5497 cf_path_syntax="$prefix"
5498else
5499 cf_path_syntax="$ac_default_prefix"
5500fi
5501
5502case ".$with_libtool" in
5503(.\$\(*\)*|.\'*\'*)
5504 ;;
5505(..|./*|.\\*)
5506 ;;
5507(.[a-zA-Z]:[\\/]*) # OS/2 EMX
5508 ;;
micky3879b9f5e72025-07-08 18:04:53 -04005509(.\$\{*prefix\}*|.\$\{*dir\}*)
Steve Kondikae271bc2015-11-15 02:50:53 +01005510 eval with_libtool="$with_libtool"
5511 case ".$with_libtool" in
5512 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04005513 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01005514 ;;
5515 esac
5516 ;;
5517(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04005518 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01005519 ;;
5520(*)
micky3879b9f5e72025-07-08 18:04:53 -04005521 { { echo "$as_me:5521: error: expected a pathname, not \"$with_libtool\"" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005522echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5523 { (exit 1); exit 1; }; }
5524 ;;
5525esac
5526
5527 LIBTOOL=$with_libtool
5528 else
5529 if test -n "$ac_tool_prefix"; then
5530 for ac_prog in libtool glibtool
5531 do
5532 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5533set dummy $ac_tool_prefix$ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005534echo "$as_me:5534: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005535echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5536if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5537 echo $ECHO_N "(cached) $ECHO_C" >&6
5538else
5539 if test -n "$LIBTOOL"; then
5540 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5541else
5542 ac_save_IFS=$IFS; IFS=$ac_path_separator
5543ac_dummy="$PATH"
5544for ac_dir in $ac_dummy; do
5545 IFS=$ac_save_IFS
5546 test -z "$ac_dir" && ac_dir=.
5547 $as_executable_p "$ac_dir/$ac_word" || continue
5548ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04005549echo "$as_me:5549: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005550break
5551done
5552
5553fi
5554fi
5555LIBTOOL=$ac_cv_prog_LIBTOOL
5556if test -n "$LIBTOOL"; then
micky3879b9f5e72025-07-08 18:04:53 -04005557 echo "$as_me:5557: result: $LIBTOOL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005558echo "${ECHO_T}$LIBTOOL" >&6
5559else
micky3879b9f5e72025-07-08 18:04:53 -04005560 echo "$as_me:5560: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005561echo "${ECHO_T}no" >&6
5562fi
5563
5564 test -n "$LIBTOOL" && break
5565 done
5566fi
5567if test -z "$LIBTOOL"; then
5568 ac_ct_LIBTOOL=$LIBTOOL
5569 for ac_prog in libtool glibtool
5570do
5571 # Extract the first word of "$ac_prog", so it can be a program name with args.
5572set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005573echo "$as_me:5573: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5575if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5576 echo $ECHO_N "(cached) $ECHO_C" >&6
5577else
5578 if test -n "$ac_ct_LIBTOOL"; then
5579 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5580else
5581 ac_save_IFS=$IFS; IFS=$ac_path_separator
5582ac_dummy="$PATH"
5583for ac_dir in $ac_dummy; do
5584 IFS=$ac_save_IFS
5585 test -z "$ac_dir" && ac_dir=.
5586 $as_executable_p "$ac_dir/$ac_word" || continue
5587ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04005588echo "$as_me:5588: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005589break
5590done
5591
5592fi
5593fi
5594ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5595if test -n "$ac_ct_LIBTOOL"; then
micky3879b9f5e72025-07-08 18:04:53 -04005596 echo "$as_me:5596: result: $ac_ct_LIBTOOL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005597echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5598else
micky3879b9f5e72025-07-08 18:04:53 -04005599 echo "$as_me:5599: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005600echo "${ECHO_T}no" >&6
5601fi
5602
5603 test -n "$ac_ct_LIBTOOL" && break
5604done
5605test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5606
5607 LIBTOOL=$ac_ct_LIBTOOL
5608fi
5609
5610if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5611then
5612 cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5613else
5614 cf_cv_libtool_version=
5615fi
5616test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5617
5618 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5619 then
5620
5621unset ac_cv_prog_ac_ct_LIBTOOL
5622unset ac_ct_LIBTOOL
5623unset LIBTOOL
5624
5625 if test -n "$ac_tool_prefix"; then
5626 for ac_prog in glibtool
5627 do
5628 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5629set dummy $ac_tool_prefix$ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005630echo "$as_me:5630: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005631echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5632if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5633 echo $ECHO_N "(cached) $ECHO_C" >&6
5634else
5635 if test -n "$LIBTOOL"; then
5636 ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5637else
5638 ac_save_IFS=$IFS; IFS=$ac_path_separator
5639ac_dummy="$PATH"
5640for ac_dir in $ac_dummy; do
5641 IFS=$ac_save_IFS
5642 test -z "$ac_dir" && ac_dir=.
5643 $as_executable_p "$ac_dir/$ac_word" || continue
5644ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04005645echo "$as_me:5645: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005646break
5647done
5648
5649fi
5650fi
5651LIBTOOL=$ac_cv_prog_LIBTOOL
5652if test -n "$LIBTOOL"; then
micky3879b9f5e72025-07-08 18:04:53 -04005653 echo "$as_me:5653: result: $LIBTOOL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005654echo "${ECHO_T}$LIBTOOL" >&6
5655else
micky3879b9f5e72025-07-08 18:04:53 -04005656 echo "$as_me:5656: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005657echo "${ECHO_T}no" >&6
5658fi
5659
5660 test -n "$LIBTOOL" && break
5661 done
5662fi
5663if test -z "$LIBTOOL"; then
5664 ac_ct_LIBTOOL=$LIBTOOL
5665 for ac_prog in glibtool
5666do
5667 # Extract the first word of "$ac_prog", so it can be a program name with args.
5668set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04005669echo "$as_me:5669: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005670echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5671if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5672 echo $ECHO_N "(cached) $ECHO_C" >&6
5673else
5674 if test -n "$ac_ct_LIBTOOL"; then
5675 ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5676else
5677 ac_save_IFS=$IFS; IFS=$ac_path_separator
5678ac_dummy="$PATH"
5679for ac_dir in $ac_dummy; do
5680 IFS=$ac_save_IFS
5681 test -z "$ac_dir" && ac_dir=.
5682 $as_executable_p "$ac_dir/$ac_word" || continue
5683ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04005684echo "$as_me:5684: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005685break
5686done
5687
5688fi
5689fi
5690ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5691if test -n "$ac_ct_LIBTOOL"; then
micky3879b9f5e72025-07-08 18:04:53 -04005692 echo "$as_me:5692: result: $ac_ct_LIBTOOL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005693echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5694else
micky3879b9f5e72025-07-08 18:04:53 -04005695 echo "$as_me:5695: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005696echo "${ECHO_T}no" >&6
5697fi
5698
5699 test -n "$ac_ct_LIBTOOL" && break
5700done
5701test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5702
5703 LIBTOOL=$ac_ct_LIBTOOL
5704fi
5705
5706if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5707then
5708 cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5709else
5710 cf_cv_libtool_version=
5711fi
5712test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5713
5714 fi
5715 fi
5716 if test -z "$LIBTOOL" ; then
micky3879b9f5e72025-07-08 18:04:53 -04005717 { { echo "$as_me:5717: error: Cannot find libtool" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005718echo "$as_me: error: Cannot find libtool" >&2;}
5719 { (exit 1); exit 1; }; }
5720 fi
micky3879b9f5e72025-07-08 18:04:53 -04005721 LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
Steve Kondikae271bc2015-11-15 02:50:53 +01005722 LIB_OBJECT='${OBJECTS:.o=.lo}'
5723 LIB_SUFFIX=.la
5724 LIB_CLEAN='${LIBTOOL} --mode=clean'
5725 LIB_COMPILE='${LIBTOOL} --mode=compile'
5726 LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5727 LIB_INSTALL='${LIBTOOL} --mode=install'
5728 LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5729 LIB_PREP=:
5730
5731if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5732then
micky3879b9f5e72025-07-08 18:04:53 -04005733 echo "$as_me:5733: checking version of $LIBTOOL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005734echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5735
5736if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5737then
5738 cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5739else
5740 cf_cv_libtool_version=
5741fi
5742test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5743
micky3879b9f5e72025-07-08 18:04:53 -04005744 echo "$as_me:5744: result: $cf_cv_libtool_version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005745echo "${ECHO_T}$cf_cv_libtool_version" >&6
micky3879b9f5e72025-07-08 18:04:53 -04005746 if test -n "$cf_cv_libtool_version"
5747 then
5748 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5749 case "x$cf_check_libtool_version" in
5750 (*...GNU-libtool...*)
5751 ;;
5752 (*)
5753 { { echo "$as_me:5753: error: This is not GNU libtool" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005754echo "$as_me: error: This is not GNU libtool" >&2;}
5755 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -04005756 ;;
5757 esac
5758 else
5759 { { echo "$as_me:5759: error: No version found for $LIBTOOL" >&5
5760echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5761 { (exit 1); exit 1; }; }
Steve Kondikae271bc2015-11-15 02:50:53 +01005762 fi
5763else
micky3879b9f5e72025-07-08 18:04:53 -04005764 { { echo "$as_me:5764: error: GNU libtool has not been found" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005765echo "$as_me: error: GNU libtool has not been found" >&2;}
5766 { (exit 1); exit 1; }; }
5767fi
5768
5769 # special hack to add -no-undefined (which libtool should do for itself)
5770 LT_UNDEF=
5771 case "$cf_cv_system_name" in
micky3879b9f5e72025-07-08 18:04:53 -04005772 (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
Steve Kondikae271bc2015-11-15 02:50:53 +01005773 LT_UNDEF=-no-undefined
5774 ;;
5775 esac
5776
5777 # special hack to add --tag option for C++ compiler
micky3879b9f5e72025-07-08 18:04:53 -04005778 case "$cf_cv_libtool_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +01005779 (1.[5-9]*|[2-9].[0-9.a-z]*)
5780 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5781 LIBTOOL="$LIBTOOL --tag=CC"
5782 ;;
5783 (*)
5784 LIBTOOL_CXX="$LIBTOOL"
5785 ;;
5786 esac
5787else
5788 LIBTOOL=""
5789 LIBTOOL_CXX=""
5790fi
5791
5792test -z "$LIBTOOL" && ECHO_LT=
5793
5794if test "$with_libtool" != "no" ; then
5795
5796cf_list_models="$cf_list_models libtool"
5797
5798else
5799
micky3879b9f5e72025-07-08 18:04:53 -04005800echo "$as_me:5800: checking if you want to build shared libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005801echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5802
5803# Check whether --with-shared or --without-shared was given.
5804if test "${with_shared+set}" = set; then
5805 withval="$with_shared"
5806 with_shared=$withval
5807else
5808 with_shared=no
5809fi;
micky3879b9f5e72025-07-08 18:04:53 -04005810echo "$as_me:5810: result: $with_shared" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005811echo "${ECHO_T}$with_shared" >&6
5812test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5813
micky3879b9f5e72025-07-08 18:04:53 -04005814echo "$as_me:5814: checking if you want to build static libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005815echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5816
5817# Check whether --with-normal or --without-normal was given.
5818if test "${with_normal+set}" = set; then
5819 withval="$with_normal"
5820 with_normal=$withval
5821else
5822 with_normal=yes
5823fi;
micky3879b9f5e72025-07-08 18:04:53 -04005824echo "$as_me:5824: result: $with_normal" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005825echo "${ECHO_T}$with_normal" >&6
5826test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5827
micky3879b9f5e72025-07-08 18:04:53 -04005828echo "$as_me:5828: checking if you want to build debug libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005829echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5830
5831# Check whether --with-debug or --without-debug was given.
5832if test "${with_debug+set}" = set; then
5833 withval="$with_debug"
5834 with_debug=$withval
5835else
5836 with_debug=yes
5837fi;
micky3879b9f5e72025-07-08 18:04:53 -04005838echo "$as_me:5838: result: $with_debug" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005839echo "${ECHO_T}$with_debug" >&6
5840test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5841
micky3879b9f5e72025-07-08 18:04:53 -04005842echo "$as_me:5842: checking if you want to build profiling libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005843echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5844
5845# Check whether --with-profile or --without-profile was given.
5846if test "${with_profile+set}" = set; then
5847 withval="$with_profile"
5848 with_profile=$withval
5849else
5850 with_profile=no
5851fi;
micky3879b9f5e72025-07-08 18:04:53 -04005852echo "$as_me:5852: result: $with_profile" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005853echo "${ECHO_T}$with_profile" >&6
5854test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5855
5856fi
5857
5858if test "X$cf_with_cxx_binding" != Xno; then
5859if test "x$with_shared" = "xyes"; then
micky3879b9f5e72025-07-08 18:04:53 -04005860echo "$as_me:5860: checking if you want to build C++ shared libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005861echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5862
5863# Check whether --with-cxx-shared or --without-cxx-shared was given.
5864if test "${with_cxx_shared+set}" = set; then
5865 withval="$with_cxx_shared"
5866 with_shared_cxx=$withval
5867else
5868 with_shared_cxx=no
5869fi;
micky3879b9f5e72025-07-08 18:04:53 -04005870echo "$as_me:5870: result: $with_shared_cxx" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005871echo "${ECHO_T}$with_shared_cxx" >&6
5872fi
5873fi
5874
5875###############################################################################
5876
micky3879b9f5e72025-07-08 18:04:53 -04005877echo "$as_me:5877: checking for specified models" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005878echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5879test -z "$cf_list_models" && cf_list_models=normal
5880test "$with_libtool" != "no" && cf_list_models=libtool
micky3879b9f5e72025-07-08 18:04:53 -04005881echo "$as_me:5881: result: $cf_list_models" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005882echo "${ECHO_T}$cf_list_models" >&6
5883
5884### Use the first model as the default, and save its suffix for use in building
5885### up test-applications.
micky3879b9f5e72025-07-08 18:04:53 -04005886echo "$as_me:5886: checking for default model" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005887echo $ECHO_N "checking for default model... $ECHO_C" >&6
5888DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
micky3879b9f5e72025-07-08 18:04:53 -04005889echo "$as_me:5889: result: $DFT_LWR_MODEL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005890echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5891
5892DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5893
5894TICS_NAME=tic
5895
5896TINFO_NAME=tinfo
5897
5898LIB_NAME=ncurses
5899
5900LIB_DIR=../lib
5901LIB_2ND=../../lib
5902
micky3879b9f5e72025-07-08 18:04:53 -04005903echo "$as_me:5903: checking if you want to have a library-prefix" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005904echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5905
5906# Check whether --with-lib-prefix or --without-lib-prefix was given.
5907if test "${with_lib_prefix+set}" = set; then
5908 withval="$with_lib_prefix"
5909 with_lib_prefix=$withval
5910else
5911 with_lib_prefix=auto
5912fi;
micky3879b9f5e72025-07-08 18:04:53 -04005913echo "$as_me:5913: result: $with_lib_prefix" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005914echo "${ECHO_T}$with_lib_prefix" >&6
5915
micky3879b9f5e72025-07-08 18:04:53 -04005916if test "$with_lib_prefix" = auto
Steve Kondikae271bc2015-11-15 02:50:53 +01005917then
5918
micky3879b9f5e72025-07-08 18:04:53 -04005919 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +01005920 (OS/2*|os2*)
micky3879b9f5e72025-07-08 18:04:53 -04005921 if test "$DFT_LWR_MODEL" = libtool; then
5922 LIB_PREFIX='lib'
5923 else
5924 LIB_PREFIX=''
5925 fi
5926 ;;
5927 (*-msvc*)
Steve Kondikae271bc2015-11-15 02:50:53 +01005928 LIB_PREFIX=''
5929 ;;
5930 (*) LIB_PREFIX='lib'
5931 ;;
5932 esac
5933cf_prefix=$LIB_PREFIX
5934
micky3879b9f5e72025-07-08 18:04:53 -04005935elif test "$with_lib_prefix" = no
Steve Kondikae271bc2015-11-15 02:50:53 +01005936then
5937 LIB_PREFIX=
5938else
5939 LIB_PREFIX=$with_lib_prefix
5940fi
5941
5942LIB_SUFFIX=
5943
micky3879b9f5e72025-07-08 18:04:53 -04005944 echo "$as_me:5944: checking for PATH separator" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005945echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04005946 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +01005947 (os2*) PATH_SEPARATOR=';' ;;
5948 (*) ${PATH_SEPARATOR:=':'} ;;
5949 esac
5950
micky3879b9f5e72025-07-08 18:04:53 -04005951 echo "$as_me:5951: result: $PATH_SEPARATOR" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01005952echo "${ECHO_T}$PATH_SEPARATOR" >&6
5953
micky3879b9f5e72025-07-08 18:04:53 -04005954# headers needed for checks...
5955echo "$as_me:5955: checking for ANSI C header files" >&5
5956echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5957if test "${ac_cv_header_stdc+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +01005958 echo $ECHO_N "(cached) $ECHO_C" >&6
5959else
micky3879b9f5e72025-07-08 18:04:53 -04005960 cat >"conftest.$ac_ext" <<_ACEOF
5961#line 5961 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01005962#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -04005963#include <stdlib.h>
5964#include <stdarg.h>
5965#include <string.h>
5966#include <float.h>
5967
Steve Kondikae271bc2015-11-15 02:50:53 +01005968_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04005969if { (eval echo "$as_me:5969: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5970 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +01005971 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04005972 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +01005973 rm -f conftest.er1
5974 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -04005975 echo "$as_me:5975: \$? = $ac_status" >&5
5976 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +01005977 if test -s conftest.err; then
5978 ac_cpp_err=$ac_c_preproc_warn_flag
5979 else
5980 ac_cpp_err=
5981 fi
5982else
5983 ac_cpp_err=yes
5984fi
5985if test -z "$ac_cpp_err"; then
micky3879b9f5e72025-07-08 18:04:53 -04005986 ac_cv_header_stdc=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01005987else
5988 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04005989 cat "conftest.$ac_ext" >&5
5990 ac_cv_header_stdc=no
Steve Kondikae271bc2015-11-15 02:50:53 +01005991fi
micky3879b9f5e72025-07-08 18:04:53 -04005992rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01005993
micky3879b9f5e72025-07-08 18:04:53 -04005994if test $ac_cv_header_stdc = yes; then
5995 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5996 cat >"conftest.$ac_ext" <<_ACEOF
5997#line 5997 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01005998#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -04005999#include <string.h>
Steve Kondikae271bc2015-11-15 02:50:53 +01006000
Steve Kondikae271bc2015-11-15 02:50:53 +01006001_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04006002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6003 $EGREP "memchr" >/dev/null 2>&1; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006004 :
6005else
micky3879b9f5e72025-07-08 18:04:53 -04006006 ac_cv_header_stdc=no
Steve Kondikae271bc2015-11-15 02:50:53 +01006007fi
Steve Kondikae271bc2015-11-15 02:50:53 +01006008rm -rf conftest*
Steve Kondikae271bc2015-11-15 02:50:53 +01006009
6010fi
Steve Kondikae271bc2015-11-15 02:50:53 +01006011
micky3879b9f5e72025-07-08 18:04:53 -04006012if test $ac_cv_header_stdc = yes; then
6013 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6014 cat >"conftest.$ac_ext" <<_ACEOF
6015#line 6015 "configure"
6016#include "confdefs.h"
6017#include <stdlib.h>
Steve Kondikae271bc2015-11-15 02:50:53 +01006018
micky3879b9f5e72025-07-08 18:04:53 -04006019_ACEOF
6020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6021 $EGREP "free" >/dev/null 2>&1; then
6022 :
6023else
6024 ac_cv_header_stdc=no
6025fi
6026rm -rf conftest*
Steve Kondikae271bc2015-11-15 02:50:53 +01006027
micky3879b9f5e72025-07-08 18:04:53 -04006028fi
Steve Kondikae271bc2015-11-15 02:50:53 +01006029
micky3879b9f5e72025-07-08 18:04:53 -04006030if test $ac_cv_header_stdc = yes; then
6031 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6032 if test "$cross_compiling" = yes; then
6033 :
6034else
6035 cat >"conftest.$ac_ext" <<_ACEOF
6036#line 6036 "configure"
6037#include "confdefs.h"
6038#include <ctype.h>
6039#if ((' ' & 0x0FF) == 0x020)
6040# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6041# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6042#else
6043# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6044 || ('j' <= (c) && (c) <= 'r') \
6045 || ('s' <= (c) && (c) <= 'z'))
6046# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6047#endif
6048
6049#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6050int
6051main (void)
6052{
6053 int i;
6054 for (i = 0; i < 256; i++)
6055 if (XOR (islower (i), ISLOWER (i))
6056 || toupper (i) != TOUPPER (i))
6057 $ac_main_return(2);
6058 $ac_main_return (0);
6059}
6060_ACEOF
6061rm -f "conftest$ac_exeext"
6062if { (eval echo "$as_me:6062: \"$ac_link\"") >&5
6063 (eval $ac_link) 2>&5
6064 ac_status=$?
6065 echo "$as_me:6065: \$? = $ac_status" >&5
6066 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6067 { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068 (eval $ac_try) 2>&5
6069 ac_status=$?
6070 echo "$as_me:6070: \$? = $ac_status" >&5
6071 (exit "$ac_status"); }; }; then
6072 :
6073else
6074 echo "$as_me: program exited with status $ac_status" >&5
6075echo "$as_me: failed program was:" >&5
6076cat "conftest.$ac_ext" >&5
6077ac_cv_header_stdc=no
6078fi
6079rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6080fi
6081fi
6082fi
6083echo "$as_me:6083: result: $ac_cv_header_stdc" >&5
6084echo "${ECHO_T}$ac_cv_header_stdc" >&6
6085if test $ac_cv_header_stdc = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006086
6087cat >>confdefs.h <<\EOF
micky3879b9f5e72025-07-08 18:04:53 -04006088#define STDC_HEADERS 1
Steve Kondikae271bc2015-11-15 02:50:53 +01006089EOF
6090
micky3879b9f5e72025-07-08 18:04:53 -04006091fi
6092
6093# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6094
6095for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6096 inttypes.h stdint.h unistd.h
6097do
6098as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6099echo "$as_me:6099: checking for $ac_header" >&5
6100echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6101if eval "test \"\${$as_ac_Header+set}\" = set"; then
6102 echo $ECHO_N "(cached) $ECHO_C" >&6
6103else
6104 cat >"conftest.$ac_ext" <<_ACEOF
6105#line 6105 "configure"
6106#include "confdefs.h"
6107$ac_includes_default
6108#include <$ac_header>
6109_ACEOF
6110rm -f "conftest.$ac_objext"
6111if { (eval echo "$as_me:6111: \"$ac_compile\"") >&5
6112 (eval $ac_compile) 2>&5
6113 ac_status=$?
6114 echo "$as_me:6114: \$? = $ac_status" >&5
6115 (exit "$ac_status"); } &&
6116 { ac_try='test -s "conftest.$ac_objext"'
6117 { (eval echo "$as_me:6117: \"$ac_try\"") >&5
6118 (eval $ac_try) 2>&5
6119 ac_status=$?
6120 echo "$as_me:6120: \$? = $ac_status" >&5
6121 (exit "$ac_status"); }; }; then
6122 eval "$as_ac_Header=yes"
6123else
6124 echo "$as_me: failed program was:" >&5
6125cat "conftest.$ac_ext" >&5
6126eval "$as_ac_Header=no"
6127fi
6128rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6129fi
6130echo "$as_me:6130: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6131echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6132if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6133 cat >>confdefs.h <<EOF
6134#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6135EOF
6136
6137fi
6138done
6139
6140echo "$as_me:6140: checking whether exit is declared" >&5
6141echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6142if test "${ac_cv_have_decl_exit+set}" = set; then
6143 echo $ECHO_N "(cached) $ECHO_C" >&6
6144else
6145 cat >"conftest.$ac_ext" <<_ACEOF
6146#line 6146 "configure"
6147#include "confdefs.h"
6148$ac_includes_default
6149int
6150main (void)
6151{
6152#ifndef exit
6153 (void) exit;
6154#endif
6155
6156 ;
6157 return 0;
6158}
6159_ACEOF
6160rm -f "conftest.$ac_objext"
6161if { (eval echo "$as_me:6161: \"$ac_compile\"") >&5
6162 (eval $ac_compile) 2>&5
6163 ac_status=$?
6164 echo "$as_me:6164: \$? = $ac_status" >&5
6165 (exit "$ac_status"); } &&
6166 { ac_try='test -s "conftest.$ac_objext"'
6167 { (eval echo "$as_me:6167: \"$ac_try\"") >&5
6168 (eval $ac_try) 2>&5
6169 ac_status=$?
6170 echo "$as_me:6170: \$? = $ac_status" >&5
6171 (exit "$ac_status"); }; }; then
6172 ac_cv_have_decl_exit=yes
6173else
6174 echo "$as_me: failed program was:" >&5
6175cat "conftest.$ac_ext" >&5
6176ac_cv_have_decl_exit=no
6177fi
6178rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6179fi
6180echo "$as_me:6180: result: $ac_cv_have_decl_exit" >&5
6181echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6182
6183ac_header_dirent=no
6184for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6185 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6186echo "$as_me:6186: checking for $ac_hdr that defines DIR" >&5
6187echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6188if eval "test \"\${$as_ac_Header+set}\" = set"; then
6189 echo $ECHO_N "(cached) $ECHO_C" >&6
6190else
6191 cat >"conftest.$ac_ext" <<_ACEOF
6192#line 6192 "configure"
6193#include "confdefs.h"
6194#include <sys/types.h>
6195#include <$ac_hdr>
6196
6197int
6198main (void)
6199{
6200if ((DIR *) 0)
6201return 0;
6202 ;
6203 return 0;
6204}
6205_ACEOF
6206rm -f "conftest.$ac_objext"
6207if { (eval echo "$as_me:6207: \"$ac_compile\"") >&5
6208 (eval $ac_compile) 2>&5
6209 ac_status=$?
6210 echo "$as_me:6210: \$? = $ac_status" >&5
6211 (exit "$ac_status"); } &&
6212 { ac_try='test -s "conftest.$ac_objext"'
6213 { (eval echo "$as_me:6213: \"$ac_try\"") >&5
6214 (eval $ac_try) 2>&5
6215 ac_status=$?
6216 echo "$as_me:6216: \$? = $ac_status" >&5
6217 (exit "$ac_status"); }; }; then
6218 eval "$as_ac_Header=yes"
6219else
6220 echo "$as_me: failed program was:" >&5
6221cat "conftest.$ac_ext" >&5
6222eval "$as_ac_Header=no"
6223fi
6224rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6225fi
6226echo "$as_me:6226: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6227echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6228if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6229 cat >>confdefs.h <<EOF
6230#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6231EOF
6232
6233ac_header_dirent=$ac_hdr; break
6234fi
6235
6236done
6237# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6238if test $ac_header_dirent = dirent.h; then
6239 echo "$as_me:6239: checking for opendir in -ldir" >&5
6240echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6241if test "${ac_cv_lib_dir_opendir+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006242 echo $ECHO_N "(cached) $ECHO_C" >&6
6243else
6244 ac_check_lib_save_LIBS=$LIBS
micky3879b9f5e72025-07-08 18:04:53 -04006245LIBS="-ldir $LIBS"
6246cat >"conftest.$ac_ext" <<_ACEOF
6247#line 6247 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01006248#include "confdefs.h"
6249
6250/* Override any gcc2 internal prototype to avoid an error. */
6251#ifdef __cplusplus
6252extern "C"
6253#endif
6254/* We use char because int might match the return type of a gcc2
6255 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -04006256char opendir (void);
Steve Kondikae271bc2015-11-15 02:50:53 +01006257int
micky3879b9f5e72025-07-08 18:04:53 -04006258main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01006259{
micky3879b9f5e72025-07-08 18:04:53 -04006260opendir ();
Steve Kondikae271bc2015-11-15 02:50:53 +01006261 ;
6262 return 0;
6263}
6264_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04006265rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6266if { (eval echo "$as_me:6266: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006267 (eval $ac_link) 2>&5
6268 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006269 echo "$as_me:6269: \$? = $ac_status" >&5
6270 (exit "$ac_status"); } &&
6271 { ac_try='test -s "conftest$ac_exeext"'
6272 { (eval echo "$as_me:6272: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006273 (eval $ac_try) 2>&5
6274 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006275 echo "$as_me:6275: \$? = $ac_status" >&5
6276 (exit "$ac_status"); }; }; then
6277 ac_cv_lib_dir_opendir=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01006278else
6279 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04006280cat "conftest.$ac_ext" >&5
6281ac_cv_lib_dir_opendir=no
Steve Kondikae271bc2015-11-15 02:50:53 +01006282fi
micky3879b9f5e72025-07-08 18:04:53 -04006283rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01006284LIBS=$ac_check_lib_save_LIBS
6285fi
micky3879b9f5e72025-07-08 18:04:53 -04006286echo "$as_me:6286: result: $ac_cv_lib_dir_opendir" >&5
6287echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6288if test "$ac_cv_lib_dir_opendir" = yes; then
6289 LIBS="$LIBS -ldir"
6290fi
Steve Kondikae271bc2015-11-15 02:50:53 +01006291
micky3879b9f5e72025-07-08 18:04:53 -04006292else
6293 echo "$as_me:6293: checking for opendir in -lx" >&5
6294echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6295if test "${ac_cv_lib_x_opendir+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006296 echo $ECHO_N "(cached) $ECHO_C" >&6
6297else
micky3879b9f5e72025-07-08 18:04:53 -04006298 ac_check_lib_save_LIBS=$LIBS
6299LIBS="-lx $LIBS"
6300cat >"conftest.$ac_ext" <<_ACEOF
6301#line 6301 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01006302#include "confdefs.h"
6303
micky3879b9f5e72025-07-08 18:04:53 -04006304/* Override any gcc2 internal prototype to avoid an error. */
6305#ifdef __cplusplus
6306extern "C"
Steve Kondikae271bc2015-11-15 02:50:53 +01006307#endif
micky3879b9f5e72025-07-08 18:04:53 -04006308/* We use char because int might match the return type of a gcc2
6309 builtin and then its argument prototype would still apply. */
6310char opendir (void);
Steve Kondikae271bc2015-11-15 02:50:53 +01006311int
micky3879b9f5e72025-07-08 18:04:53 -04006312main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01006313{
micky3879b9f5e72025-07-08 18:04:53 -04006314opendir ();
Steve Kondikae271bc2015-11-15 02:50:53 +01006315 ;
6316 return 0;
6317}
6318_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04006319rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6320if { (eval echo "$as_me:6320: \"$ac_link\"") >&5
6321 (eval $ac_link) 2>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006322 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006323 echo "$as_me:6323: \$? = $ac_status" >&5
6324 (exit "$ac_status"); } &&
6325 { ac_try='test -s "conftest$ac_exeext"'
6326 { (eval echo "$as_me:6326: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006327 (eval $ac_try) 2>&5
6328 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006329 echo "$as_me:6329: \$? = $ac_status" >&5
6330 (exit "$ac_status"); }; }; then
6331 ac_cv_lib_x_opendir=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01006332else
6333 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04006334cat "conftest.$ac_ext" >&5
6335ac_cv_lib_x_opendir=no
Steve Kondikae271bc2015-11-15 02:50:53 +01006336fi
micky3879b9f5e72025-07-08 18:04:53 -04006337rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6338LIBS=$ac_check_lib_save_LIBS
6339fi
6340echo "$as_me:6340: result: $ac_cv_lib_x_opendir" >&5
6341echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6342if test "$ac_cv_lib_x_opendir" = yes; then
6343 LIBS="$LIBS -lx"
6344fi
Steve Kondikae271bc2015-11-15 02:50:53 +01006345
6346fi
6347
micky3879b9f5e72025-07-08 18:04:53 -04006348###############################################################################
6349
6350echo "$as_me:6350: checking if you want to build a separate terminfo library" >&5
6351echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6352
6353# Check whether --with-termlib or --without-termlib was given.
6354if test "${with_termlib+set}" = set; then
6355 withval="$with_termlib"
6356 with_termlib=$withval
6357else
6358 with_termlib=no
6359fi;
6360echo "$as_me:6360: result: $with_termlib" >&5
6361echo "${ECHO_T}$with_termlib" >&6
6362
6363echo "$as_me:6363: checking if you want to build a separate tic library" >&5
6364echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6365
6366# Check whether --with-ticlib or --without-ticlib was given.
6367if test "${with_ticlib+set}" = set; then
6368 withval="$with_ticlib"
6369 with_ticlib=$withval
6370else
6371 with_ticlib=no
6372fi;
6373echo "$as_me:6373: result: $with_ticlib" >&5
6374echo "${ECHO_T}$with_ticlib" >&6
6375
Steve Kondikae271bc2015-11-15 02:50:53 +01006376if test X"$CC_G_OPT" = X"" ; then
6377 CC_G_OPT='-g'
6378 test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6379fi
6380
6381if test X"$CXX_G_OPT" = X"" ; then
6382 CXX_G_OPT='-g'
6383 test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6384fi
6385
micky3879b9f5e72025-07-08 18:04:53 -04006386echo "$as_me:6386: checking for default loader flags" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006387echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04006388case "$DFT_LWR_MODEL" in
Steve Kondikae271bc2015-11-15 02:50:53 +01006389(libtool) LD_MODEL='' ;;
6390(normal) LD_MODEL='' ;;
6391(debug) LD_MODEL=$CC_G_OPT ;;
6392(profile) LD_MODEL='-pg';;
6393(shared) LD_MODEL='' ;;
6394esac
micky3879b9f5e72025-07-08 18:04:53 -04006395echo "$as_me:6395: result: ${LD_MODEL:-(none)}" >&5
6396echo "${ECHO_T}${LD_MODEL:-(none)}" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01006397
micky3879b9f5e72025-07-08 18:04:53 -04006398case "$DFT_LWR_MODEL" in
Steve Kondikae271bc2015-11-15 02:50:53 +01006399(shared)
6400
micky3879b9f5e72025-07-08 18:04:53 -04006401echo "$as_me:6401: checking if rpath option should be used" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006402echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6403
6404# Check whether --enable-rpath or --disable-rpath was given.
6405if test "${enable_rpath+set}" = set; then
6406 enableval="$enable_rpath"
6407 cf_cv_enable_rpath=$enableval
6408else
6409 cf_cv_enable_rpath=no
6410fi;
micky3879b9f5e72025-07-08 18:04:53 -04006411echo "$as_me:6411: result: $cf_cv_enable_rpath" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006412echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6413
micky3879b9f5e72025-07-08 18:04:53 -04006414echo "$as_me:6414: checking if shared libraries should be relinked during install" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006415echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6416
6417# Check whether --enable-relink or --disable-relink was given.
6418if test "${enable_relink+set}" = set; then
6419 enableval="$enable_relink"
6420 cf_cv_do_relink=$enableval
6421else
6422 cf_cv_do_relink=yes
6423fi;
micky3879b9f5e72025-07-08 18:04:53 -04006424echo "$as_me:6424: result: $cf_cv_do_relink" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006425echo "${ECHO_T}$cf_cv_do_relink" >&6
6426 ;;
6427esac
6428
6429# we will build libraries one-level down.
6430rel_builddir=..
6431
6432LD_RPATH_OPT=
micky3879b9f5e72025-07-08 18:04:53 -04006433if test "x$cf_cv_enable_rpath" != xno
6434then
6435 echo "$as_me:6435: checking for an rpath option" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006436echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04006437 case "$cf_cv_system_name" in
6438 (irix*)
6439 if test "$GCC" = yes; then
6440 LD_RPATH_OPT="-Wl,-rpath,"
6441 else
6442 LD_RPATH_OPT="-rpath "
6443 fi
6444 ;;
6445 (linux*|gnu*|k*bsd*-gnu|freebsd*)
Steve Kondikae271bc2015-11-15 02:50:53 +01006446 LD_RPATH_OPT="-Wl,-rpath,"
micky3879b9f5e72025-07-08 18:04:53 -04006447 ;;
6448 (openbsd[2-9].*|mirbsd*)
6449 LD_RPATH_OPT="-Wl,-rpath,"
6450 ;;
6451 (dragonfly*)
Steve Kondikae271bc2015-11-15 02:50:53 +01006452 LD_RPATH_OPT="-rpath "
micky3879b9f5e72025-07-08 18:04:53 -04006453 ;;
6454 (netbsd*)
6455 LD_RPATH_OPT="-Wl,-rpath,"
6456 ;;
6457 (osf*|mls+*)
6458 LD_RPATH_OPT="-rpath "
6459 ;;
6460 (solaris2*)
6461 LD_RPATH_OPT="-R"
6462 ;;
6463 (*)
6464 ;;
6465 esac
6466 echo "$as_me:6466: result: $LD_RPATH_OPT" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006467echo "${ECHO_T}$LD_RPATH_OPT" >&6
6468
micky3879b9f5e72025-07-08 18:04:53 -04006469 case "x$LD_RPATH_OPT" in
6470 (x-R*)
6471 echo "$as_me:6471: checking if we need a space after rpath option" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006472echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04006473 cf_save_LIBS="$LIBS"
Steve Kondikae271bc2015-11-15 02:50:53 +01006474
micky3879b9f5e72025-07-08 18:04:53 -04006475cf_add_libs="$LIBS"
6476# reverse order
6477cf_add_0lib=
6478for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6479# filter duplicates
6480for cf_add_1lib in $cf_add_0lib; do
6481 for cf_add_2lib in $cf_add_libs; do
6482 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006483 cf_add_1lib=
6484 break
6485 fi
6486 done
micky3879b9f5e72025-07-08 18:04:53 -04006487 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +01006488done
6489LIBS="$cf_add_libs"
6490
micky3879b9f5e72025-07-08 18:04:53 -04006491 cat >"conftest.$ac_ext" <<_ACEOF
6492#line 6492 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01006493#include "confdefs.h"
6494
6495int
micky3879b9f5e72025-07-08 18:04:53 -04006496main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01006497{
6498
6499 ;
6500 return 0;
6501}
6502_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04006503rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6504if { (eval echo "$as_me:6504: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006505 (eval $ac_link) 2>&5
6506 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006507 echo "$as_me:6507: \$? = $ac_status" >&5
6508 (exit "$ac_status"); } &&
6509 { ac_try='test -s "conftest$ac_exeext"'
6510 { (eval echo "$as_me:6510: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006511 (eval $ac_try) 2>&5
6512 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006513 echo "$as_me:6513: \$? = $ac_status" >&5
6514 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006515 cf_rpath_space=no
6516else
6517 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04006518cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006519cf_rpath_space=yes
6520fi
micky3879b9f5e72025-07-08 18:04:53 -04006521rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6522 LIBS="$cf_save_LIBS"
6523 echo "$as_me:6523: result: $cf_rpath_space" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006524echo "${ECHO_T}$cf_rpath_space" >&6
micky3879b9f5e72025-07-08 18:04:53 -04006525 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6526 ;;
6527 esac
6528fi
Steve Kondikae271bc2015-11-15 02:50:53 +01006529
6530 RM_SHARED_OPTS=
6531 LOCAL_LDFLAGS=
6532 LOCAL_LDFLAGS2=
6533 LD_SHARED_OPTS=
6534 INSTALL_LIB="-m 644"
6535 : ${rel_builddir:=.}
6536
6537 shlibdir=$libdir
6538
6539 MAKE_DLLS="#"
6540
6541 cf_cv_do_symlinks=no
6542 cf_ld_rpath_opt=
6543 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6544
micky3879b9f5e72025-07-08 18:04:53 -04006545 echo "$as_me:6545: checking whether to use release or ABI version in shared library file names" >&5
6546echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01006547
6548# Check whether --with-shlib-version or --without-shlib-version was given.
6549if test "${with_shlib_version+set}" = set; then
6550 withval="$with_shlib_version"
6551 test -z "$withval" && withval=auto
micky3879b9f5e72025-07-08 18:04:53 -04006552 case "$withval" in
Steve Kondikae271bc2015-11-15 02:50:53 +01006553 (yes)
6554 cf_cv_shlib_version=auto
6555 ;;
micky3879b9f5e72025-07-08 18:04:53 -04006556 (rel|abi|auto)
Steve Kondikae271bc2015-11-15 02:50:53 +01006557 cf_cv_shlib_version=$withval
6558 ;;
6559 (*)
micky3879b9f5e72025-07-08 18:04:53 -04006560 echo "$as_me:6560: result: $withval" >&5
6561echo "${ECHO_T}$withval" >&6
6562 { { echo "$as_me:6562: error: option value must be one of: rel, abi, or auto" >&5
6563echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +01006564 { (exit 1); exit 1; }; }
6565 ;;
6566 esac
6567
6568else
6569 cf_cv_shlib_version=auto
6570fi;
micky3879b9f5e72025-07-08 18:04:53 -04006571 echo "$as_me:6571: result: $cf_cv_shlib_version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006572echo "${ECHO_T}$cf_cv_shlib_version" >&6
6573
6574 cf_cv_rm_so_locs=no
6575 cf_try_cflags=
6576
6577 # Some less-capable ports of gcc support only -fpic
6578 CC_SHARED_OPTS=
micky3879b9f5e72025-07-08 18:04:53 -04006579
6580 cf_try_fPIC=no
Steve Kondikae271bc2015-11-15 02:50:53 +01006581 if test "$GCC" = yes
6582 then
micky3879b9f5e72025-07-08 18:04:53 -04006583 cf_try_fPIC=yes
6584 else
6585 case "$cf_cv_system_name" in
6586 (*linux*) # e.g., PGI compiler
6587 cf_try_fPIC=yes
6588 ;;
6589 esac
6590 fi
6591
6592 if test "$cf_try_fPIC" = yes
6593 then
6594 echo "$as_me:6594: checking which $CC option to use" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006595echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6596 cf_save_CFLAGS="$CFLAGS"
6597 for CC_SHARED_OPTS in -fPIC -fpic ''
6598 do
6599 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
micky3879b9f5e72025-07-08 18:04:53 -04006600 cat >"conftest.$ac_ext" <<_ACEOF
6601#line 6601 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01006602#include "confdefs.h"
6603#include <stdio.h>
6604int
micky3879b9f5e72025-07-08 18:04:53 -04006605main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01006606{
micky3879b9f5e72025-07-08 18:04:53 -04006607int x = 1; (void)x
Steve Kondikae271bc2015-11-15 02:50:53 +01006608 ;
6609 return 0;
6610}
6611_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04006612rm -f "conftest.$ac_objext"
6613if { (eval echo "$as_me:6613: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006614 (eval $ac_compile) 2>&5
6615 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006616 echo "$as_me:6616: \$? = $ac_status" >&5
6617 (exit "$ac_status"); } &&
6618 { ac_try='test -s "conftest.$ac_objext"'
6619 { (eval echo "$as_me:6619: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006620 (eval $ac_try) 2>&5
6621 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006622 echo "$as_me:6622: \$? = $ac_status" >&5
6623 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006624 break
6625else
6626 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04006627cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006628fi
micky3879b9f5e72025-07-08 18:04:53 -04006629rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01006630 done
micky3879b9f5e72025-07-08 18:04:53 -04006631 echo "$as_me:6631: result: $CC_SHARED_OPTS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006632echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6633 CFLAGS="$cf_save_CFLAGS"
6634 fi
6635
6636 cf_cv_shlib_version_infix=no
6637
micky3879b9f5e72025-07-08 18:04:53 -04006638 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +01006639 (aix4.3-9*|aix[5-7]*)
6640 if test "$GCC" = yes; then
6641 CC_SHARED_OPTS='-Wl,-brtl'
micky3879b9f5e72025-07-08 18:04:53 -04006642 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006643 else
6644 CC_SHARED_OPTS='-brtl'
6645 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
micky3879b9f5e72025-07-08 18:04:53 -04006646 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006647 fi
6648 ;;
6649 (beos*)
micky3879b9f5e72025-07-08 18:04:53 -04006650 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
Steve Kondikae271bc2015-11-15 02:50:53 +01006651 ;;
6652 (cygwin*)
6653 CC_SHARED_OPTS=
6654 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6655 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6656 cf_cv_shlib_version=cygdll
6657 cf_cv_shlib_version_infix=cygdll
6658 shlibdir=$bindir
6659 MAKE_DLLS=
6660 cat >mk_shared_lib.sh <<-CF_EOF
6661 #!$SHELL
6662 SHARED_LIB=\$1
6663 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6664 shift
6665 cat <<-EOF
6666 Linking shared library
6667 ** SHARED_LIB \$SHARED_LIB
6668 ** IMPORT_LIB \$IMPORT_LIB
6669EOF
micky3879b9f5e72025-07-08 18:04:53 -04006670 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
Steve Kondikae271bc2015-11-15 02:50:53 +01006671CF_EOF
6672 chmod +x mk_shared_lib.sh
6673 ;;
6674 (msys*)
6675 CC_SHARED_OPTS=
6676 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6677 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6678 cf_cv_shlib_version=msysdll
6679 cf_cv_shlib_version_infix=msysdll
6680 shlibdir=$bindir
6681 MAKE_DLLS=
6682 cat >mk_shared_lib.sh <<-CF_EOF
6683 #!$SHELL
6684 SHARED_LIB=\$1
6685 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6686 shift
6687 cat <<-EOF
6688 Linking shared library
6689 ** SHARED_LIB \$SHARED_LIB
6690 ** IMPORT_LIB \$IMPORT_LIB
6691EOF
micky3879b9f5e72025-07-08 18:04:53 -04006692 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
Steve Kondikae271bc2015-11-15 02:50:53 +01006693CF_EOF
6694 chmod +x mk_shared_lib.sh
6695 ;;
6696 (darwin*)
6697 cf_try_cflags="no-cpp-precomp"
6698 CC_SHARED_OPTS="-dynamic"
micky3879b9f5e72025-07-08 18:04:53 -04006699 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006700 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6701 cf_cv_shlib_version_infix=yes
micky3879b9f5e72025-07-08 18:04:53 -04006702 echo "$as_me:6702: checking if ld -search_paths_first works" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006703echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6704if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6705 echo $ECHO_N "(cached) $ECHO_C" >&6
6706else
6707
6708 cf_save_LDFLAGS=$LDFLAGS
6709 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
micky3879b9f5e72025-07-08 18:04:53 -04006710 cat >"conftest.$ac_ext" <<_ACEOF
6711#line 6711 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01006712#include "confdefs.h"
6713
6714int
micky3879b9f5e72025-07-08 18:04:53 -04006715main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01006716{
6717int i;
6718 ;
6719 return 0;
6720}
6721_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04006722rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6723if { (eval echo "$as_me:6723: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006724 (eval $ac_link) 2>&5
6725 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006726 echo "$as_me:6726: \$? = $ac_status" >&5
6727 (exit "$ac_status"); } &&
6728 { ac_try='test -s "conftest$ac_exeext"'
6729 { (eval echo "$as_me:6729: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006730 (eval $ac_try) 2>&5
6731 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04006732 echo "$as_me:6732: \$? = $ac_status" >&5
6733 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006734 cf_cv_ldflags_search_paths_first=yes
6735else
6736 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04006737cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006738cf_cv_ldflags_search_paths_first=no
6739fi
micky3879b9f5e72025-07-08 18:04:53 -04006740rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01006741 LDFLAGS=$cf_save_LDFLAGS
6742fi
micky3879b9f5e72025-07-08 18:04:53 -04006743echo "$as_me:6743: result: $cf_cv_ldflags_search_paths_first" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01006744echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
micky3879b9f5e72025-07-08 18:04:53 -04006745 if test "$cf_cv_ldflags_search_paths_first" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006746 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6747 fi
6748 ;;
micky3879b9f5e72025-07-08 18:04:53 -04006749 (haiku*)
6750
6751 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6752 if test "$cf_cv_shlib_version" = rel; then
6753 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6754 else
6755 cf_cv_shared_soname='`basename $@`'
6756 fi
6757
6758 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6759 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01006760 (hpux[7-8]*)
6761 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6762 if test "$GCC" != yes; then
6763 CC_SHARED_OPTS='+Z'
6764 fi
micky3879b9f5e72025-07-08 18:04:53 -04006765 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006766 INSTALL_LIB="-m 555"
6767 ;;
6768 (hpux*)
6769 # (tested with gcc 2.7.2 -- I don't have c89)
6770 if test "$GCC" = yes; then
6771 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6772 else
6773 CC_SHARED_OPTS='+Z'
6774 LD_SHARED_OPTS='-Wl,+b,${libdir}'
6775 fi
micky3879b9f5e72025-07-08 18:04:53 -04006776 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006777 # HP-UX shared libraries must be executable, and should be
6778 # readonly to exploit a quirk in the memory manager.
6779 INSTALL_LIB="-m 555"
6780 ;;
6781 (interix*)
6782 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6783 if test "$cf_cv_shlib_version" = rel; then
micky3879b9f5e72025-07-08 18:04:53 -04006784 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
Steve Kondikae271bc2015-11-15 02:50:53 +01006785 else
micky3879b9f5e72025-07-08 18:04:53 -04006786 cf_shared_soname='`basename $@`'
Steve Kondikae271bc2015-11-15 02:50:53 +01006787 fi
6788 CC_SHARED_OPTS=
micky3879b9f5e72025-07-08 18:04:53 -04006789 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006790 ;;
6791 (irix*)
6792 if test "$cf_cv_enable_rpath" = yes ; then
6793 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6794 fi
6795 # tested with IRIX 5.2 and 'cc'.
6796 if test "$GCC" != yes; then
6797 CC_SHARED_OPTS='-KPIC'
micky3879b9f5e72025-07-08 18:04:53 -04006798 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006799 else
micky3879b9f5e72025-07-08 18:04:53 -04006800 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006801 fi
6802 cf_cv_rm_so_locs=yes
6803 ;;
6804 (linux*|gnu*|k*bsd*-gnu)
micky3879b9f5e72025-07-08 18:04:53 -04006805 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006806 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6807 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6808 fi
6809 if test "$cf_cv_enable_rpath" = yes ; then
6810 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6811 fi
6812
6813 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6814 if test "$cf_cv_shlib_version" = rel; then
6815 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6816 else
6817 cf_cv_shared_soname='`basename $@`'
6818 fi
6819
micky3879b9f5e72025-07-08 18:04:53 -04006820 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6821 ;;
6822 (mingw*msvc*)
6823 cf_cv_shlib_version=msvcdll
6824 cf_cv_shlib_version_infix=msvcdll
6825 shlibdir=$bindir
6826 MAKE_DLLS=
6827 if test "$DFT_LWR_MODEL" = "shared" ; then
6828 LOCAL_LDFLAGS="-link -dll"
6829 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6830 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6831 fi
6832 CC_SHARED_OPTS=
6833 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6834 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6835 cat >mk_shared_lib.sh <<-CF_EOF
6836 #!$SHELL
6837 SHARED_LIB=\$1
6838 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6839 shift
6840 my_ld=\$1
6841 shift
6842 cat <<-EOF
6843 Linking shared library
6844 ** SHARED LIB \$SHARED_LIB
6845 ** IMPORT_LIB \$IMPORT_LIB
6846EOF
6847 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6848 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6849 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6850CF_EOF
6851 chmod +x mk_shared_lib.sh
6852 cat >mk_prog.sh <<-CF_EOF
6853 #!$SHELL
6854 shift
6855 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6856 LD="$LD"
6857 clopts=()
6858 ldopts=("/subsystem:console")
6859 libs=()
6860 isdll=0
6861 while test \$# -gt 0; do
6862 case "\$1" in
6863 -link)
6864 # ignore -link argument
6865 ;;
6866 -M[TD] | -M[TD]d)
6867 # ignore runtime-library option
6868 ;;
6869 -dll)
6870 isdll=1
6871 ;;
6872 -W* | -w*)
6873 # ignore warnings
6874 ;;
6875 -D*)
6876 clopts+=("\$1")
6877 ;;
6878 -I*)
6879 clopts+=("\$1")
6880 ;;
6881 -l*)
6882 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6883 ;;
6884 -L*)
6885 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6886 ;;
6887 *.obj | *.o)
6888 ldopts+=("\$1")
6889 ;;
6890 -Wl,*)
6891 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6892 ldopts+=("\${linkarg}")
6893 done
6894 ;;
6895 *.lib)
6896 ldopts+=("\$1")
6897 ;;
6898 -o)
6899 shift
6900 ldopts+=("-out:\$1")
6901 ;;
6902 *)
6903 clopts+=("\$1")
6904 ldopts+=("\$1")
6905 ;;
6906 esac
6907 shift
6908 done
6909 if [ "\$isdll" -ne 0 ]; then
6910 for lib in \${libs[*]}; do
6911 ldopts+=("\$lib.dll.lib")
6912 done
6913 else
6914 for lib in \${libs[*]}; do
6915 ldopts+=("\$lib.lib")
6916 done
6917 fi
6918 cat <<-EOF
6919 Creating program
6920 ** ld options: "\${ldopts[@]}"
6921EOF
6922 exec \$LD \${ldopts[@]}
6923CF_EOF
6924 chmod +x mk_prog.sh
6925 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6926 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
Steve Kondikae271bc2015-11-15 02:50:53 +01006927 ;;
6928 (mingw*)
6929 cf_cv_shlib_version=mingw
6930 cf_cv_shlib_version_infix=mingw
6931 shlibdir=$bindir
6932 MAKE_DLLS=
6933 if test "$DFT_LWR_MODEL" = "shared" ; then
6934 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6935 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6936 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6937 fi
6938 CC_SHARED_OPTS=
6939 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6940 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6941 cat >mk_shared_lib.sh <<-CF_EOF
6942 #!$SHELL
6943 SHARED_LIB=\$1
6944 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6945 shift
6946 cat <<-EOF
6947 Linking shared library
6948 ** SHARED_LIB \$SHARED_LIB
6949 ** IMPORT_LIB \$IMPORT_LIB
6950EOF
micky3879b9f5e72025-07-08 18:04:53 -04006951 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
Steve Kondikae271bc2015-11-15 02:50:53 +01006952CF_EOF
6953 chmod +x mk_shared_lib.sh
6954 ;;
6955 (openbsd[2-9].*|mirbsd*)
micky3879b9f5e72025-07-08 18:04:53 -04006956 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01006957 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6958 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6959 fi
6960 if test "$cf_cv_enable_rpath" = yes ; then
6961 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6962 fi
6963 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6964
6965 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6966 if test "$cf_cv_shlib_version" = rel; then
6967 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6968 else
6969 cf_cv_shared_soname='`basename $@`'
6970 fi
6971
micky3879b9f5e72025-07-08 18:04:53 -04006972 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6973 ;;
6974 (nskJ*)
6975 CC_SHARED_OPTS=
6976 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6977 ;;
6978 (nskL*)
6979 CC_SHARED_OPTS=
6980 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006981 ;;
6982 (nto-qnx*|openbsd*|freebsd[12].*)
6983 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
micky3879b9f5e72025-07-08 18:04:53 -04006984 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01006985 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6986 ;;
6987 (dragonfly*|freebsd*)
6988 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6989 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6990 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6991 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6992 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6993 fi
6994
6995 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6996 if test "$cf_cv_shlib_version" = rel; then
6997 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6998 else
6999 cf_cv_shared_soname='`basename $@`'
7000 fi
7001
micky3879b9f5e72025-07-08 18:04:53 -04007002 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007003 ;;
7004 (netbsd*)
7005 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7006 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7007 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7008 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7009 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7010 if test "$cf_cv_shlib_version" = auto; then
7011 if test -f /usr/libexec/ld.elf_so; then
7012 cf_cv_shlib_version=abi
7013 else
7014 cf_cv_shlib_version=rel
7015 fi
7016 fi
7017
7018 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7019 if test "$cf_cv_shlib_version" = rel; then
7020 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7021 else
7022 cf_cv_shared_soname='`basename $@`'
7023 fi
7024
micky3879b9f5e72025-07-08 18:04:53 -04007025 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007026 else
micky3879b9f5e72025-07-08 18:04:53 -04007027 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007028 fi
7029 ;;
7030 (osf*|mls+*)
7031 # tested with OSF/1 V3.2 and 'cc'
7032 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7033 # link with shared libs).
micky3879b9f5e72025-07-08 18:04:53 -04007034 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7035 case "$host_os" in
Steve Kondikae271bc2015-11-15 02:50:53 +01007036 (osf4*)
7037 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7038 ;;
7039 esac
7040 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
micky3879b9f5e72025-07-08 18:04:53 -04007041 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +01007042 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7043 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7044 fi
7045 cf_cv_rm_so_locs=yes
7046 ;;
7047 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
7048 # tested with osr5.0.5
7049 if test "$GCC" != yes; then
7050 CC_SHARED_OPTS='-belf -KPIC'
7051 fi
micky3879b9f5e72025-07-08 18:04:53 -04007052 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007053 if test "$cf_cv_enable_rpath" = yes ; then
7054 # only way is to set LD_RUN_PATH but no switch for it
7055 RUN_PATH=$libdir
7056 fi
7057 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7058 LINK_PROGS='LD_RUN_PATH=${libdir}'
7059 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7060 ;;
7061 (sunos4*)
7062 # tested with SunOS 4.1.1 and gcc 2.7.0
7063 if test "$GCC" != yes; then
7064 CC_SHARED_OPTS='-KPIC'
7065 fi
micky3879b9f5e72025-07-08 18:04:53 -04007066 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007067 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7068 ;;
7069 (solaris2*)
7070 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7071 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7072 if test "$DFT_LWR_MODEL" = "shared" ; then
micky3879b9f5e72025-07-08 18:04:53 -04007073 LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
Steve Kondikae271bc2015-11-15 02:50:53 +01007074 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7075 fi
7076 if test "$cf_cv_enable_rpath" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -04007077 EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
Steve Kondikae271bc2015-11-15 02:50:53 +01007078 fi
7079
7080 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7081 if test "$cf_cv_shlib_version" = rel; then
7082 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7083 else
7084 cf_cv_shared_soname='`basename $@`'
7085 fi
7086
7087 if test "$GCC" != yes; then
7088 cf_save_CFLAGS="$CFLAGS"
7089 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7090 do
7091 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -04007092 cat >"conftest.$ac_ext" <<_ACEOF
7093#line 7093 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01007094#include "confdefs.h"
7095#include <stdio.h>
7096int
micky3879b9f5e72025-07-08 18:04:53 -04007097main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01007098{
micky3879b9f5e72025-07-08 18:04:53 -04007099printf("Hello\\n");
Steve Kondikae271bc2015-11-15 02:50:53 +01007100 ;
7101 return 0;
7102}
7103_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04007104rm -f "conftest.$ac_objext"
7105if { (eval echo "$as_me:7105: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007106 (eval $ac_compile) 2>&5
7107 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04007108 echo "$as_me:7108: \$? = $ac_status" >&5
7109 (exit "$ac_status"); } &&
7110 { ac_try='test -s "conftest.$ac_objext"'
7111 { (eval echo "$as_me:7111: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007112 (eval $ac_try) 2>&5
7113 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04007114 echo "$as_me:7114: \$? = $ac_status" >&5
7115 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01007116 break
7117else
7118 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04007119cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007120fi
micky3879b9f5e72025-07-08 18:04:53 -04007121rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01007122 done
7123 CFLAGS="$cf_save_CFLAGS"
7124 CC_SHARED_OPTS=$cf_shared_opts
micky3879b9f5e72025-07-08 18:04:53 -04007125 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007126 else
micky3879b9f5e72025-07-08 18:04:53 -04007127 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007128 fi
7129 ;;
7130 (sysv5uw7*|unix_sv*)
7131 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7132 if test "$GCC" != yes; then
7133 CC_SHARED_OPTS='-KPIC'
7134 fi
micky3879b9f5e72025-07-08 18:04:53 -04007135 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
Steve Kondikae271bc2015-11-15 02:50:53 +01007136 ;;
7137 (*)
7138 CC_SHARED_OPTS='unknown'
7139 MK_SHARED_LIB='echo unknown'
7140 ;;
7141 esac
7142
7143 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7144 case "$cf_cv_shlib_version" in
7145 (rel|abi)
7146 case "$MK_SHARED_LIB" in
7147 (*'-o $@')
7148 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7149 ;;
7150 (*)
micky3879b9f5e72025-07-08 18:04:53 -04007151 { echo "$as_me:7151: WARNING: ignored --with-shlib-version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007152echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7153 ;;
7154 esac
7155 ;;
7156 esac
7157
7158 if test -n "$cf_try_cflags"
7159 then
7160cat > conftest.$ac_ext <<EOF
micky3879b9f5e72025-07-08 18:04:53 -04007161#line 7161 "${as_me:-configure}"
Steve Kondikae271bc2015-11-15 02:50:53 +01007162#include <stdio.h>
7163int main(int argc, char *argv[])
7164{
micky3879b9f5e72025-07-08 18:04:53 -04007165 printf("hello\\n");
Steve Kondikae271bc2015-11-15 02:50:53 +01007166 return (argv[argc-1] == 0) ;
7167}
7168EOF
7169 cf_save_CFLAGS="$CFLAGS"
7170 for cf_opt in $cf_try_cflags
7171 do
7172 CFLAGS="$cf_save_CFLAGS -$cf_opt"
micky3879b9f5e72025-07-08 18:04:53 -04007173 echo "$as_me:7173: checking if CFLAGS option -$cf_opt works" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007174echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -04007175 if { (eval echo "$as_me:7175: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007176 (eval $ac_compile) 2>&5
7177 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04007178 echo "$as_me:7178: \$? = $ac_status" >&5
7179 (exit "$ac_status"); }; then
7180 echo "$as_me:7180: result: yes" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007181echo "${ECHO_T}yes" >&6
7182 cf_save_CFLAGS="$CFLAGS"
7183 else
micky3879b9f5e72025-07-08 18:04:53 -04007184 echo "$as_me:7184: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007185echo "${ECHO_T}no" >&6
7186 fi
7187 done
7188 CFLAGS="$cf_save_CFLAGS"
7189 fi
7190
7191 # RPATH_LIST is a colon-separated list of directories
7192 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7193 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7194
micky3879b9f5e72025-07-08 18:04:53 -04007195 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
Steve Kondikae271bc2015-11-15 02:50:53 +01007196
7197 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7198
micky3879b9f5e72025-07-08 18:04:53 -04007199echo "${as_me:-configure}:7199: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007200
7201 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
7202
micky3879b9f5e72025-07-08 18:04:53 -04007203echo "${as_me:-configure}:7203: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007204
micky3879b9f5e72025-07-08 18:04:53 -04007205for model in $cf_list_models ; do
7206 case "$model" in
Steve Kondikae271bc2015-11-15 02:50:53 +01007207 (libtool)
7208
micky3879b9f5e72025-07-08 18:04:53 -04007209echo "$as_me:7209: checking for additional libtool options" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007210echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7211
7212# Check whether --with-libtool-opts or --without-libtool-opts was given.
7213if test "${with_libtool_opts+set}" = set; then
7214 withval="$with_libtool_opts"
7215 with_libtool_opts=$withval
7216else
7217 with_libtool_opts=no
7218fi;
micky3879b9f5e72025-07-08 18:04:53 -04007219echo "$as_me:7219: result: $with_libtool_opts" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007220echo "${ECHO_T}$with_libtool_opts" >&6
7221
7222case .$with_libtool_opts in
7223(.yes|.no|.)
7224 ;;
7225(*)
7226 LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7227 ;;
7228esac
7229
micky3879b9f5e72025-07-08 18:04:53 -04007230echo "$as_me:7230: checking if exported-symbols file should be used" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007231echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7232
7233# Check whether --with-export-syms or --without-export-syms was given.
7234if test "${with_export_syms+set}" = set; then
7235 withval="$with_export_syms"
7236 with_export_syms=$withval
7237else
7238 with_export_syms=no
7239fi;
7240if test "x$with_export_syms" = xyes
7241then
7242 with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7243
7244fi
micky3879b9f5e72025-07-08 18:04:53 -04007245echo "$as_me:7245: result: $with_export_syms" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007246echo "${ECHO_T}$with_export_syms" >&6
7247if test "x$with_export_syms" != xno
7248then
7249 EXPORT_SYMS="-export-symbols $with_export_syms"
7250
7251fi
7252
7253 ;;
7254 (shared)
7255 if test "$CC_SHARED_OPTS" = "unknown"; then
micky3879b9f5e72025-07-08 18:04:53 -04007256 { { echo "$as_me:7256: error: Shared libraries are not supported in this version" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007257echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7258 { (exit 1); exit 1; }; }
7259 fi
micky3879b9f5e72025-07-08 18:04:53 -04007260 # workaround for inept transition to PIE vs PIC...
7261 echo "$as_me:7261: checking if current CFLAGS link properly" >&5
7262echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7263 cat >"conftest.$ac_ext" <<_ACEOF
7264#line 7264 "configure"
7265#include "confdefs.h"
7266#include <stdio.h>
7267int
7268main (void)
7269{
7270printf("Hello work\\n");
7271 ;
7272 return 0;
7273}
7274_ACEOF
7275rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7276if { (eval echo "$as_me:7276: \"$ac_link\"") >&5
7277 (eval $ac_link) 2>&5
7278 ac_status=$?
7279 echo "$as_me:7279: \$? = $ac_status" >&5
7280 (exit "$ac_status"); } &&
7281 { ac_try='test -s "conftest$ac_exeext"'
7282 { (eval echo "$as_me:7282: \"$ac_try\"") >&5
7283 (eval $ac_try) 2>&5
7284 ac_status=$?
7285 echo "$as_me:7285: \$? = $ac_status" >&5
7286 (exit "$ac_status"); }; }; then
7287 cf_cflags_work=yes
7288else
7289 echo "$as_me: failed program was:" >&5
7290cat "conftest.$ac_ext" >&5
7291cf_cflags_work=no
7292fi
7293rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7294 echo "$as_me:7294: result: $cf_cflags_work" >&5
7295echo "${ECHO_T}$cf_cflags_work" >&6
7296 if test "$cf_cflags_work" = no
7297 then
7298 test -n "$verbose" && echo " try to work around by appending shared-options" 1>&6
Steve Kondikae271bc2015-11-15 02:50:53 +01007299
micky3879b9f5e72025-07-08 18:04:53 -04007300echo "${as_me:-configure}:7300: testing try to work around by appending shared-options ..." 1>&5
7301
7302 CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7303 fi
7304
7305echo "$as_me:7305: checking if versioned-symbols file should be used" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007306echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7307
7308# Check whether --with-versioned-syms or --without-versioned-syms was given.
7309if test "${with_versioned_syms+set}" = set; then
7310 withval="$with_versioned_syms"
7311 with_versioned_syms=$withval
7312else
7313 with_versioned_syms=no
7314fi;
micky3879b9f5e72025-07-08 18:04:53 -04007315case "x$with_versioned_syms" in
7316(xyes)
Steve Kondikae271bc2015-11-15 02:50:53 +01007317 with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7318
micky3879b9f5e72025-07-08 18:04:53 -04007319 ;;
7320(xno)
7321 ;;
7322(x/*)
7323 test -f "$with_versioned_syms" || { { echo "$as_me:7323: error: expected a filename: $with_versioned_syms" >&5
7324echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7325 { (exit 1); exit 1; }; }
7326 ;;
7327(*)
7328 test -f "$with_versioned_syms" || { { echo "$as_me:7328: error: expected a filename: $with_versioned_syms" >&5
7329echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7330 { (exit 1); exit 1; }; }
7331 with_versioned_syms=`pwd`/"$with_versioned_syms"
7332 ;;
7333esac
7334echo "$as_me:7334: result: $with_versioned_syms" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007335echo "${ECHO_T}$with_versioned_syms" >&6
7336
7337RESULTING_SYMS=
7338VERSIONED_SYMS=
7339WILDCARD_SYMS=
7340
7341if test "x$with_versioned_syms" != xno
7342then
7343 RESULTING_SYMS=$with_versioned_syms
7344 case "x$MK_SHARED_LIB" in
7345 (*-Wl,*)
7346 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7347 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7348 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
7349
micky3879b9f5e72025-07-08 18:04:53 -04007350echo "${as_me:-configure}:7350: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007351
7352 ;;
7353 (*-dy\ *)
7354 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7355 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7356 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
7357
micky3879b9f5e72025-07-08 18:04:53 -04007358echo "${as_me:-configure}:7358: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007359
7360 ;;
7361 (*)
micky3879b9f5e72025-07-08 18:04:53 -04007362 { echo "$as_me:7362: WARNING: this system does not support versioned-symbols" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007363echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7364 ;;
7365 esac
7366
7367 # Linux ld can selectively override scope, e.g., of symbols beginning with
7368 # "_" by first declaring some as global, and then using a wildcard to
7369 # declare the others as local. Some other loaders cannot do this. Check
7370 # by constructing a (very) simple shared library and inspecting its
7371 # symbols.
7372 if test "x$VERSIONED_SYMS" != "x"
7373 then
micky3879b9f5e72025-07-08 18:04:53 -04007374 echo "$as_me:7374: checking if wildcards can be used to selectively omit symbols" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007375echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7376 WILDCARD_SYMS=no
7377
7378 # make sources
7379 rm -f conftest.*
7380
7381 cat >conftest.ver <<EOF
7382module_1.0 {
7383global:
7384 globalf1;
7385local:
7386 localf1;
7387};
7388module_2.0 {
7389global:
7390 globalf2;
7391local:
7392 localf2;
7393 _*;
7394} module_1.0;
7395submodule_1.0 {
7396global:
7397 subglobalf1;
7398 _ismissing;
7399local:
7400 sublocalf1;
7401};
7402submodule_2.0 {
7403global:
7404 subglobalf2;
7405local:
7406 sublocalf2;
7407 _*;
7408} submodule_1.0;
7409EOF
7410 cat >conftest.$ac_ext <<EOF
micky3879b9f5e72025-07-08 18:04:53 -04007411#line 7411 "configure"
7412extern int _ismissing(void); int _ismissing(void) { return 1; }
7413extern int _localf1(void); int _localf1(void) { return 1; }
7414extern int _localf2(void); int _localf2(void) { return 2; }
7415extern int globalf1(void); int globalf1(void) { return 1; }
7416extern int globalf2(void); int globalf2(void) { return 2; }
7417extern int _sublocalf1(void); int _sublocalf1(void) { return 1; }
7418extern int _sublocalf2(void); int _sublocalf2(void) { return 2; }
7419extern int subglobalf1(void); int subglobalf1(void) { return 1; }
7420extern int subglobalf2(void); int subglobalf2(void) { return 2; }
Steve Kondikae271bc2015-11-15 02:50:53 +01007421EOF
7422 cat >conftest.mk <<EOF
7423CC=${CC}
7424CFLAGS=${CFLAGS}
7425CPPFLAGS=${CPPFLAGS}
7426LDFLAGS=${LDFLAGS}
7427LIBS=${LIBS}
7428VERSIONED_SYMS=${VERSIONED_SYMS}
7429RESULTING_SYMS=conftest.ver
7430MK_SHARED_LIB=${MK_SHARED_LIB}
7431conftest.so: conftest.$ac_cv_objext
7432 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7433EOF
7434
7435 # compile source, make library
7436 if make -f conftest.mk 2>&5 >/dev/null
7437 then
micky3879b9f5e72025-07-08 18:04:53 -04007438 # test for missing symbol in either Data or Text section
7439 cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[ ][DT][ ]'`"
Steve Kondikae271bc2015-11-15 02:50:53 +01007440 test -n "$cf_missing" && WILDCARD_SYMS=yes
7441 fi
micky3879b9f5e72025-07-08 18:04:53 -04007442 echo "$as_me:7442: result: $WILDCARD_SYMS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01007443echo "${ECHO_T}$WILDCARD_SYMS" >&6
7444 rm -f conftest.*
7445 fi
7446fi
7447
7448 ;;
7449 esac
7450done
7451
micky3879b9f5e72025-07-08 18:04:53 -04007452### Checks for special libraries, must be done up-front.
7453SHLIB_LIST=""
7454
7455echo "$as_me:7455: checking if you want to link with the GPM mouse library" >&5
7456echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7457
7458# Check whether --with-gpm or --without-gpm was given.
7459if test "${with_gpm+set}" = set; then
7460 withval="$with_gpm"
7461 with_gpm=$withval
7462else
7463 with_gpm=maybe
7464fi;
7465echo "$as_me:7465: result: $with_gpm" >&5
7466echo "${ECHO_T}$with_gpm" >&6
7467
7468if test "$with_gpm" != no ; then
7469 echo "$as_me:7469: checking for gpm.h" >&5
7470echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7471if test "${ac_cv_header_gpm_h+set}" = set; then
7472 echo $ECHO_N "(cached) $ECHO_C" >&6
7473else
7474 cat >"conftest.$ac_ext" <<_ACEOF
7475#line 7475 "configure"
7476#include "confdefs.h"
7477#include <gpm.h>
7478_ACEOF
7479if { (eval echo "$as_me:7479: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7480 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7481 ac_status=$?
7482 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7483 rm -f conftest.er1
7484 cat conftest.err >&5
7485 echo "$as_me:7485: \$? = $ac_status" >&5
7486 (exit "$ac_status"); } >/dev/null; then
7487 if test -s conftest.err; then
7488 ac_cpp_err=$ac_c_preproc_warn_flag
7489 else
7490 ac_cpp_err=
7491 fi
7492else
7493 ac_cpp_err=yes
7494fi
7495if test -z "$ac_cpp_err"; then
7496 ac_cv_header_gpm_h=yes
7497else
7498 echo "$as_me: failed program was:" >&5
7499 cat "conftest.$ac_ext" >&5
7500 ac_cv_header_gpm_h=no
7501fi
7502rm -f conftest.err "conftest.$ac_ext"
7503fi
7504echo "$as_me:7504: result: $ac_cv_header_gpm_h" >&5
7505echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7506if test "$ac_cv_header_gpm_h" = yes; then
7507
7508cat >>confdefs.h <<\EOF
7509#define HAVE_GPM_H 1
7510EOF
7511
7512 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7513 test -n "$verbose" && echo " assuming we really have GPM library" 1>&6
7514
7515echo "${as_me:-configure}:7515: testing assuming we really have GPM library ..." 1>&5
7516
7517cat >>confdefs.h <<\EOF
7518#define HAVE_LIBGPM 1
7519EOF
7520
7521 with_gpm=yes
7522 else
7523 echo "$as_me:7523: checking for Gpm_Open in -lgpm" >&5
7524echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7525if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7526 echo $ECHO_N "(cached) $ECHO_C" >&6
7527else
7528 ac_check_lib_save_LIBS=$LIBS
7529LIBS="-lgpm $LIBS"
7530cat >"conftest.$ac_ext" <<_ACEOF
7531#line 7531 "configure"
7532#include "confdefs.h"
7533
7534/* Override any gcc2 internal prototype to avoid an error. */
7535#ifdef __cplusplus
7536extern "C"
7537#endif
7538/* We use char because int might match the return type of a gcc2
7539 builtin and then its argument prototype would still apply. */
7540char Gpm_Open (void);
7541int
7542main (void)
7543{
7544Gpm_Open ();
7545 ;
7546 return 0;
7547}
7548_ACEOF
7549rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7550if { (eval echo "$as_me:7550: \"$ac_link\"") >&5
7551 (eval $ac_link) 2>&5
7552 ac_status=$?
7553 echo "$as_me:7553: \$? = $ac_status" >&5
7554 (exit "$ac_status"); } &&
7555 { ac_try='test -s "conftest$ac_exeext"'
7556 { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557 (eval $ac_try) 2>&5
7558 ac_status=$?
7559 echo "$as_me:7559: \$? = $ac_status" >&5
7560 (exit "$ac_status"); }; }; then
7561 ac_cv_lib_gpm_Gpm_Open=yes
7562else
7563 echo "$as_me: failed program was:" >&5
7564cat "conftest.$ac_ext" >&5
7565ac_cv_lib_gpm_Gpm_Open=no
7566fi
7567rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7568LIBS=$ac_check_lib_save_LIBS
7569fi
7570echo "$as_me:7570: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7571echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7572if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7573 with_gpm=yes
7574else
7575
7576 if test "$with_gpm" = maybe; then
7577 { echo "$as_me:7577: WARNING: Cannot link with GPM library" >&5
7578echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7579 with_gpm=no
7580 else
7581 { { echo "$as_me:7581: error: Cannot link with GPM library" >&5
7582echo "$as_me: error: Cannot link with GPM library" >&2;}
7583 { (exit 1); exit 1; }; }
7584 fi
7585
7586fi
7587
7588 fi
7589
7590else
7591
7592 test "$with_gpm" != maybe && { echo "$as_me:7592: WARNING: Cannot find GPM header" >&5
7593echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7594 with_gpm=no
7595
7596fi
7597
7598fi
7599
7600if test "$with_gpm" != no ; then
7601 echo "$as_me:7601: checking if you want to load GPM dynamically" >&5
7602echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7603
7604# Check whether --with-dlsym or --without-dlsym was given.
7605if test "${with_dlsym+set}" = set; then
7606 withval="$with_dlsym"
7607 with_dlsym=$withval
7608else
7609 with_dlsym=yes
7610fi;
7611 echo "$as_me:7611: result: $with_dlsym" >&5
7612echo "${ECHO_T}$with_dlsym" >&6
7613 if test "x$with_dlsym" = xyes ; then
7614
7615cf_have_dlsym=no
7616echo "$as_me:7616: checking for dlsym" >&5
7617echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7618if test "${ac_cv_func_dlsym+set}" = set; then
7619 echo $ECHO_N "(cached) $ECHO_C" >&6
7620else
7621 cat >"conftest.$ac_ext" <<_ACEOF
7622#line 7622 "configure"
7623#include "confdefs.h"
7624#define dlsym autoconf_temporary
7625#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7626#undef dlsym
7627
7628#ifdef __cplusplus
7629extern "C"
7630#endif
7631
7632/* We use char because int might match the return type of a gcc2
7633 builtin and then its argument prototype would still apply. */
7634char dlsym (void);
7635
7636int
7637main (void)
7638{
7639
7640/* The GNU C library defines stubs for functions which it implements
7641 to always fail with ENOSYS. Some functions are actually named
7642 something starting with __ and the normal name is an alias. */
7643#if defined (__stub_dlsym) || defined (__stub___dlsym)
7644#error found stub for dlsym
7645#endif
7646
7647 return dlsym ();
7648 ;
7649 return 0;
7650}
7651_ACEOF
7652rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7653if { (eval echo "$as_me:7653: \"$ac_link\"") >&5
7654 (eval $ac_link) 2>&5
7655 ac_status=$?
7656 echo "$as_me:7656: \$? = $ac_status" >&5
7657 (exit "$ac_status"); } &&
7658 { ac_try='test -s "conftest$ac_exeext"'
7659 { (eval echo "$as_me:7659: \"$ac_try\"") >&5
7660 (eval $ac_try) 2>&5
7661 ac_status=$?
7662 echo "$as_me:7662: \$? = $ac_status" >&5
7663 (exit "$ac_status"); }; }; then
7664 ac_cv_func_dlsym=yes
7665else
7666 echo "$as_me: failed program was:" >&5
7667cat "conftest.$ac_ext" >&5
7668ac_cv_func_dlsym=no
7669fi
7670rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7671fi
7672echo "$as_me:7672: result: $ac_cv_func_dlsym" >&5
7673echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7674if test "$ac_cv_func_dlsym" = yes; then
7675 cf_have_dlsym=yes
7676else
7677
7678cf_have_libdl=no
7679echo "$as_me:7679: checking for dlsym in -ldl" >&5
7680echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7681if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7682 echo $ECHO_N "(cached) $ECHO_C" >&6
7683else
7684 ac_check_lib_save_LIBS=$LIBS
7685LIBS="-ldl $LIBS"
7686cat >"conftest.$ac_ext" <<_ACEOF
7687#line 7687 "configure"
7688#include "confdefs.h"
7689
7690/* Override any gcc2 internal prototype to avoid an error. */
7691#ifdef __cplusplus
7692extern "C"
7693#endif
7694/* We use char because int might match the return type of a gcc2
7695 builtin and then its argument prototype would still apply. */
7696char dlsym (void);
7697int
7698main (void)
7699{
7700dlsym ();
7701 ;
7702 return 0;
7703}
7704_ACEOF
7705rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7706if { (eval echo "$as_me:7706: \"$ac_link\"") >&5
7707 (eval $ac_link) 2>&5
7708 ac_status=$?
7709 echo "$as_me:7709: \$? = $ac_status" >&5
7710 (exit "$ac_status"); } &&
7711 { ac_try='test -s "conftest$ac_exeext"'
7712 { (eval echo "$as_me:7712: \"$ac_try\"") >&5
7713 (eval $ac_try) 2>&5
7714 ac_status=$?
7715 echo "$as_me:7715: \$? = $ac_status" >&5
7716 (exit "$ac_status"); }; }; then
7717 ac_cv_lib_dl_dlsym=yes
7718else
7719 echo "$as_me: failed program was:" >&5
7720cat "conftest.$ac_ext" >&5
7721ac_cv_lib_dl_dlsym=no
7722fi
7723rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7724LIBS=$ac_check_lib_save_LIBS
7725fi
7726echo "$as_me:7726: result: $ac_cv_lib_dl_dlsym" >&5
7727echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7728if test "$ac_cv_lib_dl_dlsym" = yes; then
7729
7730 cf_have_dlsym=yes
7731 cf_have_libdl=yes
7732fi
7733
7734fi
7735
7736if test "$cf_have_dlsym" = yes ; then
7737 test "$cf_have_libdl" = yes && {
7738cf_add_libs="$LIBS"
7739# reverse order
7740cf_add_0lib=
7741for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7742# filter duplicates
7743for cf_add_1lib in $cf_add_0lib; do
7744 for cf_add_2lib in $cf_add_libs; do
7745 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7746 cf_add_1lib=
7747 break
7748 fi
7749 done
7750 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7751done
7752LIBS="$cf_add_libs"
7753 }
7754
7755 echo "$as_me:7755: checking whether able to link to dl*() functions" >&5
7756echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7757 cat >"conftest.$ac_ext" <<_ACEOF
7758#line 7758 "configure"
7759#include "confdefs.h"
7760#include <dlfcn.h>
7761int
7762main (void)
7763{
7764
7765 void *obj;
7766 if ((obj = dlopen("filename", 0)) != 0) {
7767 if (dlsym(obj, "symbolname") == 0) {
7768 dlclose(obj);
7769 }
7770 }
7771 ;
7772 return 0;
7773}
7774_ACEOF
7775rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7776if { (eval echo "$as_me:7776: \"$ac_link\"") >&5
7777 (eval $ac_link) 2>&5
7778 ac_status=$?
7779 echo "$as_me:7779: \$? = $ac_status" >&5
7780 (exit "$ac_status"); } &&
7781 { ac_try='test -s "conftest$ac_exeext"'
7782 { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783 (eval $ac_try) 2>&5
7784 ac_status=$?
7785 echo "$as_me:7785: \$? = $ac_status" >&5
7786 (exit "$ac_status"); }; }; then
7787
7788cat >>confdefs.h <<\EOF
7789#define HAVE_LIBDL 1
7790EOF
7791
7792else
7793 echo "$as_me: failed program was:" >&5
7794cat "conftest.$ac_ext" >&5
7795
7796 { { echo "$as_me:7796: error: Cannot link test program for libdl" >&5
7797echo "$as_me: error: Cannot link test program for libdl" >&2;}
7798 { (exit 1); exit 1; }; }
7799fi
7800rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7801 echo "$as_me:7801: result: ok" >&5
7802echo "${ECHO_T}ok" >&6
7803else
7804 { { echo "$as_me:7804: error: Cannot find dlsym function" >&5
7805echo "$as_me: error: Cannot find dlsym function" >&2;}
7806 { (exit 1); exit 1; }; }
7807fi
7808
7809 if test "x$with_gpm" != xyes ; then
7810 test -n "$verbose" && echo " assuming soname for gpm is $with_gpm" 1>&6
7811
7812echo "${as_me:-configure}:7812: testing assuming soname for gpm is $with_gpm ..." 1>&5
7813
7814 cf_cv_gpm_soname="$with_gpm"
7815 else
7816
7817echo "$as_me:7817: checking for soname of gpm library" >&5
7818echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7819if test "${cf_cv_gpm_soname+set}" = set; then
7820 echo $ECHO_N "(cached) $ECHO_C" >&6
7821else
7822
7823cf_cv_gpm_soname=unknown
7824if test "$cross_compiling" != yes ; then
7825cat >conftest.$ac_ext <<CF_EOF
7826#include <gpm.h>
7827int main(void)
7828{
7829if (Gpm_Open(0,0)) Gpm_Close();
7830 ${cf_cv_main_return:-return}(0);
7831}
7832CF_EOF
7833cf_save_LIBS="$LIBS"
7834
7835cf_add_libs="$LIBS"
7836# reverse order
7837cf_add_0lib=
7838for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7839# filter duplicates
7840for cf_add_1lib in $cf_add_0lib; do
7841 for cf_add_2lib in $cf_add_libs; do
7842 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7843 cf_add_1lib=
7844 break
7845 fi
7846 done
7847 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7848done
7849LIBS="$cf_add_libs"
7850
7851 if { (eval echo "$as_me:7851: \"$ac_compile\"") >&5
7852 (eval $ac_compile) 2>&5
7853 ac_status=$?
7854 echo "$as_me:7854: \$? = $ac_status" >&5
7855 (exit "$ac_status"); } ; then
7856 if { (eval echo "$as_me:7856: \"$ac_link\"") >&5
7857 (eval $ac_link) 2>&5
7858 ac_status=$?
7859 echo "$as_me:7859: \$? = $ac_status" >&5
7860 (exit "$ac_status"); } ; then
7861 cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7862 test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7863 fi
7864 fi
7865rm -rf ./conftest*
7866LIBS="$cf_save_LIBS"
7867fi
7868
7869fi
7870echo "$as_me:7870: result: $cf_cv_gpm_soname" >&5
7871echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7872
7873 fi
7874 test "$cf_cv_gpm_soname" != "unknown" &&
7875cat >>confdefs.h <<EOF
7876#define LIBGPM_SONAME "$cf_cv_gpm_soname"
7877EOF
7878
7879 SHLIB_LIST="-ldl $SHLIB_LIST"
7880
7881cf_add_libs="$PRIVATE_LIBS"
7882# reverse order
7883cf_add_0lib=
7884for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7885# filter duplicates
7886for cf_add_1lib in $cf_add_0lib; do
7887 for cf_add_2lib in $cf_add_libs; do
7888 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7889 cf_add_1lib=
7890 break
7891 fi
7892 done
7893 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7894done
7895PRIVATE_LIBS="$cf_add_libs"
7896
7897 else
7898 SHLIB_LIST="-lgpm $SHLIB_LIST"
7899
7900cf_add_libs="$TEST_LIBS"
7901# reverse order
7902cf_add_0lib=
7903for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7904# filter duplicates
7905for cf_add_1lib in $cf_add_0lib; do
7906 for cf_add_2lib in $cf_add_libs; do
7907 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7908 cf_add_1lib=
7909 break
7910 fi
7911 done
7912 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7913done
7914TEST_LIBS="$cf_add_libs"
7915
7916cf_add_libs="$PRIVATE_LIBS"
7917# reverse order
7918cf_add_0lib=
7919for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7920# filter duplicates
7921for cf_add_1lib in $cf_add_0lib; do
7922 for cf_add_2lib in $cf_add_libs; do
7923 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7924 cf_add_1lib=
7925 break
7926 fi
7927 done
7928 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7929done
7930PRIVATE_LIBS="$cf_add_libs"
7931
7932 fi
7933
7934cat >>confdefs.h <<\EOF
7935#define HAVE_LIBGPM 1
7936EOF
7937
7938echo "$as_me:7938: checking for Gpm_Wgetch in -lgpm" >&5
7939echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7940if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7941 echo $ECHO_N "(cached) $ECHO_C" >&6
7942else
7943 ac_check_lib_save_LIBS=$LIBS
7944LIBS="-lgpm $LIBS"
7945cat >"conftest.$ac_ext" <<_ACEOF
7946#line 7946 "configure"
7947#include "confdefs.h"
7948
7949/* Override any gcc2 internal prototype to avoid an error. */
7950#ifdef __cplusplus
7951extern "C"
7952#endif
7953/* We use char because int might match the return type of a gcc2
7954 builtin and then its argument prototype would still apply. */
7955char Gpm_Wgetch (void);
7956int
7957main (void)
7958{
7959Gpm_Wgetch ();
7960 ;
7961 return 0;
7962}
7963_ACEOF
7964rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7965if { (eval echo "$as_me:7965: \"$ac_link\"") >&5
7966 (eval $ac_link) 2>&5
7967 ac_status=$?
7968 echo "$as_me:7968: \$? = $ac_status" >&5
7969 (exit "$ac_status"); } &&
7970 { ac_try='test -s "conftest$ac_exeext"'
7971 { (eval echo "$as_me:7971: \"$ac_try\"") >&5
7972 (eval $ac_try) 2>&5
7973 ac_status=$?
7974 echo "$as_me:7974: \$? = $ac_status" >&5
7975 (exit "$ac_status"); }; }; then
7976 ac_cv_lib_gpm_Gpm_Wgetch=yes
7977else
7978 echo "$as_me: failed program was:" >&5
7979cat "conftest.$ac_ext" >&5
7980ac_cv_lib_gpm_Gpm_Wgetch=no
7981fi
7982rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7983LIBS=$ac_check_lib_save_LIBS
7984fi
7985echo "$as_me:7985: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7986echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7987if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7988
7989echo "$as_me:7989: checking if GPM is weakly bound to curses library" >&5
7990echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7991if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7992 echo $ECHO_N "(cached) $ECHO_C" >&6
7993else
7994
7995cf_cv_check_gpm_wgetch=unknown
7996if test "$cross_compiling" != yes ; then
7997
7998cat >conftest.$ac_ext <<CF_EOF
7999#include <gpm.h>
8000int main(void)
8001{
8002 Gpm_Wgetch();
8003 ${cf_cv_main_return:-return}(0);
8004}
8005CF_EOF
8006
8007 cf_save_LIBS="$LIBS"
8008 # This only works if we can look at the symbol table. If a shared
8009 # library is stripped for install, we cannot use that. So we're forced
8010 # to rely on the static library, noting that some packagers may not
8011 # include it.
8012 LIBS="-static -lgpm -dynamic $LIBS"
8013 if { (eval echo "$as_me:8013: \"$ac_compile\"") >&5
8014 (eval $ac_compile) 2>&5
8015 ac_status=$?
8016 echo "$as_me:8016: \$? = $ac_status" >&5
8017 (exit "$ac_status"); } ; then
8018 if { (eval echo "$as_me:8018: \"$ac_link\"") >&5
8019 (eval $ac_link) 2>&5
8020 ac_status=$?
8021 echo "$as_me:8021: \$? = $ac_status" >&5
8022 (exit "$ac_status"); } ; then
8023 cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8024 test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8025 test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8026 fi
8027 fi
8028 rm -rf ./conftest*
8029 LIBS="$cf_save_LIBS"
8030fi
8031
8032fi
8033echo "$as_me:8033: result: $cf_cv_check_gpm_wgetch" >&5
8034echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8035
8036if test "$cf_cv_check_gpm_wgetch" != yes ; then
8037 { echo "$as_me:8037: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8038echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8039fi
8040
8041fi
8042
8043fi
8044
8045echo "$as_me:8045: checking if you want to use PCRE2 for regular-expressions" >&5
8046echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8047
8048# Check whether --with-pcre2 or --without-pcre2 was given.
8049if test "${with_pcre2+set}" = set; then
8050 withval="$with_pcre2"
8051
8052fi;
8053test -z "$with_pcre2" && with_pcre2=no
8054echo "$as_me:8054: result: $with_pcre2" >&5
8055echo "${ECHO_T}$with_pcre2" >&6
8056
8057if test "x$with_pcre2" != xno ; then
8058 cf_with_pcre2_ok=no
8059 for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8060 do
8061
8062if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8063 test -n "$verbose" && echo " found package $cf_with_pcre2" 1>&6
8064
8065echo "${as_me:-configure}:8065: testing found package $cf_with_pcre2 ..." 1>&5
8066
8067 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8068 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_with_pcre2" 2>/dev/null`"
8069 test -n "$verbose" && echo " package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8070
8071echo "${as_me:-configure}:8071: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8072
8073 test -n "$verbose" && echo " package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8074
8075echo "${as_me:-configure}:8075: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8076
8077cf_fix_cppflags=no
8078cf_new_cflags=
8079cf_new_cppflags=
8080cf_new_extra_cppflags=
8081
8082for cf_add_cflags in $cf_pkgconfig_incs
8083do
8084case "$cf_fix_cppflags" in
8085(no)
8086 case "$cf_add_cflags" in
8087 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8088 case "$cf_add_cflags" in
8089 (-D*)
8090 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8091
8092 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8093 && test -z "${cf_tst_cflags}" \
8094 && cf_fix_cppflags=yes
8095
8096 if test "$cf_fix_cppflags" = yes ; then
8097
8098 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8099 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8100
8101 continue
8102 elif test "${cf_tst_cflags}" = "\"'" ; then
8103
8104 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8105 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8106
8107 continue
8108 fi
8109 ;;
8110 esac
8111 case "$CPPFLAGS" in
8112 (*$cf_add_cflags)
8113 ;;
8114 (*)
8115 case "$cf_add_cflags" in
8116 (-D*)
8117 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8118
8119CPPFLAGS=`echo "$CPPFLAGS" | \
8120 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8121 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8122
8123 ;;
8124 esac
8125
8126 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8127 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8128
8129 ;;
8130 esac
8131 ;;
8132 (*)
8133
8134 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8135 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8136
8137 ;;
8138 esac
8139 ;;
8140(yes)
8141
8142 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8143 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8144
8145 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8146
8147 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8148 && test -z "${cf_tst_cflags}" \
8149 && cf_fix_cppflags=no
8150 ;;
8151esac
8152done
8153
8154if test -n "$cf_new_cflags" ; then
8155
8156 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8157 CFLAGS="${CFLAGS}$cf_new_cflags"
8158
8159fi
8160
8161if test -n "$cf_new_cppflags" ; then
8162
8163 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8164 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8165
8166fi
8167
8168if test -n "$cf_new_extra_cppflags" ; then
8169
8170 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8171 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8172
8173fi
8174
8175cf_add_libs="$LIBS"
8176# reverse order
8177cf_add_0lib=
8178for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8179# filter duplicates
8180for cf_add_1lib in $cf_add_0lib; do
8181 for cf_add_2lib in $cf_add_libs; do
8182 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8183 cf_add_1lib=
8184 break
8185 fi
8186 done
8187 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8188done
8189LIBS="$cf_add_libs"
8190
8191 cf_with_pcre2_ok=yes; break
8192else
8193 cf_pkgconfig_incs=
8194 cf_pkgconfig_libs=
8195 :
8196fi
8197
8198 done
8199 cf_with_pcre2_ok=yes || { { echo "$as_me:8199: error: Cannot find PCRE2 library" >&5
8200echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8201 { (exit 1); exit 1; }; }
8202
8203cat >>confdefs.h <<\EOF
8204#define HAVE_LIB_PCRE2 1
8205EOF
8206
8207 # if pkgconfig gave no results, look for the libraries directly
8208 case "$LIBS" in
8209 (*pcre2-posix*|*pcreposix*)
8210 ;;
8211 (*)
8212 echo "$as_me:8212: checking for regcomp in -lpcre2-posix" >&5
8213echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8214if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8215 echo $ECHO_N "(cached) $ECHO_C" >&6
8216else
8217 ac_check_lib_save_LIBS=$LIBS
8218LIBS="-lpcre2-posix $LIBS"
8219cat >"conftest.$ac_ext" <<_ACEOF
8220#line 8220 "configure"
8221#include "confdefs.h"
8222
8223/* Override any gcc2 internal prototype to avoid an error. */
8224#ifdef __cplusplus
8225extern "C"
8226#endif
8227/* We use char because int might match the return type of a gcc2
8228 builtin and then its argument prototype would still apply. */
8229char regcomp (void);
8230int
8231main (void)
8232{
8233regcomp ();
8234 ;
8235 return 0;
8236}
8237_ACEOF
8238rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8239if { (eval echo "$as_me:8239: \"$ac_link\"") >&5
8240 (eval $ac_link) 2>&5
8241 ac_status=$?
8242 echo "$as_me:8242: \$? = $ac_status" >&5
8243 (exit "$ac_status"); } &&
8244 { ac_try='test -s "conftest$ac_exeext"'
8245 { (eval echo "$as_me:8245: \"$ac_try\"") >&5
8246 (eval $ac_try) 2>&5
8247 ac_status=$?
8248 echo "$as_me:8248: \$? = $ac_status" >&5
8249 (exit "$ac_status"); }; }; then
8250 ac_cv_lib_pcre2_posix_regcomp=yes
8251else
8252 echo "$as_me: failed program was:" >&5
8253cat "conftest.$ac_ext" >&5
8254ac_cv_lib_pcre2_posix_regcomp=no
8255fi
8256rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8257LIBS=$ac_check_lib_save_LIBS
8258fi
8259echo "$as_me:8259: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8260echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8261if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8262
8263cf_add_libs="$LIBS"
8264# reverse order
8265cf_add_0lib=
8266for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8267# filter duplicates
8268for cf_add_1lib in $cf_add_0lib; do
8269 for cf_add_2lib in $cf_add_libs; do
8270 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8271 cf_add_1lib=
8272 break
8273 fi
8274 done
8275 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8276done
8277LIBS="$cf_add_libs"
8278
8279else
8280 echo "$as_me:8280: checking for regcomp in -lpcreposix" >&5
8281echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8282if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8283 echo $ECHO_N "(cached) $ECHO_C" >&6
8284else
8285 ac_check_lib_save_LIBS=$LIBS
8286LIBS="-lpcreposix $LIBS"
8287cat >"conftest.$ac_ext" <<_ACEOF
8288#line 8288 "configure"
8289#include "confdefs.h"
8290
8291/* Override any gcc2 internal prototype to avoid an error. */
8292#ifdef __cplusplus
8293extern "C"
8294#endif
8295/* We use char because int might match the return type of a gcc2
8296 builtin and then its argument prototype would still apply. */
8297char regcomp (void);
8298int
8299main (void)
8300{
8301regcomp ();
8302 ;
8303 return 0;
8304}
8305_ACEOF
8306rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8307if { (eval echo "$as_me:8307: \"$ac_link\"") >&5
8308 (eval $ac_link) 2>&5
8309 ac_status=$?
8310 echo "$as_me:8310: \$? = $ac_status" >&5
8311 (exit "$ac_status"); } &&
8312 { ac_try='test -s "conftest$ac_exeext"'
8313 { (eval echo "$as_me:8313: \"$ac_try\"") >&5
8314 (eval $ac_try) 2>&5
8315 ac_status=$?
8316 echo "$as_me:8316: \$? = $ac_status" >&5
8317 (exit "$ac_status"); }; }; then
8318 ac_cv_lib_pcreposix_regcomp=yes
8319else
8320 echo "$as_me: failed program was:" >&5
8321cat "conftest.$ac_ext" >&5
8322ac_cv_lib_pcreposix_regcomp=no
8323fi
8324rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8325LIBS=$ac_check_lib_save_LIBS
8326fi
8327echo "$as_me:8327: result: $ac_cv_lib_pcreposix_regcomp" >&5
8328echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8329if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8330
8331cf_add_libs="$LIBS"
8332# reverse order
8333cf_add_0lib=
8334for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8335# filter duplicates
8336for cf_add_1lib in $cf_add_0lib; do
8337 for cf_add_2lib in $cf_add_libs; do
8338 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8339 cf_add_1lib=
8340 break
8341 fi
8342 done
8343 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8344done
8345LIBS="$cf_add_libs"
8346
8347else
8348 { { echo "$as_me:8348: error: Cannot find PCRE2 POSIX library" >&5
8349echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8350 { (exit 1); exit 1; }; }
8351fi
8352
8353fi
8354
8355 ;;
8356 esac
8357
8358 # either way, check for the library header files
8359
8360for ac_header in pcre2posix.h pcreposix.h
8361do
8362as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8363echo "$as_me:8363: checking for $ac_header" >&5
8364echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8365if eval "test \"\${$as_ac_Header+set}\" = set"; then
8366 echo $ECHO_N "(cached) $ECHO_C" >&6
8367else
8368 cat >"conftest.$ac_ext" <<_ACEOF
8369#line 8369 "configure"
8370#include "confdefs.h"
8371#include <$ac_header>
8372_ACEOF
8373if { (eval echo "$as_me:8373: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8374 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8375 ac_status=$?
8376 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8377 rm -f conftest.er1
8378 cat conftest.err >&5
8379 echo "$as_me:8379: \$? = $ac_status" >&5
8380 (exit "$ac_status"); } >/dev/null; then
8381 if test -s conftest.err; then
8382 ac_cpp_err=$ac_c_preproc_warn_flag
8383 else
8384 ac_cpp_err=
8385 fi
8386else
8387 ac_cpp_err=yes
8388fi
8389if test -z "$ac_cpp_err"; then
8390 eval "$as_ac_Header=yes"
8391else
8392 echo "$as_me: failed program was:" >&5
8393 cat "conftest.$ac_ext" >&5
8394 eval "$as_ac_Header=no"
8395fi
8396rm -f conftest.err "conftest.$ac_ext"
8397fi
8398echo "$as_me:8398: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8399echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8400if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8401 cat >>confdefs.h <<EOF
8402#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8403EOF
8404
8405fi
8406done
8407
8408for ac_func in PCRE2regcomp
8409do
8410as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8411echo "$as_me:8411: checking for $ac_func" >&5
8412echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8413if eval "test \"\${$as_ac_var+set}\" = set"; then
8414 echo $ECHO_N "(cached) $ECHO_C" >&6
8415else
8416 cat >"conftest.$ac_ext" <<_ACEOF
8417#line 8417 "configure"
8418#include "confdefs.h"
8419#define $ac_func autoconf_temporary
8420#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8421#undef $ac_func
8422
8423#ifdef __cplusplus
8424extern "C"
8425#endif
8426
8427/* We use char because int might match the return type of a gcc2
8428 builtin and then its argument prototype would still apply. */
8429char $ac_func (void);
8430
8431int
8432main (void)
8433{
8434
8435/* The GNU C library defines stubs for functions which it implements
8436 to always fail with ENOSYS. Some functions are actually named
8437 something starting with __ and the normal name is an alias. */
8438#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8439#error found stub for $ac_func
8440#endif
8441
8442 return $ac_func ();
8443 ;
8444 return 0;
8445}
8446_ACEOF
8447rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8448if { (eval echo "$as_me:8448: \"$ac_link\"") >&5
8449 (eval $ac_link) 2>&5
8450 ac_status=$?
8451 echo "$as_me:8451: \$? = $ac_status" >&5
8452 (exit "$ac_status"); } &&
8453 { ac_try='test -s "conftest$ac_exeext"'
8454 { (eval echo "$as_me:8454: \"$ac_try\"") >&5
8455 (eval $ac_try) 2>&5
8456 ac_status=$?
8457 echo "$as_me:8457: \$? = $ac_status" >&5
8458 (exit "$ac_status"); }; }; then
8459 eval "$as_ac_var=yes"
8460else
8461 echo "$as_me: failed program was:" >&5
8462cat "conftest.$ac_ext" >&5
8463eval "$as_ac_var=no"
8464fi
8465rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8466fi
8467echo "$as_me:8467: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8468echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8469if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8470 cat >>confdefs.h <<EOF
8471#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8472EOF
8473
8474fi
8475done
8476
8477fi
8478
8479# not everyone has "test -c"
8480if test -c /dev/sysmouse 2>/dev/null ; then
8481echo "$as_me:8481: checking if you want to use sysmouse" >&5
8482echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8483
8484# Check whether --with-sysmouse or --without-sysmouse was given.
8485if test "${with_sysmouse+set}" = set; then
8486 withval="$with_sysmouse"
8487 cf_with_sysmouse=$withval
8488else
8489 cf_with_sysmouse=maybe
8490fi;
8491 if test "$cf_with_sysmouse" != no ; then
8492 cat >"conftest.$ac_ext" <<_ACEOF
8493#line 8493 "configure"
8494#include "confdefs.h"
8495
8496#include <osreldate.h>
8497#if (__FreeBSD_version >= 400017)
8498#include <sys/consio.h>
8499#include <sys/fbio.h>
8500#else
8501#include <machine/console.h>
8502#endif
8503
8504int
8505main (void)
8506{
8507
8508 struct mouse_info the_mouse;
8509 ioctl(0, CONS_MOUSECTL, &the_mouse);
8510
8511 ;
8512 return 0;
8513}
8514_ACEOF
8515rm -f "conftest.$ac_objext"
8516if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
8517 (eval $ac_compile) 2>&5
8518 ac_status=$?
8519 echo "$as_me:8519: \$? = $ac_status" >&5
8520 (exit "$ac_status"); } &&
8521 { ac_try='test -s "conftest.$ac_objext"'
8522 { (eval echo "$as_me:8522: \"$ac_try\"") >&5
8523 (eval $ac_try) 2>&5
8524 ac_status=$?
8525 echo "$as_me:8525: \$? = $ac_status" >&5
8526 (exit "$ac_status"); }; }; then
8527 cf_with_sysmouse=yes
8528else
8529 echo "$as_me: failed program was:" >&5
8530cat "conftest.$ac_ext" >&5
8531cf_with_sysmouse=no
8532fi
8533rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8534 fi
8535echo "$as_me:8535: result: $cf_with_sysmouse" >&5
8536echo "${ECHO_T}$cf_with_sysmouse" >&6
8537test "$cf_with_sysmouse" = yes &&
8538cat >>confdefs.h <<\EOF
8539#define USE_SYSMOUSE 1
8540EOF
8541
8542fi
8543
Steve Kondikae271bc2015-11-15 02:50:53 +01008544# pretend that ncurses==ncursesw==ncursest
micky3879b9f5e72025-07-08 18:04:53 -04008545echo "$as_me:8545: checking if you want to disable library suffixes" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008546echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8547
8548# Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8549if test "${enable_lib_suffixes+set}" = set; then
8550 enableval="$enable_lib_suffixes"
8551 test "$enableval" != no && enableval=yes
8552 if test "$enableval" != "yes" ; then
8553 disable_lib_suffixes=yes
8554 else
8555 disable_lib_suffixes=no
8556 fi
8557else
8558 enableval=yes
8559 disable_lib_suffixes=no
8560
8561fi;
micky3879b9f5e72025-07-08 18:04:53 -04008562echo "$as_me:8562: result: $disable_lib_suffixes" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008563echo "${ECHO_T}$disable_lib_suffixes" >&6
8564
8565### If we're building with rpath, try to link non-standard libs that way too.
micky3879b9f5e72025-07-08 18:04:53 -04008566if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
Steve Kondikae271bc2015-11-15 02:50:53 +01008567
micky3879b9f5e72025-07-08 18:04:53 -04008568echo "$as_me:8568: checking if rpath-hack should be disabled" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008569echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8570
8571# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8572if test "${enable_rpath_hack+set}" = set; then
8573 enableval="$enable_rpath_hack"
8574 test "$enableval" != no && enableval=yes
8575 if test "$enableval" != "yes" ; then
micky3879b9f5e72025-07-08 18:04:53 -04008576 enable_rpath_hack=no
Steve Kondikae271bc2015-11-15 02:50:53 +01008577 else
micky3879b9f5e72025-07-08 18:04:53 -04008578 enable_rpath_hack=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01008579 fi
8580else
8581 enableval=yes
micky3879b9f5e72025-07-08 18:04:53 -04008582 enable_rpath_hack=yes
Steve Kondikae271bc2015-11-15 02:50:53 +01008583
8584fi;
micky3879b9f5e72025-07-08 18:04:53 -04008585if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8586echo "$as_me:8586: result: $cf_disable_rpath_hack" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008587echo "${ECHO_T}$cf_disable_rpath_hack" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01008588
micky3879b9f5e72025-07-08 18:04:53 -04008589if test "$enable_rpath_hack" = yes ; then
8590
8591echo "$as_me:8591: checking for updated LDFLAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008592echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8593if test -n "$LD_RPATH_OPT" ; then
micky3879b9f5e72025-07-08 18:04:53 -04008594 echo "$as_me:8594: result: maybe" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008595echo "${ECHO_T}maybe" >&6
8596
8597 for ac_prog in ldd
8598do
8599 # Extract the first word of "$ac_prog", so it can be a program name with args.
8600set dummy $ac_prog; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -04008601echo "$as_me:8601: checking for $ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008602echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8603if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8604 echo $ECHO_N "(cached) $ECHO_C" >&6
8605else
8606 if test -n "$cf_ldd_prog"; then
8607 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8608else
8609 ac_save_IFS=$IFS; IFS=$ac_path_separator
8610ac_dummy="$PATH"
8611for ac_dir in $ac_dummy; do
8612 IFS=$ac_save_IFS
8613 test -z "$ac_dir" && ac_dir=.
8614 $as_executable_p "$ac_dir/$ac_word" || continue
8615ac_cv_prog_cf_ldd_prog="$ac_prog"
micky3879b9f5e72025-07-08 18:04:53 -04008616echo "$as_me:8616: found $ac_dir/$ac_word" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008617break
8618done
8619
8620fi
8621fi
8622cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8623if test -n "$cf_ldd_prog"; then
micky3879b9f5e72025-07-08 18:04:53 -04008624 echo "$as_me:8624: result: $cf_ldd_prog" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008625echo "${ECHO_T}$cf_ldd_prog" >&6
8626else
micky3879b9f5e72025-07-08 18:04:53 -04008627 echo "$as_me:8627: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008628echo "${ECHO_T}no" >&6
8629fi
8630
8631 test -n "$cf_ldd_prog" && break
8632done
8633test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8634
8635 cf_rpath_list="/usr/lib /lib"
8636 if test "$cf_ldd_prog" != no
8637 then
8638 cf_rpath_oops=
8639
micky3879b9f5e72025-07-08 18:04:53 -04008640cat >"conftest.$ac_ext" <<_ACEOF
8641#line 8641 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01008642#include "confdefs.h"
8643#include <stdio.h>
8644int
micky3879b9f5e72025-07-08 18:04:53 -04008645main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +01008646{
8647printf("Hello");
8648 ;
8649 return 0;
8650}
8651_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04008652rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8653if { (eval echo "$as_me:8653: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008654 (eval $ac_link) 2>&5
8655 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04008656 echo "$as_me:8656: \$? = $ac_status" >&5
8657 (exit "$ac_status"); } &&
8658 { ac_try='test -s "conftest$ac_exeext"'
8659 { (eval echo "$as_me:8659: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008660 (eval $ac_try) 2>&5
8661 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04008662 echo "$as_me:8662: \$? = $ac_status" >&5
8663 (exit "$ac_status"); }; }; then
8664 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8665 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
Steve Kondikae271bc2015-11-15 02:50:53 +01008666else
8667 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04008668cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008669fi
micky3879b9f5e72025-07-08 18:04:53 -04008670rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01008671
8672 # If we passed the link-test, but get a "not found" on a given library,
8673 # this could be due to inept reconfiguration of gcc to make it only
8674 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
8675 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8676 # /usr/local libraries.
8677 if test -n "$cf_rpath_oops"
8678 then
8679 for cf_rpath_src in $cf_rpath_oops
8680 do
8681 for cf_rpath_dir in \
8682 /usr/local \
8683 /usr/pkg \
8684 /opt/sfw
8685 do
micky3879b9f5e72025-07-08 18:04:53 -04008686 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
Steve Kondikae271bc2015-11-15 02:50:53 +01008687 then
8688 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8689
micky3879b9f5e72025-07-08 18:04:53 -04008690echo "${as_me:-configure}:8690: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008691
8692 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8693 break
8694 fi
8695 done
8696 done
8697 fi
8698 fi
8699
8700 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8701
micky3879b9f5e72025-07-08 18:04:53 -04008702echo "${as_me:-configure}:8702: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008703
8704test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
8705
micky3879b9f5e72025-07-08 18:04:53 -04008706echo "${as_me:-configure}:8706: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008707
8708cf_rpath_dst=
8709for cf_rpath_src in $LDFLAGS
8710do
micky3879b9f5e72025-07-08 18:04:53 -04008711 case "$cf_rpath_src" in
Steve Kondikae271bc2015-11-15 02:50:53 +01008712 (-L*)
8713
8714 # check if this refers to a directory which we will ignore
8715 cf_rpath_skip=no
8716 if test -n "$cf_rpath_list"
8717 then
8718 for cf_rpath_item in $cf_rpath_list
8719 do
8720 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8721 then
8722 cf_rpath_skip=yes
8723 break
8724 fi
8725 done
8726 fi
8727
8728 if test "$cf_rpath_skip" = no
8729 then
8730 # transform the option
8731 if test "$LD_RPATH_OPT" = "-R " ; then
8732 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8733 else
8734 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8735 fi
8736
8737 # if we have not already added this, add it now
8738 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8739 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8740 then
8741 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8742
micky3879b9f5e72025-07-08 18:04:53 -04008743echo "${as_me:-configure}:8743: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008744
8745 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8746 fi
8747 fi
8748 ;;
8749 esac
8750 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8751done
8752LDFLAGS=$cf_rpath_dst
8753
8754test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
8755
micky3879b9f5e72025-07-08 18:04:53 -04008756echo "${as_me:-configure}:8756: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008757
8758test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
8759
micky3879b9f5e72025-07-08 18:04:53 -04008760echo "${as_me:-configure}:8760: testing ...checking LIBS $LIBS ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008761
8762cf_rpath_dst=
8763for cf_rpath_src in $LIBS
8764do
micky3879b9f5e72025-07-08 18:04:53 -04008765 case "$cf_rpath_src" in
Steve Kondikae271bc2015-11-15 02:50:53 +01008766 (-L*)
8767
8768 # check if this refers to a directory which we will ignore
8769 cf_rpath_skip=no
8770 if test -n "$cf_rpath_list"
8771 then
8772 for cf_rpath_item in $cf_rpath_list
8773 do
8774 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8775 then
8776 cf_rpath_skip=yes
8777 break
8778 fi
8779 done
8780 fi
8781
8782 if test "$cf_rpath_skip" = no
8783 then
8784 # transform the option
8785 if test "$LD_RPATH_OPT" = "-R " ; then
8786 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8787 else
8788 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8789 fi
8790
8791 # if we have not already added this, add it now
8792 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8793 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8794 then
8795 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8796
micky3879b9f5e72025-07-08 18:04:53 -04008797echo "${as_me:-configure}:8797: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008798
8799 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8800 fi
8801 fi
8802 ;;
8803 esac
8804 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8805done
8806LIBS=$cf_rpath_dst
8807
8808test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
8809
micky3879b9f5e72025-07-08 18:04:53 -04008810echo "${as_me:-configure}:8810: testing ...checked LIBS $LIBS ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008811
8812 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8813
micky3879b9f5e72025-07-08 18:04:53 -04008814echo "${as_me:-configure}:8814: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008815
8816else
micky3879b9f5e72025-07-08 18:04:53 -04008817 echo "$as_me:8817: result: no" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008818echo "${ECHO_T}no" >&6
8819fi
8820
8821fi
8822
8823fi
8824
micky3879b9f5e72025-07-08 18:04:53 -04008825### Depending on the system, someone may use rpath to build ncurses but not
8826# want users of the package to rely upon that feature. Give those people an
8827# option to suppress that detail from EXTRA_LDFLAGS.
8828EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8829if test -n "$EXTRA_PKG_LDFLAGS"
8830then
8831 echo "$as_me:8831: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8832echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8833
8834# Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8835if test "${enable_pkg_ldflags+set}" = set; then
8836 enableval="$enable_pkg_ldflags"
8837 test "$enableval" != no && enableval=yes
8838 if test "$enableval" != "yes" ; then
8839 disable_pkg_ldflags=yes
8840 else
8841 disable_pkg_ldflags=no
8842 fi
8843else
8844 enableval=yes
8845 disable_pkg_ldflags=no
8846
8847fi;
8848 echo "$as_me:8848: result: $disable_pkg_ldflags" >&5
8849echo "${ECHO_T}$disable_pkg_ldflags" >&6
8850 test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8851fi
8852
Steve Kondikae271bc2015-11-15 02:50:53 +01008853###############################################################################
8854
8855### use option --with-extra-suffix to append suffix to headers and libraries
micky3879b9f5e72025-07-08 18:04:53 -04008856echo "$as_me:8856: checking for extra suffix to append to header/library paths" >&5
8857echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01008858EXTRA_SUFFIX=
8859
8860# Check whether --with-extra-suffix or --without-extra-suffix was given.
8861if test "${with_extra_suffix+set}" = set; then
8862 withval="$with_extra_suffix"
8863 case x$withval in
micky3879b9f5e72025-07-08 18:04:53 -04008864 (xno)
Steve Kondikae271bc2015-11-15 02:50:53 +01008865 ;;
8866 (xyes|x)
8867 EXTRA_SUFFIX=$cf_cv_abi_version
8868 ;;
8869 (*)
8870 EXTRA_SUFFIX=$withval
8871 ;;
8872 esac
8873
8874fi;
micky3879b9f5e72025-07-08 18:04:53 -04008875echo "$as_me:8875: result: ${EXTRA_SUFFIX:-(none)}" >&5
8876echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01008877
8878### use option --disable-overwrite to leave out the link to -lcurses
micky3879b9f5e72025-07-08 18:04:53 -04008879echo "$as_me:8879: checking if you wish to install ncurses overwriting curses" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008880echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8881
8882# Check whether --enable-overwrite or --disable-overwrite was given.
8883if test "${enable_overwrite+set}" = set; then
8884 enableval="$enable_overwrite"
8885 with_overwrite=$enableval
8886else
8887 if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8888fi;
micky3879b9f5e72025-07-08 18:04:53 -04008889echo "$as_me:8889: result: $with_overwrite" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008890echo "${ECHO_T}$with_overwrite" >&6
8891
micky3879b9f5e72025-07-08 18:04:53 -04008892echo "$as_me:8892: checking if external terminfo-database is used" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008893echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8894
8895# Check whether --enable-database or --disable-database was given.
8896if test "${enable_database+set}" = set; then
8897 enableval="$enable_database"
8898 use_database=$enableval
8899else
8900 use_database=yes
8901fi;
micky3879b9f5e72025-07-08 18:04:53 -04008902echo "$as_me:8902: result: $use_database" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008903echo "${ECHO_T}$use_database" >&6
8904
micky3879b9f5e72025-07-08 18:04:53 -04008905case "$host_os" in
Steve Kondikae271bc2015-11-15 02:50:53 +01008906(os2*)
8907 TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8908 ;;
8909(*)
8910 TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8911 ;;
8912esac
8913
8914NCURSES_USE_DATABASE=0
8915if test "$use_database" != no ; then
8916 NCURSES_USE_DATABASE=1
8917
micky3879b9f5e72025-07-08 18:04:53 -04008918 echo "$as_me:8918: checking which terminfo source-file will be installed" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008919echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8920
8921# Check whether --with-database or --without-database was given.
8922if test "${with_database+set}" = set; then
8923 withval="$with_database"
8924 TERMINFO_SRC=$withval
8925fi;
micky3879b9f5e72025-07-08 18:04:53 -04008926 echo "$as_me:8926: result: $TERMINFO_SRC" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008927echo "${ECHO_T}$TERMINFO_SRC" >&6
8928
micky3879b9f5e72025-07-08 18:04:53 -04008929 echo "$as_me:8929: checking whether to use hashed database instead of directory/tree" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008930echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8931
8932# Check whether --with-hashed-db or --without-hashed-db was given.
8933if test "${with_hashed_db+set}" = set; then
8934 withval="$with_hashed_db"
8935
8936else
8937 with_hashed_db=no
8938fi;
micky3879b9f5e72025-07-08 18:04:53 -04008939 echo "$as_me:8939: result: $with_hashed_db" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01008940echo "${ECHO_T}$with_hashed_db" >&6
8941else
8942 with_hashed_db=no
8943fi
8944
micky3879b9f5e72025-07-08 18:04:53 -04008945echo "$as_me:8945: checking for list of fallback terminal descriptions" >&5
8946echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01008947
8948# Check whether --with-fallbacks or --without-fallbacks was given.
8949if test "${with_fallbacks+set}" = set; then
8950 withval="$with_fallbacks"
8951 with_fallback=$withval
8952else
8953 with_fallback=
8954fi;
micky3879b9f5e72025-07-08 18:04:53 -04008955echo "$as_me:8955: result: ${with_fallback:-(none)}" >&5
8956echo "${ECHO_T}${with_fallback:-(none)}" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01008957
micky3879b9f5e72025-07-08 18:04:53 -04008958case ".$with_fallback" in
8959(.|.no)
8960 FALLBACK_LIST=
8961 ;;
8962(.yes)
8963 { echo "$as_me:8963: WARNING: expected a list of terminal descriptions" >&5
8964echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8965 ;;
8966(*)
8967 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8968 ;;
8969esac
8970
8971# The fallback feature in ncurses relies upon tic/infocmp outside the build
8972# tree for generating the terminal descriptions that will be compiled into the
8973# library. If your toolchain is old, it may not handle current terminal
8974# databases. Use configure-options to point to the tools which will be used,
8975# rather than the first ones found on the $PATH.
8976if test -n "$ac_tool_prefix"; then
8977 # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8978set dummy ${ac_tool_prefix}tic; ac_word=$2
8979echo "$as_me:8979: checking for $ac_word" >&5
8980echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8981if test "${ac_cv_prog_TIC+set}" = set; then
8982 echo $ECHO_N "(cached) $ECHO_C" >&6
8983else
8984 if test -n "$TIC"; then
8985 ac_cv_prog_TIC="$TIC" # Let the user override the test.
8986else
8987 ac_save_IFS=$IFS; IFS=$ac_path_separator
8988ac_dummy="$PATH"
8989for ac_dir in $ac_dummy; do
8990 IFS=$ac_save_IFS
8991 test -z "$ac_dir" && ac_dir=.
8992 $as_executable_p "$ac_dir/$ac_word" || continue
8993ac_cv_prog_TIC="${ac_tool_prefix}tic"
8994echo "$as_me:8994: found $ac_dir/$ac_word" >&5
8995break
8996done
8997
8998fi
8999fi
9000TIC=$ac_cv_prog_TIC
9001if test -n "$TIC"; then
9002 echo "$as_me:9002: result: $TIC" >&5
9003echo "${ECHO_T}$TIC" >&6
9004else
9005 echo "$as_me:9005: result: no" >&5
9006echo "${ECHO_T}no" >&6
9007fi
9008
9009fi
9010if test -z "$ac_cv_prog_TIC"; then
9011 ac_ct_TIC=$TIC
9012 # Extract the first word of "tic", so it can be a program name with args.
9013set dummy tic; ac_word=$2
9014echo "$as_me:9014: checking for $ac_word" >&5
9015echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9016if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9017 echo $ECHO_N "(cached) $ECHO_C" >&6
9018else
9019 if test -n "$ac_ct_TIC"; then
9020 ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9021else
9022 ac_save_IFS=$IFS; IFS=$ac_path_separator
9023ac_dummy="$PATH"
9024for ac_dir in $ac_dummy; do
9025 IFS=$ac_save_IFS
9026 test -z "$ac_dir" && ac_dir=.
9027 $as_executable_p "$ac_dir/$ac_word" || continue
9028ac_cv_prog_ac_ct_TIC="tic"
9029echo "$as_me:9029: found $ac_dir/$ac_word" >&5
9030break
9031done
9032
9033fi
9034fi
9035ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9036if test -n "$ac_ct_TIC"; then
9037 echo "$as_me:9037: result: $ac_ct_TIC" >&5
9038echo "${ECHO_T}$ac_ct_TIC" >&6
9039else
9040 echo "$as_me:9040: result: no" >&5
9041echo "${ECHO_T}no" >&6
9042fi
9043
9044 TIC=$ac_ct_TIC
9045else
9046 TIC="$ac_cv_prog_TIC"
9047fi
9048
9049if test -n "$ac_tool_prefix"; then
9050 # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9051set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9052echo "$as_me:9052: checking for $ac_word" >&5
9053echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9054if test "${ac_cv_prog_INFOCMP+set}" = set; then
9055 echo $ECHO_N "(cached) $ECHO_C" >&6
9056else
9057 if test -n "$INFOCMP"; then
9058 ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9059else
9060 ac_save_IFS=$IFS; IFS=$ac_path_separator
9061ac_dummy="$PATH"
9062for ac_dir in $ac_dummy; do
9063 IFS=$ac_save_IFS
9064 test -z "$ac_dir" && ac_dir=.
9065 $as_executable_p "$ac_dir/$ac_word" || continue
9066ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9067echo "$as_me:9067: found $ac_dir/$ac_word" >&5
9068break
9069done
9070
9071fi
9072fi
9073INFOCMP=$ac_cv_prog_INFOCMP
9074if test -n "$INFOCMP"; then
9075 echo "$as_me:9075: result: $INFOCMP" >&5
9076echo "${ECHO_T}$INFOCMP" >&6
9077else
9078 echo "$as_me:9078: result: no" >&5
9079echo "${ECHO_T}no" >&6
9080fi
9081
9082fi
9083if test -z "$ac_cv_prog_INFOCMP"; then
9084 ac_ct_INFOCMP=$INFOCMP
9085 # Extract the first word of "infocmp", so it can be a program name with args.
9086set dummy infocmp; ac_word=$2
9087echo "$as_me:9087: checking for $ac_word" >&5
9088echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9089if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
9091else
9092 if test -n "$ac_ct_INFOCMP"; then
9093 ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9094else
9095 ac_save_IFS=$IFS; IFS=$ac_path_separator
9096ac_dummy="$PATH"
9097for ac_dir in $ac_dummy; do
9098 IFS=$ac_save_IFS
9099 test -z "$ac_dir" && ac_dir=.
9100 $as_executable_p "$ac_dir/$ac_word" || continue
9101ac_cv_prog_ac_ct_INFOCMP="infocmp"
9102echo "$as_me:9102: found $ac_dir/$ac_word" >&5
9103break
9104done
9105
9106fi
9107fi
9108ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9109if test -n "$ac_ct_INFOCMP"; then
9110 echo "$as_me:9110: result: $ac_ct_INFOCMP" >&5
9111echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9112else
9113 echo "$as_me:9113: result: no" >&5
9114echo "${ECHO_T}no" >&6
9115fi
9116
9117 INFOCMP=$ac_ct_INFOCMP
9118else
9119 INFOCMP="$ac_cv_prog_INFOCMP"
9120fi
9121
9122if test -n "$FALLBACK_LIST"
9123then
9124
9125# Check whether --with-tic-path or --without-tic-path was given.
9126if test "${with_tic_path+set}" = set; then
9127 withval="$with_tic_path"
9128 echo "$as_me:9128: checking for tic program for fallbacks" >&5
9129echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9130 TIC=$withval
9131 echo "$as_me:9131: result: $TIC" >&5
9132echo "${ECHO_T}$TIC" >&6
9133
9134if test "x$prefix" != xNONE; then
9135 cf_path_syntax="$prefix"
9136else
9137 cf_path_syntax="$ac_default_prefix"
9138fi
9139
9140case ".$TIC" in
9141(.\$\(*\)*|.\'*\'*)
9142 ;;
9143(..|./*|.\\*)
9144 ;;
9145(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9146 ;;
9147(.\$\{*prefix\}*|.\$\{*dir\}*)
9148 eval TIC="$TIC"
9149 case ".$TIC" in
9150 (.NONE/*)
9151 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9152 ;;
9153 esac
9154 ;;
9155(.no|.NONE/*)
9156 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9157 ;;
9158(*)
9159 { { echo "$as_me:9159: error: expected a pathname, not \"$TIC\"" >&5
9160echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9161 { (exit 1); exit 1; }; }
9162 ;;
9163esac
9164
9165else
9166
9167test -z "$TIC" && TIC="tic"
9168for ac_prog in $TIC tic
9169do
9170 # Extract the first word of "$ac_prog", so it can be a program name with args.
9171set dummy $ac_prog; ac_word=$2
9172echo "$as_me:9172: checking for $ac_word" >&5
9173echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9174if test "${ac_cv_path_TIC+set}" = set; then
9175 echo $ECHO_N "(cached) $ECHO_C" >&6
9176else
9177 case $TIC in
9178 [\\/]* | ?:[\\/]*)
9179 ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9180 ;;
9181 *)
9182 ac_save_IFS=$IFS; IFS=$ac_path_separator
9183ac_dummy="$PATH:/usr/local/ncurses/bin"
9184for ac_dir in $ac_dummy; do
9185 IFS=$ac_save_IFS
9186 test -z "$ac_dir" && ac_dir=.
9187 if $as_executable_p "$ac_dir/$ac_word"; then
9188 ac_cv_path_TIC="$ac_dir/$ac_word"
9189 echo "$as_me:9189: found $ac_dir/$ac_word" >&5
9190 break
9191fi
9192done
9193
9194 ;;
9195esac
9196fi
9197TIC=$ac_cv_path_TIC
9198
9199if test -n "$TIC"; then
9200 echo "$as_me:9200: result: $TIC" >&5
9201echo "${ECHO_T}$TIC" >&6
9202else
9203 echo "$as_me:9203: result: no" >&5
9204echo "${ECHO_T}no" >&6
9205fi
9206
9207 test -n "$TIC" && break
9208done
9209test -n "$TIC" || TIC="$TIC"
9210
9211cf_path_prog=""
9212cf_path_args=""
9213IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9214for cf_temp in $ac_cv_path_TIC
9215do
9216 if test -z "$cf_path_prog" ; then
9217 if test "$with_full_paths" = yes ; then
9218
9219if test "x$prefix" != xNONE; then
9220 cf_path_syntax="$prefix"
9221else
9222 cf_path_syntax="$ac_default_prefix"
9223fi
9224
9225case ".$cf_temp" in
9226(.\$\(*\)*|.\'*\'*)
9227 ;;
9228(..|./*|.\\*)
9229 ;;
9230(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9231 ;;
9232(.\$\{*prefix\}*|.\$\{*dir\}*)
9233 eval cf_temp="$cf_temp"
9234 case ".$cf_temp" in
9235 (.NONE/*)
9236 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9237 ;;
9238 esac
9239 ;;
9240(.no|.NONE/*)
9241 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9242 ;;
9243(*)
9244 break
9245 ;;
9246esac
9247
9248 cf_path_prog="$cf_temp"
9249 else
9250 cf_path_prog="`basename "$cf_temp"`"
9251 fi
9252 elif test -z "$cf_path_args" ; then
9253 cf_path_args="$cf_temp"
9254 else
9255 cf_path_args="$cf_path_args $cf_temp"
9256 fi
9257done
9258IFS="$cf_save_ifs"
9259
9260if test -n "$cf_path_prog" ; then
9261
9262echo "${as_me:-configure}:9262: testing defining path for ${cf_path_prog} ..." 1>&5
9263
9264cat >>confdefs.h <<EOF
9265#define TIC_PATH "$cf_path_prog"
9266EOF
9267
9268 test -n "$cf_path_args" &&
9269cat >>confdefs.h <<EOF
9270#define TIC_ARGS "$cf_path_args"
9271EOF
9272
9273fi
9274
9275 if test -z "$TIC"
9276 then
9277 { echo "$as_me:9277: WARNING: no tic program found for fallbacks" >&5
9278echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9279 fi
9280
9281fi;
9282
9283# Check whether --with-infocmp-path or --without-infocmp-path was given.
9284if test "${with_infocmp_path+set}" = set; then
9285 withval="$with_infocmp_path"
9286 echo "$as_me:9286: checking for infocmp program for fallbacks" >&5
9287echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9288 INFOCMP=$withval
9289 echo "$as_me:9289: result: $INFOCMP" >&5
9290echo "${ECHO_T}$INFOCMP" >&6
9291
9292if test "x$prefix" != xNONE; then
9293 cf_path_syntax="$prefix"
9294else
9295 cf_path_syntax="$ac_default_prefix"
9296fi
9297
9298case ".$INFOCMP" in
9299(.\$\(*\)*|.\'*\'*)
9300 ;;
9301(..|./*|.\\*)
9302 ;;
9303(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9304 ;;
9305(.\$\{*prefix\}*|.\$\{*dir\}*)
9306 eval INFOCMP="$INFOCMP"
9307 case ".$INFOCMP" in
9308 (.NONE/*)
9309 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9310 ;;
9311 esac
9312 ;;
9313(.no|.NONE/*)
9314 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9315 ;;
9316(*)
9317 { { echo "$as_me:9317: error: expected a pathname, not \"$INFOCMP\"" >&5
9318echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9319 { (exit 1); exit 1; }; }
9320 ;;
9321esac
9322
9323else
9324
9325test -z "$INFOCMP" && INFOCMP="infocmp"
9326for ac_prog in $INFOCMP infocmp
9327do
9328 # Extract the first word of "$ac_prog", so it can be a program name with args.
9329set dummy $ac_prog; ac_word=$2
9330echo "$as_me:9330: checking for $ac_word" >&5
9331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9332if test "${ac_cv_path_INFOCMP+set}" = set; then
9333 echo $ECHO_N "(cached) $ECHO_C" >&6
9334else
9335 case $INFOCMP in
9336 [\\/]* | ?:[\\/]*)
9337 ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9338 ;;
9339 *)
9340 ac_save_IFS=$IFS; IFS=$ac_path_separator
9341ac_dummy="$PATH:/usr/local/ncurses/bin"
9342for ac_dir in $ac_dummy; do
9343 IFS=$ac_save_IFS
9344 test -z "$ac_dir" && ac_dir=.
9345 if $as_executable_p "$ac_dir/$ac_word"; then
9346 ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9347 echo "$as_me:9347: found $ac_dir/$ac_word" >&5
9348 break
9349fi
9350done
9351
9352 ;;
9353esac
9354fi
9355INFOCMP=$ac_cv_path_INFOCMP
9356
9357if test -n "$INFOCMP"; then
9358 echo "$as_me:9358: result: $INFOCMP" >&5
9359echo "${ECHO_T}$INFOCMP" >&6
9360else
9361 echo "$as_me:9361: result: no" >&5
9362echo "${ECHO_T}no" >&6
9363fi
9364
9365 test -n "$INFOCMP" && break
9366done
9367test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9368
9369cf_path_prog=""
9370cf_path_args=""
9371IFS="${IFS:- }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9372for cf_temp in $ac_cv_path_INFOCMP
9373do
9374 if test -z "$cf_path_prog" ; then
9375 if test "$with_full_paths" = yes ; then
9376
9377if test "x$prefix" != xNONE; then
9378 cf_path_syntax="$prefix"
9379else
9380 cf_path_syntax="$ac_default_prefix"
9381fi
9382
9383case ".$cf_temp" in
9384(.\$\(*\)*|.\'*\'*)
9385 ;;
9386(..|./*|.\\*)
9387 ;;
9388(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9389 ;;
9390(.\$\{*prefix\}*|.\$\{*dir\}*)
9391 eval cf_temp="$cf_temp"
9392 case ".$cf_temp" in
9393 (.NONE/*)
9394 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9395 ;;
9396 esac
9397 ;;
9398(.no|.NONE/*)
9399 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9400 ;;
9401(*)
9402 break
9403 ;;
9404esac
9405
9406 cf_path_prog="$cf_temp"
9407 else
9408 cf_path_prog="`basename "$cf_temp"`"
9409 fi
9410 elif test -z "$cf_path_args" ; then
9411 cf_path_args="$cf_temp"
9412 else
9413 cf_path_args="$cf_path_args $cf_temp"
9414 fi
9415done
9416IFS="$cf_save_ifs"
9417
9418if test -n "$cf_path_prog" ; then
9419
9420echo "${as_me:-configure}:9420: testing defining path for ${cf_path_prog} ..." 1>&5
9421
9422cat >>confdefs.h <<EOF
9423#define INFOCMP_PATH "$cf_path_prog"
9424EOF
9425
9426 test -n "$cf_path_args" &&
9427cat >>confdefs.h <<EOF
9428#define INFOCMP_ARGS "$cf_path_args"
9429EOF
9430
9431fi
9432
9433 if test -z "$INFOCMP"
9434 then
9435 { echo "$as_me:9435: WARNING: no infocmp program found for fallbacks" >&5
9436echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9437 fi
9438
9439fi;
9440
9441 test -z "$TIC" && FALLBACK_LIST=
9442 test -z "$INFOCMP" && FALLBACK_LIST=
9443 if test -z "$FALLBACK_LIST"
9444 then
9445 { echo "$as_me:9445: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9446echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9447 fi
9448fi
9449
9450USE_FALLBACKS=
9451test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9452
9453echo "$as_me:9453: checking if you want modern xterm or antique" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009454echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9455
9456# Check whether --with-xterm-new or --without-xterm-new was given.
9457if test "${with_xterm_new+set}" = set; then
9458 withval="$with_xterm_new"
9459 with_xterm_new=$withval
9460else
9461 with_xterm_new=yes
9462fi;
micky3879b9f5e72025-07-08 18:04:53 -04009463case "$with_xterm_new" in
Steve Kondikae271bc2015-11-15 02:50:53 +01009464(no) with_xterm_new=xterm-old;;
9465(*) with_xterm_new=xterm-new;;
9466esac
micky3879b9f5e72025-07-08 18:04:53 -04009467echo "$as_me:9467: result: $with_xterm_new" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009468echo "${ECHO_T}$with_xterm_new" >&6
9469WHICH_XTERM=$with_xterm_new
9470
micky3879b9f5e72025-07-08 18:04:53 -04009471case $host_os in
9472(*linux-gnu|*cygwin|*mingw32|*msys)
9473 want_xterm_kbs=DEL
9474 ;;
9475(*)
9476 want_xterm_kbs=BS
9477 ;;
9478esac
9479
9480echo "$as_me:9480: checking if xterm backspace sends BS or DEL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009481echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9482
9483# Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9484if test "${with_xterm_kbs+set}" = set; then
9485 withval="$with_xterm_kbs"
9486 with_xterm_kbs=$withval
9487else
micky3879b9f5e72025-07-08 18:04:53 -04009488 with_xterm_kbs=auto
Steve Kondikae271bc2015-11-15 02:50:53 +01009489fi;
9490case x$with_xterm_kbs in
9491(xyes|xno|xBS|xbs|x8)
9492 with_xterm_kbs=BS
9493 ;;
9494(xDEL|xdel|x127)
9495 with_xterm_kbs=DEL
9496 ;;
micky3879b9f5e72025-07-08 18:04:53 -04009497(xauto)
9498 with_xterm_kbs=$want_xterm_kbs
9499 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +01009500(*)
9501 with_xterm_kbs=$withval
9502 ;;
9503esac
micky3879b9f5e72025-07-08 18:04:53 -04009504echo "$as_me:9504: result: $with_xterm_kbs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009505echo "${ECHO_T}$with_xterm_kbs" >&6
9506XTERM_KBS=$with_xterm_kbs
9507
micky3879b9f5e72025-07-08 18:04:53 -04009508if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9509then
9510 { echo "$as_me:9510: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9511echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9512fi
9513
Steve Kondikae271bc2015-11-15 02:50:53 +01009514MAKE_TERMINFO=
9515if test "$use_database" = no ; then
9516 TERMINFO="${datadir}/terminfo"
9517 MAKE_TERMINFO="#"
9518else
9519
micky3879b9f5e72025-07-08 18:04:53 -04009520echo "$as_me:9520: checking for list of terminfo directories" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009521echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9522
9523# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9524if test "${with_terminfo_dirs+set}" = set; then
9525 withval="$with_terminfo_dirs"
9526
9527else
9528 withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9529fi;
9530IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9531cf_dst_path=
9532for cf_src_path in $withval
9533do
9534
9535if test "x$prefix" != xNONE; then
9536 cf_path_syntax="$prefix"
9537else
9538 cf_path_syntax="$ac_default_prefix"
9539fi
9540
9541case ".$cf_src_path" in
9542(.\$\(*\)*|.\'*\'*)
9543 ;;
9544(..|./*|.\\*)
9545 ;;
9546(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9547 ;;
micky3879b9f5e72025-07-08 18:04:53 -04009548(.\$\{*prefix\}*|.\$\{*dir\}*)
Steve Kondikae271bc2015-11-15 02:50:53 +01009549 eval cf_src_path="$cf_src_path"
9550 case ".$cf_src_path" in
9551 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04009552 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01009553 ;;
9554 esac
9555 ;;
9556(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04009557 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01009558 ;;
9559(*)
micky3879b9f5e72025-07-08 18:04:53 -04009560 { { echo "$as_me:9560: error: expected a pathname, not \"$cf_src_path\"" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009561echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9562 { (exit 1); exit 1; }; }
9563 ;;
9564esac
9565
9566 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9567 cf_dst_path="${cf_dst_path}${cf_src_path}"
9568done
9569IFS="$ac_save_ifs"
9570
9571# This may use the prefix/exec_prefix symbols which will only yield "NONE"
9572# so we have to check/work around. We do prefer the result of "eval"...
9573eval cf_dst_eval="$cf_dst_path"
9574case "x$cf_dst_eval" in
9575(xNONE*)
9576 TERMINFO_DIRS=$cf_dst_path
9577 ;;
9578(*)
9579 TERMINFO_DIRS="$cf_dst_eval"
9580 ;;
9581esac
9582
micky3879b9f5e72025-07-08 18:04:53 -04009583echo "$as_me:9583: result: $TERMINFO_DIRS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009584echo "${ECHO_T}$TERMINFO_DIRS" >&6
9585test -n "$TERMINFO_DIRS" &&
9586cat >>confdefs.h <<EOF
9587#define TERMINFO_DIRS "$TERMINFO_DIRS"
9588EOF
9589
micky3879b9f5e72025-07-08 18:04:53 -04009590case "x$TERMINFO" in
9591x???:*)
9592 { echo "$as_me:9592: WARNING: ignoring non-directory/file TERMINFO value" >&5
9593echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9594 unset TERMINFO
9595 ;;
9596esac
9597
9598echo "$as_me:9598: checking for default terminfo directory" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009599echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9600
9601# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9602if test "${with_default_terminfo_dir+set}" = set; then
9603 withval="$with_default_terminfo_dir"
9604
9605else
9606 withval="${TERMINFO:-${datadir}/terminfo}"
9607fi; if test -n "${datadir}/terminfo" ; then
9608
9609if test "x$prefix" != xNONE; then
9610 cf_path_syntax="$prefix"
9611else
9612 cf_path_syntax="$ac_default_prefix"
9613fi
9614
9615case ".$withval" in
9616(.\$\(*\)*|.\'*\'*)
9617 ;;
9618(..|./*|.\\*)
9619 ;;
9620(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9621 ;;
micky3879b9f5e72025-07-08 18:04:53 -04009622(.\$\{*prefix\}*|.\$\{*dir\}*)
Steve Kondikae271bc2015-11-15 02:50:53 +01009623 eval withval="$withval"
9624 case ".$withval" in
9625 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04009626 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01009627 ;;
9628 esac
9629 ;;
9630(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04009631 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01009632 ;;
9633(*)
micky3879b9f5e72025-07-08 18:04:53 -04009634 { { echo "$as_me:9634: error: expected a pathname, not \"$withval\"" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009635echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9636 { (exit 1); exit 1; }; }
9637 ;;
9638esac
9639
9640fi
9641eval TERMINFO="$withval"
9642
micky3879b9f5e72025-07-08 18:04:53 -04009643echo "$as_me:9643: result: $TERMINFO" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009644echo "${ECHO_T}$TERMINFO" >&6
9645
9646cat >>confdefs.h <<EOF
9647#define TERMINFO "$TERMINFO"
9648EOF
9649
9650fi
9651
9652### use option --disable-big-core to make tic run on small machines
9653### We need 4Mb, check if we can allocate 50% more than that.
micky3879b9f5e72025-07-08 18:04:53 -04009654echo "$as_me:9654: checking if big-core option selected" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009655echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9656
9657# Check whether --enable-big-core or --disable-big-core was given.
9658if test "${enable_big_core+set}" = set; then
9659 enableval="$enable_big_core"
9660 with_big_core=$enableval
9661else
9662 if test "$cross_compiling" = yes; then
9663 with_big_core=no
9664else
micky3879b9f5e72025-07-08 18:04:53 -04009665 cat >"conftest.$ac_ext" <<_ACEOF
9666#line 9666 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +01009667#include "confdefs.h"
9668
9669#include <stdlib.h>
9670#include <string.h>
micky3879b9f5e72025-07-08 18:04:53 -04009671int main(void) {
Steve Kondikae271bc2015-11-15 02:50:53 +01009672 unsigned long n = 6000000L;
9673 char *s = malloc(n);
9674 if (s != 0)
9675 s[0] = s[n-1] = 0;
9676 ${cf_cv_main_return:-return}(s == 0);
9677}
9678_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -04009679rm -f "conftest$ac_exeext"
9680if { (eval echo "$as_me:9680: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009681 (eval $ac_link) 2>&5
9682 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04009683 echo "$as_me:9683: \$? = $ac_status" >&5
9684 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9685 { (eval echo "$as_me:9685: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009686 (eval $ac_try) 2>&5
9687 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -04009688 echo "$as_me:9688: \$? = $ac_status" >&5
9689 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +01009690 with_big_core=yes
9691else
9692 echo "$as_me: program exited with status $ac_status" >&5
9693echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -04009694cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009695with_big_core=no
9696fi
micky3879b9f5e72025-07-08 18:04:53 -04009697rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +01009698fi
9699fi;
micky3879b9f5e72025-07-08 18:04:53 -04009700echo "$as_me:9700: result: $with_big_core" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009701echo "${ECHO_T}$with_big_core" >&6
9702test "x$with_big_core" = "xyes" &&
9703cat >>confdefs.h <<\EOF
9704#define HAVE_BIG_CORE 1
9705EOF
9706
9707### ISO C only guarantees 512-char strings, we have tables which load faster
9708### when constructed using "big" strings. More than the C compiler, the awk
9709### program is a limit on most vendor UNIX systems. Check that we can build.
micky3879b9f5e72025-07-08 18:04:53 -04009710echo "$as_me:9710: checking if big-strings option selected" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009711echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9712
9713# Check whether --enable-big-strings or --disable-big-strings was given.
9714if test "${enable_big_strings+set}" = set; then
9715 enableval="$enable_big_strings"
9716 with_big_strings=$enableval
9717else
9718
9719 case x$AWK in
9720 (x)
9721 eval with_big_strings=no
9722 ;;
9723 (*)
9724 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9725 | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
9726 eval with_big_strings=yes
9727 else
9728 eval with_big_strings=no
9729 fi
9730 ;;
9731 esac
9732
9733fi;
micky3879b9f5e72025-07-08 18:04:53 -04009734echo "$as_me:9734: result: $with_big_strings" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009735echo "${ECHO_T}$with_big_strings" >&6
9736
9737USE_BIG_STRINGS=0
9738test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9739
9740### use option --enable-termcap to compile in the termcap fallback support
micky3879b9f5e72025-07-08 18:04:53 -04009741echo "$as_me:9741: checking if you want termcap-fallback support" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009742echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9743
9744# Check whether --enable-termcap or --disable-termcap was given.
9745if test "${enable_termcap+set}" = set; then
9746 enableval="$enable_termcap"
9747 with_termcap=$enableval
9748else
9749 with_termcap=no
9750fi;
micky3879b9f5e72025-07-08 18:04:53 -04009751echo "$as_me:9751: result: $with_termcap" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009752echo "${ECHO_T}$with_termcap" >&6
9753
9754NCURSES_USE_TERMCAP=0
9755if test "x$with_termcap" != "xyes" ; then
9756 if test "$use_database" = no ; then
9757 if test -z "$with_fallback" ; then
micky3879b9f5e72025-07-08 18:04:53 -04009758 { { echo "$as_me:9758: error: You have disabled the database w/o specifying fallbacks" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009759echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9760 { (exit 1); exit 1; }; }
9761 fi
9762 fi
9763
9764cat >>confdefs.h <<\EOF
9765#define PURE_TERMINFO 1
9766EOF
9767
9768else
9769
9770 if test "$with_ticlib" != no ; then
micky3879b9f5e72025-07-08 18:04:53 -04009771 { { echo "$as_me:9771: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009772echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9773 { (exit 1); exit 1; }; }
9774 fi
9775
9776 NCURSES_USE_TERMCAP=1
micky3879b9f5e72025-07-08 18:04:53 -04009777 echo "$as_me:9777: checking for list of termcap files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009778echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9779
9780# Check whether --with-termpath or --without-termpath was given.
9781if test "${with_termpath+set}" = set; then
9782 withval="$with_termpath"
9783
9784else
9785 withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9786fi;
9787IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9788cf_dst_path=
9789for cf_src_path in $withval
9790do
9791
9792if test "x$prefix" != xNONE; then
9793 cf_path_syntax="$prefix"
9794else
9795 cf_path_syntax="$ac_default_prefix"
9796fi
9797
9798case ".$cf_src_path" in
9799(.\$\(*\)*|.\'*\'*)
9800 ;;
9801(..|./*|.\\*)
9802 ;;
9803(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9804 ;;
micky3879b9f5e72025-07-08 18:04:53 -04009805(.\$\{*prefix\}*|.\$\{*dir\}*)
Steve Kondikae271bc2015-11-15 02:50:53 +01009806 eval cf_src_path="$cf_src_path"
9807 case ".$cf_src_path" in
9808 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04009809 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01009810 ;;
9811 esac
9812 ;;
9813(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -04009814 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +01009815 ;;
9816(*)
micky3879b9f5e72025-07-08 18:04:53 -04009817 { { echo "$as_me:9817: error: expected a pathname, not \"$cf_src_path\"" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009818echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9819 { (exit 1); exit 1; }; }
9820 ;;
9821esac
9822
9823 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9824 cf_dst_path="${cf_dst_path}${cf_src_path}"
9825done
9826IFS="$ac_save_ifs"
9827
9828# This may use the prefix/exec_prefix symbols which will only yield "NONE"
9829# so we have to check/work around. We do prefer the result of "eval"...
9830eval cf_dst_eval="$cf_dst_path"
9831case "x$cf_dst_eval" in
9832(xNONE*)
9833 TERMPATH=$cf_dst_path
9834 ;;
9835(*)
9836 TERMPATH="$cf_dst_eval"
9837 ;;
9838esac
9839
micky3879b9f5e72025-07-08 18:04:53 -04009840 echo "$as_me:9840: result: $TERMPATH" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009841echo "${ECHO_T}$TERMPATH" >&6
9842 test -n "$TERMPATH" &&
9843cat >>confdefs.h <<EOF
9844#define TERMPATH "$TERMPATH"
9845EOF
9846
9847 ### use option --enable-getcap to use a hacked getcap for reading termcaps
micky3879b9f5e72025-07-08 18:04:53 -04009848 echo "$as_me:9848: checking if fast termcap-loader is needed" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009849echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9850
9851# Check whether --enable-getcap or --disable-getcap was given.
9852if test "${enable_getcap+set}" = set; then
9853 enableval="$enable_getcap"
9854 with_getcap=$enableval
9855else
9856 with_getcap=no
9857fi;
micky3879b9f5e72025-07-08 18:04:53 -04009858 echo "$as_me:9858: result: $with_getcap" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009859echo "${ECHO_T}$with_getcap" >&6
9860 test "x$with_getcap" = "xyes" &&
9861cat >>confdefs.h <<\EOF
9862#define USE_GETCAP 1
9863EOF
9864
micky3879b9f5e72025-07-08 18:04:53 -04009865 echo "$as_me:9865: checking if translated termcaps will be cached in ~/.terminfo" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009866echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9867
9868# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9869if test "${enable_getcap_cache+set}" = set; then
9870 enableval="$enable_getcap_cache"
9871 with_getcap_cache=$enableval
9872else
9873 with_getcap_cache=no
9874fi;
micky3879b9f5e72025-07-08 18:04:53 -04009875 echo "$as_me:9875: result: $with_getcap_cache" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009876echo "${ECHO_T}$with_getcap_cache" >&6
9877 test "x$with_getcap_cache" = "xyes" &&
9878cat >>confdefs.h <<\EOF
9879#define USE_GETCAP_CACHE 1
9880EOF
9881
9882fi
9883
9884### Use option --disable-home-terminfo to completely remove ~/.terminfo
micky3879b9f5e72025-07-08 18:04:53 -04009885echo "$as_me:9885: checking if ~/.terminfo is wanted" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009886echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9887
9888# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9889if test "${enable_home_terminfo+set}" = set; then
9890 enableval="$enable_home_terminfo"
9891 with_home_terminfo=$enableval
9892else
9893 with_home_terminfo=yes
9894fi;
micky3879b9f5e72025-07-08 18:04:53 -04009895echo "$as_me:9895: result: $with_home_terminfo" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009896echo "${ECHO_T}$with_home_terminfo" >&6
9897test "x$with_home_terminfo" = "xyes" &&
9898cat >>confdefs.h <<\EOF
9899#define USE_HOME_TERMINFO 1
9900EOF
9901
micky3879b9f5e72025-07-08 18:04:53 -04009902echo "$as_me:9902: checking if you want to permit root to use ncurses environment variables" >&5
9903echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +01009904
9905# Check whether --enable-root-environ or --disable-root-environ was given.
9906if test "${enable_root_environ+set}" = set; then
9907 enableval="$enable_root_environ"
9908 with_root_environ=$enableval
9909else
9910 with_root_environ=yes
9911fi;
micky3879b9f5e72025-07-08 18:04:53 -04009912echo "$as_me:9912: result: $with_root_environ" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +01009913echo "${ECHO_T}$with_root_environ" >&6
9914test "x$with_root_environ" = xyes &&
9915cat >>confdefs.h <<\EOF
9916#define USE_ROOT_ENVIRON 1
9917EOF
9918
micky3879b9f5e72025-07-08 18:04:53 -04009919echo "$as_me:9919: checking if you want to permit setuid programs to access all files" >&5
9920echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9921
9922# Check whether --enable-root-access or --disable-root-access was given.
9923if test "${enable_root_access+set}" = set; then
9924 enableval="$enable_root_access"
9925 with_root_access=$enableval
9926else
9927 with_root_access=yes
9928fi;
9929echo "$as_me:9929: result: $with_root_access" >&5
9930echo "${ECHO_T}$with_root_access" >&6
9931test "x$with_root_access" = xyes &&
9932cat >>confdefs.h <<\EOF
9933#define USE_ROOT_ACCESS 1
9934EOF
9935
9936echo "$as_me:9936: checking if you want to permit setuid use of ncurses environment variables" >&5
9937echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9938
9939# Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9940if test "${enable_setuid_environ+set}" = set; then
9941 enableval="$enable_setuid_environ"
9942 with_setuid_environ=$enableval
9943else
9944 with_setuid_environ=$with_root_environ
9945fi;
9946echo "$as_me:9946: result: $with_setuid_environ" >&5
9947echo "${ECHO_T}$with_setuid_environ" >&6
9948test "x$with_setuid_environ" = xyes &&
9949cat >>confdefs.h <<\EOF
9950#define USE_SETUID_ENVIRON 1
9951EOF
9952
Steve Kondikae271bc2015-11-15 02:50:53 +01009953### Use option --enable-symlinks to make tic use symlinks, not hard links
9954### to reduce storage requirements for the terminfo database.
9955
micky3879b9f5e72025-07-08 18:04:53 -04009956for ac_header in \
9957unistd.h \
9958
9959do
9960as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9961echo "$as_me:9961: checking for $ac_header" >&5
9962echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9963if eval "test \"\${$as_ac_Header+set}\" = set"; then
9964 echo $ECHO_N "(cached) $ECHO_C" >&6
9965else
9966 cat >"conftest.$ac_ext" <<_ACEOF
9967#line 9967 "configure"
9968#include "confdefs.h"
9969#include <$ac_header>
9970_ACEOF
9971if { (eval echo "$as_me:9971: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9972 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9973 ac_status=$?
9974 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9975 rm -f conftest.er1
9976 cat conftest.err >&5
9977 echo "$as_me:9977: \$? = $ac_status" >&5
9978 (exit "$ac_status"); } >/dev/null; then
9979 if test -s conftest.err; then
9980 ac_cpp_err=$ac_c_preproc_warn_flag
9981 else
9982 ac_cpp_err=
9983 fi
9984else
9985 ac_cpp_err=yes
9986fi
9987if test -z "$ac_cpp_err"; then
9988 eval "$as_ac_Header=yes"
9989else
9990 echo "$as_me: failed program was:" >&5
9991 cat "conftest.$ac_ext" >&5
9992 eval "$as_ac_Header=no"
9993fi
9994rm -f conftest.err "conftest.$ac_ext"
9995fi
9996echo "$as_me:9996: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9997echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9998if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9999 cat >>confdefs.h <<EOF
10000#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10001EOF
10002
10003fi
10004done
10005
Steve Kondikae271bc2015-11-15 02:50:53 +010010006for ac_func in \
10007 remove \
10008 unlink
10009do
10010as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040010011echo "$as_me:10011: checking for $ac_func" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010012echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10013if eval "test \"\${$as_ac_var+set}\" = set"; then
10014 echo $ECHO_N "(cached) $ECHO_C" >&6
10015else
micky3879b9f5e72025-07-08 18:04:53 -040010016 cat >"conftest.$ac_ext" <<_ACEOF
10017#line 10017 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010010018#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040010019#define $ac_func autoconf_temporary
10020#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10021#undef $ac_func
10022
Steve Kondikae271bc2015-11-15 02:50:53 +010010023#ifdef __cplusplus
10024extern "C"
10025#endif
micky3879b9f5e72025-07-08 18:04:53 -040010026
Steve Kondikae271bc2015-11-15 02:50:53 +010010027/* We use char because int might match the return type of a gcc2
10028 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040010029char $ac_func (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010010030
10031int
micky3879b9f5e72025-07-08 18:04:53 -040010032main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010010033{
micky3879b9f5e72025-07-08 18:04:53 -040010034
10035/* The GNU C library defines stubs for functions which it implements
Steve Kondikae271bc2015-11-15 02:50:53 +010010036 to always fail with ENOSYS. Some functions are actually named
10037 something starting with __ and the normal name is an alias. */
10038#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
micky3879b9f5e72025-07-08 18:04:53 -040010039#error found stub for $ac_func
Steve Kondikae271bc2015-11-15 02:50:53 +010010040#endif
10041
micky3879b9f5e72025-07-08 18:04:53 -040010042 return $ac_func ();
Steve Kondikae271bc2015-11-15 02:50:53 +010010043 ;
10044 return 0;
10045}
10046_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040010047rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010049 (eval $ac_link) 2>&5
10050 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010051 echo "$as_me:10051: \$? = $ac_status" >&5
10052 (exit "$ac_status"); } &&
10053 { ac_try='test -s "conftest$ac_exeext"'
10054 { (eval echo "$as_me:10054: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010055 (eval $ac_try) 2>&5
10056 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010057 echo "$as_me:10057: \$? = $ac_status" >&5
10058 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010059 eval "$as_ac_var=yes"
10060else
10061 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040010062cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010063eval "$as_ac_var=no"
10064fi
micky3879b9f5e72025-07-08 18:04:53 -040010065rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010010066fi
micky3879b9f5e72025-07-08 18:04:53 -040010067echo "$as_me:10067: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10068echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10069if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010070 cat >>confdefs.h <<EOF
10071#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10072EOF
10073
10074fi
10075done
10076
10077if test "$cross_compiling" = yes ; then
10078
10079for ac_func in \
10080 link \
10081 symlink
10082do
10083as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040010084echo "$as_me:10084: checking for $ac_func" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010085echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10086if eval "test \"\${$as_ac_var+set}\" = set"; then
10087 echo $ECHO_N "(cached) $ECHO_C" >&6
10088else
micky3879b9f5e72025-07-08 18:04:53 -040010089 cat >"conftest.$ac_ext" <<_ACEOF
10090#line 10090 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010010091#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040010092#define $ac_func autoconf_temporary
10093#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10094#undef $ac_func
10095
Steve Kondikae271bc2015-11-15 02:50:53 +010010096#ifdef __cplusplus
10097extern "C"
10098#endif
micky3879b9f5e72025-07-08 18:04:53 -040010099
Steve Kondikae271bc2015-11-15 02:50:53 +010010100/* We use char because int might match the return type of a gcc2
10101 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040010102char $ac_func (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010010103
10104int
micky3879b9f5e72025-07-08 18:04:53 -040010105main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010010106{
micky3879b9f5e72025-07-08 18:04:53 -040010107
10108/* The GNU C library defines stubs for functions which it implements
Steve Kondikae271bc2015-11-15 02:50:53 +010010109 to always fail with ENOSYS. Some functions are actually named
10110 something starting with __ and the normal name is an alias. */
10111#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
micky3879b9f5e72025-07-08 18:04:53 -040010112#error found stub for $ac_func
Steve Kondikae271bc2015-11-15 02:50:53 +010010113#endif
10114
micky3879b9f5e72025-07-08 18:04:53 -040010115 return $ac_func ();
Steve Kondikae271bc2015-11-15 02:50:53 +010010116 ;
10117 return 0;
10118}
10119_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040010120rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10121if { (eval echo "$as_me:10121: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010122 (eval $ac_link) 2>&5
10123 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010124 echo "$as_me:10124: \$? = $ac_status" >&5
10125 (exit "$ac_status"); } &&
10126 { ac_try='test -s "conftest$ac_exeext"'
10127 { (eval echo "$as_me:10127: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010128 (eval $ac_try) 2>&5
10129 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010130 echo "$as_me:10130: \$? = $ac_status" >&5
10131 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010132 eval "$as_ac_var=yes"
10133else
10134 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040010135cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010136eval "$as_ac_var=no"
10137fi
micky3879b9f5e72025-07-08 18:04:53 -040010138rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010010139fi
micky3879b9f5e72025-07-08 18:04:53 -040010140echo "$as_me:10140: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10141echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10142if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010143 cat >>confdefs.h <<EOF
10144#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10145EOF
10146
10147fi
10148done
10149
10150else
micky3879b9f5e72025-07-08 18:04:53 -040010151 echo "$as_me:10151: checking if link/symlink functions work" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010152echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10153if test "${cf_cv_link_funcs+set}" = set; then
10154 echo $ECHO_N "(cached) $ECHO_C" >&6
10155else
10156
10157 cf_cv_link_funcs=
10158 for cf_func in link symlink ; do
10159 if test "$cross_compiling" = yes; then
10160
10161 eval 'ac_cv_func_'$cf_func'=error'
10162else
micky3879b9f5e72025-07-08 18:04:53 -040010163 cat >"conftest.$ac_ext" <<_ACEOF
10164#line 10164 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010010165#include "confdefs.h"
10166
micky3879b9f5e72025-07-08 18:04:53 -040010167$ac_includes_default
10168
10169int main(void)
Steve Kondikae271bc2015-11-15 02:50:53 +010010170{
10171 int fail = 0;
micky3879b9f5e72025-07-08 18:04:53 -040010172 char src[] = "conftest.tmp";
10173 char dst[] = "conftest.chk";
10174 struct stat src_sb, dst_sb;
10175 FILE *fp = fopen(src, "w");
10176 if (fp == 0) { fail = 3; } else {
10177 fclose(fp); stat(src, &src_sb);
10178 if ($cf_func(src, dst) < 0) {
10179 fail = 1;
10180 } else if (stat(dst, &dst_sb) < 0) {
10181 fail = 2;
10182 } else {
10183 long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10184 if (diff < 0) diff = -diff;
10185 if (diff > 2) fail = 3;
10186 }
10187 }
Steve Kondikae271bc2015-11-15 02:50:53 +010010188#ifdef HAVE_UNLINK
micky3879b9f5e72025-07-08 18:04:53 -040010189 unlink(dst); unlink(src);
Steve Kondikae271bc2015-11-15 02:50:53 +010010190#else
micky3879b9f5e72025-07-08 18:04:53 -040010191 remove(dst); remove(src);
Steve Kondikae271bc2015-11-15 02:50:53 +010010192#endif
10193 ${cf_cv_main_return:-return} (fail);
10194}
10195
10196_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040010197rm -f "conftest$ac_exeext"
10198if { (eval echo "$as_me:10198: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010199 (eval $ac_link) 2>&5
10200 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010201 echo "$as_me:10201: \$? = $ac_status" >&5
10202 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10203 { (eval echo "$as_me:10203: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010204 (eval $ac_try) 2>&5
10205 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010206 echo "$as_me:10206: \$? = $ac_status" >&5
10207 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010208
10209 cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10210 eval 'ac_cv_func_'$cf_func'=yes'
10211else
10212 echo "$as_me: program exited with status $ac_status" >&5
10213echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040010214cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010215
10216 eval 'ac_cv_func_'$cf_func'=no'
10217fi
micky3879b9f5e72025-07-08 18:04:53 -040010218rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010010219fi
10220 done
10221 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10222
10223fi
micky3879b9f5e72025-07-08 18:04:53 -040010224echo "$as_me:10224: result: $cf_cv_link_funcs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010225echo "${ECHO_T}$cf_cv_link_funcs" >&6
10226 test "$ac_cv_func_link" = yes &&
10227cat >>confdefs.h <<\EOF
10228#define HAVE_LINK 1
10229EOF
10230
10231 test "$ac_cv_func_symlink" = yes &&
10232cat >>confdefs.h <<\EOF
10233#define HAVE_SYMLINK 1
10234EOF
10235
10236fi
10237
10238with_links=no
10239with_symlinks=no
10240
10241# soft links (symbolic links) are useful for some systems where hard links do
10242# not work, or to make it simpler to copy terminfo trees around.
10243if test "x$ac_cv_func_symlink" = xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040010244 echo "$as_me:10244: checking if tic should use symbolic links" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010245echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10246
10247# Check whether --enable-symlinks or --disable-symlinks was given.
10248if test "${enable_symlinks+set}" = set; then
10249 enableval="$enable_symlinks"
10250 with_symlinks=$enableval
10251else
10252 with_symlinks=no
10253fi;
micky3879b9f5e72025-07-08 18:04:53 -040010254 echo "$as_me:10254: result: $with_symlinks" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010255echo "${ECHO_T}$with_symlinks" >&6
10256fi
10257
10258# If we have hard links and did not choose to use soft links instead, there is
10259# no reason to make this choice optional - use the hard links.
10260if test "$with_symlinks" = no ; then
micky3879b9f5e72025-07-08 18:04:53 -040010261 echo "$as_me:10261: checking if tic should use hard links" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010262echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10263 if test "x$ac_cv_func_link" = xyes ; then
10264 with_links=yes
10265 else
10266 with_links=no
10267 fi
micky3879b9f5e72025-07-08 18:04:53 -040010268 echo "$as_me:10268: result: $with_links" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010269echo "${ECHO_T}$with_links" >&6
10270fi
10271
10272test "x$with_links" = xyes &&
10273cat >>confdefs.h <<\EOF
10274#define USE_LINKS 1
10275EOF
10276
10277test "x$with_symlinks" = xyes &&
10278cat >>confdefs.h <<\EOF
10279#define USE_SYMLINKS 1
10280EOF
10281
10282### use option --enable-broken-linker to force on use of broken-linker support
micky3879b9f5e72025-07-08 18:04:53 -040010283
10284echo "$as_me:10284: checking if you want broken-linker support code" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010285echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10286
10287# Check whether --enable-broken_linker or --disable-broken_linker was given.
10288if test "${enable_broken_linker+set}" = set; then
10289 enableval="$enable_broken_linker"
10290 with_broken_linker=$enableval
10291else
micky3879b9f5e72025-07-08 18:04:53 -040010292 with_broken_linker=no
Steve Kondikae271bc2015-11-15 02:50:53 +010010293fi;
micky3879b9f5e72025-07-08 18:04:53 -040010294echo "$as_me:10294: result: $with_broken_linker" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010295echo "${ECHO_T}$with_broken_linker" >&6
10296
micky3879b9f5e72025-07-08 18:04:53 -040010297: "${BROKEN_LINKER:=0}"
Steve Kondikae271bc2015-11-15 02:50:53 +010010298if test "x$with_broken_linker" = xyes ; then
10299
10300cat >>confdefs.h <<\EOF
10301#define BROKEN_LINKER 1
10302EOF
10303
10304 BROKEN_LINKER=1
Steve Kondikae271bc2015-11-15 02:50:53 +010010305fi
10306
10307### use option --enable-bsdpad to have tputs process BSD-style prefix padding
micky3879b9f5e72025-07-08 18:04:53 -040010308echo "$as_me:10308: checking if tputs should process BSD-style prefix padding" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010309echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10310
10311# Check whether --enable-bsdpad or --disable-bsdpad was given.
10312if test "${enable_bsdpad+set}" = set; then
10313 enableval="$enable_bsdpad"
10314 with_bsdpad=$enableval
10315else
10316 with_bsdpad=no
10317fi;
micky3879b9f5e72025-07-08 18:04:53 -040010318echo "$as_me:10318: result: $with_bsdpad" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010319echo "${ECHO_T}$with_bsdpad" >&6
10320test "x$with_bsdpad" = xyes &&
10321cat >>confdefs.h <<\EOF
10322#define BSD_TPUTS 1
10323EOF
10324
10325### use option --enable-widec to turn on use of wide-character support
10326NCURSES_CH_T=chtype
10327NCURSES_LIBUTF8=0
10328
10329NEED_WCHAR_H=0
10330NCURSES_MBSTATE_T=0
10331NCURSES_WCHAR_T=0
10332NCURSES_WINT_T=0
10333
10334# Check to define _XOPEN_SOURCE "automatically"
10335CPPFLAGS_before_XOPEN="$CPPFLAGS"
10336
micky3879b9f5e72025-07-08 18:04:53 -040010337echo "$as_me:10337: checking if the POSIX test-macros are already defined" >&5
10338echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10339if test "${cf_cv_posix_visible+set}" = set; then
10340 echo $ECHO_N "(cached) $ECHO_C" >&6
10341else
10342
10343cat >"conftest.$ac_ext" <<_ACEOF
10344#line 10344 "configure"
10345#include "confdefs.h"
10346#include <stdio.h>
10347int
10348main (void)
10349{
10350
10351#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10352 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10353 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10354 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10355#error conflicting symbols found
10356#endif
10357
10358 ;
10359 return 0;
10360}
10361_ACEOF
10362rm -f "conftest.$ac_objext"
10363if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5
10364 (eval $ac_compile) 2>&5
10365 ac_status=$?
10366 echo "$as_me:10366: \$? = $ac_status" >&5
10367 (exit "$ac_status"); } &&
10368 { ac_try='test -s "conftest.$ac_objext"'
10369 { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370 (eval $ac_try) 2>&5
10371 ac_status=$?
10372 echo "$as_me:10372: \$? = $ac_status" >&5
10373 (exit "$ac_status"); }; }; then
10374 cf_cv_posix_visible=no
10375else
10376 echo "$as_me: failed program was:" >&5
10377cat "conftest.$ac_ext" >&5
10378cf_cv_posix_visible=yes
10379fi
10380rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10381
10382fi
10383echo "$as_me:10383: result: $cf_cv_posix_visible" >&5
10384echo "${ECHO_T}$cf_cv_posix_visible" >&6
10385
10386if test "$cf_cv_posix_visible" = no; then
10387
10388cf_XOPEN_SOURCE=600
Steve Kondikae271bc2015-11-15 02:50:53 +010010389cf_POSIX_C_SOURCE=199506L
10390cf_xopen_source=
10391
micky3879b9f5e72025-07-08 18:04:53 -040010392case "$host_os" in
Steve Kondikae271bc2015-11-15 02:50:53 +010010393(aix[4-7]*)
10394 cf_xopen_source="-D_ALL_SOURCE"
10395 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010010396(darwin[0-8].*)
10397 cf_xopen_source="-D_APPLE_C_SOURCE"
10398 ;;
10399(darwin*)
10400 cf_xopen_source="-D_DARWIN_C_SOURCE"
10401 cf_XOPEN_SOURCE=
10402 ;;
micky3879b9f5e72025-07-08 18:04:53 -040010403(freebsd*|dragonfly*|midnightbsd*)
Steve Kondikae271bc2015-11-15 02:50:53 +010010404 # 5.x headers associate
10405 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10406 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10407 cf_POSIX_C_SOURCE=200112L
10408 cf_XOPEN_SOURCE=600
10409 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10410 ;;
10411(hpux11*)
10412 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10413 ;;
10414(hpux*)
10415 cf_xopen_source="-D_HPUX_SOURCE"
10416 ;;
10417(irix[56].*)
10418 cf_xopen_source="-D_SGI_SOURCE"
10419 cf_XOPEN_SOURCE=
10420 ;;
micky3879b9f5e72025-07-08 18:04:53 -040010421(linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
Steve Kondikae271bc2015-11-15 02:50:53 +010010422
micky3879b9f5e72025-07-08 18:04:53 -040010423cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10424
10425echo "$as_me:10425: checking if this is the GNU C library" >&5
10426echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10427if test "${cf_cv_gnu_library+set}" = set; then
10428 echo $ECHO_N "(cached) $ECHO_C" >&6
10429else
10430
10431cat >"conftest.$ac_ext" <<_ACEOF
10432#line 10432 "configure"
10433#include "confdefs.h"
10434#include <sys/types.h>
10435int
10436main (void)
10437{
10438
10439 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10440 return 0;
10441 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10442 return 0;
10443 #else
10444 # error not GNU C library
10445 #endif
10446 ;
10447 return 0;
10448}
10449_ACEOF
10450rm -f "conftest.$ac_objext"
10451if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5
10452 (eval $ac_compile) 2>&5
10453 ac_status=$?
10454 echo "$as_me:10454: \$? = $ac_status" >&5
10455 (exit "$ac_status"); } &&
10456 { ac_try='test -s "conftest.$ac_objext"'
10457 { (eval echo "$as_me:10457: \"$ac_try\"") >&5
10458 (eval $ac_try) 2>&5
10459 ac_status=$?
10460 echo "$as_me:10460: \$? = $ac_status" >&5
10461 (exit "$ac_status"); }; }; then
10462 cf_cv_gnu_library=yes
10463else
10464 echo "$as_me: failed program was:" >&5
10465cat "conftest.$ac_ext" >&5
10466cf_cv_gnu_library=no
10467fi
10468rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10469
10470fi
10471echo "$as_me:10471: result: $cf_cv_gnu_library" >&5
10472echo "${ECHO_T}$cf_cv_gnu_library" >&6
10473
10474if test x$cf_cv_gnu_library = xyes; then
10475
10476 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10477 # was changed to help a little. newlib incorporated the change about 4
10478 # years later.
10479 echo "$as_me:10479: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10480echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10481if test "${cf_cv_gnu_library_219+set}" = set; then
10482 echo $ECHO_N "(cached) $ECHO_C" >&6
10483else
10484
10485 cf_save="$CPPFLAGS"
10486
10487 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10488 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10489
10490 cat >"conftest.$ac_ext" <<_ACEOF
10491#line 10491 "configure"
10492#include "confdefs.h"
10493#include <sys/types.h>
10494int
10495main (void)
10496{
10497
10498 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10499 return 0;
10500 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10501 return 0;
10502 #else
10503 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10504 #endif
10505 ;
10506 return 0;
10507}
10508_ACEOF
10509rm -f "conftest.$ac_objext"
10510if { (eval echo "$as_me:10510: \"$ac_compile\"") >&5
10511 (eval $ac_compile) 2>&5
10512 ac_status=$?
10513 echo "$as_me:10513: \$? = $ac_status" >&5
10514 (exit "$ac_status"); } &&
10515 { ac_try='test -s "conftest.$ac_objext"'
10516 { (eval echo "$as_me:10516: \"$ac_try\"") >&5
10517 (eval $ac_try) 2>&5
10518 ac_status=$?
10519 echo "$as_me:10519: \$? = $ac_status" >&5
10520 (exit "$ac_status"); }; }; then
10521 cf_cv_gnu_library_219=yes
10522else
10523 echo "$as_me: failed program was:" >&5
10524cat "conftest.$ac_ext" >&5
10525cf_cv_gnu_library_219=no
10526fi
10527rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528 CPPFLAGS="$cf_save"
10529
10530fi
10531echo "$as_me:10531: result: $cf_cv_gnu_library_219" >&5
10532echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10533
10534 if test "x$cf_cv_gnu_library_219" = xyes; then
10535 cf_save="$CPPFLAGS"
10536 echo "$as_me:10536: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10537echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10538if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10539 echo $ECHO_N "(cached) $ECHO_C" >&6
10540else
10541
10542cf_fix_cppflags=no
10543cf_new_cflags=
10544cf_new_cppflags=
10545cf_new_extra_cppflags=
10546
10547for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10548do
10549case "$cf_fix_cppflags" in
10550(no)
10551 case "$cf_add_cflags" in
10552 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10553 case "$cf_add_cflags" in
10554 (-D*)
10555 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10556
10557 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10558 && test -z "${cf_tst_cflags}" \
10559 && cf_fix_cppflags=yes
10560
10561 if test "$cf_fix_cppflags" = yes ; then
10562
10563 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10564 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10565
10566 continue
10567 elif test "${cf_tst_cflags}" = "\"'" ; then
10568
10569 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10570 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10571
10572 continue
10573 fi
10574 ;;
10575 esac
10576 case "$CPPFLAGS" in
10577 (*$cf_add_cflags)
10578 ;;
10579 (*)
10580 case "$cf_add_cflags" in
10581 (-D*)
10582 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10583
10584CPPFLAGS=`echo "$CPPFLAGS" | \
10585 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10586 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10587
10588 ;;
10589 esac
10590
10591 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10592 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10593
10594 ;;
10595 esac
10596 ;;
10597 (*)
10598
10599 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10600 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10601
10602 ;;
10603 esac
10604 ;;
10605(yes)
10606
10607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10609
10610 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10611
10612 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10613 && test -z "${cf_tst_cflags}" \
10614 && cf_fix_cppflags=no
10615 ;;
10616esac
10617done
10618
10619if test -n "$cf_new_cflags" ; then
10620
10621 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10622 CFLAGS="${CFLAGS}$cf_new_cflags"
10623
10624fi
10625
10626if test -n "$cf_new_cppflags" ; then
10627
10628 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10629 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10630
10631fi
10632
10633if test -n "$cf_new_extra_cppflags" ; then
10634
10635 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10636 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10637
10638fi
10639
10640 cat >"conftest.$ac_ext" <<_ACEOF
10641#line 10641 "configure"
10642#include "confdefs.h"
10643
10644 #include <limits.h>
10645 #include <sys/types.h>
10646
10647int
10648main (void)
10649{
10650
10651 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10652 return 0;
10653 #else
10654 # error GNU C library is too old
10655 #endif
10656 ;
10657 return 0;
10658}
10659_ACEOF
10660rm -f "conftest.$ac_objext"
10661if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5
10662 (eval $ac_compile) 2>&5
10663 ac_status=$?
10664 echo "$as_me:10664: \$? = $ac_status" >&5
10665 (exit "$ac_status"); } &&
10666 { ac_try='test -s "conftest.$ac_objext"'
10667 { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668 (eval $ac_try) 2>&5
10669 ac_status=$?
10670 echo "$as_me:10670: \$? = $ac_status" >&5
10671 (exit "$ac_status"); }; }; then
10672 cf_cv_gnu_dftsrc_219=yes
10673else
10674 echo "$as_me: failed program was:" >&5
10675cat "conftest.$ac_ext" >&5
10676cf_cv_gnu_dftsrc_219=no
10677fi
10678rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10679
10680fi
10681echo "$as_me:10681: result: $cf_cv_gnu_dftsrc_219" >&5
10682echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10683 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10684 else
10685 cf_cv_gnu_dftsrc_219=maybe
10686 fi
10687
10688 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10689
10690 echo "$as_me:10690: checking if we must define _GNU_SOURCE" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010691echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10692if test "${cf_cv_gnu_source+set}" = set; then
10693 echo $ECHO_N "(cached) $ECHO_C" >&6
10694else
10695
micky3879b9f5e72025-07-08 18:04:53 -040010696 cat >"conftest.$ac_ext" <<_ACEOF
10697#line 10697 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010010698#include "confdefs.h"
10699#include <sys/types.h>
10700int
micky3879b9f5e72025-07-08 18:04:53 -040010701main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010010702{
10703
micky3879b9f5e72025-07-08 18:04:53 -040010704 #ifndef _XOPEN_SOURCE
10705 #error expected _XOPEN_SOURCE to be defined
10706 #endif
Steve Kondikae271bc2015-11-15 02:50:53 +010010707 ;
10708 return 0;
10709}
10710_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040010711rm -f "conftest.$ac_objext"
10712if { (eval echo "$as_me:10712: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010713 (eval $ac_compile) 2>&5
10714 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010715 echo "$as_me:10715: \$? = $ac_status" >&5
10716 (exit "$ac_status"); } &&
10717 { ac_try='test -s "conftest.$ac_objext"'
10718 { (eval echo "$as_me:10718: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010719 (eval $ac_try) 2>&5
10720 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010721 echo "$as_me:10721: \$? = $ac_status" >&5
10722 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010723 cf_cv_gnu_source=no
10724else
10725 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040010726cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010727cf_save="$CPPFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040010728
10729cf_fix_cppflags=no
10730cf_new_cflags=
10731cf_new_cppflags=
10732cf_new_extra_cppflags=
10733
10734for cf_add_cflags in -D_GNU_SOURCE
10735do
10736case "$cf_fix_cppflags" in
10737(no)
10738 case "$cf_add_cflags" in
10739 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10740 case "$cf_add_cflags" in
10741 (-D*)
10742 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10743
10744 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10745 && test -z "${cf_tst_cflags}" \
10746 && cf_fix_cppflags=yes
10747
10748 if test "$cf_fix_cppflags" = yes ; then
10749
10750 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10751 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10752
10753 continue
10754 elif test "${cf_tst_cflags}" = "\"'" ; then
10755
10756 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10757 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10758
10759 continue
10760 fi
10761 ;;
10762 esac
10763 case "$CPPFLAGS" in
10764 (*$cf_add_cflags)
10765 ;;
10766 (*)
10767 case "$cf_add_cflags" in
10768 (-D*)
10769 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10770
10771CPPFLAGS=`echo "$CPPFLAGS" | \
10772 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10773 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10774
10775 ;;
10776 esac
10777
10778 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10779 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10780
10781 ;;
10782 esac
10783 ;;
10784 (*)
10785
10786 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10787 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10788
10789 ;;
10790 esac
10791 ;;
10792(yes)
10793
10794 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10795 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10796
10797 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10798
10799 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10800 && test -z "${cf_tst_cflags}" \
10801 && cf_fix_cppflags=no
10802 ;;
10803esac
10804done
10805
10806if test -n "$cf_new_cflags" ; then
10807
10808 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10809 CFLAGS="${CFLAGS}$cf_new_cflags"
10810
10811fi
10812
10813if test -n "$cf_new_cppflags" ; then
10814
10815 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10816 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10817
10818fi
10819
10820if test -n "$cf_new_extra_cppflags" ; then
10821
10822 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10823 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10824
10825fi
10826
10827 cat >"conftest.$ac_ext" <<_ACEOF
10828#line 10828 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010010829#include "confdefs.h"
10830#include <sys/types.h>
10831int
micky3879b9f5e72025-07-08 18:04:53 -040010832main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010010833{
10834
micky3879b9f5e72025-07-08 18:04:53 -040010835 #ifdef _XOPEN_SOURCE
10836 #error expected _XOPEN_SOURCE to be undefined
10837 #endif
Steve Kondikae271bc2015-11-15 02:50:53 +010010838 ;
10839 return 0;
10840}
10841_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040010842rm -f "conftest.$ac_objext"
10843if { (eval echo "$as_me:10843: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010844 (eval $ac_compile) 2>&5
10845 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010846 echo "$as_me:10846: \$? = $ac_status" >&5
10847 (exit "$ac_status"); } &&
10848 { ac_try='test -s "conftest.$ac_objext"'
10849 { (eval echo "$as_me:10849: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010850 (eval $ac_try) 2>&5
10851 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010852 echo "$as_me:10852: \$? = $ac_status" >&5
10853 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010854 cf_cv_gnu_source=no
10855else
10856 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040010857cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010858cf_cv_gnu_source=yes
10859fi
micky3879b9f5e72025-07-08 18:04:53 -040010860rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10861 CPPFLAGS="$cf_save"
Steve Kondikae271bc2015-11-15 02:50:53 +010010862
10863fi
micky3879b9f5e72025-07-08 18:04:53 -040010864rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010010865
10866fi
micky3879b9f5e72025-07-08 18:04:53 -040010867echo "$as_me:10867: result: $cf_cv_gnu_source" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010868echo "${ECHO_T}$cf_cv_gnu_source" >&6
micky3879b9f5e72025-07-08 18:04:53 -040010869
10870 if test "$cf_cv_gnu_source" = yes
10871 then
10872 echo "$as_me:10872: checking if we should also define _DEFAULT_SOURCE" >&5
10873echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10874if test "${cf_cv_default_source+set}" = set; then
10875 echo $ECHO_N "(cached) $ECHO_C" >&6
10876else
10877
10878 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10879 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10880
10881 cat >"conftest.$ac_ext" <<_ACEOF
10882#line 10882 "configure"
10883#include "confdefs.h"
10884#include <sys/types.h>
10885int
10886main (void)
10887{
10888
10889 #ifdef _DEFAULT_SOURCE
10890 #error expected _DEFAULT_SOURCE to be undefined
10891 #endif
10892 ;
10893 return 0;
10894}
10895_ACEOF
10896rm -f "conftest.$ac_objext"
10897if { (eval echo "$as_me:10897: \"$ac_compile\"") >&5
10898 (eval $ac_compile) 2>&5
10899 ac_status=$?
10900 echo "$as_me:10900: \$? = $ac_status" >&5
10901 (exit "$ac_status"); } &&
10902 { ac_try='test -s "conftest.$ac_objext"'
10903 { (eval echo "$as_me:10903: \"$ac_try\"") >&5
10904 (eval $ac_try) 2>&5
10905 ac_status=$?
10906 echo "$as_me:10906: \$? = $ac_status" >&5
10907 (exit "$ac_status"); }; }; then
10908 cf_cv_default_source=no
10909else
10910 echo "$as_me: failed program was:" >&5
10911cat "conftest.$ac_ext" >&5
10912cf_cv_default_source=yes
10913fi
10914rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10915
10916fi
10917echo "$as_me:10917: result: $cf_cv_default_source" >&5
10918echo "${ECHO_T}$cf_cv_default_source" >&6
10919 if test "$cf_cv_default_source" = yes
10920 then
10921
10922 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10923 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10924
10925 fi
10926 fi
10927 fi
10928
10929fi
Steve Kondikae271bc2015-11-15 02:50:53 +010010930
10931 ;;
10932(minix*)
10933 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10934 ;;
10935(mirbsd*)
10936 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10937 cf_XOPEN_SOURCE=
10938
micky3879b9f5e72025-07-08 18:04:53 -040010939if test "$cf_cv_posix_visible" = no; then
10940
Steve Kondikae271bc2015-11-15 02:50:53 +010010941cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10942
10943cf_save_CFLAGS="$CFLAGS"
10944cf_save_CPPFLAGS="$CPPFLAGS"
10945
10946cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10947 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10948 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10949
10950cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10951 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10952 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10953
micky3879b9f5e72025-07-08 18:04:53 -040010954echo "$as_me:10954: checking if we should define _POSIX_C_SOURCE" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010955echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10956if test "${cf_cv_posix_c_source+set}" = set; then
10957 echo $ECHO_N "(cached) $ECHO_C" >&6
10958else
10959
micky3879b9f5e72025-07-08 18:04:53 -040010960echo "${as_me:-configure}:10960: testing if the symbol is already defined go no further ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010961
micky3879b9f5e72025-07-08 18:04:53 -040010962 cat >"conftest.$ac_ext" <<_ACEOF
10963#line 10963 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010010964#include "confdefs.h"
10965#include <sys/types.h>
10966int
micky3879b9f5e72025-07-08 18:04:53 -040010967main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010010968{
10969
10970#ifndef _POSIX_C_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040010971#error _POSIX_C_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010010972#endif
10973 ;
10974 return 0;
10975}
10976_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040010977rm -f "conftest.$ac_objext"
10978if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010979 (eval $ac_compile) 2>&5
10980 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010981 echo "$as_me:10981: \$? = $ac_status" >&5
10982 (exit "$ac_status"); } &&
10983 { ac_try='test -s "conftest.$ac_objext"'
10984 { (eval echo "$as_me:10984: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010985 (eval $ac_try) 2>&5
10986 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040010987 echo "$as_me:10987: \$? = $ac_status" >&5
10988 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010010989 cf_cv_posix_c_source=no
10990else
10991 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040010992cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010010993cf_want_posix_source=no
10994 case .$cf_POSIX_C_SOURCE in
10995 (.[12]??*)
10996 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10997 ;;
10998 (.2)
10999 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11000 cf_want_posix_source=yes
11001 ;;
11002 (.*)
11003 cf_want_posix_source=yes
11004 ;;
11005 esac
11006 if test "$cf_want_posix_source" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040011007 cat >"conftest.$ac_ext" <<_ACEOF
11008#line 11008 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011009#include "confdefs.h"
11010#include <sys/types.h>
11011int
micky3879b9f5e72025-07-08 18:04:53 -040011012main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011013{
11014
11015#ifdef _POSIX_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011016#error _POSIX_SOURCE is defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011017#endif
11018 ;
11019 return 0;
11020}
11021_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011022rm -f "conftest.$ac_objext"
11023if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011024 (eval $ac_compile) 2>&5
11025 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011026 echo "$as_me:11026: \$? = $ac_status" >&5
11027 (exit "$ac_status"); } &&
11028 { ac_try='test -s "conftest.$ac_objext"'
11029 { (eval echo "$as_me:11029: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011030 (eval $ac_try) 2>&5
11031 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011032 echo "$as_me:11032: \$? = $ac_status" >&5
11033 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011034 :
11035else
11036 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011037cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011038cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11039fi
micky3879b9f5e72025-07-08 18:04:53 -040011040rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010011041 fi
11042
micky3879b9f5e72025-07-08 18:04:53 -040011043echo "${as_me:-configure}:11043: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011044
11045 CFLAGS="$cf_trim_CFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040011046 CPPFLAGS="$cf_trim_CPPFLAGS"
Steve Kondikae271bc2015-11-15 02:50:53 +010011047
micky3879b9f5e72025-07-08 18:04:53 -040011048 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11049 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
Steve Kondikae271bc2015-11-15 02:50:53 +010011050
micky3879b9f5e72025-07-08 18:04:53 -040011051echo "${as_me:-configure}:11051: testing if the second compile does not leave our definition intact error ..." 1>&5
11052
11053 cat >"conftest.$ac_ext" <<_ACEOF
11054#line 11054 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011055#include "confdefs.h"
11056#include <sys/types.h>
11057int
micky3879b9f5e72025-07-08 18:04:53 -040011058main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011059{
11060
11061#ifndef _POSIX_C_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011062#error _POSIX_C_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011063#endif
11064 ;
11065 return 0;
11066}
11067_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011068rm -f "conftest.$ac_objext"
11069if { (eval echo "$as_me:11069: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011070 (eval $ac_compile) 2>&5
11071 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011072 echo "$as_me:11072: \$? = $ac_status" >&5
11073 (exit "$ac_status"); } &&
11074 { ac_try='test -s "conftest.$ac_objext"'
11075 { (eval echo "$as_me:11075: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011076 (eval $ac_try) 2>&5
11077 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011078 echo "$as_me:11078: \$? = $ac_status" >&5
11079 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011080 :
11081else
11082 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011083cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011084cf_cv_posix_c_source=no
11085fi
micky3879b9f5e72025-07-08 18:04:53 -040011086rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010011087 CFLAGS="$cf_save_CFLAGS"
11088 CPPFLAGS="$cf_save_CPPFLAGS"
11089
11090fi
micky3879b9f5e72025-07-08 18:04:53 -040011091rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010011092
11093fi
micky3879b9f5e72025-07-08 18:04:53 -040011094echo "$as_me:11094: result: $cf_cv_posix_c_source" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011095echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11096
11097if test "$cf_cv_posix_c_source" != no ; then
11098 CFLAGS="$cf_trim_CFLAGS"
11099 CPPFLAGS="$cf_trim_CPPFLAGS"
11100
11101cf_fix_cppflags=no
11102cf_new_cflags=
11103cf_new_cppflags=
11104cf_new_extra_cppflags=
11105
11106for cf_add_cflags in $cf_cv_posix_c_source
11107do
micky3879b9f5e72025-07-08 18:04:53 -040011108case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011109(no)
micky3879b9f5e72025-07-08 18:04:53 -040011110 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011111 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040011112 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011113 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040011114 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011115
11116 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11117 && test -z "${cf_tst_cflags}" \
11118 && cf_fix_cppflags=yes
11119
micky3879b9f5e72025-07-08 18:04:53 -040011120 if test "$cf_fix_cppflags" = yes ; then
11121
11122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11124
Steve Kondikae271bc2015-11-15 02:50:53 +010011125 continue
11126 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040011127
11128 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11129 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11130
Steve Kondikae271bc2015-11-15 02:50:53 +010011131 continue
11132 fi
11133 ;;
11134 esac
11135 case "$CPPFLAGS" in
11136 (*$cf_add_cflags)
11137 ;;
11138 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011139 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011140 (-D*)
11141 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11142
11143CPPFLAGS=`echo "$CPPFLAGS" | \
11144 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11145 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11146
11147 ;;
11148 esac
micky3879b9f5e72025-07-08 18:04:53 -040011149
11150 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11151 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11152
Steve Kondikae271bc2015-11-15 02:50:53 +010011153 ;;
11154 esac
11155 ;;
11156 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011157
11158 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11159 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11160
Steve Kondikae271bc2015-11-15 02:50:53 +010011161 ;;
11162 esac
11163 ;;
11164(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010011165
micky3879b9f5e72025-07-08 18:04:53 -040011166 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11167 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11168
11169 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011170
11171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11172 && test -z "${cf_tst_cflags}" \
11173 && cf_fix_cppflags=no
11174 ;;
11175esac
11176done
11177
11178if test -n "$cf_new_cflags" ; then
11179
micky3879b9f5e72025-07-08 18:04:53 -040011180 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11181 CFLAGS="${CFLAGS}$cf_new_cflags"
11182
Steve Kondikae271bc2015-11-15 02:50:53 +010011183fi
11184
11185if test -n "$cf_new_cppflags" ; then
11186
micky3879b9f5e72025-07-08 18:04:53 -040011187 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11188 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11189
Steve Kondikae271bc2015-11-15 02:50:53 +010011190fi
11191
11192if test -n "$cf_new_extra_cppflags" ; then
11193
micky3879b9f5e72025-07-08 18:04:53 -040011194 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11195 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11196
Steve Kondikae271bc2015-11-15 02:50:53 +010011197fi
11198
11199fi
11200
micky3879b9f5e72025-07-08 18:04:53 -040011201fi # cf_cv_posix_visible
11202
Steve Kondikae271bc2015-11-15 02:50:53 +010011203 ;;
11204(netbsd*)
11205 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11206 ;;
micky3879b9f5e72025-07-08 18:04:53 -040011207(openbsd[6-9]*)
11208 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11209 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11210 # Abusing the conformance level is a workaround.
11211 { echo "$as_me:11211: WARNING: this system does not provide usable locale support" >&5
11212echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11213 cf_xopen_source="-D_BSD_SOURCE"
11214 cf_XOPEN_SOURCE=700
11215 ;;
11216(openbsd[4-5]*)
Steve Kondikae271bc2015-11-15 02:50:53 +010011217 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11218 cf_xopen_source="-D_BSD_SOURCE"
11219 cf_XOPEN_SOURCE=600
11220 ;;
11221(openbsd*)
11222 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11223 ;;
11224(osf[45]*)
11225 cf_xopen_source="-D_OSF_SOURCE"
11226 ;;
11227(nto-qnx*)
11228 cf_xopen_source="-D_QNX_SOURCE"
11229 ;;
11230(sco*)
11231 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11232 ;;
11233(solaris2.*)
11234 cf_xopen_source="-D__EXTENSIONS__"
11235 cf_cv_xopen_source=broken
11236 ;;
11237(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11238 cf_XOPEN_SOURCE=
11239 cf_POSIX_C_SOURCE=
11240 ;;
11241(*)
11242
micky3879b9f5e72025-07-08 18:04:53 -040011243echo "$as_me:11243: checking if we should define _XOPEN_SOURCE" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011244echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11245if test "${cf_cv_xopen_source+set}" = set; then
11246 echo $ECHO_N "(cached) $ECHO_C" >&6
11247else
11248
micky3879b9f5e72025-07-08 18:04:53 -040011249 cat >"conftest.$ac_ext" <<_ACEOF
11250#line 11250 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011251#include "confdefs.h"
11252
micky3879b9f5e72025-07-08 18:04:53 -040011253$ac_includes_default
Steve Kondikae271bc2015-11-15 02:50:53 +010011254
11255int
micky3879b9f5e72025-07-08 18:04:53 -040011256main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011257{
11258
11259#ifndef _XOPEN_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011260#error _XOPEN_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011261#endif
micky3879b9f5e72025-07-08 18:04:53 -040011262
Steve Kondikae271bc2015-11-15 02:50:53 +010011263 ;
11264 return 0;
11265}
11266_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011267rm -f "conftest.$ac_objext"
11268if { (eval echo "$as_me:11268: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011269 (eval $ac_compile) 2>&5
11270 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011271 echo "$as_me:11271: \$? = $ac_status" >&5
11272 (exit "$ac_status"); } &&
11273 { ac_try='test -s "conftest.$ac_objext"'
11274 { (eval echo "$as_me:11274: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011275 (eval $ac_try) 2>&5
11276 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011277 echo "$as_me:11277: \$? = $ac_status" >&5
11278 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011279 cf_cv_xopen_source=no
11280else
11281 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011282cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011283cf_save="$CPPFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040011284
11285 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11286 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11287
11288 cat >"conftest.$ac_ext" <<_ACEOF
11289#line 11289 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011290#include "confdefs.h"
11291
micky3879b9f5e72025-07-08 18:04:53 -040011292$ac_includes_default
Steve Kondikae271bc2015-11-15 02:50:53 +010011293
11294int
micky3879b9f5e72025-07-08 18:04:53 -040011295main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011296{
11297
micky3879b9f5e72025-07-08 18:04:53 -040011298#ifndef _XOPEN_SOURCE
11299#error _XOPEN_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011300#endif
micky3879b9f5e72025-07-08 18:04:53 -040011301
Steve Kondikae271bc2015-11-15 02:50:53 +010011302 ;
11303 return 0;
11304}
11305_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011306rm -f "conftest.$ac_objext"
11307if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011308 (eval $ac_compile) 2>&5
11309 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011310 echo "$as_me:11310: \$? = $ac_status" >&5
11311 (exit "$ac_status"); } &&
11312 { ac_try='test -s "conftest.$ac_objext"'
11313 { (eval echo "$as_me:11313: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011314 (eval $ac_try) 2>&5
11315 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011316 echo "$as_me:11316: \$? = $ac_status" >&5
11317 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011318 cf_cv_xopen_source=no
11319else
11320 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011321cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011322cf_cv_xopen_source=$cf_XOPEN_SOURCE
11323fi
micky3879b9f5e72025-07-08 18:04:53 -040011324rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11325 CPPFLAGS="$cf_save"
Steve Kondikae271bc2015-11-15 02:50:53 +010011326
11327fi
micky3879b9f5e72025-07-08 18:04:53 -040011328rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010011329
11330fi
micky3879b9f5e72025-07-08 18:04:53 -040011331echo "$as_me:11331: result: $cf_cv_xopen_source" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011332echo "${ECHO_T}$cf_cv_xopen_source" >&6
11333
11334if test "$cf_cv_xopen_source" != no ; then
11335
11336CFLAGS=`echo "$CFLAGS" | \
11337 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11338 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11339
11340CPPFLAGS=`echo "$CPPFLAGS" | \
11341 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11342 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11343
11344 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11345
micky3879b9f5e72025-07-08 18:04:53 -040011346for cf_add_cflags in $cf_temp_xopen_source
11347do
11348 case "x$cf_add_cflags" in
11349 (x-[DU]*)
11350
11351cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11352while true
11353do
11354 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11355 test "$CFLAGS" != "$cf_old_cflag" || break
11356
11357 CFLAGS="$cf_old_cflag"
11358done
11359
11360cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11361while true
11362do
11363 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11364 test "$CPPFLAGS" != "$cf_old_cflag" || break
11365
11366 CPPFLAGS="$cf_old_cflag"
11367done
11368
11369 ;;
11370 esac
11371
Steve Kondikae271bc2015-11-15 02:50:53 +010011372cf_fix_cppflags=no
11373cf_new_cflags=
11374cf_new_cppflags=
11375cf_new_extra_cppflags=
11376
micky3879b9f5e72025-07-08 18:04:53 -040011377for cf_add_cflags in $cf_add_cflags
Steve Kondikae271bc2015-11-15 02:50:53 +010011378do
micky3879b9f5e72025-07-08 18:04:53 -040011379case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011380(no)
micky3879b9f5e72025-07-08 18:04:53 -040011381 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011382 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040011383 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011384 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040011385 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011386
11387 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11388 && test -z "${cf_tst_cflags}" \
11389 && cf_fix_cppflags=yes
11390
micky3879b9f5e72025-07-08 18:04:53 -040011391 if test "$cf_fix_cppflags" = yes ; then
11392
11393 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11394 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11395
Steve Kondikae271bc2015-11-15 02:50:53 +010011396 continue
11397 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040011398
11399 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11400 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11401
Steve Kondikae271bc2015-11-15 02:50:53 +010011402 continue
11403 fi
11404 ;;
11405 esac
11406 case "$CPPFLAGS" in
11407 (*$cf_add_cflags)
11408 ;;
11409 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011410 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011411 (-D*)
11412 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11413
11414CPPFLAGS=`echo "$CPPFLAGS" | \
11415 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11416 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11417
11418 ;;
11419 esac
micky3879b9f5e72025-07-08 18:04:53 -040011420
11421 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11422 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11423
Steve Kondikae271bc2015-11-15 02:50:53 +010011424 ;;
11425 esac
11426 ;;
11427 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011428
11429 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11430 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11431
Steve Kondikae271bc2015-11-15 02:50:53 +010011432 ;;
11433 esac
11434 ;;
11435(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010011436
micky3879b9f5e72025-07-08 18:04:53 -040011437 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11438 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11439
11440 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011441
11442 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11443 && test -z "${cf_tst_cflags}" \
11444 && cf_fix_cppflags=no
11445 ;;
11446esac
11447done
11448
11449if test -n "$cf_new_cflags" ; then
11450
micky3879b9f5e72025-07-08 18:04:53 -040011451 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11452 CFLAGS="${CFLAGS}$cf_new_cflags"
11453
Steve Kondikae271bc2015-11-15 02:50:53 +010011454fi
11455
11456if test -n "$cf_new_cppflags" ; then
11457
micky3879b9f5e72025-07-08 18:04:53 -040011458 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11459 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11460
Steve Kondikae271bc2015-11-15 02:50:53 +010011461fi
11462
11463if test -n "$cf_new_extra_cppflags" ; then
11464
micky3879b9f5e72025-07-08 18:04:53 -040011465 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11466 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
Steve Kondikae271bc2015-11-15 02:50:53 +010011467
11468fi
11469
micky3879b9f5e72025-07-08 18:04:53 -040011470done
11471
11472fi
11473
11474 cf_save_xopen_cppflags="$CPPFLAGS"
11475
11476if test "$cf_cv_posix_visible" = no; then
11477
Steve Kondikae271bc2015-11-15 02:50:53 +010011478cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11479
11480cf_save_CFLAGS="$CFLAGS"
11481cf_save_CPPFLAGS="$CPPFLAGS"
11482
11483cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11484 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11485 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11486
11487cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11488 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11489 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11490
micky3879b9f5e72025-07-08 18:04:53 -040011491echo "$as_me:11491: checking if we should define _POSIX_C_SOURCE" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011492echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11493if test "${cf_cv_posix_c_source+set}" = set; then
11494 echo $ECHO_N "(cached) $ECHO_C" >&6
11495else
11496
micky3879b9f5e72025-07-08 18:04:53 -040011497echo "${as_me:-configure}:11497: testing if the symbol is already defined go no further ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011498
micky3879b9f5e72025-07-08 18:04:53 -040011499 cat >"conftest.$ac_ext" <<_ACEOF
11500#line 11500 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011501#include "confdefs.h"
11502#include <sys/types.h>
11503int
micky3879b9f5e72025-07-08 18:04:53 -040011504main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011505{
11506
11507#ifndef _POSIX_C_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011508#error _POSIX_C_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011509#endif
11510 ;
11511 return 0;
11512}
11513_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011514rm -f "conftest.$ac_objext"
11515if { (eval echo "$as_me:11515: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011516 (eval $ac_compile) 2>&5
11517 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011518 echo "$as_me:11518: \$? = $ac_status" >&5
11519 (exit "$ac_status"); } &&
11520 { ac_try='test -s "conftest.$ac_objext"'
11521 { (eval echo "$as_me:11521: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011522 (eval $ac_try) 2>&5
11523 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011524 echo "$as_me:11524: \$? = $ac_status" >&5
11525 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011526 cf_cv_posix_c_source=no
11527else
11528 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011529cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011530cf_want_posix_source=no
11531 case .$cf_POSIX_C_SOURCE in
11532 (.[12]??*)
11533 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11534 ;;
11535 (.2)
11536 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11537 cf_want_posix_source=yes
11538 ;;
11539 (.*)
11540 cf_want_posix_source=yes
11541 ;;
11542 esac
11543 if test "$cf_want_posix_source" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040011544 cat >"conftest.$ac_ext" <<_ACEOF
11545#line 11545 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011546#include "confdefs.h"
11547#include <sys/types.h>
11548int
micky3879b9f5e72025-07-08 18:04:53 -040011549main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011550{
11551
11552#ifdef _POSIX_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011553#error _POSIX_SOURCE is defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011554#endif
11555 ;
11556 return 0;
11557}
11558_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011559rm -f "conftest.$ac_objext"
11560if { (eval echo "$as_me:11560: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011561 (eval $ac_compile) 2>&5
11562 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011563 echo "$as_me:11563: \$? = $ac_status" >&5
11564 (exit "$ac_status"); } &&
11565 { ac_try='test -s "conftest.$ac_objext"'
11566 { (eval echo "$as_me:11566: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011567 (eval $ac_try) 2>&5
11568 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011569 echo "$as_me:11569: \$? = $ac_status" >&5
11570 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011571 :
11572else
11573 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011574cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011575cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11576fi
micky3879b9f5e72025-07-08 18:04:53 -040011577rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010011578 fi
11579
micky3879b9f5e72025-07-08 18:04:53 -040011580echo "${as_me:-configure}:11580: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011581
11582 CFLAGS="$cf_trim_CFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040011583 CPPFLAGS="$cf_trim_CPPFLAGS"
Steve Kondikae271bc2015-11-15 02:50:53 +010011584
micky3879b9f5e72025-07-08 18:04:53 -040011585 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11586 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
Steve Kondikae271bc2015-11-15 02:50:53 +010011587
micky3879b9f5e72025-07-08 18:04:53 -040011588echo "${as_me:-configure}:11588: testing if the second compile does not leave our definition intact error ..." 1>&5
11589
11590 cat >"conftest.$ac_ext" <<_ACEOF
11591#line 11591 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011592#include "confdefs.h"
11593#include <sys/types.h>
11594int
micky3879b9f5e72025-07-08 18:04:53 -040011595main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011596{
11597
11598#ifndef _POSIX_C_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011599#error _POSIX_C_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011600#endif
11601 ;
11602 return 0;
11603}
11604_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011605rm -f "conftest.$ac_objext"
11606if { (eval echo "$as_me:11606: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011607 (eval $ac_compile) 2>&5
11608 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011609 echo "$as_me:11609: \$? = $ac_status" >&5
11610 (exit "$ac_status"); } &&
11611 { ac_try='test -s "conftest.$ac_objext"'
11612 { (eval echo "$as_me:11612: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011613 (eval $ac_try) 2>&5
11614 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011615 echo "$as_me:11615: \$? = $ac_status" >&5
11616 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011617 :
11618else
11619 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011620cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011621cf_cv_posix_c_source=no
11622fi
micky3879b9f5e72025-07-08 18:04:53 -040011623rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010011624 CFLAGS="$cf_save_CFLAGS"
11625 CPPFLAGS="$cf_save_CPPFLAGS"
11626
11627fi
micky3879b9f5e72025-07-08 18:04:53 -040011628rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010011629
11630fi
micky3879b9f5e72025-07-08 18:04:53 -040011631echo "$as_me:11631: result: $cf_cv_posix_c_source" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011632echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11633
11634if test "$cf_cv_posix_c_source" != no ; then
11635 CFLAGS="$cf_trim_CFLAGS"
11636 CPPFLAGS="$cf_trim_CPPFLAGS"
11637
11638cf_fix_cppflags=no
11639cf_new_cflags=
11640cf_new_cppflags=
11641cf_new_extra_cppflags=
11642
11643for cf_add_cflags in $cf_cv_posix_c_source
11644do
micky3879b9f5e72025-07-08 18:04:53 -040011645case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011646(no)
micky3879b9f5e72025-07-08 18:04:53 -040011647 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011648 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040011649 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011650 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040011651 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011652
11653 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11654 && test -z "${cf_tst_cflags}" \
11655 && cf_fix_cppflags=yes
11656
micky3879b9f5e72025-07-08 18:04:53 -040011657 if test "$cf_fix_cppflags" = yes ; then
11658
11659 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11660 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11661
Steve Kondikae271bc2015-11-15 02:50:53 +010011662 continue
11663 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040011664
11665 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11666 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11667
Steve Kondikae271bc2015-11-15 02:50:53 +010011668 continue
11669 fi
11670 ;;
11671 esac
11672 case "$CPPFLAGS" in
11673 (*$cf_add_cflags)
11674 ;;
11675 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011676 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011677 (-D*)
11678 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11679
11680CPPFLAGS=`echo "$CPPFLAGS" | \
11681 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11682 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11683
11684 ;;
11685 esac
micky3879b9f5e72025-07-08 18:04:53 -040011686
11687 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11688 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11689
Steve Kondikae271bc2015-11-15 02:50:53 +010011690 ;;
11691 esac
11692 ;;
11693 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011694
11695 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11696 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11697
Steve Kondikae271bc2015-11-15 02:50:53 +010011698 ;;
11699 esac
11700 ;;
11701(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010011702
micky3879b9f5e72025-07-08 18:04:53 -040011703 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11704 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11705
11706 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011707
11708 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11709 && test -z "${cf_tst_cflags}" \
11710 && cf_fix_cppflags=no
11711 ;;
11712esac
11713done
11714
11715if test -n "$cf_new_cflags" ; then
11716
micky3879b9f5e72025-07-08 18:04:53 -040011717 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11718 CFLAGS="${CFLAGS}$cf_new_cflags"
11719
Steve Kondikae271bc2015-11-15 02:50:53 +010011720fi
11721
11722if test -n "$cf_new_cppflags" ; then
11723
micky3879b9f5e72025-07-08 18:04:53 -040011724 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11725 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11726
Steve Kondikae271bc2015-11-15 02:50:53 +010011727fi
11728
11729if test -n "$cf_new_extra_cppflags" ; then
11730
micky3879b9f5e72025-07-08 18:04:53 -040011731 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11732 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11733
Steve Kondikae271bc2015-11-15 02:50:53 +010011734fi
11735
11736fi
11737
micky3879b9f5e72025-07-08 18:04:53 -040011738fi # cf_cv_posix_visible
11739
11740 # Some of these niche implementations use copy/paste, double-check...
11741 if test "$cf_cv_xopen_source" = no ; then
11742 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11743
11744echo "${as_me:-configure}:11744: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11745
11746 cat >"conftest.$ac_ext" <<_ACEOF
11747#line 11747 "configure"
11748#include "confdefs.h"
11749
11750$ac_includes_default
11751
11752int
11753main (void)
11754{
11755
11756#ifndef _XOPEN_SOURCE
11757#error _XOPEN_SOURCE is not defined
11758#endif
11759
11760 ;
11761 return 0;
11762}
11763_ACEOF
11764rm -f "conftest.$ac_objext"
11765if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766 (eval $ac_compile) 2>&5
11767 ac_status=$?
11768 echo "$as_me:11768: \$? = $ac_status" >&5
11769 (exit "$ac_status"); } &&
11770 { ac_try='test -s "conftest.$ac_objext"'
11771 { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772 (eval $ac_try) 2>&5
11773 ac_status=$?
11774 echo "$as_me:11774: \$? = $ac_status" >&5
11775 (exit "$ac_status"); }; }; then
11776 :
11777else
11778 echo "$as_me: failed program was:" >&5
11779cat "conftest.$ac_ext" >&5
11780
11781 { echo "$as_me:11781: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11782echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11783 CPPFLAGS="$cf_save_xopen_cppflags"
11784fi
11785rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11786 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010011787 ;;
11788esac
11789
11790if test -n "$cf_xopen_source" ; then
11791
micky3879b9f5e72025-07-08 18:04:53 -040011792for cf_add_cflags in $cf_xopen_source
11793do
11794 case "x$cf_add_cflags" in
11795 (x-[DU]*)
11796
11797cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11798while true
11799do
11800 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11801 test "$CFLAGS" != "$cf_old_cflag" || break
11802 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
11803
11804echo "${as_me:-configure}:11804: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11805
11806 CFLAGS="$cf_old_cflag"
11807done
11808
11809cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11810while true
11811do
11812 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11813 test "$CPPFLAGS" != "$cf_old_cflag" || break
11814 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11815
11816echo "${as_me:-configure}:11816: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11817
11818 CPPFLAGS="$cf_old_cflag"
11819done
11820
11821 ;;
11822 esac
11823
Steve Kondikae271bc2015-11-15 02:50:53 +010011824cf_fix_cppflags=no
11825cf_new_cflags=
11826cf_new_cppflags=
11827cf_new_extra_cppflags=
11828
micky3879b9f5e72025-07-08 18:04:53 -040011829for cf_add_cflags in $cf_add_cflags
Steve Kondikae271bc2015-11-15 02:50:53 +010011830do
micky3879b9f5e72025-07-08 18:04:53 -040011831case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011832(no)
micky3879b9f5e72025-07-08 18:04:53 -040011833 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011834 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040011835 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011836 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040011837 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011838
11839 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11840 && test -z "${cf_tst_cflags}" \
11841 && cf_fix_cppflags=yes
11842
micky3879b9f5e72025-07-08 18:04:53 -040011843 if test "$cf_fix_cppflags" = yes ; then
11844
11845 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11846 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11847
Steve Kondikae271bc2015-11-15 02:50:53 +010011848 continue
11849 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040011850
11851 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11852 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11853
Steve Kondikae271bc2015-11-15 02:50:53 +010011854 continue
11855 fi
11856 ;;
11857 esac
11858 case "$CPPFLAGS" in
11859 (*$cf_add_cflags)
11860 ;;
11861 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011862 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010011863 (-D*)
11864 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11865
11866CPPFLAGS=`echo "$CPPFLAGS" | \
11867 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11868 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11869
11870 ;;
11871 esac
micky3879b9f5e72025-07-08 18:04:53 -040011872
11873 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11874 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11875
Steve Kondikae271bc2015-11-15 02:50:53 +010011876 ;;
11877 esac
11878 ;;
11879 (*)
micky3879b9f5e72025-07-08 18:04:53 -040011880
11881 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11882 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11883
Steve Kondikae271bc2015-11-15 02:50:53 +010011884 ;;
11885 esac
11886 ;;
11887(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010011888
micky3879b9f5e72025-07-08 18:04:53 -040011889 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11890 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11891
11892 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010011893
11894 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11895 && test -z "${cf_tst_cflags}" \
11896 && cf_fix_cppflags=no
11897 ;;
11898esac
11899done
11900
11901if test -n "$cf_new_cflags" ; then
11902 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11903
micky3879b9f5e72025-07-08 18:04:53 -040011904echo "${as_me:-configure}:11904: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011905
micky3879b9f5e72025-07-08 18:04:53 -040011906 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11907 CFLAGS="${CFLAGS}$cf_new_cflags"
11908
Steve Kondikae271bc2015-11-15 02:50:53 +010011909fi
11910
11911if test -n "$cf_new_cppflags" ; then
11912 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11913
micky3879b9f5e72025-07-08 18:04:53 -040011914echo "${as_me:-configure}:11914: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011915
micky3879b9f5e72025-07-08 18:04:53 -040011916 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11917 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11918
Steve Kondikae271bc2015-11-15 02:50:53 +010011919fi
11920
11921if test -n "$cf_new_extra_cppflags" ; then
11922 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11923
micky3879b9f5e72025-07-08 18:04:53 -040011924echo "${as_me:-configure}:11924: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011925
micky3879b9f5e72025-07-08 18:04:53 -040011926 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11927 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11928
Steve Kondikae271bc2015-11-15 02:50:53 +010011929fi
11930
micky3879b9f5e72025-07-08 18:04:53 -040011931done
11932
Steve Kondikae271bc2015-11-15 02:50:53 +010011933fi
11934
11935if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
micky3879b9f5e72025-07-08 18:04:53 -040011936 echo "$as_me:11936: checking if _XOPEN_SOURCE really is set" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011937echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040011938 cat >"conftest.$ac_ext" <<_ACEOF
11939#line 11939 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011940#include "confdefs.h"
11941#include <stdlib.h>
11942int
micky3879b9f5e72025-07-08 18:04:53 -040011943main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011944{
11945
11946#ifndef _XOPEN_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011947#error _XOPEN_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010011948#endif
11949 ;
11950 return 0;
11951}
11952_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011953rm -f "conftest.$ac_objext"
11954if { (eval echo "$as_me:11954: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011955 (eval $ac_compile) 2>&5
11956 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011957 echo "$as_me:11957: \$? = $ac_status" >&5
11958 (exit "$ac_status"); } &&
11959 { ac_try='test -s "conftest.$ac_objext"'
11960 { (eval echo "$as_me:11960: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011961 (eval $ac_try) 2>&5
11962 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011963 echo "$as_me:11963: \$? = $ac_status" >&5
11964 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010011965 cf_XOPEN_SOURCE_set=yes
11966else
11967 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040011968cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011969cf_XOPEN_SOURCE_set=no
11970fi
micky3879b9f5e72025-07-08 18:04:53 -040011971rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11972 echo "$as_me:11972: result: $cf_XOPEN_SOURCE_set" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011973echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
micky3879b9f5e72025-07-08 18:04:53 -040011974 if test "$cf_XOPEN_SOURCE_set" = yes
Steve Kondikae271bc2015-11-15 02:50:53 +010011975 then
micky3879b9f5e72025-07-08 18:04:53 -040011976 cat >"conftest.$ac_ext" <<_ACEOF
11977#line 11977 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010011978#include "confdefs.h"
11979#include <stdlib.h>
11980int
micky3879b9f5e72025-07-08 18:04:53 -040011981main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010011982{
11983
11984#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040011985#error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
Steve Kondikae271bc2015-11-15 02:50:53 +010011986#endif
11987 ;
11988 return 0;
11989}
11990_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040011991rm -f "conftest.$ac_objext"
11992if { (eval echo "$as_me:11992: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011993 (eval $ac_compile) 2>&5
11994 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040011995 echo "$as_me:11995: \$? = $ac_status" >&5
11996 (exit "$ac_status"); } &&
11997 { ac_try='test -s "conftest.$ac_objext"'
11998 { (eval echo "$as_me:11998: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010011999 (eval $ac_try) 2>&5
12000 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012001 echo "$as_me:12001: \$? = $ac_status" >&5
12002 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012003 cf_XOPEN_SOURCE_set_ok=yes
12004else
12005 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012006cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012007cf_XOPEN_SOURCE_set_ok=no
12008fi
micky3879b9f5e72025-07-08 18:04:53 -040012009rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12010 if test "$cf_XOPEN_SOURCE_set_ok" = no
Steve Kondikae271bc2015-11-15 02:50:53 +010012011 then
micky3879b9f5e72025-07-08 18:04:53 -040012012 { echo "$as_me:12012: WARNING: _XOPEN_SOURCE is lower than requested" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012013echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12014 fi
12015 else
12016
micky3879b9f5e72025-07-08 18:04:53 -040012017echo "$as_me:12017: checking if we should define _XOPEN_SOURCE" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012018echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12019if test "${cf_cv_xopen_source+set}" = set; then
12020 echo $ECHO_N "(cached) $ECHO_C" >&6
12021else
12022
micky3879b9f5e72025-07-08 18:04:53 -040012023 cat >"conftest.$ac_ext" <<_ACEOF
12024#line 12024 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012025#include "confdefs.h"
12026
micky3879b9f5e72025-07-08 18:04:53 -040012027$ac_includes_default
Steve Kondikae271bc2015-11-15 02:50:53 +010012028
12029int
micky3879b9f5e72025-07-08 18:04:53 -040012030main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012031{
12032
12033#ifndef _XOPEN_SOURCE
micky3879b9f5e72025-07-08 18:04:53 -040012034#error _XOPEN_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010012035#endif
micky3879b9f5e72025-07-08 18:04:53 -040012036
Steve Kondikae271bc2015-11-15 02:50:53 +010012037 ;
12038 return 0;
12039}
12040_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012041rm -f "conftest.$ac_objext"
12042if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012043 (eval $ac_compile) 2>&5
12044 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012045 echo "$as_me:12045: \$? = $ac_status" >&5
12046 (exit "$ac_status"); } &&
12047 { ac_try='test -s "conftest.$ac_objext"'
12048 { (eval echo "$as_me:12048: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012049 (eval $ac_try) 2>&5
12050 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012051 echo "$as_me:12051: \$? = $ac_status" >&5
12052 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012053 cf_cv_xopen_source=no
12054else
12055 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012056cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012057cf_save="$CPPFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040012058
12059 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12060 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12061
12062 cat >"conftest.$ac_ext" <<_ACEOF
12063#line 12063 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012064#include "confdefs.h"
12065
micky3879b9f5e72025-07-08 18:04:53 -040012066$ac_includes_default
Steve Kondikae271bc2015-11-15 02:50:53 +010012067
12068int
micky3879b9f5e72025-07-08 18:04:53 -040012069main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012070{
12071
micky3879b9f5e72025-07-08 18:04:53 -040012072#ifndef _XOPEN_SOURCE
12073#error _XOPEN_SOURCE is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010012074#endif
micky3879b9f5e72025-07-08 18:04:53 -040012075
Steve Kondikae271bc2015-11-15 02:50:53 +010012076 ;
12077 return 0;
12078}
12079_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012080rm -f "conftest.$ac_objext"
12081if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012082 (eval $ac_compile) 2>&5
12083 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012084 echo "$as_me:12084: \$? = $ac_status" >&5
12085 (exit "$ac_status"); } &&
12086 { ac_try='test -s "conftest.$ac_objext"'
12087 { (eval echo "$as_me:12087: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012088 (eval $ac_try) 2>&5
12089 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012090 echo "$as_me:12090: \$? = $ac_status" >&5
12091 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012092 cf_cv_xopen_source=no
12093else
12094 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012095cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012096cf_cv_xopen_source=$cf_XOPEN_SOURCE
12097fi
micky3879b9f5e72025-07-08 18:04:53 -040012098rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12099 CPPFLAGS="$cf_save"
Steve Kondikae271bc2015-11-15 02:50:53 +010012100
12101fi
micky3879b9f5e72025-07-08 18:04:53 -040012102rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010012103
12104fi
micky3879b9f5e72025-07-08 18:04:53 -040012105echo "$as_me:12105: result: $cf_cv_xopen_source" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012106echo "${ECHO_T}$cf_cv_xopen_source" >&6
12107
12108if test "$cf_cv_xopen_source" != no ; then
12109
12110CFLAGS=`echo "$CFLAGS" | \
12111 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12112 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12113
12114CPPFLAGS=`echo "$CPPFLAGS" | \
12115 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12116 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12117
12118 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12119
micky3879b9f5e72025-07-08 18:04:53 -040012120for cf_add_cflags in $cf_temp_xopen_source
12121do
12122 case "x$cf_add_cflags" in
12123 (x-[DU]*)
12124
12125cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12126while true
12127do
12128 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12129 test "$CFLAGS" != "$cf_old_cflag" || break
12130
12131 CFLAGS="$cf_old_cflag"
12132done
12133
12134cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12135while true
12136do
12137 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12138 test "$CPPFLAGS" != "$cf_old_cflag" || break
12139
12140 CPPFLAGS="$cf_old_cflag"
12141done
12142
12143 ;;
12144 esac
12145
Steve Kondikae271bc2015-11-15 02:50:53 +010012146cf_fix_cppflags=no
12147cf_new_cflags=
12148cf_new_cppflags=
12149cf_new_extra_cppflags=
12150
micky3879b9f5e72025-07-08 18:04:53 -040012151for cf_add_cflags in $cf_add_cflags
Steve Kondikae271bc2015-11-15 02:50:53 +010012152do
micky3879b9f5e72025-07-08 18:04:53 -040012153case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010012154(no)
micky3879b9f5e72025-07-08 18:04:53 -040012155 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010012156 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040012157 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010012158 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040012159 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010012160
12161 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12162 && test -z "${cf_tst_cflags}" \
12163 && cf_fix_cppflags=yes
12164
micky3879b9f5e72025-07-08 18:04:53 -040012165 if test "$cf_fix_cppflags" = yes ; then
12166
12167 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12168 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12169
Steve Kondikae271bc2015-11-15 02:50:53 +010012170 continue
12171 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040012172
12173 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12174 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12175
Steve Kondikae271bc2015-11-15 02:50:53 +010012176 continue
12177 fi
12178 ;;
12179 esac
12180 case "$CPPFLAGS" in
12181 (*$cf_add_cflags)
12182 ;;
12183 (*)
micky3879b9f5e72025-07-08 18:04:53 -040012184 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010012185 (-D*)
12186 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12187
12188CPPFLAGS=`echo "$CPPFLAGS" | \
12189 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12190 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12191
12192 ;;
12193 esac
micky3879b9f5e72025-07-08 18:04:53 -040012194
12195 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12196 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12197
Steve Kondikae271bc2015-11-15 02:50:53 +010012198 ;;
12199 esac
12200 ;;
12201 (*)
micky3879b9f5e72025-07-08 18:04:53 -040012202
12203 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12204 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12205
Steve Kondikae271bc2015-11-15 02:50:53 +010012206 ;;
12207 esac
12208 ;;
12209(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010012210
micky3879b9f5e72025-07-08 18:04:53 -040012211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12213
12214 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010012215
12216 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12217 && test -z "${cf_tst_cflags}" \
12218 && cf_fix_cppflags=no
12219 ;;
12220esac
12221done
12222
12223if test -n "$cf_new_cflags" ; then
12224
micky3879b9f5e72025-07-08 18:04:53 -040012225 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12226 CFLAGS="${CFLAGS}$cf_new_cflags"
12227
Steve Kondikae271bc2015-11-15 02:50:53 +010012228fi
12229
12230if test -n "$cf_new_cppflags" ; then
12231
micky3879b9f5e72025-07-08 18:04:53 -040012232 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12233 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12234
Steve Kondikae271bc2015-11-15 02:50:53 +010012235fi
12236
12237if test -n "$cf_new_extra_cppflags" ; then
12238
micky3879b9f5e72025-07-08 18:04:53 -040012239 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12240 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12241
Steve Kondikae271bc2015-11-15 02:50:53 +010012242fi
12243
micky3879b9f5e72025-07-08 18:04:53 -040012244done
12245
Steve Kondikae271bc2015-11-15 02:50:53 +010012246fi
12247
12248 fi
12249fi
micky3879b9f5e72025-07-08 18:04:53 -040012250fi # cf_cv_posix_visible
Steve Kondikae271bc2015-11-15 02:50:53 +010012251
12252CPPFLAGS_after_XOPEN="$CPPFLAGS"
12253
12254# Work around breakage on OS X
12255
micky3879b9f5e72025-07-08 18:04:53 -040012256echo "$as_me:12256: checking if SIGWINCH is defined" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012257echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12258if test "${cf_cv_define_sigwinch+set}" = set; then
12259 echo $ECHO_N "(cached) $ECHO_C" >&6
12260else
12261
micky3879b9f5e72025-07-08 18:04:53 -040012262 cat >"conftest.$ac_ext" <<_ACEOF
12263#line 12263 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012264#include "confdefs.h"
12265
12266#include <sys/types.h>
12267#include <sys/signal.h>
12268
12269int
micky3879b9f5e72025-07-08 18:04:53 -040012270main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012271{
micky3879b9f5e72025-07-08 18:04:53 -040012272int x = SIGWINCH; (void)x
Steve Kondikae271bc2015-11-15 02:50:53 +010012273 ;
12274 return 0;
12275}
12276_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012277rm -f "conftest.$ac_objext"
12278if { (eval echo "$as_me:12278: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012279 (eval $ac_compile) 2>&5
12280 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012281 echo "$as_me:12281: \$? = $ac_status" >&5
12282 (exit "$ac_status"); } &&
12283 { ac_try='test -s "conftest.$ac_objext"'
12284 { (eval echo "$as_me:12284: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012285 (eval $ac_try) 2>&5
12286 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012287 echo "$as_me:12287: \$? = $ac_status" >&5
12288 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012289 cf_cv_define_sigwinch=yes
12290else
12291 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012292cat "conftest.$ac_ext" >&5
12293cat >"conftest.$ac_ext" <<_ACEOF
12294#line 12294 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012295#include "confdefs.h"
12296
12297#undef _XOPEN_SOURCE
12298#undef _POSIX_SOURCE
12299#undef _POSIX_C_SOURCE
12300#include <sys/types.h>
12301#include <sys/signal.h>
12302
12303int
micky3879b9f5e72025-07-08 18:04:53 -040012304main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012305{
micky3879b9f5e72025-07-08 18:04:53 -040012306int x = SIGWINCH; (void)x
Steve Kondikae271bc2015-11-15 02:50:53 +010012307 ;
12308 return 0;
12309}
12310_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012311rm -f "conftest.$ac_objext"
12312if { (eval echo "$as_me:12312: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012313 (eval $ac_compile) 2>&5
12314 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012315 echo "$as_me:12315: \$? = $ac_status" >&5
12316 (exit "$ac_status"); } &&
12317 { ac_try='test -s "conftest.$ac_objext"'
12318 { (eval echo "$as_me:12318: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012319 (eval $ac_try) 2>&5
12320 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012321 echo "$as_me:12321: \$? = $ac_status" >&5
12322 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012323 cf_cv_define_sigwinch=maybe
12324else
12325 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012326cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012327cf_cv_define_sigwinch=no
12328fi
micky3879b9f5e72025-07-08 18:04:53 -040012329rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010012330
12331fi
micky3879b9f5e72025-07-08 18:04:53 -040012332rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010012333
12334fi
micky3879b9f5e72025-07-08 18:04:53 -040012335echo "$as_me:12335: result: $cf_cv_define_sigwinch" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012336echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12337
12338if test "$cf_cv_define_sigwinch" = maybe ; then
micky3879b9f5e72025-07-08 18:04:53 -040012339echo "$as_me:12339: checking for actual SIGWINCH definition" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012340echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12341if test "${cf_cv_fixup_sigwinch+set}" = set; then
12342 echo $ECHO_N "(cached) $ECHO_C" >&6
12343else
12344
12345cf_cv_fixup_sigwinch=unknown
12346cf_sigwinch=32
micky3879b9f5e72025-07-08 18:04:53 -040012347while test "$cf_sigwinch" != 1
Steve Kondikae271bc2015-11-15 02:50:53 +010012348do
micky3879b9f5e72025-07-08 18:04:53 -040012349 cat >"conftest.$ac_ext" <<_ACEOF
12350#line 12350 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012351#include "confdefs.h"
12352
12353#undef _XOPEN_SOURCE
12354#undef _POSIX_SOURCE
12355#undef _POSIX_C_SOURCE
12356#include <sys/types.h>
12357#include <sys/signal.h>
12358
12359int
micky3879b9f5e72025-07-08 18:04:53 -040012360main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012361{
12362
12363#if SIGWINCH != $cf_sigwinch
micky3879b9f5e72025-07-08 18:04:53 -040012364#error SIGWINCH is not $cf_sigwinch
Steve Kondikae271bc2015-11-15 02:50:53 +010012365#endif
micky3879b9f5e72025-07-08 18:04:53 -040012366int x = SIGWINCH; (void)x
Steve Kondikae271bc2015-11-15 02:50:53 +010012367 ;
12368 return 0;
12369}
12370_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012371rm -f "conftest.$ac_objext"
12372if { (eval echo "$as_me:12372: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012373 (eval $ac_compile) 2>&5
12374 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012375 echo "$as_me:12375: \$? = $ac_status" >&5
12376 (exit "$ac_status"); } &&
12377 { ac_try='test -s "conftest.$ac_objext"'
12378 { (eval echo "$as_me:12378: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012379 (eval $ac_try) 2>&5
12380 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012381 echo "$as_me:12381: \$? = $ac_status" >&5
12382 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012383 cf_cv_fixup_sigwinch=$cf_sigwinch
12384 break
12385else
12386 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012387cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012388fi
micky3879b9f5e72025-07-08 18:04:53 -040012389rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010012390
micky3879b9f5e72025-07-08 18:04:53 -040012391cf_sigwinch="`expr "$cf_sigwinch" - 1`"
Steve Kondikae271bc2015-11-15 02:50:53 +010012392done
12393
12394fi
micky3879b9f5e72025-07-08 18:04:53 -040012395echo "$as_me:12395: result: $cf_cv_fixup_sigwinch" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012396echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12397
12398 if test "$cf_cv_fixup_sigwinch" != unknown ; then
12399 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12400 fi
12401fi
12402
12403# Checks for CODESET support.
12404
micky3879b9f5e72025-07-08 18:04:53 -040012405echo "$as_me:12405: checking for nl_langinfo and CODESET" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012406echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12407if test "${am_cv_langinfo_codeset+set}" = set; then
12408 echo $ECHO_N "(cached) $ECHO_C" >&6
12409else
micky3879b9f5e72025-07-08 18:04:53 -040012410 cat >"conftest.$ac_ext" <<_ACEOF
12411#line 12411 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012412#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040012413
12414$ac_includes_default
Steve Kondikae271bc2015-11-15 02:50:53 +010012415#include <langinfo.h>
12416int
micky3879b9f5e72025-07-08 18:04:53 -040012417main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012418{
micky3879b9f5e72025-07-08 18:04:53 -040012419char* cs = nl_langinfo(CODESET); (void)cs
Steve Kondikae271bc2015-11-15 02:50:53 +010012420 ;
12421 return 0;
12422}
12423_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012424rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12425if { (eval echo "$as_me:12425: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012426 (eval $ac_link) 2>&5
12427 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012428 echo "$as_me:12428: \$? = $ac_status" >&5
12429 (exit "$ac_status"); } &&
12430 { ac_try='test -s "conftest$ac_exeext"'
12431 { (eval echo "$as_me:12431: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012432 (eval $ac_try) 2>&5
12433 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012434 echo "$as_me:12434: \$? = $ac_status" >&5
12435 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012436 am_cv_langinfo_codeset=yes
12437else
12438 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012439cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012440am_cv_langinfo_codeset=no
12441fi
micky3879b9f5e72025-07-08 18:04:53 -040012442rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010012443
12444fi
micky3879b9f5e72025-07-08 18:04:53 -040012445echo "$as_me:12445: result: $am_cv_langinfo_codeset" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012446echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
micky3879b9f5e72025-07-08 18:04:53 -040012447 if test "$am_cv_langinfo_codeset" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012448
12449cat >>confdefs.h <<\EOF
12450#define HAVE_LANGINFO_CODESET 1
12451EOF
12452
12453 fi
12454
12455# use these variables to work around a defect in gcc's fixincludes.
12456NCURSES_OK_WCHAR_T=
12457NCURSES_OK_WINT_T=
12458
micky3879b9f5e72025-07-08 18:04:53 -040012459echo "$as_me:12459: checking if you want wide-character code" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012460echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12461
12462# Check whether --enable-widec or --disable-widec was given.
12463if test "${enable_widec+set}" = set; then
12464 enableval="$enable_widec"
12465 with_widec=$enableval
12466else
micky3879b9f5e72025-07-08 18:04:53 -040012467 with_widec=$cf_dft_widec
Steve Kondikae271bc2015-11-15 02:50:53 +010012468fi;
micky3879b9f5e72025-07-08 18:04:53 -040012469echo "$as_me:12469: result: $with_widec" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012470echo "${ECHO_T}$with_widec" >&6
micky3879b9f5e72025-07-08 18:04:53 -040012471
12472NCURSES_WCWIDTH_GRAPHICS=1
12473
Steve Kondikae271bc2015-11-15 02:50:53 +010012474if test "x$with_widec" = xyes ; then
12475 if test "x$disable_lib_suffixes" = xno ; then
12476 LIB_SUFFIX="w${LIB_SUFFIX}"
12477 fi
12478
12479cat >>confdefs.h <<\EOF
12480#define USE_WIDEC_SUPPORT 1
12481EOF
12482
12483cat >>confdefs.h <<\EOF
12484#define NCURSES_WIDECHAR 1
12485EOF
12486
micky3879b9f5e72025-07-08 18:04:53 -040012487 case "$CPPFLAGS" in
12488 (*_XOPEN_SOURCE=*)
12489 ;;
12490 (*)
12491 { echo "$as_me:12491: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12492echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12493 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12494 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12495 ;;
12496 esac
12497
12498for ac_header in \
12499wchar.h \
12500wctype.h \
12501
12502do
12503as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12504echo "$as_me:12504: checking for $ac_header" >&5
12505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12506if eval "test \"\${$as_ac_Header+set}\" = set"; then
12507 echo $ECHO_N "(cached) $ECHO_C" >&6
12508else
12509 cat >"conftest.$ac_ext" <<_ACEOF
12510#line 12510 "configure"
12511#include "confdefs.h"
12512#include <$ac_header>
12513_ACEOF
12514if { (eval echo "$as_me:12514: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12515 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12516 ac_status=$?
12517 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12518 rm -f conftest.er1
12519 cat conftest.err >&5
12520 echo "$as_me:12520: \$? = $ac_status" >&5
12521 (exit "$ac_status"); } >/dev/null; then
12522 if test -s conftest.err; then
12523 ac_cpp_err=$ac_c_preproc_warn_flag
12524 else
12525 ac_cpp_err=
12526 fi
12527else
12528 ac_cpp_err=yes
12529fi
12530if test -z "$ac_cpp_err"; then
12531 eval "$as_ac_Header=yes"
12532else
12533 echo "$as_me: failed program was:" >&5
12534 cat "conftest.$ac_ext" >&5
12535 eval "$as_ac_Header=no"
12536fi
12537rm -f conftest.err "conftest.$ac_ext"
12538fi
12539echo "$as_me:12539: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12540echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12541if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12542 cat >>confdefs.h <<EOF
12543#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12544EOF
12545
12546fi
12547done
12548
12549echo "$as_me:12549: checking if wchar.h can be used as is" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012550echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12551if test "${cf_cv_wchar_h_okay+set}" = set; then
12552 echo $ECHO_N "(cached) $ECHO_C" >&6
12553else
12554
micky3879b9f5e72025-07-08 18:04:53 -040012555cat >"conftest.$ac_ext" <<_ACEOF
12556#line 12556 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012557#include "confdefs.h"
12558
micky3879b9f5e72025-07-08 18:04:53 -040012559$ac_includes_default
12560#ifdef HAVE_WCHAR_H
Steve Kondikae271bc2015-11-15 02:50:53 +010012561#include <wchar.h>
micky3879b9f5e72025-07-08 18:04:53 -040012562#endif
12563#ifdef HAVE_WCTYPE_H
12564#include <wctype.h>
12565#endif
Steve Kondikae271bc2015-11-15 02:50:53 +010012566
12567int
micky3879b9f5e72025-07-08 18:04:53 -040012568main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012569{
12570
12571 wint_t foo = 0;
micky3879b9f5e72025-07-08 18:04:53 -040012572 int bar = iswpunct(foo); (void) bar
Steve Kondikae271bc2015-11-15 02:50:53 +010012573 ;
12574 return 0;
12575}
12576_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012577rm -f "conftest.$ac_objext"
12578if { (eval echo "$as_me:12578: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012579 (eval $ac_compile) 2>&5
12580 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012581 echo "$as_me:12581: \$? = $ac_status" >&5
12582 (exit "$ac_status"); } &&
12583 { ac_try='test -s "conftest.$ac_objext"'
12584 { (eval echo "$as_me:12584: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012585 (eval $ac_try) 2>&5
12586 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012587 echo "$as_me:12587: \$? = $ac_status" >&5
12588 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012589 cf_cv_wchar_h_okay=yes
12590else
12591 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012592cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012593cf_cv_wchar_h_okay=no
12594fi
micky3879b9f5e72025-07-08 18:04:53 -040012595rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010012596fi
micky3879b9f5e72025-07-08 18:04:53 -040012597echo "$as_me:12597: result: $cf_cv_wchar_h_okay" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012598echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12599
micky3879b9f5e72025-07-08 18:04:53 -040012600if test "$cf_cv_wchar_h_okay" = no
Steve Kondikae271bc2015-11-15 02:50:53 +010012601then
12602
micky3879b9f5e72025-07-08 18:04:53 -040012603echo "$as_me:12603: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012604echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040012605cat >"conftest.$ac_ext" <<_ACEOF
12606#line 12606 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012607#include "confdefs.h"
12608#include <sys/types.h>
12609
12610int
micky3879b9f5e72025-07-08 18:04:53 -040012611main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012612{
12613
12614#ifndef _XOPEN_SOURCE_EXTENDED
micky3879b9f5e72025-07-08 18:04:53 -040012615#error _XOPEN_SOURCE_EXTENDED is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010012616#endif
12617 ;
12618 return 0;
12619}
12620_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012621rm -f "conftest.$ac_objext"
12622if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012623 (eval $ac_compile) 2>&5
12624 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012625 echo "$as_me:12625: \$? = $ac_status" >&5
12626 (exit "$ac_status"); } &&
12627 { ac_try='test -s "conftest.$ac_objext"'
12628 { (eval echo "$as_me:12628: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012629 (eval $ac_try) 2>&5
12630 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012631 echo "$as_me:12631: \$? = $ac_status" >&5
12632 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012633 cf_result=no
12634else
12635 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012636cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012637cf_result=yes
12638fi
micky3879b9f5e72025-07-08 18:04:53 -040012639rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12640echo "$as_me:12640: result: $cf_result" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012641echo "${ECHO_T}$cf_result" >&6
12642
12643if test "$cf_result" = yes ; then
12644 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12645elif test "x" != "x" ; then
micky3879b9f5e72025-07-08 18:04:53 -040012646 echo "$as_me:12646: checking checking for compatible value versus " >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012647echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040012648 cat >"conftest.$ac_ext" <<_ACEOF
12649#line 12649 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012650#include "confdefs.h"
12651#include <sys/types.h>
12652
12653int
micky3879b9f5e72025-07-08 18:04:53 -040012654main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012655{
12656
12657#if _XOPEN_SOURCE_EXTENDED- < 0
micky3879b9f5e72025-07-08 18:04:53 -040012658#error _XOPEN_SOURCE_EXTENDED- is negative
Steve Kondikae271bc2015-11-15 02:50:53 +010012659#endif
12660 ;
12661 return 0;
12662}
12663_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012664rm -f "conftest.$ac_objext"
12665if { (eval echo "$as_me:12665: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012666 (eval $ac_compile) 2>&5
12667 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012668 echo "$as_me:12668: \$? = $ac_status" >&5
12669 (exit "$ac_status"); } &&
12670 { ac_try='test -s "conftest.$ac_objext"'
12671 { (eval echo "$as_me:12671: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012672 (eval $ac_try) 2>&5
12673 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012674 echo "$as_me:12674: \$? = $ac_status" >&5
12675 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012676 cf_result=yes
12677else
12678 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012679cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012680cf_result=no
12681fi
micky3879b9f5e72025-07-08 18:04:53 -040012682rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12683 echo "$as_me:12683: result: $cf_result" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012684echo "${ECHO_T}$cf_result" >&6
12685 if test "$cf_result" = no ; then
12686 # perhaps we can override it - try...
12687 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12688 fi
12689fi
12690
12691fi
12692
micky3879b9f5e72025-07-08 18:04:53 -040012693echo "$as_me:12693: checking if wcwidth agrees graphics are single-width" >&5
12694echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12695if test "${cf_cv_wcwidth_graphics+set}" = set; then
12696 echo $ECHO_N "(cached) $ECHO_C" >&6
12697else
12698
12699cat >conftest.in <<CF_EOF
12700- VT100 symbols
127010x250c upper left corner
127020x2514 lower left corner
127030x2510 upper right corner
127040x2518 lower right corner
127050x251c tee pointing left
127060x2524 tee pointing right
127070x2534 tee pointing up
127080x252c tee pointing down
127090x2500 horizontal line
127100x2502 vertical line
127110x253c large plus or crossover
127120x23ba scan line 1
127130x23bd scan line 9
127140x25c6 diamond
127150x2592 checker board (stipple)
127160x00b0 degree symbol
127170x00b1 plus/minus
127180x00b7 bullet
12719- Teletype 5410v1 symbols
127200x2190 arrow pointing left
127210x2192 arrow pointing right
127220x2193 arrow pointing down
127230x2191 arrow pointing up
127240x2592 board of squares
127250x2603 lantern symbol
127260x25ae solid square block
12727- these defaults were invented for ncurses
127280x23bb scan line 3
127290x23bc scan line 7
127300x2264 less-than-or-equal-to
127310x2265 greater-than-or-equal-to
127320x03c0 greek pi
127330x2260 not-equal
127340x00a3 pound-sterling symbol
12735- thick-line-drawing
127360x250f upper left corner
127370x2517 lower left corner
127380x2513 upper right corner
127390x251b lower right corner
127400x2523 tee pointing left
127410x252b tee pointing right
127420x253b tee pointing up
127430x2533 tee pointing down
127440x2501 horizontal line
127450x2503 vertical line
127460x254b large plus or crossover
12747- double-line-drawing
127480x2554 upper left corner
127490x255a lower left corner
127500x2557 upper right corner
127510x255d lower right corner
127520x2563 tee pointing left
127530x2560 tee pointing right
127540x2569 tee pointing up
127550x2566 tee pointing down
127560x2550 horizontal line
127570x2551 vertical line
127580x256c large plus or crossover
12759CF_EOF
12760if test "$cross_compiling" = yes; then
12761 cf_cv_wcwidth_graphics=unknown
12762else
12763 cat >"conftest.$ac_ext" <<_ACEOF
12764#line 12764 "configure"
12765#include "confdefs.h"
12766
12767$ac_includes_default
12768
12769#include <locale.h>
12770#include <wchar.h>
12771
12772#define MY_LEN 80
12773
12774int
12775main(void)
12776{
12777 FILE *fp;
12778 unsigned value;
12779 char buffer[MY_LEN + 1];
12780 char notes[MY_LEN + 1];
12781 int totals = 0;
12782 int passed = 0;
12783
12784 if (setlocale(LC_ALL, "en_US.UTF8") ||
12785 setlocale(LC_ALL, "en_US.UTF-8") ||
12786 setlocale(LC_ALL, "en_US.utf8") ||
12787 setlocale(LC_ALL, "en_US.utf-8")) {
12788 if ((fp = fopen("conftest.in", "r")) != 0) {
12789 while (fgets(buffer, MY_LEN, fp) != 0) {
12790 if (*buffer == '-') {
12791 fprintf(stderr, "\\t%s", buffer);
12792 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12793 ++totals;
12794 if (wcwidth((int)value) == 1)
12795 ++passed;
12796 fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer);
12797 } else {
12798 fprintf(stderr, "?\\t%s", buffer);
12799 }
12800 }
12801 }
12802 }
12803 fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12804 return (totals == passed) ? 0 : 1;
12805}
12806
12807_ACEOF
12808rm -f "conftest$ac_exeext"
12809if { (eval echo "$as_me:12809: \"$ac_link\"") >&5
12810 (eval $ac_link) 2>&5
12811 ac_status=$?
12812 echo "$as_me:12812: \$? = $ac_status" >&5
12813 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12814 { (eval echo "$as_me:12814: \"$ac_try\"") >&5
12815 (eval $ac_try) 2>&5
12816 ac_status=$?
12817 echo "$as_me:12817: \$? = $ac_status" >&5
12818 (exit "$ac_status"); }; }; then
12819 cf_cv_wcwidth_graphics=yes
12820else
12821 echo "$as_me: program exited with status $ac_status" >&5
12822echo "$as_me: failed program was:" >&5
12823cat "conftest.$ac_ext" >&5
12824cf_cv_wcwidth_graphics=no
12825fi
12826rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12827fi
12828
12829fi
12830echo "$as_me:12830: result: $cf_cv_wcwidth_graphics" >&5
12831echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12832
12833 test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12834
Steve Kondikae271bc2015-11-15 02:50:53 +010012835 # with_overwrite=no
12836 NCURSES_CH_T=cchar_t
12837
micky3879b9f5e72025-07-08 18:04:53 -040012838for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
Steve Kondikae271bc2015-11-15 02:50:53 +010012839do
12840as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040012841echo "$as_me:12841: checking for $ac_func" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012842echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12843if eval "test \"\${$as_ac_var+set}\" = set"; then
12844 echo $ECHO_N "(cached) $ECHO_C" >&6
12845else
micky3879b9f5e72025-07-08 18:04:53 -040012846 cat >"conftest.$ac_ext" <<_ACEOF
12847#line 12847 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012848#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040012849#define $ac_func autoconf_temporary
12850#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12851#undef $ac_func
12852
Steve Kondikae271bc2015-11-15 02:50:53 +010012853#ifdef __cplusplus
12854extern "C"
12855#endif
micky3879b9f5e72025-07-08 18:04:53 -040012856
Steve Kondikae271bc2015-11-15 02:50:53 +010012857/* We use char because int might match the return type of a gcc2
12858 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040012859char $ac_func (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010012860
12861int
micky3879b9f5e72025-07-08 18:04:53 -040012862main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012863{
micky3879b9f5e72025-07-08 18:04:53 -040012864
12865/* The GNU C library defines stubs for functions which it implements
Steve Kondikae271bc2015-11-15 02:50:53 +010012866 to always fail with ENOSYS. Some functions are actually named
12867 something starting with __ and the normal name is an alias. */
12868#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
micky3879b9f5e72025-07-08 18:04:53 -040012869#error found stub for $ac_func
Steve Kondikae271bc2015-11-15 02:50:53 +010012870#endif
12871
micky3879b9f5e72025-07-08 18:04:53 -040012872 return $ac_func ();
Steve Kondikae271bc2015-11-15 02:50:53 +010012873 ;
12874 return 0;
12875}
12876_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012877rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12878if { (eval echo "$as_me:12878: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012879 (eval $ac_link) 2>&5
12880 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012881 echo "$as_me:12881: \$? = $ac_status" >&5
12882 (exit "$ac_status"); } &&
12883 { ac_try='test -s "conftest$ac_exeext"'
12884 { (eval echo "$as_me:12884: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012885 (eval $ac_try) 2>&5
12886 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012887 echo "$as_me:12887: \$? = $ac_status" >&5
12888 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012889 eval "$as_ac_var=yes"
12890else
12891 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012892cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012893eval "$as_ac_var=no"
12894fi
micky3879b9f5e72025-07-08 18:04:53 -040012895rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010012896fi
micky3879b9f5e72025-07-08 18:04:53 -040012897echo "$as_me:12897: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12898echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12899if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012900 cat >>confdefs.h <<EOF
12901#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12902EOF
12903
12904fi
12905done
12906
12907 if test "x$ac_cv_func_putwc" != xyes ; then
12908
micky3879b9f5e72025-07-08 18:04:53 -040012909for ac_header in wchar.h
12910do
12911as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12912echo "$as_me:12912: checking for $ac_header" >&5
12913echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12914if eval "test \"\${$as_ac_Header+set}\" = set"; then
12915 echo $ECHO_N "(cached) $ECHO_C" >&6
12916else
12917 cat >"conftest.$ac_ext" <<_ACEOF
12918#line 12918 "configure"
12919#include "confdefs.h"
12920#include <$ac_header>
12921_ACEOF
12922if { (eval echo "$as_me:12922: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12923 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12924 ac_status=$?
12925 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12926 rm -f conftest.er1
12927 cat conftest.err >&5
12928 echo "$as_me:12928: \$? = $ac_status" >&5
12929 (exit "$ac_status"); } >/dev/null; then
12930 if test -s conftest.err; then
12931 ac_cpp_err=$ac_c_preproc_warn_flag
12932 else
12933 ac_cpp_err=
12934 fi
12935else
12936 ac_cpp_err=yes
12937fi
12938if test -z "$ac_cpp_err"; then
12939 eval "$as_ac_Header=yes"
12940else
12941 echo "$as_me: failed program was:" >&5
12942 cat "conftest.$ac_ext" >&5
12943 eval "$as_ac_Header=no"
12944fi
12945rm -f conftest.err "conftest.$ac_ext"
12946fi
12947echo "$as_me:12947: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12948echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12949if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12950 cat >>confdefs.h <<EOF
12951#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12952EOF
12953
12954fi
12955done
12956
12957echo "$as_me:12957: checking for multibyte character support" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012958echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12959if test "${cf_cv_utf8_lib+set}" = set; then
12960 echo $ECHO_N "(cached) $ECHO_C" >&6
12961else
12962
12963 cf_save_LIBS="$LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040012964 cat >"conftest.$ac_ext" <<_ACEOF
12965#line 12965 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010012966#include "confdefs.h"
12967
micky3879b9f5e72025-07-08 18:04:53 -040012968$ac_includes_default
12969#ifdef HAVE_WCHAR_H
12970#include <wchar.h>
12971#endif
12972
Steve Kondikae271bc2015-11-15 02:50:53 +010012973int
micky3879b9f5e72025-07-08 18:04:53 -040012974main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010012975{
12976putwc(0,0);
12977 ;
12978 return 0;
12979}
12980_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040012981rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12982if { (eval echo "$as_me:12982: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012983 (eval $ac_link) 2>&5
12984 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012985 echo "$as_me:12985: \$? = $ac_status" >&5
12986 (exit "$ac_status"); } &&
12987 { ac_try='test -s "conftest$ac_exeext"'
12988 { (eval echo "$as_me:12988: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012989 (eval $ac_try) 2>&5
12990 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040012991 echo "$as_me:12991: \$? = $ac_status" >&5
12992 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010012993 cf_cv_utf8_lib=yes
12994else
12995 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040012996cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010012997
12998# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12999# will be set on completion of the AC_TRY_LINK below.
13000cf_cv_header_path_utf8=
13001cf_cv_library_path_utf8=
13002
micky3879b9f5e72025-07-08 18:04:53 -040013003echo "${as_me:-configure}:13003: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013004
13005cf_save_LIBS="$LIBS"
13006
micky3879b9f5e72025-07-08 18:04:53 -040013007cat >"conftest.$ac_ext" <<_ACEOF
13008#line 13008 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013009#include "confdefs.h"
13010
13011#include <libutf8.h>
13012int
micky3879b9f5e72025-07-08 18:04:53 -040013013main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013014{
13015putwc(0,0);
13016 ;
13017 return 0;
13018}
13019_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013020rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13021if { (eval echo "$as_me:13021: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013022 (eval $ac_link) 2>&5
13023 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013024 echo "$as_me:13024: \$? = $ac_status" >&5
13025 (exit "$ac_status"); } &&
13026 { ac_try='test -s "conftest$ac_exeext"'
13027 { (eval echo "$as_me:13027: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013028 (eval $ac_try) 2>&5
13029 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013032
13033 cf_cv_find_linkage_utf8=yes
13034 cf_cv_header_path_utf8=/usr/include
13035 cf_cv_library_path_utf8=/usr/lib
13036
13037else
13038 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013039cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013040
13041LIBS="-lutf8 $cf_save_LIBS"
13042
micky3879b9f5e72025-07-08 18:04:53 -040013043cat >"conftest.$ac_ext" <<_ACEOF
13044#line 13044 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013045#include "confdefs.h"
13046
13047#include <libutf8.h>
13048int
micky3879b9f5e72025-07-08 18:04:53 -040013049main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013050{
13051putwc(0,0);
13052 ;
13053 return 0;
13054}
13055_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013056rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13057if { (eval echo "$as_me:13057: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013058 (eval $ac_link) 2>&5
13059 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013060 echo "$as_me:13060: \$? = $ac_status" >&5
13061 (exit "$ac_status"); } &&
13062 { ac_try='test -s "conftest$ac_exeext"'
13063 { (eval echo "$as_me:13063: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013064 (eval $ac_try) 2>&5
13065 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013066 echo "$as_me:13066: \$? = $ac_status" >&5
13067 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013068
13069 cf_cv_find_linkage_utf8=yes
13070 cf_cv_header_path_utf8=/usr/include
13071 cf_cv_library_path_utf8=/usr/lib
13072 cf_cv_library_file_utf8="-lutf8"
13073
13074else
13075 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013076cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013077
13078 cf_cv_find_linkage_utf8=no
13079 LIBS="$cf_save_LIBS"
13080
13081 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
13082
micky3879b9f5e72025-07-08 18:04:53 -040013083echo "${as_me:-configure}:13083: testing find linkage for utf8 library ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013084
micky3879b9f5e72025-07-08 18:04:53 -040013085echo "${as_me:-configure}:13085: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013086
13087 cf_save_CPPFLAGS="$CPPFLAGS"
13088 cf_test_CPPFLAGS="$CPPFLAGS"
13089
13090cf_search=
13091
13092# collect the current set of include-directories from compiler flags
13093cf_header_path_list=""
13094if test -n "${CFLAGS}${CPPFLAGS}" ; then
13095 for cf_header_path in $CPPFLAGS $CFLAGS
13096 do
micky3879b9f5e72025-07-08 18:04:53 -040013097 case "$cf_header_path" in
Steve Kondikae271bc2015-11-15 02:50:53 +010013098 (-I*)
13099 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13100
13101test "x$cf_header_path" != "xNONE" && \
13102test -d "$cf_header_path" && \
13103 {
13104 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
micky3879b9f5e72025-07-08 18:04:53 -040013105 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
13106 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
13107 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
13108 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
13109 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013110}
13111
13112 cf_header_path_list="$cf_header_path_list $cf_search"
13113 ;;
13114 esac
13115 done
13116fi
13117
13118# add the variations for the package we are looking for
13119
13120cf_search=
13121
13122test "x$prefix" != "xNONE" && \
13123test -d "$prefix" && \
13124 {
13125 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
micky3879b9f5e72025-07-08 18:04:53 -040013126 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
13127 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
13128 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
13129 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
13130 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013131}
13132
13133for cf_subdir_prefix in \
13134 /usr \
13135 /usr/local \
13136 /usr/pkg \
13137 /opt \
13138 /opt/local \
13139 $HOME
13140do
13141
13142test "x$cf_subdir_prefix" != "x$prefix" && \
13143test -d "$cf_subdir_prefix" && \
micky3879b9f5e72025-07-08 18:04:53 -040013144{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
Steve Kondikae271bc2015-11-15 02:50:53 +010013145 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
micky3879b9f5e72025-07-08 18:04:53 -040013146 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
13147 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13148 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13149 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13150 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013151}
13152
13153done
13154
13155test "$includedir" != NONE && \
13156test "$includedir" != "/usr/include" && \
13157test -d "$includedir" && {
micky3879b9f5e72025-07-08 18:04:53 -040013158 test -d "$includedir" && cf_search="$cf_search $includedir"
13159 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013160}
13161
13162test "$oldincludedir" != NONE && \
13163test "$oldincludedir" != "/usr/include" && \
13164test -d "$oldincludedir" && {
micky3879b9f5e72025-07-08 18:04:53 -040013165 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
13166 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013167}
13168
13169cf_search="$cf_search $cf_header_path_list"
13170
13171 for cf_cv_header_path_utf8 in $cf_search
13172 do
micky3879b9f5e72025-07-08 18:04:53 -040013173 if test -d "$cf_cv_header_path_utf8" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013174 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
13175
micky3879b9f5e72025-07-08 18:04:53 -040013176echo "${as_me:-configure}:13176: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013177
micky3879b9f5e72025-07-08 18:04:53 -040013178 CPPFLAGS="$cf_save_CPPFLAGS"
13179
13180 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13181 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13182
13183 cat >"conftest.$ac_ext" <<_ACEOF
13184#line 13184 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013185#include "confdefs.h"
13186
13187#include <libutf8.h>
13188int
micky3879b9f5e72025-07-08 18:04:53 -040013189main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013190{
13191putwc(0,0);
13192 ;
13193 return 0;
13194}
13195_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013196rm -f "conftest.$ac_objext"
13197if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013198 (eval $ac_compile) 2>&5
13199 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013200 echo "$as_me:13200: \$? = $ac_status" >&5
13201 (exit "$ac_status"); } &&
13202 { ac_try='test -s "conftest.$ac_objext"'
13203 { (eval echo "$as_me:13203: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013204 (eval $ac_try) 2>&5
13205 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013206 echo "$as_me:13206: \$? = $ac_status" >&5
13207 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013208
13209 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13210
micky3879b9f5e72025-07-08 18:04:53 -040013211echo "${as_me:-configure}:13211: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013212
13213 cf_cv_find_linkage_utf8=maybe
13214 cf_test_CPPFLAGS="$CPPFLAGS"
13215 break
13216else
13217 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013218cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013219
13220 CPPFLAGS="$cf_save_CPPFLAGS"
13221
13222fi
micky3879b9f5e72025-07-08 18:04:53 -040013223rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013224 fi
13225 done
13226
13227 if test "$cf_cv_find_linkage_utf8" = maybe ; then
13228
micky3879b9f5e72025-07-08 18:04:53 -040013229echo "${as_me:-configure}:13229: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013230
13231 cf_save_LIBS="$LIBS"
13232 cf_save_LDFLAGS="$LDFLAGS"
13233
13234 if test "$cf_cv_find_linkage_utf8" != yes ; then
13235
13236cf_search=
13237cf_library_path_list=""
13238if test -n "${LDFLAGS}${LIBS}" ; then
13239 for cf_library_path in $LDFLAGS $LIBS
13240 do
micky3879b9f5e72025-07-08 18:04:53 -040013241 case "$cf_library_path" in
Steve Kondikae271bc2015-11-15 02:50:53 +010013242 (-L*)
13243 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13244
13245test "x$cf_library_path" != "xNONE" && \
13246test -d "$cf_library_path" && \
13247 {
13248 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
micky3879b9f5e72025-07-08 18:04:53 -040013249 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
13250 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
13251 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13252 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
13253 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013254}
13255
13256 cf_library_path_list="$cf_library_path_list $cf_search"
13257 ;;
13258 esac
13259 done
13260fi
13261
13262cf_search=
13263
13264test "x$prefix" != "xNONE" && \
13265test -d "$prefix" && \
13266 {
13267 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
micky3879b9f5e72025-07-08 18:04:53 -040013268 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
13269 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
13270 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
13271 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
13272 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013273}
13274
13275for cf_subdir_prefix in \
13276 /usr \
13277 /usr/local \
13278 /usr/pkg \
13279 /opt \
13280 /opt/local \
13281 $HOME
13282do
13283
13284test "x$cf_subdir_prefix" != "x$prefix" && \
13285test -d "$cf_subdir_prefix" && \
micky3879b9f5e72025-07-08 18:04:53 -040013286{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
Steve Kondikae271bc2015-11-15 02:50:53 +010013287 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
micky3879b9f5e72025-07-08 18:04:53 -040013288 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
13289 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13290 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13291 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13292 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
Steve Kondikae271bc2015-11-15 02:50:53 +010013293}
13294
13295done
13296
13297cf_search="$cf_library_path_list $cf_search"
13298
13299 for cf_cv_library_path_utf8 in $cf_search
13300 do
micky3879b9f5e72025-07-08 18:04:53 -040013301 if test -d "$cf_cv_library_path_utf8" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013302 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
13303
micky3879b9f5e72025-07-08 18:04:53 -040013304echo "${as_me:-configure}:13304: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013305
13306 CPPFLAGS="$cf_test_CPPFLAGS"
13307 LIBS="-lutf8 $cf_save_LIBS"
13308 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
micky3879b9f5e72025-07-08 18:04:53 -040013309 cat >"conftest.$ac_ext" <<_ACEOF
13310#line 13310 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013311#include "confdefs.h"
13312
13313#include <libutf8.h>
13314int
micky3879b9f5e72025-07-08 18:04:53 -040013315main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013316{
13317putwc(0,0);
13318 ;
13319 return 0;
13320}
13321_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013322rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13323if { (eval echo "$as_me:13323: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013324 (eval $ac_link) 2>&5
13325 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013326 echo "$as_me:13326: \$? = $ac_status" >&5
13327 (exit "$ac_status"); } &&
13328 { ac_try='test -s "conftest$ac_exeext"'
13329 { (eval echo "$as_me:13329: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013330 (eval $ac_try) 2>&5
13331 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013332 echo "$as_me:13332: \$? = $ac_status" >&5
13333 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013334
13335 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13336
micky3879b9f5e72025-07-08 18:04:53 -040013337echo "${as_me:-configure}:13337: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013338
13339 cf_cv_find_linkage_utf8=yes
13340 cf_cv_library_file_utf8="-lutf8"
13341 break
13342else
13343 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013344cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013345
13346 CPPFLAGS="$cf_save_CPPFLAGS"
13347 LIBS="$cf_save_LIBS"
13348 LDFLAGS="$cf_save_LDFLAGS"
13349
13350fi
micky3879b9f5e72025-07-08 18:04:53 -040013351rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013352 fi
13353 done
13354 CPPFLAGS="$cf_save_CPPFLAGS"
13355 LDFLAGS="$cf_save_LDFLAGS"
13356 fi
13357
13358 else
13359 cf_cv_find_linkage_utf8=no
13360 fi
13361
13362fi
micky3879b9f5e72025-07-08 18:04:53 -040013363rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013364
13365fi
micky3879b9f5e72025-07-08 18:04:53 -040013366rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013367
13368LIBS="$cf_save_LIBS"
13369
13370if test "$cf_cv_find_linkage_utf8" = yes ; then
13371cf_cv_utf8_lib=add-on
13372else
13373cf_cv_utf8_lib=no
13374fi
13375
13376fi
micky3879b9f5e72025-07-08 18:04:53 -040013377rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013378fi
micky3879b9f5e72025-07-08 18:04:53 -040013379echo "$as_me:13379: result: $cf_cv_utf8_lib" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013380echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13381
13382# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13383# ncurses/ncursesw:
13384if test "$cf_cv_utf8_lib" = "add-on" ; then
13385
13386cat >>confdefs.h <<\EOF
13387#define HAVE_LIBUTF8_H 1
13388EOF
13389
13390if test -n "$cf_cv_header_path_utf8" ; then
13391 for cf_add_incdir in $cf_cv_header_path_utf8
13392 do
micky3879b9f5e72025-07-08 18:04:53 -040013393 while test "$cf_add_incdir" != /usr/include
Steve Kondikae271bc2015-11-15 02:50:53 +010013394 do
micky3879b9f5e72025-07-08 18:04:53 -040013395 if test -d "$cf_add_incdir"
Steve Kondikae271bc2015-11-15 02:50:53 +010013396 then
13397 cf_have_incdir=no
13398 if test -n "$CFLAGS$CPPFLAGS" ; then
13399 # a loop is needed to ensure we can add subdirs of existing dirs
13400 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13401 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13402 cf_have_incdir=yes; break
13403 fi
13404 done
13405 fi
13406
13407 if test "$cf_have_incdir" = no ; then
13408 if test "$cf_add_incdir" = /usr/local/include ; then
13409 if test "$GCC" = yes
13410 then
13411 cf_save_CPPFLAGS=$CPPFLAGS
micky3879b9f5e72025-07-08 18:04:53 -040013412
13413 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13414 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13415
13416 cat >"conftest.$ac_ext" <<_ACEOF
13417#line 13417 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013418#include "confdefs.h"
13419#include <stdio.h>
13420int
micky3879b9f5e72025-07-08 18:04:53 -040013421main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013422{
13423printf("Hello")
13424 ;
13425 return 0;
13426}
13427_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013428rm -f "conftest.$ac_objext"
13429if { (eval echo "$as_me:13429: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013430 (eval $ac_compile) 2>&5
13431 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013432 echo "$as_me:13432: \$? = $ac_status" >&5
13433 (exit "$ac_status"); } &&
13434 { ac_try='test -s "conftest.$ac_objext"'
13435 { (eval echo "$as_me:13435: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013436 (eval $ac_try) 2>&5
13437 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013438 echo "$as_me:13438: \$? = $ac_status" >&5
13439 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013440 :
13441else
13442 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013443cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013444cf_have_incdir=yes
13445fi
micky3879b9f5e72025-07-08 18:04:53 -040013446rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013447 CPPFLAGS=$cf_save_CPPFLAGS
13448 fi
13449 fi
13450 fi
13451
13452 if test "$cf_have_incdir" = no ; then
13453 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
13454
micky3879b9f5e72025-07-08 18:04:53 -040013455echo "${as_me:-configure}:13455: testing adding $cf_add_incdir to include-path ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013456
13457 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13458
micky3879b9f5e72025-07-08 18:04:53 -040013459 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
Steve Kondikae271bc2015-11-15 02:50:53 +010013460 test "$cf_top_incdir" = "$cf_add_incdir" && break
13461 cf_add_incdir="$cf_top_incdir"
13462 else
13463 break
13464 fi
13465 else
13466 break
13467 fi
13468 done
13469 done
13470fi
13471
13472if test -n "$cf_cv_library_path_utf8" ; then
13473 for cf_add_libdir in $cf_cv_library_path_utf8
13474 do
micky3879b9f5e72025-07-08 18:04:53 -040013475 if test "$cf_add_libdir" = /usr/lib ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013476 :
micky3879b9f5e72025-07-08 18:04:53 -040013477 elif test -d "$cf_add_libdir"
Steve Kondikae271bc2015-11-15 02:50:53 +010013478 then
13479 cf_have_libdir=no
13480 if test -n "$LDFLAGS$LIBS" ; then
13481 # a loop is needed to ensure we can add subdirs of existing dirs
13482 for cf_test_libdir in $LDFLAGS $LIBS ; do
13483 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13484 cf_have_libdir=yes; break
13485 fi
13486 done
13487 fi
13488 if test "$cf_have_libdir" = no ; then
13489 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
13490
micky3879b9f5e72025-07-08 18:04:53 -040013491echo "${as_me:-configure}:13491: testing adding $cf_add_libdir to library-path ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013492
13493 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13494 fi
13495 fi
13496 done
13497fi
13498
micky3879b9f5e72025-07-08 18:04:53 -040013499cf_add_libs="$LIBS"
13500# reverse order
13501cf_add_0lib=
13502for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13503# filter duplicates
13504for cf_add_1lib in $cf_add_0lib; do
13505 for cf_add_2lib in $cf_add_libs; do
13506 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013507 cf_add_1lib=
13508 break
13509 fi
13510 done
micky3879b9f5e72025-07-08 18:04:53 -040013511 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010013512done
13513LIBS="$cf_add_libs"
13514
13515fi
13516
13517 if test "$cf_cv_utf8_lib" != no ; then
13518 NCURSES_LIBUTF8=1
13519 fi
13520 fi
13521
13522# This is needed on Tru64 5.0 to declare mbstate_t
micky3879b9f5e72025-07-08 18:04:53 -040013523echo "$as_me:13523: checking if we must include wchar.h to declare mbstate_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013524echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13525if test "${cf_cv_mbstate_t+set}" = set; then
13526 echo $ECHO_N "(cached) $ECHO_C" >&6
13527else
13528
micky3879b9f5e72025-07-08 18:04:53 -040013529cat >"conftest.$ac_ext" <<_ACEOF
13530#line 13530 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013531#include "confdefs.h"
13532
13533#include <stdlib.h>
13534#include <stdarg.h>
13535#include <stdio.h>
13536#ifdef HAVE_LIBUTF8_H
13537#include <libutf8.h>
13538#endif
13539int
micky3879b9f5e72025-07-08 18:04:53 -040013540main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013541{
micky3879b9f5e72025-07-08 18:04:53 -040013542mbstate_t state; (void)state
Steve Kondikae271bc2015-11-15 02:50:53 +010013543 ;
13544 return 0;
13545}
13546_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013547rm -f "conftest.$ac_objext"
13548if { (eval echo "$as_me:13548: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013549 (eval $ac_compile) 2>&5
13550 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013551 echo "$as_me:13551: \$? = $ac_status" >&5
13552 (exit "$ac_status"); } &&
13553 { ac_try='test -s "conftest.$ac_objext"'
13554 { (eval echo "$as_me:13554: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013555 (eval $ac_try) 2>&5
13556 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013557 echo "$as_me:13557: \$? = $ac_status" >&5
13558 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013559 cf_cv_mbstate_t=no
13560else
13561 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013562cat "conftest.$ac_ext" >&5
13563cat >"conftest.$ac_ext" <<_ACEOF
13564#line 13564 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013565#include "confdefs.h"
13566
13567#include <stdlib.h>
13568#include <stdarg.h>
13569#include <stdio.h>
13570#include <wchar.h>
13571#ifdef HAVE_LIBUTF8_H
13572#include <libutf8.h>
13573#endif
13574int
micky3879b9f5e72025-07-08 18:04:53 -040013575main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013576{
micky3879b9f5e72025-07-08 18:04:53 -040013577mbstate_t value; (void) value
Steve Kondikae271bc2015-11-15 02:50:53 +010013578 ;
13579 return 0;
13580}
13581_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013582rm -f "conftest.$ac_objext"
13583if { (eval echo "$as_me:13583: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013584 (eval $ac_compile) 2>&5
13585 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013586 echo "$as_me:13586: \$? = $ac_status" >&5
13587 (exit "$ac_status"); } &&
13588 { ac_try='test -s "conftest.$ac_objext"'
13589 { (eval echo "$as_me:13589: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013590 (eval $ac_try) 2>&5
13591 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013592 echo "$as_me:13592: \$? = $ac_status" >&5
13593 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013594 cf_cv_mbstate_t=yes
13595else
13596 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013597cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013598cf_cv_mbstate_t=unknown
13599fi
micky3879b9f5e72025-07-08 18:04:53 -040013600rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013601fi
micky3879b9f5e72025-07-08 18:04:53 -040013602rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013603fi
micky3879b9f5e72025-07-08 18:04:53 -040013604echo "$as_me:13604: result: $cf_cv_mbstate_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013605echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13606
13607if test "$cf_cv_mbstate_t" = yes ; then
13608
13609cat >>confdefs.h <<\EOF
13610#define NEED_WCHAR_H 1
13611EOF
13612
13613 NEED_WCHAR_H=1
13614fi
13615
13616# if we do not find mbstate_t in either place, use substitution to provide a fallback.
13617if test "$cf_cv_mbstate_t" = unknown ; then
13618 NCURSES_MBSTATE_T=1
13619fi
13620
13621# This is needed on Tru64 5.0 to declare wchar_t
micky3879b9f5e72025-07-08 18:04:53 -040013622echo "$as_me:13622: checking if we must include wchar.h to declare wchar_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013623echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13624if test "${cf_cv_wchar_t+set}" = set; then
13625 echo $ECHO_N "(cached) $ECHO_C" >&6
13626else
13627
micky3879b9f5e72025-07-08 18:04:53 -040013628cat >"conftest.$ac_ext" <<_ACEOF
13629#line 13629 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013630#include "confdefs.h"
13631
13632#include <stdlib.h>
13633#include <stdarg.h>
13634#include <stdio.h>
13635#ifdef HAVE_LIBUTF8_H
13636#include <libutf8.h>
13637#endif
13638int
micky3879b9f5e72025-07-08 18:04:53 -040013639main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013640{
micky3879b9f5e72025-07-08 18:04:53 -040013641wchar_t state; (void)state
Steve Kondikae271bc2015-11-15 02:50:53 +010013642 ;
13643 return 0;
13644}
13645_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013646rm -f "conftest.$ac_objext"
13647if { (eval echo "$as_me:13647: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013648 (eval $ac_compile) 2>&5
13649 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013650 echo "$as_me:13650: \$? = $ac_status" >&5
13651 (exit "$ac_status"); } &&
13652 { ac_try='test -s "conftest.$ac_objext"'
13653 { (eval echo "$as_me:13653: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013654 (eval $ac_try) 2>&5
13655 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013656 echo "$as_me:13656: \$? = $ac_status" >&5
13657 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013658 cf_cv_wchar_t=no
13659else
13660 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013661cat "conftest.$ac_ext" >&5
13662cat >"conftest.$ac_ext" <<_ACEOF
13663#line 13663 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013664#include "confdefs.h"
13665
13666#include <stdlib.h>
13667#include <stdarg.h>
13668#include <stdio.h>
13669#include <wchar.h>
13670#ifdef HAVE_LIBUTF8_H
13671#include <libutf8.h>
13672#endif
13673int
micky3879b9f5e72025-07-08 18:04:53 -040013674main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013675{
micky3879b9f5e72025-07-08 18:04:53 -040013676wchar_t value; (void) value
Steve Kondikae271bc2015-11-15 02:50:53 +010013677 ;
13678 return 0;
13679}
13680_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013681rm -f "conftest.$ac_objext"
13682if { (eval echo "$as_me:13682: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013683 (eval $ac_compile) 2>&5
13684 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013685 echo "$as_me:13685: \$? = $ac_status" >&5
13686 (exit "$ac_status"); } &&
13687 { ac_try='test -s "conftest.$ac_objext"'
13688 { (eval echo "$as_me:13688: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013689 (eval $ac_try) 2>&5
13690 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013691 echo "$as_me:13691: \$? = $ac_status" >&5
13692 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013693 cf_cv_wchar_t=yes
13694else
13695 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013696cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013697cf_cv_wchar_t=unknown
13698fi
micky3879b9f5e72025-07-08 18:04:53 -040013699rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013700fi
micky3879b9f5e72025-07-08 18:04:53 -040013701rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013702fi
micky3879b9f5e72025-07-08 18:04:53 -040013703echo "$as_me:13703: result: $cf_cv_wchar_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013704echo "${ECHO_T}$cf_cv_wchar_t" >&6
13705
13706if test "$cf_cv_wchar_t" = yes ; then
13707
13708cat >>confdefs.h <<\EOF
13709#define NEED_WCHAR_H 1
13710EOF
13711
13712 NEED_WCHAR_H=1
13713fi
13714
13715# if we do not find wchar_t in either place, use substitution to provide a fallback.
13716if test "$cf_cv_wchar_t" = unknown ; then
13717 NCURSES_WCHAR_T=1
13718fi
13719
13720# if we find wchar_t in either place, use substitution to provide a fallback.
13721if test "$cf_cv_wchar_t" != unknown ; then
13722 NCURSES_OK_WCHAR_T=1
13723fi
13724
13725# This is needed on Tru64 5.0 to declare wint_t
micky3879b9f5e72025-07-08 18:04:53 -040013726echo "$as_me:13726: checking if we must include wchar.h to declare wint_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013727echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13728if test "${cf_cv_wint_t+set}" = set; then
13729 echo $ECHO_N "(cached) $ECHO_C" >&6
13730else
13731
micky3879b9f5e72025-07-08 18:04:53 -040013732cat >"conftest.$ac_ext" <<_ACEOF
13733#line 13733 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013734#include "confdefs.h"
13735
13736#include <stdlib.h>
13737#include <stdarg.h>
13738#include <stdio.h>
13739#ifdef HAVE_LIBUTF8_H
13740#include <libutf8.h>
13741#endif
13742int
micky3879b9f5e72025-07-08 18:04:53 -040013743main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013744{
micky3879b9f5e72025-07-08 18:04:53 -040013745wint_t state; (void)state
Steve Kondikae271bc2015-11-15 02:50:53 +010013746 ;
13747 return 0;
13748}
13749_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013750rm -f "conftest.$ac_objext"
13751if { (eval echo "$as_me:13751: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013752 (eval $ac_compile) 2>&5
13753 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013754 echo "$as_me:13754: \$? = $ac_status" >&5
13755 (exit "$ac_status"); } &&
13756 { ac_try='test -s "conftest.$ac_objext"'
13757 { (eval echo "$as_me:13757: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013758 (eval $ac_try) 2>&5
13759 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013760 echo "$as_me:13760: \$? = $ac_status" >&5
13761 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013762 cf_cv_wint_t=no
13763else
13764 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013765cat "conftest.$ac_ext" >&5
13766cat >"conftest.$ac_ext" <<_ACEOF
13767#line 13767 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013768#include "confdefs.h"
13769
13770#include <stdlib.h>
13771#include <stdarg.h>
13772#include <stdio.h>
13773#include <wchar.h>
13774#ifdef HAVE_LIBUTF8_H
13775#include <libutf8.h>
13776#endif
13777int
micky3879b9f5e72025-07-08 18:04:53 -040013778main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013779{
micky3879b9f5e72025-07-08 18:04:53 -040013780wint_t value; (void) value
Steve Kondikae271bc2015-11-15 02:50:53 +010013781 ;
13782 return 0;
13783}
13784_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013785rm -f "conftest.$ac_objext"
13786if { (eval echo "$as_me:13786: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013787 (eval $ac_compile) 2>&5
13788 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013789 echo "$as_me:13789: \$? = $ac_status" >&5
13790 (exit "$ac_status"); } &&
13791 { ac_try='test -s "conftest.$ac_objext"'
13792 { (eval echo "$as_me:13792: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013793 (eval $ac_try) 2>&5
13794 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013795 echo "$as_me:13795: \$? = $ac_status" >&5
13796 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013797 cf_cv_wint_t=yes
13798else
13799 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013800cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013801cf_cv_wint_t=unknown
13802fi
micky3879b9f5e72025-07-08 18:04:53 -040013803rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013804fi
micky3879b9f5e72025-07-08 18:04:53 -040013805rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013806fi
micky3879b9f5e72025-07-08 18:04:53 -040013807echo "$as_me:13807: result: $cf_cv_wint_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013808echo "${ECHO_T}$cf_cv_wint_t" >&6
13809
13810if test "$cf_cv_wint_t" = yes ; then
13811
13812cat >>confdefs.h <<\EOF
13813#define NEED_WCHAR_H 1
13814EOF
13815
13816 NEED_WCHAR_H=1
13817fi
13818
13819# if we do not find wint_t in either place, use substitution to provide a fallback.
13820if test "$cf_cv_wint_t" = unknown ; then
13821 NCURSES_WINT_T=1
13822fi
13823
13824# if we find wint_t in either place, use substitution to provide a fallback.
13825if test "$cf_cv_wint_t" != unknown ; then
13826 NCURSES_OK_WINT_T=1
13827fi
13828
13829 if test "$NCURSES_MBSTATE_T" != 0; then
13830
13831cat >>confdefs.h <<\EOF
13832#define NEED_MBSTATE_T_DEF 1
13833EOF
13834
13835 fi
13836fi
13837
13838### use option --disable-lp64 to allow long chtype
micky3879b9f5e72025-07-08 18:04:53 -040013839echo "$as_me:13839: checking whether to enable _LP64 definition in curses.h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013840echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13841
13842# Check whether --enable-lp64 or --disable-lp64 was given.
13843if test "${enable_lp64+set}" = set; then
13844 enableval="$enable_lp64"
13845 with_lp64=$enableval
13846else
13847 with_lp64=$cf_dft_with_lp64
13848fi;
micky3879b9f5e72025-07-08 18:04:53 -040013849echo "$as_me:13849: result: $with_lp64" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013850echo "${ECHO_T}$with_lp64" >&6
13851
13852if test "x$with_lp64" = xyes ; then
13853 cf_cv_enable_lp64=1
13854else
13855 cf_cv_enable_lp64=0
13856fi
13857
13858# Check whether --enable-largefile or --disable-largefile was given.
13859if test "${enable_largefile+set}" = set; then
13860 enableval="$enable_largefile"
13861
13862fi;
13863if test "$enable_largefile" != no; then
13864
micky3879b9f5e72025-07-08 18:04:53 -040013865 echo "$as_me:13865: checking for special C compiler options needed for large files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013866echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13867if test "${ac_cv_sys_largefile_CC+set}" = set; then
13868 echo $ECHO_N "(cached) $ECHO_C" >&6
13869else
13870 ac_cv_sys_largefile_CC=no
13871 if test "$GCC" != yes; then
13872 ac_save_CC=$CC
13873 while :; do
13874 # IRIX 6.2 and later do not support large files by default,
13875 # so use the C compiler's -n32 option if that helps.
micky3879b9f5e72025-07-08 18:04:53 -040013876 cat >"conftest.$ac_ext" <<_ACEOF
13877#line 13877 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013878#include "confdefs.h"
13879#include <sys/types.h>
13880 /* Check that off_t can represent 2**63 - 1 correctly.
13881 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13882 since some C++ compilers masquerading as C compilers
13883 incorrectly reject 9223372036854775807. */
13884#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13885 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13886 && LARGE_OFF_T % 2147483647 == 1)
13887 ? 1 : -1];
13888int
micky3879b9f5e72025-07-08 18:04:53 -040013889main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013890{
13891
13892 ;
13893 return 0;
13894}
13895_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013896 rm -f "conftest.$ac_objext"
13897if { (eval echo "$as_me:13897: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013898 (eval $ac_compile) 2>&5
13899 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013900 echo "$as_me:13900: \$? = $ac_status" >&5
13901 (exit "$ac_status"); } &&
13902 { ac_try='test -s "conftest.$ac_objext"'
13903 { (eval echo "$as_me:13903: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013904 (eval $ac_try) 2>&5
13905 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013906 echo "$as_me:13906: \$? = $ac_status" >&5
13907 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013908 break
13909else
13910 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013911cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013912fi
micky3879b9f5e72025-07-08 18:04:53 -040013913rm -f "conftest.$ac_objext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013914 CC="$CC -n32"
micky3879b9f5e72025-07-08 18:04:53 -040013915 rm -f "conftest.$ac_objext"
13916if { (eval echo "$as_me:13916: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013917 (eval $ac_compile) 2>&5
13918 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013919 echo "$as_me:13919: \$? = $ac_status" >&5
13920 (exit "$ac_status"); } &&
13921 { ac_try='test -s "conftest.$ac_objext"'
13922 { (eval echo "$as_me:13922: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013923 (eval $ac_try) 2>&5
13924 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013925 echo "$as_me:13925: \$? = $ac_status" >&5
13926 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013927 ac_cv_sys_largefile_CC=' -n32'; break
13928else
13929 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013930cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013931fi
micky3879b9f5e72025-07-08 18:04:53 -040013932rm -f "conftest.$ac_objext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013933 break
13934 done
13935 CC=$ac_save_CC
micky3879b9f5e72025-07-08 18:04:53 -040013936 rm -f "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010013937 fi
13938fi
micky3879b9f5e72025-07-08 18:04:53 -040013939echo "$as_me:13939: result: $ac_cv_sys_largefile_CC" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013940echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13941 if test "$ac_cv_sys_largefile_CC" != no; then
13942 CC=$CC$ac_cv_sys_largefile_CC
13943 fi
13944
micky3879b9f5e72025-07-08 18:04:53 -040013945 echo "$as_me:13945: checking for _FILE_OFFSET_BITS value needed for large files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013946echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13947if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13948 echo $ECHO_N "(cached) $ECHO_C" >&6
13949else
13950 while :; do
13951 ac_cv_sys_file_offset_bits=no
micky3879b9f5e72025-07-08 18:04:53 -040013952 cat >"conftest.$ac_ext" <<_ACEOF
13953#line 13953 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013954#include "confdefs.h"
13955#include <sys/types.h>
13956 /* Check that off_t can represent 2**63 - 1 correctly.
13957 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13958 since some C++ compilers masquerading as C compilers
13959 incorrectly reject 9223372036854775807. */
13960#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13961 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13962 && LARGE_OFF_T % 2147483647 == 1)
13963 ? 1 : -1];
13964int
micky3879b9f5e72025-07-08 18:04:53 -040013965main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010013966{
13967
13968 ;
13969 return 0;
13970}
13971_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040013972rm -f "conftest.$ac_objext"
13973if { (eval echo "$as_me:13973: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013974 (eval $ac_compile) 2>&5
13975 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013976 echo "$as_me:13976: \$? = $ac_status" >&5
13977 (exit "$ac_status"); } &&
13978 { ac_try='test -s "conftest.$ac_objext"'
13979 { (eval echo "$as_me:13979: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013980 (eval $ac_try) 2>&5
13981 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040013982 echo "$as_me:13982: \$? = $ac_status" >&5
13983 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010013984 break
13985else
13986 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040013987cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010013988fi
micky3879b9f5e72025-07-08 18:04:53 -040013989rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13990 cat >"conftest.$ac_ext" <<_ACEOF
13991#line 13991 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010013992#include "confdefs.h"
13993#define _FILE_OFFSET_BITS 64
13994#include <sys/types.h>
13995 /* Check that off_t can represent 2**63 - 1 correctly.
13996 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13997 since some C++ compilers masquerading as C compilers
13998 incorrectly reject 9223372036854775807. */
13999#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14000 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14001 && LARGE_OFF_T % 2147483647 == 1)
14002 ? 1 : -1];
14003int
micky3879b9f5e72025-07-08 18:04:53 -040014004main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010014005{
14006
14007 ;
14008 return 0;
14009}
14010_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040014011rm -f "conftest.$ac_objext"
14012if { (eval echo "$as_me:14012: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014013 (eval $ac_compile) 2>&5
14014 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014015 echo "$as_me:14015: \$? = $ac_status" >&5
14016 (exit "$ac_status"); } &&
14017 { ac_try='test -s "conftest.$ac_objext"'
14018 { (eval echo "$as_me:14018: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014019 (eval $ac_try) 2>&5
14020 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014021 echo "$as_me:14021: \$? = $ac_status" >&5
14022 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010014023 ac_cv_sys_file_offset_bits=64; break
14024else
14025 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040014026cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014027fi
micky3879b9f5e72025-07-08 18:04:53 -040014028rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010014029 break
14030done
14031fi
micky3879b9f5e72025-07-08 18:04:53 -040014032echo "$as_me:14032: result: $ac_cv_sys_file_offset_bits" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014033echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14034if test "$ac_cv_sys_file_offset_bits" != no; then
14035
14036cat >>confdefs.h <<EOF
14037#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14038EOF
14039
14040fi
14041rm -rf conftest*
micky3879b9f5e72025-07-08 18:04:53 -040014042 echo "$as_me:14042: checking for _LARGE_FILES value needed for large files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014043echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14044if test "${ac_cv_sys_large_files+set}" = set; then
14045 echo $ECHO_N "(cached) $ECHO_C" >&6
14046else
14047 while :; do
14048 ac_cv_sys_large_files=no
micky3879b9f5e72025-07-08 18:04:53 -040014049 cat >"conftest.$ac_ext" <<_ACEOF
14050#line 14050 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010014051#include "confdefs.h"
14052#include <sys/types.h>
14053 /* Check that off_t can represent 2**63 - 1 correctly.
14054 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14055 since some C++ compilers masquerading as C compilers
14056 incorrectly reject 9223372036854775807. */
14057#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14058 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14059 && LARGE_OFF_T % 2147483647 == 1)
14060 ? 1 : -1];
14061int
micky3879b9f5e72025-07-08 18:04:53 -040014062main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010014063{
14064
14065 ;
14066 return 0;
14067}
14068_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040014069rm -f "conftest.$ac_objext"
14070if { (eval echo "$as_me:14070: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014071 (eval $ac_compile) 2>&5
14072 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014073 echo "$as_me:14073: \$? = $ac_status" >&5
14074 (exit "$ac_status"); } &&
14075 { ac_try='test -s "conftest.$ac_objext"'
14076 { (eval echo "$as_me:14076: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014077 (eval $ac_try) 2>&5
14078 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014079 echo "$as_me:14079: \$? = $ac_status" >&5
14080 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010014081 break
14082else
14083 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040014084cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014085fi
micky3879b9f5e72025-07-08 18:04:53 -040014086rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14087 cat >"conftest.$ac_ext" <<_ACEOF
14088#line 14088 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010014089#include "confdefs.h"
14090#define _LARGE_FILES 1
14091#include <sys/types.h>
14092 /* Check that off_t can represent 2**63 - 1 correctly.
14093 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14094 since some C++ compilers masquerading as C compilers
14095 incorrectly reject 9223372036854775807. */
14096#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14097 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14098 && LARGE_OFF_T % 2147483647 == 1)
14099 ? 1 : -1];
14100int
micky3879b9f5e72025-07-08 18:04:53 -040014101main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010014102{
14103
14104 ;
14105 return 0;
14106}
14107_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040014108rm -f "conftest.$ac_objext"
14109if { (eval echo "$as_me:14109: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014110 (eval $ac_compile) 2>&5
14111 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014112 echo "$as_me:14112: \$? = $ac_status" >&5
14113 (exit "$ac_status"); } &&
14114 { ac_try='test -s "conftest.$ac_objext"'
14115 { (eval echo "$as_me:14115: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014116 (eval $ac_try) 2>&5
14117 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014118 echo "$as_me:14118: \$? = $ac_status" >&5
14119 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010014120 ac_cv_sys_large_files=1; break
14121else
14122 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040014123cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014124fi
micky3879b9f5e72025-07-08 18:04:53 -040014125rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010014126 break
14127done
14128fi
micky3879b9f5e72025-07-08 18:04:53 -040014129echo "$as_me:14129: result: $ac_cv_sys_large_files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014130echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14131if test "$ac_cv_sys_large_files" != no; then
14132
14133cat >>confdefs.h <<EOF
14134#define _LARGE_FILES $ac_cv_sys_large_files
14135EOF
14136
14137fi
14138rm -rf conftest*
14139fi
14140
14141 if test "$enable_largefile" != no ; then
micky3879b9f5e72025-07-08 18:04:53 -040014142 echo "$as_me:14142: checking for _LARGEFILE_SOURCE value needed for large files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014143echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14144if test "${ac_cv_sys_largefile_source+set}" = set; then
14145 echo $ECHO_N "(cached) $ECHO_C" >&6
14146else
14147 while :; do
14148 ac_cv_sys_largefile_source=no
micky3879b9f5e72025-07-08 18:04:53 -040014149 cat >"conftest.$ac_ext" <<_ACEOF
14150#line 14150 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010014151#include "confdefs.h"
14152#include <stdio.h>
micky3879b9f5e72025-07-08 18:04:53 -040014153 #include <sys/types.h>
Steve Kondikae271bc2015-11-15 02:50:53 +010014154int
micky3879b9f5e72025-07-08 18:04:53 -040014155main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010014156{
micky3879b9f5e72025-07-08 18:04:53 -040014157
14158 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14159 return my_fseeko(stdin, 0, 0);
Steve Kondikae271bc2015-11-15 02:50:53 +010014160 ;
14161 return 0;
14162}
14163_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040014164rm -f "conftest.$ac_objext"
14165if { (eval echo "$as_me:14165: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014166 (eval $ac_compile) 2>&5
14167 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014168 echo "$as_me:14168: \$? = $ac_status" >&5
14169 (exit "$ac_status"); } &&
14170 { ac_try='test -s "conftest.$ac_objext"'
14171 { (eval echo "$as_me:14171: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014172 (eval $ac_try) 2>&5
14173 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014174 echo "$as_me:14174: \$? = $ac_status" >&5
14175 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010014176 break
14177else
14178 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040014179cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014180fi
micky3879b9f5e72025-07-08 18:04:53 -040014181rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14182 cat >"conftest.$ac_ext" <<_ACEOF
14183#line 14183 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010014184#include "confdefs.h"
14185#define _LARGEFILE_SOURCE 1
14186#include <stdio.h>
micky3879b9f5e72025-07-08 18:04:53 -040014187 #include <sys/types.h>
Steve Kondikae271bc2015-11-15 02:50:53 +010014188int
micky3879b9f5e72025-07-08 18:04:53 -040014189main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010014190{
micky3879b9f5e72025-07-08 18:04:53 -040014191
14192 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14193 return my_fseeko(stdin, 0, 0);
Steve Kondikae271bc2015-11-15 02:50:53 +010014194 ;
14195 return 0;
14196}
14197_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040014198rm -f "conftest.$ac_objext"
14199if { (eval echo "$as_me:14199: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014200 (eval $ac_compile) 2>&5
14201 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014202 echo "$as_me:14202: \$? = $ac_status" >&5
14203 (exit "$ac_status"); } &&
14204 { ac_try='test -s "conftest.$ac_objext"'
14205 { (eval echo "$as_me:14205: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014206 (eval $ac_try) 2>&5
14207 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014208 echo "$as_me:14208: \$? = $ac_status" >&5
14209 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010014210 ac_cv_sys_largefile_source=1; break
14211else
14212 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040014213cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014214fi
micky3879b9f5e72025-07-08 18:04:53 -040014215rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010014216 break
14217done
14218fi
micky3879b9f5e72025-07-08 18:04:53 -040014219echo "$as_me:14219: result: $ac_cv_sys_largefile_source" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014220echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14221if test "$ac_cv_sys_largefile_source" != no; then
14222
14223cat >>confdefs.h <<EOF
14224#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14225EOF
14226
14227fi
14228rm -rf conftest*
14229
14230# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14231# in glibc 2.1.3, but that breaks too many other things.
14232# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
micky3879b9f5e72025-07-08 18:04:53 -040014233echo "$as_me:14233: checking for fseeko" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014234echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14235if test "${ac_cv_func_fseeko+set}" = set; then
14236 echo $ECHO_N "(cached) $ECHO_C" >&6
14237else
micky3879b9f5e72025-07-08 18:04:53 -040014238 cat >"conftest.$ac_ext" <<_ACEOF
14239#line 14239 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010014240#include "confdefs.h"
14241#include <stdio.h>
micky3879b9f5e72025-07-08 18:04:53 -040014242 #include <sys/types.h>
Steve Kondikae271bc2015-11-15 02:50:53 +010014243int
micky3879b9f5e72025-07-08 18:04:53 -040014244main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010014245{
micky3879b9f5e72025-07-08 18:04:53 -040014246int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14247 return my_fseeko && my_fseeko (stdin, 0, 0);
Steve Kondikae271bc2015-11-15 02:50:53 +010014248 ;
14249 return 0;
14250}
14251_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040014252rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14253if { (eval echo "$as_me:14253: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014254 (eval $ac_link) 2>&5
14255 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014256 echo "$as_me:14256: \$? = $ac_status" >&5
14257 (exit "$ac_status"); } &&
14258 { ac_try='test -s "conftest$ac_exeext"'
14259 { (eval echo "$as_me:14259: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014260 (eval $ac_try) 2>&5
14261 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014262 echo "$as_me:14262: \$? = $ac_status" >&5
14263 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010014264 ac_cv_func_fseeko=yes
14265else
14266 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040014267cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014268ac_cv_func_fseeko=no
14269fi
micky3879b9f5e72025-07-08 18:04:53 -040014270rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010014271fi
micky3879b9f5e72025-07-08 18:04:53 -040014272echo "$as_me:14272: result: $ac_cv_func_fseeko" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014273echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14274if test $ac_cv_func_fseeko = yes; then
14275
14276cat >>confdefs.h <<\EOF
14277#define HAVE_FSEEKO 1
14278EOF
14279
14280fi
14281
14282 # Normally we would collect these definitions in the config.h,
14283 # but (like _XOPEN_SOURCE), some environments rely on having these
14284 # defined before any of the system headers are included. Another
14285 # case comes up with C++, e.g., on AIX the compiler compiles the
14286 # header files by themselves before looking at the body files it is
14287 # told to compile. For ncurses, those header files do not include
14288 # the config.h
micky3879b9f5e72025-07-08 18:04:53 -040014289 if test "$ac_cv_sys_large_files" != no
14290 then
Steve Kondikae271bc2015-11-15 02:50:53 +010014291
micky3879b9f5e72025-07-08 18:04:53 -040014292 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14293 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14294
14295 fi
14296 if test "$ac_cv_sys_largefile_source" != no
14297 then
14298
14299 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14300 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14301
14302 fi
14303 if test "$ac_cv_sys_file_offset_bits" != no
14304 then
14305
14306 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14307 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14308
14309 fi
14310
14311 echo "$as_me:14311: checking whether to use struct dirent64" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014312echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14313if test "${cf_cv_struct_dirent64+set}" = set; then
14314 echo $ECHO_N "(cached) $ECHO_C" >&6
14315else
14316
micky3879b9f5e72025-07-08 18:04:53 -040014317 cat >"conftest.$ac_ext" <<_ACEOF
14318#line 14318 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010014319#include "confdefs.h"
14320
micky3879b9f5e72025-07-08 18:04:53 -040014321#pragma GCC diagnostic error "-Wincompatible-pointer-types"
Steve Kondikae271bc2015-11-15 02:50:53 +010014322#include <sys/types.h>
14323#include <dirent.h>
14324
micky3879b9f5e72025-07-08 18:04:53 -040014325#ifndef __REDIRECT
14326/* if transitional largefile support is setup, this is true */
14327extern struct dirent64 * readdir(DIR *);
14328#endif
14329
Steve Kondikae271bc2015-11-15 02:50:53 +010014330int
micky3879b9f5e72025-07-08 18:04:53 -040014331main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010014332{
14333
micky3879b9f5e72025-07-08 18:04:53 -040014334 DIR *dp = opendir(".");
14335 struct dirent64 *x = readdir(dp);
14336 struct dirent *y = readdir(dp);
Steve Kondikae271bc2015-11-15 02:50:53 +010014337 int z = x - y;
micky3879b9f5e72025-07-08 18:04:53 -040014338 (void)z;
Steve Kondikae271bc2015-11-15 02:50:53 +010014339
14340 ;
14341 return 0;
14342}
14343_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040014344rm -f "conftest.$ac_objext"
14345if { (eval echo "$as_me:14345: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014346 (eval $ac_compile) 2>&5
14347 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014348 echo "$as_me:14348: \$? = $ac_status" >&5
14349 (exit "$ac_status"); } &&
14350 { ac_try='test -s "conftest.$ac_objext"'
14351 { (eval echo "$as_me:14351: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014352 (eval $ac_try) 2>&5
14353 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040014354 echo "$as_me:14354: \$? = $ac_status" >&5
14355 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010014356 cf_cv_struct_dirent64=yes
14357else
14358 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040014359cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014360cf_cv_struct_dirent64=no
14361fi
micky3879b9f5e72025-07-08 18:04:53 -040014362rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010014363
14364fi
micky3879b9f5e72025-07-08 18:04:53 -040014365echo "$as_me:14365: result: $cf_cv_struct_dirent64" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014366echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14367 test "$cf_cv_struct_dirent64" = yes &&
14368cat >>confdefs.h <<\EOF
14369#define HAVE_STRUCT_DIRENT64 1
14370EOF
14371
14372 fi
14373
14374### use option --disable-tparm-varargs to make tparm() conform to X/Open
micky3879b9f5e72025-07-08 18:04:53 -040014375echo "$as_me:14375: checking if you want tparm not to use X/Open fixed-parameter list" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014376echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14377
14378# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14379if test "${enable_tparm_varargs+set}" = set; then
14380 enableval="$enable_tparm_varargs"
14381 with_tparm_varargs=$enableval
14382else
14383 with_tparm_varargs=yes
14384fi;
micky3879b9f5e72025-07-08 18:04:53 -040014385echo "$as_me:14385: result: $with_tparm_varargs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014386echo "${ECHO_T}$with_tparm_varargs" >&6
14387NCURSES_TPARM_VARARGS=0
14388test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14389
14390### use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14391if test "$with_ticlib" != no ; then
micky3879b9f5e72025-07-08 18:04:53 -040014392echo "$as_me:14392: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014393echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14394
14395# Check whether --enable-tic-depends or --disable-tic-depends was given.
14396if test "${enable_tic_depends+set}" = set; then
14397 enableval="$enable_tic_depends"
14398 with_tic_depends=$enableval
14399else
14400 with_tic_depends=yes
14401fi;
micky3879b9f5e72025-07-08 18:04:53 -040014402echo "$as_me:14402: result: $with_tic_depends" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014403echo "${ECHO_T}$with_tic_depends" >&6
14404else
14405 with_tic_depends=no
14406fi
14407
micky3879b9f5e72025-07-08 18:04:53 -040014408### use option --enable-wattr-macros to enable wattr* macros in curses.h
14409echo "$as_me:14409: checking if you want to enable wattr* macros" >&5
14410echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14411
14412# Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14413if test "${enable_wattr_macros+set}" = set; then
14414 enableval="$enable_wattr_macros"
14415 with_wattr_macros=$enableval
14416else
14417 with_wattr_macros=no
14418fi;
14419if [ "x$with_wattr_macros" != xyes ]; then
14420 NCURSES_WATTR_MACROS=0
14421 echo "$as_me:14421: result: no" >&5
14422echo "${ECHO_T}no" >&6
14423else
14424 NCURSES_WATTR_MACROS=1
14425 echo "$as_me:14425: result: yes" >&5
14426echo "${ECHO_T}yes" >&6
14427fi
14428
14429echo "$as_me:14429: checking for X11 rgb file" >&5
14430echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14431
14432# Check whether --with-x11-rgb or --without-x11-rgb was given.
14433if test "${with_x11_rgb+set}" = set; then
14434 withval="$with_x11_rgb"
14435 RGB_PATH=$withval
14436else
14437 RGB_PATH=auto
14438fi;
14439
14440if test "x$RGB_PATH" = xauto
14441then
14442 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14443 for cf_path in \
14444 /opt/local/share/X11/rgb.txt \
14445 /opt/X11/share/X11/rgb.txt \
14446 /usr/share/X11/rgb.txt \
14447 /usr/X11/share/X11/rgb.txt \
14448 /usr/X11/lib/X11/rgb.txt \
14449 /usr/lib/X11/rgb.txt \
14450 /etc/X11/rgb.txt \
14451 /usr/pkg/lib/X11/rgb.txt \
14452 /usr/X11R7/lib/X11/rgb.txt \
14453 /usr/X11R6/lib/X11/rgb.txt \
14454 /usr/X11R5/lib/X11/rgb.txt \
14455 /usr/X11R4/lib/X11/rgb.txt \
14456 /usr/local/lib/X11/rgb.txt \
14457 /usr/local/share/X11/rgb.txt \
14458 /usr/lib64/X11/rgb.txt
14459 do
14460 if test -f "$cf_path" ; then
14461 RGB_PATH="$cf_path"
14462 break
14463 fi
14464 done
14465else
14466 cf_path=$RGB_PATH
14467
14468if test "x$prefix" != xNONE; then
14469 cf_path_syntax="$prefix"
14470else
14471 cf_path_syntax="$ac_default_prefix"
14472fi
14473
14474case ".$cf_path" in
14475(.\$\(*\)*|.\'*\'*)
14476 ;;
14477(..|./*|.\\*)
14478 ;;
14479(.[a-zA-Z]:[\\/]*) # OS/2 EMX
14480 ;;
14481(.\$\{*prefix\}*|.\$\{*dir\}*)
14482 eval cf_path="$cf_path"
14483 case ".$cf_path" in
14484 (.NONE/*)
14485 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14486 ;;
14487 esac
14488 ;;
14489(.no|.NONE/*)
14490 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14491 ;;
14492(*)
14493 { { echo "$as_me:14493: error: expected a pathname, not \"$cf_path\"" >&5
14494echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14495 { (exit 1); exit 1; }; }
14496 ;;
14497esac
14498
14499fi
14500
14501echo "$as_me:14501: result: $RGB_PATH" >&5
14502echo "${ECHO_T}$RGB_PATH" >&6
14503
14504cat >>confdefs.h <<EOF
14505#define RGB_PATH "$cf_path"
14506EOF
14507
14508no_x11_rgb=
14509if test "$RGB_PATH" = no
14510then
14511 no_x11_rgb="#"
14512fi
14513
Steve Kondikae271bc2015-11-15 02:50:53 +010014514### use option --with-bool to override bool's type
micky3879b9f5e72025-07-08 18:04:53 -040014515
14516echo "$as_me:14516: checking for type of bool" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014517echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14518
14519# Check whether --with-bool or --without-bool was given.
14520if test "${with_bool+set}" = set; then
14521 withval="$with_bool"
14522 NCURSES_BOOL="$withval"
14523else
14524 NCURSES_BOOL=auto
14525fi;
micky3879b9f5e72025-07-08 18:04:53 -040014526echo "$as_me:14526: result: $NCURSES_BOOL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014527echo "${ECHO_T}$NCURSES_BOOL" >&6
micky3879b9f5e72025-07-08 18:04:53 -040014528case x$NCURSES_BOOL in
14529(x|xyes|xno)
14530 { { echo "$as_me:14530: error: expected a type name for bool" >&5
14531echo "$as_me: error: expected a type name for bool" >&2;}
14532 { (exit 1); exit 1; }; }
14533 ;;
14534esac
Steve Kondikae271bc2015-11-15 02:50:53 +010014535
micky3879b9f5e72025-07-08 18:04:53 -040014536echo "$as_me:14536: checking for alternate terminal capabilities file" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014537echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14538
14539# Check whether --with-caps or --without-caps was given.
14540if test "${with_caps+set}" = set; then
14541 withval="$with_caps"
14542 TERMINFO_CAPS=Caps.$withval
14543else
14544 TERMINFO_CAPS=Caps
14545fi;
micky3879b9f5e72025-07-08 18:04:53 -040014546if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14547then
14548 { echo "$as_me:14548: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14549echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14550 TERMINFO_CAPS=Caps
14551fi
14552echo "$as_me:14552: result: $TERMINFO_CAPS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014553echo "${ECHO_T}$TERMINFO_CAPS" >&6
14554
14555### use option --with-chtype to override chtype's type
micky3879b9f5e72025-07-08 18:04:53 -040014556
14557echo "$as_me:14557: checking for type of chtype" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014558echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14559
14560# Check whether --with-chtype or --without-chtype was given.
14561if test "${with_chtype+set}" = set; then
14562 withval="$with_chtype"
14563 NCURSES_CHTYPE="$withval"
14564else
14565 NCURSES_CHTYPE=$cf_dft_chtype
14566fi;
micky3879b9f5e72025-07-08 18:04:53 -040014567echo "$as_me:14567: result: $NCURSES_CHTYPE" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014568echo "${ECHO_T}$NCURSES_CHTYPE" >&6
micky3879b9f5e72025-07-08 18:04:53 -040014569case x$NCURSES_CHTYPE in
14570(x|xyes|xno)
14571 { { echo "$as_me:14571: error: expected a type name for chtype" >&5
14572echo "$as_me: error: expected a type name for chtype" >&2;}
14573 { (exit 1); exit 1; }; }
14574 ;;
14575esac
Steve Kondikae271bc2015-11-15 02:50:53 +010014576
14577### use option --with-ospeed to override ospeed's type
micky3879b9f5e72025-07-08 18:04:53 -040014578
14579echo "$as_me:14579: checking for type of ospeed" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014580echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14581
14582# Check whether --with-ospeed or --without-ospeed was given.
14583if test "${with_ospeed+set}" = set; then
14584 withval="$with_ospeed"
14585 NCURSES_OSPEED="$withval"
14586else
14587 NCURSES_OSPEED=short
14588fi;
micky3879b9f5e72025-07-08 18:04:53 -040014589echo "$as_me:14589: result: $NCURSES_OSPEED" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014590echo "${ECHO_T}$NCURSES_OSPEED" >&6
micky3879b9f5e72025-07-08 18:04:53 -040014591case x$NCURSES_OSPEED in
14592(x|xyes|xno)
14593 { { echo "$as_me:14593: error: expected a type name for ospeed" >&5
14594echo "$as_me: error: expected a type name for ospeed" >&2;}
14595 { (exit 1); exit 1; }; }
14596 ;;
14597esac
Steve Kondikae271bc2015-11-15 02:50:53 +010014598
14599### use option --with-mmask-t to override mmask_t's type
micky3879b9f5e72025-07-08 18:04:53 -040014600
14601echo "$as_me:14601: checking for type of mmask-t" >&5
14602echo $ECHO_N "checking for type of mmask-t... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010014603
14604# Check whether --with-mmask-t or --without-mmask-t was given.
14605if test "${with_mmask_t+set}" = set; then
14606 withval="$with_mmask_t"
14607 NCURSES_MMASK_T="$withval"
14608else
14609 NCURSES_MMASK_T=$cf_dft_mmask_t
14610fi;
micky3879b9f5e72025-07-08 18:04:53 -040014611echo "$as_me:14611: result: $NCURSES_MMASK_T" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014612echo "${ECHO_T}$NCURSES_MMASK_T" >&6
micky3879b9f5e72025-07-08 18:04:53 -040014613case x$NCURSES_MMASK_T in
14614(x|xyes|xno)
14615 { { echo "$as_me:14615: error: expected a type name for mmask-t" >&5
14616echo "$as_me: error: expected a type name for mmask-t" >&2;}
14617 { (exit 1); exit 1; }; }
14618 ;;
14619esac
Steve Kondikae271bc2015-11-15 02:50:53 +010014620
14621### use option --with-ccharw-max to override CCHARW_MAX size
micky3879b9f5e72025-07-08 18:04:53 -040014622echo "$as_me:14622: checking for size CCHARW_MAX" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014623echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14624
14625# Check whether --with-ccharw-max or --without-ccharw-max was given.
14626if test "${with_ccharw_max+set}" = set; then
14627 withval="$with_ccharw_max"
14628 NCURSES_CCHARW_MAX="$withval"
14629else
micky3879b9f5e72025-07-08 18:04:53 -040014630 NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
Steve Kondikae271bc2015-11-15 02:50:53 +010014631fi;
micky3879b9f5e72025-07-08 18:04:53 -040014632echo "$as_me:14632: result: $NCURSES_CCHARW_MAX" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014633echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14634
micky3879b9f5e72025-07-08 18:04:53 -040014635echo "$as_me:14635: checking for signed char" >&5
14636echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14637if test "${ac_cv_type_signed_char+set}" = set; then
14638 echo $ECHO_N "(cached) $ECHO_C" >&6
14639else
14640 cat >"conftest.$ac_ext" <<_ACEOF
14641#line 14641 "configure"
14642#include "confdefs.h"
14643$ac_includes_default
14644int
14645main (void)
14646{
14647if ((signed char *) 0)
14648 return 0;
14649if (sizeof (signed char))
14650 return 0;
14651 ;
14652 return 0;
14653}
14654_ACEOF
14655rm -f "conftest.$ac_objext"
14656if { (eval echo "$as_me:14656: \"$ac_compile\"") >&5
14657 (eval $ac_compile) 2>&5
14658 ac_status=$?
14659 echo "$as_me:14659: \$? = $ac_status" >&5
14660 (exit "$ac_status"); } &&
14661 { ac_try='test -s "conftest.$ac_objext"'
14662 { (eval echo "$as_me:14662: \"$ac_try\"") >&5
14663 (eval $ac_try) 2>&5
14664 ac_status=$?
14665 echo "$as_me:14665: \$? = $ac_status" >&5
14666 (exit "$ac_status"); }; }; then
14667 ac_cv_type_signed_char=yes
14668else
14669 echo "$as_me: failed program was:" >&5
14670cat "conftest.$ac_ext" >&5
14671ac_cv_type_signed_char=no
14672fi
14673rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14674fi
14675echo "$as_me:14675: result: $ac_cv_type_signed_char" >&5
14676echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14677
14678echo "$as_me:14678: checking size of signed char" >&5
14679echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14680if test "${ac_cv_sizeof_signed_char+set}" = set; then
14681 echo $ECHO_N "(cached) $ECHO_C" >&6
14682else
14683 if test "$ac_cv_type_signed_char" = yes; then
14684 if test "$cross_compiling" = yes; then
14685 # Depending upon the size, compute the lo and hi bounds.
14686cat >"conftest.$ac_ext" <<_ACEOF
14687#line 14687 "configure"
14688#include "confdefs.h"
14689$ac_includes_default
14690int
14691main (void)
14692{
14693int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14694 ;
14695 return 0;
14696}
14697_ACEOF
14698rm -f "conftest.$ac_objext"
14699if { (eval echo "$as_me:14699: \"$ac_compile\"") >&5
14700 (eval $ac_compile) 2>&5
14701 ac_status=$?
14702 echo "$as_me:14702: \$? = $ac_status" >&5
14703 (exit "$ac_status"); } &&
14704 { ac_try='test -s "conftest.$ac_objext"'
14705 { (eval echo "$as_me:14705: \"$ac_try\"") >&5
14706 (eval $ac_try) 2>&5
14707 ac_status=$?
14708 echo "$as_me:14708: \$? = $ac_status" >&5
14709 (exit "$ac_status"); }; }; then
14710 ac_lo=0 ac_mid=0
14711 while :; do
14712 cat >"conftest.$ac_ext" <<_ACEOF
14713#line 14713 "configure"
14714#include "confdefs.h"
14715$ac_includes_default
14716int
14717main (void)
14718{
14719int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14720 ;
14721 return 0;
14722}
14723_ACEOF
14724rm -f "conftest.$ac_objext"
14725if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5
14726 (eval $ac_compile) 2>&5
14727 ac_status=$?
14728 echo "$as_me:14728: \$? = $ac_status" >&5
14729 (exit "$ac_status"); } &&
14730 { ac_try='test -s "conftest.$ac_objext"'
14731 { (eval echo "$as_me:14731: \"$ac_try\"") >&5
14732 (eval $ac_try) 2>&5
14733 ac_status=$?
14734 echo "$as_me:14734: \$? = $ac_status" >&5
14735 (exit "$ac_status"); }; }; then
14736 ac_hi=$ac_mid; break
14737else
14738 echo "$as_me: failed program was:" >&5
14739cat "conftest.$ac_ext" >&5
14740ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14741fi
14742rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14743 done
14744else
14745 echo "$as_me: failed program was:" >&5
14746cat "conftest.$ac_ext" >&5
14747ac_hi=-1 ac_mid=-1
14748 while :; do
14749 cat >"conftest.$ac_ext" <<_ACEOF
14750#line 14750 "configure"
14751#include "confdefs.h"
14752$ac_includes_default
14753int
14754main (void)
14755{
14756int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14757 ;
14758 return 0;
14759}
14760_ACEOF
14761rm -f "conftest.$ac_objext"
14762if { (eval echo "$as_me:14762: \"$ac_compile\"") >&5
14763 (eval $ac_compile) 2>&5
14764 ac_status=$?
14765 echo "$as_me:14765: \$? = $ac_status" >&5
14766 (exit "$ac_status"); } &&
14767 { ac_try='test -s "conftest.$ac_objext"'
14768 { (eval echo "$as_me:14768: \"$ac_try\"") >&5
14769 (eval $ac_try) 2>&5
14770 ac_status=$?
14771 echo "$as_me:14771: \$? = $ac_status" >&5
14772 (exit "$ac_status"); }; }; then
14773 ac_lo=$ac_mid; break
14774else
14775 echo "$as_me: failed program was:" >&5
14776cat "conftest.$ac_ext" >&5
14777ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14778fi
14779rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14780 done
14781fi
14782rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14783# Binary search between lo and hi bounds.
14784while test "x$ac_lo" != "x$ac_hi"; do
14785 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14786 cat >"conftest.$ac_ext" <<_ACEOF
14787#line 14787 "configure"
14788#include "confdefs.h"
14789$ac_includes_default
14790int
14791main (void)
14792{
14793int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14794 ;
14795 return 0;
14796}
14797_ACEOF
14798rm -f "conftest.$ac_objext"
14799if { (eval echo "$as_me:14799: \"$ac_compile\"") >&5
14800 (eval $ac_compile) 2>&5
14801 ac_status=$?
14802 echo "$as_me:14802: \$? = $ac_status" >&5
14803 (exit "$ac_status"); } &&
14804 { ac_try='test -s "conftest.$ac_objext"'
14805 { (eval echo "$as_me:14805: \"$ac_try\"") >&5
14806 (eval $ac_try) 2>&5
14807 ac_status=$?
14808 echo "$as_me:14808: \$? = $ac_status" >&5
14809 (exit "$ac_status"); }; }; then
14810 ac_hi=$ac_mid
14811else
14812 echo "$as_me: failed program was:" >&5
14813cat "conftest.$ac_ext" >&5
14814ac_lo=`expr "$ac_mid" + 1`
14815fi
14816rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14817done
14818ac_cv_sizeof_signed_char=$ac_lo
14819else
14820 if test "$cross_compiling" = yes; then
14821 { { echo "$as_me:14821: error: cannot run test program while cross compiling" >&5
14822echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14823 { (exit 1); exit 1; }; }
14824else
14825 cat >"conftest.$ac_ext" <<_ACEOF
14826#line 14826 "configure"
14827#include "confdefs.h"
14828$ac_includes_default
14829int
14830main (void)
14831{
14832FILE *f = fopen ("conftest.val", "w");
14833if (!f)
14834 $ac_main_return (1);
14835fprintf (f, "%ld", (long)(sizeof (signed char)));
14836fclose (f);
14837 ;
14838 return 0;
14839}
14840_ACEOF
14841rm -f "conftest$ac_exeext"
14842if { (eval echo "$as_me:14842: \"$ac_link\"") >&5
14843 (eval $ac_link) 2>&5
14844 ac_status=$?
14845 echo "$as_me:14845: \$? = $ac_status" >&5
14846 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14847 { (eval echo "$as_me:14847: \"$ac_try\"") >&5
14848 (eval $ac_try) 2>&5
14849 ac_status=$?
14850 echo "$as_me:14850: \$? = $ac_status" >&5
14851 (exit "$ac_status"); }; }; then
14852 ac_cv_sizeof_signed_char=`cat conftest.val`
14853else
14854 echo "$as_me: program exited with status $ac_status" >&5
14855echo "$as_me: failed program was:" >&5
14856cat "conftest.$ac_ext" >&5
14857fi
14858rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14859fi
14860fi
14861rm -f conftest.val
14862else
14863 ac_cv_sizeof_signed_char=0
14864fi
14865fi
14866echo "$as_me:14866: result: $ac_cv_sizeof_signed_char" >&5
14867echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14868cat >>confdefs.h <<EOF
14869#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14870EOF
14871
14872if test "$ac_cv_sizeof_signed_char" = 1 ; then
14873 NCURSES_SBOOL="signed char"
14874else
14875 NCURSES_SBOOL="char"
14876fi
14877echo "$as_me:14877: checking whether to use signed chars for Boolean array in term.h" >&5
14878echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6
14879
14880# Check whether --enable-signed-char or --disable-signed-char was given.
14881if test "${enable_signed_char+set}" = set; then
14882 enableval="$enable_signed_char"
14883 with_signed_char=$enableval
14884else
14885 with_signed_char=$cf_dft_signed_char
14886fi;
14887echo "$as_me:14887: result: $with_signed_char" >&5
14888echo "${ECHO_T}$with_signed_char" >&6
14889test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14890
Steve Kondikae271bc2015-11-15 02:50:53 +010014891### use option --with-tparm-arg to override tparm's argument type
micky3879b9f5e72025-07-08 18:04:53 -040014892
14893echo "$as_me:14893: checking for type of tparm-arg" >&5
14894echo $ECHO_N "checking for type of tparm-arg... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010014895
14896# Check whether --with-tparm-arg or --without-tparm-arg was given.
14897if test "${with_tparm_arg+set}" = set; then
14898 withval="$with_tparm_arg"
14899 NCURSES_TPARM_ARG="$withval"
14900else
14901 NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14902fi;
micky3879b9f5e72025-07-08 18:04:53 -040014903echo "$as_me:14903: result: $NCURSES_TPARM_ARG" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014904echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
micky3879b9f5e72025-07-08 18:04:53 -040014905case x$NCURSES_TPARM_ARG in
14906(x|xyes|xno)
14907 { { echo "$as_me:14907: error: expected a type name for tparm-arg" >&5
14908echo "$as_me: error: expected a type name for tparm-arg" >&2;}
14909 { (exit 1); exit 1; }; }
14910 ;;
14911esac
Steve Kondikae271bc2015-11-15 02:50:53 +010014912
14913### Enable compiling-in rcs id's
micky3879b9f5e72025-07-08 18:04:53 -040014914echo "$as_me:14914: checking if RCS identifiers should be compiled-in" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014915echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14916
14917# Check whether --with-rcs-ids or --without-rcs-ids was given.
14918if test "${with_rcs_ids+set}" = set; then
14919 withval="$with_rcs_ids"
14920 with_rcs_ids=$withval
14921else
14922 with_rcs_ids=no
14923fi;
micky3879b9f5e72025-07-08 18:04:53 -040014924echo "$as_me:14924: result: $with_rcs_ids" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014925echo "${ECHO_T}$with_rcs_ids" >&6
14926test "x$with_rcs_ids" = xyes &&
14927cat >>confdefs.h <<\EOF
14928#define USE_RCS_IDS 1
14929EOF
14930
14931###############################################################################
14932
micky3879b9f5e72025-07-08 18:04:53 -040014933echo "$as_me:14933: checking format of man-pages" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010014934echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14935
14936# Check whether --with-manpage-format or --without-manpage-format was given.
14937if test "${with_manpage_format+set}" = set; then
14938 withval="$with_manpage_format"
14939 MANPAGE_FORMAT=$withval
14940else
14941 MANPAGE_FORMAT=unknown
14942fi;
14943
14944test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14945MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14946
14947cf_unknown=
14948
micky3879b9f5e72025-07-08 18:04:53 -040014949case "$MANPAGE_FORMAT" in
Steve Kondikae271bc2015-11-15 02:50:53 +010014950(unknown)
14951 if test -z "$MANPATH" ; then
14952 MANPATH="/usr/man:/usr/share/man"
14953 fi
14954
micky3879b9f5e72025-07-08 18:04:53 -040014955 # look for the 'date' man-page (it is most likely to be installed!)
Steve Kondikae271bc2015-11-15 02:50:53 +010014956 MANPAGE_FORMAT=
micky3879b9f5e72025-07-08 18:04:53 -040014957 cf_preform="no"
14958 cf_catonly="yes"
14959 cf_example="date"
Steve Kondikae271bc2015-11-15 02:50:53 +010014960
14961 IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14962 for cf_dir in $MANPATH; do
14963 test -z "$cf_dir" && cf_dir=/usr/man
14964 for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
14965 do
micky3879b9f5e72025-07-08 18:04:53 -040014966 cf_test=`echo "$cf_name" | sed -e 's/*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010014967 if test "x$cf_test" = "x$cf_name" ; then
14968
14969 case "$cf_name" in
micky3879b9f5e72025-07-08 18:04:53 -040014970 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14971 (*.xz) MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14972 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14973 (*.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14974 (*.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14975 (*) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
Steve Kondikae271bc2015-11-15 02:50:53 +010014976 esac
14977
14978 case "$cf_name" in
14979 ($cf_dir/man*)
14980 cf_catonly=no
14981 ;;
14982 ($cf_dir/cat*)
14983 cf_preform=yes
14984 ;;
14985 esac
14986 break
14987 fi
14988
14989 # if we found a match in either man* or cat*, stop looking
14990 if test -n "$MANPAGE_FORMAT" ; then
14991 cf_found=no
14992 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14993 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14994 case "$cf_name" in
14995 ($cf_dir/cat*)
14996 cf_found=yes
14997 ;;
14998 esac
micky3879b9f5e72025-07-08 18:04:53 -040014999 test "$cf_found" = yes && break
Steve Kondikae271bc2015-11-15 02:50:53 +010015000 fi
15001 done
15002 # only check the first directory in $MANPATH where we find manpages
15003 if test -n "$MANPAGE_FORMAT" ; then
15004 break
15005 fi
15006 done
15007 # if we did not find the example, just assume it is normal
15008 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
15009 IFS="$ac_save_ifs"
15010 ;;
15011(*)
15012 for cf_option in $MANPAGE_FORMAT; do
micky3879b9f5e72025-07-08 18:04:53 -040015013 case "$cf_option" in
15014 (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
Steve Kondikae271bc2015-11-15 02:50:53 +010015015 ;;
15016 (*)
15017 cf_unknown="$cf_unknown $cf_option"
15018 ;;
15019 esac
15020 done
15021 ;;
15022esac
15023
micky3879b9f5e72025-07-08 18:04:53 -040015024echo "$as_me:15024: result: $MANPAGE_FORMAT" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015025echo "${ECHO_T}$MANPAGE_FORMAT" >&6
15026if test -n "$cf_unknown" ; then
micky3879b9f5e72025-07-08 18:04:53 -040015027 { echo "$as_me:15027: WARNING: Unexpected manpage-format $cf_unknown" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015028echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
15029fi
15030
micky3879b9f5e72025-07-08 18:04:53 -040015031cf_manpage_format=no
15032cf_manpage_inboth=no
15033cf_manpage_so_strip=
15034cf_manpage_compress=
15035cf_manpage_coptions=
15036
15037for cf_item in $MANPAGE_FORMAT
15038do
15039case "$cf_item" in
15040(catonly)
15041 cf_manpage_format=yes
15042 cf_manpage_inboth=no
15043 ;;
15044(formatted)
15045 cf_manpage_format=yes
15046 cf_manpage_inboth=yes
15047 ;;
15048(compress)
15049 cf_manpage_so_strip="Z"
15050 cf_manpage_compress=compress
15051 ;;
15052(gzip)
15053 cf_manpage_so_strip="gz"
15054 cf_manpage_compress=gzip
15055 cf_manpage_coptions=-n
15056 ;;
15057(bzip2)
15058 cf_manpage_so_strip="bz2"
15059 cf_manpage_compress=bzip2
15060 ;;
15061(xz)
15062 cf_manpage_so_strip="xz"
15063 cf_manpage_compress=xz
15064 ;;
15065esac
15066done
15067
15068echo "$as_me:15068: checking for manpage renaming" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015069echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15070
15071# Check whether --with-manpage-renames or --without-manpage-renames was given.
15072if test "${with_manpage_renames+set}" = set; then
15073 withval="$with_manpage_renames"
15074 MANPAGE_RENAMES=$withval
15075else
15076 MANPAGE_RENAMES=yes
15077fi;
15078
15079case ".$MANPAGE_RENAMES" in
15080(.no)
15081 ;;
15082(.|.yes)
15083 # Debian 'man' program?
15084 if test -f /etc/debian_version ; then
micky3879b9f5e72025-07-08 18:04:53 -040015085 MANPAGE_RENAMES=man/man_db.renames
Steve Kondikae271bc2015-11-15 02:50:53 +010015086 else
15087 MANPAGE_RENAMES=no
15088 fi
15089 ;;
15090esac
15091
micky3879b9f5e72025-07-08 18:04:53 -040015092if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15093 MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15094elif test "$MANPAGE_RENAMES" = no ; then
15095 :
15096elif test ! -f "$MANPAGE_RENAMES" ; then
15097 { { echo "$as_me:15097: error: not a filename: $MANPAGE_RENAMES" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015098echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15099 { (exit 1); exit 1; }; }
Steve Kondikae271bc2015-11-15 02:50:53 +010015100fi
15101
micky3879b9f5e72025-07-08 18:04:53 -040015102echo "$as_me:15102: result: $MANPAGE_RENAMES" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015103echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15104
micky3879b9f5e72025-07-08 18:04:53 -040015105echo "$as_me:15105: checking if manpage aliases will be installed" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015106echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15107
15108# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15109if test "${with_manpage_aliases+set}" = set; then
15110 withval="$with_manpage_aliases"
15111 MANPAGE_ALIASES=$withval
15112else
15113 MANPAGE_ALIASES=yes
15114fi;
15115
micky3879b9f5e72025-07-08 18:04:53 -040015116echo "$as_me:15116: result: $MANPAGE_ALIASES" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015117echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15118
15119case "x$LN_S" in
15120(xln*)
15121 cf_use_symlinks=yes
15122 ;;
15123(*)
15124 cf_use_symlinks=no
15125 ;;
15126esac
15127
15128MANPAGE_SYMLINKS=no
15129if test "$MANPAGE_ALIASES" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040015130echo "$as_me:15130: checking if manpage symlinks should be used" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015131echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15132
15133# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15134if test "${with_manpage_symlinks+set}" = set; then
15135 withval="$with_manpage_symlinks"
15136 MANPAGE_SYMLINKS=$withval
15137else
15138 MANPAGE_SYMLINKS=$cf_use_symlinks
15139fi;
15140
micky3879b9f5e72025-07-08 18:04:53 -040015141if test "$cf_use_symlinks" = no; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015142if test "$MANPAGE_SYMLINKS" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040015143 { echo "$as_me:15143: WARNING: cannot make symlinks" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015144echo "$as_me: WARNING: cannot make symlinks" >&2;}
15145 MANPAGE_SYMLINKS=no
15146fi
15147fi
15148
micky3879b9f5e72025-07-08 18:04:53 -040015149echo "$as_me:15149: result: $MANPAGE_SYMLINKS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015150echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15151fi
15152
micky3879b9f5e72025-07-08 18:04:53 -040015153echo "$as_me:15153: checking for manpage tbl" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015154echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15155
15156# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15157if test "${with_manpage_tbl+set}" = set; then
15158 withval="$with_manpage_tbl"
15159 MANPAGE_TBL=$withval
15160else
15161 MANPAGE_TBL=no
15162fi;
15163
micky3879b9f5e72025-07-08 18:04:53 -040015164echo "$as_me:15164: result: $MANPAGE_TBL" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015165echo "${ECHO_T}$MANPAGE_TBL" >&6
15166
15167if test "$prefix" = "NONE" ; then
15168 cf_prefix="$ac_default_prefix"
15169else
15170 cf_prefix="$prefix"
15171fi
15172
Steve Kondikae271bc2015-11-15 02:50:53 +010015173test ! -d man && mkdir man
15174
Steve Kondikae271bc2015-11-15 02:50:53 +010015175cf_edit_man=./edit_man.sh
15176cf_man_alias=`pwd`/man_alias.sed
15177
15178cat >$cf_edit_man <<CF_EOF
15179#! $SHELL
15180# this script is generated by the configure-script CF_MAN_PAGES macro.
15181
15182prefix="$cf_prefix"
15183datarootdir="$datarootdir"
15184datadir="$datadir"
15185
15186NCURSES_MAJOR="$NCURSES_MAJOR"
15187NCURSES_MINOR="$NCURSES_MINOR"
15188NCURSES_PATCH="$NCURSES_PATCH"
15189
15190NCURSES_OSPEED="$NCURSES_OSPEED"
15191TERMINFO="$TERMINFO"
micky3879b9f5e72025-07-08 18:04:53 -040015192TERMINFO_DIRS="$TERMINFO_DIRS"
Steve Kondikae271bc2015-11-15 02:50:53 +010015193
15194INSTALL="$INSTALL"
15195INSTALL_DATA="$INSTALL_DATA"
15196
15197transform="$program_transform_name"
15198
15199TMP=\${TMPDIR:=/tmp}/man\$\$
micky3879b9f5e72025-07-08 18:04:53 -040015200trap "rm -f \$TMP; exit 1" 1 2 3 15
15201trap "rm -f \$TMP" 0
Steve Kondikae271bc2015-11-15 02:50:53 +010015202
15203form=\$1
15204shift || exit 1
15205
15206verb=\$1
15207shift || exit 1
15208
15209mandir=\$1
15210shift || exit 1
15211
15212srcdir=\$1
15213top_srcdir=\$srcdir/..
15214shift || exit 1
15215
15216if test "\$form" = normal ; then
micky3879b9f5e72025-07-08 18:04:53 -040015217 if test "$cf_manpage_format" = yes ; then
15218 if test "$cf_manpage_inboth" = no ; then
15219 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
Steve Kondikae271bc2015-11-15 02:50:53 +010015220 exit $?
15221 fi
15222 fi
15223 cf_subdir=\$mandir/man
15224 cf_tables=$MANPAGE_TBL
15225else
15226 cf_subdir=\$mandir/cat
15227 cf_tables=yes
15228fi
15229
15230# process the list of source-files
micky3879b9f5e72025-07-08 18:04:53 -040015231for i in "\$@" ; do
Steve Kondikae271bc2015-11-15 02:50:53 +010015232case \$i in
15233(*.orig|*.rej) ;;
15234(*.[0-9]*)
15235 section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
micky3879b9f5e72025-07-08 18:04:53 -040015236 if test "\$verb" = installing ; then
15237 if test ! -d "\$cf_subdir\${section}" ; then
15238 mkdir -p "\$cf_subdir\$section"
Steve Kondikae271bc2015-11-15 02:50:53 +010015239 fi
15240 fi
15241
15242 # replace variables in man page
micky3879b9f5e72025-07-08 18:04:53 -040015243 if test ! -f "$cf_man_alias" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015244cat >>$cf_man_alias <<-CF_EOF2
15245 s,@DATADIR@,\$datadir,g
15246 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15247 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15248 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15249 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15250 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15251 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15252CF_EOF
15253
micky3879b9f5e72025-07-08 18:04:53 -040015254 for cf_name in captoinfo clear infocmp infotocap reset tabs tic toe tput tset
Steve Kondikae271bc2015-11-15 02:50:53 +010015255 do
15256 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
micky3879b9f5e72025-07-08 18:04:53 -040015257 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
Steve Kondikae271bc2015-11-15 02:50:53 +010015258cat >>$cf_edit_man <<-CF_EOF
15259 s,@$cf_NAME@,$cf_name,g
15260CF_EOF
15261 done
15262
15263cat >>$cf_edit_man <<CF_EOF
15264CF_EOF2
15265 echo "...made $cf_man_alias"
15266 fi
15267
15268 aliases=
micky3879b9f5e72025-07-08 18:04:53 -040015269 cf_source=\`basename "\$i"\`
15270 cf_full_alias=\$cf_source
15271 test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15272 if test ! -f "\$cf_full_alias" ; then
15273 echo ".. skipped \$cf_source"
Steve Kondikae271bc2015-11-15 02:50:53 +010015274 continue
15275 fi
15276CF_EOF
15277
15278if test "$MANPAGE_ALIASES" != no ; then
15279cat >>$cf_edit_man <<CF_EOF
15280 nCurses=ignore.3x
micky3879b9f5e72025-07-08 18:04:53 -040015281 cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15282 test "$with_curses_h" = yes && nCurses=ncurses.3x
15283 aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\`
Steve Kondikae271bc2015-11-15 02:50:53 +010015284CF_EOF
15285fi
15286
15287if test "$MANPAGE_RENAMES" = no ; then
15288cat >>$cf_edit_man <<CF_EOF
15289 # perform program transformations for section 1 man pages
15290 if test \$section = 1 ; then
15291 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15292 else
15293 cf_target=\$cf_subdir\${section}/\$cf_source
15294 fi
15295CF_EOF
15296else
15297cat >>$cf_edit_man <<CF_EOF
15298 cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15299 if test -z "\$cf_target" ; then
micky3879b9f5e72025-07-08 18:04:53 -040015300 echo "? missing rename for \$cf_source"
Steve Kondikae271bc2015-11-15 02:50:53 +010015301 cf_target="\$cf_source"
15302 fi
15303 cf_target="\$cf_subdir\${section}/\${cf_target}"
15304
15305CF_EOF
15306fi
15307
15308cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015309 sed -f "$cf_man_alias" \\
Steve Kondikae271bc2015-11-15 02:50:53 +010015310CF_EOF
15311
micky3879b9f5e72025-07-08 18:04:53 -040015312if test "$MANPAGE_RENAMES" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015313cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015314 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
Steve Kondikae271bc2015-11-15 02:50:53 +010015315CF_EOF
15316else
15317cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015318 < "\$i" >\$TMP
Steve Kondikae271bc2015-11-15 02:50:53 +010015319CF_EOF
15320fi
15321
15322cat >>$cf_edit_man <<CF_EOF
15323if test \$cf_tables = yes ; then
15324 tbl \$TMP >\$TMP.out
15325 mv \$TMP.out \$TMP
15326fi
15327CF_EOF
15328
micky3879b9f5e72025-07-08 18:04:53 -040015329if test "$with_overwrite" != yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015330cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015331 sed -e "/\\#[ ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
Steve Kondikae271bc2015-11-15 02:50:53 +010015332 mv \$TMP.out \$TMP
15333CF_EOF
15334fi
15335
micky3879b9f5e72025-07-08 18:04:53 -040015336if test "$with_curses_h" != yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015337cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015338 sed -e "/\\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
Steve Kondikae271bc2015-11-15 02:50:53 +010015339 mv \$TMP.out \$TMP
15340CF_EOF
15341fi
15342
15343cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015344 if test "\$form" = format ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015345 nroff -man \$TMP >\$TMP.out
15346 mv \$TMP.out \$TMP
15347 fi
15348CF_EOF
15349
micky3879b9f5e72025-07-08 18:04:53 -040015350if test -n "$cf_manpage_compress" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015351cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015352 if test "\$verb" = installing ; then
15353 if ( "$cf_manpage_compress" -f \$TMP )
Steve Kondikae271bc2015-11-15 02:50:53 +010015354 then
micky3879b9f5e72025-07-08 18:04:53 -040015355 mv \$TMP.$cf_manpage_so_strip \$TMP
Steve Kondikae271bc2015-11-15 02:50:53 +010015356 fi
15357 fi
micky3879b9f5e72025-07-08 18:04:53 -040015358 cf_target="\$cf_target.$cf_manpage_so_strip"
Steve Kondikae271bc2015-11-15 02:50:53 +010015359CF_EOF
15360fi
15361
15362case "$MANPAGE_FORMAT" in
15363(*BSDI*)
15364cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015365 if test "\$form" = format ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015366 # BSDI installs only .0 suffixes in the cat directories
micky3879b9f5e72025-07-08 18:04:53 -040015367 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
Steve Kondikae271bc2015-11-15 02:50:53 +010015368 fi
15369CF_EOF
15370 ;;
15371esac
15372
15373cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015374 suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15375 extra_suffix=
15376 if test -n "$EXTRA_SUFFIX" ; then
15377 case \$cf_target in
15378 (*${EXTRA_SUFFIX}\$suffix)
15379 extra_suffix="$EXTRA_SUFFIX"
15380 ;;
15381 esac
15382 fi
15383 if test "\$verb" = installing ; then
15384 echo "\$verb \$cf_target"
15385 \$INSTALL_DATA \$TMP "\$cf_target"
15386 test -d "\$cf_subdir\${section}" &&
Steve Kondikae271bc2015-11-15 02:50:53 +010015387 test -n "\$aliases" && (
micky3879b9f5e72025-07-08 18:04:53 -040015388 cd "\$cf_subdir\${section}" && (
15389 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15390 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15391 cf_target=\`basename "\$cf_target"\`
Steve Kondikae271bc2015-11-15 02:50:53 +010015392 for cf_alias in \$aliases
15393 do
micky3879b9f5e72025-07-08 18:04:53 -040015394 if test "\$section" = 1 ; then
15395 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
Steve Kondikae271bc2015-11-15 02:50:53 +010015396 fi
micky3879b9f5e72025-07-08 18:04:53 -040015397 cf_alias="\${cf_alias}\${extra_suffix}"
Steve Kondikae271bc2015-11-15 02:50:53 +010015398
15399 if test "$MANPAGE_SYMLINKS" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040015400 if test -f "\$cf_alias\${suffix}" ; then
15401 if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
Steve Kondikae271bc2015-11-15 02:50:53 +010015402 then
15403 continue
15404 fi
15405 fi
micky3879b9f5e72025-07-08 18:04:53 -040015406 echo ".. \$verb alias \$cf_alias\${suffix}"
Steve Kondikae271bc2015-11-15 02:50:53 +010015407CF_EOF
15408case "x$LN_S" in
15409(*-f)
15410cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015411 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
Steve Kondikae271bc2015-11-15 02:50:53 +010015412CF_EOF
15413 ;;
15414(*)
15415cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015416 rm -f "\$cf_alias\${suffix}"
15417 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
Steve Kondikae271bc2015-11-15 02:50:53 +010015418CF_EOF
15419 ;;
15420esac
15421cat >>$cf_edit_man <<CF_EOF
15422 elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15423 echo ".so \$cf_source" >\$TMP
15424CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015425if test -n "$cf_manpage_compress" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015426cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015427 if test -n "$cf_manpage_so_strip" ; then
15428 "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP
15429 mv \$TMP.$cf_manpage_so_strip \$TMP
Steve Kondikae271bc2015-11-15 02:50:53 +010015430 fi
15431CF_EOF
15432fi
15433cat >>$cf_edit_man <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015434 echo ".. \$verb alias \$cf_alias\${suffix}"
15435 rm -f "\$cf_alias\${suffix}"
15436 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
Steve Kondikae271bc2015-11-15 02:50:53 +010015437 fi
15438 done
15439 )
15440 )
micky3879b9f5e72025-07-08 18:04:53 -040015441 elif test "\$verb" = removing ; then
15442 test -f "\$cf_target" && (
15443 echo "\$verb \$cf_target"
15444 rm -f "\$cf_target"
Steve Kondikae271bc2015-11-15 02:50:53 +010015445 )
micky3879b9f5e72025-07-08 18:04:53 -040015446 test -d "\$cf_subdir\${section}" &&
Steve Kondikae271bc2015-11-15 02:50:53 +010015447 test -n "\$aliases" && (
micky3879b9f5e72025-07-08 18:04:53 -040015448 cd "\$cf_subdir\${section}" && (
Steve Kondikae271bc2015-11-15 02:50:53 +010015449 for cf_alias in \$aliases
15450 do
micky3879b9f5e72025-07-08 18:04:53 -040015451 if test "\$section" = 1 ; then
15452 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
Steve Kondikae271bc2015-11-15 02:50:53 +010015453 fi
micky3879b9f5e72025-07-08 18:04:53 -040015454 cf_alias="\${cf_alias}\${extra_suffix}"
Steve Kondikae271bc2015-11-15 02:50:53 +010015455
micky3879b9f5e72025-07-08 18:04:53 -040015456 echo ".. \$verb alias \$cf_alias\${suffix}"
15457 rm -f "\$cf_alias\${suffix}"
Steve Kondikae271bc2015-11-15 02:50:53 +010015458 done
15459 )
15460 )
15461 else
15462# echo ".hy 0"
15463 cat \$TMP
15464 fi
15465 ;;
15466esac
15467done
15468
micky3879b9f5e72025-07-08 18:04:53 -040015469if test "$cf_manpage_inboth" = yes ; then
15470if test "\$form" != format ; then
15471 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
Steve Kondikae271bc2015-11-15 02:50:53 +010015472fi
15473fi
15474
15475exit 0
15476CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040015477chmod 755 "$cf_edit_man"
Steve Kondikae271bc2015-11-15 02:50:53 +010015478
15479###############################################################################
15480
15481### Note that some functions (such as const) are normally disabled anyway.
micky3879b9f5e72025-07-08 18:04:53 -040015482echo "$as_me:15482: checking if you want to build with function extensions" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015483echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15484
15485# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15486if test "${enable_ext_funcs+set}" = set; then
15487 enableval="$enable_ext_funcs"
15488 with_ext_funcs=$enableval
15489else
15490 with_ext_funcs=yes
15491fi;
micky3879b9f5e72025-07-08 18:04:53 -040015492echo "$as_me:15492: result: $with_ext_funcs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015493echo "${ECHO_T}$with_ext_funcs" >&6
15494if test "x$with_ext_funcs" = xyes ; then
15495 NCURSES_EXT_FUNCS=1
15496
15497cat >>confdefs.h <<\EOF
micky3879b9f5e72025-07-08 18:04:53 -040015498#define NCURSES_EXT_FUNCS 1
15499EOF
15500
15501cat >>confdefs.h <<\EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010015502#define HAVE_ASSUME_DEFAULT_COLORS 1
15503EOF
15504
15505cat >>confdefs.h <<\EOF
15506#define HAVE_CURSES_VERSION 1
15507EOF
15508
15509cat >>confdefs.h <<\EOF
15510#define HAVE_HAS_KEY 1
15511EOF
15512
15513cat >>confdefs.h <<\EOF
15514#define HAVE_RESIZETERM 1
15515EOF
15516
15517cat >>confdefs.h <<\EOF
15518#define HAVE_RESIZE_TERM 1
15519EOF
15520
15521cat >>confdefs.h <<\EOF
15522#define HAVE_TERM_ENTRY_H 1
15523EOF
15524
15525cat >>confdefs.h <<\EOF
15526#define HAVE_USE_DEFAULT_COLORS 1
15527EOF
15528
15529cat >>confdefs.h <<\EOF
15530#define HAVE_USE_SCREEN 1
15531EOF
15532
15533cat >>confdefs.h <<\EOF
15534#define HAVE_USE_WINDOW 1
15535EOF
15536
15537cat >>confdefs.h <<\EOF
15538#define HAVE_WRESIZE 1
15539EOF
15540
Steve Kondikae271bc2015-11-15 02:50:53 +010015541 GENERATED_EXT_FUNCS=generated
micky3879b9f5e72025-07-08 18:04:53 -040015542 test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
Steve Kondikae271bc2015-11-15 02:50:53 +010015543else
15544 NCURSES_EXT_FUNCS=0
15545 GENERATED_EXT_FUNCS=
15546fi
15547
micky3879b9f5e72025-07-08 18:04:53 -040015548echo "$as_me:15548: checking if you want to build with SCREEN extensions" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015549echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15550
15551# Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15552if test "${enable_sp_funcs+set}" = set; then
15553 enableval="$enable_sp_funcs"
15554 with_sp_funcs=$enableval
15555else
15556 with_sp_funcs=$cf_dft_ext_spfuncs
15557fi;
micky3879b9f5e72025-07-08 18:04:53 -040015558echo "$as_me:15558: result: $with_sp_funcs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015559echo "${ECHO_T}$with_sp_funcs" >&6
15560if test "x$with_sp_funcs" = xyes ; then
15561 NCURSES_SP_FUNCS=1
15562
15563cat >>confdefs.h <<\EOF
15564#define NCURSES_SP_FUNCS 1
15565EOF
15566
micky3879b9f5e72025-07-08 18:04:53 -040015567cat >>confdefs.h <<\EOF
15568#define HAVE_TPUTS_SP 1
15569EOF
15570
Steve Kondikae271bc2015-11-15 02:50:53 +010015571 GENERATED_SP_FUNCS=generated
15572else
15573 NCURSES_SP_FUNCS=0
15574 GENERATED_SP_FUNCS=
15575fi
15576
micky3879b9f5e72025-07-08 18:04:53 -040015577echo "$as_me:15577: checking if you want to build with terminal-driver" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015578echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15579
15580# Check whether --enable-term-driver or --disable-term-driver was given.
15581if test "${enable_term_driver+set}" = set; then
15582 enableval="$enable_term_driver"
15583 with_term_driver=$enableval
15584else
15585 with_term_driver=no
15586fi;
micky3879b9f5e72025-07-08 18:04:53 -040015587echo "$as_me:15587: result: $with_term_driver" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015588echo "${ECHO_T}$with_term_driver" >&6
15589if test "x$with_term_driver" = xyes ; then
15590
15591cat >>confdefs.h <<\EOF
15592#define USE_TERM_DRIVER 1
15593EOF
15594
15595 if test "x$with_termlib" != xno ; then
micky3879b9f5e72025-07-08 18:04:53 -040015596 { { echo "$as_me:15596: error: The term-driver option conflicts with the termlib option" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015597echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15598 { (exit 1); exit 1; }; }
15599 fi
15600 if test "x$with_sp_funcs" != xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040015601 { { echo "$as_me:15601: error: The term-driver option relies upon sp-funcs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015602echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15603 { (exit 1); exit 1; }; }
15604 fi
15605fi
15606
15607### use option --enable-const to turn on use of const beyond that in XSI.
micky3879b9f5e72025-07-08 18:04:53 -040015608echo "$as_me:15608: checking for extended use of const keyword" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015609echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15610
15611# Check whether --enable-const or --disable-const was given.
15612if test "${enable_const+set}" = set; then
15613 enableval="$enable_const"
15614 with_ext_const=$enableval
15615else
15616 with_ext_const=$cf_dft_ext_const
15617fi;
micky3879b9f5e72025-07-08 18:04:53 -040015618echo "$as_me:15618: result: $with_ext_const" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015619echo "${ECHO_T}$with_ext_const" >&6
15620NCURSES_CONST='/*nothing*/'
15621if test "x$with_ext_const" = xyes ; then
15622 NCURSES_CONST=const
15623fi
15624
15625### use option --enable-ext-colors to turn on use of colors beyond 16.
micky3879b9f5e72025-07-08 18:04:53 -040015626echo "$as_me:15626: checking if you want to use extended colors" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015627echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15628
15629# Check whether --enable-ext-colors or --disable-ext-colors was given.
15630if test "${enable_ext_colors+set}" = set; then
15631 enableval="$enable_ext_colors"
15632 with_ext_colors=$enableval
15633else
15634 with_ext_colors=$cf_dft_ext_colors
15635fi;
micky3879b9f5e72025-07-08 18:04:53 -040015636echo "$as_me:15636: result: $with_ext_colors" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015637echo "${ECHO_T}$with_ext_colors" >&6
15638NCURSES_EXT_COLORS=0
15639if test "x$with_ext_colors" = xyes ; then
15640 if test "x$with_widec" != xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040015641 { echo "$as_me:15641: WARNING: This option applies only to wide-character library" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015642echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15643 else
15644 # cannot be ABI 5 since it changes sizeof(cchar_t)
15645
15646if test "${with_abi_version+set}" != set; then
micky3879b9f5e72025-07-08 18:04:53 -040015647 case "$cf_cv_rel_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +010015648 (5.*)
15649 cf_cv_rel_version=6.0
15650 cf_cv_abi_version=6
micky3879b9f5e72025-07-08 18:04:53 -040015651 cf_cv_abi_default=6
15652 { echo "$as_me:15652: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15653echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +010015654 ;;
15655 esac
15656fi
15657
15658 NCURSES_EXT_COLORS=1
15659
15660cat >>confdefs.h <<\EOF
15661#define NCURSES_EXT_COLORS 1
15662EOF
15663
micky3879b9f5e72025-07-08 18:04:53 -040015664cat >>confdefs.h <<\EOF
15665#define HAVE_ALLOC_PAIR 1
15666EOF
15667
15668cat >>confdefs.h <<\EOF
15669#define HAVE_INIT_EXTENDED_COLOR 1
15670EOF
15671
15672cat >>confdefs.h <<\EOF
15673#define HAVE_RESET_COLOR_PAIRS 1
15674EOF
15675
Steve Kondikae271bc2015-11-15 02:50:53 +010015676 fi
15677fi
15678
15679### use option --enable-ext-mouse to modify coding to support 5-button mice
micky3879b9f5e72025-07-08 18:04:53 -040015680echo "$as_me:15680: checking if you want to use extended mouse encoding" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015681echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15682
15683# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15684if test "${enable_ext_mouse+set}" = set; then
15685 enableval="$enable_ext_mouse"
15686 with_ext_mouse=$enableval
15687else
15688 with_ext_mouse=$cf_dft_ext_mouse
15689fi;
micky3879b9f5e72025-07-08 18:04:53 -040015690echo "$as_me:15690: result: $with_ext_mouse" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015691echo "${ECHO_T}$with_ext_mouse" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010015692if test "x$with_ext_mouse" = xyes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015693
15694if test "${with_abi_version+set}" != set; then
micky3879b9f5e72025-07-08 18:04:53 -040015695 case "$cf_cv_rel_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +010015696 (5.*)
15697 cf_cv_rel_version=6.0
15698 cf_cv_abi_version=6
micky3879b9f5e72025-07-08 18:04:53 -040015699 cf_cv_abi_default=6
15700 { echo "$as_me:15700: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15701echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +010015702 ;;
15703 esac
15704fi
15705
15706fi
15707
micky3879b9f5e72025-07-08 18:04:53 -040015708if test $cf_cv_abi_default -le 5 ; then
15709 NCURSES_MOUSE_VERSION=1
15710elif test $cf_cv_abi_default -le 6 ; then
15711 NCURSES_MOUSE_VERSION=2
15712else
15713 NCURSES_MOUSE_VERSION=3
15714fi
15715
Steve Kondikae271bc2015-11-15 02:50:53 +010015716### use option --enable-ext-putwin to turn on extended screendumps
micky3879b9f5e72025-07-08 18:04:53 -040015717echo "$as_me:15717: checking if you want to use extended putwin/screendump" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015718echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15719
15720# Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15721if test "${enable_ext_putwin+set}" = set; then
15722 enableval="$enable_ext_putwin"
15723 with_ext_putwin=$enableval
15724else
15725 with_ext_putwin=$cf_dft_ext_putwin
15726fi;
micky3879b9f5e72025-07-08 18:04:53 -040015727echo "$as_me:15727: result: $with_ext_putwin" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015728echo "${ECHO_T}$with_ext_putwin" >&6
15729if test "x$with_ext_putwin" = xyes ; then
15730
15731cat >>confdefs.h <<\EOF
15732#define NCURSES_EXT_PUTWIN 1
15733EOF
15734
15735fi
15736
micky3879b9f5e72025-07-08 18:04:53 -040015737echo "$as_me:15737: checking if you want \$NCURSES_NO_PADDING code" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015738echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15739
15740# Check whether --enable-no-padding or --disable-no-padding was given.
15741if test "${enable_no_padding+set}" = set; then
15742 enableval="$enable_no_padding"
15743 with_no_padding=$enableval
15744else
15745 with_no_padding=$with_ext_funcs
15746fi;
micky3879b9f5e72025-07-08 18:04:53 -040015747echo "$as_me:15747: result: $with_no_padding" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015748echo "${ECHO_T}$with_no_padding" >&6
15749test "x$with_no_padding" = xyes &&
15750cat >>confdefs.h <<\EOF
15751#define NCURSES_NO_PADDING 1
15752EOF
15753
Steve Kondikae271bc2015-11-15 02:50:53 +010015754### use option --enable-sigwinch to turn on use of SIGWINCH logic
micky3879b9f5e72025-07-08 18:04:53 -040015755echo "$as_me:15755: checking if you want SIGWINCH handler" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015756echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15757
15758# Check whether --enable-sigwinch or --disable-sigwinch was given.
15759if test "${enable_sigwinch+set}" = set; then
15760 enableval="$enable_sigwinch"
15761 with_sigwinch=$enableval
15762else
15763 with_sigwinch=$with_ext_funcs
15764fi;
micky3879b9f5e72025-07-08 18:04:53 -040015765echo "$as_me:15765: result: $with_sigwinch" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015766echo "${ECHO_T}$with_sigwinch" >&6
micky3879b9f5e72025-07-08 18:04:53 -040015767if test "x$with_sigwinch" = xyes
15768then
15769
Steve Kondikae271bc2015-11-15 02:50:53 +010015770cat >>confdefs.h <<\EOF
15771#define USE_SIGWINCH 1
15772EOF
15773
micky3879b9f5e72025-07-08 18:04:53 -040015774 cf_cv_enable_sigwinch=1
15775else
15776 cf_cv_enable_sigwinch=0
15777fi
15778
Steve Kondikae271bc2015-11-15 02:50:53 +010015779### use option --enable-tcap-names to allow user to define new capabilities
micky3879b9f5e72025-07-08 18:04:53 -040015780echo "$as_me:15780: checking if you want user-definable terminal capabilities like termcap" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015781echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15782
15783# Check whether --enable-tcap-names or --disable-tcap-names was given.
15784if test "${enable_tcap_names+set}" = set; then
15785 enableval="$enable_tcap_names"
15786 with_tcap_names=$enableval
15787else
15788 with_tcap_names=$with_ext_funcs
15789fi;
micky3879b9f5e72025-07-08 18:04:53 -040015790echo "$as_me:15790: result: $with_tcap_names" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015791echo "${ECHO_T}$with_tcap_names" >&6
15792NCURSES_XNAMES=0
micky3879b9f5e72025-07-08 18:04:53 -040015793if test "x$with_tcap_names" = xyes; then
15794 NCURSES_XNAMES=1
Steve Kondikae271bc2015-11-15 02:50:53 +010015795
Steve Kondikae271bc2015-11-15 02:50:53 +010015796cat >>confdefs.h <<\EOF
micky3879b9f5e72025-07-08 18:04:53 -040015797#define NCURSES_XNAMES 1
Steve Kondikae271bc2015-11-15 02:50:53 +010015798EOF
15799
micky3879b9f5e72025-07-08 18:04:53 -040015800fi
Steve Kondikae271bc2015-11-15 02:50:53 +010015801
micky3879b9f5e72025-07-08 18:04:53 -040015802##############################################################################
Steve Kondikae271bc2015-11-15 02:50:53 +010015803
micky3879b9f5e72025-07-08 18:04:53 -040015804echo "$as_me:15804: checking if you want to link with the pthread library" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015805echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15806
15807# Check whether --with-pthread or --without-pthread was given.
15808if test "${with_pthread+set}" = set; then
15809 withval="$with_pthread"
15810 with_pthread=$withval
15811else
15812 with_pthread=no
15813fi;
micky3879b9f5e72025-07-08 18:04:53 -040015814echo "$as_me:15814: result: $with_pthread" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015815echo "${ECHO_T}$with_pthread" >&6
15816
15817if test "$with_pthread" != no ; then
micky3879b9f5e72025-07-08 18:04:53 -040015818 echo "$as_me:15818: checking for pthread.h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015819echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15820if test "${ac_cv_header_pthread_h+set}" = set; then
15821 echo $ECHO_N "(cached) $ECHO_C" >&6
15822else
micky3879b9f5e72025-07-08 18:04:53 -040015823 cat >"conftest.$ac_ext" <<_ACEOF
15824#line 15824 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010015825#include "confdefs.h"
15826#include <pthread.h>
15827_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040015828if { (eval echo "$as_me:15828: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15829 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +010015830 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040015831 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +010015832 rm -f conftest.er1
15833 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040015834 echo "$as_me:15834: \$? = $ac_status" >&5
15835 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015836 if test -s conftest.err; then
15837 ac_cpp_err=$ac_c_preproc_warn_flag
15838 else
15839 ac_cpp_err=
15840 fi
15841else
15842 ac_cpp_err=yes
15843fi
15844if test -z "$ac_cpp_err"; then
15845 ac_cv_header_pthread_h=yes
15846else
15847 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040015848 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015849 ac_cv_header_pthread_h=no
15850fi
micky3879b9f5e72025-07-08 18:04:53 -040015851rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010015852fi
micky3879b9f5e72025-07-08 18:04:53 -040015853echo "$as_me:15853: result: $ac_cv_header_pthread_h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015854echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
micky3879b9f5e72025-07-08 18:04:53 -040015855if test "$ac_cv_header_pthread_h" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015856
15857cat >>confdefs.h <<\EOF
15858#define HAVE_PTHREADS_H 1
15859EOF
15860
15861 for cf_lib_pthread in pthread c_r
15862 do
micky3879b9f5e72025-07-08 18:04:53 -040015863 echo "$as_me:15863: checking if we can link with the $cf_lib_pthread library" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015864echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15865 cf_save_LIBS="$LIBS"
15866
micky3879b9f5e72025-07-08 18:04:53 -040015867cf_add_libs="$LIBS"
15868# reverse order
15869cf_add_0lib=
15870for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15871# filter duplicates
15872for cf_add_1lib in $cf_add_0lib; do
15873 for cf_add_2lib in $cf_add_libs; do
15874 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015875 cf_add_1lib=
15876 break
15877 fi
15878 done
micky3879b9f5e72025-07-08 18:04:53 -040015879 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010015880done
15881LIBS="$cf_add_libs"
15882
micky3879b9f5e72025-07-08 18:04:53 -040015883 cat >"conftest.$ac_ext" <<_ACEOF
15884#line 15884 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010015885#include "confdefs.h"
15886
15887#include <pthread.h>
15888
15889int
micky3879b9f5e72025-07-08 18:04:53 -040015890main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010015891{
15892
15893 int rc = pthread_create(0,0,0,0);
15894 int r2 = pthread_mutexattr_settype(0, 0);
15895
15896 ;
15897 return 0;
15898}
15899_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040015900rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15901if { (eval echo "$as_me:15901: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015902 (eval $ac_link) 2>&5
15903 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040015904 echo "$as_me:15904: \$? = $ac_status" >&5
15905 (exit "$ac_status"); } &&
15906 { ac_try='test -s "conftest$ac_exeext"'
15907 { (eval echo "$as_me:15907: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015908 (eval $ac_try) 2>&5
15909 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040015910 echo "$as_me:15910: \$? = $ac_status" >&5
15911 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015912 with_pthread=yes
15913else
15914 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040015915cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015916with_pthread=no
15917fi
micky3879b9f5e72025-07-08 18:04:53 -040015918rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010015919 LIBS="$cf_save_LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040015920 echo "$as_me:15920: result: $with_pthread" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015921echo "${ECHO_T}$with_pthread" >&6
15922 test "$with_pthread" = yes && break
15923 done
15924
15925 if test "$with_pthread" = yes ; then
15926
micky3879b9f5e72025-07-08 18:04:53 -040015927cf_add_libs="$LIBS"
15928# reverse order
15929cf_add_0lib=
15930for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15931# filter duplicates
15932for cf_add_1lib in $cf_add_0lib; do
15933 for cf_add_2lib in $cf_add_libs; do
15934 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010015935 cf_add_1lib=
15936 break
15937 fi
15938 done
micky3879b9f5e72025-07-08 18:04:53 -040015939 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010015940done
15941LIBS="$cf_add_libs"
15942
15943cat >>confdefs.h <<\EOF
15944#define HAVE_LIBPTHREADS 1
15945EOF
15946
15947 else
micky3879b9f5e72025-07-08 18:04:53 -040015948 { { echo "$as_me:15948: error: Cannot link with pthread library" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015949echo "$as_me: error: Cannot link with pthread library" >&2;}
15950 { (exit 1); exit 1; }; }
15951 fi
15952
15953fi
15954
15955fi
15956
15957if test "x$with_pthread" != xno; then
micky3879b9f5e72025-07-08 18:04:53 -040015958 echo "$as_me:15958: checking for pthread_kill" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015959echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15960if test "${ac_cv_func_pthread_kill+set}" = set; then
15961 echo $ECHO_N "(cached) $ECHO_C" >&6
15962else
micky3879b9f5e72025-07-08 18:04:53 -040015963 cat >"conftest.$ac_ext" <<_ACEOF
15964#line 15964 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010015965#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040015966#define pthread_kill autoconf_temporary
15967#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15968#undef pthread_kill
15969
Steve Kondikae271bc2015-11-15 02:50:53 +010015970#ifdef __cplusplus
15971extern "C"
15972#endif
micky3879b9f5e72025-07-08 18:04:53 -040015973
Steve Kondikae271bc2015-11-15 02:50:53 +010015974/* We use char because int might match the return type of a gcc2
15975 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040015976char pthread_kill (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010015977
15978int
micky3879b9f5e72025-07-08 18:04:53 -040015979main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010015980{
micky3879b9f5e72025-07-08 18:04:53 -040015981
15982/* The GNU C library defines stubs for functions which it implements
Steve Kondikae271bc2015-11-15 02:50:53 +010015983 to always fail with ENOSYS. Some functions are actually named
15984 something starting with __ and the normal name is an alias. */
15985#if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
micky3879b9f5e72025-07-08 18:04:53 -040015986#error found stub for pthread_kill
Steve Kondikae271bc2015-11-15 02:50:53 +010015987#endif
15988
micky3879b9f5e72025-07-08 18:04:53 -040015989 return pthread_kill ();
Steve Kondikae271bc2015-11-15 02:50:53 +010015990 ;
15991 return 0;
15992}
15993_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040015994rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15995if { (eval echo "$as_me:15995: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010015996 (eval $ac_link) 2>&5
15997 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040015998 echo "$as_me:15998: \$? = $ac_status" >&5
15999 (exit "$ac_status"); } &&
16000 { ac_try='test -s "conftest$ac_exeext"'
16001 { (eval echo "$as_me:16001: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016002 (eval $ac_try) 2>&5
16003 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040016004 echo "$as_me:16004: \$? = $ac_status" >&5
16005 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016006 ac_cv_func_pthread_kill=yes
16007else
16008 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040016009cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016010ac_cv_func_pthread_kill=no
16011fi
micky3879b9f5e72025-07-08 18:04:53 -040016012rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010016013fi
micky3879b9f5e72025-07-08 18:04:53 -040016014echo "$as_me:16014: result: $ac_cv_func_pthread_kill" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016015echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
micky3879b9f5e72025-07-08 18:04:53 -040016016if test "$ac_cv_func_pthread_kill" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016017
micky3879b9f5e72025-07-08 18:04:53 -040016018 echo "$as_me:16018: checking if you want to allow EINTR in wgetch with pthreads" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016019echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
16020
16021# Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
16022if test "${enable_pthreads_eintr+set}" = set; then
16023 enableval="$enable_pthreads_eintr"
16024 use_pthreads_eintr=$enableval
16025else
16026 use_pthreads_eintr=no
16027fi;
micky3879b9f5e72025-07-08 18:04:53 -040016028 echo "$as_me:16028: result: $use_pthreads_eintr" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016029echo "${ECHO_T}$use_pthreads_eintr" >&6
16030 if test "x$use_pthreads_eintr" = xyes ; then
16031
16032cat >>confdefs.h <<\EOF
16033#define USE_PTHREADS_EINTR 1
16034EOF
16035
16036 fi
16037fi
16038
micky3879b9f5e72025-07-08 18:04:53 -040016039 echo "$as_me:16039: checking if you want to use weak-symbols for pthreads" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016040echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16041
16042# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16043if test "${enable_weak_symbols+set}" = set; then
16044 enableval="$enable_weak_symbols"
16045 use_weak_symbols=$enableval
16046else
16047 use_weak_symbols=no
16048fi;
micky3879b9f5e72025-07-08 18:04:53 -040016049 echo "$as_me:16049: result: $use_weak_symbols" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016050echo "${ECHO_T}$use_weak_symbols" >&6
16051 if test "x$use_weak_symbols" = xyes ; then
16052
micky3879b9f5e72025-07-08 18:04:53 -040016053echo "$as_me:16053: checking if $CC supports weak symbols" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016054echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16055if test "${cf_cv_weak_symbols+set}" = set; then
16056 echo $ECHO_N "(cached) $ECHO_C" >&6
16057else
16058
micky3879b9f5e72025-07-08 18:04:53 -040016059cat >"conftest.$ac_ext" <<_ACEOF
16060#line 16060 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010016061#include "confdefs.h"
16062
16063#include <stdio.h>
16064int
micky3879b9f5e72025-07-08 18:04:53 -040016065main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010016066{
16067
16068#if defined(__GNUC__)
16069# if defined __USE_ISOC99
16070# define _cat_pragma(exp) _Pragma(#exp)
16071# define _weak_pragma(exp) _cat_pragma(weak name)
16072# else
16073# define _weak_pragma(exp)
16074# endif
16075# define _declare(name) __extension__ extern __typeof__(name) name
16076# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
16077#endif
16078
16079weak_symbol(fopen);
16080
16081 ;
16082 return 0;
16083}
16084_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040016085rm -f "conftest.$ac_objext"
16086if { (eval echo "$as_me:16086: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016087 (eval $ac_compile) 2>&5
16088 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040016089 echo "$as_me:16089: \$? = $ac_status" >&5
16090 (exit "$ac_status"); } &&
16091 { ac_try='test -s "conftest.$ac_objext"'
16092 { (eval echo "$as_me:16092: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016093 (eval $ac_try) 2>&5
16094 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040016095 echo "$as_me:16095: \$? = $ac_status" >&5
16096 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016097 cf_cv_weak_symbols=yes
16098else
16099 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040016100cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016101cf_cv_weak_symbols=no
16102fi
micky3879b9f5e72025-07-08 18:04:53 -040016103rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010016104
16105fi
micky3879b9f5e72025-07-08 18:04:53 -040016106echo "$as_me:16106: result: $cf_cv_weak_symbols" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016107echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16108
16109 else
16110 cf_cv_weak_symbols=no
16111 fi
16112
16113 if test "x$cf_cv_weak_symbols" = xyes ; then
16114
16115cat >>confdefs.h <<\EOF
16116#define USE_WEAK_SYMBOLS 1
16117EOF
16118
16119 fi
16120fi
16121
16122PTHREAD=
16123if test "x$with_pthread" = "xyes" ; then
16124
16125cat >>confdefs.h <<\EOF
16126#define USE_PTHREADS 1
16127EOF
16128
16129 enable_reentrant=yes
16130 if test "x$cf_cv_weak_symbols" = xyes ; then
16131 PTHREAD=-lpthread
micky3879b9f5e72025-07-08 18:04:53 -040016132
16133cf_add_libs="$PRIVATE_LIBS"
16134# reverse order
16135cf_add_0lib=
16136for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16137# filter duplicates
16138for cf_add_1lib in $cf_add_0lib; do
16139 for cf_add_2lib in $cf_add_libs; do
16140 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16141 cf_add_1lib=
16142 break
16143 fi
16144 done
16145 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16146done
16147PRIVATE_LIBS="$cf_add_libs"
16148
Steve Kondikae271bc2015-11-15 02:50:53 +010016149 fi
16150fi
16151
16152# Reentrant code has to be opaque; there's little advantage to making ncurses
16153# opaque outside of that, so there is no --enable-opaque option. We can use
16154# this option without --with-pthreads, but this will be always set for
16155# pthreads.
micky3879b9f5e72025-07-08 18:04:53 -040016156echo "$as_me:16156: checking if you want reentrant code" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016157echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16158
16159# Check whether --enable-reentrant or --disable-reentrant was given.
16160if test "${enable_reentrant+set}" = set; then
16161 enableval="$enable_reentrant"
16162 with_reentrant=$enableval
16163else
16164 with_reentrant=no
16165fi;
micky3879b9f5e72025-07-08 18:04:53 -040016166echo "$as_me:16166: result: $with_reentrant" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016167echo "${ECHO_T}$with_reentrant" >&6
16168if test "x$with_reentrant" = xyes ; then
16169 cf_cv_enable_reentrant=1
16170 cf_cv_enable_opaque="NCURSES_INTERNALS"
Steve Kondikae271bc2015-11-15 02:50:53 +010016171 NCURSES_SIZE_T=int
16172 if test "x$cf_cv_weak_symbols" = xyes ; then
16173
16174# remove pthread library from $LIBS
16175LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
16176
micky3879b9f5e72025-07-08 18:04:53 -040016177cf_add_libs="$TEST_LIBS"
16178# reverse order
16179cf_add_0lib=
16180for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16181# filter duplicates
16182for cf_add_1lib in $cf_add_0lib; do
16183 for cf_add_2lib in $cf_add_libs; do
16184 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016185 cf_add_1lib=
16186 break
16187 fi
16188 done
micky3879b9f5e72025-07-08 18:04:53 -040016189 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010016190done
16191TEST_LIBS="$cf_add_libs"
16192
micky3879b9f5e72025-07-08 18:04:53 -040016193cf_add_libs="$TEST_LIBS2"
16194# reverse order
16195cf_add_0lib=
16196for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16197# filter duplicates
16198for cf_add_1lib in $cf_add_0lib; do
16199 for cf_add_2lib in $cf_add_libs; do
16200 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010016201 cf_add_1lib=
16202 break
16203 fi
16204 done
micky3879b9f5e72025-07-08 18:04:53 -040016205 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010016206done
16207TEST_LIBS2="$cf_add_libs"
16208
micky3879b9f5e72025-07-08 18:04:53 -040016209cf_add_libs="$PRIVATE_LIBS"
16210# reverse order
16211cf_add_0lib=
16212for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16213# filter duplicates
16214for cf_add_1lib in $cf_add_0lib; do
16215 for cf_add_2lib in $cf_add_libs; do
16216 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16217 cf_add_1lib=
16218 break
16219 fi
16220 done
16221 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16222done
16223PRIVATE_LIBS="$cf_add_libs"
16224
Steve Kondikae271bc2015-11-15 02:50:53 +010016225 else
16226 # when not using weak symbols but with_reentrant,
16227 # add 't' to the library suffix on all platforms
16228 # except cygwin, where we only do that if ALSO
16229 # compiling with full thread support.
16230 case "$host" in
16231 (*cygwin* | *msys*)
16232 if test "$with_pthread" = "yes" ; then
16233 if test "x$disable_lib_suffixes" = "xno" ; then
16234 LIB_SUFFIX="t${LIB_SUFFIX}"
16235 fi
16236 fi ;;
16237 (*)
16238 if test "x$disable_lib_suffixes" = "xno" ; then
16239 LIB_SUFFIX="t${LIB_SUFFIX}"
16240 fi
16241 ;;
16242 esac
16243 fi
16244
16245cat >>confdefs.h <<\EOF
16246#define USE_REENTRANT 1
16247EOF
16248
16249if test "${with_abi_version+set}" != set; then
micky3879b9f5e72025-07-08 18:04:53 -040016250 case "$cf_cv_rel_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +010016251 (5.*)
16252 cf_cv_rel_version=6.0
16253 cf_cv_abi_version=6
micky3879b9f5e72025-07-08 18:04:53 -040016254 cf_cv_abi_default=6
16255 { echo "$as_me:16255: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16256echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +010016257 ;;
16258 esac
16259fi
16260
16261else
16262 cf_cv_enable_reentrant=0
16263 cf_cv_enable_opaque="NCURSES_OPAQUE"
micky3879b9f5e72025-07-08 18:04:53 -040016264 NCURSES_SIZE_T=$cf_dft_ordinate_type
Steve Kondikae271bc2015-11-15 02:50:53 +010016265fi
16266
micky3879b9f5e72025-07-08 18:04:53 -040016267echo "$as_me:16267: checking whether curses library structures should be opaque" >&5
16268echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16269
16270# Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16271if test "${enable_opaque_curses+set}" = set; then
16272 enableval="$enable_opaque_curses"
16273 test "$enableval" != no && enableval=yes
16274 if test "$enableval" != "yes" ; then
16275 enable_opaque_curses=no
16276 else
16277
16278 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16279 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16280
16281 fi
16282else
16283 enableval=yes
16284
16285 test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16286 test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16287
16288fi;
16289echo "$as_me:16289: result: $enable_opaque_curses" >&5
16290echo "${ECHO_T}$enable_opaque_curses" >&6
16291
16292test "$cf_cv_enable_reentrant" = 1 && \
16293test "$enable_opaque_curses" = no && \
16294{ { echo "$as_me:16294: error: reentrant configuration requires opaque library" >&5
16295echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16296 { (exit 1); exit 1; }; }
16297
16298echo "$as_me:16298: checking whether form library structures should be opaque" >&5
16299echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16300
16301# Check whether --enable-opaque-form or --disable-opaque-form was given.
16302if test "${enable_opaque_form+set}" = set; then
16303 enableval="$enable_opaque_form"
16304 test "$enableval" != no && enableval=yes
16305 if test "$enableval" != "yes" ; then
16306 enable_opaque_form=no
16307 else
16308 enable_opaque_form=$cf_dft_opaque_curses
16309 fi
16310else
16311 enableval=yes
16312 enable_opaque_form=$cf_dft_opaque_curses
16313
16314fi;
16315echo "$as_me:16315: result: $enable_opaque_form" >&5
16316echo "${ECHO_T}$enable_opaque_form" >&6
16317
16318echo "$as_me:16318: checking whether menu library structures should be opaque" >&5
16319echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16320
16321# Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16322if test "${enable_opaque_menu+set}" = set; then
16323 enableval="$enable_opaque_menu"
16324 test "$enableval" != no && enableval=yes
16325 if test "$enableval" != "yes" ; then
16326 enable_opaque_menu=no
16327 else
16328 enable_opaque_menu=$cf_dft_opaque_curses
16329 fi
16330else
16331 enableval=yes
16332 enable_opaque_menu=$cf_dft_opaque_curses
16333
16334fi;
16335echo "$as_me:16335: result: $enable_opaque_menu" >&5
16336echo "${ECHO_T}$enable_opaque_menu" >&6
16337
16338echo "$as_me:16338: checking whether panel library structures should be opaque" >&5
16339echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16340
16341# Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16342if test "${enable_opaque_panel+set}" = set; then
16343 enableval="$enable_opaque_panel"
16344 test "$enableval" != no && enableval=yes
16345 if test "$enableval" != "yes" ; then
16346 enable_opaque_panel=no
16347 else
16348 enable_opaque_panel=$cf_dft_opaque_curses
16349 fi
16350else
16351 enableval=yes
16352 enable_opaque_panel=$cf_dft_opaque_curses
16353
16354fi;
16355echo "$as_me:16355: result: $enable_opaque_panel" >&5
16356echo "${ECHO_T}$enable_opaque_panel" >&6
16357
16358NCURSES_OPAQUE=0; test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16359NCURSES_OPAQUE_FORM=0; test "$enable_opaque_form" = yes && NCURSES_OPAQUE_FORM=1
16360NCURSES_OPAQUE_MENU=0; test "$enable_opaque_menu" = yes && NCURSES_OPAQUE_MENU=1
16361NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel" = yes && NCURSES_OPAQUE_PANEL=1
16362
Steve Kondikae271bc2015-11-15 02:50:53 +010016363### Allow using a different wrap-prefix
16364if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
micky3879b9f5e72025-07-08 18:04:53 -040016365 echo "$as_me:16365: checking for prefix used to wrap public variables" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016366echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16367
16368# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16369if test "${with_wrap_prefix+set}" = set; then
16370 withval="$with_wrap_prefix"
16371 NCURSES_WRAP_PREFIX=$withval
16372else
16373 NCURSES_WRAP_PREFIX=_nc_
16374fi;
micky3879b9f5e72025-07-08 18:04:53 -040016375 echo "$as_me:16375: result: $NCURSES_WRAP_PREFIX" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016376echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16377else
16378 NCURSES_WRAP_PREFIX=_nc_
16379fi
16380
16381cat >>confdefs.h <<EOF
16382#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16383EOF
16384
micky3879b9f5e72025-07-08 18:04:53 -040016385###############################################################################
16386# These options are relatively safe to experiment with.
16387
16388echo "$as_me:16388: checking if you want all development code" >&5
16389echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16390
16391# Check whether --with-develop or --without-develop was given.
16392if test "${with_develop+set}" = set; then
16393 withval="$with_develop"
16394 with_develop=$withval
16395else
16396 with_develop=no
16397fi;
16398echo "$as_me:16398: result: $with_develop" >&5
16399echo "${ECHO_T}$with_develop" >&6
16400
16401### use option --enable-check-size to detect screensize with CPR
16402echo "$as_me:16402: checking if you want to check screensize of serial terminals" >&5
16403echo $ECHO_N "checking if you want to check screensize of serial terminals... $ECHO_C" >&6
16404
16405# Check whether --enable-check-size or --disable-check-size was given.
16406if test "${enable_check_size+set}" = set; then
16407 enableval="$enable_check_size"
16408
16409else
16410 enable_check_size=$with_develop
16411fi;
16412echo "$as_me:16412: result: $enable_check_size" >&5
16413echo "${ECHO_T}$enable_check_size" >&6
16414test "x$enable_check_size" = xyes &&
16415cat >>confdefs.h <<\EOF
16416#define USE_CHECK_SIZE 1
16417EOF
16418
16419### use option --enable-hard-tabs to turn on use of hard-tabs optimize
16420echo "$as_me:16420: checking if you want hard-tabs code" >&5
16421echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16422
16423# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16424if test "${enable_hard_tabs+set}" = set; then
16425 enableval="$enable_hard_tabs"
16426
16427else
16428 enable_hard_tabs=$with_develop
16429fi;
16430echo "$as_me:16430: result: $enable_hard_tabs" >&5
16431echo "${ECHO_T}$enable_hard_tabs" >&6
16432test "x$enable_hard_tabs" = xyes &&
16433cat >>confdefs.h <<\EOF
16434#define USE_HARD_TABS 1
16435EOF
16436
16437### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16438echo "$as_me:16438: checking if you want limited support for xmc" >&5
16439echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16440
16441# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16442if test "${enable_xmc_glitch+set}" = set; then
16443 enableval="$enable_xmc_glitch"
16444
16445else
16446 enable_xmc_glitch=$with_develop
16447fi;
16448echo "$as_me:16448: result: $enable_xmc_glitch" >&5
16449echo "${ECHO_T}$enable_xmc_glitch" >&6
16450test "x$enable_xmc_glitch" = xyes &&
16451cat >>confdefs.h <<\EOF
16452#define USE_XMC_SUPPORT 1
16453EOF
16454
16455###############################################################################
16456# These are just experimental, probably should not be in a package:
16457
16458echo "$as_me:16458: checking if you do not want to assume colors are white-on-black" >&5
16459echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16460
16461# Check whether --enable-assumed-color or --disable-assumed-color was given.
16462if test "${enable_assumed_color+set}" = set; then
16463 enableval="$enable_assumed_color"
16464 with_assumed_color=$enableval
16465else
16466 with_assumed_color=yes
16467fi;
16468echo "$as_me:16468: result: $with_assumed_color" >&5
16469echo "${ECHO_T}$with_assumed_color" >&6
16470test "x$with_assumed_color" = xyes &&
16471cat >>confdefs.h <<\EOF
16472#define USE_ASSUMED_COLOR 1
16473EOF
16474
16475### use option --enable-hashmap to turn on use of hashmap scrolling logic
16476echo "$as_me:16476: checking if you want hashmap scrolling-optimization code" >&5
16477echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16478
16479# Check whether --enable-hashmap or --disable-hashmap was given.
16480if test "${enable_hashmap+set}" = set; then
16481 enableval="$enable_hashmap"
16482 with_hashmap=$enableval
16483else
16484 with_hashmap=yes
16485fi;
16486echo "$as_me:16486: result: $with_hashmap" >&5
16487echo "${ECHO_T}$with_hashmap" >&6
16488test "x$with_hashmap" = xyes &&
16489cat >>confdefs.h <<\EOF
16490#define USE_HASHMAP 1
16491EOF
16492
16493### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16494echo "$as_me:16494: checking if you want colorfgbg code" >&5
16495echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16496
16497# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16498if test "${enable_colorfgbg+set}" = set; then
16499 enableval="$enable_colorfgbg"
16500 with_colorfgbg=$enableval
16501else
16502 with_colorfgbg=no
16503fi;
16504echo "$as_me:16504: result: $with_colorfgbg" >&5
16505echo "${ECHO_T}$with_colorfgbg" >&6
16506test "x$with_colorfgbg" = xyes &&
16507cat >>confdefs.h <<\EOF
16508#define USE_COLORFGBG 1
16509EOF
16510
16511### use option --enable-fvisibility to turn on use of gcc-specific feature
16512echo "$as_me:16512: checking if you want to use gcc -fvisibility option" >&5
16513echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16514
16515# Check whether --enable-fvisibility or --disable-fvisibility was given.
16516if test "${enable_fvisibility+set}" = set; then
16517 enableval="$enable_fvisibility"
16518 cf_with_fvisibility=$enableval
16519else
16520 cf_with_fvisibility=no
16521fi;
16522echo "$as_me:16522: result: $cf_with_fvisibility" >&5
16523echo "${ECHO_T}$cf_with_fvisibility" >&6
16524
16525NCURSES_IMPEXP=
16526NCURSES_CXX_IMPEXP=
16527if test "x$cf_with_fvisibility" = xyes; then
16528
16529echo "$as_me:16529: checking if $CC -fvisibility=hidden option works" >&5
16530echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16531if test "${cf_cv_fvisibility_hidden+set}" = set; then
16532 echo $ECHO_N "(cached) $ECHO_C" >&6
16533else
16534
16535 cf_save_cflags="$CFLAGS"
16536 CFLAGS="$CFLAGS -fvisibility=hidden"
16537 cat >"conftest.$ac_ext" <<_ACEOF
16538#line 16538 "configure"
16539#include "confdefs.h"
16540
16541__attribute__ ((visibility("default"))) int somefunc() {return 42;}
16542
16543int
16544main (void)
16545{
16546
16547 if (somefunc()) return 1;
16548
16549 ;
16550 return 0;
16551}
16552_ACEOF
16553rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16554if { (eval echo "$as_me:16554: \"$ac_link\"") >&5
16555 (eval $ac_link) 2>&5
16556 ac_status=$?
16557 echo "$as_me:16557: \$? = $ac_status" >&5
16558 (exit "$ac_status"); } &&
16559 { ac_try='test -s "conftest$ac_exeext"'
16560 { (eval echo "$as_me:16560: \"$ac_try\"") >&5
16561 (eval $ac_try) 2>&5
16562 ac_status=$?
16563 echo "$as_me:16563: \$? = $ac_status" >&5
16564 (exit "$ac_status"); }; }; then
16565 cf_cv_fvisibility_hidden=yes
16566else
16567 echo "$as_me: failed program was:" >&5
16568cat "conftest.$ac_ext" >&5
16569cf_cv_fvisibility_hidden=no
16570fi
16571rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16572 CFLAGS=$cf_save_cflags
16573
16574fi
16575echo "$as_me:16575: result: $cf_cv_fvisibility_hidden" >&5
16576echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16577
16578 if test "x$cf_cv_fvisibility_hidden" = xyes
16579 then
16580
16581cf_fix_cppflags=no
16582cf_new_cflags=
16583cf_new_cppflags=
16584cf_new_extra_cppflags=
16585
16586for cf_add_cflags in -fvisibility=hidden
16587do
16588case "$cf_fix_cppflags" in
16589(no)
16590 case "$cf_add_cflags" in
16591 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16592 case "$cf_add_cflags" in
16593 (-D*)
16594 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16595
16596 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16597 && test -z "${cf_tst_cflags}" \
16598 && cf_fix_cppflags=yes
16599
16600 if test "$cf_fix_cppflags" = yes ; then
16601
16602 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16603 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16604
16605 continue
16606 elif test "${cf_tst_cflags}" = "\"'" ; then
16607
16608 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16609 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16610
16611 continue
16612 fi
16613 ;;
16614 esac
16615 case "$CPPFLAGS" in
16616 (*$cf_add_cflags)
16617 ;;
16618 (*)
16619 case "$cf_add_cflags" in
16620 (-D*)
16621 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16622
16623CPPFLAGS=`echo "$CPPFLAGS" | \
16624 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16625 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16626
16627 ;;
16628 esac
16629
16630 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16631 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16632
16633 ;;
16634 esac
16635 ;;
16636 (*)
16637
16638 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16639 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16640
16641 ;;
16642 esac
16643 ;;
16644(yes)
16645
16646 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16647 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16648
16649 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16650
16651 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16652 && test -z "${cf_tst_cflags}" \
16653 && cf_fix_cppflags=no
16654 ;;
16655esac
16656done
16657
16658if test -n "$cf_new_cflags" ; then
16659
16660 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16661 CFLAGS="${CFLAGS}$cf_new_cflags"
16662
16663fi
16664
16665if test -n "$cf_new_cppflags" ; then
16666
16667 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16668 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16669
16670fi
16671
16672if test -n "$cf_new_extra_cppflags" ; then
16673
16674 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16675 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16676
16677fi
16678
16679 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16680 fi
16681 if test -n "$CXX"
16682 then
16683 ac_ext=cc
16684ac_cpp='$CXXCPP $CPPFLAGS'
16685ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16686ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16687ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16688ac_main_return="return"
16689
16690echo "$as_me:16690: checking if $CXX -fvisibility=hidden option works" >&5
16691echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16692if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16693 echo $ECHO_N "(cached) $ECHO_C" >&6
16694else
16695
16696 cf_save_cflags="$CXXFLAGS"
16697 CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16698 cat >"conftest.$ac_ext" <<_ACEOF
16699#line 16699 "configure"
16700#include "confdefs.h"
16701
16702__attribute__ ((visibility("default"))) int somefunc() {return 42;}
16703
16704int
16705main (void)
16706{
16707
16708 if (somefunc()) return 1;
16709
16710 ;
16711 return 0;
16712}
16713_ACEOF
16714rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16715if { (eval echo "$as_me:16715: \"$ac_link\"") >&5
16716 (eval $ac_link) 2>&5
16717 ac_status=$?
16718 echo "$as_me:16718: \$? = $ac_status" >&5
16719 (exit "$ac_status"); } &&
16720 { ac_try='test -s "conftest$ac_exeext"'
16721 { (eval echo "$as_me:16721: \"$ac_try\"") >&5
16722 (eval $ac_try) 2>&5
16723 ac_status=$?
16724 echo "$as_me:16724: \$? = $ac_status" >&5
16725 (exit "$ac_status"); }; }; then
16726 cf_cv_fvisibility_hidden2=yes
16727else
16728 echo "$as_me: failed program was:" >&5
16729cat "conftest.$ac_ext" >&5
16730cf_cv_fvisibility_hidden2=no
16731fi
16732rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16733 CXXFLAGS=$cf_save_cflags
16734
16735fi
16736echo "$as_me:16736: result: $cf_cv_fvisibility_hidden2" >&5
16737echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16738
16739 if test "x$cf_cv_fvisibility_hidden2" = xyes
16740 then
16741
16742cf_save_CXXFLAGS="$CFLAGS"
16743CFLAGS="$CXXFLAGS"
16744
16745cf_fix_cppflags=no
16746cf_new_cflags=
16747cf_new_cppflags=
16748cf_new_extra_cppflags=
16749
16750for cf_add_cflags in -fvisibility=hidden
16751do
16752case "$cf_fix_cppflags" in
16753(no)
16754 case "$cf_add_cflags" in
16755 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16756 case "$cf_add_cflags" in
16757 (-D*)
16758 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16759
16760 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16761 && test -z "${cf_tst_cflags}" \
16762 && cf_fix_cppflags=yes
16763
16764 if test "$cf_fix_cppflags" = yes ; then
16765
16766 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16767 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16768
16769 continue
16770 elif test "${cf_tst_cflags}" = "\"'" ; then
16771
16772 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16773 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16774
16775 continue
16776 fi
16777 ;;
16778 esac
16779 case "$CPPFLAGS" in
16780 (*$cf_add_cflags)
16781 ;;
16782 (*)
16783 case "$cf_add_cflags" in
16784 (-D*)
16785 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16786
16787CPPFLAGS=`echo "$CPPFLAGS" | \
16788 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16789 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16790
16791 ;;
16792 esac
16793
16794 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16795 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16796
16797 ;;
16798 esac
16799 ;;
16800 (*)
16801
16802 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16803 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16804
16805 ;;
16806 esac
16807 ;;
16808(yes)
16809
16810 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16811 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16812
16813 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16814
16815 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16816 && test -z "${cf_tst_cflags}" \
16817 && cf_fix_cppflags=no
16818 ;;
16819esac
16820done
16821
16822if test -n "$cf_new_cflags" ; then
16823
16824 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16825 CFLAGS="${CFLAGS}$cf_new_cflags"
16826
16827fi
16828
16829if test -n "$cf_new_cppflags" ; then
16830
16831 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16832 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16833
16834fi
16835
16836if test -n "$cf_new_extra_cppflags" ; then
16837
16838 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16839 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16840
16841fi
16842
16843CXXFLAGS="$CFLAGS"
16844CFLAGS="$cf_save_CXXFLAGS"
16845
16846 NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16847 fi
16848 ac_ext=c
16849ac_cpp='$CPP $CPPFLAGS'
16850ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16851ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16852ac_compiler_gnu=$ac_cv_c_compiler_gnu
16853ac_main_return="return"
16854
16855 fi
16856fi
16857
16858### use option --enable-interop to turn on use of bindings used for interop
16859echo "$as_me:16859: checking if you want interop bindings" >&5
16860echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16861
16862# Check whether --enable-interop or --disable-interop was given.
16863if test "${enable_interop+set}" = set; then
16864 enableval="$enable_interop"
16865 with_exp_interop=$enableval
16866else
16867 with_exp_interop=$cf_dft_interop
16868fi;
16869echo "$as_me:16869: result: $with_exp_interop" >&5
16870echo "${ECHO_T}$with_exp_interop" >&6
16871
16872NCURSES_INTEROP_FUNCS=0
16873test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16874
16875echo "$as_me:16875: checking if you want experimental safe-sprintf code" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016876echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16877
16878# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16879if test "${enable_safe_sprintf+set}" = set; then
16880 enableval="$enable_safe_sprintf"
16881 with_safe_sprintf=$enableval
16882else
16883 with_safe_sprintf=no
16884fi;
micky3879b9f5e72025-07-08 18:04:53 -040016885echo "$as_me:16885: result: $with_safe_sprintf" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016886echo "${ECHO_T}$with_safe_sprintf" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010016887
16888### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16889# when hashmap is used scroll hints are useless
16890if test "$with_hashmap" = no ; then
micky3879b9f5e72025-07-08 18:04:53 -040016891echo "$as_me:16891: checking if you want to experiment without scrolling-hints code" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016892echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16893
16894# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16895if test "${enable_scroll_hints+set}" = set; then
16896 enableval="$enable_scroll_hints"
16897 with_scroll_hints=$enableval
16898else
16899 with_scroll_hints=yes
16900fi;
micky3879b9f5e72025-07-08 18:04:53 -040016901echo "$as_me:16901: result: $with_scroll_hints" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016902echo "${ECHO_T}$with_scroll_hints" >&6
16903test "x$with_scroll_hints" = xyes &&
16904cat >>confdefs.h <<\EOF
16905#define USE_SCROLL_HINTS 1
16906EOF
16907
16908fi
16909
micky3879b9f5e72025-07-08 18:04:53 -040016910echo "$as_me:16910: checking if you want wgetch-events code" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016911echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16912
16913# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16914if test "${enable_wgetch_events+set}" = set; then
16915 enableval="$enable_wgetch_events"
16916 with_wgetch_events=$enableval
16917else
16918 with_wgetch_events=no
16919fi;
micky3879b9f5e72025-07-08 18:04:53 -040016920echo "$as_me:16920: result: $with_wgetch_events" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016921echo "${ECHO_T}$with_wgetch_events" >&6
micky3879b9f5e72025-07-08 18:04:53 -040016922if test "x$with_wgetch_events" = xyes ; then
16923
Steve Kondikae271bc2015-11-15 02:50:53 +010016924cat >>confdefs.h <<\EOF
16925#define NCURSES_WGETCH_EVENTS 1
16926EOF
16927
micky3879b9f5e72025-07-08 18:04:53 -040016928 NCURSES_WGETCH_EVENTS=1
16929else
16930 NCURSES_WGETCH_EVENTS=0
16931fi
16932
16933case "$cf_cv_system_name" in
16934(*mingw32*|*mingw64*|*-msvc*)
16935 echo "$as_me:16935: checking if you want experimental-Windows driver" >&5
16936echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16937
16938# Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16939if test "${enable_exp_win32+set}" = set; then
16940 enableval="$enable_exp_win32"
16941 with_exp_win32=$enableval
16942else
16943 with_exp_win32=no
16944fi;
16945 echo "$as_me:16945: result: $with_exp_win32" >&5
16946echo "${ECHO_T}$with_exp_win32" >&6
16947 if test "x$with_exp_win32" = xyes
16948 then
16949
16950cat >>confdefs.h <<\EOF
16951#define EXP_WIN32_DRIVER 1
16952EOF
16953
16954 EXP_WIN32_DRIVER=1
16955 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16956 else
16957 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16958 EXP_WIN32_DRIVER=0
16959 fi
16960 ;;
16961(*)
16962 EXP_WIN32_DRIVER=0
16963 INTERNALS_HDR=
16964 ;;
16965esac
16966
Steve Kondikae271bc2015-11-15 02:50:53 +010016967###############################################################################
16968
16969### use option --disable-echo to suppress full display compiling commands
16970
micky3879b9f5e72025-07-08 18:04:53 -040016971echo "$as_me:16971: checking if you want to see long compiling messages" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010016972echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16973
16974# Check whether --enable-echo or --disable-echo was given.
16975if test "${enable_echo+set}" = set; then
16976 enableval="$enable_echo"
16977 test "$enableval" != no && enableval=yes
16978 if test "$enableval" != "yes" ; then
16979
16980 ECHO_LT='--silent'
16981 ECHO_LD='@echo linking $@;'
16982 RULE_CC='@echo compiling $<'
16983 SHOW_CC='@echo compiling $@'
16984 ECHO_CC='@'
16985
16986 else
16987
16988 ECHO_LT=''
16989 ECHO_LD=''
16990 RULE_CC=''
16991 SHOW_CC=''
16992 ECHO_CC=''
16993
16994 fi
16995else
16996 enableval=yes
16997
16998 ECHO_LT=''
16999 ECHO_LD=''
17000 RULE_CC=''
17001 SHOW_CC=''
17002 ECHO_CC=''
17003
17004fi;
micky3879b9f5e72025-07-08 18:04:53 -040017005echo "$as_me:17005: result: $enableval" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017006echo "${ECHO_T}$enableval" >&6
17007
17008if test "x$enable_echo" = xyes; then
17009 ECHO_LINK=
17010else
17011 ECHO_LINK='@ echo linking $@ ... ;'
17012 test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
17013 test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
17014fi
17015
micky3879b9f5e72025-07-08 18:04:53 -040017016# --disable-stripping is used for debugging
Steve Kondikae271bc2015-11-15 02:50:53 +010017017
micky3879b9f5e72025-07-08 18:04:53 -040017018echo "$as_me:17018: checking if you want to install stripped executables" >&5
17019echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
17020
17021# Check whether --enable-stripping or --disable-stripping was given.
17022if test "${enable_stripping+set}" = set; then
17023 enableval="$enable_stripping"
17024 test "$enableval" != no && enableval=yes
17025 if test "$enableval" != "yes" ; then
17026 enable_stripping=no
17027 else
17028 enable_stripping=yes
17029 fi
17030else
17031 enableval=yes
17032 enable_stripping=yes
17033
Steve Kondikae271bc2015-11-15 02:50:53 +010017034fi;
micky3879b9f5e72025-07-08 18:04:53 -040017035echo "$as_me:17035: result: $enable_stripping" >&5
17036echo "${ECHO_T}$enable_stripping" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010017037
micky3879b9f5e72025-07-08 18:04:53 -040017038if test "$enable_stripping" = yes
17039then
17040 INSTALL_OPT_S="-s"
17041else
17042 INSTALL_OPT_S=
17043fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017044
micky3879b9f5e72025-07-08 18:04:53 -040017045: "${INSTALL:=install}"
17046echo "$as_me:17046: checking if install accepts -p option" >&5
17047echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
17048if test "${cf_cv_install_p+set}" = set; then
17049 echo $ECHO_N "(cached) $ECHO_C" >&6
17050else
Steve Kondikae271bc2015-11-15 02:50:53 +010017051
micky3879b9f5e72025-07-08 18:04:53 -040017052 rm -rf ./conftest*
17053 date >conftest.in
17054 mkdir conftest.out
17055 sleep 3
17056 if $INSTALL -p conftest.in conftest.out 2>/dev/null
17057 then
17058 if test -f conftest.out/conftest.in
17059 then
17060 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
17061 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
17062 if test -s conftest.err
17063 then
17064 cf_cv_install_p=no
17065 else
17066 cf_cv_install_p=yes
17067 fi
17068 else
17069 cf_cv_install_p=no
17070 fi
17071 else
17072 cf_cv_install_p=no
17073 fi
17074 rm -rf ./conftest*
Steve Kondikae271bc2015-11-15 02:50:53 +010017075
micky3879b9f5e72025-07-08 18:04:53 -040017076fi
17077echo "$as_me:17077: result: $cf_cv_install_p" >&5
17078echo "${ECHO_T}$cf_cv_install_p" >&6
17079
17080echo "$as_me:17080: checking if install needs to be told about ownership" >&5
17081echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
17082case `$ac_config_guess` in
17083(*minix)
17084 with_install_o=yes
17085 ;;
17086(*)
17087 with_install_o=no
17088 ;;
17089esac
17090
17091echo "$as_me:17091: result: $with_install_o" >&5
17092echo "${ECHO_T}$with_install_o" >&6
17093if test "x$with_install_o" = xyes
17094then
17095 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
17096else
17097 INSTALL_OPT_O=
17098fi
17099
17100if test -n "$INSTALL_OPT_S"
17101then
17102 echo "$as_me:17102: checking if you want to specify strip-program" >&5
17103echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17104
17105# Check whether --with-strip-program or --without-strip-program was given.
17106if test "${with_strip_program+set}" = set; then
17107 withval="$with_strip_program"
17108 with_strip_program=$withval
17109else
17110 with_strip_program=no
17111fi;
17112 echo "$as_me:17112: result: $with_strip_program" >&5
17113echo "${ECHO_T}$with_strip_program" >&6
17114 if test "$with_strip_program" != no
17115 then
17116 echo "$as_me:17116: checking if strip-program is supported with this installer" >&5
17117echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17118 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17119 check_install_strip=no
17120 if test -f "$cf_install_program"
17121 then
17122 check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17123 if test -n "$check_install_version"
17124 then
17125 check_install_strip="option"
17126 else
17127 for check_strip_variable in STRIPBIN STRIP
17128 do
17129 if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17130 then
17131 check_install_strip="environ"
17132 break
17133 fi
17134 done
17135 fi
17136 fi
17137 echo "$as_me:17137: result: $check_install_strip" >&5
17138echo "${ECHO_T}$check_install_strip" >&6
17139 case "$check_install_strip" in
17140 (no)
17141 { echo "$as_me:17141: WARNING: $cf_install_program does not support strip program option" >&5
17142echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17143 with_strip_program=no
17144 ;;
17145 (environ)
17146 cat >install.tmp <<-CF_EOF
17147 #! $SHELL
17148 STRIPBIN="$with_strip_program" \\
17149 STRIP="$with_strip_program" \\
17150 $INSTALL "$@"
17151 CF_EOF
17152 INSTALL="`pwd`/install.tmp"
17153 chmod +x "$INSTALL"
17154 test -n "$verbose" && echo " created $INSTALL" 1>&6
17155
17156echo "${as_me:-configure}:17156: testing created $INSTALL ..." 1>&5
17157
17158 ;;
17159 (option)
17160 INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17161 ;;
17162 esac
17163 fi
17164fi
17165
17166# If we're avoiding relinking of shared libraries during install, that is to
17167# avoid modifying the build-tree. For the same reason, avoid doing ranlib if
17168# the install program has "-p" (for preserving timestamps).
17169cf_cv_do_reranlib=yes
17170if test "x$cf_cv_install_p" = xyes
17171then
17172 if test "x$cf_cv_do_relink" != xyes
17173 then
17174 cf_cv_do_reranlib=no
17175 INSTALL_OPT_P="-p"
17176 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17177 fi
17178fi
17179
17180### use option --enable-warnings to turn on all gcc warnings
17181
17182echo "$as_me:17182: checking if you want to use C11 _Noreturn feature" >&5
17183echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17184
17185# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17186if test "${enable_stdnoreturn+set}" = set; then
17187 enableval="$enable_stdnoreturn"
17188 test "$enableval" != yes && enableval=no
17189 if test "$enableval" != "no" ; then
17190 enable_stdnoreturn=yes
17191 else
17192 enable_stdnoreturn=no
17193 fi
17194else
17195 enableval=no
17196 enable_stdnoreturn=no
17197
17198fi;
17199echo "$as_me:17199: result: $enable_stdnoreturn" >&5
17200echo "${ECHO_T}$enable_stdnoreturn" >&6
17201
17202if test $enable_stdnoreturn = yes; then
17203echo "$as_me:17203: checking for C11 _Noreturn feature" >&5
17204echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17205if test "${cf_cv_c11_noreturn+set}" = set; then
17206 echo $ECHO_N "(cached) $ECHO_C" >&6
17207else
17208 cat >"conftest.$ac_ext" <<_ACEOF
17209#line 17209 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010017210#include "confdefs.h"
17211
micky3879b9f5e72025-07-08 18:04:53 -040017212$ac_includes_default
17213#include <stdnoreturn.h>
17214static _Noreturn void giveup(void) { exit(0); }
17215
Steve Kondikae271bc2015-11-15 02:50:53 +010017216int
micky3879b9f5e72025-07-08 18:04:53 -040017217main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010017218{
micky3879b9f5e72025-07-08 18:04:53 -040017219if (feof(stdin)) giveup()
Steve Kondikae271bc2015-11-15 02:50:53 +010017220 ;
17221 return 0;
17222}
17223_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040017224rm -f "conftest.$ac_objext"
17225if { (eval echo "$as_me:17225: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017226 (eval $ac_compile) 2>&5
17227 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017228 echo "$as_me:17228: \$? = $ac_status" >&5
17229 (exit "$ac_status"); } &&
17230 { ac_try='test -s "conftest.$ac_objext"'
17231 { (eval echo "$as_me:17231: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017232 (eval $ac_try) 2>&5
17233 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017234 echo "$as_me:17234: \$? = $ac_status" >&5
17235 (exit "$ac_status"); }; }; then
17236 cf_cv_c11_noreturn=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010017237else
17238 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040017239cat "conftest.$ac_ext" >&5
17240cf_cv_c11_noreturn=no
Steve Kondikae271bc2015-11-15 02:50:53 +010017241fi
micky3879b9f5e72025-07-08 18:04:53 -040017242rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17243
17244fi
17245echo "$as_me:17245: result: $cf_cv_c11_noreturn" >&5
17246echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17247else
17248 cf_cv_c11_noreturn=no,
17249fi
17250
17251if test "$cf_cv_c11_noreturn" = yes; then
17252
17253cat >>confdefs.h <<\EOF
17254#define HAVE_STDNORETURN_H 1
17255EOF
17256
17257cat >>confdefs.h <<EOF
17258#define STDC_NORETURN _Noreturn
17259EOF
17260
17261 HAVE_STDNORETURN_H=1
17262else
17263 HAVE_STDNORETURN_H=0
17264fi
17265
17266if test "$GCC" = yes || test "$GXX" = yes
17267then
17268
17269if test "$GCC" = yes || test "$GXX" = yes
17270then
17271 case $CFLAGS in
17272 (*-Werror=*)
17273 cf_temp_flags=
17274 for cf_temp_scan in $CFLAGS
17275 do
17276 case "x$cf_temp_scan" in
17277 (x-Werror=format*)
17278
17279 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17280 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17281
17282 ;;
17283 (x-Werror=*)
17284
17285 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17286 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17287
17288 ;;
17289 (*)
17290
17291 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17292 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17293
17294 ;;
17295 esac
17296 done
17297 if test "x$CFLAGS" != "x$cf_temp_flags"
17298 then
17299 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
17300
17301echo "${as_me:-configure}:17301: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17302
17303 CFLAGS="$cf_temp_flags"
17304 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
17305
17306echo "${as_me:-configure}:17306: testing ... fixed $CFLAGS ..." 1>&5
17307
17308 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17309
17310echo "${as_me:-configure}:17310: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17311
17312 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017313 ;;
17314 esac
17315fi
17316
micky3879b9f5e72025-07-08 18:04:53 -040017317if test "$GCC" = yes || test "$GXX" = yes
17318then
17319 case $CPPFLAGS in
17320 (*-Werror=*)
17321 cf_temp_flags=
17322 for cf_temp_scan in $CPPFLAGS
17323 do
17324 case "x$cf_temp_scan" in
17325 (x-Werror=format*)
Steve Kondikae271bc2015-11-15 02:50:53 +010017326
micky3879b9f5e72025-07-08 18:04:53 -040017327 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17328 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17329
17330 ;;
17331 (x-Werror=*)
17332
17333 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17334 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17335
17336 ;;
17337 (*)
17338
17339 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17340 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17341
17342 ;;
17343 esac
17344 done
17345 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17346 then
17347 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
17348
17349echo "${as_me:-configure}:17349: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17350
17351 CPPFLAGS="$cf_temp_flags"
17352 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
17353
17354echo "${as_me:-configure}:17354: testing ... fixed $CPPFLAGS ..." 1>&5
17355
17356 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17357
17358echo "${as_me:-configure}:17358: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17359
17360 fi
17361 ;;
17362 esac
17363fi
17364
17365if test "$GCC" = yes || test "$GXX" = yes
17366then
17367 case $LDFLAGS in
17368 (*-Werror=*)
17369 cf_temp_flags=
17370 for cf_temp_scan in $LDFLAGS
17371 do
17372 case "x$cf_temp_scan" in
17373 (x-Werror=format*)
17374
17375 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17376 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17377
17378 ;;
17379 (x-Werror=*)
17380
17381 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17382 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17383
17384 ;;
17385 (*)
17386
17387 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17388 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17389
17390 ;;
17391 esac
17392 done
17393 if test "x$LDFLAGS" != "x$cf_temp_flags"
17394 then
17395 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
17396
17397echo "${as_me:-configure}:17397: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17398
17399 LDFLAGS="$cf_temp_flags"
17400 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
17401
17402echo "${as_me:-configure}:17402: testing ... fixed $LDFLAGS ..." 1>&5
17403
17404 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
17405
17406echo "${as_me:-configure}:17406: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17407
17408 fi
17409 ;;
17410 esac
17411fi
17412
17413echo "$as_me:17413: checking if you want to turn on gcc warnings" >&5
17414echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17415
17416# Check whether --enable-warnings or --disable-warnings was given.
17417if test "${enable_warnings+set}" = set; then
17418 enableval="$enable_warnings"
17419 test "$enableval" != yes && enableval=no
17420 if test "$enableval" != "no" ; then
17421 enable_warnings=yes
17422 else
17423 enable_warnings=no
17424 fi
17425else
17426 enableval=no
17427 enable_warnings=no
17428
17429fi;
17430echo "$as_me:17430: result: $enable_warnings" >&5
17431echo "${ECHO_T}$enable_warnings" >&6
17432if test "$enable_warnings" = "yes"
17433then
17434
17435if test "x$have_x" = xyes; then
17436
17437cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17438cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17439cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17440LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17441for cf_X_CFLAGS in $X_CFLAGS
17442do
17443 case "x$cf_X_CFLAGS" in
17444 x-[IUD]*)
17445 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17446 ;;
17447 *)
17448 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17449 ;;
17450 esac
17451done
17452
17453cat >"conftest.$ac_ext" <<_ACEOF
17454#line 17454 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010017455#include "confdefs.h"
17456
micky3879b9f5e72025-07-08 18:04:53 -040017457#include <stdlib.h>
17458#include <X11/Intrinsic.h>
17459
Steve Kondikae271bc2015-11-15 02:50:53 +010017460int
micky3879b9f5e72025-07-08 18:04:53 -040017461main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010017462{
micky3879b9f5e72025-07-08 18:04:53 -040017463String foo = malloc(1); free((void*)foo)
Steve Kondikae271bc2015-11-15 02:50:53 +010017464 ;
17465 return 0;
17466}
17467_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040017468rm -f "conftest.$ac_objext"
17469if { (eval echo "$as_me:17469: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017470 (eval $ac_compile) 2>&5
17471 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017472 echo "$as_me:17472: \$? = $ac_status" >&5
17473 (exit "$ac_status"); } &&
17474 { ac_try='test -s "conftest.$ac_objext"'
17475 { (eval echo "$as_me:17475: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017476 (eval $ac_try) 2>&5
17477 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017478 echo "$as_me:17478: \$? = $ac_status" >&5
17479 (exit "$ac_status"); }; }; then
17480
17481echo "$as_me:17481: checking for X11/Xt const-feature" >&5
17482echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17483if test "${cf_cv_const_x_string+set}" = set; then
17484 echo $ECHO_N "(cached) $ECHO_C" >&6
17485else
17486
17487 cat >"conftest.$ac_ext" <<_ACEOF
17488#line 17488 "configure"
17489#include "confdefs.h"
17490
17491#undef _CONST_X_STRING
17492#define _CONST_X_STRING /* X11R7.8 (perhaps) */
17493#undef XTSTRINGDEFINES /* X11R5 and later */
17494#include <stdlib.h>
17495#include <X11/Intrinsic.h>
17496
17497int
17498main (void)
17499{
17500String foo = malloc(1); *foo = 0
17501 ;
17502 return 0;
17503}
17504_ACEOF
17505rm -f "conftest.$ac_objext"
17506if { (eval echo "$as_me:17506: \"$ac_compile\"") >&5
17507 (eval $ac_compile) 2>&5
17508 ac_status=$?
17509 echo "$as_me:17509: \$? = $ac_status" >&5
17510 (exit "$ac_status"); } &&
17511 { ac_try='test -s "conftest.$ac_objext"'
17512 { (eval echo "$as_me:17512: \"$ac_try\"") >&5
17513 (eval $ac_try) 2>&5
17514 ac_status=$?
17515 echo "$as_me:17515: \$? = $ac_status" >&5
17516 (exit "$ac_status"); }; }; then
17517
17518 cf_cv_const_x_string=no
Steve Kondikae271bc2015-11-15 02:50:53 +010017519
17520else
17521 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040017522cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017523
micky3879b9f5e72025-07-08 18:04:53 -040017524 cf_cv_const_x_string=yes
17525
17526fi
17527rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17528
17529fi
17530echo "$as_me:17530: result: $cf_cv_const_x_string" >&5
17531echo "${ECHO_T}$cf_cv_const_x_string" >&6
17532
17533LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17534CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17535CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17536
17537case "$cf_cv_const_x_string" in
17538(no)
17539
17540 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17541 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17542
17543 ;;
17544(*)
17545
17546 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17547 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17548
17549 ;;
17550esac
17551
17552else
17553 echo "$as_me: failed program was:" >&5
17554cat "conftest.$ac_ext" >&5
17555fi
17556rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17557 fi
17558cat > "conftest.$ac_ext" <<EOF
17559#line 17559 "${as_me:-configure}"
Steve Kondikae271bc2015-11-15 02:50:53 +010017560int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17561EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010017562if test "$INTEL_COMPILER" = yes
17563then
17564# The "-wdXXX" options suppress warnings:
17565# remark #1419: external declaration in primary source file
17566# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17567# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17568# remark #193: zero used for undefined preprocessing identifier
17569# remark #593: variable "curs_sb_left_arrow" was set but never used
17570# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17571# remark #869: parameter "tw" was never referenced
17572# remark #981: operands are evaluated in unspecified order
17573# warning #279: controlling expression is constant
17574
micky3879b9f5e72025-07-08 18:04:53 -040017575 { echo "$as_me:17575: checking for $CC warning options..." >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017576echo "$as_me: checking for $CC warning options..." >&6;}
17577 cf_save_CFLAGS="$CFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040017578 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
Steve Kondikae271bc2015-11-15 02:50:53 +010017579 for cf_opt in \
17580 wd1419 \
17581 wd1683 \
17582 wd1684 \
17583 wd193 \
17584 wd593 \
17585 wd279 \
17586 wd810 \
17587 wd869 \
17588 wd981
17589 do
17590 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
micky3879b9f5e72025-07-08 18:04:53 -040017591 if { (eval echo "$as_me:17591: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017592 (eval $ac_compile) 2>&5
17593 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017594 echo "$as_me:17594: \$? = $ac_status" >&5
17595 (exit "$ac_status"); }; then
17596 test -n "$verbose" && echo "$as_me:17596: result: ... -$cf_opt" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017597echo "${ECHO_T}... -$cf_opt" >&6
17598 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17599 fi
17600 done
17601 CFLAGS="$cf_save_CFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040017602elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
Steve Kondikae271bc2015-11-15 02:50:53 +010017603then
micky3879b9f5e72025-07-08 18:04:53 -040017604 { echo "$as_me:17604: checking for $CC warning options..." >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017605echo "$as_me: checking for $CC warning options..." >&6;}
17606 cf_save_CFLAGS="$CFLAGS"
Steve Kondikae271bc2015-11-15 02:50:53 +010017607 cf_warn_CONST=""
17608 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17609 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17610 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17611 for cf_opt in W Wall \
17612 Wbad-function-cast \
17613 Wcast-align \
17614 Wcast-qual \
17615 Wdeclaration-after-statement \
17616 Wextra \
17617 Winline \
17618 Wmissing-declarations \
17619 Wmissing-prototypes \
17620 Wnested-externs \
17621 Wpointer-arith \
17622 Wshadow \
17623 Wstrict-prototypes \
micky3879b9f5e72025-07-08 18:04:53 -040017624 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
Steve Kondikae271bc2015-11-15 02:50:53 +010017625 do
17626 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
micky3879b9f5e72025-07-08 18:04:53 -040017627 if { (eval echo "$as_me:17627: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017628 (eval $ac_compile) 2>&5
17629 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017630 echo "$as_me:17630: \$? = $ac_status" >&5
17631 (exit "$ac_status"); }; then
17632 test -n "$verbose" && echo "$as_me:17632: result: ... -$cf_opt" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017633echo "${ECHO_T}... -$cf_opt" >&6
micky3879b9f5e72025-07-08 18:04:53 -040017634 case "$cf_opt" in
Steve Kondikae271bc2015-11-15 02:50:53 +010017635 (Winline)
micky3879b9f5e72025-07-08 18:04:53 -040017636 case "$GCC_VERSION" in
Steve Kondikae271bc2015-11-15 02:50:53 +010017637 ([34].*)
17638 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17639
micky3879b9f5e72025-07-08 18:04:53 -040017640echo "${as_me:-configure}:17640: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017641
17642 continue;;
17643 esac
17644 ;;
17645 (Wpointer-arith)
micky3879b9f5e72025-07-08 18:04:53 -040017646 case "$GCC_VERSION" in
Steve Kondikae271bc2015-11-15 02:50:53 +010017647 ([12].*)
17648 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
17649
micky3879b9f5e72025-07-08 18:04:53 -040017650echo "${as_me:-configure}:17650: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017651
17652 continue;;
17653 esac
17654 ;;
17655 esac
17656 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17657 fi
17658 done
17659 CFLAGS="$cf_save_CFLAGS"
17660fi
micky3879b9f5e72025-07-08 18:04:53 -040017661rm -rf ./conftest*
Steve Kondikae271bc2015-11-15 02:50:53 +010017662
Steve Kondikae271bc2015-11-15 02:50:53 +010017663fi
17664
micky3879b9f5e72025-07-08 18:04:53 -040017665if test "$GCC" = yes || test "$GXX" = yes
Steve Kondikae271bc2015-11-15 02:50:53 +010017666then
17667cat > conftest.i <<EOF
17668#ifndef GCC_PRINTF
17669#define GCC_PRINTF 0
17670#endif
17671#ifndef GCC_SCANF
17672#define GCC_SCANF 0
17673#endif
17674#ifndef GCC_NORETURN
17675#define GCC_NORETURN /* nothing */
17676#endif
17677#ifndef GCC_UNUSED
17678#define GCC_UNUSED /* nothing */
17679#endif
17680EOF
17681if test "$GCC" = yes
17682then
micky3879b9f5e72025-07-08 18:04:53 -040017683 { echo "$as_me:17683: checking for $CC __attribute__ directives..." >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017684echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
micky3879b9f5e72025-07-08 18:04:53 -040017685cat > "conftest.$ac_ext" <<EOF
17686#line 17686 "${as_me:-configure}"
17687#include <stdio.h>
Steve Kondikae271bc2015-11-15 02:50:53 +010017688#include "confdefs.h"
17689#include "conftest.h"
17690#include "conftest.i"
17691#if GCC_PRINTF
17692#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17693#else
17694#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17695#endif
17696#if GCC_SCANF
17697#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
17698#else
17699#define GCC_SCANFLIKE(fmt,var) /*nothing*/
17700#endif
17701extern void wow(char *,...) GCC_SCANFLIKE(1,2);
micky3879b9f5e72025-07-08 18:04:53 -040017702extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17703extern GCC_NORETURN void foo(void);
17704int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
Steve Kondikae271bc2015-11-15 02:50:53 +010017705EOF
17706 cf_printf_attribute=no
17707 cf_scanf_attribute=no
17708 for cf_attribute in scanf printf unused noreturn
17709 do
17710
17711cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17712
17713 cf_directive="__attribute__(($cf_attribute))"
17714 echo "checking for $CC $cf_directive" 1>&5
17715
micky3879b9f5e72025-07-08 18:04:53 -040017716 case "$cf_attribute" in
Steve Kondikae271bc2015-11-15 02:50:53 +010017717 (printf)
17718 cf_printf_attribute=yes
17719 cat >conftest.h <<EOF
17720#define GCC_$cf_ATTRIBUTE 1
17721EOF
17722 ;;
17723 (scanf)
17724 cf_scanf_attribute=yes
17725 cat >conftest.h <<EOF
17726#define GCC_$cf_ATTRIBUTE 1
17727EOF
17728 ;;
17729 (*)
17730 cat >conftest.h <<EOF
17731#define GCC_$cf_ATTRIBUTE $cf_directive
17732EOF
17733 ;;
17734 esac
17735
micky3879b9f5e72025-07-08 18:04:53 -040017736 if { (eval echo "$as_me:17736: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017737 (eval $ac_compile) 2>&5
17738 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017739 echo "$as_me:17739: \$? = $ac_status" >&5
17740 (exit "$ac_status"); }; then
17741 test -n "$verbose" && echo "$as_me:17741: result: ... $cf_attribute" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017742echo "${ECHO_T}... $cf_attribute" >&6
17743 cat conftest.h >>confdefs.h
micky3879b9f5e72025-07-08 18:04:53 -040017744 case "$cf_attribute" in
Steve Kondikae271bc2015-11-15 02:50:53 +010017745 (noreturn)
17746
17747cat >>confdefs.h <<EOF
17748#define GCC_NORETURN $cf_directive
17749EOF
17750
17751 ;;
17752 (printf)
17753 cf_value='/* nothing */'
17754 if test "$cf_printf_attribute" != no ; then
17755 cf_value='__attribute__((format(printf,fmt,var)))'
17756
17757cat >>confdefs.h <<\EOF
17758#define GCC_PRINTF 1
17759EOF
17760
17761 fi
17762
17763cat >>confdefs.h <<EOF
17764#define GCC_PRINTFLIKE(fmt,var) $cf_value
17765EOF
17766
17767 ;;
17768 (scanf)
17769 cf_value='/* nothing */'
17770 if test "$cf_scanf_attribute" != no ; then
17771 cf_value='__attribute__((format(scanf,fmt,var)))'
17772
17773cat >>confdefs.h <<\EOF
17774#define GCC_SCANF 1
17775EOF
17776
17777 fi
17778
17779cat >>confdefs.h <<EOF
17780#define GCC_SCANFLIKE(fmt,var) $cf_value
17781EOF
17782
17783 ;;
17784 (unused)
17785
17786cat >>confdefs.h <<EOF
17787#define GCC_UNUSED $cf_directive
17788EOF
17789
17790 ;;
17791 esac
17792 fi
17793 done
17794else
micky3879b9f5e72025-07-08 18:04:53 -040017795 ${FGREP-fgrep} define conftest.i >>confdefs.h
Steve Kondikae271bc2015-11-15 02:50:53 +010017796fi
micky3879b9f5e72025-07-08 18:04:53 -040017797rm -rf ./conftest*
Steve Kondikae271bc2015-11-15 02:50:53 +010017798fi
17799
micky3879b9f5e72025-07-08 18:04:53 -040017800fi
Steve Kondikae271bc2015-11-15 02:50:53 +010017801
micky3879b9f5e72025-07-08 18:04:53 -040017802if test "x$enable_warnings" = "xyes"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010017803
micky3879b9f5e72025-07-08 18:04:53 -040017804 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
Steve Kondikae271bc2015-11-15 02:50:53 +010017805
micky3879b9f5e72025-07-08 18:04:53 -040017806 if test "x$cf_with_cxx" = xyes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010017807
micky3879b9f5e72025-07-08 18:04:53 -040017808INTEL_CPLUSPLUS=no
Steve Kondikae271bc2015-11-15 02:50:53 +010017809
micky3879b9f5e72025-07-08 18:04:53 -040017810if test "$GCC" = yes ; then
17811 case "$host_os" in
17812 (linux*|gnu*)
17813 echo "$as_me:17813: checking if this is really Intel C++ compiler" >&5
17814echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17815 cf_save_CFLAGS="$CXXFLAGS"
17816 CXXFLAGS="$CXXFLAGS -no-gcc"
17817 cat >"conftest.$ac_ext" <<_ACEOF
17818#line 17818 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010017819#include "confdefs.h"
Steve Kondikae271bc2015-11-15 02:50:53 +010017820
17821int
micky3879b9f5e72025-07-08 18:04:53 -040017822main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010017823{
micky3879b9f5e72025-07-08 18:04:53 -040017824
17825#ifdef __INTEL_COMPILER
Steve Kondikae271bc2015-11-15 02:50:53 +010017826#else
micky3879b9f5e72025-07-08 18:04:53 -040017827#error __INTEL_COMPILER is not defined
Steve Kondikae271bc2015-11-15 02:50:53 +010017828#endif
17829
17830 ;
17831 return 0;
17832}
17833_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040017834rm -f "conftest.$ac_objext"
17835if { (eval echo "$as_me:17835: \"$ac_compile\"") >&5
17836 (eval $ac_compile) 2>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017837 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017838 echo "$as_me:17838: \$? = $ac_status" >&5
17839 (exit "$ac_status"); } &&
17840 { ac_try='test -s "conftest.$ac_objext"'
17841 { (eval echo "$as_me:17841: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010017842 (eval $ac_try) 2>&5
17843 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040017844 echo "$as_me:17844: \$? = $ac_status" >&5
17845 (exit "$ac_status"); }; }; then
17846 INTEL_CPLUSPLUS=yes
17847cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17848
17849else
17850 echo "$as_me: failed program was:" >&5
17851cat "conftest.$ac_ext" >&5
17852fi
17853rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17854 CXXFLAGS="$cf_save_CFLAGS"
17855 echo "$as_me:17855: result: $INTEL_CPLUSPLUS" >&5
17856echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17857 ;;
17858 esac
17859fi
17860
17861CLANG_CPLUSPLUS=no
17862
17863if test "$GCC" = yes ; then
17864 echo "$as_me:17864: checking if this is really Clang C++ compiler" >&5
17865echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17866 cf_save_CFLAGS="$CXXFLAGS"
17867 cat >"conftest.$ac_ext" <<_ACEOF
17868#line 17868 "configure"
17869#include "confdefs.h"
17870
17871int
17872main (void)
17873{
17874
17875#ifdef __clang__
17876#else
17877#error __clang__ is not defined
17878#endif
17879
17880 ;
17881 return 0;
17882}
17883_ACEOF
17884rm -f "conftest.$ac_objext"
17885if { (eval echo "$as_me:17885: \"$ac_compile\"") >&5
17886 (eval $ac_compile) 2>&5
17887 ac_status=$?
17888 echo "$as_me:17888: \$? = $ac_status" >&5
17889 (exit "$ac_status"); } &&
17890 { ac_try='test -s "conftest.$ac_objext"'
17891 { (eval echo "$as_me:17891: \"$ac_try\"") >&5
17892 (eval $ac_try) 2>&5
17893 ac_status=$?
17894 echo "$as_me:17894: \$? = $ac_status" >&5
17895 (exit "$ac_status"); }; }; then
17896 CLANG_CPLUSPLUS=yes
17897
17898else
17899 echo "$as_me: failed program was:" >&5
17900cat "conftest.$ac_ext" >&5
17901fi
17902rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17903 CXXFLAGS="$cf_save_CFLAGS"
17904 echo "$as_me:17904: result: $CLANG_CPLUSPLUS" >&5
17905echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17906fi
17907
17908CLANG_VERSION=none
17909
17910if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17911 case "$CC" in
17912 (c[1-9][0-9]|*/c[1-9][0-9])
17913 { echo "$as_me:17913: WARNING: replacing broken compiler alias $CC" >&5
17914echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17915 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17916 CC=clang
17917 ;;
17918 esac
17919
17920 echo "$as_me:17920: checking version of $CC" >&5
17921echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17922 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
17923 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17924 echo "$as_me:17924: result: $CLANG_VERSION" >&5
17925echo "${ECHO_T}$CLANG_VERSION" >&6
17926
17927 for cf_clang_opt in \
17928 -Qunused-arguments \
17929 -Wno-error=implicit-function-declaration
17930 do
17931 echo "$as_me:17931: checking if option $cf_clang_opt works" >&5
17932echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17933 cf_save_CFLAGS="$CFLAGS"
17934 CFLAGS="$CFLAGS $cf_clang_opt"
17935 cat >"conftest.$ac_ext" <<_ACEOF
17936#line 17936 "configure"
17937#include "confdefs.h"
17938
17939 #include <stdio.h>
17940int
17941main (void)
17942{
17943
17944 printf("hello!\\n");
17945 ;
17946 return 0;
17947}
17948_ACEOF
17949rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17950if { (eval echo "$as_me:17950: \"$ac_link\"") >&5
17951 (eval $ac_link) 2>&5
17952 ac_status=$?
17953 echo "$as_me:17953: \$? = $ac_status" >&5
17954 (exit "$ac_status"); } &&
17955 { ac_try='test -s "conftest$ac_exeext"'
17956 { (eval echo "$as_me:17956: \"$ac_try\"") >&5
17957 (eval $ac_try) 2>&5
17958 ac_status=$?
17959 echo "$as_me:17959: \$? = $ac_status" >&5
17960 (exit "$ac_status"); }; }; then
17961
17962 cf_clang_optok=yes
17963else
17964 echo "$as_me: failed program was:" >&5
17965cat "conftest.$ac_ext" >&5
17966
17967 cf_clang_optok=no
17968fi
17969rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17970 echo "$as_me:17970: result: $cf_clang_optok" >&5
17971echo "${ECHO_T}$cf_clang_optok" >&6
17972 CFLAGS="$cf_save_CFLAGS"
17973 if test "$cf_clang_optok" = yes; then
17974 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
17975
17976echo "${as_me:-configure}:17976: testing adding option $cf_clang_opt ..." 1>&5
17977
17978 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17979 CFLAGS="${CFLAGS}$cf_clang_opt"
17980
17981 fi
17982 done
17983fi
17984
17985ac_ext=cc
17986ac_cpp='$CXXCPP $CPPFLAGS'
17987ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17988ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17989ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17990ac_main_return="return"
17991
17992cat > conftest.$ac_ext <<EOF
17993#line 17993 "configure"
17994int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17995EOF
17996
17997if test "$INTEL_CPLUSPLUS" = yes
17998then
17999# The "-wdXXX" options suppress warnings:
18000# remark #1419: external declaration in primary source file
18001# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18002# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18003# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
18004# remark #193: zero used for undefined preprocessing identifier
18005# remark #593: variable "curs_sb_left_arrow" was set but never used
18006# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
18007# remark #869: parameter "tw" was never referenced
18008# remark #981: operands are evaluated in unspecified order
18009# warning #269: invalid format string conversion
18010
18011 { echo "$as_me:18011: checking for $CC warning options..." >&5
18012echo "$as_me: checking for $CC warning options..." >&6;}
18013 cf_save_CXXFLAGS="$CXXFLAGS"
18014 EXTRA_CXXFLAGS="-Wall"
18015 for cf_opt in \
18016 wd1419 \
18017 wd1682 \
18018 wd1683 \
18019 wd1684 \
18020 wd193 \
18021 wd279 \
18022 wd593 \
18023 wd810 \
18024 wd869 \
18025 wd981
18026 do
18027 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
18028 if { (eval echo "$as_me:18028: \"$ac_compile\"") >&5
18029 (eval $ac_compile) 2>&5
18030 ac_status=$?
18031 echo "$as_me:18031: \$? = $ac_status" >&5
18032 (exit "$ac_status"); }; then
18033 test -n "$verbose" && echo "$as_me:18033: result: ... -$cf_opt" >&5
18034echo "${ECHO_T}... -$cf_opt" >&6
18035 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18036 fi
18037 done
18038 CXXFLAGS="$cf_save_CXXFLAGS"
18039
18040elif test "$GXX" = yes
18041then
18042 { echo "$as_me:18042: checking for $CXX warning options..." >&5
18043echo "$as_me: checking for $CXX warning options..." >&6;}
18044 cf_save_CXXFLAGS="$CXXFLAGS"
18045 EXTRA_CXXFLAGS="-W -Wall"
18046 cf_gxx_extra_warnings=""
18047 test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
18048 case "$GXX_VERSION" in
18049 ([1-2].*)
18050 ;;
18051 (*)
18052 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
18053 ;;
18054 esac
18055 for cf_opt in \
18056 Wabi \
18057 fabi-version=0 \
18058 Wextra \
18059 Wignored-qualifiers \
18060 Wlogical-op \
18061 Woverloaded-virtual \
18062 Wsign-promo \
18063 Wsynth \
18064 Wold-style-cast \
18065 Wcast-align \
18066 Wcast-qual \
18067 Wpointer-arith \
18068 Wshadow \
18069 Wundef $cf_gxx_extra_warnings Wno-unused
18070 do
18071 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
18072 if { (eval echo "$as_me:18072: \"$ac_compile\"") >&5
18073 (eval $ac_compile) 2>&5
18074 ac_status=$?
18075 echo "$as_me:18075: \$? = $ac_status" >&5
18076 (exit "$ac_status"); }; then
18077 test -n "$verbose" && echo "$as_me:18077: result: ... -$cf_opt" >&5
18078echo "${ECHO_T}... -$cf_opt" >&6
18079 EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18080 else
18081 test -n "$verbose" && echo "$as_me:18081: result: ... no -$cf_opt" >&5
18082echo "${ECHO_T}... no -$cf_opt" >&6
18083 fi
18084 done
18085 CXXFLAGS="$cf_save_CXXFLAGS"
18086fi
18087
18088rm -rf ./conftest*
18089ac_ext=c
18090ac_cpp='$CPP $CPPFLAGS'
18091ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18092ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18093ac_compiler_gnu=$ac_cv_c_compiler_gnu
18094ac_main_return="return"
18095
18096 fi
18097fi
18098
18099echo "$as_me:18099: checking if you want to work around bogus compiler/loader warnings" >&5
18100echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18101
18102# Check whether --enable-string-hacks or --disable-string-hacks was given.
18103if test "${enable_string_hacks+set}" = set; then
18104 enableval="$enable_string_hacks"
18105 enable_string_hacks=$enableval
18106else
18107 enable_string_hacks=no
18108fi;
18109echo "$as_me:18109: result: $enable_string_hacks" >&5
18110echo "${ECHO_T}$enable_string_hacks" >&6
18111
18112if test "x$enable_string_hacks" = "xyes"; then
18113
18114cat >>confdefs.h <<\EOF
18115#define USE_STRING_HACKS 1
18116EOF
18117
18118 { echo "$as_me:18118: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18119echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18120 echo "$as_me:18120: checking for strlcat" >&5
18121echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18122if test "${ac_cv_func_strlcat+set}" = set; then
18123 echo $ECHO_N "(cached) $ECHO_C" >&6
18124else
18125 cat >"conftest.$ac_ext" <<_ACEOF
18126#line 18126 "configure"
18127#include "confdefs.h"
18128#define strlcat autoconf_temporary
18129#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18130#undef strlcat
18131
18132#ifdef __cplusplus
18133extern "C"
18134#endif
18135
18136/* We use char because int might match the return type of a gcc2
18137 builtin and then its argument prototype would still apply. */
18138char strlcat (void);
18139
18140int
18141main (void)
18142{
18143
18144/* The GNU C library defines stubs for functions which it implements
18145 to always fail with ENOSYS. Some functions are actually named
18146 something starting with __ and the normal name is an alias. */
18147#if defined (__stub_strlcat) || defined (__stub___strlcat)
18148#error found stub for strlcat
18149#endif
18150
18151 return strlcat ();
18152 ;
18153 return 0;
18154}
18155_ACEOF
18156rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18157if { (eval echo "$as_me:18157: \"$ac_link\"") >&5
18158 (eval $ac_link) 2>&5
18159 ac_status=$?
18160 echo "$as_me:18160: \$? = $ac_status" >&5
18161 (exit "$ac_status"); } &&
18162 { ac_try='test -s "conftest$ac_exeext"'
18163 { (eval echo "$as_me:18163: \"$ac_try\"") >&5
18164 (eval $ac_try) 2>&5
18165 ac_status=$?
18166 echo "$as_me:18166: \$? = $ac_status" >&5
18167 (exit "$ac_status"); }; }; then
18168 ac_cv_func_strlcat=yes
18169else
18170 echo "$as_me: failed program was:" >&5
18171cat "conftest.$ac_ext" >&5
18172ac_cv_func_strlcat=no
18173fi
18174rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18175fi
18176echo "$as_me:18176: result: $ac_cv_func_strlcat" >&5
18177echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18178if test "$ac_cv_func_strlcat" = yes; then
18179
18180cat >>confdefs.h <<\EOF
18181#define HAVE_STRLCAT 1
18182EOF
18183
18184else
18185
18186 echo "$as_me:18186: checking for strlcat in -lbsd" >&5
18187echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18188if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18189 echo $ECHO_N "(cached) $ECHO_C" >&6
18190else
18191 ac_check_lib_save_LIBS=$LIBS
18192LIBS="-lbsd $LIBS"
18193cat >"conftest.$ac_ext" <<_ACEOF
18194#line 18194 "configure"
18195#include "confdefs.h"
18196
18197/* Override any gcc2 internal prototype to avoid an error. */
18198#ifdef __cplusplus
18199extern "C"
18200#endif
18201/* We use char because int might match the return type of a gcc2
18202 builtin and then its argument prototype would still apply. */
18203char strlcat (void);
18204int
18205main (void)
18206{
18207strlcat ();
18208 ;
18209 return 0;
18210}
18211_ACEOF
18212rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18213if { (eval echo "$as_me:18213: \"$ac_link\"") >&5
18214 (eval $ac_link) 2>&5
18215 ac_status=$?
18216 echo "$as_me:18216: \$? = $ac_status" >&5
18217 (exit "$ac_status"); } &&
18218 { ac_try='test -s "conftest$ac_exeext"'
18219 { (eval echo "$as_me:18219: \"$ac_try\"") >&5
18220 (eval $ac_try) 2>&5
18221 ac_status=$?
18222 echo "$as_me:18222: \$? = $ac_status" >&5
18223 (exit "$ac_status"); }; }; then
18224 ac_cv_lib_bsd_strlcat=yes
18225else
18226 echo "$as_me: failed program was:" >&5
18227cat "conftest.$ac_ext" >&5
18228ac_cv_lib_bsd_strlcat=no
18229fi
18230rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18231LIBS=$ac_check_lib_save_LIBS
18232fi
18233echo "$as_me:18233: result: $ac_cv_lib_bsd_strlcat" >&5
18234echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18235if test "$ac_cv_lib_bsd_strlcat" = yes; then
18236
18237cf_add_libs="$LIBS"
18238# reverse order
18239cf_add_0lib=
18240for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18241# filter duplicates
18242for cf_add_1lib in $cf_add_0lib; do
18243 for cf_add_2lib in $cf_add_libs; do
18244 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18245 cf_add_1lib=
18246 break
18247 fi
18248 done
18249 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18250done
18251LIBS="$cf_add_libs"
18252
18253for ac_header in bsd/string.h
18254do
18255as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18256echo "$as_me:18256: checking for $ac_header" >&5
18257echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18258if eval "test \"\${$as_ac_Header+set}\" = set"; then
18259 echo $ECHO_N "(cached) $ECHO_C" >&6
18260else
18261 cat >"conftest.$ac_ext" <<_ACEOF
18262#line 18262 "configure"
18263#include "confdefs.h"
18264#include <$ac_header>
18265_ACEOF
18266if { (eval echo "$as_me:18266: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18267 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18268 ac_status=$?
18269 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18270 rm -f conftest.er1
18271 cat conftest.err >&5
18272 echo "$as_me:18272: \$? = $ac_status" >&5
18273 (exit "$ac_status"); } >/dev/null; then
18274 if test -s conftest.err; then
18275 ac_cpp_err=$ac_c_preproc_warn_flag
18276 else
18277 ac_cpp_err=
18278 fi
18279else
18280 ac_cpp_err=yes
18281fi
18282if test -z "$ac_cpp_err"; then
18283 eval "$as_ac_Header=yes"
18284else
18285 echo "$as_me: failed program was:" >&5
18286 cat "conftest.$ac_ext" >&5
18287 eval "$as_ac_Header=no"
18288fi
18289rm -f conftest.err "conftest.$ac_ext"
18290fi
18291echo "$as_me:18291: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18292echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18293if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18294 cat >>confdefs.h <<EOF
18295#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18296EOF
18297
18298fi
18299done
18300
18301cat >>confdefs.h <<\EOF
18302#define HAVE_STRLCAT 1
18303EOF
18304
18305fi
18306
18307fi
18308
18309for ac_func in strlcpy snprintf
18310do
18311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18312echo "$as_me:18312: checking for $ac_func" >&5
18313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18314if eval "test \"\${$as_ac_var+set}\" = set"; then
18315 echo $ECHO_N "(cached) $ECHO_C" >&6
18316else
18317 cat >"conftest.$ac_ext" <<_ACEOF
18318#line 18318 "configure"
18319#include "confdefs.h"
18320#define $ac_func autoconf_temporary
18321#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18322#undef $ac_func
18323
18324#ifdef __cplusplus
18325extern "C"
18326#endif
18327
18328/* We use char because int might match the return type of a gcc2
18329 builtin and then its argument prototype would still apply. */
18330char $ac_func (void);
18331
18332int
18333main (void)
18334{
18335
18336/* The GNU C library defines stubs for functions which it implements
18337 to always fail with ENOSYS. Some functions are actually named
18338 something starting with __ and the normal name is an alias. */
18339#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18340#error found stub for $ac_func
18341#endif
18342
18343 return $ac_func ();
18344 ;
18345 return 0;
18346}
18347_ACEOF
18348rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18349if { (eval echo "$as_me:18349: \"$ac_link\"") >&5
18350 (eval $ac_link) 2>&5
18351 ac_status=$?
18352 echo "$as_me:18352: \$? = $ac_status" >&5
18353 (exit "$ac_status"); } &&
18354 { ac_try='test -s "conftest$ac_exeext"'
18355 { (eval echo "$as_me:18355: \"$ac_try\"") >&5
18356 (eval $ac_try) 2>&5
18357 ac_status=$?
18358 echo "$as_me:18358: \$? = $ac_status" >&5
18359 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018360 eval "$as_ac_var=yes"
18361else
18362 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040018363cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018364eval "$as_ac_var=no"
18365fi
micky3879b9f5e72025-07-08 18:04:53 -040018366rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010018367fi
micky3879b9f5e72025-07-08 18:04:53 -040018368echo "$as_me:18368: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18369echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18370if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018371 cat >>confdefs.h <<EOF
18372#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18373EOF
18374
18375fi
18376done
18377
18378fi
18379
18380### use option --enable-assertions to turn on generation of assertion code
micky3879b9f5e72025-07-08 18:04:53 -040018381echo "$as_me:18381: checking if you want to enable runtime assertions" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018382echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18383
18384# Check whether --enable-assertions or --disable-assertions was given.
18385if test "${enable_assertions+set}" = set; then
18386 enableval="$enable_assertions"
18387 with_assertions=$enableval
18388else
18389 with_assertions=no
18390fi;
micky3879b9f5e72025-07-08 18:04:53 -040018391echo "$as_me:18391: result: $with_assertions" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018392echo "${ECHO_T}$with_assertions" >&6
18393if test -n "$GCC"
18394then
18395 if test "$with_assertions" = no
18396 then
18397 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18398 else
18399
18400 ADAFLAGS="$ADAFLAGS -gnata"
18401
18402 fi
18403fi
18404
18405### use option --disable-leaks to suppress "permanent" leaks, for testing
18406
micky3879b9f5e72025-07-08 18:04:53 -040018407echo "$as_me:18407: checking if you want to use dmalloc for testing" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018408echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18409
18410# Check whether --with-dmalloc or --without-dmalloc was given.
18411if test "${with_dmalloc+set}" = set; then
18412 withval="$with_dmalloc"
micky3879b9f5e72025-07-08 18:04:53 -040018413 case "x$withval" in
18414 (x|xno) ;;
18415 (*)
18416 : "${with_cflags:=-g}"
18417 : "${enable_leaks:=no}"
18418 with_dmalloc=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010018419
18420cat >>confdefs.h <<EOF
18421#define USE_DMALLOC 1
18422EOF
18423
micky3879b9f5e72025-07-08 18:04:53 -040018424 ;;
18425 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010018426else
18427 with_dmalloc=
18428fi;
micky3879b9f5e72025-07-08 18:04:53 -040018429echo "$as_me:18429: result: ${with_dmalloc:-no}" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018430echo "${ECHO_T}${with_dmalloc:-no}" >&6
18431
micky3879b9f5e72025-07-08 18:04:53 -040018432case ".$with_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018433(.*-g*)
18434 case .$CFLAGS in
18435 (.*-g*)
18436 ;;
18437 (*)
18438
18439cf_fix_cppflags=no
18440cf_new_cflags=
18441cf_new_cppflags=
18442cf_new_extra_cppflags=
18443
18444for cf_add_cflags in -g
18445do
micky3879b9f5e72025-07-08 18:04:53 -040018446case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018447(no)
micky3879b9f5e72025-07-08 18:04:53 -040018448 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018449 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040018450 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018451 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040018452 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010018453
18454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18455 && test -z "${cf_tst_cflags}" \
18456 && cf_fix_cppflags=yes
18457
micky3879b9f5e72025-07-08 18:04:53 -040018458 if test "$cf_fix_cppflags" = yes ; then
18459
18460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18462
Steve Kondikae271bc2015-11-15 02:50:53 +010018463 continue
18464 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040018465
18466 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18467 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18468
Steve Kondikae271bc2015-11-15 02:50:53 +010018469 continue
18470 fi
18471 ;;
18472 esac
18473 case "$CPPFLAGS" in
18474 (*$cf_add_cflags)
18475 ;;
18476 (*)
micky3879b9f5e72025-07-08 18:04:53 -040018477 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018478 (-D*)
18479 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18480
18481CPPFLAGS=`echo "$CPPFLAGS" | \
18482 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18483 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18484
18485 ;;
18486 esac
micky3879b9f5e72025-07-08 18:04:53 -040018487
18488 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18489 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18490
Steve Kondikae271bc2015-11-15 02:50:53 +010018491 ;;
18492 esac
18493 ;;
18494 (*)
micky3879b9f5e72025-07-08 18:04:53 -040018495
18496 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18497 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18498
Steve Kondikae271bc2015-11-15 02:50:53 +010018499 ;;
18500 esac
18501 ;;
18502(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010018503
micky3879b9f5e72025-07-08 18:04:53 -040018504 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18505 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18506
18507 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010018508
18509 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18510 && test -z "${cf_tst_cflags}" \
18511 && cf_fix_cppflags=no
18512 ;;
18513esac
18514done
18515
18516if test -n "$cf_new_cflags" ; then
18517
micky3879b9f5e72025-07-08 18:04:53 -040018518 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18519 CFLAGS="${CFLAGS}$cf_new_cflags"
18520
Steve Kondikae271bc2015-11-15 02:50:53 +010018521fi
18522
18523if test -n "$cf_new_cppflags" ; then
18524
micky3879b9f5e72025-07-08 18:04:53 -040018525 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18526 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18527
Steve Kondikae271bc2015-11-15 02:50:53 +010018528fi
18529
18530if test -n "$cf_new_extra_cppflags" ; then
18531
micky3879b9f5e72025-07-08 18:04:53 -040018532 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18533 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18534
Steve Kondikae271bc2015-11-15 02:50:53 +010018535fi
18536
18537 ;;
18538 esac
18539 ;;
18540esac
18541
18542if test "$with_dmalloc" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040018543 echo "$as_me:18543: checking for dmalloc.h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018544echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18545if test "${ac_cv_header_dmalloc_h+set}" = set; then
18546 echo $ECHO_N "(cached) $ECHO_C" >&6
18547else
micky3879b9f5e72025-07-08 18:04:53 -040018548 cat >"conftest.$ac_ext" <<_ACEOF
18549#line 18549 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010018550#include "confdefs.h"
18551#include <dmalloc.h>
18552_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040018553if { (eval echo "$as_me:18553: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18554 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +010018555 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040018556 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +010018557 rm -f conftest.er1
18558 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040018559 echo "$as_me:18559: \$? = $ac_status" >&5
18560 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018561 if test -s conftest.err; then
18562 ac_cpp_err=$ac_c_preproc_warn_flag
18563 else
18564 ac_cpp_err=
18565 fi
18566else
18567 ac_cpp_err=yes
18568fi
18569if test -z "$ac_cpp_err"; then
18570 ac_cv_header_dmalloc_h=yes
18571else
18572 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040018573 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018574 ac_cv_header_dmalloc_h=no
18575fi
micky3879b9f5e72025-07-08 18:04:53 -040018576rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010018577fi
micky3879b9f5e72025-07-08 18:04:53 -040018578echo "$as_me:18578: result: $ac_cv_header_dmalloc_h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018579echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
micky3879b9f5e72025-07-08 18:04:53 -040018580if test "$ac_cv_header_dmalloc_h" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018581
micky3879b9f5e72025-07-08 18:04:53 -040018582echo "$as_me:18582: checking for dmalloc_debug in -ldmalloc" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018583echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18584if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18585 echo $ECHO_N "(cached) $ECHO_C" >&6
18586else
18587 ac_check_lib_save_LIBS=$LIBS
18588LIBS="-ldmalloc $LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040018589cat >"conftest.$ac_ext" <<_ACEOF
18590#line 18590 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010018591#include "confdefs.h"
18592
18593/* Override any gcc2 internal prototype to avoid an error. */
18594#ifdef __cplusplus
18595extern "C"
18596#endif
18597/* We use char because int might match the return type of a gcc2
18598 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040018599char dmalloc_debug (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010018600int
micky3879b9f5e72025-07-08 18:04:53 -040018601main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010018602{
18603dmalloc_debug ();
18604 ;
18605 return 0;
18606}
18607_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040018608rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18609if { (eval echo "$as_me:18609: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018610 (eval $ac_link) 2>&5
18611 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040018612 echo "$as_me:18612: \$? = $ac_status" >&5
18613 (exit "$ac_status"); } &&
18614 { ac_try='test -s "conftest$ac_exeext"'
18615 { (eval echo "$as_me:18615: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018616 (eval $ac_try) 2>&5
18617 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040018618 echo "$as_me:18618: \$? = $ac_status" >&5
18619 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018620 ac_cv_lib_dmalloc_dmalloc_debug=yes
18621else
18622 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040018623cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018624ac_cv_lib_dmalloc_dmalloc_debug=no
18625fi
micky3879b9f5e72025-07-08 18:04:53 -040018626rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010018627LIBS=$ac_check_lib_save_LIBS
18628fi
micky3879b9f5e72025-07-08 18:04:53 -040018629echo "$as_me:18629: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018630echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
micky3879b9f5e72025-07-08 18:04:53 -040018631if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018632 cat >>confdefs.h <<EOF
18633#define HAVE_LIBDMALLOC 1
18634EOF
18635
18636 LIBS="-ldmalloc $LIBS"
18637
18638fi
18639
18640fi
18641
18642fi
18643
micky3879b9f5e72025-07-08 18:04:53 -040018644echo "$as_me:18644: checking if you want to use dbmalloc for testing" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018645echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18646
18647# Check whether --with-dbmalloc or --without-dbmalloc was given.
18648if test "${with_dbmalloc+set}" = set; then
18649 withval="$with_dbmalloc"
micky3879b9f5e72025-07-08 18:04:53 -040018650 case "x$withval" in
18651 (x|xno) ;;
18652 (*)
18653 : "${with_cflags:=-g}"
18654 : "${enable_leaks:=no}"
18655 with_dbmalloc=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010018656
18657cat >>confdefs.h <<EOF
18658#define USE_DBMALLOC 1
18659EOF
18660
micky3879b9f5e72025-07-08 18:04:53 -040018661 ;;
18662 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010018663else
18664 with_dbmalloc=
18665fi;
micky3879b9f5e72025-07-08 18:04:53 -040018666echo "$as_me:18666: result: ${with_dbmalloc:-no}" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018667echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18668
micky3879b9f5e72025-07-08 18:04:53 -040018669case ".$with_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018670(.*-g*)
18671 case .$CFLAGS in
18672 (.*-g*)
18673 ;;
18674 (*)
18675
18676cf_fix_cppflags=no
18677cf_new_cflags=
18678cf_new_cppflags=
18679cf_new_extra_cppflags=
18680
18681for cf_add_cflags in -g
18682do
micky3879b9f5e72025-07-08 18:04:53 -040018683case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018684(no)
micky3879b9f5e72025-07-08 18:04:53 -040018685 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018686 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040018687 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018688 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040018689 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010018690
18691 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18692 && test -z "${cf_tst_cflags}" \
18693 && cf_fix_cppflags=yes
18694
micky3879b9f5e72025-07-08 18:04:53 -040018695 if test "$cf_fix_cppflags" = yes ; then
18696
18697 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18698 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18699
Steve Kondikae271bc2015-11-15 02:50:53 +010018700 continue
18701 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040018702
18703 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18704 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18705
Steve Kondikae271bc2015-11-15 02:50:53 +010018706 continue
18707 fi
18708 ;;
18709 esac
18710 case "$CPPFLAGS" in
18711 (*$cf_add_cflags)
18712 ;;
18713 (*)
micky3879b9f5e72025-07-08 18:04:53 -040018714 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018715 (-D*)
18716 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18717
18718CPPFLAGS=`echo "$CPPFLAGS" | \
18719 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18720 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18721
18722 ;;
18723 esac
micky3879b9f5e72025-07-08 18:04:53 -040018724
18725 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18726 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18727
Steve Kondikae271bc2015-11-15 02:50:53 +010018728 ;;
18729 esac
18730 ;;
18731 (*)
micky3879b9f5e72025-07-08 18:04:53 -040018732
18733 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18734 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18735
Steve Kondikae271bc2015-11-15 02:50:53 +010018736 ;;
18737 esac
18738 ;;
18739(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010018740
micky3879b9f5e72025-07-08 18:04:53 -040018741 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18742 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18743
18744 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010018745
18746 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18747 && test -z "${cf_tst_cflags}" \
18748 && cf_fix_cppflags=no
18749 ;;
18750esac
18751done
18752
18753if test -n "$cf_new_cflags" ; then
18754
micky3879b9f5e72025-07-08 18:04:53 -040018755 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18756 CFLAGS="${CFLAGS}$cf_new_cflags"
18757
Steve Kondikae271bc2015-11-15 02:50:53 +010018758fi
18759
18760if test -n "$cf_new_cppflags" ; then
18761
micky3879b9f5e72025-07-08 18:04:53 -040018762 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18763 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18764
Steve Kondikae271bc2015-11-15 02:50:53 +010018765fi
18766
18767if test -n "$cf_new_extra_cppflags" ; then
18768
micky3879b9f5e72025-07-08 18:04:53 -040018769 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18770 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18771
Steve Kondikae271bc2015-11-15 02:50:53 +010018772fi
18773
18774 ;;
18775 esac
18776 ;;
18777esac
18778
18779if test "$with_dbmalloc" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040018780 echo "$as_me:18780: checking for dbmalloc.h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018781echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18782if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18783 echo $ECHO_N "(cached) $ECHO_C" >&6
18784else
micky3879b9f5e72025-07-08 18:04:53 -040018785 cat >"conftest.$ac_ext" <<_ACEOF
18786#line 18786 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010018787#include "confdefs.h"
18788#include <dbmalloc.h>
18789_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040018790if { (eval echo "$as_me:18790: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18791 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +010018792 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040018793 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +010018794 rm -f conftest.er1
18795 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040018796 echo "$as_me:18796: \$? = $ac_status" >&5
18797 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018798 if test -s conftest.err; then
18799 ac_cpp_err=$ac_c_preproc_warn_flag
18800 else
18801 ac_cpp_err=
18802 fi
18803else
18804 ac_cpp_err=yes
18805fi
18806if test -z "$ac_cpp_err"; then
18807 ac_cv_header_dbmalloc_h=yes
18808else
18809 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040018810 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018811 ac_cv_header_dbmalloc_h=no
18812fi
micky3879b9f5e72025-07-08 18:04:53 -040018813rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010018814fi
micky3879b9f5e72025-07-08 18:04:53 -040018815echo "$as_me:18815: result: $ac_cv_header_dbmalloc_h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018816echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
micky3879b9f5e72025-07-08 18:04:53 -040018817if test "$ac_cv_header_dbmalloc_h" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018818
micky3879b9f5e72025-07-08 18:04:53 -040018819echo "$as_me:18819: checking for debug_malloc in -ldbmalloc" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018820echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18821if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18822 echo $ECHO_N "(cached) $ECHO_C" >&6
18823else
18824 ac_check_lib_save_LIBS=$LIBS
18825LIBS="-ldbmalloc $LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040018826cat >"conftest.$ac_ext" <<_ACEOF
18827#line 18827 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010018828#include "confdefs.h"
18829
18830/* Override any gcc2 internal prototype to avoid an error. */
18831#ifdef __cplusplus
18832extern "C"
18833#endif
18834/* We use char because int might match the return type of a gcc2
18835 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040018836char debug_malloc (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010018837int
micky3879b9f5e72025-07-08 18:04:53 -040018838main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010018839{
18840debug_malloc ();
18841 ;
18842 return 0;
18843}
18844_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040018845rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18846if { (eval echo "$as_me:18846: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018847 (eval $ac_link) 2>&5
18848 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040018849 echo "$as_me:18849: \$? = $ac_status" >&5
18850 (exit "$ac_status"); } &&
18851 { ac_try='test -s "conftest$ac_exeext"'
18852 { (eval echo "$as_me:18852: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018853 (eval $ac_try) 2>&5
18854 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040018855 echo "$as_me:18855: \$? = $ac_status" >&5
18856 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018857 ac_cv_lib_dbmalloc_debug_malloc=yes
18858else
18859 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040018860cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018861ac_cv_lib_dbmalloc_debug_malloc=no
18862fi
micky3879b9f5e72025-07-08 18:04:53 -040018863rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010018864LIBS=$ac_check_lib_save_LIBS
18865fi
micky3879b9f5e72025-07-08 18:04:53 -040018866echo "$as_me:18866: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018867echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
micky3879b9f5e72025-07-08 18:04:53 -040018868if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010018869 cat >>confdefs.h <<EOF
18870#define HAVE_LIBDBMALLOC 1
18871EOF
18872
18873 LIBS="-ldbmalloc $LIBS"
18874
18875fi
18876
18877fi
18878
18879fi
18880
micky3879b9f5e72025-07-08 18:04:53 -040018881echo "$as_me:18881: checking if you want to use valgrind for testing" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018882echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18883
18884# Check whether --with-valgrind or --without-valgrind was given.
18885if test "${with_valgrind+set}" = set; then
18886 withval="$with_valgrind"
micky3879b9f5e72025-07-08 18:04:53 -040018887 case "x$withval" in
18888 (x|xno) ;;
18889 (*)
18890 : "${with_cflags:=-g}"
18891 : "${enable_leaks:=no}"
18892 with_valgrind=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010018893
18894cat >>confdefs.h <<EOF
18895#define USE_VALGRIND 1
18896EOF
18897
micky3879b9f5e72025-07-08 18:04:53 -040018898 ;;
18899 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010018900else
18901 with_valgrind=
18902fi;
micky3879b9f5e72025-07-08 18:04:53 -040018903echo "$as_me:18903: result: ${with_valgrind:-no}" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010018904echo "${ECHO_T}${with_valgrind:-no}" >&6
18905
micky3879b9f5e72025-07-08 18:04:53 -040018906case ".$with_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018907(.*-g*)
18908 case .$CFLAGS in
18909 (.*-g*)
18910 ;;
18911 (*)
18912
18913cf_fix_cppflags=no
18914cf_new_cflags=
18915cf_new_cppflags=
18916cf_new_extra_cppflags=
18917
18918for cf_add_cflags in -g
18919do
micky3879b9f5e72025-07-08 18:04:53 -040018920case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018921(no)
micky3879b9f5e72025-07-08 18:04:53 -040018922 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018923 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040018924 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018925 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040018926 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010018927
18928 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18929 && test -z "${cf_tst_cflags}" \
18930 && cf_fix_cppflags=yes
18931
micky3879b9f5e72025-07-08 18:04:53 -040018932 if test "$cf_fix_cppflags" = yes ; then
18933
18934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18936
Steve Kondikae271bc2015-11-15 02:50:53 +010018937 continue
18938 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040018939
18940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18942
Steve Kondikae271bc2015-11-15 02:50:53 +010018943 continue
18944 fi
18945 ;;
18946 esac
18947 case "$CPPFLAGS" in
18948 (*$cf_add_cflags)
18949 ;;
18950 (*)
micky3879b9f5e72025-07-08 18:04:53 -040018951 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010018952 (-D*)
18953 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18954
18955CPPFLAGS=`echo "$CPPFLAGS" | \
18956 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18957 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18958
18959 ;;
18960 esac
micky3879b9f5e72025-07-08 18:04:53 -040018961
18962 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18963 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18964
Steve Kondikae271bc2015-11-15 02:50:53 +010018965 ;;
18966 esac
18967 ;;
18968 (*)
micky3879b9f5e72025-07-08 18:04:53 -040018969
18970 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18971 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18972
Steve Kondikae271bc2015-11-15 02:50:53 +010018973 ;;
18974 esac
18975 ;;
18976(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010018977
micky3879b9f5e72025-07-08 18:04:53 -040018978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18980
18981 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010018982
18983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18984 && test -z "${cf_tst_cflags}" \
18985 && cf_fix_cppflags=no
18986 ;;
18987esac
18988done
18989
18990if test -n "$cf_new_cflags" ; then
18991
micky3879b9f5e72025-07-08 18:04:53 -040018992 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18993 CFLAGS="${CFLAGS}$cf_new_cflags"
18994
Steve Kondikae271bc2015-11-15 02:50:53 +010018995fi
18996
18997if test -n "$cf_new_cppflags" ; then
18998
micky3879b9f5e72025-07-08 18:04:53 -040018999 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19000 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19001
Steve Kondikae271bc2015-11-15 02:50:53 +010019002fi
19003
19004if test -n "$cf_new_extra_cppflags" ; then
19005
micky3879b9f5e72025-07-08 18:04:53 -040019006 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19007 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19008
Steve Kondikae271bc2015-11-15 02:50:53 +010019009fi
19010
19011 ;;
19012 esac
19013 ;;
19014esac
19015
micky3879b9f5e72025-07-08 18:04:53 -040019016echo "$as_me:19016: checking if you want to perform memory-leak testing" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019017echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
19018
19019# Check whether --enable-leaks or --disable-leaks was given.
19020if test "${enable_leaks+set}" = set; then
19021 enableval="$enable_leaks"
micky3879b9f5e72025-07-08 18:04:53 -040019022 enable_leaks=$enableval
Steve Kondikae271bc2015-11-15 02:50:53 +010019023else
micky3879b9f5e72025-07-08 18:04:53 -040019024 enable_leaks=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010019025fi;
micky3879b9f5e72025-07-08 18:04:53 -040019026if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
19027echo "$as_me:19027: result: $with_no_leaks" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019028echo "${ECHO_T}$with_no_leaks" >&6
19029
micky3879b9f5e72025-07-08 18:04:53 -040019030if test "$enable_leaks" = no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019031
19032cat >>confdefs.h <<\EOF
19033#define NO_LEAKS 1
19034EOF
19035
19036cat >>confdefs.h <<\EOF
19037#define YY_NO_LEAKS 1
19038EOF
19039
19040fi
19041
19042cat >>confdefs.h <<\EOF
19043#define HAVE_NC_ALLOC_H 1
19044EOF
19045
19046### use option --enable-expanded to generate certain macros as functions
19047
19048# Check whether --enable-expanded or --disable-expanded was given.
19049if test "${enable_expanded+set}" = set; then
19050 enableval="$enable_expanded"
19051 test "x$enableval" = xyes &&
19052cat >>confdefs.h <<\EOF
19053#define NCURSES_EXPANDED 1
19054EOF
19055
19056fi;
19057
19058### use option --disable-macros to suppress macros in favor of functions
19059
19060# Check whether --enable-macros or --disable-macros was given.
19061if test "${enable_macros+set}" = set; then
19062 enableval="$enable_macros"
19063 test "$enableval" = no &&
19064cat >>confdefs.h <<\EOF
19065#define NCURSES_NOMACROS 1
19066EOF
19067
19068fi;
19069
19070# Normally we only add trace() to the debug-library. Allow this to be
19071# extended to all models of the ncurses library:
19072cf_all_traces=no
19073case "$CFLAGS $CPPFLAGS" in
19074(*-DTRACE*)
19075 cf_all_traces=yes
19076 ;;
19077esac
19078
micky3879b9f5e72025-07-08 18:04:53 -040019079echo "$as_me:19079: checking whether to add trace feature to all models" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019080echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
19081
19082# Check whether --with-trace or --without-trace was given.
19083if test "${with_trace+set}" = set; then
19084 withval="$with_trace"
19085 cf_with_trace=$withval
19086else
19087 cf_with_trace=$cf_all_traces
19088fi;
micky3879b9f5e72025-07-08 18:04:53 -040019089echo "$as_me:19089: result: $cf_with_trace" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019090echo "${ECHO_T}$cf_with_trace" >&6
19091
19092if test "x$cf_with_trace" = xyes ; then
19093 LIB_TRACING=all
19094 ADA_TRACE=TRUE
19095
19096cf_fix_cppflags=no
19097cf_new_cflags=
19098cf_new_cppflags=
19099cf_new_extra_cppflags=
19100
19101for cf_add_cflags in -DTRACE
19102do
micky3879b9f5e72025-07-08 18:04:53 -040019103case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010019104(no)
micky3879b9f5e72025-07-08 18:04:53 -040019105 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010019106 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040019107 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010019108 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040019109 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010019110
19111 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19112 && test -z "${cf_tst_cflags}" \
19113 && cf_fix_cppflags=yes
19114
micky3879b9f5e72025-07-08 18:04:53 -040019115 if test "$cf_fix_cppflags" = yes ; then
19116
19117 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19118 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19119
Steve Kondikae271bc2015-11-15 02:50:53 +010019120 continue
19121 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040019122
19123 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19124 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19125
Steve Kondikae271bc2015-11-15 02:50:53 +010019126 continue
19127 fi
19128 ;;
19129 esac
19130 case "$CPPFLAGS" in
19131 (*$cf_add_cflags)
19132 ;;
19133 (*)
micky3879b9f5e72025-07-08 18:04:53 -040019134 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010019135 (-D*)
19136 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19137
19138CPPFLAGS=`echo "$CPPFLAGS" | \
19139 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
19140 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
19141
19142 ;;
19143 esac
micky3879b9f5e72025-07-08 18:04:53 -040019144
19145 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19146 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19147
Steve Kondikae271bc2015-11-15 02:50:53 +010019148 ;;
19149 esac
19150 ;;
19151 (*)
micky3879b9f5e72025-07-08 18:04:53 -040019152
19153 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19154 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19155
Steve Kondikae271bc2015-11-15 02:50:53 +010019156 ;;
19157 esac
19158 ;;
19159(yes)
Steve Kondikae271bc2015-11-15 02:50:53 +010019160
micky3879b9f5e72025-07-08 18:04:53 -040019161 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19162 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19163
19164 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010019165
19166 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19167 && test -z "${cf_tst_cflags}" \
19168 && cf_fix_cppflags=no
19169 ;;
19170esac
19171done
19172
19173if test -n "$cf_new_cflags" ; then
19174
micky3879b9f5e72025-07-08 18:04:53 -040019175 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19176 CFLAGS="${CFLAGS}$cf_new_cflags"
19177
Steve Kondikae271bc2015-11-15 02:50:53 +010019178fi
19179
19180if test -n "$cf_new_cppflags" ; then
19181
micky3879b9f5e72025-07-08 18:04:53 -040019182 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19183 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19184
Steve Kondikae271bc2015-11-15 02:50:53 +010019185fi
19186
19187if test -n "$cf_new_extra_cppflags" ; then
19188
micky3879b9f5e72025-07-08 18:04:53 -040019189 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19190 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19191
Steve Kondikae271bc2015-11-15 02:50:53 +010019192fi
19193
micky3879b9f5e72025-07-08 18:04:53 -040019194cat >>confdefs.h <<\EOF
19195#define HAVE__TRACEF 1
19196EOF
19197
Steve Kondikae271bc2015-11-15 02:50:53 +010019198else
19199 LIB_TRACING=DEBUG
19200 ADA_TRACE=FALSE
19201fi
19202
micky3879b9f5e72025-07-08 18:04:53 -040019203echo "$as_me:19203: checking if we want to use GNAT projects" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019204echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19205
19206# Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19207if test "${enable_gnat_projects+set}" = set; then
19208 enableval="$enable_gnat_projects"
19209 test "$enableval" != no && enableval=yes
19210 if test "$enableval" != "yes" ; then
19211 enable_gnat_projects=no
19212 else
19213 enable_gnat_projects=yes
19214 fi
19215else
19216 enableval=yes
19217 enable_gnat_projects=yes
19218
19219fi;
micky3879b9f5e72025-07-08 18:04:53 -040019220echo "$as_me:19220: result: $enable_gnat_projects" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019221echo "${ECHO_T}$enable_gnat_projects" >&6
19222
19223### Checks for libraries.
micky3879b9f5e72025-07-08 18:04:53 -040019224case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010019225(*mingw32*|*mingw64*)
micky3879b9f5e72025-07-08 18:04:53 -040019226 # Note: WINVER may be a problem with Windows 10
19227 if test "x$with_exp_win32" = xyes ; then
19228 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19229 else
19230 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19231 fi
19232
19233echo "$as_me:19233: checking if ssp library is needed" >&5
19234echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19235if test "${cf_cv_need_libssp+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019236 echo $ECHO_N "(cached) $ECHO_C" >&6
19237else
micky3879b9f5e72025-07-08 18:04:53 -040019238
19239cat >"conftest.$ac_ext" <<_ACEOF
19240#line 19240 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010019241#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040019242
19243#include <sys/types.h>
19244#include <dirent.h>
Steve Kondikae271bc2015-11-15 02:50:53 +010019245
19246int
micky3879b9f5e72025-07-08 18:04:53 -040019247main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010019248{
micky3879b9f5e72025-07-08 18:04:53 -040019249
19250 DIR *dp = opendir(".");
Steve Kondikae271bc2015-11-15 02:50:53 +010019251
19252 ;
19253 return 0;
19254}
19255_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040019256rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19257if { (eval echo "$as_me:19257: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019258 (eval $ac_link) 2>&5
19259 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019260 echo "$as_me:19260: \$? = $ac_status" >&5
19261 (exit "$ac_status"); } &&
19262 { ac_try='test -s "conftest$ac_exeext"'
19263 { (eval echo "$as_me:19263: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019264 (eval $ac_try) 2>&5
19265 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019266 echo "$as_me:19266: \$? = $ac_status" >&5
19267 (exit "$ac_status"); }; }; then
19268 cf_cv_need_libssp=no
Steve Kondikae271bc2015-11-15 02:50:53 +010019269else
19270 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040019271cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019272
micky3879b9f5e72025-07-08 18:04:53 -040019273 cf_save_LIBS="$LIBS"
19274 LIBS="$LIBS -lssp"
19275 cat >"conftest.$ac_ext" <<_ACEOF
19276#line 19276 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010019277#include "confdefs.h"
19278
micky3879b9f5e72025-07-08 18:04:53 -040019279#include <sys/types.h>
19280#include <dirent.h>
19281
Steve Kondikae271bc2015-11-15 02:50:53 +010019282int
micky3879b9f5e72025-07-08 18:04:53 -040019283main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010019284{
micky3879b9f5e72025-07-08 18:04:53 -040019285
19286 DIR *dp = opendir(".");
19287
Steve Kondikae271bc2015-11-15 02:50:53 +010019288 ;
19289 return 0;
19290}
19291_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040019292rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19293if { (eval echo "$as_me:19293: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019294 (eval $ac_link) 2>&5
19295 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019296 echo "$as_me:19296: \$? = $ac_status" >&5
19297 (exit "$ac_status"); } &&
19298 { ac_try='test -s "conftest$ac_exeext"'
19299 { (eval echo "$as_me:19299: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019300 (eval $ac_try) 2>&5
19301 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019302 echo "$as_me:19302: \$? = $ac_status" >&5
19303 (exit "$ac_status"); }; }; then
19304 cf_cv_need_libssp=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010019305else
19306 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040019307cat "conftest.$ac_ext" >&5
19308cf_cv_need_libssp=maybe
Steve Kondikae271bc2015-11-15 02:50:53 +010019309fi
micky3879b9f5e72025-07-08 18:04:53 -040019310rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19311 LIBS="$cf_save_LIBS"
19312
Steve Kondikae271bc2015-11-15 02:50:53 +010019313fi
micky3879b9f5e72025-07-08 18:04:53 -040019314rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19315fi
19316echo "$as_me:19316: result: $cf_cv_need_libssp" >&5
19317echo "${ECHO_T}$cf_cv_need_libssp" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010019318
micky3879b9f5e72025-07-08 18:04:53 -040019319if test "x$cf_cv_need_libssp" = xyes
19320then
Steve Kondikae271bc2015-11-15 02:50:53 +010019321
micky3879b9f5e72025-07-08 18:04:53 -040019322cf_add_libs="$LIBS"
19323# reverse order
19324cf_add_0lib=
19325for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19326# filter duplicates
19327for cf_add_1lib in $cf_add_0lib; do
19328 for cf_add_2lib in $cf_add_libs; do
19329 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019330 cf_add_1lib=
19331 break
19332 fi
19333 done
micky3879b9f5e72025-07-08 18:04:53 -040019334 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010019335done
19336LIBS="$cf_add_libs"
19337
19338fi
19339
micky3879b9f5e72025-07-08 18:04:53 -040019340 ;;
19341(*)
Steve Kondikae271bc2015-11-15 02:50:53 +010019342 ;;
19343esac
19344
micky3879b9f5e72025-07-08 18:04:53 -040019345echo "$as_me:19345: checking if -lm needed for math functions" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019346echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19347if test "${cf_cv_need_libm+set}" = set; then
19348 echo $ECHO_N "(cached) $ECHO_C" >&6
19349else
19350
micky3879b9f5e72025-07-08 18:04:53 -040019351 cat >"conftest.$ac_ext" <<_ACEOF
19352#line 19352 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010019353#include "confdefs.h"
19354
micky3879b9f5e72025-07-08 18:04:53 -040019355 #include <stdio.h>
19356 #include <stdlib.h>
19357 #include <math.h>
Steve Kondikae271bc2015-11-15 02:50:53 +010019358
19359int
micky3879b9f5e72025-07-08 18:04:53 -040019360main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010019361{
micky3879b9f5e72025-07-08 18:04:53 -040019362double x = rand(); printf("result = %g\\n", pow(sin(x),x))
Steve Kondikae271bc2015-11-15 02:50:53 +010019363 ;
19364 return 0;
19365}
19366_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040019367rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19368if { (eval echo "$as_me:19368: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019369 (eval $ac_link) 2>&5
19370 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019371 echo "$as_me:19371: \$? = $ac_status" >&5
19372 (exit "$ac_status"); } &&
19373 { ac_try='test -s "conftest$ac_exeext"'
19374 { (eval echo "$as_me:19374: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019375 (eval $ac_try) 2>&5
19376 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019377 echo "$as_me:19377: \$? = $ac_status" >&5
19378 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019379 cf_cv_need_libm=no
19380else
19381 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040019382cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019383cf_cv_need_libm=yes
19384fi
micky3879b9f5e72025-07-08 18:04:53 -040019385rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010019386fi
micky3879b9f5e72025-07-08 18:04:53 -040019387echo "$as_me:19387: result: $cf_cv_need_libm" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019388echo "${ECHO_T}$cf_cv_need_libm" >&6
micky3879b9f5e72025-07-08 18:04:53 -040019389
Steve Kondikae271bc2015-11-15 02:50:53 +010019390if test "$cf_cv_need_libm" = yes
19391then
micky3879b9f5e72025-07-08 18:04:53 -040019392
19393 cf_save_LIBS="$LIBS"
19394 LIBS="$LIBS -lm"
19395 echo "$as_me:19395: checking if -lm is available for math functions" >&5
19396echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19397if test "${cf_cv_have_libm+set}" = set; then
19398 echo $ECHO_N "(cached) $ECHO_C" >&6
19399else
19400
19401 cat >"conftest.$ac_ext" <<_ACEOF
19402#line 19402 "configure"
19403#include "confdefs.h"
19404
19405 #include <stdio.h>
19406 #include <stdlib.h>
19407 #include <math.h>
19408
19409int
19410main (void)
19411{
19412double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19413 ;
19414 return 0;
19415}
19416_ACEOF
19417rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19418if { (eval echo "$as_me:19418: \"$ac_link\"") >&5
19419 (eval $ac_link) 2>&5
19420 ac_status=$?
19421 echo "$as_me:19421: \$? = $ac_status" >&5
19422 (exit "$ac_status"); } &&
19423 { ac_try='test -s "conftest$ac_exeext"'
19424 { (eval echo "$as_me:19424: \"$ac_try\"") >&5
19425 (eval $ac_try) 2>&5
19426 ac_status=$?
19427 echo "$as_me:19427: \$? = $ac_status" >&5
19428 (exit "$ac_status"); }; }; then
19429 cf_cv_have_libm=yes
19430else
19431 echo "$as_me: failed program was:" >&5
19432cat "conftest.$ac_ext" >&5
19433cf_cv_have_libm=no
19434fi
19435rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19436fi
19437echo "$as_me:19437: result: $cf_cv_have_libm" >&5
19438echo "${ECHO_T}$cf_cv_have_libm" >&6
19439 LIBS="$cf_save_LIBS"
19440
19441 if test "$cf_cv_have_libm" = yes
19442 then
19443 MATH_LIB=-lm
19444 fi
19445else
19446 cf_cv_have_libm=yes
19447fi
19448
19449if test "$cf_cv_have_libm" = yes
19450then
19451
19452cat >>confdefs.h <<\EOF
19453#define HAVE_MATH_FUNCS 1
19454EOF
19455
Steve Kondikae271bc2015-11-15 02:50:53 +010019456fi
19457
19458### Checks for header files.
micky3879b9f5e72025-07-08 18:04:53 -040019459echo "$as_me:19459: checking whether time.h and sys/time.h may both be included" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019460echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19461if test "${ac_cv_header_time+set}" = set; then
19462 echo $ECHO_N "(cached) $ECHO_C" >&6
19463else
micky3879b9f5e72025-07-08 18:04:53 -040019464 cat >"conftest.$ac_ext" <<_ACEOF
19465#line 19465 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010019466#include "confdefs.h"
19467#include <sys/types.h>
19468#include <sys/time.h>
19469#include <time.h>
19470
19471int
micky3879b9f5e72025-07-08 18:04:53 -040019472main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010019473{
19474if ((struct tm *) 0)
19475return 0;
19476 ;
19477 return 0;
19478}
19479_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040019480rm -f "conftest.$ac_objext"
19481if { (eval echo "$as_me:19481: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019482 (eval $ac_compile) 2>&5
19483 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019484 echo "$as_me:19484: \$? = $ac_status" >&5
19485 (exit "$ac_status"); } &&
19486 { ac_try='test -s "conftest.$ac_objext"'
19487 { (eval echo "$as_me:19487: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019488 (eval $ac_try) 2>&5
19489 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019490 echo "$as_me:19490: \$? = $ac_status" >&5
19491 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019492 ac_cv_header_time=yes
19493else
19494 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040019495cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019496ac_cv_header_time=no
19497fi
micky3879b9f5e72025-07-08 18:04:53 -040019498rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010019499fi
micky3879b9f5e72025-07-08 18:04:53 -040019500echo "$as_me:19500: result: $ac_cv_header_time" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019501echo "${ECHO_T}$ac_cv_header_time" >&6
19502if test $ac_cv_header_time = yes; then
19503
19504cat >>confdefs.h <<\EOF
19505#define TIME_WITH_SYS_TIME 1
19506EOF
19507
19508fi
19509
19510cf_regex_func=no
micky3879b9f5e72025-07-08 18:04:53 -040019511cf_regex_libs=
19512case "$host_os" in
Steve Kondikae271bc2015-11-15 02:50:53 +010019513(mingw*)
micky3879b9f5e72025-07-08 18:04:53 -040019514 # -lsystre -ltre -lintl -liconv
19515 echo "$as_me:19515: checking for regcomp in -lsystre" >&5
19516echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19517if test "${ac_cv_lib_systre_regcomp+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019518 echo $ECHO_N "(cached) $ECHO_C" >&6
19519else
19520 ac_check_lib_save_LIBS=$LIBS
micky3879b9f5e72025-07-08 18:04:53 -040019521LIBS="-lsystre $LIBS"
19522cat >"conftest.$ac_ext" <<_ACEOF
19523#line 19523 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010019524#include "confdefs.h"
19525
19526/* Override any gcc2 internal prototype to avoid an error. */
19527#ifdef __cplusplus
19528extern "C"
19529#endif
19530/* We use char because int might match the return type of a gcc2
19531 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040019532char regcomp (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010019533int
micky3879b9f5e72025-07-08 18:04:53 -040019534main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010019535{
19536regcomp ();
19537 ;
19538 return 0;
19539}
19540_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040019541rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19542if { (eval echo "$as_me:19542: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019543 (eval $ac_link) 2>&5
19544 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019545 echo "$as_me:19545: \$? = $ac_status" >&5
19546 (exit "$ac_status"); } &&
19547 { ac_try='test -s "conftest$ac_exeext"'
19548 { (eval echo "$as_me:19548: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019549 (eval $ac_try) 2>&5
19550 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019551 echo "$as_me:19551: \$? = $ac_status" >&5
19552 (exit "$ac_status"); }; }; then
19553 ac_cv_lib_systre_regcomp=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010019554else
19555 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040019556cat "conftest.$ac_ext" >&5
19557ac_cv_lib_systre_regcomp=no
Steve Kondikae271bc2015-11-15 02:50:53 +010019558fi
micky3879b9f5e72025-07-08 18:04:53 -040019559rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010019560LIBS=$ac_check_lib_save_LIBS
19561fi
micky3879b9f5e72025-07-08 18:04:53 -040019562echo "$as_me:19562: result: $ac_cv_lib_systre_regcomp" >&5
19563echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19564if test "$ac_cv_lib_systre_regcomp" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019565
micky3879b9f5e72025-07-08 18:04:53 -040019566 echo "$as_me:19566: checking for libiconv_open in -liconv" >&5
19567echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19568if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +010019569 echo $ECHO_N "(cached) $ECHO_C" >&6
19570else
micky3879b9f5e72025-07-08 18:04:53 -040019571 ac_check_lib_save_LIBS=$LIBS
19572LIBS="-liconv $LIBS"
19573cat >"conftest.$ac_ext" <<_ACEOF
19574#line 19574 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010019575#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040019576
Steve Kondikae271bc2015-11-15 02:50:53 +010019577/* Override any gcc2 internal prototype to avoid an error. */
19578#ifdef __cplusplus
19579extern "C"
19580#endif
19581/* We use char because int might match the return type of a gcc2
19582 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040019583char libiconv_open (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010019584int
micky3879b9f5e72025-07-08 18:04:53 -040019585main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010019586{
micky3879b9f5e72025-07-08 18:04:53 -040019587libiconv_open ();
Steve Kondikae271bc2015-11-15 02:50:53 +010019588 ;
19589 return 0;
19590}
19591_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040019592rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19593if { (eval echo "$as_me:19593: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019594 (eval $ac_link) 2>&5
19595 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019596 echo "$as_me:19596: \$? = $ac_status" >&5
19597 (exit "$ac_status"); } &&
19598 { ac_try='test -s "conftest$ac_exeext"'
19599 { (eval echo "$as_me:19599: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010019600 (eval $ac_try) 2>&5
19601 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040019602 echo "$as_me:19602: \$? = $ac_status" >&5
19603 (exit "$ac_status"); }; }; then
19604 ac_cv_lib_iconv_libiconv_open=yes
19605else
19606 echo "$as_me: failed program was:" >&5
19607cat "conftest.$ac_ext" >&5
19608ac_cv_lib_iconv_libiconv_open=no
19609fi
19610rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19611LIBS=$ac_check_lib_save_LIBS
19612fi
19613echo "$as_me:19613: result: $ac_cv_lib_iconv_libiconv_open" >&5
19614echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19615if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19616
19617cf_add_libs="$LIBS"
19618# reverse order
19619cf_add_0lib=
19620for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19621# filter duplicates
19622for cf_add_1lib in $cf_add_0lib; do
19623 for cf_add_2lib in $cf_add_libs; do
19624 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19625 cf_add_1lib=
19626 break
19627 fi
19628 done
19629 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19630done
19631LIBS="$cf_add_libs"
19632
19633fi
19634
19635 echo "$as_me:19635: checking for libintl_gettext in -lintl" >&5
19636echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19637if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19638 echo $ECHO_N "(cached) $ECHO_C" >&6
19639else
19640 ac_check_lib_save_LIBS=$LIBS
19641LIBS="-lintl $LIBS"
19642cat >"conftest.$ac_ext" <<_ACEOF
19643#line 19643 "configure"
19644#include "confdefs.h"
19645
19646/* Override any gcc2 internal prototype to avoid an error. */
19647#ifdef __cplusplus
19648extern "C"
19649#endif
19650/* We use char because int might match the return type of a gcc2
19651 builtin and then its argument prototype would still apply. */
19652char libintl_gettext (void);
19653int
19654main (void)
19655{
19656libintl_gettext ();
19657 ;
19658 return 0;
19659}
19660_ACEOF
19661rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19662if { (eval echo "$as_me:19662: \"$ac_link\"") >&5
19663 (eval $ac_link) 2>&5
19664 ac_status=$?
19665 echo "$as_me:19665: \$? = $ac_status" >&5
19666 (exit "$ac_status"); } &&
19667 { ac_try='test -s "conftest$ac_exeext"'
19668 { (eval echo "$as_me:19668: \"$ac_try\"") >&5
19669 (eval $ac_try) 2>&5
19670 ac_status=$?
19671 echo "$as_me:19671: \$? = $ac_status" >&5
19672 (exit "$ac_status"); }; }; then
19673 ac_cv_lib_intl_libintl_gettext=yes
19674else
19675 echo "$as_me: failed program was:" >&5
19676cat "conftest.$ac_ext" >&5
19677ac_cv_lib_intl_libintl_gettext=no
19678fi
19679rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19680LIBS=$ac_check_lib_save_LIBS
19681fi
19682echo "$as_me:19682: result: $ac_cv_lib_intl_libintl_gettext" >&5
19683echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19684if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19685
19686cf_add_libs="$LIBS"
19687# reverse order
19688cf_add_0lib=
19689for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19690# filter duplicates
19691for cf_add_1lib in $cf_add_0lib; do
19692 for cf_add_2lib in $cf_add_libs; do
19693 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19694 cf_add_1lib=
19695 break
19696 fi
19697 done
19698 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19699done
19700LIBS="$cf_add_libs"
19701
19702fi
19703
19704 echo "$as_me:19704: checking for tre_regcomp in -ltre" >&5
19705echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19706if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19707 echo $ECHO_N "(cached) $ECHO_C" >&6
19708else
19709 ac_check_lib_save_LIBS=$LIBS
19710LIBS="-ltre $LIBS"
19711cat >"conftest.$ac_ext" <<_ACEOF
19712#line 19712 "configure"
19713#include "confdefs.h"
19714
19715/* Override any gcc2 internal prototype to avoid an error. */
19716#ifdef __cplusplus
19717extern "C"
19718#endif
19719/* We use char because int might match the return type of a gcc2
19720 builtin and then its argument prototype would still apply. */
19721char tre_regcomp (void);
19722int
19723main (void)
19724{
19725tre_regcomp ();
19726 ;
19727 return 0;
19728}
19729_ACEOF
19730rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19731if { (eval echo "$as_me:19731: \"$ac_link\"") >&5
19732 (eval $ac_link) 2>&5
19733 ac_status=$?
19734 echo "$as_me:19734: \$? = $ac_status" >&5
19735 (exit "$ac_status"); } &&
19736 { ac_try='test -s "conftest$ac_exeext"'
19737 { (eval echo "$as_me:19737: \"$ac_try\"") >&5
19738 (eval $ac_try) 2>&5
19739 ac_status=$?
19740 echo "$as_me:19740: \$? = $ac_status" >&5
19741 (exit "$ac_status"); }; }; then
19742 ac_cv_lib_tre_tre_regcomp=yes
19743else
19744 echo "$as_me: failed program was:" >&5
19745cat "conftest.$ac_ext" >&5
19746ac_cv_lib_tre_tre_regcomp=no
19747fi
19748rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19749LIBS=$ac_check_lib_save_LIBS
19750fi
19751echo "$as_me:19751: result: $ac_cv_lib_tre_tre_regcomp" >&5
19752echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19753if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19754
19755cf_add_libs="$LIBS"
19756# reverse order
19757cf_add_0lib=
19758for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19759# filter duplicates
19760for cf_add_1lib in $cf_add_0lib; do
19761 for cf_add_2lib in $cf_add_libs; do
19762 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19763 cf_add_1lib=
19764 break
19765 fi
19766 done
19767 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19768done
19769LIBS="$cf_add_libs"
19770
19771fi
19772
19773cf_add_libs="$LIBS"
19774# reverse order
19775cf_add_0lib=
19776for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19777# filter duplicates
19778for cf_add_1lib in $cf_add_0lib; do
19779 for cf_add_2lib in $cf_add_libs; do
19780 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19781 cf_add_1lib=
19782 break
19783 fi
19784 done
19785 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19786done
19787LIBS="$cf_add_libs"
19788
19789 cf_regex_func=regcomp
19790
19791else
19792
19793 echo "$as_me:19793: checking for regcomp in -lgnurx" >&5
19794echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19795if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19796 echo $ECHO_N "(cached) $ECHO_C" >&6
19797else
19798 ac_check_lib_save_LIBS=$LIBS
19799LIBS="-lgnurx $LIBS"
19800cat >"conftest.$ac_ext" <<_ACEOF
19801#line 19801 "configure"
19802#include "confdefs.h"
19803
19804/* Override any gcc2 internal prototype to avoid an error. */
19805#ifdef __cplusplus
19806extern "C"
19807#endif
19808/* We use char because int might match the return type of a gcc2
19809 builtin and then its argument prototype would still apply. */
19810char regcomp (void);
19811int
19812main (void)
19813{
19814regcomp ();
19815 ;
19816 return 0;
19817}
19818_ACEOF
19819rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19820if { (eval echo "$as_me:19820: \"$ac_link\"") >&5
19821 (eval $ac_link) 2>&5
19822 ac_status=$?
19823 echo "$as_me:19823: \$? = $ac_status" >&5
19824 (exit "$ac_status"); } &&
19825 { ac_try='test -s "conftest$ac_exeext"'
19826 { (eval echo "$as_me:19826: \"$ac_try\"") >&5
19827 (eval $ac_try) 2>&5
19828 ac_status=$?
19829 echo "$as_me:19829: \$? = $ac_status" >&5
19830 (exit "$ac_status"); }; }; then
19831 ac_cv_lib_gnurx_regcomp=yes
19832else
19833 echo "$as_me: failed program was:" >&5
19834cat "conftest.$ac_ext" >&5
19835ac_cv_lib_gnurx_regcomp=no
19836fi
19837rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19838LIBS=$ac_check_lib_save_LIBS
19839fi
19840echo "$as_me:19840: result: $ac_cv_lib_gnurx_regcomp" >&5
19841echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19842if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19843
19844cf_add_libs="$LIBS"
19845# reverse order
19846cf_add_0lib=
19847for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19848# filter duplicates
19849for cf_add_1lib in $cf_add_0lib; do
19850 for cf_add_2lib in $cf_add_libs; do
19851 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19852 cf_add_1lib=
19853 break
19854 fi
19855 done
19856 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19857done
19858LIBS="$cf_add_libs"
19859
19860 cf_regex_func=regcomp
19861fi
19862
19863fi
19864
19865 ;;
19866(*)
19867 cf_regex_libs="regex re"
19868 echo "$as_me:19868: checking for regcomp" >&5
19869echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19870if test "${ac_cv_func_regcomp+set}" = set; then
19871 echo $ECHO_N "(cached) $ECHO_C" >&6
19872else
19873 cat >"conftest.$ac_ext" <<_ACEOF
19874#line 19874 "configure"
19875#include "confdefs.h"
19876#define regcomp autoconf_temporary
19877#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
19878#undef regcomp
19879
19880#ifdef __cplusplus
19881extern "C"
19882#endif
19883
19884/* We use char because int might match the return type of a gcc2
19885 builtin and then its argument prototype would still apply. */
19886char regcomp (void);
19887
19888int
19889main (void)
19890{
19891
19892/* The GNU C library defines stubs for functions which it implements
19893 to always fail with ENOSYS. Some functions are actually named
19894 something starting with __ and the normal name is an alias. */
19895#if defined (__stub_regcomp) || defined (__stub___regcomp)
19896#error found stub for regcomp
19897#endif
19898
19899 return regcomp ();
19900 ;
19901 return 0;
19902}
19903_ACEOF
19904rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19905if { (eval echo "$as_me:19905: \"$ac_link\"") >&5
19906 (eval $ac_link) 2>&5
19907 ac_status=$?
19908 echo "$as_me:19908: \$? = $ac_status" >&5
19909 (exit "$ac_status"); } &&
19910 { ac_try='test -s "conftest$ac_exeext"'
19911 { (eval echo "$as_me:19911: \"$ac_try\"") >&5
19912 (eval $ac_try) 2>&5
19913 ac_status=$?
19914 echo "$as_me:19914: \$? = $ac_status" >&5
19915 (exit "$ac_status"); }; }; then
19916 ac_cv_func_regcomp=yes
19917else
19918 echo "$as_me: failed program was:" >&5
19919cat "conftest.$ac_ext" >&5
19920ac_cv_func_regcomp=no
19921fi
19922rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19923fi
19924echo "$as_me:19924: result: $ac_cv_func_regcomp" >&5
19925echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19926if test "$ac_cv_func_regcomp" = yes; then
19927 cf_regex_func=regcomp
19928else
19929
19930 for cf_regex_lib in $cf_regex_libs
19931 do
19932 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19933echo "$as_me:19933: checking for regcomp in -l$cf_regex_lib" >&5
19934echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19935if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19936 echo $ECHO_N "(cached) $ECHO_C" >&6
19937else
19938 ac_check_lib_save_LIBS=$LIBS
19939LIBS="-l$cf_regex_lib $LIBS"
19940cat >"conftest.$ac_ext" <<_ACEOF
19941#line 19941 "configure"
19942#include "confdefs.h"
19943
19944/* Override any gcc2 internal prototype to avoid an error. */
19945#ifdef __cplusplus
19946extern "C"
19947#endif
19948/* We use char because int might match the return type of a gcc2
19949 builtin and then its argument prototype would still apply. */
19950char regcomp (void);
19951int
19952main (void)
19953{
19954regcomp ();
19955 ;
19956 return 0;
19957}
19958_ACEOF
19959rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19960if { (eval echo "$as_me:19960: \"$ac_link\"") >&5
19961 (eval $ac_link) 2>&5
19962 ac_status=$?
19963 echo "$as_me:19963: \$? = $ac_status" >&5
19964 (exit "$ac_status"); } &&
19965 { ac_try='test -s "conftest$ac_exeext"'
19966 { (eval echo "$as_me:19966: \"$ac_try\"") >&5
19967 (eval $ac_try) 2>&5
19968 ac_status=$?
19969 echo "$as_me:19969: \$? = $ac_status" >&5
19970 (exit "$ac_status"); }; }; then
19971 eval "$as_ac_Lib=yes"
19972else
19973 echo "$as_me: failed program was:" >&5
19974cat "conftest.$ac_ext" >&5
19975eval "$as_ac_Lib=no"
19976fi
19977rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19978LIBS=$ac_check_lib_save_LIBS
19979fi
19980echo "$as_me:19980: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19981echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19982if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19983
19984cf_add_libs="$LIBS"
19985# reverse order
19986cf_add_0lib=
19987for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19988# filter duplicates
19989for cf_add_1lib in $cf_add_0lib; do
19990 for cf_add_2lib in $cf_add_libs; do
19991 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19992 cf_add_1lib=
19993 break
19994 fi
19995 done
19996 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19997done
19998LIBS="$cf_add_libs"
19999
20000 cf_regex_func=regcomp
20001 break
20002fi
20003
20004 done
20005
20006fi
20007
20008 ;;
20009esac
20010
20011if test "$cf_regex_func" = no ; then
20012 echo "$as_me:20012: checking for compile" >&5
20013echo $ECHO_N "checking for compile... $ECHO_C" >&6
20014if test "${ac_cv_func_compile+set}" = set; then
20015 echo $ECHO_N "(cached) $ECHO_C" >&6
20016else
20017 cat >"conftest.$ac_ext" <<_ACEOF
20018#line 20018 "configure"
20019#include "confdefs.h"
20020#define compile autoconf_temporary
20021#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20022#undef compile
20023
20024#ifdef __cplusplus
20025extern "C"
20026#endif
20027
20028/* We use char because int might match the return type of a gcc2
20029 builtin and then its argument prototype would still apply. */
20030char compile (void);
20031
20032int
20033main (void)
20034{
20035
20036/* The GNU C library defines stubs for functions which it implements
20037 to always fail with ENOSYS. Some functions are actually named
20038 something starting with __ and the normal name is an alias. */
20039#if defined (__stub_compile) || defined (__stub___compile)
20040#error found stub for compile
20041#endif
20042
20043 return compile ();
20044 ;
20045 return 0;
20046}
20047_ACEOF
20048rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20049if { (eval echo "$as_me:20049: \"$ac_link\"") >&5
20050 (eval $ac_link) 2>&5
20051 ac_status=$?
20052 echo "$as_me:20052: \$? = $ac_status" >&5
20053 (exit "$ac_status"); } &&
20054 { ac_try='test -s "conftest$ac_exeext"'
20055 { (eval echo "$as_me:20055: \"$ac_try\"") >&5
20056 (eval $ac_try) 2>&5
20057 ac_status=$?
20058 echo "$as_me:20058: \$? = $ac_status" >&5
20059 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020060 ac_cv_func_compile=yes
20061else
20062 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020063cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020064ac_cv_func_compile=no
20065fi
micky3879b9f5e72025-07-08 18:04:53 -040020066rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020067fi
micky3879b9f5e72025-07-08 18:04:53 -040020068echo "$as_me:20068: result: $ac_cv_func_compile" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020069echo "${ECHO_T}$ac_cv_func_compile" >&6
micky3879b9f5e72025-07-08 18:04:53 -040020070if test "$ac_cv_func_compile" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020071 cf_regex_func=compile
20072else
20073
micky3879b9f5e72025-07-08 18:04:53 -040020074 echo "$as_me:20074: checking for compile in -lgen" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020075echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20076if test "${ac_cv_lib_gen_compile+set}" = set; then
20077 echo $ECHO_N "(cached) $ECHO_C" >&6
20078else
20079 ac_check_lib_save_LIBS=$LIBS
20080LIBS="-lgen $LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040020081cat >"conftest.$ac_ext" <<_ACEOF
20082#line 20082 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020083#include "confdefs.h"
20084
20085/* Override any gcc2 internal prototype to avoid an error. */
20086#ifdef __cplusplus
20087extern "C"
20088#endif
20089/* We use char because int might match the return type of a gcc2
20090 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040020091char compile (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010020092int
micky3879b9f5e72025-07-08 18:04:53 -040020093main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010020094{
20095compile ();
20096 ;
20097 return 0;
20098}
20099_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020100rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20101if { (eval echo "$as_me:20101: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020102 (eval $ac_link) 2>&5
20103 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020104 echo "$as_me:20104: \$? = $ac_status" >&5
20105 (exit "$ac_status"); } &&
20106 { ac_try='test -s "conftest$ac_exeext"'
20107 { (eval echo "$as_me:20107: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020108 (eval $ac_try) 2>&5
20109 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020110 echo "$as_me:20110: \$? = $ac_status" >&5
20111 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020112 ac_cv_lib_gen_compile=yes
20113else
20114 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020115cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020116ac_cv_lib_gen_compile=no
20117fi
micky3879b9f5e72025-07-08 18:04:53 -040020118rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020119LIBS=$ac_check_lib_save_LIBS
20120fi
micky3879b9f5e72025-07-08 18:04:53 -040020121echo "$as_me:20121: result: $ac_cv_lib_gen_compile" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020122echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
micky3879b9f5e72025-07-08 18:04:53 -040020123if test "$ac_cv_lib_gen_compile" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020124
micky3879b9f5e72025-07-08 18:04:53 -040020125cf_add_libs="$LIBS"
20126# reverse order
20127cf_add_0lib=
20128for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20129# filter duplicates
20130for cf_add_1lib in $cf_add_0lib; do
20131 for cf_add_2lib in $cf_add_libs; do
20132 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020133 cf_add_1lib=
20134 break
20135 fi
20136 done
micky3879b9f5e72025-07-08 18:04:53 -040020137 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010020138done
20139LIBS="$cf_add_libs"
20140
20141 cf_regex_func=compile
20142fi
20143
20144fi
20145
20146fi
20147
20148if test "$cf_regex_func" = no ; then
micky3879b9f5e72025-07-08 18:04:53 -040020149 { echo "$as_me:20149: WARNING: cannot find regular expression library" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020150echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20151fi
20152
micky3879b9f5e72025-07-08 18:04:53 -040020153echo "$as_me:20153: checking for regular-expression headers" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020154echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20155if test "${cf_cv_regex_hdrs+set}" = set; then
20156 echo $ECHO_N "(cached) $ECHO_C" >&6
20157else
20158
20159cf_cv_regex_hdrs=no
micky3879b9f5e72025-07-08 18:04:53 -040020160case "$cf_regex_func" in
Steve Kondikae271bc2015-11-15 02:50:53 +010020161(compile)
20162 for cf_regex_hdr in regexp.h regexpr.h
20163 do
micky3879b9f5e72025-07-08 18:04:53 -040020164 cat >"conftest.$ac_ext" <<_ACEOF
20165#line 20165 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020166#include "confdefs.h"
20167#include <$cf_regex_hdr>
20168int
micky3879b9f5e72025-07-08 18:04:53 -040020169main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010020170{
20171
20172 char *p = compile("", "", "", 0);
20173 int x = step("", "");
micky3879b9f5e72025-07-08 18:04:53 -040020174 (void)p;
20175 (void)x;
Steve Kondikae271bc2015-11-15 02:50:53 +010020176
20177 ;
20178 return 0;
20179}
20180_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020181rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20182if { (eval echo "$as_me:20182: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020183 (eval $ac_link) 2>&5
20184 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020185 echo "$as_me:20185: \$? = $ac_status" >&5
20186 (exit "$ac_status"); } &&
20187 { ac_try='test -s "conftest$ac_exeext"'
20188 { (eval echo "$as_me:20188: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020189 (eval $ac_try) 2>&5
20190 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020191 echo "$as_me:20191: \$? = $ac_status" >&5
20192 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020193
20194 cf_cv_regex_hdrs=$cf_regex_hdr
20195 break
20196
20197else
20198 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020199cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020200fi
micky3879b9f5e72025-07-08 18:04:53 -040020201rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020202 done
20203 ;;
20204(*)
20205 for cf_regex_hdr in regex.h
20206 do
micky3879b9f5e72025-07-08 18:04:53 -040020207 cat >"conftest.$ac_ext" <<_ACEOF
20208#line 20208 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020209#include "confdefs.h"
20210#include <sys/types.h>
20211#include <$cf_regex_hdr>
20212int
micky3879b9f5e72025-07-08 18:04:53 -040020213main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010020214{
20215
micky3879b9f5e72025-07-08 18:04:53 -040020216 regex_t *p = 0;
Steve Kondikae271bc2015-11-15 02:50:53 +010020217 int x = regcomp(p, "", 0);
20218 int y = regexec(p, "", 0, 0, 0);
micky3879b9f5e72025-07-08 18:04:53 -040020219 (void)x;
20220 (void)y;
Steve Kondikae271bc2015-11-15 02:50:53 +010020221 regfree(p);
20222
20223 ;
20224 return 0;
20225}
20226_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020227rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20228if { (eval echo "$as_me:20228: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020229 (eval $ac_link) 2>&5
20230 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020231 echo "$as_me:20231: \$? = $ac_status" >&5
20232 (exit "$ac_status"); } &&
20233 { ac_try='test -s "conftest$ac_exeext"'
20234 { (eval echo "$as_me:20234: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020235 (eval $ac_try) 2>&5
20236 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020237 echo "$as_me:20237: \$? = $ac_status" >&5
20238 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020239
20240 cf_cv_regex_hdrs=$cf_regex_hdr
20241 break
20242
20243else
20244 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020245cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020246fi
micky3879b9f5e72025-07-08 18:04:53 -040020247rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020248 done
20249 ;;
20250esac
20251
20252fi
micky3879b9f5e72025-07-08 18:04:53 -040020253echo "$as_me:20253: result: $cf_cv_regex_hdrs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020254echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20255
micky3879b9f5e72025-07-08 18:04:53 -040020256case "$cf_cv_regex_hdrs" in
20257 (no) { echo "$as_me:20257: WARNING: no regular expression header found" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020258echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20259 (regex.h)
20260cat >>confdefs.h <<\EOF
20261#define HAVE_REGEX_H_FUNCS 1
20262EOF
20263 ;;
20264 (regexp.h)
20265cat >>confdefs.h <<\EOF
20266#define HAVE_REGEXP_H_FUNCS 1
20267EOF
20268 ;;
20269 (regexpr.h)
20270cat >>confdefs.h <<\EOF
20271#define HAVE_REGEXPR_H_FUNCS 1
20272EOF
20273 ;;
20274esac
20275
20276for ac_header in \
20277fcntl.h \
20278getopt.h \
20279limits.h \
20280locale.h \
20281math.h \
20282poll.h \
micky3879b9f5e72025-07-08 18:04:53 -040020283sys/auxv.h \
Steve Kondikae271bc2015-11-15 02:50:53 +010020284sys/ioctl.h \
20285sys/param.h \
20286sys/poll.h \
20287sys/select.h \
20288sys/time.h \
20289sys/times.h \
Steve Kondikae271bc2015-11-15 02:50:53 +010020290unistd.h \
20291wctype.h \
20292
20293do
20294as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040020295echo "$as_me:20295: checking for $ac_header" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020296echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20297if eval "test \"\${$as_ac_Header+set}\" = set"; then
20298 echo $ECHO_N "(cached) $ECHO_C" >&6
20299else
micky3879b9f5e72025-07-08 18:04:53 -040020300 cat >"conftest.$ac_ext" <<_ACEOF
20301#line 20301 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020302#include "confdefs.h"
20303#include <$ac_header>
20304_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020305if { (eval echo "$as_me:20305: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20306 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +010020307 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020308 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +010020309 rm -f conftest.er1
20310 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040020311 echo "$as_me:20311: \$? = $ac_status" >&5
20312 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020313 if test -s conftest.err; then
20314 ac_cpp_err=$ac_c_preproc_warn_flag
20315 else
20316 ac_cpp_err=
20317 fi
20318else
20319 ac_cpp_err=yes
20320fi
20321if test -z "$ac_cpp_err"; then
20322 eval "$as_ac_Header=yes"
20323else
20324 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020325 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020326 eval "$as_ac_Header=no"
20327fi
micky3879b9f5e72025-07-08 18:04:53 -040020328rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020329fi
micky3879b9f5e72025-07-08 18:04:53 -040020330echo "$as_me:20330: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20331echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20332if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020333 cat >>confdefs.h <<EOF
20334#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20335EOF
20336
20337fi
20338done
20339
20340for ac_header in unistd.h getopt.h
20341do
20342as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040020343echo "$as_me:20343: checking for $ac_header" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20345if eval "test \"\${$as_ac_Header+set}\" = set"; then
20346 echo $ECHO_N "(cached) $ECHO_C" >&6
20347else
micky3879b9f5e72025-07-08 18:04:53 -040020348 cat >"conftest.$ac_ext" <<_ACEOF
20349#line 20349 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020350#include "confdefs.h"
20351#include <$ac_header>
20352_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020353if { (eval echo "$as_me:20353: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20354 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +010020355 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020356 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +010020357 rm -f conftest.er1
20358 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040020359 echo "$as_me:20359: \$? = $ac_status" >&5
20360 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020361 if test -s conftest.err; then
20362 ac_cpp_err=$ac_c_preproc_warn_flag
20363 else
20364 ac_cpp_err=
20365 fi
20366else
20367 ac_cpp_err=yes
20368fi
20369if test -z "$ac_cpp_err"; then
20370 eval "$as_ac_Header=yes"
20371else
20372 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020373 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020374 eval "$as_ac_Header=no"
20375fi
micky3879b9f5e72025-07-08 18:04:53 -040020376rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020377fi
micky3879b9f5e72025-07-08 18:04:53 -040020378echo "$as_me:20378: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20379echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20380if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020381 cat >>confdefs.h <<EOF
20382#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20383EOF
20384
20385fi
20386done
20387
micky3879b9f5e72025-07-08 18:04:53 -040020388echo "$as_me:20388: checking for header declaring getopt variables" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020389echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20390if test "${cf_cv_getopt_header+set}" = set; then
20391 echo $ECHO_N "(cached) $ECHO_C" >&6
20392else
20393
20394cf_cv_getopt_header=none
20395for cf_header in stdio.h stdlib.h unistd.h getopt.h
20396do
micky3879b9f5e72025-07-08 18:04:53 -040020397cat >"conftest.$ac_ext" <<_ACEOF
20398#line 20398 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020399#include "confdefs.h"
20400
20401#include <$cf_header>
20402int
micky3879b9f5e72025-07-08 18:04:53 -040020403main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010020404{
micky3879b9f5e72025-07-08 18:04:53 -040020405int x = optind; char *y = optarg; (void)x; (void)y
Steve Kondikae271bc2015-11-15 02:50:53 +010020406 ;
20407 return 0;
20408}
20409_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020410rm -f "conftest.$ac_objext"
20411if { (eval echo "$as_me:20411: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020412 (eval $ac_compile) 2>&5
20413 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020414 echo "$as_me:20414: \$? = $ac_status" >&5
20415 (exit "$ac_status"); } &&
20416 { ac_try='test -s "conftest.$ac_objext"'
20417 { (eval echo "$as_me:20417: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020418 (eval $ac_try) 2>&5
20419 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020420 echo "$as_me:20420: \$? = $ac_status" >&5
20421 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020422 cf_cv_getopt_header=$cf_header
20423 break
20424else
20425 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020426cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020427fi
micky3879b9f5e72025-07-08 18:04:53 -040020428rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020429done
20430
20431fi
micky3879b9f5e72025-07-08 18:04:53 -040020432echo "$as_me:20432: result: $cf_cv_getopt_header" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020433echo "${ECHO_T}$cf_cv_getopt_header" >&6
micky3879b9f5e72025-07-08 18:04:53 -040020434if test "$cf_cv_getopt_header" != none ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020435
20436cat >>confdefs.h <<\EOF
20437#define HAVE_GETOPT_HEADER 1
20438EOF
20439
20440fi
micky3879b9f5e72025-07-08 18:04:53 -040020441if test "$cf_cv_getopt_header" = getopt.h ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020442
20443cat >>confdefs.h <<\EOF
20444#define NEED_GETOPT_H 1
20445EOF
20446
20447fi
20448
micky3879b9f5e72025-07-08 18:04:53 -040020449echo "$as_me:20449: checking if external environ is declared" >&5
20450echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20451if test "${cf_cv_dcl_environ+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020452 echo $ECHO_N "(cached) $ECHO_C" >&6
20453else
micky3879b9f5e72025-07-08 18:04:53 -040020454
20455 cat >"conftest.$ac_ext" <<_ACEOF
20456#line 20456 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020457#include "confdefs.h"
20458
micky3879b9f5e72025-07-08 18:04:53 -040020459$ac_includes_default
Steve Kondikae271bc2015-11-15 02:50:53 +010020460int
micky3879b9f5e72025-07-08 18:04:53 -040020461main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010020462{
micky3879b9f5e72025-07-08 18:04:53 -040020463void* x = (void*) environ; (void)x
Steve Kondikae271bc2015-11-15 02:50:53 +010020464 ;
20465 return 0;
20466}
20467_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020468rm -f "conftest.$ac_objext"
20469if { (eval echo "$as_me:20469: \"$ac_compile\"") >&5
20470 (eval $ac_compile) 2>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020471 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020472 echo "$as_me:20472: \$? = $ac_status" >&5
20473 (exit "$ac_status"); } &&
20474 { ac_try='test -s "conftest.$ac_objext"'
20475 { (eval echo "$as_me:20475: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020476 (eval $ac_try) 2>&5
20477 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020478 echo "$as_me:20478: \$? = $ac_status" >&5
20479 (exit "$ac_status"); }; }; then
20480 cf_cv_dcl_environ=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010020481else
20482 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020483cat "conftest.$ac_ext" >&5
20484cf_cv_dcl_environ=no
Steve Kondikae271bc2015-11-15 02:50:53 +010020485fi
micky3879b9f5e72025-07-08 18:04:53 -040020486rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20487
Steve Kondikae271bc2015-11-15 02:50:53 +010020488fi
micky3879b9f5e72025-07-08 18:04:53 -040020489echo "$as_me:20489: result: $cf_cv_dcl_environ" >&5
20490echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20491
20492if test "$cf_cv_dcl_environ" = no ; then
20493
20494cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20495
20496 cat >>confdefs.h <<EOF
20497#define $cf_result 1
Steve Kondikae271bc2015-11-15 02:50:53 +010020498EOF
20499
micky3879b9f5e72025-07-08 18:04:53 -040020500fi
20501
20502# It's possible (for near-UNIX clones) that the data doesn't exist
20503
20504echo "$as_me:20504: checking if external environ exists" >&5
20505echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20506if test "${cf_cv_have_environ+set}" = set; then
20507 echo $ECHO_N "(cached) $ECHO_C" >&6
20508else
20509
20510 cat >"conftest.$ac_ext" <<_ACEOF
20511#line 20511 "configure"
20512#include "confdefs.h"
20513
20514#undef environ
20515extern int environ;
20516
20517int
20518main (void)
20519{
20520environ = 2
20521 ;
20522 return 0;
20523}
20524_ACEOF
20525rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20526if { (eval echo "$as_me:20526: \"$ac_link\"") >&5
20527 (eval $ac_link) 2>&5
20528 ac_status=$?
20529 echo "$as_me:20529: \$? = $ac_status" >&5
20530 (exit "$ac_status"); } &&
20531 { ac_try='test -s "conftest$ac_exeext"'
20532 { (eval echo "$as_me:20532: \"$ac_try\"") >&5
20533 (eval $ac_try) 2>&5
20534 ac_status=$?
20535 echo "$as_me:20535: \$? = $ac_status" >&5
20536 (exit "$ac_status"); }; }; then
20537 cf_cv_have_environ=yes
20538else
20539 echo "$as_me: failed program was:" >&5
20540cat "conftest.$ac_ext" >&5
20541cf_cv_have_environ=no
20542fi
20543rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20544
20545fi
20546echo "$as_me:20546: result: $cf_cv_have_environ" >&5
20547echo "${ECHO_T}$cf_cv_have_environ" >&6
20548
20549if test "$cf_cv_have_environ" = yes ; then
20550
20551cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20552
20553 cat >>confdefs.h <<EOF
20554#define $cf_result 1
20555EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010020556
20557fi
20558
micky3879b9f5e72025-07-08 18:04:53 -040020559echo "$as_me:20559: checking for getenv" >&5
20560echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20561if test "${ac_cv_func_getenv+set}" = set; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020562 echo $ECHO_N "(cached) $ECHO_C" >&6
20563else
micky3879b9f5e72025-07-08 18:04:53 -040020564 cat >"conftest.$ac_ext" <<_ACEOF
20565#line 20565 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020566#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040020567#define getenv autoconf_temporary
20568#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20569#undef getenv
Steve Kondikae271bc2015-11-15 02:50:53 +010020570
Steve Kondikae271bc2015-11-15 02:50:53 +010020571#ifdef __cplusplus
20572extern "C"
20573#endif
micky3879b9f5e72025-07-08 18:04:53 -040020574
Steve Kondikae271bc2015-11-15 02:50:53 +010020575/* We use char because int might match the return type of a gcc2
20576 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040020577char getenv (void);
20578
Steve Kondikae271bc2015-11-15 02:50:53 +010020579int
micky3879b9f5e72025-07-08 18:04:53 -040020580main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010020581{
micky3879b9f5e72025-07-08 18:04:53 -040020582
20583/* The GNU C library defines stubs for functions which it implements
20584 to always fail with ENOSYS. Some functions are actually named
20585 something starting with __ and the normal name is an alias. */
20586#if defined (__stub_getenv) || defined (__stub___getenv)
20587#error found stub for getenv
20588#endif
20589
20590 return getenv ();
Steve Kondikae271bc2015-11-15 02:50:53 +010020591 ;
20592 return 0;
20593}
20594_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020595rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20596if { (eval echo "$as_me:20596: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020597 (eval $ac_link) 2>&5
20598 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020599 echo "$as_me:20599: \$? = $ac_status" >&5
20600 (exit "$ac_status"); } &&
20601 { ac_try='test -s "conftest$ac_exeext"'
20602 { (eval echo "$as_me:20602: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020603 (eval $ac_try) 2>&5
20604 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020605 echo "$as_me:20605: \$? = $ac_status" >&5
20606 (exit "$ac_status"); }; }; then
20607 ac_cv_func_getenv=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010020608else
20609 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020610cat "conftest.$ac_ext" >&5
20611ac_cv_func_getenv=no
Steve Kondikae271bc2015-11-15 02:50:53 +010020612fi
micky3879b9f5e72025-07-08 18:04:53 -040020613rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020614fi
micky3879b9f5e72025-07-08 18:04:53 -040020615echo "$as_me:20615: result: $ac_cv_func_getenv" >&5
20616echo "${ECHO_T}$ac_cv_func_getenv" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010020617
micky3879b9f5e72025-07-08 18:04:53 -040020618for ac_func in putenv setenv strdup
Steve Kondikae271bc2015-11-15 02:50:53 +010020619do
micky3879b9f5e72025-07-08 18:04:53 -040020620as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20621echo "$as_me:20621: checking for $ac_func" >&5
20622echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20623if eval "test \"\${$as_ac_var+set}\" = set"; then
20624 echo $ECHO_N "(cached) $ECHO_C" >&6
20625else
20626 cat >"conftest.$ac_ext" <<_ACEOF
20627#line 20627 "configure"
20628#include "confdefs.h"
20629#define $ac_func autoconf_temporary
20630#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20631#undef $ac_func
20632
20633#ifdef __cplusplus
20634extern "C"
20635#endif
20636
20637/* We use char because int might match the return type of a gcc2
20638 builtin and then its argument prototype would still apply. */
20639char $ac_func (void);
20640
20641int
20642main (void)
20643{
20644
20645/* The GNU C library defines stubs for functions which it implements
20646 to always fail with ENOSYS. Some functions are actually named
20647 something starting with __ and the normal name is an alias. */
20648#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20649#error found stub for $ac_func
20650#endif
20651
20652 return $ac_func ();
20653 ;
20654 return 0;
20655}
20656_ACEOF
20657rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20658if { (eval echo "$as_me:20658: \"$ac_link\"") >&5
20659 (eval $ac_link) 2>&5
20660 ac_status=$?
20661 echo "$as_me:20661: \$? = $ac_status" >&5
20662 (exit "$ac_status"); } &&
20663 { ac_try='test -s "conftest$ac_exeext"'
20664 { (eval echo "$as_me:20664: \"$ac_try\"") >&5
20665 (eval $ac_try) 2>&5
20666 ac_status=$?
20667 echo "$as_me:20667: \$? = $ac_status" >&5
20668 (exit "$ac_status"); }; }; then
20669 eval "$as_ac_var=yes"
20670else
20671 echo "$as_me: failed program was:" >&5
20672cat "conftest.$ac_ext" >&5
20673eval "$as_ac_var=no"
20674fi
20675rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20676fi
20677echo "$as_me:20677: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20678echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20679if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20680 cat >>confdefs.h <<EOF
20681#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20682EOF
20683
20684fi
Steve Kondikae271bc2015-11-15 02:50:53 +010020685done
Steve Kondikae271bc2015-11-15 02:50:53 +010020686
micky3879b9f5e72025-07-08 18:04:53 -040020687echo "$as_me:20687: checking if getenv returns consistent values" >&5
20688echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20689if test "${cf_cv_consistent_getenv+set}" = set; then
20690 echo $ECHO_N "(cached) $ECHO_C" >&6
20691else
20692
20693if test "$cross_compiling" = yes; then
20694 cf_cv_consistent_getenv=unknown
20695else
20696 cat >"conftest.$ac_ext" <<_ACEOF
20697#line 20697 "configure"
20698#include "confdefs.h"
20699
20700$ac_includes_default
20701
20702#if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20703extern char **environ; /* POSIX, but some systems are not... */
20704#endif
20705
20706#if defined(HAVE_STRDUP)
20707#define str_alloc(s) strdup(s)
20708#else
20709#define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20710#endif
20711
20712static void set_value(const char *name, const char *value)
20713{
20714#if defined(HAVE_SETENV)
20715 setenv(name, value, 1);
20716#elif defined(HAVE_PUTENV)
20717 char buffer[1024];
20718 sprintf(buffer, "%s=%s", name, value);
20719 putenv(str_alloc(buffer));
20720#else
20721#error neither putenv/setenv found
20722#endif
20723}
20724int main(void)
20725{
20726 int pass;
20727 size_t numenv, limit, j;
20728 char **mynames;
20729 char **myvalues;
20730 char **mypointer;
20731 char *equals;
20732 for (numenv = 0; environ[numenv]; ++numenv) ;
20733 limit = numenv + 10;
20734 mynames = (char **) calloc(limit + 1, sizeof(char *));
20735 myvalues = (char **) calloc(limit + 1, sizeof(char *));
20736 mypointer = (char **) calloc(limit + 1, sizeof(char *));
20737#if defined(HAVE_ENVIRON)
20738 for (j = 0; environ[j]; ++j) {
20739 mynames[j] = str_alloc(environ[j]);
20740 equals = strchr(mynames[j], '=');
20741 if (equals != 0) {
20742 *equals++ = '\\0';
20743 myvalues[j] = str_alloc(equals);
20744 } else {
20745 myvalues[j] = str_alloc("");
20746 }
20747 }
20748#endif
20749 for (j = numenv; j < limit; ++j) {
20750 char name[80];
20751 char value[80];
20752 size_t found;
20753 size_t k = 0;
20754 do {
20755 size_t jk;
20756 found = 0;
20757 sprintf(name, "TERM%lu", (unsigned long) k);
20758 for (jk = 0; jk < j; ++jk) {
20759 if (!strcmp(name, mynames[jk])) {
20760 found = 1;
20761 ++k;
20762 break;
20763 }
20764 }
20765 } while (found);
20766 sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]);
20767 set_value(name, value);
20768 mynames[j] = str_alloc(name);
20769 myvalues[j] = str_alloc(value);
20770 }
20771 for (pass = 0; pass < 3; ++pass) {
20772 for (j = 0; j < limit; ++j) {
20773 char *value = getenv(mynames[j]);
20774 if (pass) {
20775 if (value == 0) {
20776 fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20777 ${cf_cv_main_return:-return}(1);
20778 } else if (value != mypointer[j]) {
20779 fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20780 ${cf_cv_main_return:-return}(1);
20781 } else if (strcmp(value, myvalues[j])) {
20782 fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20783 ${cf_cv_main_return:-return}(1);
20784 }
20785 } else {
20786 size_t k;
20787 mypointer[j] = value;
20788 for (k = 0; k < j; ++k) {
20789 if (mypointer[j] == mypointer[k]) {
20790 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20791 ${cf_cv_main_return:-return}(1);
20792 }
20793 }
20794 }
20795 }
20796 }
20797 ${cf_cv_main_return:-return}(0);
20798}
20799
20800_ACEOF
20801rm -f "conftest$ac_exeext"
20802if { (eval echo "$as_me:20802: \"$ac_link\"") >&5
20803 (eval $ac_link) 2>&5
20804 ac_status=$?
20805 echo "$as_me:20805: \$? = $ac_status" >&5
20806 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20807 { (eval echo "$as_me:20807: \"$ac_try\"") >&5
20808 (eval $ac_try) 2>&5
20809 ac_status=$?
20810 echo "$as_me:20810: \$? = $ac_status" >&5
20811 (exit "$ac_status"); }; }; then
20812 cf_cv_consistent_getenv=yes
20813else
20814 echo "$as_me: program exited with status $ac_status" >&5
20815echo "$as_me: failed program was:" >&5
20816cat "conftest.$ac_ext" >&5
20817cf_cv_consistent_getenv=no
Steve Kondikae271bc2015-11-15 02:50:53 +010020818fi
micky3879b9f5e72025-07-08 18:04:53 -040020819rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020820fi
20821
micky3879b9f5e72025-07-08 18:04:53 -040020822fi
20823echo "$as_me:20823: result: $cf_cv_consistent_getenv" >&5
20824echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20825
20826if test "x$cf_cv_consistent_getenv" = xno
20827then
20828
20829cat >>confdefs.h <<\EOF
20830#define HAVE_CONSISTENT_GETENV 1
20831EOF
20832
20833fi
20834
20835if test "x$cf_cv_consistent_getenv" = xno && \
20836 test "x$cf_with_trace" = xyes
20837then
20838 { echo "$as_me:20838: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20839echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20840fi
20841
20842echo "$as_me:20842: checking if sys/time.h works with sys/select.h" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020843echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20844if test "${cf_cv_sys_time_select+set}" = set; then
20845 echo $ECHO_N "(cached) $ECHO_C" >&6
20846else
20847
micky3879b9f5e72025-07-08 18:04:53 -040020848cat >"conftest.$ac_ext" <<_ACEOF
20849#line 20849 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010020850#include "confdefs.h"
20851
20852#include <sys/types.h>
20853#ifdef HAVE_SYS_TIME_H
20854#include <sys/time.h>
20855#endif
20856#ifdef HAVE_SYS_SELECT_H
20857#include <sys/select.h>
20858#endif
20859
20860int
micky3879b9f5e72025-07-08 18:04:53 -040020861main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010020862{
20863
20864 ;
20865 return 0;
20866}
20867_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020868rm -f "conftest.$ac_objext"
20869if { (eval echo "$as_me:20869: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020870 (eval $ac_compile) 2>&5
20871 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020872 echo "$as_me:20872: \$? = $ac_status" >&5
20873 (exit "$ac_status"); } &&
20874 { ac_try='test -s "conftest.$ac_objext"'
20875 { (eval echo "$as_me:20875: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020876 (eval $ac_try) 2>&5
20877 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020878 echo "$as_me:20878: \$? = $ac_status" >&5
20879 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010020880 cf_cv_sys_time_select=yes
20881else
20882 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020883cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020884cf_cv_sys_time_select=no
20885fi
micky3879b9f5e72025-07-08 18:04:53 -040020886rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010020887
20888fi
20889
micky3879b9f5e72025-07-08 18:04:53 -040020890echo "$as_me:20890: result: $cf_cv_sys_time_select" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010020891echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20892test "$cf_cv_sys_time_select" = yes &&
20893cat >>confdefs.h <<\EOF
20894#define HAVE_SYS_TIME_SELECT 1
20895EOF
20896
20897### checks for compiler characteristics
20898ac_ext=c
20899ac_cpp='$CPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040020900ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20901ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Steve Kondikae271bc2015-11-15 02:50:53 +010020902ac_compiler_gnu=$ac_cv_c_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040020903ac_main_return="return"
Steve Kondikae271bc2015-11-15 02:50:53 +010020904
micky3879b9f5e72025-07-08 18:04:53 -040020905echo "$as_me:20905: checking for an ANSI C-conforming const" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020906echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20907if test "${ac_cv_c_const+set}" = set; then
20908 echo $ECHO_N "(cached) $ECHO_C" >&6
20909else
micky3879b9f5e72025-07-08 18:04:53 -040020910 cat >"conftest.$ac_ext" <<_ACEOF
20911#line 20911 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020912#include "confdefs.h"
20913
20914int
micky3879b9f5e72025-07-08 18:04:53 -040020915main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020916{
20917/* FIXME: Include the comments suggested by Paul. */
20918#ifndef __cplusplus
20919 /* Ultrix mips cc rejects this. */
20920 typedef int charset[2];
micky3879b9f5e72025-07-08 18:04:53 -040020921 const charset x; (void)x;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020922 /* SunOS 4.1.1 cc rejects this. */
20923 char const *const *ccp;
20924 char **p;
20925 /* NEC SVR4.0.2 mips cc rejects this. */
20926 struct point {int x, y;};
micky3879b9f5e72025-07-08 18:04:53 -040020927 static struct point const zero = {0,0}; (void)zero;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020928 /* AIX XL C 1.02.0.0 rejects this.
20929 It does not let you subtract one const X* pointer from another in
20930 an arm of an if-expression whose if-part is not a constant
20931 expression */
20932 const char *g = "string";
20933 ccp = &g + (g ? g-g : 0);
20934 /* HPUX 7.0 cc rejects these. */
20935 ++ccp;
20936 p = (char**) ccp;
20937 ccp = (char const *const *) p;
20938 { /* SCO 3.2v4 cc rejects this. */
20939 char *t;
20940 char const *s = 0 ? (char *) 0 : (char const *) 0;
20941
20942 *t++ = 0;
micky3879b9f5e72025-07-08 18:04:53 -040020943 (void)s;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020944 }
20945 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20946 int x[] = {25, 17};
20947 const int *foo = &x[0];
20948 ++foo;
micky3879b9f5e72025-07-08 18:04:53 -040020949 (void)foo;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020950 }
20951 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20952 typedef const int *iptr;
20953 iptr p = 0;
20954 ++p;
micky3879b9f5e72025-07-08 18:04:53 -040020955 (void)p;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020956 }
20957 { /* AIX XL C 1.02.0.0 rejects this saying
20958 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20959 struct s { int j; const int *ap[3]; };
20960 struct s *b; b->j = 5;
20961 }
20962 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20963 const int foo = 10;
micky3879b9f5e72025-07-08 18:04:53 -040020964 (void)foo;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020965 }
20966#endif
20967
20968 ;
20969 return 0;
20970}
20971_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040020972rm -f "conftest.$ac_objext"
20973if { (eval echo "$as_me:20973: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020974 (eval $ac_compile) 2>&5
20975 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020976 echo "$as_me:20976: \$? = $ac_status" >&5
20977 (exit "$ac_status"); } &&
20978 { ac_try='test -s "conftest.$ac_objext"'
20979 { (eval echo "$as_me:20979: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020980 (eval $ac_try) 2>&5
20981 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040020982 echo "$as_me:20982: \$? = $ac_status" >&5
20983 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020984 ac_cv_c_const=yes
20985else
20986 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040020987cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020988ac_cv_c_const=no
20989fi
micky3879b9f5e72025-07-08 18:04:53 -040020990rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020991fi
micky3879b9f5e72025-07-08 18:04:53 -040020992echo "$as_me:20992: result: $ac_cv_c_const" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053020993echo "${ECHO_T}$ac_cv_c_const" >&6
20994if test $ac_cv_c_const = no; then
20995
20996cat >>confdefs.h <<\EOF
20997#define const
20998EOF
20999
21000fi
21001
micky3879b9f5e72025-07-08 18:04:53 -040021002echo "$as_me:21002: checking for inline" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021003echo $ECHO_N "checking for inline... $ECHO_C" >&6
21004if test "${ac_cv_c_inline+set}" = set; then
21005 echo $ECHO_N "(cached) $ECHO_C" >&6
21006else
21007 ac_cv_c_inline=no
21008for ac_kw in inline __inline__ __inline; do
micky3879b9f5e72025-07-08 18:04:53 -040021009 cat >"conftest.$ac_ext" <<_ACEOF
21010#line 21010 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021011#include "confdefs.h"
21012#ifndef __cplusplus
micky3879b9f5e72025-07-08 18:04:53 -040021013static $ac_kw int static_foo (void) {return 0; }
21014$ac_kw int foo (void) {return 0; }
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021015#endif
21016
21017_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021018rm -f "conftest.$ac_objext"
21019if { (eval echo "$as_me:21019: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021020 (eval $ac_compile) 2>&5
21021 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021022 echo "$as_me:21022: \$? = $ac_status" >&5
21023 (exit "$ac_status"); } &&
21024 { ac_try='test -s "conftest.$ac_objext"'
21025 { (eval echo "$as_me:21025: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021026 (eval $ac_try) 2>&5
21027 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021028 echo "$as_me:21028: \$? = $ac_status" >&5
21029 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021030 ac_cv_c_inline=$ac_kw; break
21031else
21032 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021033cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021034fi
micky3879b9f5e72025-07-08 18:04:53 -040021035rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021036done
21037
21038fi
micky3879b9f5e72025-07-08 18:04:53 -040021039echo "$as_me:21039: result: $ac_cv_c_inline" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021040echo "${ECHO_T}$ac_cv_c_inline" >&6
21041case $ac_cv_c_inline in
21042 inline | yes) ;;
21043 no)
21044cat >>confdefs.h <<\EOF
21045#define inline
21046EOF
21047 ;;
21048 *) cat >>confdefs.h <<EOF
21049#define inline $ac_cv_c_inline
21050EOF
21051 ;;
21052esac
21053
21054NCURSES_INLINE=
21055if test "$ac_cv_c_inline" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021056 NCURSES_INLINE=inline
21057 if test "$INTEL_COMPILER" = yes
21058 then
21059 :
21060 elif test "$CLANG_COMPILER" = yes
21061 then
21062 :
21063 elif test "$GCC" = yes
21064 then
micky3879b9f5e72025-07-08 18:04:53 -040021065 echo "$as_me:21065: checking if $CC supports options to tune inlining" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010021066echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021067if test "${cf_cv_gcc_inline+set}" = set; then
21068 echo $ECHO_N "(cached) $ECHO_C" >&6
21069else
21070
Steve Kondikae271bc2015-11-15 02:50:53 +010021071 cf_save_CFLAGS=$CFLAGS
21072 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
micky3879b9f5e72025-07-08 18:04:53 -040021073 cat >"conftest.$ac_ext" <<_ACEOF
21074#line 21074 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021075#include "confdefs.h"
21076inline int foo(void) { return 1; }
21077int
micky3879b9f5e72025-07-08 18:04:53 -040021078main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021079{
21080${cf_cv_main_return:-return} foo()
21081 ;
21082 return 0;
21083}
21084_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021085rm -f "conftest.$ac_objext"
21086if { (eval echo "$as_me:21086: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021087 (eval $ac_compile) 2>&5
21088 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021089 echo "$as_me:21089: \$? = $ac_status" >&5
21090 (exit "$ac_status"); } &&
21091 { ac_try='test -s "conftest.$ac_objext"'
21092 { (eval echo "$as_me:21092: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021093 (eval $ac_try) 2>&5
21094 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021095 echo "$as_me:21095: \$? = $ac_status" >&5
21096 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021097 cf_cv_gcc_inline=yes
21098else
21099 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021100cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021101cf_cv_gcc_inline=no
21102fi
micky3879b9f5e72025-07-08 18:04:53 -040021103rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010021104 CFLAGS=$cf_save_CFLAGS
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021105
21106fi
micky3879b9f5e72025-07-08 18:04:53 -040021107echo "$as_me:21107: result: $cf_cv_gcc_inline" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021108echo "${ECHO_T}$cf_cv_gcc_inline" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010021109 if test "$cf_cv_gcc_inline" = yes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021110
21111cf_fix_cppflags=no
21112cf_new_cflags=
21113cf_new_cppflags=
21114cf_new_extra_cppflags=
21115
21116for cf_add_cflags in --param max-inline-insns-single=1200
21117do
micky3879b9f5e72025-07-08 18:04:53 -040021118case "$cf_fix_cppflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010021119(no)
micky3879b9f5e72025-07-08 18:04:53 -040021120 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010021121 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
micky3879b9f5e72025-07-08 18:04:53 -040021122 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010021123 (-D*)
micky3879b9f5e72025-07-08 18:04:53 -040021124 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021125
Steve Kondikae271bc2015-11-15 02:50:53 +010021126 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21127 && test -z "${cf_tst_cflags}" \
21128 && cf_fix_cppflags=yes
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021129
micky3879b9f5e72025-07-08 18:04:53 -040021130 if test "$cf_fix_cppflags" = yes ; then
21131
21132 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21133 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21134
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021135 continue
21136 elif test "${cf_tst_cflags}" = "\"'" ; then
micky3879b9f5e72025-07-08 18:04:53 -040021137
21138 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21139 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21140
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021141 continue
21142 fi
21143 ;;
21144 esac
21145 case "$CPPFLAGS" in
Steve Kondikae271bc2015-11-15 02:50:53 +010021146 (*$cf_add_cflags)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021147 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021148 (*)
micky3879b9f5e72025-07-08 18:04:53 -040021149 case "$cf_add_cflags" in
Steve Kondikae271bc2015-11-15 02:50:53 +010021150 (-D*)
21151 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21152
21153CPPFLAGS=`echo "$CPPFLAGS" | \
21154 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
21155 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
21156
21157 ;;
21158 esac
micky3879b9f5e72025-07-08 18:04:53 -040021159
21160 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21161 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21162
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021163 ;;
21164 esac
21165 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021166 (*)
micky3879b9f5e72025-07-08 18:04:53 -040021167
21168 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21169 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21170
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021171 ;;
21172 esac
21173 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010021174(yes)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021175
micky3879b9f5e72025-07-08 18:04:53 -040021176 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21177 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21178
21179 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021180
Steve Kondikae271bc2015-11-15 02:50:53 +010021181 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21182 && test -z "${cf_tst_cflags}" \
21183 && cf_fix_cppflags=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021184 ;;
21185esac
21186done
21187
21188if test -n "$cf_new_cflags" ; then
21189
micky3879b9f5e72025-07-08 18:04:53 -040021190 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21191 CFLAGS="${CFLAGS}$cf_new_cflags"
21192
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021193fi
21194
21195if test -n "$cf_new_cppflags" ; then
21196
micky3879b9f5e72025-07-08 18:04:53 -040021197 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21198 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21199
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021200fi
21201
21202if test -n "$cf_new_extra_cppflags" ; then
21203
micky3879b9f5e72025-07-08 18:04:53 -040021204 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21205 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21206
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021207fi
21208
Steve Kondikae271bc2015-11-15 02:50:53 +010021209 fi
21210 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021211fi
21212
micky3879b9f5e72025-07-08 18:04:53 -040021213echo "$as_me:21213: checking for signal global datatype" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021214echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21215if test "${cf_cv_sig_atomic_t+set}" = set; then
21216 echo $ECHO_N "(cached) $ECHO_C" >&6
21217else
21218
21219 for cf_type in \
21220 "volatile sig_atomic_t" \
21221 "sig_atomic_t" \
21222 "int"
21223 do
micky3879b9f5e72025-07-08 18:04:53 -040021224 cat >"conftest.$ac_ext" <<_ACEOF
21225#line 21225 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021226#include "confdefs.h"
21227
21228#include <sys/types.h>
21229#include <signal.h>
21230#include <stdio.h>
21231
21232extern $cf_type x;
21233$cf_type x;
21234static void handler(int sig)
21235{
micky3879b9f5e72025-07-08 18:04:53 -040021236 (void)sig;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021237 x = 5;
21238}
21239int
micky3879b9f5e72025-07-08 18:04:53 -040021240main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021241{
21242signal(SIGINT, handler);
21243 x = 1
21244 ;
21245 return 0;
21246}
21247_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021248rm -f "conftest.$ac_objext"
21249if { (eval echo "$as_me:21249: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021250 (eval $ac_compile) 2>&5
21251 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021252 echo "$as_me:21252: \$? = $ac_status" >&5
21253 (exit "$ac_status"); } &&
21254 { ac_try='test -s "conftest.$ac_objext"'
21255 { (eval echo "$as_me:21255: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021256 (eval $ac_try) 2>&5
21257 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021258 echo "$as_me:21258: \$? = $ac_status" >&5
21259 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021260 cf_cv_sig_atomic_t=$cf_type
21261else
21262 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021263cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021264cf_cv_sig_atomic_t=no
21265fi
micky3879b9f5e72025-07-08 18:04:53 -040021266rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021267 test "$cf_cv_sig_atomic_t" != no && break
21268 done
21269
21270fi
21271
micky3879b9f5e72025-07-08 18:04:53 -040021272echo "$as_me:21272: result: $cf_cv_sig_atomic_t" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021273echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010021274test "$cf_cv_sig_atomic_t" != no &&
21275cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021276#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21277EOF
21278
micky3879b9f5e72025-07-08 18:04:53 -040021279if test "$NCURSES_CHTYPE" = auto ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021280
micky3879b9f5e72025-07-08 18:04:53 -040021281echo "$as_me:21281: checking for type of chtype" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021282echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21283if test "${cf_cv_typeof_chtype+set}" = set; then
21284 echo $ECHO_N "(cached) $ECHO_C" >&6
21285else
21286
21287 if test "$cross_compiling" = yes; then
21288 cf_cv_typeof_chtype=long
21289else
micky3879b9f5e72025-07-08 18:04:53 -040021290 cat >"conftest.$ac_ext" <<_ACEOF
21291#line 21291 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021292#include "confdefs.h"
21293
micky3879b9f5e72025-07-08 18:04:53 -040021294$ac_includes_default
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021295#define WANT_BITS 31
micky3879b9f5e72025-07-08 18:04:53 -040021296int main(void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021297{
21298 FILE *fp = fopen("cf_test.out", "w");
21299 if (fp != 0) {
21300 char *result = "long";
21301 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21302 int n;
21303 unsigned int x, y;
21304 for (n = 0; n < WANT_BITS; n++) {
21305 x = (1 << n);
21306 y = (x >> n);
21307 if (y != 1 || x == 0) {
21308 x = 0;
21309 break;
21310 }
21311 }
21312 /*
21313 * If x is nonzero, an int is big enough for the bits
21314 * that we want.
21315 */
21316 result = (x != 0) ? "int" : "long";
21317 }
21318 fputs(result, fp);
21319 fclose(fp);
21320 }
21321 ${cf_cv_main_return:-return}(0);
21322}
21323
21324_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021325rm -f "conftest$ac_exeext"
21326if { (eval echo "$as_me:21326: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021327 (eval $ac_link) 2>&5
21328 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021329 echo "$as_me:21329: \$? = $ac_status" >&5
21330 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21331 { (eval echo "$as_me:21331: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021332 (eval $ac_try) 2>&5
21333 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021334 echo "$as_me:21334: \$? = $ac_status" >&5
21335 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021336 cf_cv_typeof_chtype=`cat cf_test.out`
21337else
21338 echo "$as_me: program exited with status $ac_status" >&5
21339echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021340cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021341cf_cv_typeof_chtype=long
21342fi
micky3879b9f5e72025-07-08 18:04:53 -040021343rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021344fi
21345 rm -f cf_test.out
21346
21347fi
21348
micky3879b9f5e72025-07-08 18:04:53 -040021349echo "$as_me:21349: result: $cf_cv_typeof_chtype" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021350echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21351
21352cat >>confdefs.h <<EOF
21353#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21354EOF
21355
21356else
21357 cf_cv_typeof_chtype=$NCURSES_CHTYPE
21358fi
21359test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21360
micky3879b9f5e72025-07-08 18:04:53 -040021361echo "$as_me:21361: checking if unsigned literals are legal" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021362echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21363if test "${cf_cv_unsigned_literals+set}" = set; then
21364 echo $ECHO_N "(cached) $ECHO_C" >&6
21365else
21366
micky3879b9f5e72025-07-08 18:04:53 -040021367 cat >"conftest.$ac_ext" <<_ACEOF
21368#line 21368 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021369#include "confdefs.h"
21370
21371int
micky3879b9f5e72025-07-08 18:04:53 -040021372main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021373{
micky3879b9f5e72025-07-08 18:04:53 -040021374long x = 1L + 1UL + 1U + 1; (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021375 ;
21376 return 0;
21377}
21378_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021379rm -f "conftest.$ac_objext"
21380if { (eval echo "$as_me:21380: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021381 (eval $ac_compile) 2>&5
21382 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021383 echo "$as_me:21383: \$? = $ac_status" >&5
21384 (exit "$ac_status"); } &&
21385 { ac_try='test -s "conftest.$ac_objext"'
21386 { (eval echo "$as_me:21386: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021387 (eval $ac_try) 2>&5
21388 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021389 echo "$as_me:21389: \$? = $ac_status" >&5
21390 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021391 cf_cv_unsigned_literals=yes
21392else
21393 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021394cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021395cf_cv_unsigned_literals=no
21396fi
micky3879b9f5e72025-07-08 18:04:53 -040021397rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021398
21399fi
21400
micky3879b9f5e72025-07-08 18:04:53 -040021401echo "$as_me:21401: result: $cf_cv_unsigned_literals" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021402echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21403
21404cf_cv_1UL="1"
21405test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21406test ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L"
21407
micky3879b9f5e72025-07-08 18:04:53 -040021408if test "$NCURSES_MMASK_T" = auto ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021409 cf_cv_typeof_mmask_t=long
21410else
21411 cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21412fi
21413test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21414
21415### Checks for external-data
21416
micky3879b9f5e72025-07-08 18:04:53 -040021417echo "$as_me:21417: checking if external errno is declared" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021418echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21419if test "${cf_cv_dcl_errno+set}" = set; then
21420 echo $ECHO_N "(cached) $ECHO_C" >&6
21421else
21422
micky3879b9f5e72025-07-08 18:04:53 -040021423 cat >"conftest.$ac_ext" <<_ACEOF
21424#line 21424 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021425#include "confdefs.h"
21426
micky3879b9f5e72025-07-08 18:04:53 -040021427$ac_includes_default
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021428#include <errno.h>
21429int
micky3879b9f5e72025-07-08 18:04:53 -040021430main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021431{
micky3879b9f5e72025-07-08 18:04:53 -040021432int x = (int) errno; (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021433 ;
21434 return 0;
21435}
21436_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021437rm -f "conftest.$ac_objext"
21438if { (eval echo "$as_me:21438: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021439 (eval $ac_compile) 2>&5
21440 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021441 echo "$as_me:21441: \$? = $ac_status" >&5
21442 (exit "$ac_status"); } &&
21443 { ac_try='test -s "conftest.$ac_objext"'
21444 { (eval echo "$as_me:21444: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021445 (eval $ac_try) 2>&5
21446 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021447 echo "$as_me:21447: \$? = $ac_status" >&5
21448 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021449 cf_cv_dcl_errno=yes
21450else
21451 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021452cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021453cf_cv_dcl_errno=no
21454fi
micky3879b9f5e72025-07-08 18:04:53 -040021455rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021456
21457fi
micky3879b9f5e72025-07-08 18:04:53 -040021458echo "$as_me:21458: result: $cf_cv_dcl_errno" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021459echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21460
21461if test "$cf_cv_dcl_errno" = no ; then
21462
21463cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21464
Steve Kondikae271bc2015-11-15 02:50:53 +010021465 cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021466#define $cf_result 1
21467EOF
21468
21469fi
21470
21471# It's possible (for near-UNIX clones) that the data doesn't exist
21472
micky3879b9f5e72025-07-08 18:04:53 -040021473echo "$as_me:21473: checking if external errno exists" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021474echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21475if test "${cf_cv_have_errno+set}" = set; then
21476 echo $ECHO_N "(cached) $ECHO_C" >&6
21477else
21478
micky3879b9f5e72025-07-08 18:04:53 -040021479 cat >"conftest.$ac_ext" <<_ACEOF
21480#line 21480 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021481#include "confdefs.h"
21482
21483#undef errno
21484extern int errno;
21485
21486int
micky3879b9f5e72025-07-08 18:04:53 -040021487main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021488{
21489errno = 2
21490 ;
21491 return 0;
21492}
21493_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021494rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21495if { (eval echo "$as_me:21495: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021496 (eval $ac_link) 2>&5
21497 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021498 echo "$as_me:21498: \$? = $ac_status" >&5
21499 (exit "$ac_status"); } &&
21500 { ac_try='test -s "conftest$ac_exeext"'
21501 { (eval echo "$as_me:21501: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021502 (eval $ac_try) 2>&5
21503 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021504 echo "$as_me:21504: \$? = $ac_status" >&5
21505 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021506 cf_cv_have_errno=yes
21507else
21508 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021509cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021510cf_cv_have_errno=no
21511fi
micky3879b9f5e72025-07-08 18:04:53 -040021512rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021513
21514fi
micky3879b9f5e72025-07-08 18:04:53 -040021515echo "$as_me:21515: result: $cf_cv_have_errno" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021516echo "${ECHO_T}$cf_cv_have_errno" >&6
21517
21518if test "$cf_cv_have_errno" = yes ; then
21519
21520cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21521
Steve Kondikae271bc2015-11-15 02:50:53 +010021522 cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021523#define $cf_result 1
21524EOF
21525
21526fi
21527
micky3879b9f5e72025-07-08 18:04:53 -040021528echo "$as_me:21528: checking if data-only library module links" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021529echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21530if test "${cf_cv_link_dataonly+set}" = set; then
21531 echo $ECHO_N "(cached) $ECHO_C" >&6
21532else
21533
21534 rm -f conftest.a
21535 cat >conftest.$ac_ext <<EOF
micky3879b9f5e72025-07-08 18:04:53 -040021536#line 21536 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021537int testdata[3] = { 123, 456, 789 };
21538EOF
micky3879b9f5e72025-07-08 18:04:53 -040021539 if { (eval echo "$as_me:21539: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021540 (eval $ac_compile) 2>&5
21541 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021542 echo "$as_me:21542: \$? = $ac_status" >&5
21543 (exit "$ac_status"); } ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021544 mv conftest.o data.o && \
Steve Kondikae271bc2015-11-15 02:50:53 +010021545 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021546 fi
21547 rm -f conftest.$ac_ext data.o
21548 cat >conftest.$ac_ext <<EOF
micky3879b9f5e72025-07-08 18:04:53 -040021549#line 21549 "configure"
21550extern int testfunc(void);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021551#if defined(NeXT)
micky3879b9f5e72025-07-08 18:04:53 -040021552int testfunc(void)
21553{
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021554 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
micky3879b9f5e72025-07-08 18:04:53 -040021555}
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021556#else
micky3879b9f5e72025-07-08 18:04:53 -040021557extern int testdata[3];
21558int testfunc(void)
21559{
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021560 return testdata[0] == 123
21561 && testdata[1] == 456
21562 && testdata[2] == 789;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021563}
micky3879b9f5e72025-07-08 18:04:53 -040021564#endif
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021565EOF
micky3879b9f5e72025-07-08 18:04:53 -040021566 if { (eval echo "$as_me:21566: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021567 (eval $ac_compile) 2>&5
21568 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021569 echo "$as_me:21569: \$? = $ac_status" >&5
21570 (exit "$ac_status"); }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021571 mv conftest.o func.o && \
Steve Kondikae271bc2015-11-15 02:50:53 +010021572 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021573 fi
21574 rm -f conftest.$ac_ext func.o
21575 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21576 cf_saveLIBS="$LIBS"
21577 LIBS="conftest.a $LIBS"
21578 if test "$cross_compiling" = yes; then
21579 cf_cv_link_dataonly=unknown
21580else
micky3879b9f5e72025-07-08 18:04:53 -040021581 cat >"conftest.$ac_ext" <<_ACEOF
21582#line 21582 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021583#include "confdefs.h"
21584
micky3879b9f5e72025-07-08 18:04:53 -040021585 extern int testfunc(void);
21586 int main(void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021587 {
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021588 ${cf_cv_main_return:-return} (!testfunc());
21589 }
21590
21591_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021592rm -f "conftest$ac_exeext"
21593if { (eval echo "$as_me:21593: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021594 (eval $ac_link) 2>&5
21595 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021596 echo "$as_me:21596: \$? = $ac_status" >&5
21597 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21598 { (eval echo "$as_me:21598: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021599 (eval $ac_try) 2>&5
21600 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021601 echo "$as_me:21601: \$? = $ac_status" >&5
21602 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021603 cf_cv_link_dataonly=yes
21604else
21605 echo "$as_me: program exited with status $ac_status" >&5
21606echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021607cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021608cf_cv_link_dataonly=no
21609fi
micky3879b9f5e72025-07-08 18:04:53 -040021610rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021611fi
21612 LIBS="$cf_saveLIBS"
21613
21614fi
21615
micky3879b9f5e72025-07-08 18:04:53 -040021616echo "$as_me:21616: result: $cf_cv_link_dataonly" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021617echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21618
21619if test "$cf_cv_link_dataonly" = no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010021620
21621cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021622#define BROKEN_LINKER 1
21623EOF
21624
21625 BROKEN_LINKER=1
21626fi
21627
21628### Checks for library functions.
21629
micky3879b9f5e72025-07-08 18:04:53 -040021630echo "$as_me:21630: checking for clock_gettime" >&5
21631echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21632if test "${cf_cv_func_clock_gettime+set}" = set; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021633 echo $ECHO_N "(cached) $ECHO_C" >&6
21634else
micky3879b9f5e72025-07-08 18:04:53 -040021635
21636 cat >"conftest.$ac_ext" <<_ACEOF
21637#line 21637 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021638#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040021639#include <time.h>
21640int
21641main (void)
21642{
21643struct timespec ts;
21644 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21645 ;
21646 return 0;
21647}
21648_ACEOF
21649rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21650if { (eval echo "$as_me:21650: \"$ac_link\"") >&5
21651 (eval $ac_link) 2>&5
21652 ac_status=$?
21653 echo "$as_me:21653: \$? = $ac_status" >&5
21654 (exit "$ac_status"); } &&
21655 { ac_try='test -s "conftest$ac_exeext"'
21656 { (eval echo "$as_me:21656: \"$ac_try\"") >&5
21657 (eval $ac_try) 2>&5
21658 ac_status=$?
21659 echo "$as_me:21659: \$? = $ac_status" >&5
21660 (exit "$ac_status"); }; }; then
21661 cf_cv_func_clock_gettime=yes
21662else
21663 echo "$as_me: failed program was:" >&5
21664cat "conftest.$ac_ext" >&5
21665cf_cv_func_clock_gettime=no
21666fi
21667rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21668
21669fi
21670echo "$as_me:21670: result: $cf_cv_func_clock_gettime" >&5
21671echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21672
21673if test "$cf_cv_func_clock_gettime" = yes
21674then
21675
21676cat >>confdefs.h <<\EOF
21677#define HAVE_CLOCK_GETTIME 1
21678EOF
21679
21680else
21681echo "$as_me:21681: checking for gettimeofday" >&5
21682echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21683if test "${ac_cv_func_gettimeofday+set}" = set; then
21684 echo $ECHO_N "(cached) $ECHO_C" >&6
21685else
21686 cat >"conftest.$ac_ext" <<_ACEOF
21687#line 21687 "configure"
21688#include "confdefs.h"
21689#define gettimeofday autoconf_temporary
21690#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21691#undef gettimeofday
21692
21693#ifdef __cplusplus
21694extern "C"
21695#endif
21696
21697/* We use char because int might match the return type of a gcc2
21698 builtin and then its argument prototype would still apply. */
21699char gettimeofday (void);
21700
21701int
21702main (void)
21703{
21704
21705/* The GNU C library defines stubs for functions which it implements
21706 to always fail with ENOSYS. Some functions are actually named
21707 something starting with __ and the normal name is an alias. */
21708#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21709#error found stub for gettimeofday
21710#endif
21711
21712 return gettimeofday ();
21713 ;
21714 return 0;
21715}
21716_ACEOF
21717rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21718if { (eval echo "$as_me:21718: \"$ac_link\"") >&5
21719 (eval $ac_link) 2>&5
21720 ac_status=$?
21721 echo "$as_me:21721: \$? = $ac_status" >&5
21722 (exit "$ac_status"); } &&
21723 { ac_try='test -s "conftest$ac_exeext"'
21724 { (eval echo "$as_me:21724: \"$ac_try\"") >&5
21725 (eval $ac_try) 2>&5
21726 ac_status=$?
21727 echo "$as_me:21727: \$? = $ac_status" >&5
21728 (exit "$ac_status"); }; }; then
21729 ac_cv_func_gettimeofday=yes
21730else
21731 echo "$as_me: failed program was:" >&5
21732cat "conftest.$ac_ext" >&5
21733ac_cv_func_gettimeofday=no
21734fi
21735rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21736fi
21737echo "$as_me:21737: result: $ac_cv_func_gettimeofday" >&5
21738echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21739if test "$ac_cv_func_gettimeofday" = yes; then
21740
21741cat >>confdefs.h <<\EOF
21742#define HAVE_GETTIMEOFDAY 1
21743EOF
21744
21745else
21746
21747echo "$as_me:21747: checking for gettimeofday in -lbsd" >&5
21748echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21749if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21750 echo $ECHO_N "(cached) $ECHO_C" >&6
21751else
21752 ac_check_lib_save_LIBS=$LIBS
21753LIBS="-lbsd $LIBS"
21754cat >"conftest.$ac_ext" <<_ACEOF
21755#line 21755 "configure"
21756#include "confdefs.h"
21757
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021758/* Override any gcc2 internal prototype to avoid an error. */
21759#ifdef __cplusplus
21760extern "C"
21761#endif
21762/* We use char because int might match the return type of a gcc2
21763 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040021764char gettimeofday (void);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021765int
micky3879b9f5e72025-07-08 18:04:53 -040021766main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021767{
micky3879b9f5e72025-07-08 18:04:53 -040021768gettimeofday ();
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021769 ;
21770 return 0;
21771}
21772_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040021773rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21774if { (eval echo "$as_me:21774: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021775 (eval $ac_link) 2>&5
21776 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021777 echo "$as_me:21777: \$? = $ac_status" >&5
21778 (exit "$ac_status"); } &&
21779 { ac_try='test -s "conftest$ac_exeext"'
21780 { (eval echo "$as_me:21780: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021781 (eval $ac_try) 2>&5
21782 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040021783 echo "$as_me:21783: \$? = $ac_status" >&5
21784 (exit "$ac_status"); }; }; then
21785 ac_cv_lib_bsd_gettimeofday=yes
21786else
21787 echo "$as_me: failed program was:" >&5
21788cat "conftest.$ac_ext" >&5
21789ac_cv_lib_bsd_gettimeofday=no
21790fi
21791rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21792LIBS=$ac_check_lib_save_LIBS
21793fi
21794echo "$as_me:21794: result: $ac_cv_lib_bsd_gettimeofday" >&5
21795echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21796if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21797
21798cat >>confdefs.h <<\EOF
21799#define HAVE_GETTIMEOFDAY 1
21800EOF
21801
21802cf_add_libs="$LIBS"
21803# reverse order
21804cf_add_0lib=
21805for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21806# filter duplicates
21807for cf_add_1lib in $cf_add_0lib; do
21808 for cf_add_2lib in $cf_add_libs; do
21809 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21810 cf_add_1lib=
21811 break
21812 fi
21813 done
21814 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21815done
21816LIBS="$cf_add_libs"
21817
21818fi
21819
21820fi
21821fi
21822
21823for ac_func in \
21824fpathconf \
21825getcwd \
21826getauxval \
21827getegid \
21828geteuid \
21829getopt \
21830getuid \
21831issetugid \
21832localeconv \
21833poll \
21834remove \
21835select \
21836setbuf \
21837setbuffer \
21838setfsuid \
21839setvbuf \
21840sigaction \
21841sigvec \
21842snprintf \
21843strdup \
21844strstr \
21845sysconf \
21846tcgetpgrp \
21847times \
21848tsearch \
21849vsnprintf \
21850
21851do
21852as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21853echo "$as_me:21853: checking for $ac_func" >&5
21854echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21855if eval "test \"\${$as_ac_var+set}\" = set"; then
21856 echo $ECHO_N "(cached) $ECHO_C" >&6
21857else
21858 cat >"conftest.$ac_ext" <<_ACEOF
21859#line 21859 "configure"
21860#include "confdefs.h"
21861#define $ac_func autoconf_temporary
21862#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21863#undef $ac_func
21864
21865#ifdef __cplusplus
21866extern "C"
21867#endif
21868
21869/* We use char because int might match the return type of a gcc2
21870 builtin and then its argument prototype would still apply. */
21871char $ac_func (void);
21872
21873int
21874main (void)
21875{
21876
21877/* The GNU C library defines stubs for functions which it implements
21878 to always fail with ENOSYS. Some functions are actually named
21879 something starting with __ and the normal name is an alias. */
21880#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21881#error found stub for $ac_func
21882#endif
21883
21884 return $ac_func ();
21885 ;
21886 return 0;
21887}
21888_ACEOF
21889rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21890if { (eval echo "$as_me:21890: \"$ac_link\"") >&5
21891 (eval $ac_link) 2>&5
21892 ac_status=$?
21893 echo "$as_me:21893: \$? = $ac_status" >&5
21894 (exit "$ac_status"); } &&
21895 { ac_try='test -s "conftest$ac_exeext"'
21896 { (eval echo "$as_me:21896: \"$ac_try\"") >&5
21897 (eval $ac_try) 2>&5
21898 ac_status=$?
21899 echo "$as_me:21899: \$? = $ac_status" >&5
21900 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021901 eval "$as_ac_var=yes"
21902else
21903 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040021904cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021905eval "$as_ac_var=no"
21906fi
micky3879b9f5e72025-07-08 18:04:53 -040021907rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021908fi
micky3879b9f5e72025-07-08 18:04:53 -040021909echo "$as_me:21909: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21910echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21911if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053021912 cat >>confdefs.h <<EOF
21913#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21914EOF
21915
21916fi
21917done
21918
micky3879b9f5e72025-07-08 18:04:53 -040021919echo "$as_me:21919: checking if _PATH_TTYS is defined in ttyent.h" >&5
21920echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21921if test "${cf_cv_PATH_TTYS+set}" = set; then
21922 echo $ECHO_N "(cached) $ECHO_C" >&6
21923else
21924
21925cat >"conftest.$ac_ext" <<_ACEOF
21926#line 21926 "configure"
21927#include "confdefs.h"
21928
21929#include <stdio.h>
21930#include <ttyent.h>
21931int
21932main (void)
21933{
21934
21935FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21936 ;
21937 return 0;
21938}
21939_ACEOF
21940rm -f "conftest.$ac_objext"
21941if { (eval echo "$as_me:21941: \"$ac_compile\"") >&5
21942 (eval $ac_compile) 2>&5
21943 ac_status=$?
21944 echo "$as_me:21944: \$? = $ac_status" >&5
21945 (exit "$ac_status"); } &&
21946 { ac_try='test -s "conftest.$ac_objext"'
21947 { (eval echo "$as_me:21947: \"$ac_try\"") >&5
21948 (eval $ac_try) 2>&5
21949 ac_status=$?
21950 echo "$as_me:21950: \$? = $ac_status" >&5
21951 (exit "$ac_status"); }; }; then
21952 cf_cv_PATH_TTYS=yes
21953else
21954 echo "$as_me: failed program was:" >&5
21955cat "conftest.$ac_ext" >&5
21956cf_cv_PATH_TTYS=no
21957fi
21958rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21959fi
21960echo "$as_me:21960: result: $cf_cv_PATH_TTYS" >&5
21961echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21962
21963if test $cf_cv_PATH_TTYS = no
21964then
21965 for cf_ttys in /etc/ttytype /etc/ttys
21966 do
21967 if test -f $cf_ttys
21968 then
21969 cf_cv_PATH_TTYS=maybe
21970
21971cat >>confdefs.h <<\EOF
21972#define _PATH_TTYS $cf_ttys
21973EOF
21974
21975 break
21976 fi
21977 done
21978fi
21979
21980if test $cf_cv_PATH_TTYS != no
21981then
21982 echo "$as_me:21982: checking if _PATH_TTYS file exists" >&5
21983echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21984if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21985 echo $ECHO_N "(cached) $ECHO_C" >&6
21986else
21987
21988 if test "$cross_compiling" = yes; then
21989 cf_cv_have_PATH_TTYS=unknown
21990else
21991 cat >"conftest.$ac_ext" <<_ACEOF
21992#line 21992 "configure"
21993#include "confdefs.h"
21994
21995$ac_includes_default
21996
21997#include <ttyent.h>
21998
21999int main(void) {
22000 FILE *fp = fopen(_PATH_TTYS, "r");
22001 ${cf_cv_main_return:-return} (fp == 0);
22002}
22003_ACEOF
22004rm -f "conftest$ac_exeext"
22005if { (eval echo "$as_me:22005: \"$ac_link\"") >&5
22006 (eval $ac_link) 2>&5
22007 ac_status=$?
22008 echo "$as_me:22008: \$? = $ac_status" >&5
22009 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22010 { (eval echo "$as_me:22010: \"$ac_try\"") >&5
22011 (eval $ac_try) 2>&5
22012 ac_status=$?
22013 echo "$as_me:22013: \$? = $ac_status" >&5
22014 (exit "$ac_status"); }; }; then
22015 cf_cv_have_PATH_TTYS=yes
22016else
22017 echo "$as_me: program exited with status $ac_status" >&5
22018echo "$as_me: failed program was:" >&5
22019cat "conftest.$ac_ext" >&5
22020cf_cv_have_PATH_TTYS=no
22021fi
22022rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22023fi
22024fi
22025echo "$as_me:22025: result: $cf_cv_have_PATH_TTYS" >&5
22026echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
22027 test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
22028fi
22029
22030if test $cf_cv_PATH_TTYS != no
22031then
22032
22033cat >>confdefs.h <<\EOF
22034#define HAVE_PATH_TTYS 1
22035EOF
22036
22037 echo "$as_me:22037: checking for getttynam" >&5
22038echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
22039if test "${cf_cv_func_getttynam+set}" = set; then
22040 echo $ECHO_N "(cached) $ECHO_C" >&6
22041else
22042
22043 cat >"conftest.$ac_ext" <<_ACEOF
22044#line 22044 "configure"
22045#include "confdefs.h"
22046#include <ttyent.h>
22047int
22048main (void)
22049{
22050struct ttyent *fp = getttynam("/dev/tty"); (void)fp
22051 ;
22052 return 0;
22053}
22054_ACEOF
22055rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22056if { (eval echo "$as_me:22056: \"$ac_link\"") >&5
22057 (eval $ac_link) 2>&5
22058 ac_status=$?
22059 echo "$as_me:22059: \$? = $ac_status" >&5
22060 (exit "$ac_status"); } &&
22061 { ac_try='test -s "conftest$ac_exeext"'
22062 { (eval echo "$as_me:22062: \"$ac_try\"") >&5
22063 (eval $ac_try) 2>&5
22064 ac_status=$?
22065 echo "$as_me:22065: \$? = $ac_status" >&5
22066 (exit "$ac_status"); }; }; then
22067 cf_cv_func_getttynam=yes
22068else
22069 echo "$as_me: failed program was:" >&5
22070cat "conftest.$ac_ext" >&5
22071cf_cv_func_getttynam=no
22072fi
22073rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22074fi
22075echo "$as_me:22075: result: $cf_cv_func_getttynam" >&5
22076echo "${ECHO_T}$cf_cv_func_getttynam" >&6
22077 test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
22078#define HAVE_GETTTYNAM 1
22079EOF
22080
22081fi
22082
22083if test "x$ac_cv_func_getopt" = xno && \
Steve Kondikae271bc2015-11-15 02:50:53 +010022084 test "x$cf_with_progs$cf_with_tests" != xnono; then
micky3879b9f5e72025-07-08 18:04:53 -040022085 { { echo "$as_me:22085: error: getopt is required for building programs" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022086echo "$as_me: error: getopt is required for building programs" >&2;}
22087 { (exit 1); exit 1; }; }
22088fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022089
micky3879b9f5e72025-07-08 18:04:53 -040022090if test "x$with_safe_sprintf" = xyes
22091then
22092 if test "x$ac_cv_func_vsnprintf" = xyes
22093 then
22094 { echo "$as_me:22094: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22095echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22096 else
22097
22098cat >>confdefs.h <<\EOF
22099#define USE_SAFE_SPRINTF 1
22100EOF
22101
22102 fi
22103fi
22104
Steve Kondikae271bc2015-11-15 02:50:53 +010022105if test "x$with_getcap" = "xyes" ; then
22106
micky3879b9f5e72025-07-08 18:04:53 -040022107echo "$as_me:22107: checking for terminal-capability database functions" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022108echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22109if test "${cf_cv_cgetent+set}" = set; then
22110 echo $ECHO_N "(cached) $ECHO_C" >&6
22111else
22112
micky3879b9f5e72025-07-08 18:04:53 -040022113cat >"conftest.$ac_ext" <<_ACEOF
22114#line 22114 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022115#include "confdefs.h"
22116
micky3879b9f5e72025-07-08 18:04:53 -040022117$ac_includes_default
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022118int
micky3879b9f5e72025-07-08 18:04:53 -040022119main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022120{
22121
22122 char temp[128];
22123 char *buf = temp;
22124 char *db_array = temp;
Steve Kondikae271bc2015-11-15 02:50:53 +010022125 cgetent(&buf, &db_array, "vt100");
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022126 cgetcap(buf, "tc", '=');
22127 cgetmatch(buf, "tc");
22128
22129 ;
22130 return 0;
22131}
22132_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022133rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22134if { (eval echo "$as_me:22134: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022135 (eval $ac_link) 2>&5
22136 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022137 echo "$as_me:22137: \$? = $ac_status" >&5
22138 (exit "$ac_status"); } &&
22139 { ac_try='test -s "conftest$ac_exeext"'
22140 { (eval echo "$as_me:22140: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022141 (eval $ac_try) 2>&5
22142 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022143 echo "$as_me:22143: \$? = $ac_status" >&5
22144 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022145 cf_cv_cgetent=yes
22146else
22147 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022148cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022149cf_cv_cgetent=no
22150fi
micky3879b9f5e72025-07-08 18:04:53 -040022151rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022152
22153fi
micky3879b9f5e72025-07-08 18:04:53 -040022154echo "$as_me:22154: result: $cf_cv_cgetent" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022155echo "${ECHO_T}$cf_cv_cgetent" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010022156
22157if test "$cf_cv_cgetent" = yes
22158then
22159
22160cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022161#define HAVE_BSD_CGETENT 1
22162EOF
22163
micky3879b9f5e72025-07-08 18:04:53 -040022164echo "$as_me:22164: checking if cgetent uses const parameter" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022165echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22166if test "${cf_cv_cgetent_const+set}" = set; then
22167 echo $ECHO_N "(cached) $ECHO_C" >&6
22168else
22169
micky3879b9f5e72025-07-08 18:04:53 -040022170cat >"conftest.$ac_ext" <<_ACEOF
22171#line 22171 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010022172#include "confdefs.h"
22173
micky3879b9f5e72025-07-08 18:04:53 -040022174#pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22175$ac_includes_default
Steve Kondikae271bc2015-11-15 02:50:53 +010022176int
micky3879b9f5e72025-07-08 18:04:53 -040022177main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010022178{
22179
22180 char temp[128];
22181 char *buf = temp;
22182#ifndef _NETBSD_SOURCE /* given, since April 2004 in stdlib.h */
22183 const char *db_array = temp;
22184 cgetent(&buf, &db_array, "vt100");
22185#endif
22186 cgetcap(buf, "tc", '=');
22187 cgetmatch(buf, "tc");
22188
22189 ;
22190 return 0;
22191}
22192_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022193rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22194if { (eval echo "$as_me:22194: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022195 (eval $ac_link) 2>&5
22196 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022197 echo "$as_me:22197: \$? = $ac_status" >&5
22198 (exit "$ac_status"); } &&
22199 { ac_try='test -s "conftest$ac_exeext"'
22200 { (eval echo "$as_me:22200: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022201 (eval $ac_try) 2>&5
22202 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022203 echo "$as_me:22203: \$? = $ac_status" >&5
22204 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010022205 cf_cv_cgetent_const=yes
22206else
22207 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022208cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022209cf_cv_cgetent_const=no
22210fi
micky3879b9f5e72025-07-08 18:04:53 -040022211rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010022212
22213fi
micky3879b9f5e72025-07-08 18:04:53 -040022214echo "$as_me:22214: result: $cf_cv_cgetent_const" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022215echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22216 if test "$cf_cv_cgetent_const" = yes
22217 then
22218
22219cat >>confdefs.h <<EOF
22220#define CGETENT_CONST const
22221EOF
22222
22223 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022224fi
22225
Steve Kondikae271bc2015-11-15 02:50:53 +010022226fi
22227
micky3879b9f5e72025-07-08 18:04:53 -040022228echo "$as_me:22228: checking for isascii" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022229echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22230if test "${cf_cv_have_isascii+set}" = set; then
22231 echo $ECHO_N "(cached) $ECHO_C" >&6
22232else
22233
micky3879b9f5e72025-07-08 18:04:53 -040022234 cat >"conftest.$ac_ext" <<_ACEOF
22235#line 22235 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022236#include "confdefs.h"
22237#include <ctype.h>
22238int
micky3879b9f5e72025-07-08 18:04:53 -040022239main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022240{
micky3879b9f5e72025-07-08 18:04:53 -040022241int x = isascii(' '); (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022242 ;
22243 return 0;
22244}
22245_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022246rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22247if { (eval echo "$as_me:22247: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022248 (eval $ac_link) 2>&5
22249 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022250 echo "$as_me:22250: \$? = $ac_status" >&5
22251 (exit "$ac_status"); } &&
22252 { ac_try='test -s "conftest$ac_exeext"'
22253 { (eval echo "$as_me:22253: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022254 (eval $ac_try) 2>&5
22255 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022256 echo "$as_me:22256: \$? = $ac_status" >&5
22257 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022258 cf_cv_have_isascii=yes
22259else
22260 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022261cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022262cf_cv_have_isascii=no
22263fi
micky3879b9f5e72025-07-08 18:04:53 -040022264rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022265
22266fi
micky3879b9f5e72025-07-08 18:04:53 -040022267echo "$as_me:22267: result: $cf_cv_have_isascii" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022268echo "${ECHO_T}$cf_cv_have_isascii" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010022269test "$cf_cv_have_isascii" = yes &&
22270cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022271#define HAVE_ISASCII 1
22272EOF
22273
22274if test "$ac_cv_func_sigaction" = yes; then
micky3879b9f5e72025-07-08 18:04:53 -040022275echo "$as_me:22275: checking whether sigaction needs _POSIX_SOURCE" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022276echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040022277cat >"conftest.$ac_ext" <<_ACEOF
22278#line 22278 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022279#include "confdefs.h"
22280
22281#include <sys/types.h>
22282#include <signal.h>
22283int
micky3879b9f5e72025-07-08 18:04:53 -040022284main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022285{
micky3879b9f5e72025-07-08 18:04:53 -040022286struct sigaction act; (void)act
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022287 ;
22288 return 0;
22289}
22290_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022291rm -f "conftest.$ac_objext"
22292if { (eval echo "$as_me:22292: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022293 (eval $ac_compile) 2>&5
22294 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022295 echo "$as_me:22295: \$? = $ac_status" >&5
22296 (exit "$ac_status"); } &&
22297 { ac_try='test -s "conftest.$ac_objext"'
22298 { (eval echo "$as_me:22298: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022299 (eval $ac_try) 2>&5
22300 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022301 echo "$as_me:22301: \$? = $ac_status" >&5
22302 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022303 sigact_bad=no
22304else
22305 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022306cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022307
micky3879b9f5e72025-07-08 18:04:53 -040022308cat >"conftest.$ac_ext" <<_ACEOF
22309#line 22309 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022310#include "confdefs.h"
22311
22312#define _POSIX_SOURCE
22313#include <sys/types.h>
22314#include <signal.h>
22315int
micky3879b9f5e72025-07-08 18:04:53 -040022316main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022317{
micky3879b9f5e72025-07-08 18:04:53 -040022318struct sigaction act; (void)act
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022319 ;
22320 return 0;
22321}
22322_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022323rm -f "conftest.$ac_objext"
22324if { (eval echo "$as_me:22324: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022325 (eval $ac_compile) 2>&5
22326 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022327 echo "$as_me:22327: \$? = $ac_status" >&5
22328 (exit "$ac_status"); } &&
22329 { ac_try='test -s "conftest.$ac_objext"'
22330 { (eval echo "$as_me:22330: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022331 (eval $ac_try) 2>&5
22332 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022333 echo "$as_me:22333: \$? = $ac_status" >&5
22334 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022335 sigact_bad=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010022336
22337cat >>confdefs.h <<\EOF
22338#define _POSIX_SOURCE 1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022339EOF
22340
22341else
22342 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022343cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022344sigact_bad=unknown
22345fi
micky3879b9f5e72025-07-08 18:04:53 -040022346rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022347fi
micky3879b9f5e72025-07-08 18:04:53 -040022348rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22349echo "$as_me:22349: result: $sigact_bad" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022350echo "${ECHO_T}$sigact_bad" >&6
22351fi
22352
micky3879b9f5e72025-07-08 18:04:53 -040022353echo "$as_me:22353: checking if nanosleep really works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022354echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22355if test "${cf_cv_func_nanosleep+set}" = set; then
22356 echo $ECHO_N "(cached) $ECHO_C" >&6
22357else
22358
22359if test "$cross_compiling" = yes; then
22360 cf_cv_func_nanosleep=unknown
22361else
micky3879b9f5e72025-07-08 18:04:53 -040022362 cat >"conftest.$ac_ext" <<_ACEOF
22363#line 22363 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022364#include "confdefs.h"
22365
micky3879b9f5e72025-07-08 18:04:53 -040022366$ac_includes_default
22367
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022368#include <errno.h>
22369#include <time.h>
22370
22371#ifdef HAVE_SYS_TIME_H
22372#include <sys/time.h>
22373#endif
22374
micky3879b9f5e72025-07-08 18:04:53 -040022375int main(void) {
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022376 struct timespec ts1, ts2;
22377 int code;
22378 ts1.tv_sec = 0;
22379 ts1.tv_nsec = 750000000;
22380 ts2.tv_sec = 0;
22381 ts2.tv_nsec = 0;
22382 errno = 0;
22383 code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22384 ${cf_cv_main_return:-return}(code != 0);
22385}
22386
22387_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022388rm -f "conftest$ac_exeext"
22389if { (eval echo "$as_me:22389: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022390 (eval $ac_link) 2>&5
22391 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022392 echo "$as_me:22392: \$? = $ac_status" >&5
22393 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22394 { (eval echo "$as_me:22394: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022395 (eval $ac_try) 2>&5
22396 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022397 echo "$as_me:22397: \$? = $ac_status" >&5
22398 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022399 cf_cv_func_nanosleep=yes
22400else
22401 echo "$as_me: program exited with status $ac_status" >&5
22402echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022403cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022404cf_cv_func_nanosleep=no
22405fi
micky3879b9f5e72025-07-08 18:04:53 -040022406rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022407fi
22408fi
micky3879b9f5e72025-07-08 18:04:53 -040022409echo "$as_me:22409: result: $cf_cv_func_nanosleep" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022410echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22411
Steve Kondikae271bc2015-11-15 02:50:53 +010022412test "$cf_cv_func_nanosleep" = "yes" &&
22413cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022414#define HAVE_NANOSLEEP 1
22415EOF
22416
22417for ac_header in \
22418termio.h \
22419termios.h \
22420unistd.h \
micky3879b9f5e72025-07-08 18:04:53 -040022421sys/ioctl.h \
22422sys/termio.h \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022423
22424do
22425as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040022426echo "$as_me:22426: checking for $ac_header" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022427echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22428if eval "test \"\${$as_ac_Header+set}\" = set"; then
22429 echo $ECHO_N "(cached) $ECHO_C" >&6
22430else
micky3879b9f5e72025-07-08 18:04:53 -040022431 cat >"conftest.$ac_ext" <<_ACEOF
22432#line 22432 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022433#include "confdefs.h"
22434#include <$ac_header>
22435_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022436if { (eval echo "$as_me:22436: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22437 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022438 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022439 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022440 rm -f conftest.er1
22441 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040022442 echo "$as_me:22442: \$? = $ac_status" >&5
22443 (exit "$ac_status"); } >/dev/null; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022444 if test -s conftest.err; then
22445 ac_cpp_err=$ac_c_preproc_warn_flag
22446 else
22447 ac_cpp_err=
22448 fi
22449else
22450 ac_cpp_err=yes
22451fi
22452if test -z "$ac_cpp_err"; then
22453 eval "$as_ac_Header=yes"
22454else
22455 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022456 cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022457 eval "$as_ac_Header=no"
22458fi
micky3879b9f5e72025-07-08 18:04:53 -040022459rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022460fi
micky3879b9f5e72025-07-08 18:04:53 -040022461echo "$as_me:22461: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22462echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22463if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022464 cat >>confdefs.h <<EOF
22465#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22466EOF
22467
22468fi
22469done
22470
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022471if test "$ac_cv_header_termios_h" = yes ; then
22472 case "$CFLAGS $CPPFLAGS" in
Steve Kondikae271bc2015-11-15 02:50:53 +010022473 (*-D_POSIX_SOURCE*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022474 termios_bad=dunno ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010022475 (*) termios_bad=maybe ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022476 esac
22477 if test "$termios_bad" = maybe ; then
micky3879b9f5e72025-07-08 18:04:53 -040022478 echo "$as_me:22478: checking whether termios.h needs _POSIX_SOURCE" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022479echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040022480 cat >"conftest.$ac_ext" <<_ACEOF
22481#line 22481 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022482#include "confdefs.h"
22483#include <termios.h>
22484int
micky3879b9f5e72025-07-08 18:04:53 -040022485main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022486{
micky3879b9f5e72025-07-08 18:04:53 -040022487struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022488 ;
22489 return 0;
22490}
22491_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022492rm -f "conftest.$ac_objext"
22493if { (eval echo "$as_me:22493: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022494 (eval $ac_compile) 2>&5
22495 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022496 echo "$as_me:22496: \$? = $ac_status" >&5
22497 (exit "$ac_status"); } &&
22498 { ac_try='test -s "conftest.$ac_objext"'
22499 { (eval echo "$as_me:22499: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022500 (eval $ac_try) 2>&5
22501 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022502 echo "$as_me:22502: \$? = $ac_status" >&5
22503 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022504 termios_bad=no
22505else
22506 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022507cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022508
micky3879b9f5e72025-07-08 18:04:53 -040022509 cat >"conftest.$ac_ext" <<_ACEOF
22510#line 22510 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022511#include "confdefs.h"
22512
22513#define _POSIX_SOURCE
22514#include <termios.h>
22515int
micky3879b9f5e72025-07-08 18:04:53 -040022516main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022517{
micky3879b9f5e72025-07-08 18:04:53 -040022518struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022519 ;
22520 return 0;
22521}
22522_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022523rm -f "conftest.$ac_objext"
22524if { (eval echo "$as_me:22524: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022525 (eval $ac_compile) 2>&5
22526 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022527 echo "$as_me:22527: \$? = $ac_status" >&5
22528 (exit "$ac_status"); } &&
22529 { ac_try='test -s "conftest.$ac_objext"'
22530 { (eval echo "$as_me:22530: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022531 (eval $ac_try) 2>&5
22532 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022533 echo "$as_me:22533: \$? = $ac_status" >&5
22534 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022535 termios_bad=unknown
22536else
22537 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022538cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022539termios_bad=yes
22540cat >>confdefs.h <<\EOF
22541#define _POSIX_SOURCE 1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022542EOF
22543
22544fi
micky3879b9f5e72025-07-08 18:04:53 -040022545rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022546
22547fi
micky3879b9f5e72025-07-08 18:04:53 -040022548rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22549 echo "$as_me:22549: result: $termios_bad" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022550echo "${ECHO_T}$termios_bad" >&6
22551 fi
22552fi
22553
micky3879b9f5e72025-07-08 18:04:53 -040022554echo "$as_me:22554: checking for tcgetattr" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022555echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22556if test "${cf_cv_have_tcgetattr+set}" = set; then
22557 echo $ECHO_N "(cached) $ECHO_C" >&6
22558else
22559
micky3879b9f5e72025-07-08 18:04:53 -040022560cat >"conftest.$ac_ext" <<_ACEOF
22561#line 22561 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022562#include "confdefs.h"
22563
22564#include <sys/types.h>
22565#ifdef HAVE_UNISTD_H
22566#include <unistd.h>
22567#endif
22568#ifdef HAVE_TERMIOS_H
22569#include <termios.h>
22570#define TTY struct termios
22571#else
22572#ifdef HAVE_TERMIO_H
22573#include <termio.h>
22574#define TTY struct termio
22575#endif
22576#endif
22577
22578int
micky3879b9f5e72025-07-08 18:04:53 -040022579main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022580{
22581
22582TTY foo;
22583tcgetattr(1, &foo);
22584 ;
22585 return 0;
22586}
22587_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022588rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22589if { (eval echo "$as_me:22589: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022590 (eval $ac_link) 2>&5
22591 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022592 echo "$as_me:22592: \$? = $ac_status" >&5
22593 (exit "$ac_status"); } &&
22594 { ac_try='test -s "conftest$ac_exeext"'
22595 { (eval echo "$as_me:22595: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022596 (eval $ac_try) 2>&5
22597 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022598 echo "$as_me:22598: \$? = $ac_status" >&5
22599 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022600 cf_cv_have_tcgetattr=yes
22601else
22602 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022603cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022604cf_cv_have_tcgetattr=no
22605fi
micky3879b9f5e72025-07-08 18:04:53 -040022606rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022607fi
micky3879b9f5e72025-07-08 18:04:53 -040022608echo "$as_me:22608: result: $cf_cv_have_tcgetattr" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022609echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010022610test "$cf_cv_have_tcgetattr" = yes &&
22611cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022612#define HAVE_TCGETATTR 1
22613EOF
22614
micky3879b9f5e72025-07-08 18:04:53 -040022615echo "$as_me:22615: checking for vsscanf function or workaround" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022616echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22617if test "${cf_cv_func_vsscanf+set}" = set; then
22618 echo $ECHO_N "(cached) $ECHO_C" >&6
22619else
22620
micky3879b9f5e72025-07-08 18:04:53 -040022621cat >"conftest.$ac_ext" <<_ACEOF
22622#line 22622 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022623#include "confdefs.h"
22624
22625#include <stdarg.h>
22626#include <stdio.h>
micky3879b9f5e72025-07-08 18:04:53 -040022627
22628static void
22629myfunc(const char *str, const char *fmt, ...)
22630{
22631 va_list ap;
22632 va_start(ap, fmt);
22633 vsscanf(str, fmt, ap);
22634 va_end(ap);
22635}
22636
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022637int
micky3879b9f5e72025-07-08 18:04:53 -040022638main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022639{
22640
micky3879b9f5e72025-07-08 18:04:53 -040022641 myfunc("55", "%d");
22642
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022643 ;
22644 return 0;
22645}
22646_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022647rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22648if { (eval echo "$as_me:22648: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022649 (eval $ac_link) 2>&5
22650 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022651 echo "$as_me:22651: \$? = $ac_status" >&5
22652 (exit "$ac_status"); } &&
22653 { ac_try='test -s "conftest$ac_exeext"'
22654 { (eval echo "$as_me:22654: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022655 (eval $ac_try) 2>&5
22656 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022657 echo "$as_me:22657: \$? = $ac_status" >&5
22658 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022659 cf_cv_func_vsscanf=vsscanf
22660else
22661 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022662cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022663
micky3879b9f5e72025-07-08 18:04:53 -040022664cat >"conftest.$ac_ext" <<_ACEOF
22665#line 22665 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022666#include "confdefs.h"
22667
22668#include <stdarg.h>
22669#include <stdio.h>
22670int
micky3879b9f5e72025-07-08 18:04:53 -040022671main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022672{
22673
Steve Kondikae271bc2015-11-15 02:50:53 +010022674 FILE strbuf;
22675 char *str = "from";
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022676
Steve Kondikae271bc2015-11-15 02:50:53 +010022677 strbuf._flag = _IOREAD;
22678 strbuf._ptr = strbuf._base = (unsigned char *) str;
22679 strbuf._cnt = strlen(str);
22680 strbuf._file = _NFILE;
22681 return (vfscanf(&strbuf, "%d", ap))
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022682 ;
22683 return 0;
22684}
22685_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022686rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22687if { (eval echo "$as_me:22687: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022688 (eval $ac_link) 2>&5
22689 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022690 echo "$as_me:22690: \$? = $ac_status" >&5
22691 (exit "$ac_status"); } &&
22692 { ac_try='test -s "conftest$ac_exeext"'
22693 { (eval echo "$as_me:22693: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022694 (eval $ac_try) 2>&5
22695 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022696 echo "$as_me:22696: \$? = $ac_status" >&5
22697 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022698 cf_cv_func_vsscanf=vfscanf
22699else
22700 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022701cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022702
micky3879b9f5e72025-07-08 18:04:53 -040022703cat >"conftest.$ac_ext" <<_ACEOF
22704#line 22704 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022705#include "confdefs.h"
22706
22707#include <stdarg.h>
22708#include <stdio.h>
22709int
micky3879b9f5e72025-07-08 18:04:53 -040022710main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022711{
22712
Steve Kondikae271bc2015-11-15 02:50:53 +010022713 FILE strbuf;
22714 char *str = "from";
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022715
Steve Kondikae271bc2015-11-15 02:50:53 +010022716 strbuf._flag = _IOREAD;
22717 strbuf._ptr = strbuf._base = (unsigned char *) str;
22718 strbuf._cnt = strlen(str);
22719 strbuf._file = _NFILE;
22720 return (_doscan(&strbuf, "%d", ap))
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022721 ;
22722 return 0;
22723}
22724_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022725rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22726if { (eval echo "$as_me:22726: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022727 (eval $ac_link) 2>&5
22728 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022729 echo "$as_me:22729: \$? = $ac_status" >&5
22730 (exit "$ac_status"); } &&
22731 { ac_try='test -s "conftest$ac_exeext"'
22732 { (eval echo "$as_me:22732: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022733 (eval $ac_try) 2>&5
22734 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022735 echo "$as_me:22735: \$? = $ac_status" >&5
22736 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022737 cf_cv_func_vsscanf=_doscan
22738else
22739 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022740cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022741
22742cf_cv_func_vsscanf=no
22743fi
micky3879b9f5e72025-07-08 18:04:53 -040022744rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022745fi
micky3879b9f5e72025-07-08 18:04:53 -040022746rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022747fi
micky3879b9f5e72025-07-08 18:04:53 -040022748rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022749fi
micky3879b9f5e72025-07-08 18:04:53 -040022750echo "$as_me:22750: result: $cf_cv_func_vsscanf" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022751echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22752
micky3879b9f5e72025-07-08 18:04:53 -040022753case "$cf_cv_func_vsscanf" in
Steve Kondikae271bc2015-11-15 02:50:53 +010022754(vsscanf)
22755cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022756#define HAVE_VSSCANF 1
22757EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010022758;;
22759(vfscanf)
22760cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022761#define HAVE_VFSCANF 1
22762EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010022763;;
22764(_doscan)
22765cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022766#define HAVE__DOSCAN 1
22767EOF
22768;;
22769esac
22770
micky3879b9f5e72025-07-08 18:04:53 -040022771for ac_header in \
22772unistd.h \
22773
22774do
22775as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22776echo "$as_me:22776: checking for $ac_header" >&5
22777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22778if eval "test \"\${$as_ac_Header+set}\" = set"; then
22779 echo $ECHO_N "(cached) $ECHO_C" >&6
22780else
22781 cat >"conftest.$ac_ext" <<_ACEOF
22782#line 22782 "configure"
22783#include "confdefs.h"
22784#include <$ac_header>
22785_ACEOF
22786if { (eval echo "$as_me:22786: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22787 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22788 ac_status=$?
22789 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22790 rm -f conftest.er1
22791 cat conftest.err >&5
22792 echo "$as_me:22792: \$? = $ac_status" >&5
22793 (exit "$ac_status"); } >/dev/null; then
22794 if test -s conftest.err; then
22795 ac_cpp_err=$ac_c_preproc_warn_flag
22796 else
22797 ac_cpp_err=
22798 fi
22799else
22800 ac_cpp_err=yes
22801fi
22802if test -z "$ac_cpp_err"; then
22803 eval "$as_ac_Header=yes"
22804else
22805 echo "$as_me: failed program was:" >&5
22806 cat "conftest.$ac_ext" >&5
22807 eval "$as_ac_Header=no"
22808fi
22809rm -f conftest.err "conftest.$ac_ext"
22810fi
22811echo "$as_me:22811: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22812echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22813if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22814 cat >>confdefs.h <<EOF
22815#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22816EOF
22817
22818fi
22819done
22820
22821echo "$as_me:22821: checking for working mkstemp" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022822echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22823if test "${cf_cv_func_mkstemp+set}" = set; then
22824 echo $ECHO_N "(cached) $ECHO_C" >&6
22825else
22826
micky3879b9f5e72025-07-08 18:04:53 -040022827rm -rf ./conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022828if test "$cross_compiling" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010022829 cf_cv_func_mkstemp=maybe
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022830else
micky3879b9f5e72025-07-08 18:04:53 -040022831 cat >"conftest.$ac_ext" <<_ACEOF
22832#line 22832 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022833#include "confdefs.h"
22834
micky3879b9f5e72025-07-08 18:04:53 -040022835$ac_includes_default
22836
22837int main(void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022838{
micky3879b9f5e72025-07-08 18:04:53 -040022839 static char tmpl[] = "conftestXXXXXX";
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022840 char name[2][80];
22841 int n;
22842 int result = 0;
22843 int fd;
22844 struct stat sb;
22845
22846 umask(077);
22847 for (n = 0; n < 2; ++n) {
22848 strcpy(name[n], tmpl);
22849 if ((fd = mkstemp(name[n])) >= 0) {
22850 if (!strcmp(name[n], tmpl)
22851 || stat(name[n], &sb) != 0
22852 || (sb.st_mode & S_IFMT) != S_IFREG
22853 || (sb.st_mode & 077) != 0) {
22854 result = 1;
22855 }
22856 close(fd);
22857 }
22858 }
22859 if (result == 0
22860 && !strcmp(name[0], name[1]))
22861 result = 1;
22862 ${cf_cv_main_return:-return}(result);
22863}
22864
22865_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022866rm -f "conftest$ac_exeext"
22867if { (eval echo "$as_me:22867: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022868 (eval $ac_link) 2>&5
22869 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022870 echo "$as_me:22870: \$? = $ac_status" >&5
22871 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22872 { (eval echo "$as_me:22872: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022873 (eval $ac_try) 2>&5
22874 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022875 echo "$as_me:22875: \$? = $ac_status" >&5
22876 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022877 cf_cv_func_mkstemp=yes
22878
22879else
22880 echo "$as_me: program exited with status $ac_status" >&5
22881echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022882cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022883cf_cv_func_mkstemp=no
22884
22885fi
micky3879b9f5e72025-07-08 18:04:53 -040022886rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022887fi
22888
22889fi
micky3879b9f5e72025-07-08 18:04:53 -040022890echo "$as_me:22890: result: $cf_cv_func_mkstemp" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022891echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010022892if test "x$cf_cv_func_mkstemp" = xmaybe ; then
micky3879b9f5e72025-07-08 18:04:53 -040022893 echo "$as_me:22893: checking for mkstemp" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022894echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22895if test "${ac_cv_func_mkstemp+set}" = set; then
22896 echo $ECHO_N "(cached) $ECHO_C" >&6
22897else
micky3879b9f5e72025-07-08 18:04:53 -040022898 cat >"conftest.$ac_ext" <<_ACEOF
22899#line 22899 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010022900#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040022901#define mkstemp autoconf_temporary
22902#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22903#undef mkstemp
22904
Steve Kondikae271bc2015-11-15 02:50:53 +010022905#ifdef __cplusplus
22906extern "C"
22907#endif
micky3879b9f5e72025-07-08 18:04:53 -040022908
Steve Kondikae271bc2015-11-15 02:50:53 +010022909/* We use char because int might match the return type of a gcc2
22910 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040022911char mkstemp (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010022912
22913int
micky3879b9f5e72025-07-08 18:04:53 -040022914main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010022915{
micky3879b9f5e72025-07-08 18:04:53 -040022916
22917/* The GNU C library defines stubs for functions which it implements
Steve Kondikae271bc2015-11-15 02:50:53 +010022918 to always fail with ENOSYS. Some functions are actually named
22919 something starting with __ and the normal name is an alias. */
22920#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
micky3879b9f5e72025-07-08 18:04:53 -040022921#error found stub for mkstemp
Steve Kondikae271bc2015-11-15 02:50:53 +010022922#endif
22923
micky3879b9f5e72025-07-08 18:04:53 -040022924 return mkstemp ();
Steve Kondikae271bc2015-11-15 02:50:53 +010022925 ;
22926 return 0;
22927}
22928_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040022929rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22930if { (eval echo "$as_me:22930: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022931 (eval $ac_link) 2>&5
22932 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022933 echo "$as_me:22933: \$? = $ac_status" >&5
22934 (exit "$ac_status"); } &&
22935 { ac_try='test -s "conftest$ac_exeext"'
22936 { (eval echo "$as_me:22936: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022937 (eval $ac_try) 2>&5
22938 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040022939 echo "$as_me:22939: \$? = $ac_status" >&5
22940 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010022941 ac_cv_func_mkstemp=yes
22942else
22943 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040022944cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022945ac_cv_func_mkstemp=no
22946fi
micky3879b9f5e72025-07-08 18:04:53 -040022947rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010022948fi
micky3879b9f5e72025-07-08 18:04:53 -040022949echo "$as_me:22949: result: $ac_cv_func_mkstemp" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010022950echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22951
22952fi
22953if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22954
22955cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022956#define HAVE_MKSTEMP 1
22957EOF
22958
22959fi
22960
22961# setup for prototype of fallback for vsscanf()
22962
22963if test "$cf_cv_func_vsscanf" = vsscanf ; then
22964 HAVE_VSSCANF=1
22965else
22966 HAVE_VSSCANF=0
22967fi
22968
Steve Kondikae271bc2015-11-15 02:50:53 +010022969if test "x$cross_compiling" = xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040022970 { echo "$as_me:22970: WARNING: cross compiling: assume setvbuf params not reversed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022971echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22972else
micky3879b9f5e72025-07-08 18:04:53 -040022973 echo "$as_me:22973: checking whether setvbuf arguments are reversed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022974echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22975if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22976 echo $ECHO_N "(cached) $ECHO_C" >&6
22977else
22978 if test "$cross_compiling" = yes; then
micky3879b9f5e72025-07-08 18:04:53 -040022979 { { echo "$as_me:22979: error: cannot run test program while cross compiling" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022980echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22981 { (exit 1); exit 1; }; }
22982else
micky3879b9f5e72025-07-08 18:04:53 -040022983 cat >"conftest.$ac_ext" <<_ACEOF
22984#line 22984 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022985#include "confdefs.h"
22986#include <stdio.h>
22987/* If setvbuf has the reversed format, exit 0. */
22988int
micky3879b9f5e72025-07-08 18:04:53 -040022989main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022990{
22991 /* This call has the arguments reversed.
22992 A reversed system may check and see that the address of main
22993 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
22994 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22995 $ac_main_return(1);
22996 putc('\r', stdout);
micky3879b9f5e72025-07-08 18:04:53 -040022997 $ac_main_return(0); /* Non-reversed systems segv here. */
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053022998}
22999_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023000rm -f "conftest$ac_exeext"
23001if { (eval echo "$as_me:23001: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023002 (eval $ac_link) 2>&5
23003 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023004 echo "$as_me:23004: \$? = $ac_status" >&5
23005 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23006 { (eval echo "$as_me:23006: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023007 (eval $ac_try) 2>&5
23008 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023009 echo "$as_me:23009: \$? = $ac_status" >&5
23010 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023011 ac_cv_func_setvbuf_reversed=yes
23012else
23013 echo "$as_me: program exited with status $ac_status" >&5
23014echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023015cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023016ac_cv_func_setvbuf_reversed=no
23017fi
micky3879b9f5e72025-07-08 18:04:53 -040023018rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023019fi
micky3879b9f5e72025-07-08 18:04:53 -040023020rm -f core ./core.* ./*.core
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023021fi
micky3879b9f5e72025-07-08 18:04:53 -040023022echo "$as_me:23022: result: $ac_cv_func_setvbuf_reversed" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023023echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
23024if test $ac_cv_func_setvbuf_reversed = yes; then
23025
23026cat >>confdefs.h <<\EOF
23027#define SETVBUF_REVERSED 1
23028EOF
23029
23030fi
23031
23032fi
micky3879b9f5e72025-07-08 18:04:53 -040023033echo "$as_me:23033: checking for intptr_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023034echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
23035if test "${ac_cv_type_intptr_t+set}" = set; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023036 echo $ECHO_N "(cached) $ECHO_C" >&6
23037else
micky3879b9f5e72025-07-08 18:04:53 -040023038 cat >"conftest.$ac_ext" <<_ACEOF
23039#line 23039 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023040#include "confdefs.h"
Steve Kondikae271bc2015-11-15 02:50:53 +010023041$ac_includes_default
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023042int
micky3879b9f5e72025-07-08 18:04:53 -040023043main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023044{
Steve Kondikae271bc2015-11-15 02:50:53 +010023045if ((intptr_t *) 0)
23046 return 0;
23047if (sizeof (intptr_t))
23048 return 0;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023049 ;
23050 return 0;
23051}
23052_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023053rm -f "conftest.$ac_objext"
23054if { (eval echo "$as_me:23054: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023055 (eval $ac_compile) 2>&5
23056 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023057 echo "$as_me:23057: \$? = $ac_status" >&5
23058 (exit "$ac_status"); } &&
23059 { ac_try='test -s "conftest.$ac_objext"'
23060 { (eval echo "$as_me:23060: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023061 (eval $ac_try) 2>&5
23062 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023063 echo "$as_me:23063: \$? = $ac_status" >&5
23064 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023065 ac_cv_type_intptr_t=yes
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023066else
23067 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023068cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023069ac_cv_type_intptr_t=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023070fi
micky3879b9f5e72025-07-08 18:04:53 -040023071rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023072fi
micky3879b9f5e72025-07-08 18:04:53 -040023073echo "$as_me:23073: result: $ac_cv_type_intptr_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023074echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
micky3879b9f5e72025-07-08 18:04:53 -040023075if test "$ac_cv_type_intptr_t" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023076 :
23077else
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023078
23079cat >>confdefs.h <<EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010023080#define intptr_t long
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023081EOF
23082
Steve Kondikae271bc2015-11-15 02:50:53 +010023083fi
23084
micky3879b9f5e72025-07-08 18:04:53 -040023085echo "$as_me:23085: checking for ssize_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023086echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
23087if test "${ac_cv_type_ssize_t+set}" = set; then
23088 echo $ECHO_N "(cached) $ECHO_C" >&6
23089else
micky3879b9f5e72025-07-08 18:04:53 -040023090 cat >"conftest.$ac_ext" <<_ACEOF
23091#line 23091 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010023092#include "confdefs.h"
23093$ac_includes_default
23094int
micky3879b9f5e72025-07-08 18:04:53 -040023095main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010023096{
23097if ((ssize_t *) 0)
23098 return 0;
23099if (sizeof (ssize_t))
23100 return 0;
23101 ;
23102 return 0;
23103}
23104_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023105rm -f "conftest.$ac_objext"
23106if { (eval echo "$as_me:23106: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023107 (eval $ac_compile) 2>&5
23108 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023109 echo "$as_me:23109: \$? = $ac_status" >&5
23110 (exit "$ac_status"); } &&
23111 { ac_try='test -s "conftest.$ac_objext"'
23112 { (eval echo "$as_me:23112: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023113 (eval $ac_try) 2>&5
23114 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023115 echo "$as_me:23115: \$? = $ac_status" >&5
23116 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023117 ac_cv_type_ssize_t=yes
23118else
23119 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023120cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023121ac_cv_type_ssize_t=no
23122fi
micky3879b9f5e72025-07-08 18:04:53 -040023123rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010023124fi
micky3879b9f5e72025-07-08 18:04:53 -040023125echo "$as_me:23125: result: $ac_cv_type_ssize_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023126echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
micky3879b9f5e72025-07-08 18:04:53 -040023127if test "$ac_cv_type_ssize_t" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023128 :
23129else
23130
23131cat >>confdefs.h <<EOF
23132#define ssize_t int
23133EOF
23134
23135fi
23136
micky3879b9f5e72025-07-08 18:04:53 -040023137echo "$as_me:23137: checking for type sigaction_t" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023138echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23139if test "${cf_cv_type_sigaction+set}" = set; then
23140 echo $ECHO_N "(cached) $ECHO_C" >&6
23141else
23142
micky3879b9f5e72025-07-08 18:04:53 -040023143 cat >"conftest.$ac_ext" <<_ACEOF
23144#line 23144 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023145#include "confdefs.h"
23146
23147#include <signal.h>
23148int
micky3879b9f5e72025-07-08 18:04:53 -040023149main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023150{
micky3879b9f5e72025-07-08 18:04:53 -040023151sigaction_t x; (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023152 ;
23153 return 0;
23154}
23155_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023156rm -f "conftest.$ac_objext"
23157if { (eval echo "$as_me:23157: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023158 (eval $ac_compile) 2>&5
23159 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023160 echo "$as_me:23160: \$? = $ac_status" >&5
23161 (exit "$ac_status"); } &&
23162 { ac_try='test -s "conftest.$ac_objext"'
23163 { (eval echo "$as_me:23163: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023164 (eval $ac_try) 2>&5
23165 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023166 echo "$as_me:23166: \$? = $ac_status" >&5
23167 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023168 cf_cv_type_sigaction=yes
23169else
23170 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023171cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023172cf_cv_type_sigaction=no
23173fi
micky3879b9f5e72025-07-08 18:04:53 -040023174rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023175fi
23176
micky3879b9f5e72025-07-08 18:04:53 -040023177echo "$as_me:23177: result: $cf_cv_type_sigaction" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023178echo "${ECHO_T}$cf_cv_type_sigaction" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010023179test "$cf_cv_type_sigaction" = yes &&
23180cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023181#define HAVE_TYPE_SIGACTION 1
23182EOF
23183
micky3879b9f5e72025-07-08 18:04:53 -040023184echo "$as_me:23184: checking declaration of size-change" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023185echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23186if test "${cf_cv_sizechange+set}" = set; then
23187 echo $ECHO_N "(cached) $ECHO_C" >&6
23188else
23189
Steve Kondikae271bc2015-11-15 02:50:53 +010023190 cf_cv_sizechange=unknown
23191 cf_save_CPPFLAGS="$CPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023192
23193for cf_opts in "" "NEED_PTEM_H"
23194do
23195
Steve Kondikae271bc2015-11-15 02:50:53 +010023196 CPPFLAGS="$cf_save_CPPFLAGS"
micky3879b9f5e72025-07-08 18:04:53 -040023197 if test -n "$cf_opts"
23198 then
23199
23200 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23201 CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23202
23203 fi
23204 cat >"conftest.$ac_ext" <<_ACEOF
23205#line 23205 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023206#include "confdefs.h"
23207#include <sys/types.h>
23208#ifdef HAVE_TERMIOS_H
23209#include <termios.h>
23210#else
23211#ifdef HAVE_TERMIO_H
23212#include <termio.h>
23213#endif
23214#endif
micky3879b9f5e72025-07-08 18:04:53 -040023215
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023216#ifdef NEED_PTEM_H
23217/* This is a workaround for SCO: they neglected to define struct winsize in
micky3879b9f5e72025-07-08 18:04:53 -040023218 * termios.h -- it is only in termio.h and ptem.h
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023219 */
micky3879b9f5e72025-07-08 18:04:53 -040023220#include <sys/stream.h>
23221#include <sys/ptem.h>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023222#endif
micky3879b9f5e72025-07-08 18:04:53 -040023223
23224#ifdef HAVE_SYS_IOCTL_H
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023225#include <sys/ioctl.h>
23226#endif
23227
23228int
micky3879b9f5e72025-07-08 18:04:53 -040023229main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023230{
23231
23232#ifdef TIOCGSIZE
micky3879b9f5e72025-07-08 18:04:53 -040023233 struct ttysize win; /* SunOS 3.0... */
23234 int y = win.ts_lines = 2;
23235 int x = win.ts_cols = 1;
23236 (void)y;
23237 (void)x;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023238#else
23239#ifdef TIOCGWINSZ
micky3879b9f5e72025-07-08 18:04:53 -040023240 struct winsize win; /* everything else */
23241 int y = win.ws_row = 2;
23242 int x = win.ws_col = 1;
23243 (void)y;
23244 (void)x;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023245#else
23246 no TIOCGSIZE or TIOCGWINSZ
23247#endif /* TIOCGWINSZ */
23248#endif /* TIOCGSIZE */
23249
23250 ;
23251 return 0;
23252}
23253_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023254rm -f "conftest.$ac_objext"
23255if { (eval echo "$as_me:23255: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023256 (eval $ac_compile) 2>&5
23257 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023258 echo "$as_me:23258: \$? = $ac_status" >&5
23259 (exit "$ac_status"); } &&
23260 { ac_try='test -s "conftest.$ac_objext"'
23261 { (eval echo "$as_me:23261: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023262 (eval $ac_try) 2>&5
23263 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023264 echo "$as_me:23264: \$? = $ac_status" >&5
23265 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023266 cf_cv_sizechange=yes
23267else
23268 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023269cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023270cf_cv_sizechange=no
23271fi
micky3879b9f5e72025-07-08 18:04:53 -040023272rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023273
23274 CPPFLAGS="$cf_save_CPPFLAGS"
23275 if test "$cf_cv_sizechange" = yes ; then
23276 echo "size-change succeeded ($cf_opts)" >&5
23277 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23278 break
23279 fi
23280done
23281
23282fi
micky3879b9f5e72025-07-08 18:04:53 -040023283echo "$as_me:23283: result: $cf_cv_sizechange" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023284echo "${ECHO_T}$cf_cv_sizechange" >&6
23285if test "$cf_cv_sizechange" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023286
23287cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023288#define HAVE_SIZECHANGE 1
23289EOF
23290
micky3879b9f5e72025-07-08 18:04:53 -040023291 case "$cf_cv_sizechange" in
Steve Kondikae271bc2015-11-15 02:50:53 +010023292 (NEED*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023293 cat >>confdefs.h <<EOF
23294#define $cf_cv_sizechange 1
23295EOF
23296
23297 ;;
23298 esac
23299fi
23300
micky3879b9f5e72025-07-08 18:04:53 -040023301echo "$as_me:23301: checking for memmove" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023302echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23303if test "${ac_cv_func_memmove+set}" = set; then
23304 echo $ECHO_N "(cached) $ECHO_C" >&6
23305else
micky3879b9f5e72025-07-08 18:04:53 -040023306 cat >"conftest.$ac_ext" <<_ACEOF
23307#line 23307 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023308#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040023309#define memmove autoconf_temporary
23310#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23311#undef memmove
23312
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023313#ifdef __cplusplus
23314extern "C"
23315#endif
micky3879b9f5e72025-07-08 18:04:53 -040023316
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023317/* We use char because int might match the return type of a gcc2
23318 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040023319char memmove (void);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023320
23321int
micky3879b9f5e72025-07-08 18:04:53 -040023322main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023323{
micky3879b9f5e72025-07-08 18:04:53 -040023324
23325/* The GNU C library defines stubs for functions which it implements
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023326 to always fail with ENOSYS. Some functions are actually named
23327 something starting with __ and the normal name is an alias. */
23328#if defined (__stub_memmove) || defined (__stub___memmove)
micky3879b9f5e72025-07-08 18:04:53 -040023329#error found stub for memmove
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023330#endif
23331
micky3879b9f5e72025-07-08 18:04:53 -040023332 return memmove ();
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023333 ;
23334 return 0;
23335}
23336_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023337rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23338if { (eval echo "$as_me:23338: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023339 (eval $ac_link) 2>&5
23340 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023341 echo "$as_me:23341: \$? = $ac_status" >&5
23342 (exit "$ac_status"); } &&
23343 { ac_try='test -s "conftest$ac_exeext"'
23344 { (eval echo "$as_me:23344: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023345 (eval $ac_try) 2>&5
23346 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023347 echo "$as_me:23347: \$? = $ac_status" >&5
23348 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023349 ac_cv_func_memmove=yes
23350else
23351 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023352cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023353ac_cv_func_memmove=no
23354fi
micky3879b9f5e72025-07-08 18:04:53 -040023355rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023356fi
micky3879b9f5e72025-07-08 18:04:53 -040023357echo "$as_me:23357: result: $ac_cv_func_memmove" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023358echo "${ECHO_T}$ac_cv_func_memmove" >&6
micky3879b9f5e72025-07-08 18:04:53 -040023359if test "$ac_cv_func_memmove" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023360 :
23361else
23362
micky3879b9f5e72025-07-08 18:04:53 -040023363echo "$as_me:23363: checking for bcopy" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023364echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23365if test "${ac_cv_func_bcopy+set}" = set; then
23366 echo $ECHO_N "(cached) $ECHO_C" >&6
23367else
micky3879b9f5e72025-07-08 18:04:53 -040023368 cat >"conftest.$ac_ext" <<_ACEOF
23369#line 23369 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023370#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040023371#define bcopy autoconf_temporary
23372#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23373#undef bcopy
23374
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023375#ifdef __cplusplus
23376extern "C"
23377#endif
micky3879b9f5e72025-07-08 18:04:53 -040023378
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023379/* We use char because int might match the return type of a gcc2
23380 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040023381char bcopy (void);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023382
23383int
micky3879b9f5e72025-07-08 18:04:53 -040023384main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023385{
micky3879b9f5e72025-07-08 18:04:53 -040023386
23387/* The GNU C library defines stubs for functions which it implements
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023388 to always fail with ENOSYS. Some functions are actually named
23389 something starting with __ and the normal name is an alias. */
23390#if defined (__stub_bcopy) || defined (__stub___bcopy)
micky3879b9f5e72025-07-08 18:04:53 -040023391#error found stub for bcopy
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023392#endif
23393
micky3879b9f5e72025-07-08 18:04:53 -040023394 return bcopy ();
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023395 ;
23396 return 0;
23397}
23398_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023399rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23400if { (eval echo "$as_me:23400: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023401 (eval $ac_link) 2>&5
23402 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023403 echo "$as_me:23403: \$? = $ac_status" >&5
23404 (exit "$ac_status"); } &&
23405 { ac_try='test -s "conftest$ac_exeext"'
23406 { (eval echo "$as_me:23406: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023407 (eval $ac_try) 2>&5
23408 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023409 echo "$as_me:23409: \$? = $ac_status" >&5
23410 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023411 ac_cv_func_bcopy=yes
23412else
23413 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023414cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023415ac_cv_func_bcopy=no
23416fi
micky3879b9f5e72025-07-08 18:04:53 -040023417rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023418fi
micky3879b9f5e72025-07-08 18:04:53 -040023419echo "$as_me:23419: result: $ac_cv_func_bcopy" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023420echo "${ECHO_T}$ac_cv_func_bcopy" >&6
micky3879b9f5e72025-07-08 18:04:53 -040023421if test "$ac_cv_func_bcopy" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023422
micky3879b9f5e72025-07-08 18:04:53 -040023423 echo "$as_me:23423: checking if bcopy does overlapping moves" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023424echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23425if test "${cf_cv_good_bcopy+set}" = set; then
23426 echo $ECHO_N "(cached) $ECHO_C" >&6
23427else
23428
23429 if test "$cross_compiling" = yes; then
23430 cf_cv_good_bcopy=unknown
23431else
micky3879b9f5e72025-07-08 18:04:53 -040023432 cat >"conftest.$ac_ext" <<_ACEOF
23433#line 23433 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023434#include "confdefs.h"
23435
micky3879b9f5e72025-07-08 18:04:53 -040023436$ac_includes_default
23437
23438int main(void) {
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023439 static char data[] = "abcdefghijklmnopqrstuwwxyz";
23440 char temp[40];
23441 bcopy(data, temp, sizeof(data));
23442 bcopy(temp+10, temp, 15);
23443 bcopy(temp+5, temp+15, 10);
23444 ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23445}
23446
23447_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023448rm -f "conftest$ac_exeext"
23449if { (eval echo "$as_me:23449: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023450 (eval $ac_link) 2>&5
23451 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023452 echo "$as_me:23452: \$? = $ac_status" >&5
23453 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23454 { (eval echo "$as_me:23454: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023455 (eval $ac_try) 2>&5
23456 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023457 echo "$as_me:23457: \$? = $ac_status" >&5
23458 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023459 cf_cv_good_bcopy=yes
23460else
23461 echo "$as_me: program exited with status $ac_status" >&5
23462echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023463cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023464cf_cv_good_bcopy=no
23465fi
micky3879b9f5e72025-07-08 18:04:53 -040023466rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023467fi
23468
23469fi
micky3879b9f5e72025-07-08 18:04:53 -040023470echo "$as_me:23470: result: $cf_cv_good_bcopy" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023471echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23472
23473else
23474 cf_cv_good_bcopy=no
23475fi
23476
23477 if test "$cf_cv_good_bcopy" = yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023478
23479cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023480#define USE_OK_BCOPY 1
23481EOF
23482
23483 else
Steve Kondikae271bc2015-11-15 02:50:53 +010023484
23485cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023486#define USE_MY_MEMMOVE 1
23487EOF
23488
23489 fi
23490
23491fi
23492
micky3879b9f5e72025-07-08 18:04:53 -040023493tty >/dev/null 2>&1 || {
23494for ac_func in posix_openpt
23495do
23496as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23497echo "$as_me:23497: checking for $ac_func" >&5
23498echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23499if eval "test \"\${$as_ac_var+set}\" = set"; then
23500 echo $ECHO_N "(cached) $ECHO_C" >&6
23501else
23502 cat >"conftest.$ac_ext" <<_ACEOF
23503#line 23503 "configure"
23504#include "confdefs.h"
23505#define $ac_func autoconf_temporary
23506#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
23507#undef $ac_func
23508
23509#ifdef __cplusplus
23510extern "C"
23511#endif
23512
23513/* We use char because int might match the return type of a gcc2
23514 builtin and then its argument prototype would still apply. */
23515char $ac_func (void);
23516
23517int
23518main (void)
23519{
23520
23521/* The GNU C library defines stubs for functions which it implements
23522 to always fail with ENOSYS. Some functions are actually named
23523 something starting with __ and the normal name is an alias. */
23524#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23525#error found stub for $ac_func
23526#endif
23527
23528 return $ac_func ();
23529 ;
23530 return 0;
23531}
23532_ACEOF
23533rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23534if { (eval echo "$as_me:23534: \"$ac_link\"") >&5
23535 (eval $ac_link) 2>&5
23536 ac_status=$?
23537 echo "$as_me:23537: \$? = $ac_status" >&5
23538 (exit "$ac_status"); } &&
23539 { ac_try='test -s "conftest$ac_exeext"'
23540 { (eval echo "$as_me:23540: \"$ac_try\"") >&5
23541 (eval $ac_try) 2>&5
23542 ac_status=$?
23543 echo "$as_me:23543: \$? = $ac_status" >&5
23544 (exit "$ac_status"); }; }; then
23545 eval "$as_ac_var=yes"
23546else
23547 echo "$as_me: failed program was:" >&5
23548cat "conftest.$ac_ext" >&5
23549eval "$as_ac_var=no"
23550fi
23551rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23552fi
23553echo "$as_me:23553: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23554echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23555if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23556 cat >>confdefs.h <<EOF
23557#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23558EOF
23559
23560fi
23561done
23562 }
23563echo "$as_me:23563: checking if poll really works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023564echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23565if test "${cf_cv_working_poll+set}" = set; then
23566 echo $ECHO_N "(cached) $ECHO_C" >&6
23567else
23568
23569if test "$cross_compiling" = yes; then
23570 cf_cv_working_poll=unknown
23571else
micky3879b9f5e72025-07-08 18:04:53 -040023572 cat >"conftest.$ac_ext" <<_ACEOF
23573#line 23573 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023574#include "confdefs.h"
23575
micky3879b9f5e72025-07-08 18:04:53 -040023576$ac_includes_default
23577
Steve Kondikae271bc2015-11-15 02:50:53 +010023578#include <fcntl.h>
micky3879b9f5e72025-07-08 18:04:53 -040023579
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023580#ifdef HAVE_POLL_H
23581#include <poll.h>
23582#else
23583#include <sys/poll.h>
23584#endif
micky3879b9f5e72025-07-08 18:04:53 -040023585
23586int main(void) {
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023587 struct pollfd myfds;
23588 int ret;
23589
Steve Kondikae271bc2015-11-15 02:50:53 +010023590 /* check for Darwin bug with respect to "devices" */
23591 myfds.fd = open("/dev/null", 1); /* O_WRONLY */
23592 if (myfds.fd < 0)
23593 myfds.fd = 0;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023594 myfds.events = POLLIN;
Steve Kondikae271bc2015-11-15 02:50:53 +010023595 myfds.revents = 0;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023596
23597 ret = poll(&myfds, 1, 100);
Steve Kondikae271bc2015-11-15 02:50:53 +010023598
23599 if (ret < 0 || (myfds.revents & POLLNVAL)) {
23600 ret = -1;
23601 } else {
23602 int fd = 0;
23603 if (!isatty(fd)) {
23604 fd = open("/dev/tty", 2); /* O_RDWR */
23605 }
micky3879b9f5e72025-07-08 18:04:53 -040023606#ifdef HAVE_POSIX_OPENPT
23607 if (fd < 0) {
23608 fd = posix_openpt(O_RDWR);
23609 }
23610#endif
Steve Kondikae271bc2015-11-15 02:50:53 +010023611
23612 if (fd >= 0) {
23613 /* also check with standard input */
23614 myfds.fd = fd;
23615 myfds.events = POLLIN;
23616 myfds.revents = 0;
23617 ret = poll(&myfds, 1, 100);
23618 } else {
23619 ret = -1;
23620 }
23621 }
23622 ${cf_cv_main_return:-return}(ret < 0);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023623}
23624_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023625rm -f "conftest$ac_exeext"
23626if { (eval echo "$as_me:23626: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023627 (eval $ac_link) 2>&5
23628 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023629 echo "$as_me:23629: \$? = $ac_status" >&5
23630 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23631 { (eval echo "$as_me:23631: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023632 (eval $ac_try) 2>&5
23633 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023634 echo "$as_me:23634: \$? = $ac_status" >&5
23635 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023636 cf_cv_working_poll=yes
23637else
23638 echo "$as_me: program exited with status $ac_status" >&5
23639echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023640cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023641cf_cv_working_poll=no
23642fi
micky3879b9f5e72025-07-08 18:04:53 -040023643rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023644fi
23645fi
micky3879b9f5e72025-07-08 18:04:53 -040023646echo "$as_me:23646: result: $cf_cv_working_poll" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023647echo "${ECHO_T}$cf_cv_working_poll" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010023648test "$cf_cv_working_poll" = "yes" &&
23649cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053023650#define HAVE_WORKING_POLL 1
23651EOF
23652
micky3879b9f5e72025-07-08 18:04:53 -040023653echo "$as_me:23653: checking if MB_LEN_MAX is usable" >&5
23654echo $ECHO_N "checking if MB_LEN_MAX is usable... $ECHO_C" >&6
23655if test "${cf_cv_mb_len_max+set}" = set; then
23656 echo $ECHO_N "(cached) $ECHO_C" >&6
23657else
23658
23659cat >"conftest.$ac_ext" <<_ACEOF
23660#line 23660 "configure"
23661#include "confdefs.h"
23662
23663$ac_includes_default
23664#include <limits.h>
23665int
23666main (void)
23667{
23668
23669#if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6
23670 ${cf_cv_main_return:-return}(0);
23671#else
23672#error MB_LEN_MAX is not usable
23673#endif
23674
23675 ;
23676 return 0;
23677}
23678_ACEOF
23679rm -f "conftest.$ac_objext"
23680if { (eval echo "$as_me:23680: \"$ac_compile\"") >&5
23681 (eval $ac_compile) 2>&5
23682 ac_status=$?
23683 echo "$as_me:23683: \$? = $ac_status" >&5
23684 (exit "$ac_status"); } &&
23685 { ac_try='test -s "conftest.$ac_objext"'
23686 { (eval echo "$as_me:23686: \"$ac_try\"") >&5
23687 (eval $ac_try) 2>&5
23688 ac_status=$?
23689 echo "$as_me:23689: \$? = $ac_status" >&5
23690 (exit "$ac_status"); }; }; then
23691 cf_cv_mb_len_max=yes
23692else
23693 echo "$as_me: failed program was:" >&5
23694cat "conftest.$ac_ext" >&5
23695cf_cv_mb_len_max=no
23696fi
23697rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23698fi
23699echo "$as_me:23699: result: $cf_cv_mb_len_max" >&5
23700echo "${ECHO_T}$cf_cv_mb_len_max" >&6
23701if test "$cf_cv_mb_len_max" = yes
23702then
23703
23704cat >>confdefs.h <<\EOF
23705#define HAVE_CONSISTENT_MB_LEN_MAX 1
23706EOF
23707
23708else
23709 { echo "$as_me:23709: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&5
23710echo "$as_me: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&2;}
23711fi
23712
23713echo "$as_me:23713: checking for va_copy" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023714echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23715if test "${cf_cv_have_va_copy+set}" = set; then
23716 echo $ECHO_N "(cached) $ECHO_C" >&6
23717else
23718
micky3879b9f5e72025-07-08 18:04:53 -040023719cat >"conftest.$ac_ext" <<_ACEOF
23720#line 23720 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010023721#include "confdefs.h"
23722
23723#include <stdarg.h>
23724
23725int
micky3879b9f5e72025-07-08 18:04:53 -040023726main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010023727{
23728
23729 static va_list dst;
23730 static va_list src;
23731 va_copy(dst, src)
23732 ;
23733 return 0;
23734}
23735_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023736rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23737if { (eval echo "$as_me:23737: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023738 (eval $ac_link) 2>&5
23739 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023740 echo "$as_me:23740: \$? = $ac_status" >&5
23741 (exit "$ac_status"); } &&
23742 { ac_try='test -s "conftest$ac_exeext"'
23743 { (eval echo "$as_me:23743: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023744 (eval $ac_try) 2>&5
23745 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023746 echo "$as_me:23746: \$? = $ac_status" >&5
23747 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023748 cf_cv_have_va_copy=yes
23749else
23750 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023751cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023752cf_cv_have_va_copy=no
23753fi
micky3879b9f5e72025-07-08 18:04:53 -040023754rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010023755fi
micky3879b9f5e72025-07-08 18:04:53 -040023756echo "$as_me:23756: result: $cf_cv_have_va_copy" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023757echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23758
micky3879b9f5e72025-07-08 18:04:53 -040023759if test "$cf_cv_have_va_copy" = yes;
23760then
23761
Steve Kondikae271bc2015-11-15 02:50:53 +010023762cat >>confdefs.h <<\EOF
23763#define HAVE_VA_COPY 1
23764EOF
23765
micky3879b9f5e72025-07-08 18:04:53 -040023766else # !cf_cv_have_va_copy
23767
23768echo "$as_me:23768: checking for __va_copy" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023769echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23770if test "${cf_cv_have___va_copy+set}" = set; then
23771 echo $ECHO_N "(cached) $ECHO_C" >&6
23772else
23773
micky3879b9f5e72025-07-08 18:04:53 -040023774cat >"conftest.$ac_ext" <<_ACEOF
23775#line 23775 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010023776#include "confdefs.h"
23777
23778#include <stdarg.h>
23779
23780int
micky3879b9f5e72025-07-08 18:04:53 -040023781main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010023782{
23783
23784 static va_list dst;
23785 static va_list src;
23786 __va_copy(dst, src)
23787 ;
23788 return 0;
23789}
23790_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040023791rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23792if { (eval echo "$as_me:23792: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023793 (eval $ac_link) 2>&5
23794 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023795 echo "$as_me:23795: \$? = $ac_status" >&5
23796 (exit "$ac_status"); } &&
23797 { ac_try='test -s "conftest$ac_exeext"'
23798 { (eval echo "$as_me:23798: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023799 (eval $ac_try) 2>&5
23800 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040023801 echo "$as_me:23801: \$? = $ac_status" >&5
23802 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010023803 cf_cv_have___va_copy=yes
23804else
23805 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040023806cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023807cf_cv_have___va_copy=no
23808fi
micky3879b9f5e72025-07-08 18:04:53 -040023809rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010023810fi
micky3879b9f5e72025-07-08 18:04:53 -040023811echo "$as_me:23811: result: $cf_cv_have___va_copy" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023812echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23813
micky3879b9f5e72025-07-08 18:04:53 -040023814if test "$cf_cv_have___va_copy" = yes
23815then
23816
Steve Kondikae271bc2015-11-15 02:50:53 +010023817cat >>confdefs.h <<\EOF
23818#define HAVE___VA_COPY 1
23819EOF
23820
micky3879b9f5e72025-07-08 18:04:53 -040023821else # !cf_cv_have___va_copy
23822
23823echo "$as_me:23823: checking for __builtin_va_copy" >&5
23824echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23825if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23826 echo $ECHO_N "(cached) $ECHO_C" >&6
23827else
23828
23829cat >"conftest.$ac_ext" <<_ACEOF
23830#line 23830 "configure"
23831#include "confdefs.h"
23832
23833#include <stdarg.h>
23834
23835int
23836main (void)
23837{
23838
23839 static va_list dst;
23840 static va_list src;
23841 __builtin_va_copy(dst, src)
23842 ;
23843 return 0;
23844}
23845_ACEOF
23846rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23847if { (eval echo "$as_me:23847: \"$ac_link\"") >&5
23848 (eval $ac_link) 2>&5
23849 ac_status=$?
23850 echo "$as_me:23850: \$? = $ac_status" >&5
23851 (exit "$ac_status"); } &&
23852 { ac_try='test -s "conftest$ac_exeext"'
23853 { (eval echo "$as_me:23853: \"$ac_try\"") >&5
23854 (eval $ac_try) 2>&5
23855 ac_status=$?
23856 echo "$as_me:23856: \$? = $ac_status" >&5
23857 (exit "$ac_status"); }; }; then
23858 cf_cv_have___builtin_va_copy=yes
23859else
23860 echo "$as_me: failed program was:" >&5
23861cat "conftest.$ac_ext" >&5
23862cf_cv_have___builtin_va_copy=no
23863fi
23864rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23865fi
23866echo "$as_me:23866: result: $cf_cv_have___builtin_va_copy" >&5
23867echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23868
23869test "$cf_cv_have___builtin_va_copy" = yes &&
23870
23871cat >>confdefs.h <<\EOF
23872#define HAVE___BUILTIN_VA_COPY 1
23873EOF
23874
23875fi # cf_cv_have___va_copy
23876
23877fi # cf_cv_have_va_copy
23878
23879case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23880(*yes*)
23881 ;;
23882
23883(*)
23884 echo "$as_me:23884: checking if we can simply copy va_list" >&5
23885echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23886if test "${cf_cv_pointer_va_list+set}" = set; then
23887 echo $ECHO_N "(cached) $ECHO_C" >&6
23888else
23889
23890cat >"conftest.$ac_ext" <<_ACEOF
23891#line 23891 "configure"
23892#include "confdefs.h"
23893
23894#include <stdarg.h>
23895
23896int
23897main (void)
23898{
23899
23900 va_list dst;
23901 va_list src;
23902 dst = src
23903 ;
23904 return 0;
23905}
23906_ACEOF
23907rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23908if { (eval echo "$as_me:23908: \"$ac_link\"") >&5
23909 (eval $ac_link) 2>&5
23910 ac_status=$?
23911 echo "$as_me:23911: \$? = $ac_status" >&5
23912 (exit "$ac_status"); } &&
23913 { ac_try='test -s "conftest$ac_exeext"'
23914 { (eval echo "$as_me:23914: \"$ac_try\"") >&5
23915 (eval $ac_try) 2>&5
23916 ac_status=$?
23917 echo "$as_me:23917: \$? = $ac_status" >&5
23918 (exit "$ac_status"); }; }; then
23919 cf_cv_pointer_va_list=yes
23920else
23921 echo "$as_me: failed program was:" >&5
23922cat "conftest.$ac_ext" >&5
23923cf_cv_pointer_va_list=no
23924fi
23925rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23926fi
23927echo "$as_me:23927: result: $cf_cv_pointer_va_list" >&5
23928echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23929
23930 if test "$cf_cv_pointer_va_list" = no
23931 then
23932 echo "$as_me:23932: checking if we can copy va_list indirectly" >&5
23933echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23934if test "${cf_cv_array_va_list+set}" = set; then
23935 echo $ECHO_N "(cached) $ECHO_C" >&6
23936else
23937
23938cat >"conftest.$ac_ext" <<_ACEOF
23939#line 23939 "configure"
23940#include "confdefs.h"
23941
23942#include <stdarg.h>
23943
23944int
23945main (void)
23946{
23947
23948 va_list dst;
23949 va_list src;
23950 *dst = *src
23951 ;
23952 return 0;
23953}
23954_ACEOF
23955rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23956if { (eval echo "$as_me:23956: \"$ac_link\"") >&5
23957 (eval $ac_link) 2>&5
23958 ac_status=$?
23959 echo "$as_me:23959: \$? = $ac_status" >&5
23960 (exit "$ac_status"); } &&
23961 { ac_try='test -s "conftest$ac_exeext"'
23962 { (eval echo "$as_me:23962: \"$ac_try\"") >&5
23963 (eval $ac_try) 2>&5
23964 ac_status=$?
23965 echo "$as_me:23965: \$? = $ac_status" >&5
23966 (exit "$ac_status"); }; }; then
23967 cf_cv_array_va_list=yes
23968else
23969 echo "$as_me: failed program was:" >&5
23970cat "conftest.$ac_ext" >&5
23971cf_cv_array_va_list=no
23972fi
23973rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23974fi
23975echo "$as_me:23975: result: $cf_cv_array_va_list" >&5
23976echo "${ECHO_T}$cf_cv_array_va_list" >&6
23977 test "$cf_cv_array_va_list" = yes &&
23978cat >>confdefs.h <<\EOF
23979#define ARRAY_VA_LIST 1
23980EOF
23981
23982 fi
23983 ;;
23984esac
23985
23986echo "$as_me:23986: checking for pid_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010023987echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23988if test "${ac_cv_type_pid_t+set}" = set; then
23989 echo $ECHO_N "(cached) $ECHO_C" >&6
23990else
micky3879b9f5e72025-07-08 18:04:53 -040023991 cat >"conftest.$ac_ext" <<_ACEOF
23992#line 23992 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010023993#include "confdefs.h"
23994$ac_includes_default
23995int
micky3879b9f5e72025-07-08 18:04:53 -040023996main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010023997{
23998if ((pid_t *) 0)
23999 return 0;
24000if (sizeof (pid_t))
24001 return 0;
24002 ;
24003 return 0;
24004}
24005_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024006rm -f "conftest.$ac_objext"
24007if { (eval echo "$as_me:24007: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024008 (eval $ac_compile) 2>&5
24009 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024010 echo "$as_me:24010: \$? = $ac_status" >&5
24011 (exit "$ac_status"); } &&
24012 { ac_try='test -s "conftest.$ac_objext"'
24013 { (eval echo "$as_me:24013: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024014 (eval $ac_try) 2>&5
24015 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024016 echo "$as_me:24016: \$? = $ac_status" >&5
24017 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024018 ac_cv_type_pid_t=yes
24019else
24020 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024021cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024022ac_cv_type_pid_t=no
24023fi
micky3879b9f5e72025-07-08 18:04:53 -040024024rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010024025fi
micky3879b9f5e72025-07-08 18:04:53 -040024026echo "$as_me:24026: result: $ac_cv_type_pid_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024027echo "${ECHO_T}$ac_cv_type_pid_t" >&6
micky3879b9f5e72025-07-08 18:04:53 -040024028if test "$ac_cv_type_pid_t" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024029 :
24030else
24031
24032cat >>confdefs.h <<EOF
24033#define pid_t int
24034EOF
24035
24036fi
24037
24038for ac_header in unistd.h vfork.h
24039do
24040as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040024041echo "$as_me:24041: checking for $ac_header" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024042echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24043if eval "test \"\${$as_ac_Header+set}\" = set"; then
24044 echo $ECHO_N "(cached) $ECHO_C" >&6
24045else
micky3879b9f5e72025-07-08 18:04:53 -040024046 cat >"conftest.$ac_ext" <<_ACEOF
24047#line 24047 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010024048#include "confdefs.h"
24049#include <$ac_header>
24050_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024051if { (eval echo "$as_me:24051: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24052 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +010024053 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024054 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +010024055 rm -f conftest.er1
24056 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040024057 echo "$as_me:24057: \$? = $ac_status" >&5
24058 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024059 if test -s conftest.err; then
24060 ac_cpp_err=$ac_c_preproc_warn_flag
24061 else
24062 ac_cpp_err=
24063 fi
24064else
24065 ac_cpp_err=yes
24066fi
24067if test -z "$ac_cpp_err"; then
24068 eval "$as_ac_Header=yes"
24069else
24070 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024071 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024072 eval "$as_ac_Header=no"
24073fi
micky3879b9f5e72025-07-08 18:04:53 -040024074rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010024075fi
micky3879b9f5e72025-07-08 18:04:53 -040024076echo "$as_me:24076: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24077echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24078if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024079 cat >>confdefs.h <<EOF
24080#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24081EOF
24082
24083fi
24084done
24085
24086for ac_func in fork vfork
24087do
24088as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040024089echo "$as_me:24089: checking for $ac_func" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024090echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24091if eval "test \"\${$as_ac_var+set}\" = set"; then
24092 echo $ECHO_N "(cached) $ECHO_C" >&6
24093else
micky3879b9f5e72025-07-08 18:04:53 -040024094 cat >"conftest.$ac_ext" <<_ACEOF
24095#line 24095 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010024096#include "confdefs.h"
micky3879b9f5e72025-07-08 18:04:53 -040024097#define $ac_func autoconf_temporary
24098#include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
24099#undef $ac_func
24100
Steve Kondikae271bc2015-11-15 02:50:53 +010024101#ifdef __cplusplus
24102extern "C"
24103#endif
micky3879b9f5e72025-07-08 18:04:53 -040024104
Steve Kondikae271bc2015-11-15 02:50:53 +010024105/* We use char because int might match the return type of a gcc2
24106 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040024107char $ac_func (void);
Steve Kondikae271bc2015-11-15 02:50:53 +010024108
24109int
micky3879b9f5e72025-07-08 18:04:53 -040024110main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010024111{
micky3879b9f5e72025-07-08 18:04:53 -040024112
24113/* The GNU C library defines stubs for functions which it implements
Steve Kondikae271bc2015-11-15 02:50:53 +010024114 to always fail with ENOSYS. Some functions are actually named
24115 something starting with __ and the normal name is an alias. */
24116#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
micky3879b9f5e72025-07-08 18:04:53 -040024117#error found stub for $ac_func
Steve Kondikae271bc2015-11-15 02:50:53 +010024118#endif
24119
micky3879b9f5e72025-07-08 18:04:53 -040024120 return $ac_func ();
Steve Kondikae271bc2015-11-15 02:50:53 +010024121 ;
24122 return 0;
24123}
24124_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024125rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24126if { (eval echo "$as_me:24126: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024127 (eval $ac_link) 2>&5
24128 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024129 echo "$as_me:24129: \$? = $ac_status" >&5
24130 (exit "$ac_status"); } &&
24131 { ac_try='test -s "conftest$ac_exeext"'
24132 { (eval echo "$as_me:24132: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024133 (eval $ac_try) 2>&5
24134 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024135 echo "$as_me:24135: \$? = $ac_status" >&5
24136 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024137 eval "$as_ac_var=yes"
24138else
24139 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024140cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024141eval "$as_ac_var=no"
24142fi
micky3879b9f5e72025-07-08 18:04:53 -040024143rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010024144fi
micky3879b9f5e72025-07-08 18:04:53 -040024145echo "$as_me:24145: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24146echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24147if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024148 cat >>confdefs.h <<EOF
24149#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24150EOF
24151
24152fi
24153done
24154
24155ac_cv_func_fork_works=$ac_cv_func_fork
24156if test "x$ac_cv_func_fork" = xyes; then
micky3879b9f5e72025-07-08 18:04:53 -040024157 echo "$as_me:24157: checking for working fork" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024158echo $ECHO_N "checking for working fork... $ECHO_C" >&6
24159if test "${ac_cv_func_fork_works+set}" = set; then
24160 echo $ECHO_N "(cached) $ECHO_C" >&6
24161else
24162 if test "$cross_compiling" = yes; then
24163 ac_cv_func_fork_works=cross
24164else
micky3879b9f5e72025-07-08 18:04:53 -040024165 cat >"conftest.$ac_ext" <<_ACEOF
Steve Kondikae271bc2015-11-15 02:50:53 +010024166/* By Rüdiger Kuhlmann. */
24167 #include <sys/types.h>
24168 #if HAVE_UNISTD_H
24169 # include <unistd.h>
24170 #endif
24171 /* Some systems only have a dummy stub for fork() */
micky3879b9f5e72025-07-08 18:04:53 -040024172 int main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010024173 {
24174 if (fork() < 0)
24175 $ac_main_return (1);
24176 $ac_main_return (0);
24177 }
24178_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024179rm -f "conftest$ac_exeext"
24180if { (eval echo "$as_me:24180: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024181 (eval $ac_link) 2>&5
24182 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024183 echo "$as_me:24183: \$? = $ac_status" >&5
24184 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24185 { (eval echo "$as_me:24185: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024186 (eval $ac_try) 2>&5
24187 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024188 echo "$as_me:24188: \$? = $ac_status" >&5
24189 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024190 ac_cv_func_fork_works=yes
24191else
24192 echo "$as_me: program exited with status $ac_status" >&5
24193echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024194cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024195ac_cv_func_fork_works=no
24196fi
micky3879b9f5e72025-07-08 18:04:53 -040024197rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010024198fi
24199fi
micky3879b9f5e72025-07-08 18:04:53 -040024200echo "$as_me:24200: result: $ac_cv_func_fork_works" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024201echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24202
24203fi
24204if test "x$ac_cv_func_fork_works" = xcross; then
24205 case $host in
24206 *-*-amigaos* | *-*-msdosdjgpp*)
24207 # Override, as these systems have only a dummy fork() stub
24208 ac_cv_func_fork_works=no
24209 ;;
24210 *)
24211 ac_cv_func_fork_works=yes
24212 ;;
24213 esac
micky3879b9f5e72025-07-08 18:04:53 -040024214 { echo "$as_me:24214: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024215echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24216fi
24217ac_cv_func_vfork_works=$ac_cv_func_vfork
24218if test "x$ac_cv_func_vfork" = xyes; then
micky3879b9f5e72025-07-08 18:04:53 -040024219 echo "$as_me:24219: checking for working vfork" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024220echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24221if test "${ac_cv_func_vfork_works+set}" = set; then
24222 echo $ECHO_N "(cached) $ECHO_C" >&6
24223else
24224 if test "$cross_compiling" = yes; then
24225 ac_cv_func_vfork_works=cross
24226else
micky3879b9f5e72025-07-08 18:04:53 -040024227 cat >"conftest.$ac_ext" <<_ACEOF
24228#line 24228 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010024229#include "confdefs.h"
24230/* Thanks to Paul Eggert for this test. */
24231#include <stdio.h>
24232#include <sys/types.h>
24233#include <sys/stat.h>
24234#if HAVE_UNISTD_H
24235# include <unistd.h>
24236#endif
24237#if HAVE_VFORK_H
24238# include <vfork.h>
24239#endif
24240/* On some sparc systems, changes by the child to local and incoming
24241 argument registers are propagated back to the parent. The compiler
24242 is told about this with #include <vfork.h>, but some compilers
24243 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
24244 static variable whose address is put into a register that is
24245 clobbered by the vfork. */
24246static
Steve Kondikae271bc2015-11-15 02:50:53 +010024247sparc_address_test (int arg)
Steve Kondikae271bc2015-11-15 02:50:53 +010024248{
24249 static pid_t child;
24250 if (!child) {
24251 child = vfork ();
24252 if (child < 0) {
24253 perror ("vfork");
24254 _exit(2);
24255 }
24256 if (!child) {
24257 arg = getpid();
24258 write(-1, "", 0);
24259 _exit (arg);
24260 }
24261 }
24262}
24263
24264int
micky3879b9f5e72025-07-08 18:04:53 -040024265main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010024266{
24267 pid_t parent = getpid ();
24268 pid_t child;
24269
24270 sparc_address_test ();
24271
24272 child = vfork ();
24273
24274 if (child == 0) {
24275 /* Here is another test for sparc vfork register problems. This
24276 test uses lots of local variables, at least as many local
24277 variables as main has allocated so far including compiler
24278 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
24279 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
24280 reuse the register of parent for one of the local variables,
24281 since it will think that parent can't possibly be used any more
24282 in this routine. Assigning to the local variable will thus
24283 munge parent in the parent process. */
24284 pid_t
24285 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24286 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24287 /* Convince the compiler that p..p7 are live; otherwise, it might
24288 use the same hardware register for all 8 local variables. */
24289 if (p != p1 || p != p2 || p != p3 || p != p4
micky3879b9f5e72025-07-08 18:04:53 -040024290 || p != p5 || p != p6 || p != p7)
Steve Kondikae271bc2015-11-15 02:50:53 +010024291 _exit(1);
24292
24293 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24294 from child file descriptors. If the child closes a descriptor
24295 before it execs or exits, this munges the parent's descriptor
24296 as well. Test for this by closing stdout in the child. */
24297 _exit(close(fileno(stdout)) != 0);
24298 } else {
24299 int status;
24300 struct stat st;
24301
24302 while (wait(&status) != child)
24303 ;
24304 $ac_main_return(
micky3879b9f5e72025-07-08 18:04:53 -040024305 /* Was there some problem with vforking? */
24306 child < 0
Steve Kondikae271bc2015-11-15 02:50:53 +010024307
micky3879b9f5e72025-07-08 18:04:53 -040024308 /* Did the child fail? (This shouldn't happen.) */
24309 || status
Steve Kondikae271bc2015-11-15 02:50:53 +010024310
micky3879b9f5e72025-07-08 18:04:53 -040024311 /* Did the vfork/compiler bug occur? */
24312 || parent != getpid()
Steve Kondikae271bc2015-11-15 02:50:53 +010024313
micky3879b9f5e72025-07-08 18:04:53 -040024314 /* Did the file descriptor bug occur? */
24315 || fstat(fileno(stdout), &st) != 0
24316 );
Steve Kondikae271bc2015-11-15 02:50:53 +010024317 }
24318}
24319_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024320rm -f "conftest$ac_exeext"
24321if { (eval echo "$as_me:24321: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024322 (eval $ac_link) 2>&5
24323 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024324 echo "$as_me:24324: \$? = $ac_status" >&5
24325 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24326 { (eval echo "$as_me:24326: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024327 (eval $ac_try) 2>&5
24328 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024329 echo "$as_me:24329: \$? = $ac_status" >&5
24330 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024331 ac_cv_func_vfork_works=yes
24332else
24333 echo "$as_me: program exited with status $ac_status" >&5
24334echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024335cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024336ac_cv_func_vfork_works=no
24337fi
micky3879b9f5e72025-07-08 18:04:53 -040024338rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010024339fi
24340fi
micky3879b9f5e72025-07-08 18:04:53 -040024341echo "$as_me:24341: result: $ac_cv_func_vfork_works" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024342echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24343
24344fi;
24345if test "x$ac_cv_func_fork_works" = xcross; then
24346 ac_cv_func_vfork_works=ac_cv_func_vfork
micky3879b9f5e72025-07-08 18:04:53 -040024347 { echo "$as_me:24347: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024348echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24349fi
24350
24351if test "x$ac_cv_func_vfork_works" = xyes; then
24352
24353cat >>confdefs.h <<\EOF
24354#define HAVE_WORKING_VFORK 1
24355EOF
24356
24357else
24358
24359cat >>confdefs.h <<\EOF
24360#define vfork fork
24361EOF
24362
24363fi
24364if test "x$ac_cv_func_fork_works" = xyes; then
24365
24366cat >>confdefs.h <<\EOF
24367#define HAVE_WORKING_FORK 1
24368EOF
24369
24370fi
24371
micky3879b9f5e72025-07-08 18:04:53 -040024372echo "$as_me:24372: checking if fopen accepts explicit binary mode" >&5
24373echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24374if test "${cf_cv_fopen_bin_r+set}" = set; then
24375 echo $ECHO_N "(cached) $ECHO_C" >&6
24376else
24377
24378 if test "$cross_compiling" = yes; then
24379 cf_cv_fopen_bin_r=unknown
24380else
24381 cat >"conftest.$ac_ext" <<_ACEOF
24382#line 24382 "configure"
24383#include "confdefs.h"
24384
24385$ac_includes_default
24386
24387int main(void)
24388{
24389 FILE *fp = fopen("conftest.tmp", "wb");
24390 int rc = 0;
24391 if (fp != 0) {
24392 int p, q;
24393 for (p = 0; p < 256; ++p) {
24394 fputc(p, fp);
24395 }
24396 fclose(fp);
24397 fp = fopen("conftest.tmp", "rb");
24398 if (fp != 0) {
24399 for (p = 0; p < 256; ++p) {
24400 q = fgetc(fp);
24401 if (q != p) {
24402 rc = 1;
24403 break;
24404 }
24405 }
24406 } else {
24407 rc = 1;
24408 }
24409 } else {
24410 rc = 1;
24411 }
24412 ${cf_cv_main_return:-return} (rc);
24413}
24414
24415_ACEOF
24416rm -f "conftest$ac_exeext"
24417if { (eval echo "$as_me:24417: \"$ac_link\"") >&5
24418 (eval $ac_link) 2>&5
24419 ac_status=$?
24420 echo "$as_me:24420: \$? = $ac_status" >&5
24421 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24422 { (eval echo "$as_me:24422: \"$ac_try\"") >&5
24423 (eval $ac_try) 2>&5
24424 ac_status=$?
24425 echo "$as_me:24425: \$? = $ac_status" >&5
24426 (exit "$ac_status"); }; }; then
24427 cf_cv_fopen_bin_r=yes
24428else
24429 echo "$as_me: program exited with status $ac_status" >&5
24430echo "$as_me: failed program was:" >&5
24431cat "conftest.$ac_ext" >&5
24432cf_cv_fopen_bin_r=no
24433fi
24434rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24435fi
24436
24437fi
24438echo "$as_me:24438: result: $cf_cv_fopen_bin_r" >&5
24439echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24440test "x$cf_cv_fopen_bin_r" != xno &&
24441cat >>confdefs.h <<\EOF
24442#define USE_FOPEN_BIN_R 1
24443EOF
24444
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024445# special check for test/ditto.c
24446
micky3879b9f5e72025-07-08 18:04:53 -040024447echo "$as_me:24447: checking for openpty in -lutil" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024448echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24449if test "${ac_cv_lib_util_openpty+set}" = set; then
24450 echo $ECHO_N "(cached) $ECHO_C" >&6
24451else
24452 ac_check_lib_save_LIBS=$LIBS
24453LIBS="-lutil $LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040024454cat >"conftest.$ac_ext" <<_ACEOF
24455#line 24455 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024456#include "confdefs.h"
24457
24458/* Override any gcc2 internal prototype to avoid an error. */
24459#ifdef __cplusplus
24460extern "C"
24461#endif
24462/* We use char because int might match the return type of a gcc2
24463 builtin and then its argument prototype would still apply. */
micky3879b9f5e72025-07-08 18:04:53 -040024464char openpty (void);
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024465int
micky3879b9f5e72025-07-08 18:04:53 -040024466main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024467{
24468openpty ();
24469 ;
24470 return 0;
24471}
24472_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024473rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24474if { (eval echo "$as_me:24474: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024475 (eval $ac_link) 2>&5
24476 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024477 echo "$as_me:24477: \$? = $ac_status" >&5
24478 (exit "$ac_status"); } &&
24479 { ac_try='test -s "conftest$ac_exeext"'
24480 { (eval echo "$as_me:24480: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024481 (eval $ac_try) 2>&5
24482 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024483 echo "$as_me:24483: \$? = $ac_status" >&5
24484 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024485 ac_cv_lib_util_openpty=yes
24486else
24487 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024488cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024489ac_cv_lib_util_openpty=no
24490fi
micky3879b9f5e72025-07-08 18:04:53 -040024491rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024492LIBS=$ac_check_lib_save_LIBS
24493fi
micky3879b9f5e72025-07-08 18:04:53 -040024494echo "$as_me:24494: result: $ac_cv_lib_util_openpty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024495echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
micky3879b9f5e72025-07-08 18:04:53 -040024496if test "$ac_cv_lib_util_openpty" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024497 cf_cv_lib_util=yes
24498else
24499 cf_cv_lib_util=no
24500fi
24501
micky3879b9f5e72025-07-08 18:04:53 -040024502echo "$as_me:24502: checking for openpty header" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024503echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24504if test "${cf_cv_func_openpty+set}" = set; then
24505 echo $ECHO_N "(cached) $ECHO_C" >&6
24506else
24507
Steve Kondikae271bc2015-11-15 02:50:53 +010024508 cf_save_LIBS="$LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040024509 test "$cf_cv_lib_util" = yes && {
24510cf_add_libs="$LIBS"
24511# reverse order
24512cf_add_0lib=
24513for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24514# filter duplicates
24515for cf_add_1lib in $cf_add_0lib; do
24516 for cf_add_2lib in $cf_add_libs; do
24517 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024518 cf_add_1lib=
24519 break
24520 fi
24521 done
micky3879b9f5e72025-07-08 18:04:53 -040024522 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010024523done
24524LIBS="$cf_add_libs"
micky3879b9f5e72025-07-08 18:04:53 -040024525 }
Steve Kondikae271bc2015-11-15 02:50:53 +010024526 for cf_header in pty.h libutil.h util.h
24527 do
micky3879b9f5e72025-07-08 18:04:53 -040024528 cat >"conftest.$ac_ext" <<_ACEOF
24529#line 24529 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024530#include "confdefs.h"
24531
24532#include <$cf_header>
24533
24534int
micky3879b9f5e72025-07-08 18:04:53 -040024535main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024536{
24537
Steve Kondikae271bc2015-11-15 02:50:53 +010024538 int x = openpty((int *)0, (int *)0, (char *)0,
24539 (struct termios *)0, (struct winsize *)0);
micky3879b9f5e72025-07-08 18:04:53 -040024540 (void)x;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024541
24542 ;
24543 return 0;
24544}
24545_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024546rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24547if { (eval echo "$as_me:24547: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024548 (eval $ac_link) 2>&5
24549 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024550 echo "$as_me:24550: \$? = $ac_status" >&5
24551 (exit "$ac_status"); } &&
24552 { ac_try='test -s "conftest$ac_exeext"'
24553 { (eval echo "$as_me:24553: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024554 (eval $ac_try) 2>&5
24555 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024556 echo "$as_me:24556: \$? = $ac_status" >&5
24557 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024558
Steve Kondikae271bc2015-11-15 02:50:53 +010024559 cf_cv_func_openpty=$cf_header
24560 break
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024561
24562else
24563 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024564cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024565
Steve Kondikae271bc2015-11-15 02:50:53 +010024566 cf_cv_func_openpty=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024567
24568fi
micky3879b9f5e72025-07-08 18:04:53 -040024569rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010024570 done
24571 LIBS="$cf_save_LIBS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024572
24573fi
micky3879b9f5e72025-07-08 18:04:53 -040024574echo "$as_me:24574: result: $cf_cv_func_openpty" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024575echo "${ECHO_T}$cf_cv_func_openpty" >&6
24576
24577if test "$cf_cv_func_openpty" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024578
24579cat >>confdefs.h <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024580#define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24581EOF
24582
Steve Kondikae271bc2015-11-15 02:50:53 +010024583cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024584#define USE_XTERM_PTY 1
24585EOF
24586
Steve Kondikae271bc2015-11-15 02:50:53 +010024587 if test "x$cf_cv_lib_util" = xyes ; then
24588
micky3879b9f5e72025-07-08 18:04:53 -040024589cf_add_libs="$TEST_LIBS"
24590# reverse order
24591cf_add_0lib=
24592for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24593# filter duplicates
24594for cf_add_1lib in $cf_add_0lib; do
24595 for cf_add_2lib in $cf_add_libs; do
24596 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024597 cf_add_1lib=
24598 break
24599 fi
24600 done
micky3879b9f5e72025-07-08 18:04:53 -040024601 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010024602done
24603TEST_LIBS="$cf_add_libs"
24604
24605 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024606fi
24607
24608if test "$with_hashed_db" != no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024609
24610cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024611#define USE_HASHED_DB 1
24612EOF
24613
Steve Kondikae271bc2015-11-15 02:50:53 +010024614case $with_hashed_db in
24615(yes|*able*)
24616 ;;
24617(*)
24618 if test -d "$with_hashed_db" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024619
24620if test -n "$with_hashed_db/include" ; then
24621 for cf_add_incdir in $with_hashed_db/include
24622 do
micky3879b9f5e72025-07-08 18:04:53 -040024623 while test "$cf_add_incdir" != /usr/include
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024624 do
micky3879b9f5e72025-07-08 18:04:53 -040024625 if test -d "$cf_add_incdir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024626 then
24627 cf_have_incdir=no
24628 if test -n "$CFLAGS$CPPFLAGS" ; then
24629 # a loop is needed to ensure we can add subdirs of existing dirs
24630 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24631 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24632 cf_have_incdir=yes; break
24633 fi
24634 done
24635 fi
24636
24637 if test "$cf_have_incdir" = no ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024638 if test "$cf_add_incdir" = /usr/local/include ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024639 if test "$GCC" = yes
24640 then
24641 cf_save_CPPFLAGS=$CPPFLAGS
micky3879b9f5e72025-07-08 18:04:53 -040024642
24643 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24644 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24645
24646 cat >"conftest.$ac_ext" <<_ACEOF
24647#line 24647 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024648#include "confdefs.h"
24649#include <stdio.h>
24650int
micky3879b9f5e72025-07-08 18:04:53 -040024651main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024652{
24653printf("Hello")
24654 ;
24655 return 0;
24656}
24657_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024658rm -f "conftest.$ac_objext"
24659if { (eval echo "$as_me:24659: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024660 (eval $ac_compile) 2>&5
24661 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024662 echo "$as_me:24662: \$? = $ac_status" >&5
24663 (exit "$ac_status"); } &&
24664 { ac_try='test -s "conftest.$ac_objext"'
24665 { (eval echo "$as_me:24665: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024666 (eval $ac_try) 2>&5
24667 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024668 echo "$as_me:24668: \$? = $ac_status" >&5
24669 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024670 :
24671else
24672 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024673cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024674cf_have_incdir=yes
24675fi
micky3879b9f5e72025-07-08 18:04:53 -040024676rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024677 CPPFLAGS=$cf_save_CPPFLAGS
24678 fi
24679 fi
24680 fi
24681
24682 if test "$cf_have_incdir" = no ; then
24683 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
24684
micky3879b9f5e72025-07-08 18:04:53 -040024685echo "${as_me:-configure}:24685: testing adding $cf_add_incdir to include-path ..." 1>&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024686
Steve Kondikae271bc2015-11-15 02:50:53 +010024687 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024688
micky3879b9f5e72025-07-08 18:04:53 -040024689 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
Steve Kondikae271bc2015-11-15 02:50:53 +010024690 test "$cf_top_incdir" = "$cf_add_incdir" && break
24691 cf_add_incdir="$cf_top_incdir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024692 else
24693 break
24694 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010024695 else
24696 break
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024697 fi
24698 done
24699 done
24700fi
24701
24702if test -n "$with_hashed_db/lib" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024703 for cf_add_libdir in $with_hashed_db/lib
24704 do
micky3879b9f5e72025-07-08 18:04:53 -040024705 if test "$cf_add_libdir" = /usr/lib ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024706 :
micky3879b9f5e72025-07-08 18:04:53 -040024707 elif test -d "$cf_add_libdir"
Steve Kondikae271bc2015-11-15 02:50:53 +010024708 then
24709 cf_have_libdir=no
24710 if test -n "$LDFLAGS$LIBS" ; then
24711 # a loop is needed to ensure we can add subdirs of existing dirs
24712 for cf_test_libdir in $LDFLAGS $LIBS ; do
24713 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24714 cf_have_libdir=yes; break
24715 fi
24716 done
24717 fi
24718 if test "$cf_have_libdir" = no ; then
24719 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
24720
micky3879b9f5e72025-07-08 18:04:53 -040024721echo "${as_me:-configure}:24721: testing adding $cf_add_libdir to library-path ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024722
24723 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24724 fi
24725 fi
24726 done
24727fi
24728
24729 else
24730 case "$with_hashed_db" in
24731 (./*|../*|/*)
micky3879b9f5e72025-07-08 18:04:53 -040024732 { echo "$as_me:24732: WARNING: no such directory $with_hashed_db" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024733echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24734 ;;
24735 (*)
24736
24737cf_search=
24738
24739test "x$prefix" != "xNONE" && \
24740test -d "$prefix" && \
24741 {
24742 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
micky3879b9f5e72025-07-08 18:04:53 -040024743 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
24744 test -d "$prefix/include/$with_hashed_db" && cf_search="$cf_search $prefix/include/$with_hashed_db"
24745 test -d "$prefix/include/$with_hashed_db/include" && cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24746 test -d "$prefix/$with_hashed_db/include" && cf_search="$cf_search $prefix/$with_hashed_db/include"
24747 test -d "$prefix/$with_hashed_db/include/$with_hashed_db" && cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
Steve Kondikae271bc2015-11-15 02:50:53 +010024748}
24749
24750for cf_subdir_prefix in \
24751 /usr \
24752 /usr/local \
24753 /usr/pkg \
24754 /opt \
24755 /opt/local \
24756 $HOME
24757do
24758
24759test "x$cf_subdir_prefix" != "x$prefix" && \
24760test -d "$cf_subdir_prefix" && \
micky3879b9f5e72025-07-08 18:04:53 -040024761{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
Steve Kondikae271bc2015-11-15 02:50:53 +010024762 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
micky3879b9f5e72025-07-08 18:04:53 -040024763 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
24764 test -d "$cf_subdir_prefix/include/$with_hashed_db" && cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24765 test -d "$cf_subdir_prefix/include/$with_hashed_db/include" && cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24766 test -d "$cf_subdir_prefix/$with_hashed_db/include" && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24767 test -d "$cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db" && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
Steve Kondikae271bc2015-11-15 02:50:53 +010024768}
24769
24770done
24771
24772 for cf_item in $cf_search
24773 do
micky3879b9f5e72025-07-08 18:04:53 -040024774 case "$cf_item" in
Steve Kondikae271bc2015-11-15 02:50:53 +010024775 (*/$with_hashed_db)
24776
24777if test -n "$cf_item" ; then
24778 for cf_add_incdir in $cf_item
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024779 do
micky3879b9f5e72025-07-08 18:04:53 -040024780 while test "$cf_add_incdir" != /usr/include
Steve Kondikae271bc2015-11-15 02:50:53 +010024781 do
micky3879b9f5e72025-07-08 18:04:53 -040024782 if test -d "$cf_add_incdir"
Steve Kondikae271bc2015-11-15 02:50:53 +010024783 then
24784 cf_have_incdir=no
24785 if test -n "$CFLAGS$CPPFLAGS" ; then
24786 # a loop is needed to ensure we can add subdirs of existing dirs
24787 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24788 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24789 cf_have_incdir=yes; break
24790 fi
24791 done
24792 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024793
Steve Kondikae271bc2015-11-15 02:50:53 +010024794 if test "$cf_have_incdir" = no ; then
24795 if test "$cf_add_incdir" = /usr/local/include ; then
24796 if test "$GCC" = yes
24797 then
24798 cf_save_CPPFLAGS=$CPPFLAGS
micky3879b9f5e72025-07-08 18:04:53 -040024799
24800 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24801 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24802
24803 cat >"conftest.$ac_ext" <<_ACEOF
24804#line 24804 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010024805#include "confdefs.h"
24806#include <stdio.h>
24807int
micky3879b9f5e72025-07-08 18:04:53 -040024808main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010024809{
24810printf("Hello")
24811 ;
24812 return 0;
24813}
24814_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024815rm -f "conftest.$ac_objext"
24816if { (eval echo "$as_me:24816: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024817 (eval $ac_compile) 2>&5
24818 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024819 echo "$as_me:24819: \$? = $ac_status" >&5
24820 (exit "$ac_status"); } &&
24821 { ac_try='test -s "conftest.$ac_objext"'
24822 { (eval echo "$as_me:24822: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024823 (eval $ac_try) 2>&5
24824 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024825 echo "$as_me:24825: \$? = $ac_status" >&5
24826 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024827 :
24828else
24829 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024830cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024831cf_have_incdir=yes
24832fi
micky3879b9f5e72025-07-08 18:04:53 -040024833rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010024834 CPPFLAGS=$cf_save_CPPFLAGS
24835 fi
24836 fi
24837 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024838
Steve Kondikae271bc2015-11-15 02:50:53 +010024839 if test "$cf_have_incdir" = no ; then
24840 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
24841
micky3879b9f5e72025-07-08 18:04:53 -040024842echo "${as_me:-configure}:24842: testing adding $cf_add_incdir to include-path ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024843
24844 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24845
micky3879b9f5e72025-07-08 18:04:53 -040024846 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
Steve Kondikae271bc2015-11-15 02:50:53 +010024847 test "$cf_top_incdir" = "$cf_add_incdir" && break
24848 cf_add_incdir="$cf_top_incdir"
24849 else
24850 break
24851 fi
24852 else
24853 break
24854 fi
24855 done
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024856 done
24857fi
24858
Steve Kondikae271bc2015-11-15 02:50:53 +010024859 ;;
24860 esac
24861 done
24862
24863cf_search=
24864
24865test "x$prefix" != "xNONE" && \
24866test -d "$prefix" && \
24867 {
24868 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
micky3879b9f5e72025-07-08 18:04:53 -040024869 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
24870 test -d "$prefix/lib/$with_hashed_db" && cf_search="$cf_search $prefix/lib/$with_hashed_db"
24871 test -d "$prefix/lib/$with_hashed_db/lib" && cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24872 test -d "$prefix/$with_hashed_db/lib" && cf_search="$cf_search $prefix/$with_hashed_db/lib"
24873 test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" && cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
Steve Kondikae271bc2015-11-15 02:50:53 +010024874}
24875
24876for cf_subdir_prefix in \
24877 /usr \
24878 /usr/local \
24879 /usr/pkg \
24880 /opt \
24881 /opt/local \
24882 $HOME
24883do
24884
24885test "x$cf_subdir_prefix" != "x$prefix" && \
24886test -d "$cf_subdir_prefix" && \
micky3879b9f5e72025-07-08 18:04:53 -040024887{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
Steve Kondikae271bc2015-11-15 02:50:53 +010024888 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
micky3879b9f5e72025-07-08 18:04:53 -040024889 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
24890 test -d "$cf_subdir_prefix/lib/$with_hashed_db" && cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24891 test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24892 test -d "$cf_subdir_prefix/$with_hashed_db/lib" && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24893 test -d "$cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db" && cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
Steve Kondikae271bc2015-11-15 02:50:53 +010024894}
24895
24896done
24897
24898 for cf_item in $cf_search
24899 do
micky3879b9f5e72025-07-08 18:04:53 -040024900 case "$cf_item" in
Steve Kondikae271bc2015-11-15 02:50:53 +010024901 (*/$with_hashed_db)
24902
24903if test -n "$cf_item" ; then
24904 for cf_add_libdir in $cf_item
24905 do
micky3879b9f5e72025-07-08 18:04:53 -040024906 if test "$cf_add_libdir" = /usr/lib ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010024907 :
micky3879b9f5e72025-07-08 18:04:53 -040024908 elif test -d "$cf_add_libdir"
Steve Kondikae271bc2015-11-15 02:50:53 +010024909 then
24910 cf_have_libdir=no
24911 if test -n "$LDFLAGS$LIBS" ; then
24912 # a loop is needed to ensure we can add subdirs of existing dirs
24913 for cf_test_libdir in $LDFLAGS $LIBS ; do
24914 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24915 cf_have_libdir=yes; break
24916 fi
24917 done
24918 fi
24919 if test "$cf_have_libdir" = no ; then
24920 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
24921
micky3879b9f5e72025-07-08 18:04:53 -040024922echo "${as_me:-configure}:24922: testing adding $cf_add_libdir to library-path ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010024923
24924 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24925 fi
24926 fi
24927 done
24928fi
24929
24930 ;;
24931 esac
24932 done
24933
24934 ;;
24935 esac
24936 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024937esac
24938
micky3879b9f5e72025-07-08 18:04:53 -040024939echo "$as_me:24939: checking for db.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024940echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24941if test "${ac_cv_header_db_h+set}" = set; then
24942 echo $ECHO_N "(cached) $ECHO_C" >&6
24943else
micky3879b9f5e72025-07-08 18:04:53 -040024944 cat >"conftest.$ac_ext" <<_ACEOF
24945#line 24945 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024946#include "confdefs.h"
24947#include <db.h>
24948_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040024949if { (eval echo "$as_me:24949: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24950 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024951 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040024952 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024953 rm -f conftest.er1
24954 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040024955 echo "$as_me:24955: \$? = $ac_status" >&5
24956 (exit "$ac_status"); } >/dev/null; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024957 if test -s conftest.err; then
24958 ac_cpp_err=$ac_c_preproc_warn_flag
24959 else
24960 ac_cpp_err=
24961 fi
24962else
24963 ac_cpp_err=yes
24964fi
24965if test -z "$ac_cpp_err"; then
24966 ac_cv_header_db_h=yes
24967else
24968 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040024969 cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024970 ac_cv_header_db_h=no
24971fi
micky3879b9f5e72025-07-08 18:04:53 -040024972rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024973fi
micky3879b9f5e72025-07-08 18:04:53 -040024974echo "$as_me:24974: result: $ac_cv_header_db_h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024975echo "${ECHO_T}$ac_cv_header_db_h" >&6
micky3879b9f5e72025-07-08 18:04:53 -040024976if test "$ac_cv_header_db_h" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024977
micky3879b9f5e72025-07-08 18:04:53 -040024978echo "$as_me:24978: checking for version of db" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024979echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24980if test "${cf_cv_hashed_db_version+set}" = set; then
24981 echo $ECHO_N "(cached) $ECHO_C" >&6
24982else
24983
24984cf_cv_hashed_db_version=unknown
24985
Steve Kondikae271bc2015-11-15 02:50:53 +010024986for cf_db_version in 1 2 3 4 5 6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024987do
24988
micky3879b9f5e72025-07-08 18:04:53 -040024989echo "${as_me:-configure}:24989: testing checking for db version $cf_db_version ..." 1>&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024990
micky3879b9f5e72025-07-08 18:04:53 -040024991 cat >"conftest.$ac_ext" <<_ACEOF
24992#line 24992 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053024993#include "confdefs.h"
24994
24995$ac_includes_default
24996#include <db.h>
24997
24998#ifdef DB_VERSION_MAJOR
24999 /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
25000#if $cf_db_version == DB_VERSION_MAJOR
25001 /* ok */
25002#else
micky3879b9f5e72025-07-08 18:04:53 -040025003 #error $cf_db_version is not DB_VERSION_MAJOR
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025004#endif
25005#else
25006#if $cf_db_version == 1
25007 /* ok: assuming this is DB 1.8.5 */
25008#else
micky3879b9f5e72025-07-08 18:04:53 -040025009 #error $cf_db_version is not 1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025010#endif
25011#endif
25012
25013int
micky3879b9f5e72025-07-08 18:04:53 -040025014main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025015{
25016DBT *foo = 0
25017 ;
25018 return 0;
25019}
25020_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025021rm -f "conftest.$ac_objext"
25022if { (eval echo "$as_me:25022: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025023 (eval $ac_compile) 2>&5
25024 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025025 echo "$as_me:25025: \$? = $ac_status" >&5
25026 (exit "$ac_status"); } &&
25027 { ac_try='test -s "conftest.$ac_objext"'
25028 { (eval echo "$as_me:25028: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025029 (eval $ac_try) 2>&5
25030 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025031 echo "$as_me:25031: \$? = $ac_status" >&5
25032 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025033
25034 cf_cv_hashed_db_version=$cf_db_version
25035 break
25036
25037else
25038 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025039cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025040fi
micky3879b9f5e72025-07-08 18:04:53 -040025041rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025042done
25043
25044fi
micky3879b9f5e72025-07-08 18:04:53 -040025045echo "$as_me:25045: result: $cf_cv_hashed_db_version" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025046echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
25047
25048if test "$cf_cv_hashed_db_version" = unknown ; then
micky3879b9f5e72025-07-08 18:04:53 -040025049 { { echo "$as_me:25049: error: Cannot determine version of db" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025050echo "$as_me: error: Cannot determine version of db" >&2;}
25051 { (exit 1); exit 1; }; }
25052else
25053
micky3879b9f5e72025-07-08 18:04:53 -040025054echo "$as_me:25054: checking for db libraries" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025055echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
25056if test "${cf_cv_hashed_db_libs+set}" = set; then
25057 echo $ECHO_N "(cached) $ECHO_C" >&6
25058else
25059
25060cf_cv_hashed_db_libs=unknown
25061for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
25062do
25063 cf_save_libs="$LIBS"
25064 if test -n "$cf_db_libs"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025065
micky3879b9f5e72025-07-08 18:04:53 -040025066cf_add_libs="$LIBS"
25067# reverse order
25068cf_add_0lib=
25069for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25070# filter duplicates
25071for cf_add_1lib in $cf_add_0lib; do
25072 for cf_add_2lib in $cf_add_libs; do
25073 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025074 cf_add_1lib=
25075 break
25076 fi
25077 done
micky3879b9f5e72025-07-08 18:04:53 -040025078 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010025079done
25080LIBS="$cf_add_libs"
25081
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025082 fi
25083
micky3879b9f5e72025-07-08 18:04:53 -040025084echo "${as_me:-configure}:25084: testing checking for library $cf_db_libs ..." 1>&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025085
micky3879b9f5e72025-07-08 18:04:53 -040025086 cat >"conftest.$ac_ext" <<_ACEOF
25087#line 25087 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025088#include "confdefs.h"
25089
25090$ac_includes_default
25091#include <db.h>
25092
25093int
micky3879b9f5e72025-07-08 18:04:53 -040025094main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025095{
25096
25097 char *path = "/tmp/foo";
25098#ifdef DB_VERSION_MAJOR
25099#if DB_VERSION_MAJOR >= 4
25100 DB *result = 0;
25101 db_create(&result, NULL, 0);
25102 result->open(result,
25103 NULL,
25104 path,
25105 path,
25106 DB_HASH,
25107 DB_CREATE,
25108 0644);
25109#elif DB_VERSION_MAJOR >= 3
25110 DB *result = 0;
25111 db_create(&result, NULL, 0);
25112 result->open(result,
25113 path,
25114 path,
25115 DB_HASH,
25116 DB_CREATE,
25117 0644);
25118#elif DB_VERSION_MAJOR >= 2
25119 DB *result = 0;
25120 db_open(path,
25121 DB_HASH,
25122 DB_CREATE,
25123 0644,
25124 (DB_ENV *) 0,
25125 (DB_INFO *) 0,
25126 &result);
25127#endif /* DB_VERSION_MAJOR */
25128#else
25129 DB *result = dbopen(path,
25130 2,
25131 0644,
25132 DB_HASH,
25133 0);
25134#endif
25135 ${cf_cv_main_return:-return}(result != 0)
25136
25137 ;
25138 return 0;
25139}
25140_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025141rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25142if { (eval echo "$as_me:25142: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025143 (eval $ac_link) 2>&5
25144 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025145 echo "$as_me:25145: \$? = $ac_status" >&5
25146 (exit "$ac_status"); } &&
25147 { ac_try='test -s "conftest$ac_exeext"'
25148 { (eval echo "$as_me:25148: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025149 (eval $ac_try) 2>&5
25150 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025151 echo "$as_me:25151: \$? = $ac_status" >&5
25152 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025153
25154 if test -n "$cf_db_libs" ; then
25155 cf_cv_hashed_db_libs=$cf_db_libs
25156 else
25157 cf_cv_hashed_db_libs=default
25158 fi
25159 LIBS="$cf_save_libs"
25160 break
25161
25162else
25163 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025164cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025165fi
micky3879b9f5e72025-07-08 18:04:53 -040025166rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025167 LIBS="$cf_save_libs"
25168done
25169
25170fi
micky3879b9f5e72025-07-08 18:04:53 -040025171echo "$as_me:25171: result: $cf_cv_hashed_db_libs" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025172echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25173
25174 if test "$cf_cv_hashed_db_libs" = unknown ; then
micky3879b9f5e72025-07-08 18:04:53 -040025175 { { echo "$as_me:25175: error: Cannot determine library for db" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025176echo "$as_me: error: Cannot determine library for db" >&2;}
25177 { (exit 1); exit 1; }; }
25178 elif test "$cf_cv_hashed_db_libs" != default ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025179
micky3879b9f5e72025-07-08 18:04:53 -040025180cf_add_libs="$LIBS"
25181# reverse order
25182cf_add_0lib=
25183for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25184# filter duplicates
25185for cf_add_1lib in $cf_add_0lib; do
25186 for cf_add_2lib in $cf_add_libs; do
25187 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025188 cf_add_1lib=
25189 break
25190 fi
25191 done
micky3879b9f5e72025-07-08 18:04:53 -040025192 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010025193done
25194LIBS="$cf_add_libs"
25195
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025196 fi
25197fi
25198
25199else
25200
micky3879b9f5e72025-07-08 18:04:53 -040025201 { { echo "$as_me:25201: error: Cannot find db.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025202echo "$as_me: error: Cannot find db.h" >&2;}
25203 { (exit 1); exit 1; }; }
25204
25205fi
25206
25207fi
25208
micky3879b9f5e72025-07-08 18:04:53 -040025209if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25210 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25211 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025212fi
25213
25214# Just in case, check if the C compiler has a bool type.
25215
micky3879b9f5e72025-07-08 18:04:53 -040025216echo "$as_me:25216: checking if we should include stdbool.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025217echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25218
25219if test "${cf_cv_header_stdbool_h+set}" = set; then
25220 echo $ECHO_N "(cached) $ECHO_C" >&6
25221else
25222
micky3879b9f5e72025-07-08 18:04:53 -040025223 cat >"conftest.$ac_ext" <<_ACEOF
25224#line 25224 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025225#include "confdefs.h"
25226
25227int
micky3879b9f5e72025-07-08 18:04:53 -040025228main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025229{
micky3879b9f5e72025-07-08 18:04:53 -040025230bool foo = false; (void)foo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025231 ;
25232 return 0;
25233}
25234_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025235rm -f "conftest.$ac_objext"
25236if { (eval echo "$as_me:25236: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025237 (eval $ac_compile) 2>&5
25238 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025239 echo "$as_me:25239: \$? = $ac_status" >&5
25240 (exit "$ac_status"); } &&
25241 { ac_try='test -s "conftest.$ac_objext"'
25242 { (eval echo "$as_me:25242: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025243 (eval $ac_try) 2>&5
25244 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025245 echo "$as_me:25245: \$? = $ac_status" >&5
25246 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025247 cf_cv_header_stdbool_h=0
25248else
25249 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025250cat "conftest.$ac_ext" >&5
25251cat >"conftest.$ac_ext" <<_ACEOF
25252#line 25252 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025253#include "confdefs.h"
25254
25255#ifndef __BEOS__
25256#include <stdbool.h>
25257#endif
25258
25259int
micky3879b9f5e72025-07-08 18:04:53 -040025260main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025261{
micky3879b9f5e72025-07-08 18:04:53 -040025262bool foo = false; (void)foo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025263 ;
25264 return 0;
25265}
25266_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025267rm -f "conftest.$ac_objext"
25268if { (eval echo "$as_me:25268: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025269 (eval $ac_compile) 2>&5
25270 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025271 echo "$as_me:25271: \$? = $ac_status" >&5
25272 (exit "$ac_status"); } &&
25273 { ac_try='test -s "conftest.$ac_objext"'
25274 { (eval echo "$as_me:25274: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025275 (eval $ac_try) 2>&5
25276 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025277 echo "$as_me:25277: \$? = $ac_status" >&5
25278 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025279 cf_cv_header_stdbool_h=1
25280else
25281 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025282cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025283cf_cv_header_stdbool_h=0
25284fi
micky3879b9f5e72025-07-08 18:04:53 -040025285rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025286fi
micky3879b9f5e72025-07-08 18:04:53 -040025287rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025288fi
25289
25290if test "$cf_cv_header_stdbool_h" = 1
micky3879b9f5e72025-07-08 18:04:53 -040025291then echo "$as_me:25291: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025292echo "${ECHO_T}yes" >&6
micky3879b9f5e72025-07-08 18:04:53 -040025293else echo "$as_me:25293: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025294echo "${ECHO_T}no" >&6
25295fi
25296
micky3879b9f5e72025-07-08 18:04:53 -040025297echo "$as_me:25297: checking for builtin bool type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025298echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25299
25300if test "${cf_cv_cc_bool_type+set}" = set; then
25301 echo $ECHO_N "(cached) $ECHO_C" >&6
25302else
25303
micky3879b9f5e72025-07-08 18:04:53 -040025304 cat >"conftest.$ac_ext" <<_ACEOF
25305#line 25305 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025306#include "confdefs.h"
25307
25308#include <stdio.h>
25309#include <sys/types.h>
25310
25311int
micky3879b9f5e72025-07-08 18:04:53 -040025312main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025313{
micky3879b9f5e72025-07-08 18:04:53 -040025314bool x = false; (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025315 ;
25316 return 0;
25317}
25318_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025319rm -f "conftest.$ac_objext"
25320if { (eval echo "$as_me:25320: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025321 (eval $ac_compile) 2>&5
25322 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025323 echo "$as_me:25323: \$? = $ac_status" >&5
25324 (exit "$ac_status"); } &&
25325 { ac_try='test -s "conftest.$ac_objext"'
25326 { (eval echo "$as_me:25326: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025327 (eval $ac_try) 2>&5
25328 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025329 echo "$as_me:25329: \$? = $ac_status" >&5
25330 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025331 cf_cv_cc_bool_type=1
25332else
25333 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025334cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025335cf_cv_cc_bool_type=0
25336fi
micky3879b9f5e72025-07-08 18:04:53 -040025337rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025338
25339fi
25340
25341if test "$cf_cv_cc_bool_type" = 1
micky3879b9f5e72025-07-08 18:04:53 -040025342then echo "$as_me:25342: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025343echo "${ECHO_T}yes" >&6
micky3879b9f5e72025-07-08 18:04:53 -040025344else echo "$as_me:25344: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025345echo "${ECHO_T}no" >&6
25346fi
25347
25348# Check for C++ compiler characteristics (and ensure that it's there!)
25349if test -n "$CXX" ; then
25350 ac_ext=cc
25351ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040025352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25353ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040025355ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025356
25357if test -n "$GXX" ; then
micky3879b9f5e72025-07-08 18:04:53 -040025358
25359 cf_save="$LIBS"
25360 LIBS="$LIBS $CXXLIBS"
25361 echo "$as_me:25361: checking if we already have C++ library" >&5
25362echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25363 cat >"conftest.$ac_ext" <<_ACEOF
25364#line 25364 "configure"
25365#include "confdefs.h"
25366
25367 #include <iostream>
25368int
25369main (void)
25370{
25371
25372 std::cout << "Hello World!" << std::endl;
25373 ;
25374 return 0;
25375}
25376_ACEOF
25377rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25378if { (eval echo "$as_me:25378: \"$ac_link\"") >&5
25379 (eval $ac_link) 2>&5
25380 ac_status=$?
25381 echo "$as_me:25381: \$? = $ac_status" >&5
25382 (exit "$ac_status"); } &&
25383 { ac_try='test -s "conftest$ac_exeext"'
25384 { (eval echo "$as_me:25384: \"$ac_try\"") >&5
25385 (eval $ac_try) 2>&5
25386 ac_status=$?
25387 echo "$as_me:25387: \$? = $ac_status" >&5
25388 (exit "$ac_status"); }; }; then
25389 cf_have_libstdcpp=yes
25390else
25391 echo "$as_me: failed program was:" >&5
25392cat "conftest.$ac_ext" >&5
25393cf_have_libstdcpp=no
25394fi
25395rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25396 echo "$as_me:25396: result: $cf_have_libstdcpp" >&5
25397echo "${ECHO_T}$cf_have_libstdcpp" >&6
25398 LIBS="$cf_save"
25399
25400 if test "$cf_have_libstdcpp" != yes
25401 then
25402 case "$cf_cv_system_name" in
25403 (os2*)
25404 if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25405 cf_stdcpp_libname=stdcpp
25406 else
25407 cf_stdcpp_libname=stdc++
25408 fi
25409 ;;
25410 (*)
25411 cf_stdcpp_libname=stdc++
25412 ;;
25413 esac
25414
25415 echo "$as_me:25415: checking for library $cf_stdcpp_libname" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025416echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25417if test "${cf_cv_libstdcpp+set}" = set; then
25418 echo $ECHO_N "(cached) $ECHO_C" >&6
25419else
25420
micky3879b9f5e72025-07-08 18:04:53 -040025421 cf_save="$LIBS"
25422 LIBS="$LIBS $CXXLIBS"
Steve Kondikae271bc2015-11-15 02:50:53 +010025423
micky3879b9f5e72025-07-08 18:04:53 -040025424cf_add_libs="$LIBS"
25425# reverse order
25426cf_add_0lib=
25427for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25428# filter duplicates
25429for cf_add_1lib in $cf_add_0lib; do
25430 for cf_add_2lib in $cf_add_libs; do
25431 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025432 cf_add_1lib=
25433 break
25434 fi
25435 done
micky3879b9f5e72025-07-08 18:04:53 -040025436 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010025437done
25438LIBS="$cf_add_libs"
25439
micky3879b9f5e72025-07-08 18:04:53 -040025440 cat >"conftest.$ac_ext" <<_ACEOF
25441#line 25441 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025442#include "confdefs.h"
25443
micky3879b9f5e72025-07-08 18:04:53 -040025444 #include <iostream>
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025445int
micky3879b9f5e72025-07-08 18:04:53 -040025446main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025447{
25448
micky3879b9f5e72025-07-08 18:04:53 -040025449 std::cout << "Hello World!" << std::endl;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025450 ;
25451 return 0;
25452}
25453_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025454rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25455if { (eval echo "$as_me:25455: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025456 (eval $ac_link) 2>&5
25457 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025458 echo "$as_me:25458: \$? = $ac_status" >&5
25459 (exit "$ac_status"); } &&
25460 { ac_try='test -s "conftest$ac_exeext"'
25461 { (eval echo "$as_me:25461: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025462 (eval $ac_try) 2>&5
25463 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025464 echo "$as_me:25464: \$? = $ac_status" >&5
25465 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025466 cf_cv_libstdcpp=yes
25467else
25468 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025469cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025470cf_cv_libstdcpp=no
25471fi
micky3879b9f5e72025-07-08 18:04:53 -040025472rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25473 LIBS="$cf_save"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025474
25475fi
micky3879b9f5e72025-07-08 18:04:53 -040025476echo "$as_me:25476: result: $cf_cv_libstdcpp" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025477echo "${ECHO_T}$cf_cv_libstdcpp" >&6
micky3879b9f5e72025-07-08 18:04:53 -040025478 test "$cf_cv_libstdcpp" = yes && {
25479cf_add_libs="$CXXLIBS"
25480# reverse order
25481cf_add_0lib=
25482for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25483# filter duplicates
25484for cf_add_1lib in $cf_add_0lib; do
25485 for cf_add_2lib in $cf_add_libs; do
25486 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025487 cf_add_1lib=
25488 break
25489 fi
25490 done
micky3879b9f5e72025-07-08 18:04:53 -040025491 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010025492done
25493CXXLIBS="$cf_add_libs"
micky3879b9f5e72025-07-08 18:04:53 -040025494 }
25495 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025496fi
25497
micky3879b9f5e72025-07-08 18:04:53 -040025498 echo "$as_me:25498: checking whether $CXX understands -c and -o together" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025499echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25500if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25501 echo $ECHO_N "(cached) $ECHO_C" >&6
25502else
25503
25504cat > conftest.$ac_ext <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040025505int main(void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025506{
25507 ${cf_cv_main_return:-return}(0);
25508}
25509CF_EOF
25510# We do the test twice because some compilers refuse to overwrite an
25511# existing .o file with -o, though they will create one.
micky3879b9f5e72025-07-08 18:04:53 -040025512ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25513if { (eval echo "$as_me:25513: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025514 (eval $ac_try) 2>&5
25515 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025516 echo "$as_me:25516: \$? = $ac_status" >&5
25517 (exit "$ac_status"); } &&
25518 test -f conftest2.$ac_objext && { (eval echo "$as_me:25518: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025519 (eval $ac_try) 2>&5
25520 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025521 echo "$as_me:25521: \$? = $ac_status" >&5
25522 (exit "$ac_status"); };
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025523then
25524 eval cf_cv_prog_CXX_c_o=yes
25525else
25526 eval cf_cv_prog_CXX_c_o=no
25527fi
micky3879b9f5e72025-07-08 18:04:53 -040025528rm -rf ./conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025529
25530fi
micky3879b9f5e72025-07-08 18:04:53 -040025531if test "$cf_cv_prog_CXX_c_o" = yes; then
25532 echo "$as_me:25532: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025533echo "${ECHO_T}yes" >&6
25534else
micky3879b9f5e72025-07-08 18:04:53 -040025535 echo "$as_me:25535: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025536echo "${ECHO_T}no" >&6
25537fi
25538
micky3879b9f5e72025-07-08 18:04:53 -040025539 case "$GXX_VERSION" in
25540 (1.*|2.[0-6]*|[1-9][0-9].*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025541 cf_cxx_library=yes
25542 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010025543 (*-2.7*|2.7*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025544
25545cf_cxx_library=unknown
micky3879b9f5e72025-07-08 18:04:53 -040025546case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010025547(os2*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025548 cf_gpp_libname=gpp
25549 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010025550(*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025551 cf_gpp_libname=g++
25552 ;;
25553esac
25554if test "$GXX" = yes; then
micky3879b9f5e72025-07-08 18:04:53 -040025555 echo "$as_me:25555: checking for lib$cf_gpp_libname" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025556echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25557 cf_save="$LIBS"
Steve Kondikae271bc2015-11-15 02:50:53 +010025558
micky3879b9f5e72025-07-08 18:04:53 -040025559cf_add_libs="$LIBS"
25560# reverse order
25561cf_add_0lib=
25562for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25563# filter duplicates
25564for cf_add_1lib in $cf_add_0lib; do
25565 for cf_add_2lib in $cf_add_libs; do
25566 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025567 cf_add_1lib=
25568 break
25569 fi
25570 done
micky3879b9f5e72025-07-08 18:04:53 -040025571 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010025572done
25573LIBS="$cf_add_libs"
25574
micky3879b9f5e72025-07-08 18:04:53 -040025575 cat >"conftest.$ac_ext" <<_ACEOF
25576#line 25576 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025577#include "confdefs.h"
25578
25579#include <$cf_gpp_libname/builtin.h>
25580
25581int
micky3879b9f5e72025-07-08 18:04:53 -040025582main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025583{
25584two_arg_error_handler_t foo2 = lib_error_handler
25585 ;
25586 return 0;
25587}
25588_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025589rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25590if { (eval echo "$as_me:25590: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025591 (eval $ac_link) 2>&5
25592 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025593 echo "$as_me:25593: \$? = $ac_status" >&5
25594 (exit "$ac_status"); } &&
25595 { ac_try='test -s "conftest$ac_exeext"'
25596 { (eval echo "$as_me:25596: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025597 (eval $ac_try) 2>&5
25598 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025599 echo "$as_me:25599: \$? = $ac_status" >&5
25600 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025601 cf_cxx_library=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010025602
micky3879b9f5e72025-07-08 18:04:53 -040025603cf_add_libs="$CXXLIBS"
25604# reverse order
25605cf_add_0lib=
25606for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25607# filter duplicates
25608for cf_add_1lib in $cf_add_0lib; do
25609 for cf_add_2lib in $cf_add_libs; do
25610 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025611 cf_add_1lib=
25612 break
25613 fi
25614 done
micky3879b9f5e72025-07-08 18:04:53 -040025615 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010025616done
25617CXXLIBS="$cf_add_libs"
25618
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025619 if test "$cf_gpp_libname" = cpp ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025620
25621cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025622#define HAVE_GPP_BUILTIN_H 1
25623EOF
25624
25625 else
Steve Kondikae271bc2015-11-15 02:50:53 +010025626
25627cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025628#define HAVE_GXX_BUILTIN_H 1
25629EOF
25630
25631 fi
25632else
25633 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025634cat "conftest.$ac_ext" >&5
25635cat >"conftest.$ac_ext" <<_ACEOF
25636#line 25636 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025637#include "confdefs.h"
25638
25639#include <builtin.h>
25640
25641int
micky3879b9f5e72025-07-08 18:04:53 -040025642main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025643{
25644two_arg_error_handler_t foo2 = lib_error_handler
25645 ;
25646 return 0;
25647}
25648_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025649rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25650if { (eval echo "$as_me:25650: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025651 (eval $ac_link) 2>&5
25652 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025653 echo "$as_me:25653: \$? = $ac_status" >&5
25654 (exit "$ac_status"); } &&
25655 { ac_try='test -s "conftest$ac_exeext"'
25656 { (eval echo "$as_me:25656: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025657 (eval $ac_try) 2>&5
25658 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025659 echo "$as_me:25659: \$? = $ac_status" >&5
25660 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025661 cf_cxx_library=yes
Steve Kondikae271bc2015-11-15 02:50:53 +010025662
micky3879b9f5e72025-07-08 18:04:53 -040025663cf_add_libs="$CXXLIBS"
25664# reverse order
25665cf_add_0lib=
25666for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25667# filter duplicates
25668for cf_add_1lib in $cf_add_0lib; do
25669 for cf_add_2lib in $cf_add_libs; do
25670 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025671 cf_add_1lib=
25672 break
25673 fi
25674 done
micky3879b9f5e72025-07-08 18:04:53 -040025675 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
Steve Kondikae271bc2015-11-15 02:50:53 +010025676done
25677CXXLIBS="$cf_add_libs"
25678
25679cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025680#define HAVE_BUILTIN_H 1
25681EOF
25682
25683else
25684 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025685cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025686cf_cxx_library=no
25687fi
micky3879b9f5e72025-07-08 18:04:53 -040025688rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025689fi
micky3879b9f5e72025-07-08 18:04:53 -040025690rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025691 LIBS="$cf_save"
micky3879b9f5e72025-07-08 18:04:53 -040025692 echo "$as_me:25692: result: $cf_cxx_library" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025693echo "${ECHO_T}$cf_cxx_library" >&6
25694fi
25695
25696 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010025697 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025698 cf_cxx_library=no
25699 ;;
25700 esac
25701
25702 ac_ext=cc
25703ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040025704ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25705ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025706ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040025707ac_main_return="return"
25708echo "$as_me:25708: checking how to run the C++ preprocessor" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025709echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25710if test -z "$CXXCPP"; then
25711 if test "${ac_cv_prog_CXXCPP+set}" = set; then
25712 echo $ECHO_N "(cached) $ECHO_C" >&6
25713else
25714 # Double quotes because CXXCPP needs to be expanded
25715 for CXXCPP in "$CXX -E" "/lib/cpp"
25716 do
25717 ac_preproc_ok=false
25718for ac_cxx_preproc_warn_flag in '' yes
25719do
25720 # Use a header file that comes with gcc, so configuring glibc
25721 # with a fresh cross-compiler works.
25722 # On the NeXT, cc -E runs the code through the compiler's parser,
25723 # not just through cpp. "Syntax error" is here to catch this case.
micky3879b9f5e72025-07-08 18:04:53 -040025724 cat >"conftest.$ac_ext" <<_ACEOF
25725#line 25725 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025726#include "confdefs.h"
25727#include <assert.h>
25728 Syntax error
25729_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025730if { (eval echo "$as_me:25730: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25731 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025732 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025733 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025734 rm -f conftest.er1
25735 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040025736 echo "$as_me:25736: \$? = $ac_status" >&5
25737 (exit "$ac_status"); } >/dev/null; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025738 if test -s conftest.err; then
25739 ac_cpp_err=$ac_cxx_preproc_warn_flag
25740 else
25741 ac_cpp_err=
25742 fi
25743else
25744 ac_cpp_err=yes
25745fi
25746if test -z "$ac_cpp_err"; then
25747 :
25748else
25749 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025750 cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025751 # Broken: fails on valid input.
25752continue
25753fi
micky3879b9f5e72025-07-08 18:04:53 -040025754rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025755
25756 # OK, works on sane cases. Now check whether non-existent headers
25757 # can be detected and how.
micky3879b9f5e72025-07-08 18:04:53 -040025758 cat >"conftest.$ac_ext" <<_ACEOF
25759#line 25759 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025760#include "confdefs.h"
25761#include <ac_nonexistent.h>
25762_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025763if { (eval echo "$as_me:25763: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25764 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025765 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025766 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025767 rm -f conftest.er1
25768 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040025769 echo "$as_me:25769: \$? = $ac_status" >&5
25770 (exit "$ac_status"); } >/dev/null; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025771 if test -s conftest.err; then
25772 ac_cpp_err=$ac_cxx_preproc_warn_flag
25773 else
25774 ac_cpp_err=
25775 fi
25776else
25777 ac_cpp_err=yes
25778fi
25779if test -z "$ac_cpp_err"; then
25780 # Broken: success on invalid input.
25781continue
25782else
25783 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025784 cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025785 # Passes both tests.
25786ac_preproc_ok=:
25787break
25788fi
micky3879b9f5e72025-07-08 18:04:53 -040025789rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025790
25791done
25792# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
micky3879b9f5e72025-07-08 18:04:53 -040025793rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025794if $ac_preproc_ok; then
25795 break
25796fi
25797
25798 done
25799 ac_cv_prog_CXXCPP=$CXXCPP
25800
25801fi
25802 CXXCPP=$ac_cv_prog_CXXCPP
25803else
25804 ac_cv_prog_CXXCPP=$CXXCPP
25805fi
micky3879b9f5e72025-07-08 18:04:53 -040025806echo "$as_me:25806: result: $CXXCPP" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025807echo "${ECHO_T}$CXXCPP" >&6
25808ac_preproc_ok=false
25809for ac_cxx_preproc_warn_flag in '' yes
25810do
25811 # Use a header file that comes with gcc, so configuring glibc
25812 # with a fresh cross-compiler works.
25813 # On the NeXT, cc -E runs the code through the compiler's parser,
25814 # not just through cpp. "Syntax error" is here to catch this case.
micky3879b9f5e72025-07-08 18:04:53 -040025815 cat >"conftest.$ac_ext" <<_ACEOF
25816#line 25816 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025817#include "confdefs.h"
25818#include <assert.h>
25819 Syntax error
25820_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025821if { (eval echo "$as_me:25821: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25822 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025823 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025824 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025825 rm -f conftest.er1
25826 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040025827 echo "$as_me:25827: \$? = $ac_status" >&5
25828 (exit "$ac_status"); } >/dev/null; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025829 if test -s conftest.err; then
25830 ac_cpp_err=$ac_cxx_preproc_warn_flag
25831 else
25832 ac_cpp_err=
25833 fi
25834else
25835 ac_cpp_err=yes
25836fi
25837if test -z "$ac_cpp_err"; then
25838 :
25839else
25840 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025841 cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025842 # Broken: fails on valid input.
25843continue
25844fi
micky3879b9f5e72025-07-08 18:04:53 -040025845rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025846
25847 # OK, works on sane cases. Now check whether non-existent headers
25848 # can be detected and how.
micky3879b9f5e72025-07-08 18:04:53 -040025849 cat >"conftest.$ac_ext" <<_ACEOF
25850#line 25850 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025851#include "confdefs.h"
25852#include <ac_nonexistent.h>
25853_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025854if { (eval echo "$as_me:25854: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25855 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025856 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025857 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025858 rm -f conftest.er1
25859 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040025860 echo "$as_me:25860: \$? = $ac_status" >&5
25861 (exit "$ac_status"); } >/dev/null; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025862 if test -s conftest.err; then
25863 ac_cpp_err=$ac_cxx_preproc_warn_flag
25864 else
25865 ac_cpp_err=
25866 fi
25867else
25868 ac_cpp_err=yes
25869fi
25870if test -z "$ac_cpp_err"; then
25871 # Broken: success on invalid input.
25872continue
25873else
25874 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025875 cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025876 # Passes both tests.
25877ac_preproc_ok=:
25878break
25879fi
micky3879b9f5e72025-07-08 18:04:53 -040025880rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025881
25882done
25883# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
micky3879b9f5e72025-07-08 18:04:53 -040025884rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025885if $ac_preproc_ok; then
25886 :
25887else
micky3879b9f5e72025-07-08 18:04:53 -040025888 { { echo "$as_me:25888: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025889echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25890 { (exit 1); exit 1; }; }
25891fi
25892
25893ac_ext=cc
25894ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040025895ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25896ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025897ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040025898ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025899
Steve Kondikae271bc2015-11-15 02:50:53 +010025900for ac_header in typeinfo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025901do
25902as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040025903echo "$as_me:25903: checking for $ac_header" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025904echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25905if eval "test \"\${$as_ac_Header+set}\" = set"; then
25906 echo $ECHO_N "(cached) $ECHO_C" >&6
25907else
micky3879b9f5e72025-07-08 18:04:53 -040025908 cat >"conftest.$ac_ext" <<_ACEOF
25909#line 25909 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025910#include "confdefs.h"
25911#include <$ac_header>
25912_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025913if { (eval echo "$as_me:25913: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25914 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025915 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025916 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025917 rm -f conftest.er1
25918 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040025919 echo "$as_me:25919: \$? = $ac_status" >&5
25920 (exit "$ac_status"); } >/dev/null; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025921 if test -s conftest.err; then
25922 ac_cpp_err=$ac_cxx_preproc_warn_flag
25923 else
25924 ac_cpp_err=
25925 fi
25926else
25927 ac_cpp_err=yes
25928fi
25929if test -z "$ac_cpp_err"; then
25930 eval "$as_ac_Header=yes"
25931else
25932 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025933 cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025934 eval "$as_ac_Header=no"
25935fi
micky3879b9f5e72025-07-08 18:04:53 -040025936rm -f conftest.err "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025937fi
micky3879b9f5e72025-07-08 18:04:53 -040025938echo "$as_me:25938: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25939echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25940if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025941 cat >>confdefs.h <<EOF
25942#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25943EOF
25944
25945fi
25946done
25947
Steve Kondikae271bc2015-11-15 02:50:53 +010025948for ac_header in iostream
25949do
25950as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
micky3879b9f5e72025-07-08 18:04:53 -040025951echo "$as_me:25951: checking for $ac_header" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010025952echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25953if eval "test \"\${$as_ac_Header+set}\" = set"; then
25954 echo $ECHO_N "(cached) $ECHO_C" >&6
25955else
micky3879b9f5e72025-07-08 18:04:53 -040025956 cat >"conftest.$ac_ext" <<_ACEOF
25957#line 25957 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010025958#include "confdefs.h"
25959#include <$ac_header>
25960_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040025961if { (eval echo "$as_me:25961: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25962 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
Steve Kondikae271bc2015-11-15 02:50:53 +010025963 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040025964 $EGREP -v '^ *\+' conftest.er1 >conftest.err
Steve Kondikae271bc2015-11-15 02:50:53 +010025965 rm -f conftest.er1
25966 cat conftest.err >&5
micky3879b9f5e72025-07-08 18:04:53 -040025967 echo "$as_me:25967: \$? = $ac_status" >&5
25968 (exit "$ac_status"); } >/dev/null; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025969 if test -s conftest.err; then
25970 ac_cpp_err=$ac_cxx_preproc_warn_flag
25971 else
25972 ac_cpp_err=
25973 fi
25974else
25975 ac_cpp_err=yes
25976fi
25977if test -z "$ac_cpp_err"; then
25978 eval "$as_ac_Header=yes"
25979else
25980 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040025981 cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010025982 eval "$as_ac_Header=no"
25983fi
micky3879b9f5e72025-07-08 18:04:53 -040025984rm -f conftest.err "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010025985fi
micky3879b9f5e72025-07-08 18:04:53 -040025986echo "$as_me:25986: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25987echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25988if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
Steve Kondikae271bc2015-11-15 02:50:53 +010025989 cat >>confdefs.h <<EOF
25990#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25991EOF
25992
25993fi
25994done
25995
25996if test x"$ac_cv_header_iostream" = xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040025997 echo "$as_me:25997: checking if iostream uses std-namespace" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053025998echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040025999 cat >"conftest.$ac_ext" <<_ACEOF
26000#line 26000 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026001#include "confdefs.h"
26002
26003#include <iostream>
26004using std::endl;
26005using std::cerr;
26006int
micky3879b9f5e72025-07-08 18:04:53 -040026007main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026008{
26009
26010cerr << "testing" << endl;
26011
26012 ;
26013 return 0;
26014}
26015_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026016rm -f "conftest.$ac_objext"
26017if { (eval echo "$as_me:26017: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026018 (eval $ac_compile) 2>&5
26019 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026020 echo "$as_me:26020: \$? = $ac_status" >&5
26021 (exit "$ac_status"); } &&
26022 { ac_try='test -s "conftest.$ac_objext"'
26023 { (eval echo "$as_me:26023: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026024 (eval $ac_try) 2>&5
26025 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026026 echo "$as_me:26026: \$? = $ac_status" >&5
26027 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026028 cf_iostream_namespace=yes
26029else
26030 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026031cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026032cf_iostream_namespace=no
26033fi
micky3879b9f5e72025-07-08 18:04:53 -040026034rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26035 echo "$as_me:26035: result: $cf_iostream_namespace" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026036echo "${ECHO_T}$cf_iostream_namespace" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010026037 if test "$cf_iostream_namespace" = yes ; then
26038
26039cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026040#define IOSTREAM_NAMESPACE 1
26041EOF
26042
Steve Kondikae271bc2015-11-15 02:50:53 +010026043 fi
26044fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026045
micky3879b9f5e72025-07-08 18:04:53 -040026046echo "$as_me:26046: checking if we should include stdbool.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026047echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
26048
26049if test "${cf_cv_header_stdbool_h+set}" = set; then
26050 echo $ECHO_N "(cached) $ECHO_C" >&6
26051else
26052
micky3879b9f5e72025-07-08 18:04:53 -040026053 cat >"conftest.$ac_ext" <<_ACEOF
26054#line 26054 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026055#include "confdefs.h"
26056
26057int
micky3879b9f5e72025-07-08 18:04:53 -040026058main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026059{
micky3879b9f5e72025-07-08 18:04:53 -040026060bool foo = false; (void)foo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026061 ;
26062 return 0;
26063}
26064_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026065rm -f "conftest.$ac_objext"
26066if { (eval echo "$as_me:26066: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026067 (eval $ac_compile) 2>&5
26068 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026069 echo "$as_me:26069: \$? = $ac_status" >&5
26070 (exit "$ac_status"); } &&
26071 { ac_try='test -s "conftest.$ac_objext"'
26072 { (eval echo "$as_me:26072: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026073 (eval $ac_try) 2>&5
26074 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026075 echo "$as_me:26075: \$? = $ac_status" >&5
26076 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026077 cf_cv_header_stdbool_h=0
26078else
26079 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026080cat "conftest.$ac_ext" >&5
26081cat >"conftest.$ac_ext" <<_ACEOF
26082#line 26082 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026083#include "confdefs.h"
26084
26085#ifndef __BEOS__
26086#include <stdbool.h>
26087#endif
26088
26089int
micky3879b9f5e72025-07-08 18:04:53 -040026090main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026091{
micky3879b9f5e72025-07-08 18:04:53 -040026092bool foo = false; (void)foo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026093 ;
26094 return 0;
26095}
26096_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026097rm -f "conftest.$ac_objext"
26098if { (eval echo "$as_me:26098: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026099 (eval $ac_compile) 2>&5
26100 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026101 echo "$as_me:26101: \$? = $ac_status" >&5
26102 (exit "$ac_status"); } &&
26103 { ac_try='test -s "conftest.$ac_objext"'
26104 { (eval echo "$as_me:26104: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026105 (eval $ac_try) 2>&5
26106 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026107 echo "$as_me:26107: \$? = $ac_status" >&5
26108 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026109 cf_cv_header_stdbool_h=1
26110else
26111 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026112cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026113cf_cv_header_stdbool_h=0
26114fi
micky3879b9f5e72025-07-08 18:04:53 -040026115rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026116fi
micky3879b9f5e72025-07-08 18:04:53 -040026117rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026118fi
26119
26120if test "$cf_cv_header_stdbool_h" = 1
micky3879b9f5e72025-07-08 18:04:53 -040026121then echo "$as_me:26121: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026122echo "${ECHO_T}yes" >&6
micky3879b9f5e72025-07-08 18:04:53 -040026123else echo "$as_me:26123: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026124echo "${ECHO_T}no" >&6
26125fi
26126
micky3879b9f5e72025-07-08 18:04:53 -040026127echo "$as_me:26127: checking for builtin bool type" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026128echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
26129
26130if test "${cf_cv_builtin_bool+set}" = set; then
26131 echo $ECHO_N "(cached) $ECHO_C" >&6
26132else
26133
micky3879b9f5e72025-07-08 18:04:53 -040026134 cat >"conftest.$ac_ext" <<_ACEOF
26135#line 26135 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026136#include "confdefs.h"
26137
26138#include <stdio.h>
26139#include <sys/types.h>
26140
26141int
micky3879b9f5e72025-07-08 18:04:53 -040026142main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026143{
micky3879b9f5e72025-07-08 18:04:53 -040026144bool x = false; (void)x
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026145 ;
26146 return 0;
26147}
26148_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026149rm -f "conftest.$ac_objext"
26150if { (eval echo "$as_me:26150: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026151 (eval $ac_compile) 2>&5
26152 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026153 echo "$as_me:26153: \$? = $ac_status" >&5
26154 (exit "$ac_status"); } &&
26155 { ac_try='test -s "conftest.$ac_objext"'
26156 { (eval echo "$as_me:26156: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026157 (eval $ac_try) 2>&5
26158 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026159 echo "$as_me:26159: \$? = $ac_status" >&5
26160 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026161 cf_cv_builtin_bool=1
26162else
26163 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026164cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026165cf_cv_builtin_bool=0
26166fi
micky3879b9f5e72025-07-08 18:04:53 -040026167rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026168
26169fi
26170
26171if test "$cf_cv_builtin_bool" = 1
micky3879b9f5e72025-07-08 18:04:53 -040026172then echo "$as_me:26172: result: yes" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026173echo "${ECHO_T}yes" >&6
micky3879b9f5e72025-07-08 18:04:53 -040026174else echo "$as_me:26174: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026175echo "${ECHO_T}no" >&6
26176fi
26177
micky3879b9f5e72025-07-08 18:04:53 -040026178echo "$as_me:26178: checking for bool" >&5
26179echo $ECHO_N "checking for bool... $ECHO_C" >&6
26180if test "${ac_cv_type_bool+set}" = set; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026181 echo $ECHO_N "(cached) $ECHO_C" >&6
26182else
micky3879b9f5e72025-07-08 18:04:53 -040026183 cat >"conftest.$ac_ext" <<_ACEOF
26184#line 26184 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026185#include "confdefs.h"
26186
micky3879b9f5e72025-07-08 18:04:53 -040026187$ac_includes_default
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026188
26189#if defined(__cplusplus)
26190
26191#ifdef HAVE_GXX_BUILTIN_H
26192#include <g++/builtin.h>
26193#elif HAVE_GPP_BUILTIN_H
26194#include <gpp/builtin.h>
26195#elif HAVE_BUILTIN_H
26196#include <builtin.h>
26197#endif
26198
26199#else
26200
26201#if $cf_cv_header_stdbool_h
26202#include <stdbool.h>
26203#endif
26204
26205#endif
26206
micky3879b9f5e72025-07-08 18:04:53 -040026207int
26208main (void)
26209{
26210if ((bool *) 0)
26211 return 0;
26212if (sizeof (bool))
26213 return 0;
26214 ;
26215 return 0;
26216}
26217_ACEOF
26218rm -f "conftest.$ac_objext"
26219if { (eval echo "$as_me:26219: \"$ac_compile\"") >&5
26220 (eval $ac_compile) 2>&5
26221 ac_status=$?
26222 echo "$as_me:26222: \$? = $ac_status" >&5
26223 (exit "$ac_status"); } &&
26224 { ac_try='test -s "conftest.$ac_objext"'
26225 { (eval echo "$as_me:26225: \"$ac_try\"") >&5
26226 (eval $ac_try) 2>&5
26227 ac_status=$?
26228 echo "$as_me:26228: \$? = $ac_status" >&5
26229 (exit "$ac_status"); }; }; then
26230 ac_cv_type_bool=yes
26231else
26232 echo "$as_me: failed program was:" >&5
26233cat "conftest.$ac_ext" >&5
26234ac_cv_type_bool=no
26235fi
26236rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26237fi
26238echo "$as_me:26238: result: $ac_cv_type_bool" >&5
26239echo "${ECHO_T}$ac_cv_type_bool" >&6
26240
26241echo "$as_me:26241: checking size of bool" >&5
26242echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26243if test "${ac_cv_sizeof_bool+set}" = set; then
26244 echo $ECHO_N "(cached) $ECHO_C" >&6
26245else
26246 if test "$ac_cv_type_bool" = yes; then
26247 if test "$cross_compiling" = yes; then
26248 # Depending upon the size, compute the lo and hi bounds.
26249cat >"conftest.$ac_ext" <<_ACEOF
26250#line 26250 "configure"
26251#include "confdefs.h"
26252
26253$ac_includes_default
26254
26255#if defined(__cplusplus)
26256
26257#ifdef HAVE_GXX_BUILTIN_H
26258#include <g++/builtin.h>
26259#elif HAVE_GPP_BUILTIN_H
26260#include <gpp/builtin.h>
26261#elif HAVE_BUILTIN_H
26262#include <builtin.h>
26263#endif
26264
26265#else
26266
26267#if $cf_cv_header_stdbool_h
26268#include <stdbool.h>
26269#endif
26270
26271#endif
26272
26273int
26274main (void)
26275{
26276int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26277 ;
26278 return 0;
26279}
26280_ACEOF
26281rm -f "conftest.$ac_objext"
26282if { (eval echo "$as_me:26282: \"$ac_compile\"") >&5
26283 (eval $ac_compile) 2>&5
26284 ac_status=$?
26285 echo "$as_me:26285: \$? = $ac_status" >&5
26286 (exit "$ac_status"); } &&
26287 { ac_try='test -s "conftest.$ac_objext"'
26288 { (eval echo "$as_me:26288: \"$ac_try\"") >&5
26289 (eval $ac_try) 2>&5
26290 ac_status=$?
26291 echo "$as_me:26291: \$? = $ac_status" >&5
26292 (exit "$ac_status"); }; }; then
26293 ac_lo=0 ac_mid=0
26294 while :; do
26295 cat >"conftest.$ac_ext" <<_ACEOF
26296#line 26296 "configure"
26297#include "confdefs.h"
26298
26299$ac_includes_default
26300
26301#if defined(__cplusplus)
26302
26303#ifdef HAVE_GXX_BUILTIN_H
26304#include <g++/builtin.h>
26305#elif HAVE_GPP_BUILTIN_H
26306#include <gpp/builtin.h>
26307#elif HAVE_BUILTIN_H
26308#include <builtin.h>
26309#endif
26310
26311#else
26312
26313#if $cf_cv_header_stdbool_h
26314#include <stdbool.h>
26315#endif
26316
26317#endif
26318
26319int
26320main (void)
26321{
26322int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26323 ;
26324 return 0;
26325}
26326_ACEOF
26327rm -f "conftest.$ac_objext"
26328if { (eval echo "$as_me:26328: \"$ac_compile\"") >&5
26329 (eval $ac_compile) 2>&5
26330 ac_status=$?
26331 echo "$as_me:26331: \$? = $ac_status" >&5
26332 (exit "$ac_status"); } &&
26333 { ac_try='test -s "conftest.$ac_objext"'
26334 { (eval echo "$as_me:26334: \"$ac_try\"") >&5
26335 (eval $ac_try) 2>&5
26336 ac_status=$?
26337 echo "$as_me:26337: \$? = $ac_status" >&5
26338 (exit "$ac_status"); }; }; then
26339 ac_hi=$ac_mid; break
26340else
26341 echo "$as_me: failed program was:" >&5
26342cat "conftest.$ac_ext" >&5
26343ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26344fi
26345rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26346 done
26347else
26348 echo "$as_me: failed program was:" >&5
26349cat "conftest.$ac_ext" >&5
26350ac_hi=-1 ac_mid=-1
26351 while :; do
26352 cat >"conftest.$ac_ext" <<_ACEOF
26353#line 26353 "configure"
26354#include "confdefs.h"
26355
26356$ac_includes_default
26357
26358#if defined(__cplusplus)
26359
26360#ifdef HAVE_GXX_BUILTIN_H
26361#include <g++/builtin.h>
26362#elif HAVE_GPP_BUILTIN_H
26363#include <gpp/builtin.h>
26364#elif HAVE_BUILTIN_H
26365#include <builtin.h>
26366#endif
26367
26368#else
26369
26370#if $cf_cv_header_stdbool_h
26371#include <stdbool.h>
26372#endif
26373
26374#endif
26375
26376int
26377main (void)
26378{
26379int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26380 ;
26381 return 0;
26382}
26383_ACEOF
26384rm -f "conftest.$ac_objext"
26385if { (eval echo "$as_me:26385: \"$ac_compile\"") >&5
26386 (eval $ac_compile) 2>&5
26387 ac_status=$?
26388 echo "$as_me:26388: \$? = $ac_status" >&5
26389 (exit "$ac_status"); } &&
26390 { ac_try='test -s "conftest.$ac_objext"'
26391 { (eval echo "$as_me:26391: \"$ac_try\"") >&5
26392 (eval $ac_try) 2>&5
26393 ac_status=$?
26394 echo "$as_me:26394: \$? = $ac_status" >&5
26395 (exit "$ac_status"); }; }; then
26396 ac_lo=$ac_mid; break
26397else
26398 echo "$as_me: failed program was:" >&5
26399cat "conftest.$ac_ext" >&5
26400ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26401fi
26402rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26403 done
26404fi
26405rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26406# Binary search between lo and hi bounds.
26407while test "x$ac_lo" != "x$ac_hi"; do
26408 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26409 cat >"conftest.$ac_ext" <<_ACEOF
26410#line 26410 "configure"
26411#include "confdefs.h"
26412
26413$ac_includes_default
26414
26415#if defined(__cplusplus)
26416
26417#ifdef HAVE_GXX_BUILTIN_H
26418#include <g++/builtin.h>
26419#elif HAVE_GPP_BUILTIN_H
26420#include <gpp/builtin.h>
26421#elif HAVE_BUILTIN_H
26422#include <builtin.h>
26423#endif
26424
26425#else
26426
26427#if $cf_cv_header_stdbool_h
26428#include <stdbool.h>
26429#endif
26430
26431#endif
26432
26433int
26434main (void)
26435{
26436int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26437 ;
26438 return 0;
26439}
26440_ACEOF
26441rm -f "conftest.$ac_objext"
26442if { (eval echo "$as_me:26442: \"$ac_compile\"") >&5
26443 (eval $ac_compile) 2>&5
26444 ac_status=$?
26445 echo "$as_me:26445: \$? = $ac_status" >&5
26446 (exit "$ac_status"); } &&
26447 { ac_try='test -s "conftest.$ac_objext"'
26448 { (eval echo "$as_me:26448: \"$ac_try\"") >&5
26449 (eval $ac_try) 2>&5
26450 ac_status=$?
26451 echo "$as_me:26451: \$? = $ac_status" >&5
26452 (exit "$ac_status"); }; }; then
26453 ac_hi=$ac_mid
26454else
26455 echo "$as_me: failed program was:" >&5
26456cat "conftest.$ac_ext" >&5
26457ac_lo=`expr "$ac_mid" + 1`
26458fi
26459rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26460done
26461ac_cv_sizeof_bool=$ac_lo
26462else
26463 if test "$cross_compiling" = yes; then
26464 { { echo "$as_me:26464: error: cannot run test program while cross compiling" >&5
26465echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26466 { (exit 1); exit 1; }; }
26467else
26468 cat >"conftest.$ac_ext" <<_ACEOF
26469#line 26469 "configure"
26470#include "confdefs.h"
26471
26472$ac_includes_default
26473
26474#if defined(__cplusplus)
26475
26476#ifdef HAVE_GXX_BUILTIN_H
26477#include <g++/builtin.h>
26478#elif HAVE_GPP_BUILTIN_H
26479#include <gpp/builtin.h>
26480#elif HAVE_BUILTIN_H
26481#include <builtin.h>
26482#endif
26483
26484#else
26485
26486#if $cf_cv_header_stdbool_h
26487#include <stdbool.h>
26488#endif
26489
26490#endif
26491
26492int
26493main (void)
26494{
26495FILE *f = fopen ("conftest.val", "w");
26496if (!f)
26497 $ac_main_return (1);
26498fprintf (f, "%ld", (long)(sizeof (bool)));
26499fclose (f);
26500 ;
26501 return 0;
26502}
26503_ACEOF
26504rm -f "conftest$ac_exeext"
26505if { (eval echo "$as_me:26505: \"$ac_link\"") >&5
26506 (eval $ac_link) 2>&5
26507 ac_status=$?
26508 echo "$as_me:26508: \$? = $ac_status" >&5
26509 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26510 { (eval echo "$as_me:26510: \"$ac_try\"") >&5
26511 (eval $ac_try) 2>&5
26512 ac_status=$?
26513 echo "$as_me:26513: \$? = $ac_status" >&5
26514 (exit "$ac_status"); }; }; then
26515 ac_cv_sizeof_bool=`cat conftest.val`
26516else
26517 echo "$as_me: program exited with status $ac_status" >&5
26518echo "$as_me: failed program was:" >&5
26519cat "conftest.$ac_ext" >&5
26520fi
26521rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26522fi
26523fi
26524rm -f conftest.val
26525else
26526 ac_cv_sizeof_bool=0
26527fi
26528fi
26529echo "$as_me:26529: result: $ac_cv_sizeof_bool" >&5
26530echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26531cat >>confdefs.h <<EOF
26532#define SIZEOF_BOOL $ac_cv_sizeof_bool
26533EOF
26534
26535echo "$as_me:26535: checking for type of bool" >&5
26536echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26537if test "${cf_cv_type_of_bool+set}" = set; then
26538 echo $ECHO_N "(cached) $ECHO_C" >&6
26539else
26540
26541 rm -f cf_test.out
26542 if test "$cross_compiling" = yes; then
26543
26544 case x$ac_cv_sizeof_bool in
26545 (x1) cf_cv_type_of_bool="unsigned char";;
26546 (x2) cf_cv_type_of_bool="unsigned short";;
26547 (x4) cf_cv_type_of_bool="unsigned int";;
26548 (x8) cf_cv_type_of_bool="unsigned long";;
26549 (*) cf_cv_type_of_bool=unknown;;
26550 esac
26551
26552else
26553 cat >"conftest.$ac_ext" <<_ACEOF
26554#line 26554 "configure"
26555#include "confdefs.h"
26556
26557$ac_includes_default
26558
26559#if defined(__cplusplus)
26560
26561#ifdef HAVE_GXX_BUILTIN_H
26562#include <g++/builtin.h>
26563#elif HAVE_GPP_BUILTIN_H
26564#include <gpp/builtin.h>
26565#elif HAVE_BUILTIN_H
26566#include <builtin.h>
26567#endif
26568
26569#else
26570
26571#if $cf_cv_header_stdbool_h
26572#include <stdbool.h>
26573#endif
26574
26575#endif
26576
26577int main(void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026578{
26579 FILE *fp = fopen("cf_test.out", "w");
26580 if (fp != 0) {
26581 bool x = true;
26582 if ((bool)(-x) >= 0)
26583 fputs("unsigned ", fp);
26584 if (sizeof(x) == sizeof(int)) fputs("int", fp);
26585 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26586 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26587 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26588 fclose(fp);
26589 }
26590 ${cf_cv_main_return:-return}(0);
26591}
26592
26593_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026594rm -f "conftest$ac_exeext"
26595if { (eval echo "$as_me:26595: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026596 (eval $ac_link) 2>&5
26597 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026598 echo "$as_me:26598: \$? = $ac_status" >&5
26599 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26600 { (eval echo "$as_me:26600: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026601 (eval $ac_try) 2>&5
26602 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026603 echo "$as_me:26603: \$? = $ac_status" >&5
26604 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026605 cf_cv_type_of_bool=`cat cf_test.out`
26606 if test -z "$cf_cv_type_of_bool"; then
26607 cf_cv_type_of_bool=unknown
26608 fi
26609else
26610 echo "$as_me: program exited with status $ac_status" >&5
26611echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026612cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026613cf_cv_type_of_bool=unknown
26614fi
micky3879b9f5e72025-07-08 18:04:53 -040026615rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026616fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026617 rm -f cf_test.out
micky3879b9f5e72025-07-08 18:04:53 -040026618
26619fi
26620echo "$as_me:26620: result: $cf_cv_type_of_bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026621echo "${ECHO_T}$cf_cv_type_of_bool" >&6
micky3879b9f5e72025-07-08 18:04:53 -040026622
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026623if test "$cf_cv_type_of_bool" = unknown ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010026624 case .$NCURSES_BOOL in
26625 (.auto|.) NCURSES_BOOL=unsigned;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026626 esac
micky3879b9f5e72025-07-08 18:04:53 -040026627 { echo "$as_me:26627: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026628echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26629 cf_cv_type_of_bool=$NCURSES_BOOL
26630fi
26631
micky3879b9f5e72025-07-08 18:04:53 -040026632echo "$as_me:26632: checking for special defines needed for etip.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026633echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26634cf_save_CXXFLAGS="$CXXFLAGS"
26635cf_result="none"
Steve Kondikae271bc2015-11-15 02:50:53 +010026636
26637# etip.h includes ncurses.h which includes ncurses_dll.h
26638# But ncurses_dll.h is generated - fix here.
26639test -d include || mkdir include
micky3879b9f5e72025-07-08 18:04:53 -040026640test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' "${srcdir}/include/ncurses_dll.h.in" >include/ncurses_dll.h
Steve Kondikae271bc2015-11-15 02:50:53 +010026641
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026642for cf_math in "" MATH_H
26643do
26644for cf_excp in "" MATH_EXCEPTION
26645do
Steve Kondikae271bc2015-11-15 02:50:53 +010026646 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026647 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26648 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
micky3879b9f5e72025-07-08 18:04:53 -040026649cat >"conftest.$ac_ext" <<_ACEOF
26650#line 26650 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026651#include "confdefs.h"
26652
26653#include <etip.h.in>
26654
26655int
micky3879b9f5e72025-07-08 18:04:53 -040026656main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026657{
26658
26659 ;
26660 return 0;
26661}
26662_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026663rm -f "conftest.$ac_objext"
26664if { (eval echo "$as_me:26664: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026665 (eval $ac_compile) 2>&5
26666 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026667 echo "$as_me:26667: \$? = $ac_status" >&5
26668 (exit "$ac_status"); } &&
26669 { ac_try='test -s "conftest.$ac_objext"'
26670 { (eval echo "$as_me:26670: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026671 (eval $ac_try) 2>&5
26672 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026673 echo "$as_me:26673: \$? = $ac_status" >&5
26674 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026675
26676 test -n "$cf_math" && cat >>confdefs.h <<EOF
26677#define ETIP_NEEDS_${cf_math} 1
26678EOF
26679
26680 test -n "$cf_excp" && cat >>confdefs.h <<EOF
26681#define ETIP_NEEDS_${cf_excp} 1
26682EOF
26683
26684 cf_result="$cf_math $cf_excp"
Steve Kondikae271bc2015-11-15 02:50:53 +010026685 break 2
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026686
26687else
26688 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026689cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026690fi
micky3879b9f5e72025-07-08 18:04:53 -040026691rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026692done
26693done
micky3879b9f5e72025-07-08 18:04:53 -040026694echo "$as_me:26694: result: ${cf_result:-(none)}" >&5
26695echo "${ECHO_T}${cf_result:-(none)}" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026696CXXFLAGS="$cf_save_CXXFLAGS"
26697
26698if test -n "$CXX"; then
micky3879b9f5e72025-07-08 18:04:53 -040026699echo "$as_me:26699: checking if $CXX accepts override keyword" >&5
26700echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26701if test "${cf_cv_cpp_override+set}" = set; then
26702 echo $ECHO_N "(cached) $ECHO_C" >&6
26703else
26704
26705 ac_ext=cc
26706ac_cpp='$CXXCPP $CPPFLAGS'
26707ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26708ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26709ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26710ac_main_return="return"
26711
26712 if test "$cross_compiling" = yes; then
26713 cf_cv_cpp_override=unknown
26714else
26715 cat >"conftest.$ac_ext" <<_ACEOF
26716#line 26716 "configure"
26717#include "confdefs.h"
26718
26719class base
26720{
26721public:
26722 virtual int foo(float x) = 0;
26723};
26724
26725class derived: public base
26726{
26727public:
26728 int foo(float x) override { return x != 0.0 ? 1 : 0; }
26729};
26730
26731int main(void) { }
26732
26733_ACEOF
26734rm -f "conftest$ac_exeext"
26735if { (eval echo "$as_me:26735: \"$ac_link\"") >&5
26736 (eval $ac_link) 2>&5
26737 ac_status=$?
26738 echo "$as_me:26738: \$? = $ac_status" >&5
26739 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26740 { (eval echo "$as_me:26740: \"$ac_try\"") >&5
26741 (eval $ac_try) 2>&5
26742 ac_status=$?
26743 echo "$as_me:26743: \$? = $ac_status" >&5
26744 (exit "$ac_status"); }; }; then
26745 cf_cv_cpp_override=yes
26746else
26747 echo "$as_me: program exited with status $ac_status" >&5
26748echo "$as_me: failed program was:" >&5
26749cat "conftest.$ac_ext" >&5
26750cf_cv_cpp_override=no
26751fi
26752rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26753fi
26754 ac_ext=cc
26755ac_cpp='$CXXCPP $CPPFLAGS'
26756ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26757ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26758ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26759ac_main_return="return"
26760
26761fi
26762echo "$as_me:26762: result: $cf_cv_cpp_override" >&5
26763echo "${ECHO_T}$cf_cv_cpp_override" >&6
26764fi
26765test "$cf_cv_cpp_override" = yes &&
26766cat >>confdefs.h <<\EOF
26767#define CPP_HAS_OVERRIDE 1
26768EOF
26769
26770if test -n "$CXX"; then
26771echo "$as_me:26771: checking if $CXX accepts parameter initialization" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026772echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26773if test "${cf_cv_cpp_param_init+set}" = set; then
26774 echo $ECHO_N "(cached) $ECHO_C" >&6
26775else
26776
26777 ac_ext=cc
26778ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040026779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26780ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040026782ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026783
26784 if test "$cross_compiling" = yes; then
26785 cf_cv_cpp_param_init=unknown
26786else
micky3879b9f5e72025-07-08 18:04:53 -040026787 cat >"conftest.$ac_ext" <<_ACEOF
26788#line 26788 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026789#include "confdefs.h"
26790
26791class TEST {
26792private:
26793 int value;
26794public:
26795 TEST(int x = 1);
26796 ~TEST();
26797};
26798
26799TEST::TEST(int x = 1) // some compilers do not like second initializer
26800{
26801 value = x;
26802}
micky3879b9f5e72025-07-08 18:04:53 -040026803int main(void) { }
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026804
26805_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026806rm -f "conftest$ac_exeext"
26807if { (eval echo "$as_me:26807: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026808 (eval $ac_link) 2>&5
26809 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026810 echo "$as_me:26810: \$? = $ac_status" >&5
26811 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26812 { (eval echo "$as_me:26812: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026813 (eval $ac_try) 2>&5
26814 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026815 echo "$as_me:26815: \$? = $ac_status" >&5
26816 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026817 cf_cv_cpp_param_init=yes
26818else
26819 echo "$as_me: program exited with status $ac_status" >&5
26820echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026821cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026822cf_cv_cpp_param_init=no
26823fi
micky3879b9f5e72025-07-08 18:04:53 -040026824rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026825fi
26826 ac_ext=cc
26827ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040026828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26829ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040026831ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026832
26833fi
micky3879b9f5e72025-07-08 18:04:53 -040026834echo "$as_me:26834: result: $cf_cv_cpp_param_init" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026835echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26836fi
Steve Kondikae271bc2015-11-15 02:50:53 +010026837test "$cf_cv_cpp_param_init" = yes &&
26838cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026839#define CPP_HAS_PARAM_INIT 1
26840EOF
26841
26842if test -n "$CXX"; then
26843
micky3879b9f5e72025-07-08 18:04:53 -040026844echo "$as_me:26844: checking if $CXX accepts static_cast" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026845echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26846if test "${cf_cv_cpp_static_cast+set}" = set; then
26847 echo $ECHO_N "(cached) $ECHO_C" >&6
26848else
26849
26850 ac_ext=cc
26851ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040026852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26853ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040026855ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026856
micky3879b9f5e72025-07-08 18:04:53 -040026857 cat >"conftest.$ac_ext" <<_ACEOF
26858#line 26858 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026859#include "confdefs.h"
26860
26861class NCursesPanel
26862{
26863public:
26864 NCursesPanel(int nlines,
26865 int ncols,
26866 int begin_y = 0,
26867 int begin_x = 0)
26868 {
26869 }
Steve Kondikae271bc2015-11-15 02:50:53 +010026870 NCursesPanel();
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026871 ~NCursesPanel();
26872};
26873
26874template<class T> class NCursesUserPanel : public NCursesPanel
26875{
26876public:
26877 NCursesUserPanel (int nlines,
26878 int ncols,
26879 int begin_y = 0,
26880 int begin_x = 0,
26881 const T* p_UserData = static_cast<T*>(0))
26882 : NCursesPanel (nlines, ncols, begin_y, begin_x)
26883 {
26884 };
26885 NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26886 {
26887 };
26888
26889 virtual ~NCursesUserPanel() {};
26890};
26891
26892int
micky3879b9f5e72025-07-08 18:04:53 -040026893main (void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026894{
26895
26896 const char* p_UserData = static_cast<char*>(0)
26897 ;
26898 return 0;
26899}
26900_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040026901rm -f "conftest.$ac_objext"
26902if { (eval echo "$as_me:26902: \"$ac_compile\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026903 (eval $ac_compile) 2>&5
26904 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026905 echo "$as_me:26905: \$? = $ac_status" >&5
26906 (exit "$ac_status"); } &&
26907 { ac_try='test -s "conftest.$ac_objext"'
26908 { (eval echo "$as_me:26908: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026909 (eval $ac_try) 2>&5
26910 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040026911 echo "$as_me:26911: \$? = $ac_status" >&5
26912 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026913 cf_cv_cpp_static_cast=yes
26914else
26915 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040026916cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026917cf_cv_cpp_static_cast=no
26918fi
micky3879b9f5e72025-07-08 18:04:53 -040026919rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026920
26921 ac_ext=cc
26922ac_cpp='$CXXCPP $CPPFLAGS'
micky3879b9f5e72025-07-08 18:04:53 -040026923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26924ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
micky3879b9f5e72025-07-08 18:04:53 -040026926ac_main_return="return"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026927
26928fi
micky3879b9f5e72025-07-08 18:04:53 -040026929echo "$as_me:26929: result: $cf_cv_cpp_static_cast" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026930echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26931
26932fi
26933
Steve Kondikae271bc2015-11-15 02:50:53 +010026934test "$cf_cv_cpp_static_cast" = yes &&
26935cat >>confdefs.h <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026936#define CPP_HAS_STATIC_CAST 1
26937EOF
26938
26939 CXX_AR='$(AR)'
Steve Kondikae271bc2015-11-15 02:50:53 +010026940 CXX_ARFLAGS='$(ARFLAGS)'
micky3879b9f5e72025-07-08 18:04:53 -040026941 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010026942 (irix*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026943 if test "$GXX" != yes ; then
26944 CXX_AR='$(CXX)'
Steve Kondikae271bc2015-11-15 02:50:53 +010026945 CXX_ARFLAGS='-ar -o'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026946 fi
26947 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010026948 (sco3.2v5*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026949 CXXLDFLAGS="-u main"
26950 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010026951 (solaris2*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026952 if test "$GXX" != yes ; then
26953 CXX_AR='$(CXX)'
Steve Kondikae271bc2015-11-15 02:50:53 +010026954 CXX_ARFLAGS='-xar -o'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026955 fi
26956 ;;
26957 esac
26958
26959else
26960 cf_cxx_library=no
26961 cf_cv_builtin_bool=1
26962
26963 # Just because we are not configuring against C++ right now does not
26964 # mean that a user will not want to use C++. Some distributors disable
26965 # the C++ portion of this configuration as a shortcut (or just to avoid
26966 # compiling the demo in the c++ directory). So we need a reasonable
26967 # default for the 'bool' type.
26968 #
26969 # Caveat: since the storage of the bool type is not standardized, it
26970 # may change.
26971
26972 if test "$NCURSES_BOOL" != auto ; then
26973 cf_cv_type_of_bool=$NCURSES_BOOL
26974 cf_cv_header_stdbool_h=0
26975 else
26976 if test "$cf_cv_header_stdbool_h" = 1 ; then
26977
micky3879b9f5e72025-07-08 18:04:53 -040026978echo "$as_me:26978: checking for bool" >&5
26979echo $ECHO_N "checking for bool... $ECHO_C" >&6
26980if test "${ac_cv_type_bool+set}" = set; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026981 echo $ECHO_N "(cached) $ECHO_C" >&6
26982else
micky3879b9f5e72025-07-08 18:04:53 -040026983 cat >"conftest.$ac_ext" <<_ACEOF
26984#line 26984 "configure"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026985#include "confdefs.h"
26986
micky3879b9f5e72025-07-08 18:04:53 -040026987$ac_includes_default
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053026988
26989#if defined(__cplusplus)
26990
26991#ifdef HAVE_GXX_BUILTIN_H
26992#include <g++/builtin.h>
26993#elif HAVE_GPP_BUILTIN_H
26994#include <gpp/builtin.h>
26995#elif HAVE_BUILTIN_H
26996#include <builtin.h>
26997#endif
26998
26999#else
27000
27001#if $cf_cv_header_stdbool_h
27002#include <stdbool.h>
27003#endif
27004
27005#endif
27006
micky3879b9f5e72025-07-08 18:04:53 -040027007int
27008main (void)
27009{
27010if ((bool *) 0)
27011 return 0;
27012if (sizeof (bool))
27013 return 0;
27014 ;
27015 return 0;
27016}
27017_ACEOF
27018rm -f "conftest.$ac_objext"
27019if { (eval echo "$as_me:27019: \"$ac_compile\"") >&5
27020 (eval $ac_compile) 2>&5
27021 ac_status=$?
27022 echo "$as_me:27022: \$? = $ac_status" >&5
27023 (exit "$ac_status"); } &&
27024 { ac_try='test -s "conftest.$ac_objext"'
27025 { (eval echo "$as_me:27025: \"$ac_try\"") >&5
27026 (eval $ac_try) 2>&5
27027 ac_status=$?
27028 echo "$as_me:27028: \$? = $ac_status" >&5
27029 (exit "$ac_status"); }; }; then
27030 ac_cv_type_bool=yes
27031else
27032 echo "$as_me: failed program was:" >&5
27033cat "conftest.$ac_ext" >&5
27034ac_cv_type_bool=no
27035fi
27036rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27037fi
27038echo "$as_me:27038: result: $ac_cv_type_bool" >&5
27039echo "${ECHO_T}$ac_cv_type_bool" >&6
27040
27041echo "$as_me:27041: checking size of bool" >&5
27042echo $ECHO_N "checking size of bool... $ECHO_C" >&6
27043if test "${ac_cv_sizeof_bool+set}" = set; then
27044 echo $ECHO_N "(cached) $ECHO_C" >&6
27045else
27046 if test "$ac_cv_type_bool" = yes; then
27047 if test "$cross_compiling" = yes; then
27048 # Depending upon the size, compute the lo and hi bounds.
27049cat >"conftest.$ac_ext" <<_ACEOF
27050#line 27050 "configure"
27051#include "confdefs.h"
27052
27053$ac_includes_default
27054
27055#if defined(__cplusplus)
27056
27057#ifdef HAVE_GXX_BUILTIN_H
27058#include <g++/builtin.h>
27059#elif HAVE_GPP_BUILTIN_H
27060#include <gpp/builtin.h>
27061#elif HAVE_BUILTIN_H
27062#include <builtin.h>
27063#endif
27064
27065#else
27066
27067#if $cf_cv_header_stdbool_h
27068#include <stdbool.h>
27069#endif
27070
27071#endif
27072
27073int
27074main (void)
27075{
27076int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
27077 ;
27078 return 0;
27079}
27080_ACEOF
27081rm -f "conftest.$ac_objext"
27082if { (eval echo "$as_me:27082: \"$ac_compile\"") >&5
27083 (eval $ac_compile) 2>&5
27084 ac_status=$?
27085 echo "$as_me:27085: \$? = $ac_status" >&5
27086 (exit "$ac_status"); } &&
27087 { ac_try='test -s "conftest.$ac_objext"'
27088 { (eval echo "$as_me:27088: \"$ac_try\"") >&5
27089 (eval $ac_try) 2>&5
27090 ac_status=$?
27091 echo "$as_me:27091: \$? = $ac_status" >&5
27092 (exit "$ac_status"); }; }; then
27093 ac_lo=0 ac_mid=0
27094 while :; do
27095 cat >"conftest.$ac_ext" <<_ACEOF
27096#line 27096 "configure"
27097#include "confdefs.h"
27098
27099$ac_includes_default
27100
27101#if defined(__cplusplus)
27102
27103#ifdef HAVE_GXX_BUILTIN_H
27104#include <g++/builtin.h>
27105#elif HAVE_GPP_BUILTIN_H
27106#include <gpp/builtin.h>
27107#elif HAVE_BUILTIN_H
27108#include <builtin.h>
27109#endif
27110
27111#else
27112
27113#if $cf_cv_header_stdbool_h
27114#include <stdbool.h>
27115#endif
27116
27117#endif
27118
27119int
27120main (void)
27121{
27122int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27123 ;
27124 return 0;
27125}
27126_ACEOF
27127rm -f "conftest.$ac_objext"
27128if { (eval echo "$as_me:27128: \"$ac_compile\"") >&5
27129 (eval $ac_compile) 2>&5
27130 ac_status=$?
27131 echo "$as_me:27131: \$? = $ac_status" >&5
27132 (exit "$ac_status"); } &&
27133 { ac_try='test -s "conftest.$ac_objext"'
27134 { (eval echo "$as_me:27134: \"$ac_try\"") >&5
27135 (eval $ac_try) 2>&5
27136 ac_status=$?
27137 echo "$as_me:27137: \$? = $ac_status" >&5
27138 (exit "$ac_status"); }; }; then
27139 ac_hi=$ac_mid; break
27140else
27141 echo "$as_me: failed program was:" >&5
27142cat "conftest.$ac_ext" >&5
27143ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27144fi
27145rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27146 done
27147else
27148 echo "$as_me: failed program was:" >&5
27149cat "conftest.$ac_ext" >&5
27150ac_hi=-1 ac_mid=-1
27151 while :; do
27152 cat >"conftest.$ac_ext" <<_ACEOF
27153#line 27153 "configure"
27154#include "confdefs.h"
27155
27156$ac_includes_default
27157
27158#if defined(__cplusplus)
27159
27160#ifdef HAVE_GXX_BUILTIN_H
27161#include <g++/builtin.h>
27162#elif HAVE_GPP_BUILTIN_H
27163#include <gpp/builtin.h>
27164#elif HAVE_BUILTIN_H
27165#include <builtin.h>
27166#endif
27167
27168#else
27169
27170#if $cf_cv_header_stdbool_h
27171#include <stdbool.h>
27172#endif
27173
27174#endif
27175
27176int
27177main (void)
27178{
27179int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27180 ;
27181 return 0;
27182}
27183_ACEOF
27184rm -f "conftest.$ac_objext"
27185if { (eval echo "$as_me:27185: \"$ac_compile\"") >&5
27186 (eval $ac_compile) 2>&5
27187 ac_status=$?
27188 echo "$as_me:27188: \$? = $ac_status" >&5
27189 (exit "$ac_status"); } &&
27190 { ac_try='test -s "conftest.$ac_objext"'
27191 { (eval echo "$as_me:27191: \"$ac_try\"") >&5
27192 (eval $ac_try) 2>&5
27193 ac_status=$?
27194 echo "$as_me:27194: \$? = $ac_status" >&5
27195 (exit "$ac_status"); }; }; then
27196 ac_lo=$ac_mid; break
27197else
27198 echo "$as_me: failed program was:" >&5
27199cat "conftest.$ac_ext" >&5
27200ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27201fi
27202rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27203 done
27204fi
27205rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27206# Binary search between lo and hi bounds.
27207while test "x$ac_lo" != "x$ac_hi"; do
27208 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27209 cat >"conftest.$ac_ext" <<_ACEOF
27210#line 27210 "configure"
27211#include "confdefs.h"
27212
27213$ac_includes_default
27214
27215#if defined(__cplusplus)
27216
27217#ifdef HAVE_GXX_BUILTIN_H
27218#include <g++/builtin.h>
27219#elif HAVE_GPP_BUILTIN_H
27220#include <gpp/builtin.h>
27221#elif HAVE_BUILTIN_H
27222#include <builtin.h>
27223#endif
27224
27225#else
27226
27227#if $cf_cv_header_stdbool_h
27228#include <stdbool.h>
27229#endif
27230
27231#endif
27232
27233int
27234main (void)
27235{
27236int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27237 ;
27238 return 0;
27239}
27240_ACEOF
27241rm -f "conftest.$ac_objext"
27242if { (eval echo "$as_me:27242: \"$ac_compile\"") >&5
27243 (eval $ac_compile) 2>&5
27244 ac_status=$?
27245 echo "$as_me:27245: \$? = $ac_status" >&5
27246 (exit "$ac_status"); } &&
27247 { ac_try='test -s "conftest.$ac_objext"'
27248 { (eval echo "$as_me:27248: \"$ac_try\"") >&5
27249 (eval $ac_try) 2>&5
27250 ac_status=$?
27251 echo "$as_me:27251: \$? = $ac_status" >&5
27252 (exit "$ac_status"); }; }; then
27253 ac_hi=$ac_mid
27254else
27255 echo "$as_me: failed program was:" >&5
27256cat "conftest.$ac_ext" >&5
27257ac_lo=`expr "$ac_mid" + 1`
27258fi
27259rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27260done
27261ac_cv_sizeof_bool=$ac_lo
27262else
27263 if test "$cross_compiling" = yes; then
27264 { { echo "$as_me:27264: error: cannot run test program while cross compiling" >&5
27265echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27266 { (exit 1); exit 1; }; }
27267else
27268 cat >"conftest.$ac_ext" <<_ACEOF
27269#line 27269 "configure"
27270#include "confdefs.h"
27271
27272$ac_includes_default
27273
27274#if defined(__cplusplus)
27275
27276#ifdef HAVE_GXX_BUILTIN_H
27277#include <g++/builtin.h>
27278#elif HAVE_GPP_BUILTIN_H
27279#include <gpp/builtin.h>
27280#elif HAVE_BUILTIN_H
27281#include <builtin.h>
27282#endif
27283
27284#else
27285
27286#if $cf_cv_header_stdbool_h
27287#include <stdbool.h>
27288#endif
27289
27290#endif
27291
27292int
27293main (void)
27294{
27295FILE *f = fopen ("conftest.val", "w");
27296if (!f)
27297 $ac_main_return (1);
27298fprintf (f, "%ld", (long)(sizeof (bool)));
27299fclose (f);
27300 ;
27301 return 0;
27302}
27303_ACEOF
27304rm -f "conftest$ac_exeext"
27305if { (eval echo "$as_me:27305: \"$ac_link\"") >&5
27306 (eval $ac_link) 2>&5
27307 ac_status=$?
27308 echo "$as_me:27308: \$? = $ac_status" >&5
27309 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27310 { (eval echo "$as_me:27310: \"$ac_try\"") >&5
27311 (eval $ac_try) 2>&5
27312 ac_status=$?
27313 echo "$as_me:27313: \$? = $ac_status" >&5
27314 (exit "$ac_status"); }; }; then
27315 ac_cv_sizeof_bool=`cat conftest.val`
27316else
27317 echo "$as_me: program exited with status $ac_status" >&5
27318echo "$as_me: failed program was:" >&5
27319cat "conftest.$ac_ext" >&5
27320fi
27321rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27322fi
27323fi
27324rm -f conftest.val
27325else
27326 ac_cv_sizeof_bool=0
27327fi
27328fi
27329echo "$as_me:27329: result: $ac_cv_sizeof_bool" >&5
27330echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27331cat >>confdefs.h <<EOF
27332#define SIZEOF_BOOL $ac_cv_sizeof_bool
27333EOF
27334
27335echo "$as_me:27335: checking for type of bool" >&5
27336echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27337if test "${cf_cv_type_of_bool+set}" = set; then
27338 echo $ECHO_N "(cached) $ECHO_C" >&6
27339else
27340
27341 rm -f cf_test.out
27342 if test "$cross_compiling" = yes; then
27343
27344 case x$ac_cv_sizeof_bool in
27345 (x1) cf_cv_type_of_bool="unsigned char";;
27346 (x2) cf_cv_type_of_bool="unsigned short";;
27347 (x4) cf_cv_type_of_bool="unsigned int";;
27348 (x8) cf_cv_type_of_bool="unsigned long";;
27349 (*) cf_cv_type_of_bool=unknown;;
27350 esac
27351
27352else
27353 cat >"conftest.$ac_ext" <<_ACEOF
27354#line 27354 "configure"
27355#include "confdefs.h"
27356
27357$ac_includes_default
27358
27359#if defined(__cplusplus)
27360
27361#ifdef HAVE_GXX_BUILTIN_H
27362#include <g++/builtin.h>
27363#elif HAVE_GPP_BUILTIN_H
27364#include <gpp/builtin.h>
27365#elif HAVE_BUILTIN_H
27366#include <builtin.h>
27367#endif
27368
27369#else
27370
27371#if $cf_cv_header_stdbool_h
27372#include <stdbool.h>
27373#endif
27374
27375#endif
27376
27377int main(void)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027378{
27379 FILE *fp = fopen("cf_test.out", "w");
27380 if (fp != 0) {
27381 bool x = true;
27382 if ((bool)(-x) >= 0)
27383 fputs("unsigned ", fp);
27384 if (sizeof(x) == sizeof(int)) fputs("int", fp);
27385 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27386 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27387 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27388 fclose(fp);
27389 }
27390 ${cf_cv_main_return:-return}(0);
27391}
27392
27393_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040027394rm -f "conftest$ac_exeext"
27395if { (eval echo "$as_me:27395: \"$ac_link\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027396 (eval $ac_link) 2>&5
27397 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040027398 echo "$as_me:27398: \$? = $ac_status" >&5
27399 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27400 { (eval echo "$as_me:27400: \"$ac_try\"") >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027401 (eval $ac_try) 2>&5
27402 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040027403 echo "$as_me:27403: \$? = $ac_status" >&5
27404 (exit "$ac_status"); }; }; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027405 cf_cv_type_of_bool=`cat cf_test.out`
27406 if test -z "$cf_cv_type_of_bool"; then
27407 cf_cv_type_of_bool=unknown
27408 fi
27409else
27410 echo "$as_me: program exited with status $ac_status" >&5
27411echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040027412cat "conftest.$ac_ext" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027413cf_cv_type_of_bool=unknown
27414fi
micky3879b9f5e72025-07-08 18:04:53 -040027415rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027416fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027417 rm -f cf_test.out
micky3879b9f5e72025-07-08 18:04:53 -040027418
27419fi
27420echo "$as_me:27420: result: $cf_cv_type_of_bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027421echo "${ECHO_T}$cf_cv_type_of_bool" >&6
micky3879b9f5e72025-07-08 18:04:53 -040027422
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027423if test "$cf_cv_type_of_bool" = unknown ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010027424 case .$NCURSES_BOOL in
27425 (.auto|.) NCURSES_BOOL=unsigned;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027426 esac
micky3879b9f5e72025-07-08 18:04:53 -040027427 { echo "$as_me:27427: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027428echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27429 cf_cv_type_of_bool=$NCURSES_BOOL
27430fi
27431
27432 else
micky3879b9f5e72025-07-08 18:04:53 -040027433 echo "$as_me:27433: checking for fallback type of bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027434echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010027435 case "$host_cpu" in
27436 (i?86) cf_cv_type_of_bool=char ;;
27437 (*) cf_cv_type_of_bool=int ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027438 esac
micky3879b9f5e72025-07-08 18:04:53 -040027439 echo "$as_me:27439: result: $cf_cv_type_of_bool" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027440echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27441 fi
27442 fi
27443fi
27444
27445# If the C compiler did not declare bool, and we did not determine that the C++
27446# compiler does not declare bool, turn on an ifdef in curses.h that makes the
27447# ncurses library use the same type as C++ bool. Note that this allows one to
27448# specify the type of bool in a configure-script option and postpone
27449# integration with the C++ compiler provided that the types are compatible.
27450USE_CXX_BOOL=1
micky3879b9f5e72025-07-08 18:04:53 -040027451if test "$cf_cv_cc_bool_type" = 1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027452then
27453 # oops: C has a bool. Unlikely, but C++ could differ.
27454 USE_CXX_BOOL=0
micky3879b9f5e72025-07-08 18:04:53 -040027455elif test "$cf_cv_builtin_bool" = 0
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027456then
27457 # C++ has no bool
27458 USE_CXX_BOOL=0
27459else
27460 # this is the normal case
27461 USE_CXX_BOOL='defined(__cplusplus)'
27462fi
27463
27464if test -f "${srcdir}/Ada95/Makefile.in" ; then
27465
Steve Kondikae271bc2015-11-15 02:50:53 +010027466 if test "$cf_with_ada" != "no" ; then
27467 if test "$with_libtool" != "no"; then
micky3879b9f5e72025-07-08 18:04:53 -040027468 { echo "$as_me:27468: WARNING: libtool does not support Ada - disabling feature" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027469echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +010027470 cf_with_ada=no
27471 fi
27472 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027473
Steve Kondikae271bc2015-11-15 02:50:53 +010027474 if test "$cf_with_ada" != "no" ; then
27475
micky3879b9f5e72025-07-08 18:04:53 -040027476for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27477do
27478
27479cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27480
27481 unset ac_cv_path_cf_TEMP_gnat
27482 unset cf_TEMP_gnat
27483 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27484set dummy $cf_prog_gnat; ac_word=$2
27485echo "$as_me:27485: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027486echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040027487if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027488 echo $ECHO_N "(cached) $ECHO_C" >&6
27489else
micky3879b9f5e72025-07-08 18:04:53 -040027490 case $cf_TEMP_gnat in
27491 [\\/]* | ?:[\\/]*)
27492 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27493 ;;
27494 *)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027495 ac_save_IFS=$IFS; IFS=$ac_path_separator
27496ac_dummy="$PATH"
27497for ac_dir in $ac_dummy; do
27498 IFS=$ac_save_IFS
27499 test -z "$ac_dir" && ac_dir=.
micky3879b9f5e72025-07-08 18:04:53 -040027500 if $as_executable_p "$ac_dir/$ac_word"; then
27501 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27502 echo "$as_me:27502: found $ac_dir/$ac_word" >&5
27503 break
27504fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027505done
27506
micky3879b9f5e72025-07-08 18:04:53 -040027507 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27508 ;;
27509esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027510fi
micky3879b9f5e72025-07-08 18:04:53 -040027511cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27512
27513if test -n "$cf_TEMP_gnat"; then
27514 echo "$as_me:27514: result: $cf_TEMP_gnat" >&5
27515echo "${ECHO_T}$cf_TEMP_gnat" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027516else
micky3879b9f5e72025-07-08 18:04:53 -040027517 echo "$as_me:27517: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027518echo "${ECHO_T}no" >&6
27519fi
27520
micky3879b9f5e72025-07-08 18:04:53 -040027521 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27522
27523 if test "x$cf_TEMP_gnat" != xno; then
27524 unset cf_cv_gnat_version
27525 unset cf_TEMP_gnat
27526
27527echo "$as_me:27527: checking for $cf_prog_gnat version" >&5
27528echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27529if test "${cf_cv_gnat_version+set}" = set; then
27530 echo $ECHO_N "(cached) $ECHO_C" >&6
27531else
27532
27533cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27534 grep '[0-9].[0-9][0-9]*' |\
27535 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27536
27537fi
27538echo "$as_me:27538: result: $cf_cv_gnat_version" >&5
27539echo "${ECHO_T}$cf_cv_gnat_version" >&6
27540test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27541eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27542
27543 fi
27544 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27545
27546 unset cf_TEMP_gnat
27547 unset cf_cv_gnat_version
27548 unset ac_cv_path_cf_TEMP_gnat
27549done
27550
27551if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010027552 cf_ada_make=
27553 cf_cv_prog_gnat_correct=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027554else
micky3879b9f5e72025-07-08 18:04:53 -040027555 cf_ada_make=gnatmake
27556 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27557 # gprconfig is newer than gnatmake; we can continue...
27558 cf_ada_config="##"
27559 else
27560 rm -rf ./conftest* ./*~conftest*
27561 if mkdir conftest.src
27562 then
27563 cf_ada_config=""
27564 cd conftest.src
27565 for cf_gprconfig in Ada C
27566 do
27567 echo "$as_me:27567: checking for gprconfig name for $cf_gprconfig" >&5
27568echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27569 if test "$cf_gprconfig" = C
27570 then
27571 for cf_gprconfig_param in \
27572 "$cf_gprconfig,,,,GNATGCC" \
27573 "$cf_gprconfig,,,,GCC" \
27574 "$cf_gprconfig"
27575 do
27576 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27577 test -n "$cf_gprconfig_value" && break
27578 done
27579 else
27580 cf_gprconfig_param=$cf_gprconfig
27581 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27582 fi
27583 if test -n "$cf_gprconfig_value"
27584 then
27585 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27586 echo "$as_me:27586: result: $cf_gprconfig_value" >&5
27587echo "${ECHO_T}$cf_gprconfig_value" >&6
27588 else
27589 echo "$as_me:27589: result: missing" >&5
27590echo "${ECHO_T}missing" >&6
27591 cf_ada_config="#"
27592 break
27593 fi
27594 done
27595 cd ..
27596 rm -rf ./conftest* ./*~conftest*
27597 fi
27598 fi
27599 if test "x$cf_ada_config" != "x#"
27600 then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027601
micky3879b9f5e72025-07-08 18:04:53 -040027602echo "$as_me:27602: checking for gnat version" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027603echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040027604if test "${cf_cv_gnat_version+set}" = set; then
27605 echo $ECHO_N "(cached) $ECHO_C" >&6
27606else
27607
27608cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
Steve Kondikae271bc2015-11-15 02:50:53 +010027609 grep '[0-9].[0-9][0-9]*' |\
27610 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027611
micky3879b9f5e72025-07-08 18:04:53 -040027612fi
27613echo "$as_me:27613: result: $cf_cv_gnat_version" >&5
27614echo "${ECHO_T}$cf_cv_gnat_version" >&6
27615test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27616
27617case "$cf_cv_gnat_version" in
27618(3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
Steve Kondikae271bc2015-11-15 02:50:53 +010027619 cf_cv_prog_gnat_correct=yes
27620 ;;
27621(*)
micky3879b9f5e72025-07-08 18:04:53 -040027622 { echo "$as_me:27622: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27623echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
Steve Kondikae271bc2015-11-15 02:50:53 +010027624 cf_cv_prog_gnat_correct=no
27625 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027626esac
27627
micky3879b9f5e72025-07-08 18:04:53 -040027628 # Extract the first word of "m4", so it can be a program name with args.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027629set dummy m4; ac_word=$2
micky3879b9f5e72025-07-08 18:04:53 -040027630echo "$as_me:27630: checking for $ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027631echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27632if test "${ac_cv_prog_M4_exists+set}" = set; then
27633 echo $ECHO_N "(cached) $ECHO_C" >&6
27634else
27635 if test -n "$M4_exists"; then
27636 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27637else
27638 ac_save_IFS=$IFS; IFS=$ac_path_separator
27639ac_dummy="$PATH"
27640for ac_dir in $ac_dummy; do
27641 IFS=$ac_save_IFS
27642 test -z "$ac_dir" && ac_dir=.
27643 $as_executable_p "$ac_dir/$ac_word" || continue
27644ac_cv_prog_M4_exists="yes"
micky3879b9f5e72025-07-08 18:04:53 -040027645echo "$as_me:27645: found $ac_dir/$ac_word" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027646break
27647done
27648
27649 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27650fi
27651fi
27652M4_exists=$ac_cv_prog_M4_exists
27653if test -n "$M4_exists"; then
micky3879b9f5e72025-07-08 18:04:53 -040027654 echo "$as_me:27654: result: $M4_exists" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027655echo "${ECHO_T}$M4_exists" >&6
27656else
micky3879b9f5e72025-07-08 18:04:53 -040027657 echo "$as_me:27657: result: no" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027658echo "${ECHO_T}no" >&6
27659fi
27660
micky3879b9f5e72025-07-08 18:04:53 -040027661 if test "$ac_cv_prog_M4_exists" = no; then
27662 cf_cv_prog_gnat_correct=no
27663 { echo "$as_me:27663: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27664echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27665 fi
27666 if test "$cf_cv_prog_gnat_correct" = yes; then
27667 echo "$as_me:27667: checking if GNAT works" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027668echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27669
micky3879b9f5e72025-07-08 18:04:53 -040027670rm -rf ./conftest* ./*~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027671cat >>conftest.ads <<CF_EOF
27672procedure conftest;
27673CF_EOF
27674cat >>conftest.adb <<CF_EOF
27675with Text_IO;
27676with GNAT.OS_Lib;
27677procedure conftest is
27678begin
27679 Text_IO.Put ("Hello World");
27680 Text_IO.New_Line;
27681 GNAT.OS_Lib.OS_Exit (0);
27682end conftest;
27683CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040027684if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027685 if ( ./conftest 1>&5 2>&1 ) ; then
27686 cf_cv_prog_gnat_correct=yes
27687 else
27688 cf_cv_prog_gnat_correct=no
27689 fi
27690else
27691 cf_cv_prog_gnat_correct=no
27692fi
micky3879b9f5e72025-07-08 18:04:53 -040027693rm -rf ./conftest* ./*~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027694
micky3879b9f5e72025-07-08 18:04:53 -040027695 echo "$as_me:27695: result: $cf_cv_prog_gnat_correct" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027696echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
micky3879b9f5e72025-07-08 18:04:53 -040027697 fi
27698 else
27699 cf_cv_prog_gnat_correct=no
Steve Kondikae271bc2015-11-15 02:50:53 +010027700 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027701fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027702
Steve Kondikae271bc2015-11-15 02:50:53 +010027703 if test "x$cf_cv_prog_gnat_correct" = xyes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027704
Steve Kondikae271bc2015-11-15 02:50:53 +010027705 ADAFLAGS="$ADAFLAGS -gnatpn"
27706
micky3879b9f5e72025-07-08 18:04:53 -040027707 echo "$as_me:27707: checking optimization options for ADAFLAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027708echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27709 case "$CFLAGS" in
27710 (*-g*)
27711
27712 ADAFLAGS="$ADAFLAGS -g"
27713
27714 ;;
27715 esac
27716 case "$CFLAGS" in
27717 (*-O*)
27718 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
27719
27720 ADAFLAGS="$ADAFLAGS $cf_O_flag"
27721
27722 ;;
27723 esac
micky3879b9f5e72025-07-08 18:04:53 -040027724 echo "$as_me:27724: result: $ADAFLAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027725echo "${ECHO_T}$ADAFLAGS" >&6
27726
micky3879b9f5e72025-07-08 18:04:53 -040027727echo "$as_me:27727: checking if GNATPREP supports -T option" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027728echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27729if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27730 echo $ECHO_N "(cached) $ECHO_C" >&6
27731else
27732
27733cf_cv_gnatprep_opt_t=no
27734gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27735
27736fi
micky3879b9f5e72025-07-08 18:04:53 -040027737echo "$as_me:27737: result: $cf_cv_gnatprep_opt_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027738echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27739test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27740
micky3879b9f5e72025-07-08 18:04:53 -040027741echo "$as_me:27741: checking if GNAT supports generics" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027742echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040027743case "$cf_cv_gnat_version" in
27744(3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
Steve Kondikae271bc2015-11-15 02:50:53 +010027745 cf_gnat_generics=yes
27746 ;;
27747(*)
27748 cf_gnat_generics=no
27749 ;;
27750esac
micky3879b9f5e72025-07-08 18:04:53 -040027751echo "$as_me:27751: result: $cf_gnat_generics" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027752echo "${ECHO_T}$cf_gnat_generics" >&6
27753
27754if test "$cf_gnat_generics" = yes
27755then
27756 cf_compile_generics=generics
27757 cf_generic_objects="\${GENOBJS}"
27758else
27759 cf_compile_generics=
27760 cf_generic_objects=
27761fi
27762
micky3879b9f5e72025-07-08 18:04:53 -040027763echo "$as_me:27763: checking if GNAT supports SIGINT" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027764echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27765if test "${cf_cv_gnat_sigint+set}" = set; then
27766 echo $ECHO_N "(cached) $ECHO_C" >&6
27767else
27768
micky3879b9f5e72025-07-08 18:04:53 -040027769rm -rf ./conftest* ./*~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027770cat >>conftest.ads <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010027771with Ada.Interrupts.Names;
27772
27773package ConfTest is
27774
27775 pragma Warnings (Off); -- the next pragma exists since 3.11p
27776 pragma Unreserve_All_Interrupts;
27777 pragma Warnings (On);
27778
27779 protected Process is
27780 procedure Stop;
27781 function Continue return Boolean;
27782 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27783 private
27784 Done : Boolean := False;
27785 end Process;
27786
27787end ConfTest;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027788CF_EOF
27789cat >>conftest.adb <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010027790package body ConfTest is
27791 protected body Process is
27792 procedure Stop is
27793 begin
27794 Done := True;
27795 end Stop;
27796 function Continue return Boolean is
27797 begin
27798 return not Done;
27799 end Continue;
27800 end Process;
27801end ConfTest;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027802CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040027803if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010027804 cf_cv_gnat_sigint=yes
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027805else
Steve Kondikae271bc2015-11-15 02:50:53 +010027806 cf_cv_gnat_sigint=no
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027807fi
micky3879b9f5e72025-07-08 18:04:53 -040027808rm -rf ./conftest* ./*~conftest*
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027809
Steve Kondikae271bc2015-11-15 02:50:53 +010027810fi
micky3879b9f5e72025-07-08 18:04:53 -040027811echo "$as_me:27811: result: $cf_cv_gnat_sigint" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027812echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027813
micky3879b9f5e72025-07-08 18:04:53 -040027814if test "$cf_cv_gnat_sigint" = yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010027815 USE_GNAT_SIGINT=""
27816else
27817 USE_GNAT_SIGINT="#"
27818fi
27819
27820cf_gnat_libraries=no
27821cf_gnat_projects=no
27822
27823if test "$enable_gnat_projects" != no ; then
micky3879b9f5e72025-07-08 18:04:53 -040027824echo "$as_me:27824: checking if GNAT supports project files" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027825echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040027826case "$cf_cv_gnat_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +010027827(3.[0-9]*)
27828 ;;
27829(*)
micky3879b9f5e72025-07-08 18:04:53 -040027830 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010027831 (cygwin*|msys*)
27832 ;;
27833 (*)
micky3879b9f5e72025-07-08 18:04:53 -040027834 rm -rf ./conftest* ./*~conftest*
27835 if mkdir conftest.src conftest.bin conftest.lib
27836 then
27837 cd conftest.src
27838 rm -rf ./conftest* ./*~conftest*
27839 cat >>library.gpr <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010027840project Library is
27841 Kind := External ("LIB_KIND");
27842 for Library_Name use "ConfTest";
27843 for Object_Dir use ".";
27844 for Library_ALI_Dir use External("LIBRARY_DIR");
27845 for Library_Version use External ("SONAME");
27846 for Library_Kind use Kind;
27847 for Library_Dir use External("BUILD_DIR");
27848 Source_Dir := External ("SOURCE_DIR");
27849 for Source_Dirs use (Source_Dir);
27850end Library;
27851CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040027852 cat >>confpackage.ads <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010027853package ConfPackage is
27854 procedure conftest;
27855end ConfPackage;
27856CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040027857 cat >>confpackage.adb <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010027858with Text_IO;
27859package body ConfPackage is
27860 procedure conftest is
27861 begin
27862 Text_IO.Put ("Hello World");
27863 Text_IO.New_Line;
27864 end conftest;
27865end ConfPackage;
27866CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040027867 if ( "$cf_ada_make" $ADAFLAGS \
27868 -Plibrary.gpr \
27869 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27870 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27871 -XSOURCE_DIR="`pwd`" \
27872 -XSONAME=libConfTest.so.1 \
27873 -XLIB_KIND=static 1>&5 2>&1 ) ; then
27874 cf_gnat_projects=yes
27875 fi
27876 cd ..
Steve Kondikae271bc2015-11-15 02:50:53 +010027877 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010027878 if test -f conftest.lib/confpackage.ali
27879 then
27880 cf_gnat_libraries=yes
27881 fi
micky3879b9f5e72025-07-08 18:04:53 -040027882 rm -rf ./conftest* ./*~conftest*
Steve Kondikae271bc2015-11-15 02:50:53 +010027883 ;;
27884 esac
27885 ;;
27886esac
micky3879b9f5e72025-07-08 18:04:53 -040027887echo "$as_me:27887: result: $cf_gnat_projects" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027888echo "${ECHO_T}$cf_gnat_projects" >&6
27889fi # enable_gnat_projects
27890
micky3879b9f5e72025-07-08 18:04:53 -040027891if test "$cf_gnat_projects" = yes
Steve Kondikae271bc2015-11-15 02:50:53 +010027892then
micky3879b9f5e72025-07-08 18:04:53 -040027893 echo "$as_me:27893: checking if GNAT supports libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027894echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
micky3879b9f5e72025-07-08 18:04:53 -040027895 echo "$as_me:27895: result: $cf_gnat_libraries" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027896echo "${ECHO_T}$cf_gnat_libraries" >&6
27897fi
27898
micky3879b9f5e72025-07-08 18:04:53 -040027899USE_OLD_MAKERULES=""
27900USE_GNAT_PROJECTS="#"
27901USE_GNAT_MAKE_GPR="#"
27902USE_GNAT_GPRBUILD="#"
27903
Steve Kondikae271bc2015-11-15 02:50:53 +010027904if test "$cf_gnat_projects" = yes
27905then
27906 USE_OLD_MAKERULES="#"
27907 USE_GNAT_PROJECTS=""
micky3879b9f5e72025-07-08 18:04:53 -040027908 if test "$cf_cv_VERSION_GPRBUILD" != no
27909 then
27910 USE_GNAT_GPRBUILD=""
27911 elif test "$cf_cv_VERSION_GNATMAKE" != no
27912 then
27913 USE_GNAT_MAKE_GPR=""
27914 else
27915 { echo "$as_me:27915: WARNING: use old makefile rules since tools are missing" >&5
27916echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27917 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010027918fi
27919
27920if test "$cf_gnat_libraries" = yes
27921then
27922 USE_GNAT_LIBRARIES=""
27923else
27924 USE_GNAT_LIBRARIES="#"
27925fi
27926
micky3879b9f5e72025-07-08 18:04:53 -040027927echo "$as_me:27927: checking for Ada95 compiler" >&5
27928echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027929
27930# Check whether --with-ada-compiler or --without-ada-compiler was given.
27931if test "${with_ada_compiler+set}" = set; then
27932 withval="$with_ada_compiler"
27933 cf_ada_compiler=$withval
27934else
27935 cf_ada_compiler=gnatmake
27936fi;
27937
micky3879b9f5e72025-07-08 18:04:53 -040027938echo "$as_me:27938: result: $cf_ada_compiler" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027939echo "${ECHO_T}$cf_ada_compiler" >&6
27940
27941 cf_ada_package=terminal_interface
27942
micky3879b9f5e72025-07-08 18:04:53 -040027943echo "$as_me:27943: checking for Ada95 include directory" >&5
27944echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027945
27946# Check whether --with-ada-include or --without-ada-include was given.
27947if test "${with_ada_include+set}" = set; then
27948 withval="$with_ada_include"
27949
27950else
Steve Kondikae271bc2015-11-15 02:50:53 +010027951 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27952fi; if test -n "$prefix/share/ada/adainclude" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027953
27954if test "x$prefix" != xNONE; then
Steve Kondikae271bc2015-11-15 02:50:53 +010027955 cf_path_syntax="$prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027956else
Steve Kondikae271bc2015-11-15 02:50:53 +010027957 cf_path_syntax="$ac_default_prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027958fi
27959
Steve Kondikae271bc2015-11-15 02:50:53 +010027960case ".$withval" in
27961(.\$\(*\)*|.\'*\'*)
27962 ;;
27963(..|./*|.\\*)
27964 ;;
27965(.[a-zA-Z]:[\\/]*) # OS/2 EMX
27966 ;;
micky3879b9f5e72025-07-08 18:04:53 -040027967(.\$\{*prefix\}*|.\$\{*dir\}*)
Steve Kondikae271bc2015-11-15 02:50:53 +010027968 eval withval="$withval"
27969 case ".$withval" in
27970 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -040027971 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +010027972 ;;
27973 esac
27974 ;;
27975(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -040027976 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +010027977 ;;
27978(*)
micky3879b9f5e72025-07-08 18:04:53 -040027979 { { echo "$as_me:27979: error: expected a pathname, not \"$withval\"" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027980echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27981 { (exit 1); exit 1; }; }
Steve Kondikae271bc2015-11-15 02:50:53 +010027982 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027983esac
27984
27985fi
Steve Kondikae271bc2015-11-15 02:50:53 +010027986eval ADA_INCLUDE="$withval"
27987
micky3879b9f5e72025-07-08 18:04:53 -040027988echo "$as_me:27988: result: $ADA_INCLUDE" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010027989echo "${ECHO_T}$ADA_INCLUDE" >&6
27990
micky3879b9f5e72025-07-08 18:04:53 -040027991echo "$as_me:27991: checking for Ada95 object directory" >&5
27992echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053027993
27994# Check whether --with-ada-objects or --without-ada-objects was given.
27995if test "${with_ada_objects+set}" = set; then
27996 withval="$with_ada_objects"
27997
27998else
Steve Kondikae271bc2015-11-15 02:50:53 +010027999 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028000fi; if test -n "$prefix/lib/ada/adalib" ; then
28001
28002if test "x$prefix" != xNONE; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028003 cf_path_syntax="$prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028004else
Steve Kondikae271bc2015-11-15 02:50:53 +010028005 cf_path_syntax="$ac_default_prefix"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028006fi
28007
Steve Kondikae271bc2015-11-15 02:50:53 +010028008case ".$withval" in
28009(.\$\(*\)*|.\'*\'*)
28010 ;;
28011(..|./*|.\\*)
28012 ;;
28013(.[a-zA-Z]:[\\/]*) # OS/2 EMX
28014 ;;
micky3879b9f5e72025-07-08 18:04:53 -040028015(.\$\{*prefix\}*|.\$\{*dir\}*)
Steve Kondikae271bc2015-11-15 02:50:53 +010028016 eval withval="$withval"
28017 case ".$withval" in
28018 (.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -040028019 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +010028020 ;;
28021 esac
28022 ;;
28023(.no|.NONE/*)
micky3879b9f5e72025-07-08 18:04:53 -040028024 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
Steve Kondikae271bc2015-11-15 02:50:53 +010028025 ;;
28026(*)
micky3879b9f5e72025-07-08 18:04:53 -040028027 { { echo "$as_me:28027: error: expected a pathname, not \"$withval\"" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028028echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28029 { (exit 1); exit 1; }; }
Steve Kondikae271bc2015-11-15 02:50:53 +010028030 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028031esac
28032
28033fi
Steve Kondikae271bc2015-11-15 02:50:53 +010028034eval ADA_OBJECTS="$withval"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028035
micky3879b9f5e72025-07-08 18:04:53 -040028036echo "$as_me:28036: result: $ADA_OBJECTS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028037echo "${ECHO_T}$ADA_OBJECTS" >&6
28038
micky3879b9f5e72025-07-08 18:04:53 -040028039echo "$as_me:28039: checking whether to build an Ada95 shared library" >&5
28040echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010028041
28042# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
28043if test "${with_ada_sharedlib+set}" = set; then
28044 withval="$with_ada_sharedlib"
28045 with_ada_sharedlib=$withval
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028046else
Steve Kondikae271bc2015-11-15 02:50:53 +010028047 with_ada_sharedlib=no
28048fi;
micky3879b9f5e72025-07-08 18:04:53 -040028049cf_ada_sharedlib_warn=no
28050
28051if test "x$with_ada_sharedlib" != xno
28052then
28053 if test "x$cf_gnat_projects" != xyes
28054 then
28055 with_ada_sharedlib=no
28056 cf_ada_sharedlib_warn=yes
28057 fi
28058fi
28059
28060echo "$as_me:28060: result: $with_ada_sharedlib" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028061echo "${ECHO_T}$with_ada_sharedlib" >&6
micky3879b9f5e72025-07-08 18:04:53 -040028062if test "x$cf_ada_sharedlib_warn" != xno
28063then
28064 { echo "$as_me:28064: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
28065echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
28066fi
Steve Kondikae271bc2015-11-15 02:50:53 +010028067
28068ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
28069MAKE_ADA_SHAREDLIB="#"
28070
28071if test "x$with_ada_sharedlib" != xno
28072then
28073 MAKE_ADA_SHAREDLIB=
28074 if test "x$with_ada_sharedlib" != xyes
28075 then
28076 ADA_SHAREDLIB="$with_ada_sharedlib"
28077 fi
28078fi
28079
micky3879b9f5e72025-07-08 18:04:53 -040028080 # allow the Ada binding to be renamed
28081
28082echo "$as_me:28082: checking for Ada95 curses library name" >&5
28083echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
28084
28085# Check whether --with-ada-libname or --without-ada-libname was given.
28086if test "${with_ada_libname+set}" = set; then
28087 withval="$with_ada_libname"
28088 ADA_LIBNAME=$withval
28089else
28090 ADA_LIBNAME=AdaCurses
28091fi;
28092case "x$ADA_LIBNAME" in
28093(x|xyes|xno)
28094 ADA_LIBNAME=AdaCurses
28095 ;;
28096esac
28097
28098echo "$as_me:28098: result: $ADA_LIBNAME" >&5
28099echo "${ECHO_T}$ADA_LIBNAME" >&6
28100
Steve Kondikae271bc2015-11-15 02:50:53 +010028101 fi
28102 fi
28103else
28104 cf_with_ada=no
28105fi
28106
28107# do this "late" to avoid conflict with header-checks
28108if test "x$with_widec" = xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040028109 echo "$as_me:28109: checking for wchar_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028110echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
28111if test "${ac_cv_type_wchar_t+set}" = set; then
28112 echo $ECHO_N "(cached) $ECHO_C" >&6
28113else
micky3879b9f5e72025-07-08 18:04:53 -040028114 cat >"conftest.$ac_ext" <<_ACEOF
28115#line 28115 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028116#include "confdefs.h"
28117$ac_includes_default
28118int
micky3879b9f5e72025-07-08 18:04:53 -040028119main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010028120{
28121if ((wchar_t *) 0)
28122 return 0;
28123if (sizeof (wchar_t))
28124 return 0;
28125 ;
28126 return 0;
28127}
28128_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040028129rm -f "conftest.$ac_objext"
28130if { (eval echo "$as_me:28130: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028131 (eval $ac_compile) 2>&5
28132 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028133 echo "$as_me:28133: \$? = $ac_status" >&5
28134 (exit "$ac_status"); } &&
28135 { ac_try='test -s "conftest.$ac_objext"'
28136 { (eval echo "$as_me:28136: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028137 (eval $ac_try) 2>&5
28138 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028139 echo "$as_me:28139: \$? = $ac_status" >&5
28140 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028141 ac_cv_type_wchar_t=yes
28142else
28143 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040028144cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028145ac_cv_type_wchar_t=no
28146fi
micky3879b9f5e72025-07-08 18:04:53 -040028147rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010028148fi
micky3879b9f5e72025-07-08 18:04:53 -040028149echo "$as_me:28149: result: $ac_cv_type_wchar_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028150echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
28151
micky3879b9f5e72025-07-08 18:04:53 -040028152echo "$as_me:28152: checking size of wchar_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028153echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
28154if test "${ac_cv_sizeof_wchar_t+set}" = set; then
28155 echo $ECHO_N "(cached) $ECHO_C" >&6
28156else
28157 if test "$ac_cv_type_wchar_t" = yes; then
28158 if test "$cross_compiling" = yes; then
28159 # Depending upon the size, compute the lo and hi bounds.
micky3879b9f5e72025-07-08 18:04:53 -040028160cat >"conftest.$ac_ext" <<_ACEOF
28161#line 28161 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028162#include "confdefs.h"
28163$ac_includes_default
28164int
micky3879b9f5e72025-07-08 18:04:53 -040028165main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010028166{
28167int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28168 ;
28169 return 0;
28170}
28171_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040028172rm -f "conftest.$ac_objext"
28173if { (eval echo "$as_me:28173: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028174 (eval $ac_compile) 2>&5
28175 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028176 echo "$as_me:28176: \$? = $ac_status" >&5
28177 (exit "$ac_status"); } &&
28178 { ac_try='test -s "conftest.$ac_objext"'
28179 { (eval echo "$as_me:28179: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028180 (eval $ac_try) 2>&5
28181 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028182 echo "$as_me:28182: \$? = $ac_status" >&5
28183 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028184 ac_lo=0 ac_mid=0
28185 while :; do
micky3879b9f5e72025-07-08 18:04:53 -040028186 cat >"conftest.$ac_ext" <<_ACEOF
28187#line 28187 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028188#include "confdefs.h"
28189$ac_includes_default
28190int
micky3879b9f5e72025-07-08 18:04:53 -040028191main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010028192{
28193int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28194 ;
28195 return 0;
28196}
28197_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040028198rm -f "conftest.$ac_objext"
28199if { (eval echo "$as_me:28199: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028200 (eval $ac_compile) 2>&5
28201 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028202 echo "$as_me:28202: \$? = $ac_status" >&5
28203 (exit "$ac_status"); } &&
28204 { ac_try='test -s "conftest.$ac_objext"'
28205 { (eval echo "$as_me:28205: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028206 (eval $ac_try) 2>&5
28207 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028208 echo "$as_me:28208: \$? = $ac_status" >&5
28209 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028210 ac_hi=$ac_mid; break
28211else
28212 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040028213cat "conftest.$ac_ext" >&5
28214ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
Steve Kondikae271bc2015-11-15 02:50:53 +010028215fi
micky3879b9f5e72025-07-08 18:04:53 -040028216rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010028217 done
28218else
28219 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040028220cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028221ac_hi=-1 ac_mid=-1
28222 while :; do
micky3879b9f5e72025-07-08 18:04:53 -040028223 cat >"conftest.$ac_ext" <<_ACEOF
28224#line 28224 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028225#include "confdefs.h"
28226$ac_includes_default
28227int
micky3879b9f5e72025-07-08 18:04:53 -040028228main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010028229{
28230int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28231 ;
28232 return 0;
28233}
28234_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040028235rm -f "conftest.$ac_objext"
28236if { (eval echo "$as_me:28236: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028237 (eval $ac_compile) 2>&5
28238 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028239 echo "$as_me:28239: \$? = $ac_status" >&5
28240 (exit "$ac_status"); } &&
28241 { ac_try='test -s "conftest.$ac_objext"'
28242 { (eval echo "$as_me:28242: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028243 (eval $ac_try) 2>&5
28244 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028245 echo "$as_me:28245: \$? = $ac_status" >&5
28246 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028247 ac_lo=$ac_mid; break
28248else
28249 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040028250cat "conftest.$ac_ext" >&5
28251ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
Steve Kondikae271bc2015-11-15 02:50:53 +010028252fi
micky3879b9f5e72025-07-08 18:04:53 -040028253rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010028254 done
28255fi
micky3879b9f5e72025-07-08 18:04:53 -040028256rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010028257# Binary search between lo and hi bounds.
28258while test "x$ac_lo" != "x$ac_hi"; do
micky3879b9f5e72025-07-08 18:04:53 -040028259 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28260 cat >"conftest.$ac_ext" <<_ACEOF
28261#line 28261 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028262#include "confdefs.h"
28263$ac_includes_default
28264int
micky3879b9f5e72025-07-08 18:04:53 -040028265main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010028266{
28267int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28268 ;
28269 return 0;
28270}
28271_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040028272rm -f "conftest.$ac_objext"
28273if { (eval echo "$as_me:28273: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028274 (eval $ac_compile) 2>&5
28275 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028276 echo "$as_me:28276: \$? = $ac_status" >&5
28277 (exit "$ac_status"); } &&
28278 { ac_try='test -s "conftest.$ac_objext"'
28279 { (eval echo "$as_me:28279: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028280 (eval $ac_try) 2>&5
28281 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028282 echo "$as_me:28282: \$? = $ac_status" >&5
28283 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028284 ac_hi=$ac_mid
28285else
28286 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040028287cat "conftest.$ac_ext" >&5
28288ac_lo=`expr "$ac_mid" + 1`
Steve Kondikae271bc2015-11-15 02:50:53 +010028289fi
micky3879b9f5e72025-07-08 18:04:53 -040028290rm -f "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010028291done
28292ac_cv_sizeof_wchar_t=$ac_lo
28293else
28294 if test "$cross_compiling" = yes; then
micky3879b9f5e72025-07-08 18:04:53 -040028295 { { echo "$as_me:28295: error: cannot run test program while cross compiling" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028296echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28297 { (exit 1); exit 1; }; }
28298else
micky3879b9f5e72025-07-08 18:04:53 -040028299 cat >"conftest.$ac_ext" <<_ACEOF
28300#line 28300 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028301#include "confdefs.h"
28302$ac_includes_default
28303int
micky3879b9f5e72025-07-08 18:04:53 -040028304main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010028305{
28306FILE *f = fopen ("conftest.val", "w");
28307if (!f)
28308 $ac_main_return (1);
micky3879b9f5e72025-07-08 18:04:53 -040028309fprintf (f, "%ld", (long)(sizeof (wchar_t)));
Steve Kondikae271bc2015-11-15 02:50:53 +010028310fclose (f);
28311 ;
28312 return 0;
28313}
28314_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040028315rm -f "conftest$ac_exeext"
28316if { (eval echo "$as_me:28316: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028317 (eval $ac_link) 2>&5
28318 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028319 echo "$as_me:28319: \$? = $ac_status" >&5
28320 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28321 { (eval echo "$as_me:28321: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028322 (eval $ac_try) 2>&5
28323 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028324 echo "$as_me:28324: \$? = $ac_status" >&5
28325 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028326 ac_cv_sizeof_wchar_t=`cat conftest.val`
28327else
28328 echo "$as_me: program exited with status $ac_status" >&5
28329echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040028330cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028331fi
micky3879b9f5e72025-07-08 18:04:53 -040028332rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010028333fi
28334fi
28335rm -f conftest.val
28336else
28337 ac_cv_sizeof_wchar_t=0
28338fi
28339fi
micky3879b9f5e72025-07-08 18:04:53 -040028340echo "$as_me:28340: result: $ac_cv_sizeof_wchar_t" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028341echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28342cat >>confdefs.h <<EOF
28343#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28344EOF
28345
micky3879b9f5e72025-07-08 18:04:53 -040028346 # cross-compiling to mingw can run into the problem that attempting to
28347 # link with the regex library fails, causing the test to not set this to
28348 # a number. "recent" autoconf does not address this problem either -TD
28349 if test -z "$ac_cv_sizeof_wchar_t"
28350 then
28351 test -n "$verbose" && echo " test failed (assume 2)" 1>&6
28352
28353echo "${as_me:-configure}:28353: testing test failed (assume 2) ..." 1>&5
28354
28355 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28356 mv confdefs.tmp confdefs.h
28357 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28358 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028359fi
28360
28361### Construct the ncurses library-subsets, if any, from this set of keywords:
28362### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28363###
28364### ticlib modules may be a separate library, otherwise contained in termlib.
28365### termlib modules may be a separate library, otherwise contained in ncurses.
28366###
28367### The of "+" or " " between the tokens controls the way the script
28368### chooses to split module lists into libraries.
28369###
28370### (see CF_LIB_RULES).
micky3879b9f5e72025-07-08 18:04:53 -040028371echo "$as_me:28371: checking for library subsets" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028372echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28373LIB_SUBSETS=
28374
Steve Kondikae271bc2015-11-15 02:50:53 +010028375if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028376 LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28377 if test "$with_ticlib" != no ; then
28378 LIB_SUBSETS="${LIB_SUBSETS} "
28379 else
28380 LIB_SUBSETS="${LIB_SUBSETS}+"
28381 fi
28382fi
28383
28384LIB_SUBSETS="${LIB_SUBSETS}termlib"
Steve Kondikae271bc2015-11-15 02:50:53 +010028385test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28386
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028387if test "$with_termlib" != no ; then
28388 LIB_SUBSETS="${LIB_SUBSETS} "
28389else
28390 LIB_SUBSETS="${LIB_SUBSETS}+"
28391fi
28392
28393LIB_SUBSETS="${LIB_SUBSETS}base"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028394
Steve Kondikae271bc2015-11-15 02:50:53 +010028395# Most term-driver calls are to tinfo, but some like init_pair are to the
28396# base library (so it resides in base).
28397if test "$with_term_driver" != no ; then
28398 LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
micky3879b9f5e72025-07-08 18:04:53 -040028399 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028400 (*mingw32*|*mingw64*)
micky3879b9f5e72025-07-08 18:04:53 -040028401 if test "x$with_exp_win32" = xyes ; then
28402 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28403 else
28404 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28405 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010028406 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28407 ;;
28408 (*)
28409 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28410 ;;
28411 esac
micky3879b9f5e72025-07-08 18:04:53 -040028412elif test "x$with_exp_win32" = xyes ; then
28413 case "$cf_cv_system_name" in
28414 (*mingw32*|*mingw64*)
28415 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28416 ;;
28417 (*)
28418 ;;
28419 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010028420fi
28421
28422test "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28423test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28424
micky3879b9f5e72025-07-08 18:04:53 -040028425echo "$as_me:28425: result: $LIB_SUBSETS" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028426echo "${ECHO_T}$LIB_SUBSETS" >&6
28427
28428### Construct the list of include-directories to be generated
28429
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028430if test "$srcdir" != "."; then
28431 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28432fi
Steve Kondikae271bc2015-11-15 02:50:53 +010028433CPPFLAGS="-I../include $CPPFLAGS"
28434if test "$srcdir" != "."; then
28435 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028436fi
Steve Kondikae271bc2015-11-15 02:50:53 +010028437CPPFLAGS="-I. $CPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028438
Steve Kondikae271bc2015-11-15 02:50:53 +010028439ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028440if test "$srcdir" != "."; then
28441 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28442fi
28443if test "$GCC" != yes; then
28444 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28445elif test "$includedir" != "/usr/include"; then
28446 if test "$includedir" = '${prefix}/include' ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028447 if test x$prefix != x/usr ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028448 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28449 fi
28450 else
28451 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28452 fi
28453fi
28454
28455### Build up pieces for makefile rules
micky3879b9f5e72025-07-08 18:04:53 -040028456echo "$as_me:28456: checking default library suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028457echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28458
28459 case $DFT_LWR_MODEL in
Steve Kondikae271bc2015-11-15 02:50:53 +010028460 (libtool) DFT_ARG_SUFFIX='' ;;
28461 (normal) DFT_ARG_SUFFIX='' ;;
28462 (debug) DFT_ARG_SUFFIX='_g' ;;
28463 (profile) DFT_ARG_SUFFIX='_p' ;;
28464 (shared) DFT_ARG_SUFFIX='' ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028465 esac
28466 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
micky3879b9f5e72025-07-08 18:04:53 -040028467echo "$as_me:28467: result: $DFT_ARG_SUFFIX" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028468echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28469
micky3879b9f5e72025-07-08 18:04:53 -040028470echo "$as_me:28470: checking default library-dependency suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028471echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28472
Steve Kondikae271bc2015-11-15 02:50:53 +010028473 case X$DFT_LWR_MODEL in
28474 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028475 DFT_LIB_SUFFIX='.la'
28476 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28477 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028478 (Xdebug)
micky3879b9f5e72025-07-08 18:04:53 -040028479 case "$cf_cv_system_name" in
28480 (*-msvc*)
28481 DFT_LIB_SUFFIX='_g.lib'
28482 ;;
28483 (*)
28484 DFT_LIB_SUFFIX='_g.a'
28485 ;;
28486 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028487 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28488 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028489 (Xprofile)
micky3879b9f5e72025-07-08 18:04:53 -040028490 case "$cf_cv_system_name" in
28491 (*-msvc*)
28492 DFT_LIB_SUFFIX='_p.lib'
28493 ;;
28494 (*)
28495 DFT_LIB_SUFFIX='_p.a'
28496 ;;
28497 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028498 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28499 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028500 (Xshared)
micky3879b9f5e72025-07-08 18:04:53 -040028501 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028502 (aix[5-7]*)
28503 DFT_LIB_SUFFIX='.so'
28504 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28505 ;;
micky3879b9f5e72025-07-08 18:04:53 -040028506 (*-msvc*)
28507 DFT_LIB_SUFFIX='.dll'
28508 DFT_DEP_SUFFIX='.dll.lib'
28509 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028510 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028511 DFT_LIB_SUFFIX='.dll'
28512 DFT_DEP_SUFFIX='.dll.a'
28513 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028514 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028515 DFT_LIB_SUFFIX='.dylib'
28516 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28517 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028518 (hpux*)
micky3879b9f5e72025-07-08 18:04:53 -040028519 case "$target" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028520 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028521 DFT_LIB_SUFFIX='.so'
28522 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28523 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028524 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028525 DFT_LIB_SUFFIX='.sl'
28526 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28527 ;;
28528 esac
28529 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028530 (*)
28531 DFT_LIB_SUFFIX='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028532 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28533 ;;
28534 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010028535 ;;
28536 (*)
micky3879b9f5e72025-07-08 18:04:53 -040028537 case "$target" in
28538 (*-msvc*)
28539 DFT_LIB_SUFFIX='.lib'
28540 ;;
28541 (*)
28542 DFT_LIB_SUFFIX='.a'
28543 ;;
28544 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010028545 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28546 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028547 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010028548 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28549 then
28550 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28551 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28552 fi
micky3879b9f5e72025-07-08 18:04:53 -040028553echo "$as_me:28553: result: $DFT_DEP_SUFFIX" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028554echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28555
micky3879b9f5e72025-07-08 18:04:53 -040028556echo "$as_me:28556: checking default object directory" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028557echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28558
28559 case $DFT_LWR_MODEL in
Steve Kondikae271bc2015-11-15 02:50:53 +010028560 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
28561 (normal) DFT_OBJ_SUBDIR='objects' ;;
28562 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
28563 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28564 (shared)
micky3879b9f5e72025-07-08 18:04:53 -040028565 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028566 (cygwin|msys)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028567 DFT_OBJ_SUBDIR='objects' ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028568 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028569 DFT_OBJ_SUBDIR='obj_s' ;;
28570 esac
28571 esac
micky3879b9f5e72025-07-08 18:04:53 -040028572echo "$as_me:28572: result: $DFT_OBJ_SUBDIR" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028573echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28574
Steve Kondikae271bc2015-11-15 02:50:53 +010028575if test "x$cf_with_cxx" = xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040028576echo "$as_me:28576: checking c++ library-dependency suffix" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028577echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28578if test "$with_libtool" != "no"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028579 # libtool thinks it can make c++ shared libraries (perhaps only g++)
28580 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28581elif test "$with_shared_cxx" != "no"; then
28582 # also for g++ users...
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028583 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28584else
Steve Kondikae271bc2015-11-15 02:50:53 +010028585 # we normally make a static library because C/C++ library rules differ
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028586
Steve Kondikae271bc2015-11-15 02:50:53 +010028587 case Xnormal in
28588 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028589 CXX_LIB_SUFFIX='.la'
28590 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28591 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028592 (Xdebug)
micky3879b9f5e72025-07-08 18:04:53 -040028593 case "$cf_cv_system_name" in
28594 (*-msvc*)
28595 CXX_LIB_SUFFIX='_g.lib'
28596 ;;
28597 (*)
28598 CXX_LIB_SUFFIX='_g.a'
28599 ;;
28600 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028601 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28602 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028603 (Xprofile)
micky3879b9f5e72025-07-08 18:04:53 -040028604 case "$cf_cv_system_name" in
28605 (*-msvc*)
28606 CXX_LIB_SUFFIX='_p.lib'
28607 ;;
28608 (*)
28609 CXX_LIB_SUFFIX='_p.a'
28610 ;;
28611 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028612 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28613 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028614 (Xshared)
micky3879b9f5e72025-07-08 18:04:53 -040028615 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028616 (aix[5-7]*)
28617 CXX_LIB_SUFFIX='.so'
28618 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28619 ;;
micky3879b9f5e72025-07-08 18:04:53 -040028620 (*-msvc*)
28621 CXX_LIB_SUFFIX='.dll'
28622 CXX_DEP_SUFFIX='.dll.lib'
28623 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028624 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028625 CXX_LIB_SUFFIX='.dll'
28626 CXX_DEP_SUFFIX='.dll.a'
28627 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028628 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028629 CXX_LIB_SUFFIX='.dylib'
28630 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28631 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028632 (hpux*)
micky3879b9f5e72025-07-08 18:04:53 -040028633 case "$target" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028634 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028635 CXX_LIB_SUFFIX='.so'
28636 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28637 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028638 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028639 CXX_LIB_SUFFIX='.sl'
28640 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28641 ;;
28642 esac
28643 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028644 (*)
28645 CXX_LIB_SUFFIX='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028646 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28647 ;;
28648 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010028649 ;;
28650 (*)
micky3879b9f5e72025-07-08 18:04:53 -040028651 case "$target" in
28652 (*-msvc*)
28653 CXX_LIB_SUFFIX='.lib'
28654 ;;
28655 (*)
28656 CXX_LIB_SUFFIX='.a'
28657 ;;
28658 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010028659 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28660 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028661 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010028662 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28663 then
28664 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28665 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28666 fi
28667
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028668fi
micky3879b9f5e72025-07-08 18:04:53 -040028669echo "$as_me:28669: result: $CXX_LIB_SUFFIX" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028670echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28671
28672fi
28673
28674# do not want -ldl in build except as needed for -lncurses dependency
Steve Kondikae271bc2015-11-15 02:50:53 +010028675if test "x$with_dlsym" = xyes ; then
micky3879b9f5e72025-07-08 18:04:53 -040028676if test "$DFT_LWR_MODEL" = shared || \
28677 test "$DFT_LWR_MODEL" = libtool ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028678
28679# remove dl library from $LIBS
28680LIBS=`echo "$LIBS" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
28681
28682fi
28683fi
28684### Set up low-level terminfo dependencies for makefiles.
28685
28686# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28687# do not need libdl
28688TICS_LIST=
Steve Kondikae271bc2015-11-15 02:50:53 +010028689if test "x$with_dlsym" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028690
28691# remove dl library from $SHLIB_LIST
28692TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
28693
28694fi
28695
Steve Kondikae271bc2015-11-15 02:50:53 +010028696USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28697USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28698USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28699if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28700then
28701 USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28702fi
28703
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028704if test "$with_ticlib" != no ; then
28705
Steve Kondikae271bc2015-11-15 02:50:53 +010028706 if test "x$with_ticlib" != xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028707 TICS_NAME=$with_ticlib
micky3879b9f5e72025-07-08 18:04:53 -040028708 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28709 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28710 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028711 TICS_LIB_SUFFIX="${with_ticlib}"
28712 else
micky3879b9f5e72025-07-08 18:04:53 -040028713 TICS_SUFFIX=${DFT_LIB_SUFFIX}
Steve Kondikae271bc2015-11-15 02:50:53 +010028714 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028715 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
Steve Kondikae271bc2015-11-15 02:50:53 +010028716 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028717 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010028718 TICS_LDFLAGS="-L${LIB_DIR}"
micky3879b9f5e72025-07-08 18:04:53 -040028719 TICS_LIBS="-l${TICS_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028720else
micky3879b9f5e72025-07-08 18:04:53 -040028721 TICS_SUFFIX=${DFT_LIB_SUFFIX}
Steve Kondikae271bc2015-11-15 02:50:53 +010028722 TICS_LDFLAGS="-L${LIB_DIR}"
28723 TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028724fi
28725
28726if test "$with_termlib" != no ; then
28727
Steve Kondikae271bc2015-11-15 02:50:53 +010028728 if test "x$with_termlib" != xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028729 TINFO_NAME=$with_termlib
micky3879b9f5e72025-07-08 18:04:53 -040028730 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28731 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28732 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028733 TINFO_LIB_SUFFIX="${with_termlib}"
28734 else
28735 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
Steve Kondikae271bc2015-11-15 02:50:53 +010028736 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028737 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
Steve Kondikae271bc2015-11-15 02:50:53 +010028738 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028739 fi
28740
28741 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28742 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28743 if test "$DFT_LWR_MODEL" = "libtool"; then
28744 TEST_ARGS="${TEST_DEPS}"
28745 TEST_ARG2="${TEST_DEP2}"
Steve Kondikae271bc2015-11-15 02:50:53 +010028746 TINFO_LDFLAGS="-L${LIB_DIR}"
28747 TINFO_LIBS="$TEST_ARGS"
28748 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28749 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028750 else
28751 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28752 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
Steve Kondikae271bc2015-11-15 02:50:53 +010028753 if test "x$with_term_driver" != xno ; then
28754 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28755 TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28756 TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28757 else
28758 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28759 TINFO_LIBS="$TEST_ARGS"
28760 fi
28761 TINFO_LDFLAGS="-L${LIB_DIR}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028762 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28763 fi
28764else
28765 # the next lines are needed for linking libtic over libncurses
28766 TINFO_NAME=${LIB_NAME}
28767 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
Steve Kondikae271bc2015-11-15 02:50:53 +010028768 TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28769 if test "x$with_tic_depends" = xyes ; then
28770 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028771 else
28772 TICS_LIST="$SHLIB_LIST"
28773 fi
28774
Steve Kondikae271bc2015-11-15 02:50:53 +010028775 TINFO_LDFLAGS="-L${LIB_DIR}"
28776 TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028777fi
28778
28779if test "$DFT_LWR_MODEL" = shared ; then
micky3879b9f5e72025-07-08 18:04:53 -040028780 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028781 (cygwin*|msys*)
28782 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028783 TINFO_SUFFIX=.dll
28784 ;;
28785 esac
28786fi
28787
Steve Kondikae271bc2015-11-15 02:50:53 +010028788if test "x$with_dlsym" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028789
28790# remove dl library from $TICS_LIST
28791TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[ ]//g' -e 's/-ldl$//'`
28792
28793fi
28794
28795if test "$DFT_LWR_MODEL" = "libtool"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028796 OBJEXT=lo
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028797fi
28798
28799# needed for Ada95
Steve Kondikae271bc2015-11-15 02:50:53 +010028800TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028801
micky3879b9f5e72025-07-08 18:04:53 -040028802case "$DFT_LWR_MODEL" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028803(normal|debug|profile)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028804
28805if test "$GCC" = yes ; then
micky3879b9f5e72025-07-08 18:04:53 -040028806 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028807 (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028808 LDFLAGS_STATIC=
28809 LDFLAGS_SHARED=
28810 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028811 (*) # normally, except when broken
28812 LDFLAGS_STATIC=-static
28813 LDFLAGS_SHARED=-dynamic
28814 ;;
28815 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028816else
micky3879b9f5e72025-07-08 18:04:53 -040028817 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010028818 (aix[4-7]*) # from ld manpage
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028819 LDFLAGS_STATIC=-bstatic
28820 LDFLAGS_SHARED=-bdynamic
28821 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028822 (hpux*) # from ld manpage for hpux10.20, hpux11.11
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028823 # We could also use just "archive" and "shared".
28824 LDFLAGS_STATIC=-Wl,-a,archive_shared
28825 LDFLAGS_SHARED=-Wl,-a,shared_archive
28826 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028827 (irix*) # from ld manpage IRIX64
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028828 LDFLAGS_STATIC=-Bstatic
28829 LDFLAGS_SHARED=-Bdynamic
28830 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028831 (osf[45]*) # from ld manpage osf4.0d, osf5.1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028832 # alternative "-oldstyle_liblookup" (not in cc manpage)
28833 LDFLAGS_STATIC=-noso
28834 LDFLAGS_SHARED=-so_archive
28835 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010028836 (solaris2*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028837 LDFLAGS_STATIC=-Bstatic
28838 LDFLAGS_SHARED=-Bdynamic
28839 ;;
28840 esac
28841fi
28842
Steve Kondikae271bc2015-11-15 02:50:53 +010028843if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28844then
micky3879b9f5e72025-07-08 18:04:53 -040028845 echo "$as_me:28845: checking if linker supports switching between static/dynamic" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028846echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28847
28848 rm -f libconftest.a
28849 cat >conftest.$ac_ext <<EOF
micky3879b9f5e72025-07-08 18:04:53 -040028850#line 28850 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028851#include <stdio.h>
28852int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28853EOF
micky3879b9f5e72025-07-08 18:04:53 -040028854 if { (eval echo "$as_me:28854: \"$ac_compile\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028855 (eval $ac_compile) 2>&5
28856 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028857 echo "$as_me:28857: \$? = $ac_status" >&5
28858 (exit "$ac_status"); } ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028859 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28860 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28861 fi
28862 rm -f conftest.*
28863
28864 cf_save_LIBS="$LIBS"
28865
28866 LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
micky3879b9f5e72025-07-08 18:04:53 -040028867 cat >"conftest.$ac_ext" <<_ACEOF
28868#line 28868 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028869#include "confdefs.h"
28870
micky3879b9f5e72025-07-08 18:04:53 -040028871#line 28871 "configure"
Steve Kondikae271bc2015-11-15 02:50:53 +010028872#include <stdio.h>
28873int cf_ldflags_static(FILE *fp);
28874
28875int
micky3879b9f5e72025-07-08 18:04:53 -040028876main (void)
Steve Kondikae271bc2015-11-15 02:50:53 +010028877{
28878
28879 return cf_ldflags_static(stdin);
28880
28881 ;
28882 return 0;
28883}
28884_ACEOF
micky3879b9f5e72025-07-08 18:04:53 -040028885rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28886if { (eval echo "$as_me:28886: \"$ac_link\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028887 (eval $ac_link) 2>&5
28888 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028889 echo "$as_me:28889: \$? = $ac_status" >&5
28890 (exit "$ac_status"); } &&
28891 { ac_try='test -s "conftest$ac_exeext"'
28892 { (eval echo "$as_me:28892: \"$ac_try\"") >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028893 (eval $ac_try) 2>&5
28894 ac_status=$?
micky3879b9f5e72025-07-08 18:04:53 -040028895 echo "$as_me:28895: \$? = $ac_status" >&5
28896 (exit "$ac_status"); }; }; then
Steve Kondikae271bc2015-11-15 02:50:53 +010028897
28898 # some linkers simply ignore the -dynamic
micky3879b9f5e72025-07-08 18:04:53 -040028899 case x`file "conftest$ac_exeext" 2>/dev/null` in
Steve Kondikae271bc2015-11-15 02:50:53 +010028900 (*static*)
28901 cf_ldflags_static=no
28902 ;;
28903 (*)
28904 cf_ldflags_static=yes
28905 ;;
28906 esac
28907
28908else
28909 echo "$as_me: failed program was:" >&5
micky3879b9f5e72025-07-08 18:04:53 -040028910cat "conftest.$ac_ext" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028911cf_ldflags_static=no
28912fi
micky3879b9f5e72025-07-08 18:04:53 -040028913rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
Steve Kondikae271bc2015-11-15 02:50:53 +010028914
28915 rm -f libconftest.*
28916 LIBS="$cf_save_LIBS"
28917
micky3879b9f5e72025-07-08 18:04:53 -040028918 echo "$as_me:28918: result: $cf_ldflags_static" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028919echo "${ECHO_T}$cf_ldflags_static" >&6
28920
micky3879b9f5e72025-07-08 18:04:53 -040028921 if test "$cf_ldflags_static" != yes
Steve Kondikae271bc2015-11-15 02:50:53 +010028922 then
28923 LDFLAGS_STATIC=
28924 LDFLAGS_SHARED=
28925 fi
28926else
28927 LDFLAGS_STATIC=
28928 LDFLAGS_SHARED=
28929fi
28930
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028931 ;;
28932esac
28933
micky3879b9f5e72025-07-08 18:04:53 -040028934echo "$as_me:28934: checking where we will install curses.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028935echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010028936
28937includesubdir=
28938if test "$with_overwrite" = no && \
micky3879b9f5e72025-07-08 18:04:53 -040028939 { test "x$includedir" = 'x${prefix}/include' || \
28940 test "x$includedir" = "x${prefix}/include"; }
Steve Kondikae271bc2015-11-15 02:50:53 +010028941then
28942 includesubdir="/ncurses${USE_LIB_SUFFIX}"
28943fi
micky3879b9f5e72025-07-08 18:04:53 -040028944echo "$as_me:28944: result: ${includedir}${includesubdir}" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010028945echo "${ECHO_T}${includedir}${includesubdir}" >&6
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028946
28947### Resolve a conflict between normal and wide-curses by forcing applications
28948### that will need libutf8 to add it to their configure script.
28949if test "$with_overwrite" != no ; then
28950if test "$NCURSES_LIBUTF8" = 1 ; then
28951 NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
micky3879b9f5e72025-07-08 18:04:53 -040028952 { echo "$as_me:28952: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028953echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28954fi
28955fi
Steve Kondikae271bc2015-11-15 02:50:53 +010028956WITH_OVERWRITE=$with_overwrite
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028957
micky3879b9f5e72025-07-08 18:04:53 -040028958### At least on MinGW a shared library build without libtool
28959### requires adding the additional libs to the link list.
28960case "$cf_cv_system_name" in
28961(*mingw32*|*mingw64*)
28962 if test "$DFT_LWR_MODEL" != "libtool"; then
28963 SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28964 fi
28965 ;;
28966*) ;;
28967esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028968
28969### predefined stuff for the test programs
Steve Kondikae271bc2015-11-15 02:50:53 +010028970
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053028971cat >>confdefs.h <<\EOF
28972#define HAVE_SLK_COLOR 1
28973EOF
28974
micky3879b9f5e72025-07-08 18:04:53 -040028975# pkgsrc uses these
28976
28977echo "$as_me:28977: checking for desired basename for form library" >&5
28978echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28979
28980# Check whether --with-form-libname or --without-form-libname was given.
28981if test "${with_form_libname+set}" = set; then
28982 withval="$with_form_libname"
28983 with_lib_basename=$withval
28984else
28985 with_lib_basename=form
28986fi;
28987FORM_NAME="$with_lib_basename"
28988
28989case "x$FORM_NAME" in
28990(x|xno|xnone|xyes)
28991 FORM_NAME=form
28992 ;;
28993(*)
28994 ;;
28995esac
28996
28997echo "$as_me:28997: result: $FORM_NAME" >&5
28998echo "${ECHO_T}$FORM_NAME" >&6
28999
29000echo "$as_me:29000: checking for desired basename for menu library" >&5
29001echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
29002
29003# Check whether --with-menu-libname or --without-menu-libname was given.
29004if test "${with_menu_libname+set}" = set; then
29005 withval="$with_menu_libname"
29006 with_lib_basename=$withval
29007else
29008 with_lib_basename=menu
29009fi;
29010MENU_NAME="$with_lib_basename"
29011
29012case "x$MENU_NAME" in
29013(x|xno|xnone|xyes)
29014 MENU_NAME=menu
29015 ;;
29016(*)
29017 ;;
29018esac
29019
29020echo "$as_me:29020: result: $MENU_NAME" >&5
29021echo "${ECHO_T}$MENU_NAME" >&6
29022
29023echo "$as_me:29023: checking for desired basename for panel library" >&5
29024echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
29025
29026# Check whether --with-panel-libname or --without-panel-libname was given.
29027if test "${with_panel_libname+set}" = set; then
29028 withval="$with_panel_libname"
29029 with_lib_basename=$withval
29030else
29031 with_lib_basename=panel
29032fi;
29033PANEL_NAME="$with_lib_basename"
29034
29035case "x$PANEL_NAME" in
29036(x|xno|xnone|xyes)
29037 PANEL_NAME=panel
29038 ;;
29039(*)
29040 ;;
29041esac
29042
29043echo "$as_me:29043: result: $PANEL_NAME" >&5
29044echo "${ECHO_T}$PANEL_NAME" >&6
29045
29046echo "$as_me:29046: checking for desired basename for cxx library" >&5
29047echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
29048
29049# Check whether --with-cxx-libname or --without-cxx-libname was given.
29050if test "${with_cxx_libname+set}" = set; then
29051 withval="$with_cxx_libname"
29052 with_lib_basename=$withval
29053else
29054 with_lib_basename=ncurses++
29055fi;
29056CXX_NAME="$with_lib_basename"
29057
29058case "x$CXX_NAME" in
29059(x|xno|xnone|xyes)
29060 CXX_NAME=ncurses++
29061 ;;
29062(*)
29063 ;;
29064esac
29065
29066echo "$as_me:29066: result: $CXX_NAME" >&5
29067echo "${ECHO_T}$CXX_NAME" >&6
29068
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029069### Construct the list of subdirectories for which we'll customize makefiles
29070### with the appropriate compile-rules.
29071
micky3879b9f5e72025-07-08 18:04:53 -040029072echo "$as_me:29072: checking for src modules" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029073echo $ECHO_N "checking for src modules... $ECHO_C" >&6
29074
29075# dependencies and linker-arguments for test-programs
29076TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
29077TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
29078if test "$DFT_LWR_MODEL" = "libtool"; then
29079 TEST_ARGS="${TEST_DEPS}"
29080 TEST_ARG2="${TEST_DEP2}"
29081else
Steve Kondikae271bc2015-11-15 02:50:53 +010029082 TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
29083 TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029084fi
29085
Steve Kondikae271bc2015-11-15 02:50:53 +010029086PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029087cf_cv_src_modules=
29088for cf_dir in $modules_to_build
29089do
micky3879b9f5e72025-07-08 18:04:53 -040029090 if test -f "$srcdir/$cf_dir/modules" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029091
29092 if test -z "$cf_cv_src_modules"; then
29093 cf_cv_src_modules=$cf_dir
29094 else
29095 cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
29096 fi
29097
29098 # Make the ncurses_cfg.h file record the library interface files as
29099 # well. These are header files that are the same name as their
29100 # directory. Ncurses is the only library that does not follow
29101 # that pattern.
micky3879b9f5e72025-07-08 18:04:53 -040029102 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029103
29104cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29105
29106 cat >>confdefs.h <<EOF
29107#define HAVE_${cf_have_include}_H 1
29108EOF
29109
29110 cat >>confdefs.h <<EOF
29111#define HAVE_LIB${cf_have_include} 1
29112EOF
29113
micky3879b9f5e72025-07-08 18:04:53 -040029114cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29115
29116eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
29117
29118 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
29119 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029120 if test "$DFT_LWR_MODEL" = "libtool"; then
29121 TEST_ARGS="${TEST_DEPS}"
29122 TEST_ARG2="${TEST_DEP2}"
29123 else
micky3879b9f5e72025-07-08 18:04:53 -040029124 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
29125 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029126 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010029127 PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029128 fi
29129 fi
29130done
micky3879b9f5e72025-07-08 18:04:53 -040029131echo "$as_me:29131: result: $cf_cv_src_modules" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029132echo "${ECHO_T}$cf_cv_src_modules" >&6
29133
29134TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
29135TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
29136
Steve Kondikae271bc2015-11-15 02:50:53 +010029137SRC_SUBDIRS=
29138if test "x$cf_with_manpages" != xno ; then
29139 SRC_SUBDIRS="$SRC_SUBDIRS man"
29140fi
29141SRC_SUBDIRS="$SRC_SUBDIRS include"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029142for cf_dir in $cf_cv_src_modules
29143do
29144 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
29145done
Steve Kondikae271bc2015-11-15 02:50:53 +010029146if test "x$cf_with_tests" != "xno" ; then
29147 SRC_SUBDIRS="$SRC_SUBDIRS test"
29148fi
29149# always make this, to install the ncurses-config script
29150SRC_SUBDIRS="$SRC_SUBDIRS misc"
29151if test "$cf_with_cxx_binding" != no; then
29152 PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
29153 SRC_SUBDIRS="$SRC_SUBDIRS c++"
29154fi
29155
29156test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
29157test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029158
29159ADA_SUBDIRS=
micky3879b9f5e72025-07-08 18:04:53 -040029160if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010029161 SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29162 ADA_SUBDIRS="gen src"
29163 if test "x$cf_with_tests" != "xno" ; then
29164 ADA_SUBDIRS="$ADA_SUBDIRS samples"
29165 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029166fi
29167
29168SUB_MAKEFILES=
29169for cf_dir in $SRC_SUBDIRS
29170do
29171 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29172done
29173
29174if test -n "$ADA_SUBDIRS"; then
Steve Kondikae271bc2015-11-15 02:50:53 +010029175 for cf_dir in $ADA_SUBDIRS
29176 do
29177 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29178 done
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029179
29180fi
29181
Steve Kondikae271bc2015-11-15 02:50:53 +010029182if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
micky3879b9f5e72025-07-08 18:04:53 -040029183 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
Steve Kondikae271bc2015-11-15 02:50:53 +010029184 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29185 SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029186fi
29187
29188DIRS_TO_MAKE="lib"
29189for cf_item in $cf_list_models
29190do
29191
29192 case $cf_item in
Steve Kondikae271bc2015-11-15 02:50:53 +010029193 (libtool) cf_subdir='obj_lo' ;;
29194 (normal) cf_subdir='objects' ;;
29195 (debug) cf_subdir='obj_g' ;;
29196 (profile) cf_subdir='obj_p' ;;
29197 (shared)
micky3879b9f5e72025-07-08 18:04:53 -040029198 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010029199 (cygwin|msys)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029200 cf_subdir='objects' ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010029201 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029202 cf_subdir='obj_s' ;;
29203 esac
29204 esac
29205
29206 for cf_item2 in $DIRS_TO_MAKE
29207 do
micky3879b9f5e72025-07-08 18:04:53 -040029208 test "$cf_item2" = "$cf_subdir" && break
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029209 done
29210 test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29211done
29212for cf_dir in $DIRS_TO_MAKE
29213do
micky3879b9f5e72025-07-08 18:04:53 -040029214 test ! -d "$cf_dir" && mkdir "$cf_dir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029215done
29216
Steve Kondikae271bc2015-11-15 02:50:53 +010029217# symbols that differ when compiling Ada95 by itself.
29218NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29219
29220# values to use as strings
29221
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029222cat >>confdefs.h <<EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010029223#define NCURSES_PATHSEP '$PATH_SEPARATOR'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029224EOF
29225
29226cat >>confdefs.h <<EOF
29227#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29228EOF
29229
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029230### Define substitutions for header files to avoid name-pollution
29231
Steve Kondikae271bc2015-11-15 02:50:53 +010029232if test "x$cf_cv_have_tcgetattr" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029233 HAVE_TCGETATTR=1
29234else
29235 HAVE_TCGETATTR=0
29236fi
29237
Steve Kondikae271bc2015-11-15 02:50:53 +010029238if test "x$ac_cv_header_stdint_h" = xyes ; then
29239 HAVE_STDINT_H=1
29240else
29241 HAVE_STDINT_H=0
29242fi
29243
29244if test "x$ac_cv_header_termio_h" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029245 HAVE_TERMIO_H=1
29246else
29247 HAVE_TERMIO_H=0
29248fi
29249
Steve Kondikae271bc2015-11-15 02:50:53 +010029250if test "x$ac_cv_header_termios_h" = xyes ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029251 HAVE_TERMIOS_H=1
29252else
29253 HAVE_TERMIOS_H=0
29254fi
29255
29256################################################################################
Steve Kondikae271bc2015-11-15 02:50:53 +010029257test "x$use_database" = xyes && \
29258SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29259
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029260SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
Steve Kondikae271bc2015-11-15 02:50:53 +010029261SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29262
micky3879b9f5e72025-07-08 18:04:53 -040029263if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010029264SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
Steve Kondikae271bc2015-11-15 02:50:53 +010029265fi
29266
29267if test "x$cf_with_tests" != xno ; then
29268 MAKE_TESTS=
29269else
29270 MAKE_TESTS="#"
29271fi
29272
29273ADAHTML_DIR=../../doc/html/ada
29274
micky3879b9f5e72025-07-08 18:04:53 -040029275# workaround for OS/2 (20151017)
29276case "$cf_cv_system_name" in
29277(os2*)
29278 LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29279 ;;
29280(*)
29281 LIBTOOL_OPTS_CXX=
29282 ;;
29283esac
Steve Kondikae271bc2015-11-15 02:50:53 +010029284
29285# workaround for g++ versus Solaris (20131116)
micky3879b9f5e72025-07-08 18:04:53 -040029286case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010029287(solaris2*)
29288 case "x$CPPFLAGS" in
29289 (*-D_XOPEN_SOURCE_EXTENDED*)
29290 test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29291
micky3879b9f5e72025-07-08 18:04:53 -040029292echo "${as_me:-configure}:29292: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010029293
29294 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29295 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29296 ;;
29297 esac
29298 ;;
29299esac
29300
29301# Help to automatically enable the extended curses features when using either
29302# the *-config or the ".pc" files by adding defines.
micky3879b9f5e72025-07-08 18:04:53 -040029303echo "$as_me:29303: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29304echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
Steve Kondikae271bc2015-11-15 02:50:53 +010029305PKG_CFLAGS=
29306for cf_loop1 in $CPPFLAGS_after_XOPEN
29307do
29308 cf_found=no
29309 for cf_loop2 in $CPPFLAGS_before_XOPEN
29310 do
29311 if test "x$cf_loop1" = "x$cf_loop2"
29312 then
29313 cf_found=yes
29314 break
29315 fi
29316 done
29317 test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29318done
micky3879b9f5e72025-07-08 18:04:53 -040029319echo "$as_me:29319: result: $PKG_CFLAGS" >&5
Steve Kondikae271bc2015-11-15 02:50:53 +010029320echo "${ECHO_T}$PKG_CFLAGS" >&6
29321
29322# AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this.
29323case "x$NCURSES_OSPEED" in
29324(*short*)
29325 cf_compatible=1
29326 ;;
29327(*)
29328 cf_compatible=0
29329 ;;
29330esac
29331
29332cat >>confdefs.h <<EOF
29333#define NCURSES_OSPEED_COMPAT $cf_compatible
29334EOF
29335
29336case "x$cf_cv_typeof_chtype" in
29337(xshort|xint|xlong)
29338 cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29339 ;;
29340esac
29341
29342case "x$cf_cv_typeof_mmask_t" in
29343(xshort|xint|xlong)
29344 cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29345 ;;
29346esac
29347
29348# substitute into misc/Makefile to suppress
29349# (un)install.data from the
29350# (un)install rules.
29351if test "x$cf_with_db_install" = "xno"; then
29352 MISC_INSTALL_DATA=
29353 MISC_UNINSTALL_DATA=
29354else
29355 MISC_INSTALL_DATA=install.data
29356 MISC_UNINSTALL_DATA=uninstall.data
29357fi
29358
micky3879b9f5e72025-07-08 18:04:53 -040029359if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29360 MAKE_DATABASE="#"
29361else
29362 MAKE_DATABASE="$MAKE_TERMINFO"
29363fi
Steve Kondikae271bc2015-11-15 02:50:53 +010029364
29365if test -n "$PACKAGE"
29366then
29367 PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29368 export PACKAGE
29369 echo "package: $PACKAGE"
29370fi
29371
29372UNALTERED_SYMS=
29373cf_filter_syms=no
29374
29375if test -n "$RESULTING_SYMS"
29376then
29377 cf_filter_syms=$cf_dft_filter_syms
micky3879b9f5e72025-07-08 18:04:53 -040029378 test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_default" 1>&6
Steve Kondikae271bc2015-11-15 02:50:53 +010029379
micky3879b9f5e72025-07-08 18:04:53 -040029380echo "${as_me:-configure}:29380: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010029381
29382fi
29383
29384if test "x$WILDCARD_SYMS" = xno
29385then
29386 cf_filter_syms=yes
29387fi
29388
micky3879b9f5e72025-07-08 18:04:53 -040029389test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29390
Steve Kondikae271bc2015-11-15 02:50:53 +010029391UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
micky3879b9f5e72025-07-08 18:04:53 -040029392if test "$cf_filter_syms" = yes
Steve Kondikae271bc2015-11-15 02:50:53 +010029393then
29394 RESULTING_SYMS=resulting.map
29395fi
29396
29397if test "x$cross_compiling" = xyes ; then
29398 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
micky3879b9f5e72025-07-08 18:04:53 -040029399 CHECK_BUILD="#"
Steve Kondikae271bc2015-11-15 02:50:53 +010029400else
29401 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
micky3879b9f5e72025-07-08 18:04:53 -040029402 CHECK_BUILD=
Steve Kondikae271bc2015-11-15 02:50:53 +010029403fi
29404
micky3879b9f5e72025-07-08 18:04:53 -040029405# This is used for the *-config script and *.pc data files.
29406
29407echo "$as_me:29407: checking for linker search path" >&5
29408echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29409if test "${cf_cv_ld_searchpath+set}" = set; then
29410 echo $ECHO_N "(cached) $ECHO_C" >&6
29411else
29412
29413if test "$cross_compiling" != yes ; then
29414
29415# GNU binutils' ld does not involve permissions which may stop ldconfig.
29416cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29417
29418# The -NX options tell newer versions of Linux ldconfig to not attempt to
29419# update the cache, which makes it run faster.
29420test -z "$cf_pathlist" && \
29421 cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[ ]/d' -e 's/:$//' | sort -u`
29422
29423test -z "$cf_pathlist" &&
29424 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[ ]/d' -e 's/:$//p' | sort -u`
29425
29426# This works with OpenBSD 6.5, which lists only filenames
29427test -z "$cf_pathlist" &&
29428 cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29429
29430if test -z "$cf_pathlist"
29431then
29432 # dyld default path with MacOS
29433 if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29434 then
29435 # do this to bypass check
29436 cf_cv_ld_searchpath='$HOME/lib'
29437 cf_pathlist="/usr/local/lib /lib /usr/lib"
29438 fi
29439fi
29440
29441if test -z "$cf_pathlist"
29442then
29443 # Solaris is "SunOS"
29444 if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29445 then
29446 case x`(isainfo -b)` in
29447 (x64)
29448 cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29449 ;;
29450 (x32)
29451 test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29452 cf_pathlist="$cf_pathlist /lib /usr/lib"
29453 ;;
29454 (*)
29455 { echo "$as_me:29455: WARNING: problem with Solaris architecture" >&5
29456echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29457 ;;
29458 esac
29459 fi
29460fi
29461
29462if test -z "$cf_pathlist"
29463then
29464 # HP-UX
29465 if test x"`uname -s`" = xHP-UX
29466 then
29467 case x`getconf LONG_BIT` in
29468 (x64)
29469 cf_pathlist="/usr/lib/hpux64"
29470 ;;
29471 (x*)
29472 cf_pathlist="/usr/lib/hpux32"
29473 ;;
29474 esac
29475 fi
29476fi
29477
29478fi
29479
29480# If nothing else, assume it is conventional
29481test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29482
29483# Finally, check that this is only directories
29484for cf_path in $0 $cf_pathlist
29485do
29486 if test -d "$cf_path"; then
29487 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29488 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29489 fi
29490done
29491
29492# Ensure that it is nonempty
29493test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29494
29495fi
29496echo "$as_me:29496: result: $cf_cv_ld_searchpath" >&5
29497echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29498
29499LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29500
29501ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h man/man_db.renames $SUB_MAKEFILES Makefile"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029502ac_config_commands="$ac_config_commands default"
29503cat >confcache <<\_ACEOF
29504# This file is a shell script that caches the results of configure
29505# tests run on this system so they can be shared between configure
29506# scripts and configure runs, see configure's option --config-cache.
29507# It is not useful on other systems. If it contains results you don't
29508# want to keep, you may remove or edit it.
29509#
29510# config.status only pays attention to the cache file if you give it
29511# the --recheck option to rerun configure.
29512#
micky3879b9f5e72025-07-08 18:04:53 -040029513# `ac_cv_env_foo' variables (set or unset) will be overridden when
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029514# loading this file, other *unset* `ac_cv_foo' will be assigned the
29515# following values.
29516
29517_ACEOF
29518
29519# The following way of writing the cache mishandles newlines in values,
29520# but we know of no workaround that is simple, portable, and efficient.
29521# So, don't put newlines in cache variables' values.
29522# Ultrix sh set writes to stderr and can't be redirected directly,
29523# and sets the high bit in the cache file unless we assign to the vars.
29524{
29525 (set) 2>&1 |
29526 case `(ac_space=' '; set | grep ac_space) 2>&1` in
29527 *ac_space=\ *)
29528 # `set' does not quote correctly, so add quotes (double-quote
29529 # substitution turns \\\\ into \\, and sed turns \\ into \).
29530 sed -n \
29531 "s/'/'\\\\''/g;
29532 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29533 ;;
29534 *)
29535 # `set' quotes correctly as required by POSIX, so do not add quotes.
29536 sed -n \
29537 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29538 ;;
29539 esac;
29540} |
29541 sed '
29542 t clear
29543 : clear
29544 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29545 t end
29546 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29547 : end' >>confcache
29548if cmp -s $cache_file confcache; then :; else
29549 if test -w $cache_file; then
29550 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29551 cat confcache >$cache_file
29552 else
29553 echo "not updating unwritable cache $cache_file"
29554 fi
29555fi
29556rm -f confcache
29557
29558test "x$prefix" = xNONE && prefix=$ac_default_prefix
29559# Let make expand exec_prefix.
29560test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29561
29562# VPATH may cause trouble with some makes, so we remove $(srcdir),
29563# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29564# trailing colons and then remove the whole line if VPATH becomes empty
29565# (actually we leave an empty line to preserve line numbers).
29566if test "x$srcdir" = x.; then
29567 ac_vpsub='/^[ ]*VPATH[ ]*=/{
29568s/:*\$(srcdir):*/:/;
29569s/:*\${srcdir}:*/:/;
29570s/:*@srcdir@:*/:/;
29571s/^\([^=]*=[ ]*\):*/\1/;
29572s/:*$//;
29573s/^[^=]*=[ ]*$//;
29574}'
29575fi
29576
29577DEFS=-DHAVE_CONFIG_H
29578
micky3879b9f5e72025-07-08 18:04:53 -040029579: "${CONFIG_STATUS=./config.status}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029580ac_clean_files_save=$ac_clean_files
29581ac_clean_files="$ac_clean_files $CONFIG_STATUS"
micky3879b9f5e72025-07-08 18:04:53 -040029582{ echo "$as_me:29582: creating $CONFIG_STATUS" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029583echo "$as_me: creating $CONFIG_STATUS" >&6;}
micky3879b9f5e72025-07-08 18:04:53 -040029584cat >"$CONFIG_STATUS" <<_ACEOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029585#! $SHELL
29586# Generated automatically by configure.
29587# Run this file to recreate the current configuration.
29588# Compiler output produced by configure, useful for debugging
29589# configure, is in config.log if it exists.
29590
micky3879b9f5e72025-07-08 18:04:53 -040029591me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29592
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029593debug=false
29594SHELL=\${CONFIG_SHELL-$SHELL}
29595ac_cs_invocation="\$0 \$@"
29596
micky3879b9f5e72025-07-08 18:04:53 -040029597CLICOLOR_FORCE= GREP_OPTIONS=
29598unset CLICOLOR_FORCE GREP_OPTIONS
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029599_ACEOF
29600
micky3879b9f5e72025-07-08 18:04:53 -040029601cat >>"$CONFIG_STATUS" <<\_ACEOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029602# Be Bourne compatible
29603if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29604 emulate sh
29605 NULLCMD=:
29606elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29607 set -o posix
29608fi
29609
29610# Name of the executable.
29611as_me=`echo "$0" |sed 's,.*[\\/],,'`
29612
29613if expr a : '\(a\)' >/dev/null 2>&1; then
micky3879b9f5e72025-07-08 18:04:53 -040029614 as_expr="expr"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029615else
micky3879b9f5e72025-07-08 18:04:53 -040029616 as_expr="false"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029617fi
29618
29619rm -f conf$$ conf$$.exe conf$$.file
29620echo >conf$$.file
29621if ln -s conf$$.file conf$$ 2>/dev/null; then
29622 # We could just check for DJGPP; but this test a) works b) is more generic
29623 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29624 if test -f conf$$.exe; then
29625 # Don't use ln at all; we don't have any links
29626 as_ln_s='cp -p'
29627 else
29628 as_ln_s='ln -s'
29629 fi
29630elif ln conf$$.file conf$$ 2>/dev/null; then
micky3879b9f5e72025-07-08 18:04:53 -040029631 as_ln_s='ln'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029632else
29633 as_ln_s='cp -p'
29634fi
29635rm -f conf$$ conf$$.exe conf$$.file
29636
29637as_executable_p="test -f"
29638
29639# Support unset when possible.
29640if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
micky3879b9f5e72025-07-08 18:04:53 -040029641 as_unset="unset"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029642else
micky3879b9f5e72025-07-08 18:04:53 -040029643 as_unset="false"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029644fi
29645
29646# NLS nuisances.
29647$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29648$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29649$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29650$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29651$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29652$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29653$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29654$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29655
29656# IFS
29657# We need space, tab and new line, in precisely that order.
29658as_nl='
29659'
29660IFS=" $as_nl"
29661
29662# CDPATH.
29663$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29664
29665exec 6>&1
29666
29667_ACEOF
29668
29669# Files that config.status was made for.
29670if test -n "$ac_config_files"; then
micky3879b9f5e72025-07-08 18:04:53 -040029671 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029672fi
29673
29674if test -n "$ac_config_headers"; then
micky3879b9f5e72025-07-08 18:04:53 -040029675 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029676fi
29677
29678if test -n "$ac_config_links"; then
micky3879b9f5e72025-07-08 18:04:53 -040029679 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029680fi
29681
29682if test -n "$ac_config_commands"; then
micky3879b9f5e72025-07-08 18:04:53 -040029683 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029684fi
29685
micky3879b9f5e72025-07-08 18:04:53 -040029686cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029687
29688ac_cs_usage="\
29689\`$as_me' instantiates files from templates according to the
29690current configuration.
29691
29692Usage: $0 [OPTIONS] [FILE]...
29693
29694 -h, --help print this help, then exit
29695 -V, --version print version number, then exit
29696 -d, --debug don't remove temporary files
29697 --recheck update $as_me by reconfiguring in the same conditions
29698 --file=FILE[:TEMPLATE]
29699 instantiate the configuration file FILE
29700 --header=FILE[:TEMPLATE]
29701 instantiate the configuration header FILE
29702
29703Configuration files:
29704$config_files
29705
29706Configuration headers:
29707$config_headers
29708
29709Configuration commands:
29710$config_commands
29711
Steve Kondikae271bc2015-11-15 02:50:53 +010029712Report bugs to <dickey@invisible-island.net>."
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029713EOF
29714
micky3879b9f5e72025-07-08 18:04:53 -040029715cat >>"$CONFIG_STATUS" <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029716ac_cs_version="\\
29717config.status
micky3879b9f5e72025-07-08 18:04:53 -040029718configured by $0, generated by GNU Autoconf 2.52.20231210,
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029719 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29720
micky3879b9f5e72025-07-08 18:04:53 -040029721Copyright 2003-2022,2023 Thomas E. Dickey
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029722Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29723Free Software Foundation, Inc.
29724This config.status script is free software; the Free Software Foundation
29725gives unlimited permission to copy, distribute and modify it."
micky3879b9f5e72025-07-08 18:04:53 -040029726srcdir="$srcdir"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029727INSTALL="$INSTALL"
29728EOF
29729
micky3879b9f5e72025-07-08 18:04:53 -040029730cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029731# If no file are specified by the user, then we need to provide default
29732# value. By we need to know if files were specified by the user.
29733ac_need_defaults=:
29734while test $# != 0
29735do
29736 case $1 in
29737 --*=*)
29738 ac_option=`expr "x$1" : 'x\([^=]*\)='`
29739 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29740 shift
29741 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29742 shift
29743 ;;
29744 -*);;
29745 *) # This is not an option, so the user has probably given explicit
29746 # arguments.
29747 ac_need_defaults=false;;
29748 esac
29749
29750 case $1 in
29751 # Handling of the options.
29752EOF
micky3879b9f5e72025-07-08 18:04:53 -040029753cat >>"$CONFIG_STATUS" <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029754 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29755 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29756 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29757EOF
micky3879b9f5e72025-07-08 18:04:53 -040029758cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029759 --version | --vers* | -V )
29760 echo "$ac_cs_version"; exit 0 ;;
29761 --he | --h)
29762 # Conflict between --help and --header
micky3879b9f5e72025-07-08 18:04:53 -040029763 { { echo "$as_me:29763: error: ambiguous option: $1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029764Try \`$0 --help' for more information." >&5
29765echo "$as_me: error: ambiguous option: $1
29766Try \`$0 --help' for more information." >&2;}
29767 { (exit 1); exit 1; }; };;
29768 --help | --hel | -h )
29769 echo "$ac_cs_usage"; exit 0 ;;
29770 --debug | --d* | -d )
29771 debug=: ;;
29772 --file | --fil | --fi | --f )
29773 shift
29774 CONFIG_FILES="$CONFIG_FILES $1"
29775 ac_need_defaults=false;;
29776 --header | --heade | --head | --hea )
29777 shift
29778 CONFIG_HEADERS="$CONFIG_HEADERS $1"
29779 ac_need_defaults=false;;
29780
29781 # This is an error.
micky3879b9f5e72025-07-08 18:04:53 -040029782 -*) { { echo "$as_me:29782: error: unrecognized option: $1
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029783Try \`$0 --help' for more information." >&5
29784echo "$as_me: error: unrecognized option: $1
29785Try \`$0 --help' for more information." >&2;}
29786 { (exit 1); exit 1; }; } ;;
29787
29788 *) ac_config_targets="$ac_config_targets $1" ;;
29789
29790 esac
29791 shift
29792done
29793
29794exec 5>>config.log
29795cat >&5 << _ACEOF
29796
29797## ----------------------- ##
29798## Running config.status. ##
29799## ----------------------- ##
29800
micky3879b9f5e72025-07-08 18:04:53 -040029801This file was extended by $as_me 2.52.20231210, executed with
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029802 CONFIG_FILES = $CONFIG_FILES
29803 CONFIG_HEADERS = $CONFIG_HEADERS
29804 CONFIG_LINKS = $CONFIG_LINKS
29805 CONFIG_COMMANDS = $CONFIG_COMMANDS
micky3879b9f5e72025-07-08 18:04:53 -040029806 > "$ac_cs_invocation"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029807on `(hostname || uname -n) 2>/dev/null | sed 1q`
29808
29809_ACEOF
29810EOF
29811
micky3879b9f5e72025-07-08 18:04:53 -040029812cat >>"$CONFIG_STATUS" <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029813#
29814# INIT-COMMANDS section.
29815#
29816
29817### Special initialization commands, used to pass information from the
29818### configuration-run into config.status
29819
Steve Kondikae271bc2015-11-15 02:50:53 +010029820ALTERNATE_SYMS="$ALTERNATE_SYMS"
micky3879b9f5e72025-07-08 18:04:53 -040029821AWK="$AWK"
29822CXX_NAME="$CXX_NAME"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029823DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29824DFT_LWR_MODEL="$DFT_LWR_MODEL"
Steve Kondikae271bc2015-11-15 02:50:53 +010029825ECHO_LD="$ECHO_LD"
29826EXTRA_SUFFIX="$EXTRA_SUFFIX"
micky3879b9f5e72025-07-08 18:04:53 -040029827FORM_NAME="$FORM_NAME"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029828LDCONFIG="$LDCONFIG"
Steve Kondikae271bc2015-11-15 02:50:53 +010029829LIBTOOL_VERSION="$LIBTOOL_VERSION"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029830LIB_NAME="$LIB_NAME"
Steve Kondikae271bc2015-11-15 02:50:53 +010029831LIB_PREFIX="$LIB_PREFIX"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029832LIB_SUBSETS="$LIB_SUBSETS"
29833LIB_SUFFIX="$LIB_SUFFIX"
29834LIB_TRACING="$LIB_TRACING"
Steve Kondikae271bc2015-11-15 02:50:53 +010029835LN_S="$LN_S"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029836MAKE_TERMINFO="$MAKE_TERMINFO"
micky3879b9f5e72025-07-08 18:04:53 -040029837MANPAGE_RENAMES="$MANPAGE_RENAMES"
29838MENU_NAME="$MENU_NAME"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029839NCURSES_MAJOR="$NCURSES_MAJOR"
29840NCURSES_MINOR="$NCURSES_MINOR"
29841NCURSES_OSPEED="$NCURSES_OSPEED"
29842NCURSES_PATCH="$NCURSES_PATCH"
micky3879b9f5e72025-07-08 18:04:53 -040029843PANEL_NAME="$PANEL_NAME"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029844SRC_SUBDIRS="$SRC_SUBDIRS"
29845TERMINFO="$TERMINFO"
Steve Kondikae271bc2015-11-15 02:50:53 +010029846TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29847TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29848TICS_NAME="$TICS_NAME"
micky3879b9f5e72025-07-08 18:04:53 -040029849TICS_SUFFIX="$TICS_SUFFIX"
Steve Kondikae271bc2015-11-15 02:50:53 +010029850TIC_PATH="$TIC_PATH"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029851TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29852TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29853TINFO_NAME="$TINFO_NAME"
29854TINFO_SUFFIX="$TINFO_SUFFIX"
Steve Kondikae271bc2015-11-15 02:50:53 +010029855UNALTERED_SYMS="$UNALTERED_SYMS"
29856USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29857USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29858USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29859USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29860WILDCARD_SYMS="$WILDCARD_SYMS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029861WITH_CURSES_H="$with_curses_h"
Steve Kondikae271bc2015-11-15 02:50:53 +010029862WITH_ECHO="${enable_echo:=yes}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029863WITH_OVERWRITE="$with_overwrite"
29864cf_LIST_MODELS="$cf_list_models"
micky3879b9f5e72025-07-08 18:04:53 -040029865cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29866cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29867cf_cv_abi_default="$cf_cv_abi_default"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029868cf_cv_abi_version="$cf_cv_abi_version"
29869cf_cv_do_relink="$cf_cv_do_relink"
micky3879b9f5e72025-07-08 18:04:53 -040029870cf_cv_do_reranlib="$cf_cv_do_reranlib"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029871cf_cv_do_symlinks="$cf_cv_do_symlinks"
29872cf_cv_enable_lp64="$cf_cv_enable_lp64"
29873cf_cv_enable_opaque="$cf_cv_enable_opaque"
micky3879b9f5e72025-07-08 18:04:53 -040029874cf_cv_make_PHONY="$cf_cv_make_PHONY"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029875cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29876cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
Steve Kondikae271bc2015-11-15 02:50:53 +010029877cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029878cf_cv_rel_version="$cf_cv_rel_version"
29879cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29880cf_cv_shared_soname='$cf_cv_shared_soname'
29881cf_cv_shlib_version="$cf_cv_shlib_version"
29882cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29883cf_cv_system_name="$cf_cv_system_name"
Steve Kondikae271bc2015-11-15 02:50:53 +010029884cf_cv_term_driver="$with_term_driver"
29885cf_with_ada="$cf_with_ada"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029886cf_with_cxx_binding="$cf_with_cxx_binding"
Steve Kondikae271bc2015-11-15 02:50:53 +010029887cf_with_db_install="$cf_with_db_install"
29888cf_with_manpages="$cf_with_manpages"
29889cf_with_tests="$cf_with_tests"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029890host="$host"
29891target="$target"
micky3879b9f5e72025-07-08 18:04:53 -040029892verbose="$verbose"
Steve Kondikae271bc2015-11-15 02:50:53 +010029893with_shared_cxx="$with_shared_cxx"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029894
29895EOF
29896
micky3879b9f5e72025-07-08 18:04:53 -040029897cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029898for ac_config_target in $ac_config_targets
29899do
29900 case "$ac_config_target" in
29901 # Handling of arguments.
29902 "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29903 "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010029904 "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029905 "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29906 "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
micky3879b9f5e72025-07-08 18:04:53 -040029907 "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029908 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29909 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29910 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29911 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
micky3879b9f5e72025-07-08 18:04:53 -040029912 *) { { echo "$as_me:29912: error: invalid argument: $ac_config_target" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029913echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29914 { (exit 1); exit 1; }; };;
29915 esac
29916done
29917
29918# If the user did not use the arguments to specify the items to instantiate,
29919# then the envvar interface is used. Set only those that are not.
29920# We use the long form for the default assignment because of an extremely
29921# bizarre bug on SunOS 4.1.3.
micky3879b9f5e72025-07-08 18:04:53 -040029922if "$ac_need_defaults"; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029923 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29924 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29925 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29926fi
29927
29928# Create a temporary directory, and hook for its removal unless debugging.
29929$debug ||
29930{
29931 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29932 trap '{ (exit 1); exit 1; }' 1 2 13 15
29933}
29934
29935# Create a (secure) tmp directory for tmp files.
micky3879b9f5e72025-07-08 18:04:53 -040029936: "${TMPDIR=/tmp}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029937{
29938 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29939 test -n "$tmp" && test -d "$tmp"
29940} ||
29941{
29942 tmp=$TMPDIR/cs$$-$RANDOM
micky3879b9f5e72025-07-08 18:04:53 -040029943 (umask 077 && mkdir "$tmp")
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029944} ||
29945{
29946 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29947 { (exit 1); exit 1; }
29948}
29949
29950EOF
29951
micky3879b9f5e72025-07-08 18:04:53 -040029952cat >>"$CONFIG_STATUS" <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029953
29954#
29955# CONFIG_FILES section.
29956#
29957
29958# No need to generate the scripts if there are no CONFIG_FILES.
29959# This happens for instance when ./config.status config.h
29960if test -n "\$CONFIG_FILES"; then
29961 # Protect against being on the right side of a sed subst in config.status.
29962 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
micky3879b9f5e72025-07-08 18:04:53 -040029963 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029964s,@SHELL@,$SHELL,;t t
29965s,@exec_prefix@,$exec_prefix,;t t
29966s,@prefix@,$prefix,;t t
29967s,@program_transform_name@,$program_transform_name,;t t
29968s,@bindir@,$bindir,;t t
29969s,@sbindir@,$sbindir,;t t
29970s,@libexecdir@,$libexecdir,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010029971s,@datarootdir@,$datarootdir,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029972s,@datadir@,$datadir,;t t
29973s,@sysconfdir@,$sysconfdir,;t t
29974s,@sharedstatedir@,$sharedstatedir,;t t
29975s,@localstatedir@,$localstatedir,;t t
micky3879b9f5e72025-07-08 18:04:53 -040029976s,@runstatedir@,$runstatedir,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029977s,@libdir@,$libdir,;t t
29978s,@includedir@,$includedir,;t t
29979s,@oldincludedir@,$oldincludedir,;t t
29980s,@infodir@,$infodir,;t t
29981s,@mandir@,$mandir,;t t
29982s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29983s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29984s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29985s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29986s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29987s,@build_alias@,$build_alias,;t t
29988s,@host_alias@,$host_alias,;t t
29989s,@target_alias@,$target_alias,;t t
29990s,@ECHO_C@,$ECHO_C,;t t
29991s,@ECHO_N@,$ECHO_N,;t t
29992s,@ECHO_T@,$ECHO_T,;t t
29993s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29994s,@DEFS@,$DEFS,;t t
29995s,@LIBS@,$LIBS,;t t
29996s,@top_builddir@,$top_builddir,;t t
micky3879b9f5e72025-07-08 18:04:53 -040029997s,@GREP@,$GREP,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053029998s,@EGREP@,$EGREP,;t t
29999s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
30000s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
30001s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
30002s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
30003s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030004s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030005s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
30006s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
30007s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030008s,@VERSION@,$VERSION,;t t
30009s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
30010s,@VERSION_MINOR@,$VERSION_MINOR,;t t
30011s,@VERSION_PATCH@,$VERSION_PATCH,;t t
30012s,@PACKAGE@,$PACKAGE,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030013s,@build@,$build,;t t
30014s,@build_cpu@,$build_cpu,;t t
30015s,@build_vendor@,$build_vendor,;t t
30016s,@build_os@,$build_os,;t t
30017s,@host@,$host,;t t
30018s,@host_cpu@,$host_cpu,;t t
30019s,@host_vendor@,$host_vendor,;t t
30020s,@host_os@,$host_os,;t t
30021s,@target@,$target,;t t
30022s,@target_cpu@,$target_cpu,;t t
30023s,@target_vendor@,$target_vendor,;t t
30024s,@target_os@,$target_os,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030025s,@FGREP@,$FGREP,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030026s,@CC@,$CC,;t t
30027s,@CFLAGS@,$CFLAGS,;t t
30028s,@LDFLAGS@,$LDFLAGS,;t t
30029s,@CPPFLAGS@,$CPPFLAGS,;t t
30030s,@ac_ct_CC@,$ac_ct_CC,;t t
30031s,@EXEEXT@,$EXEEXT,;t t
30032s,@OBJEXT@,$OBJEXT,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030033s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030034s,@CPP@,$CPP,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030035s,@LDCONFIG@,$LDCONFIG,;t t
30036s,@CXX@,$CXX,;t t
30037s,@CXXFLAGS@,$CXXFLAGS,;t t
30038s,@ac_ct_CXX@,$ac_ct_CXX,;t t
30039s,@AWK@,$AWK,;t t
30040s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
30041s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
30042s,@INSTALL_DATA@,$INSTALL_DATA,;t t
30043s,@LINT@,$LINT,;t t
30044s,@LINT_OPTS@,$LINT_OPTS,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030045s,@LINT_LIBS@,$LINT_LIBS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030046s,@LN_S@,$LN_S,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030047s,@cf_config_suffix@,$cf_config_suffix,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030048s,@PKG_CONFIG@,$PKG_CONFIG,;t t
30049s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
30050s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
30051s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
30052s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030053s,@SET_MAKE@,$SET_MAKE,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030054s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
30055s,@MAKE_PHONY@,$MAKE_PHONY,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030056s,@CTAGS@,$CTAGS,;t t
30057s,@ETAGS@,$ETAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030058s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
30059s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
30060s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
30061s,@RANLIB@,$RANLIB,;t t
30062s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
30063s,@LD@,$LD,;t t
30064s,@ac_ct_LD@,$ac_ct_LD,;t t
30065s,@AR@,$AR,;t t
30066s,@ac_ct_AR@,$ac_ct_AR,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030067s,@NM@,$NM,;t t
30068s,@ac_ct_NM@,$ac_ct_NM,;t t
30069s,@ARFLAGS@,$ARFLAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030070s,@DESTDIR@,$DESTDIR,;t t
30071s,@BUILD_CC@,$BUILD_CC,;t t
30072s,@BUILD_CPP@,$BUILD_CPP,;t t
30073s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
30074s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
30075s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
30076s,@BUILD_LIBS@,$BUILD_LIBS,;t t
30077s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
30078s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
30079s,@cf_list_models@,$cf_list_models,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030080s,@ABI_VERSION@,$ABI_VERSION,;t t
30081s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030082s,@LIBTOOL@,$LIBTOOL,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030083s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
30084s,@LT_UNDEF@,$LT_UNDEF,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030085s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
30086s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
30087s,@LIB_CREATE@,$LIB_CREATE,;t t
30088s,@LIB_OBJECT@,$LIB_OBJECT,;t t
30089s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
30090s,@LIB_PREP@,$LIB_PREP,;t t
30091s,@LIB_CLEAN@,$LIB_CLEAN,;t t
30092s,@LIB_COMPILE@,$LIB_COMPILE,;t t
30093s,@LIB_LINK@,$LIB_LINK,;t t
30094s,@LIB_INSTALL@,$LIB_INSTALL,;t t
30095s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
30096s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
30097s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
30098s,@TICS_NAME@,$TICS_NAME,;t t
30099s,@TINFO_NAME@,$TINFO_NAME,;t t
30100s,@LIB_NAME@,$LIB_NAME,;t t
30101s,@LIB_PREFIX@,$LIB_PREFIX,;t t
30102s,@CC_G_OPT@,$CC_G_OPT,;t t
30103s,@CXX_G_OPT@,$CXX_G_OPT,;t t
30104s,@LD_MODEL@,$LD_MODEL,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030105s,@shlibdir@,$shlibdir,;t t
30106s,@MAKE_DLLS@,$MAKE_DLLS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030107s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030108s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030109s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
30110s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030111s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030112s,@LINK_PROGS@,$LINK_PROGS,;t t
30113s,@LINK_TESTS@,$LINK_TESTS,;t t
30114s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
30115s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
30116s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
30117s,@INSTALL_LIB@,$INSTALL_LIB,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030118s,@RPATH_LIST@,$RPATH_LIST,;t t
30119s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
30120s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
30121s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
30122s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
30123s,@cf_ldd_prog@,$cf_ldd_prog,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030124s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030125s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030126s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030127s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030128s,@TIC@,$TIC,;t t
30129s,@ac_ct_TIC@,$ac_ct_TIC,;t t
30130s,@INFOCMP@,$INFOCMP,;t t
30131s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030132s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030133s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030134s,@WHICH_XTERM@,$WHICH_XTERM,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030135s,@XTERM_KBS@,$XTERM_KBS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030136s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
30137s,@TERMINFO@,$TERMINFO,;t t
30138s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
30139s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
30140s,@TERMPATH@,$TERMPATH,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030141s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030142s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030143s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030144s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
30145s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
30146s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
30147s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
30148s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
30149s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
30150s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
30151s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
30152s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
30153s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030154s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
30155s,@RGB_PATH@,$RGB_PATH,;t t
30156s,@no_x11_rgb@,$no_x11_rgb,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030157s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
30158s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030159s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030160s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030161s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030162s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030163s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030164s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030165s,@cf_manpage_format@,$cf_manpage_format,;t t
30166s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30167s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30168s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30169s,@cf_manpage_coptions@,$cf_manpage_coptions,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030170s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30171s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030172s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30173s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30174s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030175s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30176s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30177s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030178s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030179s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30180s,@PTHREAD@,$PTHREAD,;t t
30181s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30182s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030183s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030184s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30185s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30186s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30187s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030188s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030189s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30190s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30191s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30192s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30193s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30194s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030195s,@ECHO_LT@,$ECHO_LT,;t t
30196s,@ECHO_LD@,$ECHO_LD,;t t
30197s,@RULE_CC@,$RULE_CC,;t t
30198s,@SHOW_CC@,$SHOW_CC,;t t
30199s,@ECHO_CC@,$ECHO_CC,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030200s,@ECHO_LINK@,$ECHO_LINK,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030201s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30202s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30203s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030204s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030205s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30206s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30207s,@ADAFLAGS@,$ADAFLAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030208s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30209s,@ADA_TRACE@,$ADA_TRACE,;t t
30210s,@MATH_LIB@,$MATH_LIB,;t t
30211s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30212s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30213s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30214s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30215s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30216s,@TEST_LIBS@,$TEST_LIBS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030217s,@TEST_LIBS2@,$TEST_LIBS2,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030218s,@CXXCPP@,$CXXCPP,;t t
30219s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30220s,@CXX_AR@,$CXX_AR,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030221s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030222s,@CXXLIBS@,$CXXLIBS,;t t
30223s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030224s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030225s,@M4_exists@,$M4_exists,;t t
30226s,@cf_ada_make@,$cf_ada_make,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030227s,@cf_ada_config@,$cf_ada_config,;t t
30228s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30229s,@cf_ada_config_C@,$cf_ada_config_C,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030230s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030231s,@cf_compile_generics@,$cf_compile_generics,;t t
30232s,@cf_generic_objects@,$cf_generic_objects,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030233s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30234s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30235s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30236s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030237s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30238s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030239s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30240s,@cf_ada_package@,$cf_ada_package,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030241s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30242s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030243s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30244s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030245s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030246s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30247s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30248s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30249s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30250s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030251s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30252s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30253s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030254s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30255s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30256s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030257s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30258s,@TICS_LIBS@,$TICS_LIBS,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030259s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30260s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30261s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030262s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30263s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30264s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030265s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30266s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030267s,@includesubdir@,$includesubdir,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030268s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30269s,@TICS_LIST@,$TICS_LIST,;t t
30270s,@TINFO_LIST@,$TINFO_LIST,;t t
30271s,@SHLIB_LIST@,$SHLIB_LIST,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030272s,@FORM_NAME@,$FORM_NAME,;t t
30273s,@MENU_NAME@,$MENU_NAME,;t t
30274s,@PANEL_NAME@,$PANEL_NAME,;t t
30275s,@CXX_NAME@,$CXX_NAME,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030276s,@TEST_ARGS@,$TEST_ARGS,;t t
30277s,@TEST_DEPS@,$TEST_DEPS,;t t
30278s,@TEST_ARG2@,$TEST_ARG2,;t t
30279s,@TEST_DEP2@,$TEST_DEP2,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030280s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030281s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30282s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030283s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030284s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030285s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030286s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30287s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030288s,@cross_compiling@,$cross_compiling,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030289s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30290s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030291s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030292s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30293s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30294s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030295s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
Steve Kondikae271bc2015-11-15 02:50:53 +010030296s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30297s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030298s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30299s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30300s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030301CEOF
30302
30303EOF
30304
micky3879b9f5e72025-07-08 18:04:53 -040030305 cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030306 # Split the substitutions into bite-sized pieces for seds with
30307 # small command number limits, like on Digital OSF/1 and HP-UX.
30308 ac_max_sed_lines=48
30309 ac_sed_frag=1 # Number of current file.
30310 ac_beg=1 # First line for current file.
30311 ac_end=$ac_max_sed_lines # Line after last line for current file.
30312 ac_more_lines=:
30313 ac_sed_cmds=
micky3879b9f5e72025-07-08 18:04:53 -040030314 while "$ac_more_lines"; do
30315 if test "$ac_beg" -gt 1; then
30316 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030317 else
micky3879b9f5e72025-07-08 18:04:53 -040030318 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030319 fi
micky3879b9f5e72025-07-08 18:04:53 -040030320 if test ! -s "$tmp"/subs.frag; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030321 ac_more_lines=false
30322 else
30323 # The purpose of the label and of the branching condition is to
30324 # speed up the sed processing (if there are no `@' at all, there
30325 # is no need to browse any of the substitutions).
30326 # These are the two extra sed commands mentioned above.
30327 (echo ':t
micky3879b9f5e72025-07-08 18:04:53 -040030328 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30329 # It is possible to make a multiline substitution using escaped newlines.
30330 # Ensure that we do not split the substitution between script fragments.
30331 ac_BEG=$ac_end
30332 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30333 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30334 if test -s "$tmp"/subs.next; then
30335 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30336 if test ! -s "$tmp"/subs.edit; then
30337 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30338 if test ! -s "$tmp"/subs.edit; then
30339 if test "$ac_beg" -gt 1; then
30340 ac_end=`expr "$ac_end" - 1`
30341 continue
30342 fi
30343 fi
30344 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030345 fi
micky3879b9f5e72025-07-08 18:04:53 -040030346
30347 if test -z "$ac_sed_cmds"; then
30348 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30349 else
30350 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30351 fi
30352 ac_sed_frag=`expr "$ac_sed_frag" + 1`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030353 ac_beg=$ac_end
micky3879b9f5e72025-07-08 18:04:53 -040030354 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030355 fi
30356 done
30357 if test -z "$ac_sed_cmds"; then
micky3879b9f5e72025-07-08 18:04:53 -040030358 ac_sed_cmds="cat"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030359 fi
30360fi # test -n "$CONFIG_FILES"
30361
30362EOF
micky3879b9f5e72025-07-08 18:04:53 -040030363cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030364for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30365 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
micky3879b9f5e72025-07-08 18:04:53 -040030366 case "$ac_file" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030367 - | *:- | *:-:* ) # input from stdin
micky3879b9f5e72025-07-08 18:04:53 -040030368 cat >"$tmp"/stdin
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030369 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30370 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30371 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30372 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30373 * ) ac_file_in=$ac_file.in ;;
30374 esac
30375
30376 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30377 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30378 X"$ac_file" : 'X\(//\)[^/]' \| \
30379 X"$ac_file" : 'X\(//\)$' \| \
30380 X"$ac_file" : 'X\(/\)' \| \
30381 . : '\(.\)' 2>/dev/null ||
30382echo X"$ac_file" |
30383 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30384 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30385 /^X\(\/\/\)$/{ s//\1/; q; }
30386 /^X\(\/\).*/{ s//\1/; q; }
30387 s/.*/./; q'`
30388 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30389 { case "$ac_dir" in
30390 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30391 *) as_incr_dir=.;;
30392esac
30393as_dummy="$ac_dir"
30394for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30395 case $as_mkdir_dir in
30396 # Skip DOS drivespec
30397 ?:) as_incr_dir=$as_mkdir_dir ;;
30398 *)
30399 as_incr_dir=$as_incr_dir/$as_mkdir_dir
30400 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30401 ;;
30402 esac
30403done; }
30404
micky3879b9f5e72025-07-08 18:04:53 -040030405 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030406 # A "../" for each directory in $ac_dir_suffix.
30407 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30408 else
30409 ac_dir_suffix= ac_dots=
30410 fi
30411
micky3879b9f5e72025-07-08 18:04:53 -040030412 case "$srcdir" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030413 .) ac_srcdir=.
30414 if test -z "$ac_dots"; then
30415 ac_top_srcdir=.
30416 else
micky3879b9f5e72025-07-08 18:04:53 -040030417 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030418 fi ;;
30419 [\\/]* | ?:[\\/]* )
micky3879b9f5e72025-07-08 18:04:53 -040030420 ac_srcdir="$srcdir$ac_dir_suffix";
30421 ac_top_srcdir="$srcdir" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030422 *) # Relative path.
micky3879b9f5e72025-07-08 18:04:53 -040030423 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30424 ac_top_srcdir="$ac_dots$srcdir" ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030425 esac
30426
30427 case $INSTALL in
30428 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30429 *) ac_INSTALL=$ac_dots$INSTALL ;;
30430 esac
30431
30432 if test x"$ac_file" != x-; then
micky3879b9f5e72025-07-08 18:04:53 -040030433 { echo "$as_me:30433: creating $ac_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030434echo "$as_me: creating $ac_file" >&6;}
30435 rm -f "$ac_file"
30436 fi
30437 # Let's still pretend it is `configure' which instantiates (i.e., don't
30438 # use $as_me), people would be surprised to read:
30439 # /* config.h. Generated automatically by config.status. */
30440 configure_input="Generated automatically from `echo $ac_file_in |
30441 sed 's,.*/,,'` by configure."
30442
30443 # First look for the input files in the build tree, otherwise in the
30444 # src tree.
30445 ac_file_inputs=`IFS=:
30446 for f in $ac_file_in; do
30447 case $f in
micky3879b9f5e72025-07-08 18:04:53 -040030448 -) echo "$tmp"/stdin ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030449 [\\/$]*)
30450 # Absolute (can't be DOS-style, as IFS=:)
micky3879b9f5e72025-07-08 18:04:53 -040030451 test -f "$f" || { { echo "$as_me:30451: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030452echo "$as_me: error: cannot find input file: $f" >&2;}
30453 { (exit 1); exit 1; }; }
micky3879b9f5e72025-07-08 18:04:53 -040030454 echo "$f";;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030455 *) # Relative
30456 if test -f "$f"; then
30457 # Build tree
micky3879b9f5e72025-07-08 18:04:53 -040030458 echo "$f"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030459 elif test -f "$srcdir/$f"; then
30460 # Source tree
micky3879b9f5e72025-07-08 18:04:53 -040030461 echo "$srcdir/$f"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030462 else
30463 # /dev/null tree
micky3879b9f5e72025-07-08 18:04:53 -040030464 { { echo "$as_me:30464: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030465echo "$as_me: error: cannot find input file: $f" >&2;}
30466 { (exit 1); exit 1; }; }
30467 fi;;
30468 esac
30469 done` || { (exit 1); exit 1; }
30470EOF
micky3879b9f5e72025-07-08 18:04:53 -040030471cat >>"$CONFIG_STATUS" <<\EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010030472 ac_warn_datarootdir=no
30473 if test x"$ac_file" != x-; then
30474 for ac_item in $ac_file_inputs
30475 do
micky3879b9f5e72025-07-08 18:04:53 -040030476 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
Steve Kondikae271bc2015-11-15 02:50:53 +010030477 if test -n "$ac_seen"; then
micky3879b9f5e72025-07-08 18:04:53 -040030478 ac_used=`grep '@datarootdir@' "$ac_item"`
Steve Kondikae271bc2015-11-15 02:50:53 +010030479 if test -z "$ac_used"; then
micky3879b9f5e72025-07-08 18:04:53 -040030480 { echo "$as_me:30480: WARNING: datarootdir was used implicitly but not set:
Steve Kondikae271bc2015-11-15 02:50:53 +010030481$ac_seen" >&5
30482echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30483$ac_seen" >&2;}
30484 ac_warn_datarootdir=yes
30485 fi
30486 fi
micky3879b9f5e72025-07-08 18:04:53 -040030487 ac_seen=`grep '${datarootdir}' "$ac_item"`
Steve Kondikae271bc2015-11-15 02:50:53 +010030488 if test -n "$ac_seen"; then
micky3879b9f5e72025-07-08 18:04:53 -040030489 { echo "$as_me:30489: WARNING: datarootdir was used explicitly but not set:
Steve Kondikae271bc2015-11-15 02:50:53 +010030490$ac_seen" >&5
30491echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30492$ac_seen" >&2;}
30493 ac_warn_datarootdir=yes
30494 fi
30495 done
30496 fi
30497
30498if test "x$ac_warn_datarootdir" = xyes; then
30499 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30500fi
30501
30502EOF
micky3879b9f5e72025-07-08 18:04:53 -040030503cat >>"$CONFIG_STATUS" <<EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030504 sed "$ac_vpsub
30505$extrasub
30506EOF
micky3879b9f5e72025-07-08 18:04:53 -040030507cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030508:t
30509/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30510s,@configure_input@,$configure_input,;t t
30511s,@srcdir@,$ac_srcdir,;t t
30512s,@top_srcdir@,$ac_top_srcdir,;t t
30513s,@INSTALL@,$ac_INSTALL,;t t
micky3879b9f5e72025-07-08 18:04:53 -040030514" $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30515 rm -f "$tmp"/stdin
30516EOF
30517test -n "${FGREP}" || FGREP="grep -F"
30518test -n "${EGREP}" || EGREP="grep -E"
30519cat >>"$CONFIG_STATUS" <<EOF
30520 test -n "\${FGREP}" || FGREP="$FGREP"
30521 test -n "\${EGREP}" || EGREP="$EGREP"
30522EOF
30523cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030524 if test x"$ac_file" != x-; then
micky3879b9f5e72025-07-08 18:04:53 -040030525 cp "$tmp/out" "$ac_file"
Steve Kondikae271bc2015-11-15 02:50:53 +010030526
30527 for ac_name in prefix exec_prefix datarootdir
30528 do
micky3879b9f5e72025-07-08 18:04:53 -040030529 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
Steve Kondikae271bc2015-11-15 02:50:53 +010030530 if test -n "$ac_seen"; then
micky3879b9f5e72025-07-08 18:04:53 -040030531 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
Steve Kondikae271bc2015-11-15 02:50:53 +010030532 if test -z "$ac_init"; then
micky3879b9f5e72025-07-08 18:04:53 -040030533 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30534 { echo "$as_me:30534: WARNING: Variable $ac_name is used but was not set:
Steve Kondikae271bc2015-11-15 02:50:53 +010030535$ac_seen" >&5
30536echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30537$ac_seen" >&2;}
30538 fi
30539 fi
30540 done
micky3879b9f5e72025-07-08 18:04:53 -040030541 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30542 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30543 if test -s "$tmp"/out; then
30544 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30545 { echo "$as_me:30545: WARNING: Some variables may not be substituted:
Steve Kondikae271bc2015-11-15 02:50:53 +010030546$ac_seen" >&5
30547echo "$as_me: WARNING: Some variables may not be substituted:
30548$ac_seen" >&2;}
30549 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030550 else
micky3879b9f5e72025-07-08 18:04:53 -040030551 cat "$tmp"/out
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030552 fi
micky3879b9f5e72025-07-08 18:04:53 -040030553 rm -f "$tmp"/out
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030554
30555done
30556EOF
micky3879b9f5e72025-07-08 18:04:53 -040030557cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030558
30559#
30560# CONFIG_HEADER section.
30561#
30562
30563# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30564# NAME is the cpp macro being defined and VALUE is the value it is being given.
30565#
30566# ac_d sets the value in "#define NAME VALUE" lines.
30567ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
30568ac_dB='[ ].*$,\1#\2'
30569ac_dC=' '
30570ac_dD=',;t'
30571# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30572ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
30573ac_iB='\([ ]\),\1#\2define\3'
30574ac_iC=' '
30575ac_iD='\4,;t'
30576# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30577ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
30578ac_uB='$,\1#\2define\3'
30579ac_uC=' '
30580ac_uD=',;t'
30581
30582for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30583 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
micky3879b9f5e72025-07-08 18:04:53 -040030584 case "$ac_file" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030585 - | *:- | *:-:* ) # input from stdin
micky3879b9f5e72025-07-08 18:04:53 -040030586 cat >"$tmp"/stdin
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030587 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30588 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30589 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30590 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30591 * ) ac_file_in=$ac_file.in ;;
30592 esac
30593
micky3879b9f5e72025-07-08 18:04:53 -040030594 test x"$ac_file" != x- && { echo "$as_me:30594: creating $ac_file" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030595echo "$as_me: creating $ac_file" >&6;}
30596
30597 # First look for the input files in the build tree, otherwise in the
30598 # src tree.
30599 ac_file_inputs=`IFS=:
30600 for f in $ac_file_in; do
30601 case $f in
micky3879b9f5e72025-07-08 18:04:53 -040030602 -) echo "$tmp"/stdin ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030603 [\\/$]*)
30604 # Absolute (can't be DOS-style, as IFS=:)
micky3879b9f5e72025-07-08 18:04:53 -040030605 test -f "$f" || { { echo "$as_me:30605: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030606echo "$as_me: error: cannot find input file: $f" >&2;}
30607 { (exit 1); exit 1; }; }
30608 echo $f;;
30609 *) # Relative
30610 if test -f "$f"; then
30611 # Build tree
30612 echo $f
30613 elif test -f "$srcdir/$f"; then
30614 # Source tree
micky3879b9f5e72025-07-08 18:04:53 -040030615 echo "$srcdir/$f"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030616 else
30617 # /dev/null tree
micky3879b9f5e72025-07-08 18:04:53 -040030618 { { echo "$as_me:30618: error: cannot find input file: $f" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030619echo "$as_me: error: cannot find input file: $f" >&2;}
30620 { (exit 1); exit 1; }; }
30621 fi;;
30622 esac
30623 done` || { (exit 1); exit 1; }
30624 # Remove the trailing spaces.
micky3879b9f5e72025-07-08 18:04:53 -040030625 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030626
30627EOF
30628
30629# Transform confdefs.h into a list of #define's. We won't use it as a sed
30630# script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
30631# be either 'cat' or 'sort'.
30632cat confdefs.h | uniq >conftest.vals
30633
30634# Break up conftest.vals because some shells have a limit on
30635# the size of here documents, and old seds have small limits too.
30636
30637rm -f conftest.tail
micky3879b9f5e72025-07-08 18:04:53 -040030638echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030639while grep . conftest.vals >/dev/null
30640do
30641 # Write chunks of a limited-size here document to conftest.frag.
micky3879b9f5e72025-07-08 18:04:53 -040030642 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30643 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30644 echo 'CEOF' >> "$CONFIG_STATUS"
30645 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030646 rm -f conftest.vals
30647 mv conftest.tail conftest.vals
30648done
30649rm -f conftest.vals
30650
30651# Run sed to substitute the contents of conftest.frag into $tmp/in at the
30652# marker @DEFS@.
30653echo ' cat >> conftest.edit <<CEOF
30654/@DEFS@/r conftest.frag
30655/@DEFS@/d
30656CEOF
micky3879b9f5e72025-07-08 18:04:53 -040030657sed -f conftest.edit "$tmp"/in > "$tmp"/out
30658rm -f "$tmp"/in
30659mv "$tmp"/out "$tmp"/in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030660rm -f conftest.edit conftest.frag
micky3879b9f5e72025-07-08 18:04:53 -040030661' >> "$CONFIG_STATUS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030662
micky3879b9f5e72025-07-08 18:04:53 -040030663cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030664 # Let's still pretend it is `configure' which instantiates (i.e., don't
30665 # use $as_me), people would be surprised to read:
30666 # /* config.h. Generated automatically by config.status. */
30667 if test x"$ac_file" = x-; then
micky3879b9f5e72025-07-08 18:04:53 -040030668 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030669 else
micky3879b9f5e72025-07-08 18:04:53 -040030670 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030671 fi
micky3879b9f5e72025-07-08 18:04:53 -040030672 cat "$tmp"/in >>"$tmp"/config.h
30673 rm -f "$tmp"/in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030674 if test x"$ac_file" != x-; then
micky3879b9f5e72025-07-08 18:04:53 -040030675 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30676 { echo "$as_me:30676: $ac_file is unchanged" >&5
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030677echo "$as_me: $ac_file is unchanged" >&6;}
30678 else
30679 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30680 X"$ac_file" : 'X\(//\)[^/]' \| \
30681 X"$ac_file" : 'X\(//\)$' \| \
30682 X"$ac_file" : 'X\(/\)' \| \
30683 . : '\(.\)' 2>/dev/null ||
30684echo X"$ac_file" |
30685 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30686 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30687 /^X\(\/\/\)$/{ s//\1/; q; }
30688 /^X\(\/\).*/{ s//\1/; q; }
30689 s/.*/./; q'`
30690 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30691 { case "$ac_dir" in
30692 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30693 *) as_incr_dir=.;;
30694esac
30695as_dummy="$ac_dir"
30696for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30697 case $as_mkdir_dir in
30698 # Skip DOS drivespec
30699 ?:) as_incr_dir=$as_mkdir_dir ;;
30700 *)
30701 as_incr_dir=$as_incr_dir/$as_mkdir_dir
30702 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30703 ;;
30704 esac
30705done; }
30706
30707 fi
micky3879b9f5e72025-07-08 18:04:53 -040030708 rm -f "$ac_file"
30709 mv "$tmp/config.h" "$ac_file"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030710 fi
30711 else
micky3879b9f5e72025-07-08 18:04:53 -040030712 cat "$tmp"/config.h
30713 rm -f "$tmp"/config.h
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030714 fi
30715done
30716EOF
micky3879b9f5e72025-07-08 18:04:53 -040030717cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030718#
30719# CONFIG_COMMANDS section.
30720#
30721for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30722 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30723 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30724
micky3879b9f5e72025-07-08 18:04:53 -040030725 case "$ac_dest" in
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030726 default )
Steve Kondikae271bc2015-11-15 02:50:53 +010030727if test "x$cf_with_tests" != xno ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030728
30729for cf_dir in test
30730do
micky3879b9f5e72025-07-08 18:04:53 -040030731 if test ! -d "$srcdir/$cf_dir" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030732 continue
micky3879b9f5e72025-07-08 18:04:53 -040030733 elif test -f "$srcdir/$cf_dir/programs" ; then
30734 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030735 fi
30736done
30737
Steve Kondikae271bc2015-11-15 02:50:53 +010030738fi
30739
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030740cf_prefix=$LIB_PREFIX
30741
micky3879b9f5e72025-07-08 18:04:53 -040030742case "$cf_cv_shlib_version" in
30743(cygdll|msysdll|mingw|msvcdll)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030744 TINFO_NAME=$TINFO_ARG_SUFFIX
30745 TINFO_SUFFIX=.dll
Steve Kondikae271bc2015-11-15 02:50:53 +010030746 ;;
30747esac
30748
30749if test -n "$TINFO_SUFFIX" ; then
micky3879b9f5e72025-07-08 18:04:53 -040030750 case "$TINFO_SUFFIX" in
Steve Kondikae271bc2015-11-15 02:50:53 +010030751 (tw*)
30752 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
micky3879b9f5e72025-07-08 18:04:53 -040030753 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010030754 ;;
30755 (t*)
30756 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
micky3879b9f5e72025-07-08 18:04:53 -040030757 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010030758 ;;
30759 (w*)
30760 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
micky3879b9f5e72025-07-08 18:04:53 -040030761 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010030762 ;;
30763 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030764fi
30765
30766for cf_dir in $SRC_SUBDIRS
30767do
micky3879b9f5e72025-07-08 18:04:53 -040030768 if test ! -d "$srcdir/$cf_dir" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030769 continue
micky3879b9f5e72025-07-08 18:04:53 -040030770 elif test -f "$srcdir/$cf_dir/modules" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030771
30772 SHARED_LIB=
Steve Kondikae271bc2015-11-15 02:50:53 +010030773 Libs_To_Make=
micky3879b9f5e72025-07-08 18:04:53 -040030774 cf_awk_program=
30775 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
Steve Kondikae271bc2015-11-15 02:50:53 +010030776 then
micky3879b9f5e72025-07-08 18:04:53 -040030777 cf_awk_program="$cf_awk_program\
30778/deprecated in ABI${cf_cv_abi_default}/ { next; }\
30779{ sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30780"
Steve Kondikae271bc2015-11-15 02:50:53 +010030781 fi
30782
30783 if test "x$WILDCARD_SYMS" = xno
30784 then
micky3879b9f5e72025-07-08 18:04:53 -040030785 cf_awk_program="$cf_awk_program\
30786/[ ]_\\*;/ { skip=1; next; }\
30787"
Steve Kondikae271bc2015-11-15 02:50:53 +010030788 fi
30789
micky3879b9f5e72025-07-08 18:04:53 -040030790 if test "x$cf_awk_program" != "x"
Steve Kondikae271bc2015-11-15 02:50:53 +010030791 then
30792 cat >>$cf_dir/Makefile <<CF_EOF
30793
30794# Generated by CF_LIB_RULES
30795resulting.map: $UNALTERED_SYMS
micky3879b9f5e72025-07-08 18:04:53 -040030796 $AWK 'BEGIN { skip = 1; last=""; } \
30797$cf_awk_program \
30798{ if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30799 skip = 0; last = \$\$0; } \
30800END { print last; }' < "$UNALTERED_SYMS" >\$@
Steve Kondikae271bc2015-11-15 02:50:53 +010030801
micky3879b9f5e72025-07-08 18:04:53 -040030802distclean::
Steve Kondikae271bc2015-11-15 02:50:53 +010030803 rm -f resulting.map
30804CF_EOF
30805 fi
30806
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030807 for cf_item in $cf_LIST_MODELS
30808 do
30809
Steve Kondikae271bc2015-11-15 02:50:53 +010030810 case X$cf_item in
30811 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030812 cf_suffix='.la'
30813 cf_depsuf=$cf_suffix
30814 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030815 (Xdebug)
micky3879b9f5e72025-07-08 18:04:53 -040030816 case "$cf_cv_system_name" in
30817 (*-msvc*)
30818 cf_suffix='_g.lib'
30819 ;;
30820 (*)
30821 cf_suffix='_g.a'
30822 ;;
30823 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030824 cf_depsuf=$cf_suffix
30825 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030826 (Xprofile)
micky3879b9f5e72025-07-08 18:04:53 -040030827 case "$cf_cv_system_name" in
30828 (*-msvc*)
30829 cf_suffix='_p.lib'
30830 ;;
30831 (*)
30832 cf_suffix='_p.a'
30833 ;;
30834 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030835 cf_depsuf=$cf_suffix
30836 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030837 (Xshared)
micky3879b9f5e72025-07-08 18:04:53 -040030838 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010030839 (aix[5-7]*)
30840 cf_suffix='.so'
30841 cf_depsuf=$cf_suffix
30842 ;;
micky3879b9f5e72025-07-08 18:04:53 -040030843 (*-msvc*)
30844 cf_suffix='.dll'
30845 cf_depsuf='.dll.lib'
30846 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030847 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030848 cf_suffix='.dll'
30849 cf_depsuf='.dll.a'
30850 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030851 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030852 cf_suffix='.dylib'
30853 cf_depsuf=$cf_suffix
30854 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030855 (hpux*)
micky3879b9f5e72025-07-08 18:04:53 -040030856 case "$target" in
Steve Kondikae271bc2015-11-15 02:50:53 +010030857 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030858 cf_suffix='.so'
30859 cf_depsuf=$cf_suffix
30860 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030861 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030862 cf_suffix='.sl'
30863 cf_depsuf=$cf_suffix
30864 ;;
30865 esac
30866 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030867 (*)
30868 cf_suffix='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030869 cf_depsuf=$cf_suffix
30870 ;;
30871 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010030872 ;;
30873 (*)
micky3879b9f5e72025-07-08 18:04:53 -040030874 case "$target" in
30875 (*-msvc*)
30876 cf_suffix='.lib'
30877 ;;
30878 (*)
30879 cf_suffix='.a'
30880 ;;
30881 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010030882 cf_depsuf=$cf_suffix
30883 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030884 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010030885 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30886 then
30887 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30888 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30889 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030890
micky3879b9f5e72025-07-08 18:04:53 -040030891 if test "$cf_dir" = "c++"
30892 then
30893
30894cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30895
30896eval cf_libname="\$${cf_map_lib_basename}_NAME"
30897
30898 else
30899
30900cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30901
30902eval cf_libname="\$${cf_map_lib_basename}_NAME"
30903
30904 fi
30905 test -z "$cf_libname" && cf_libname="$cf_dir"
30906 if test "$cf_item" = shared ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010030907 if test -n "${LIB_SUFFIX}"
30908 then
30909 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30910 else
30911 cf_shared_suffix="$cf_suffix"
30912 fi
30913 if test "$cf_cv_do_symlinks" = yes ; then
30914 cf_version_name=
30915
30916 case "$cf_cv_shlib_version" in
30917 (rel)
30918 cf_version_name=REL_VERSION
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030919 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030920 (abi)
30921 cf_version_name=ABI_VERSION
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030922 ;;
30923 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010030924
30925 if test -n "$cf_version_name"
30926 then
30927 case "$cf_cv_system_name" in
30928 (darwin*)
30929 # "w", etc?
30930 cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30931 ;;
30932 (*)
30933 cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30934 ;;
30935 esac
30936 fi
30937 if test -n "${USE_LIB_SUFFIX}"
30938 then
30939 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30940 else
30941 cf_shared_suffix="$cf_suffix"
30942 fi
30943 fi
30944 # cygwin needs import library, and has unique naming convention
30945 # use autodetected ${cf_prefix} for import lib and static lib, but
30946 # use 'cyg' prefix for shared lib.
micky3879b9f5e72025-07-08 18:04:53 -040030947 case "$cf_cv_shlib_version" in
Steve Kondikae271bc2015-11-15 02:50:53 +010030948 (cygdll)
30949 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30950 cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030951 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030952 (msysdll)
30953 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30954 cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30955 ;;
30956 (mingw)
30957 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30958 cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30959 ;;
micky3879b9f5e72025-07-08 18:04:53 -040030960 (msvcdll)
30961 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30962 cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30963 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030964 (*)
30965 cf_add_lib=
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030966 ;;
30967 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010030968 if test -n "$cf_add_lib"
30969 then
30970 Libs_To_Make="$Libs_To_Make $cf_add_lib"
30971 continue
30972 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030973 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010030974 cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30975 Libs_To_Make="$Libs_To_Make $cf_add_lib"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030976 done
30977
micky3879b9f5e72025-07-08 18:04:53 -040030978 if test "$cf_dir" = ncurses ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030979 cf_subsets="$LIB_SUBSETS"
30980 cf_r_parts="$cf_subsets"
Steve Kondikae271bc2015-11-15 02:50:53 +010030981 cf_liblist="$Libs_To_Make"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030982
30983 while test -n "$cf_r_parts"
30984 do
30985 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30986 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30987 if test "$cf_l_parts" != "$cf_r_parts" ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010030988 cf_add_lib=
micky3879b9f5e72025-07-08 18:04:53 -040030989 case "$cf_l_parts" in
Steve Kondikae271bc2015-11-15 02:50:53 +010030990 (*termlib*)
micky3879b9f5e72025-07-08 18:04:53 -040030991 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030992 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030993 (*ticlib*)
micky3879b9f5e72025-07-08 18:04:53 -040030994 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030995 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010030996 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053030997 break
30998 ;;
30999 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010031000 if test -n "$cf_add_lib"; then
31001 Libs_To_Make="$cf_add_lib $Libs_To_Make"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031002 fi
31003 else
31004 break
31005 fi
31006 done
31007 else
31008 cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
31009 fi
31010
micky3879b9f5e72025-07-08 18:04:53 -040031011 if test "$cf_dir" = c++; then
Steve Kondikae271bc2015-11-15 02:50:53 +010031012 if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
31013 cf_list=
31014 for cf_item in $Libs_To_Make
31015 do
micky3879b9f5e72025-07-08 18:04:53 -040031016 case "$cf_item" in
Steve Kondikae271bc2015-11-15 02:50:53 +010031017 (*.a)
31018 ;;
31019 (*)
31020 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
31021 ;;
31022 esac
31023 for cf_test in $cf_list
31024 do
31025 if test "$cf_test" = "$cf_item"
31026 then
31027 cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
31028 cf_item=
31029 break
31030 fi
31031 done
31032 test -n "$cf_item" && cf_list="$cf_list $cf_item"
31033 done
31034 Libs_To_Make="$cf_list"
31035 fi
31036 fi
31037
31038 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031039 -e "s%@SHARED_LIB@%$SHARED_LIB%" \
micky3879b9f5e72025-07-08 18:04:53 -040031040 "$cf_dir/Makefile" >$cf_dir/Makefile.out
31041 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031042
micky3879b9f5e72025-07-08 18:04:53 -040031043 $AWK -f "$srcdir/mk-0th.awk" \
Steve Kondikae271bc2015-11-15 02:50:53 +010031044 libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
micky3879b9f5e72025-07-08 18:04:53 -040031045 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031046
31047 for cf_subset in $cf_subsets
31048 do
31049 cf_subdirs=
31050 for cf_item in $cf_LIST_MODELS
31051 do
Steve Kondikae271bc2015-11-15 02:50:53 +010031052
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031053 echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
31054
31055cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31056
Steve Kondikae271bc2015-11-15 02:50:53 +010031057 CXX_MODEL=$cf_ITEM
31058 if test "$CXX_MODEL" = SHARED; then
micky3879b9f5e72025-07-08 18:04:53 -040031059 case "$cf_cv_shlib_version" in
31060 (cygdll|msysdll|mingw|msvcdll)
Steve Kondikae271bc2015-11-15 02:50:53 +010031061 test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6
31062
micky3879b9f5e72025-07-08 18:04:53 -040031063echo "${as_me:-configure}:31063: testing overriding CXX_MODEL to SHARED ..." 1>&5
Steve Kondikae271bc2015-11-15 02:50:53 +010031064
31065 with_shared_cxx=yes
31066 ;;
31067 (*)
31068 test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
31069 ;;
31070 esac
31071 fi
31072
31073 case X$cf_item in
31074 (Xlibtool)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031075 cf_suffix='.la'
31076 cf_depsuf=$cf_suffix
31077 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031078 (Xdebug)
micky3879b9f5e72025-07-08 18:04:53 -040031079 case "$cf_cv_system_name" in
31080 (*-msvc*)
31081 cf_suffix='_g.lib'
31082 ;;
31083 (*)
31084 cf_suffix='_g.a'
31085 ;;
31086 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031087 cf_depsuf=$cf_suffix
31088 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031089 (Xprofile)
micky3879b9f5e72025-07-08 18:04:53 -040031090 case "$cf_cv_system_name" in
31091 (*-msvc*)
31092 cf_suffix='_p.lib'
31093 ;;
31094 (*)
31095 cf_suffix='_p.a'
31096 ;;
31097 esac
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031098 cf_depsuf=$cf_suffix
31099 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031100 (Xshared)
micky3879b9f5e72025-07-08 18:04:53 -040031101 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010031102 (aix[5-7]*)
31103 cf_suffix='.so'
31104 cf_depsuf=$cf_suffix
31105 ;;
micky3879b9f5e72025-07-08 18:04:53 -040031106 (*-msvc*)
31107 cf_suffix='.dll'
31108 cf_depsuf='.dll.lib'
31109 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031110 (cygwin*|msys*|mingw*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031111 cf_suffix='.dll'
31112 cf_depsuf='.dll.a'
31113 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031114 (darwin*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031115 cf_suffix='.dylib'
31116 cf_depsuf=$cf_suffix
31117 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031118 (hpux*)
micky3879b9f5e72025-07-08 18:04:53 -040031119 case "$target" in
Steve Kondikae271bc2015-11-15 02:50:53 +010031120 (ia64*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031121 cf_suffix='.so'
31122 cf_depsuf=$cf_suffix
31123 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031124 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031125 cf_suffix='.sl'
31126 cf_depsuf=$cf_suffix
31127 ;;
31128 esac
31129 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031130 (*)
31131 cf_suffix='.so'
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031132 cf_depsuf=$cf_suffix
31133 ;;
31134 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010031135 ;;
31136 (*)
micky3879b9f5e72025-07-08 18:04:53 -040031137 case "$target" in
31138 (*-msvc*)
31139 cf_suffix='.lib'
31140 ;;
31141 (*)
31142 cf_suffix='.a'
31143 ;;
31144 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010031145 cf_depsuf=$cf_suffix
31146 ;;
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031147 esac
Steve Kondikae271bc2015-11-15 02:50:53 +010031148 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31149 then
31150 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31151 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31152 fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031153
31154 case $cf_item in
Steve Kondikae271bc2015-11-15 02:50:53 +010031155 (libtool) cf_subdir='obj_lo' ;;
31156 (normal) cf_subdir='objects' ;;
31157 (debug) cf_subdir='obj_g' ;;
31158 (profile) cf_subdir='obj_p' ;;
31159 (shared)
micky3879b9f5e72025-07-08 18:04:53 -040031160 case "$cf_cv_system_name" in
Steve Kondikae271bc2015-11-15 02:50:53 +010031161 (cygwin|msys)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031162 cf_subdir='objects' ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031163 (*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031164 cf_subdir='obj_s' ;;
31165 esac
31166 esac
31167
31168 # Test for case where we build libtinfo with a different name.
31169 cf_libname=$cf_dir
micky3879b9f5e72025-07-08 18:04:53 -040031170 if test "$cf_dir" = ncurses ; then
31171 case "$cf_subset" in
Steve Kondikae271bc2015-11-15 02:50:53 +010031172 (*base*)
31173 cf_libname=${cf_libname}$USE_LIB_SUFFIX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031174 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031175 (*termlib*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031176 cf_libname=$TINFO_LIB_SUFFIX
31177 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031178 (ticlib*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031179 cf_libname=$TICS_LIB_SUFFIX
31180 ;;
31181 esac
micky3879b9f5e72025-07-08 18:04:53 -040031182 elif test "$cf_dir" = c++ ; then
31183
31184cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31185
31186eval cf_libname="\$${cf_map_lib_basename}_NAME"
31187
31188 cf_libname=${cf_libname}$USE_LIB_SUFFIX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031189 else
micky3879b9f5e72025-07-08 18:04:53 -040031190
31191cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31192
31193eval cf_libname="\$${cf_map_lib_basename}_NAME"
31194
Steve Kondikae271bc2015-11-15 02:50:53 +010031195 cf_libname=${cf_libname}$USE_LIB_SUFFIX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031196 fi
Steve Kondikae271bc2015-11-15 02:50:53 +010031197 if test -n "${USE_ARG_SUFFIX}" ; then
31198 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
micky3879b9f5e72025-07-08 18:04:53 -040031199 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031200 fi
31201
31202 # These dependencies really are for development, not
31203 # builds, but they are useful in porting, too.
31204 cf_depend="../include/ncurses_cfg.h"
31205 if test "$srcdir" = "."; then
31206 cf_reldir="."
31207 else
31208 cf_reldir="\${srcdir}"
31209 fi
31210
micky3879b9f5e72025-07-08 18:04:53 -040031211 if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031212 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
micky3879b9f5e72025-07-08 18:04:53 -040031213 elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031214 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31215 fi
31216
31217 cf_dir_suffix=
31218 old_cf_suffix="$cf_suffix"
31219 if test "$cf_cv_shlib_version_infix" = yes ; then
Steve Kondikae271bc2015-11-15 02:50:53 +010031220 if test -n "$USE_LIB_SUFFIX" ; then
micky3879b9f5e72025-07-08 18:04:53 -040031221 case "$USE_LIB_SUFFIX" in
Steve Kondikae271bc2015-11-15 02:50:53 +010031222 (tw*)
micky3879b9f5e72025-07-08 18:04:53 -040031223 cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31224 cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010031225 cf_dir_suffix=tw$EXTRA_SUFFIX
31226 ;;
31227 (t*)
micky3879b9f5e72025-07-08 18:04:53 -040031228 cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31229 cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010031230 cf_dir_suffix=t$EXTRA_SUFFIX
31231 ;;
31232 (w*)
micky3879b9f5e72025-07-08 18:04:53 -040031233 cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31234 cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010031235 cf_dir_suffix=w$EXTRA_SUFFIX
31236 ;;
31237 (*)
micky3879b9f5e72025-07-08 18:04:53 -040031238 cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31239 cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
Steve Kondikae271bc2015-11-15 02:50:53 +010031240 cf_dir_suffix=$EXTRA_SUFFIX
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031241 ;;
31242 esac
31243 fi
31244 fi
31245
micky3879b9f5e72025-07-08 18:04:53 -040031246 $AWK -f "$srcdir/mk-1st.awk" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031247 name=${cf_libname}${cf_dir_suffix} \
31248 traces=$LIB_TRACING \
31249 MODEL=$cf_ITEM \
Steve Kondikae271bc2015-11-15 02:50:53 +010031250 CXX_MODEL=$CXX_MODEL \
micky3879b9f5e72025-07-08 18:04:53 -040031251 LIB_SUFFIX=$LIB_SUFFIX \
31252 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31253 make_phony="${cf_cv_make_PHONY:-no}" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031254 model=$cf_subdir \
31255 prefix=$cf_prefix \
31256 suffix=$cf_suffix \
31257 subset=$cf_subset \
Steve Kondikae271bc2015-11-15 02:50:53 +010031258 driver=$cf_cv_term_driver \
31259 SymLink="$LN_S" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031260 TermlibRoot=$TINFO_NAME \
31261 TermlibSuffix=$TINFO_SUFFIX \
31262 ShlibVer=$cf_cv_shlib_version \
31263 ShlibVerInfix=$cf_cv_shlib_version_infix \
Steve Kondikae271bc2015-11-15 02:50:53 +010031264 ReLink=${cf_cv_do_relink:-no} \
micky3879b9f5e72025-07-08 18:04:53 -040031265 ReRanlib=${cf_cv_do_reranlib:-yes} \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031266 DoLinks=$cf_cv_do_symlinks \
31267 rmSoLocs=$cf_cv_rm_so_locs \
31268 ldconfig="$LDCONFIG" \
31269 overwrite=$WITH_OVERWRITE \
31270 depend="$cf_depend" \
31271 host="$host" \
Steve Kondikae271bc2015-11-15 02:50:53 +010031272 libtool_version="$LIBTOOL_VERSION" \
micky3879b9f5e72025-07-08 18:04:53 -040031273 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031274
31275 cf_suffix="$old_cf_suffix"
31276
31277 for cf_subdir2 in $cf_subdirs lib
31278 do
micky3879b9f5e72025-07-08 18:04:53 -040031279 test "$cf_subdir" = "$cf_subdir2" && break
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031280 done
31281 test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
micky3879b9f5e72025-07-08 18:04:53 -040031282 $AWK -f "$srcdir/mk-2nd.awk" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031283 name=$cf_dir \
31284 traces=$LIB_TRACING \
31285 MODEL=$cf_ITEM \
31286 model=$cf_subdir \
31287 subset=$cf_subset \
31288 srcdir=$srcdir \
31289 echo=$WITH_ECHO \
31290 crenames=$cf_cv_prog_CC_c_o \
31291 cxxrenames=$cf_cv_prog_CXX_c_o \
micky3879b9f5e72025-07-08 18:04:53 -040031292 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031293 cf_subdirs="$cf_subdirs $cf_subdir"
31294 done
31295 done
31296 fi
31297
micky3879b9f5e72025-07-08 18:04:53 -040031298 echo ' ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031299done
31300
micky3879b9f5e72025-07-08 18:04:53 -040031301echo >> Makefile
31302echo '# generated by CF_LIB_RULES' >> Makefile
31303
31304if test "x$cf_cv_make_PHONY" = xyes ; then
31305 cat >> Makefile <<-CF_EOF
31306
31307 .PHONY : libs
31308 .PHONY : lintlib
31309 .PHONY : install.includes
31310 .PHONY : uninstall.includes
31311 .PHONY : install.libs
31312 .PHONY : uninstall.libs
31313CF_EOF
31314fi
31315
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031316for cf_dir in $SRC_SUBDIRS
31317do
micky3879b9f5e72025-07-08 18:04:53 -040031318 if test ! -d "$srcdir/$cf_dir" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031319 continue
31320 fi
31321
micky3879b9f5e72025-07-08 18:04:53 -040031322 if test -f "$cf_dir/Makefile" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031323 case "$cf_dir" in
Steve Kondikae271bc2015-11-15 02:50:53 +010031324 (Ada95)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031325 echo 'libs \' >> Makefile
31326 echo 'install.libs \' >> Makefile
31327 echo 'uninstall.libs ::' >> Makefile
micky3879b9f5e72025-07-08 18:04:53 -040031328 echo ' ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031329 ;;
31330 esac
31331 fi
31332
micky3879b9f5e72025-07-08 18:04:53 -040031333 if test -f "$srcdir/$cf_dir/modules" ; then
31334
31335 if test "x$cf_cv_make_PHONY" = xyes ; then
31336 cat >> Makefile <<-CF_EOF
31337
31338 .PHONY : install.$cf_dir
31339 .PHONY : uninstall.$cf_dir
31340CF_EOF
31341 fi
31342
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031343 echo >> Makefile
micky3879b9f5e72025-07-08 18:04:53 -040031344 if test -f "$srcdir/$cf_dir/headers" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031345cat >> Makefile <<CF_EOF
31346install.includes \\
31347uninstall.includes \\
31348CF_EOF
31349 fi
micky3879b9f5e72025-07-08 18:04:53 -040031350
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031351cat >> Makefile <<CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040031352lint \\
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031353libs \\
31354lintlib \\
31355install.libs \\
31356uninstall.libs \\
31357install.$cf_dir \\
31358uninstall.$cf_dir ::
micky3879b9f5e72025-07-08 18:04:53 -040031359 ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031360CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040031361 elif test -f "$srcdir/$cf_dir/headers" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031362cat >> Makefile <<CF_EOF
31363
31364libs \\
31365install.libs \\
31366uninstall.libs \\
31367install.includes \\
31368uninstall.includes ::
micky3879b9f5e72025-07-08 18:04:53 -040031369 ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031370CF_EOF
31371fi
31372done
31373
micky3879b9f5e72025-07-08 18:04:53 -040031374if test "x$cf_cv_make_PHONY" = xyes ; then
31375 cat >> Makefile <<-CF_EOF
31376
31377 .PHONY : install.data
31378 .PHONY : uninstall.data
31379CF_EOF
31380fi
31381
Steve Kondikae271bc2015-11-15 02:50:53 +010031382if test "x$cf_with_db_install" = xyes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031383cat >> Makefile <<CF_EOF
31384
31385install.libs uninstall.libs \\
31386install.data uninstall.data ::
micky3879b9f5e72025-07-08 18:04:53 -040031387$MAKE_TERMINFO ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
Steve Kondikae271bc2015-11-15 02:50:53 +010031388CF_EOF
31389else
31390cat >> Makefile <<CF_EOF
31391
31392install.libs uninstall.libs ::
micky3879b9f5e72025-07-08 18:04:53 -040031393 ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
Steve Kondikae271bc2015-11-15 02:50:53 +010031394CF_EOF
31395fi
31396
31397if test "x$cf_with_manpages" = xyes; then
micky3879b9f5e72025-07-08 18:04:53 -040031398
31399if test "x$cf_cv_make_PHONY" = xyes ; then
31400 cat >> Makefile <<-CF_EOF
31401
31402 .PHONY : install.man
31403 .PHONY : uninstall.man
31404CF_EOF
31405fi
31406
Steve Kondikae271bc2015-11-15 02:50:53 +010031407cat >> Makefile <<CF_EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031408
31409install.man \\
31410uninstall.man ::
micky3879b9f5e72025-07-08 18:04:53 -040031411 ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
Steve Kondikae271bc2015-11-15 02:50:53 +010031412CF_EOF
31413fi
31414
31415cat >> Makefile <<CF_EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031416
31417distclean ::
31418 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31419 rm -f headers.sh headers.sed mk_shared_lib.sh
micky3879b9f5e72025-07-08 18:04:53 -040031420 rm -f edit_man.* man_alias.* *.tmp
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031421 rm -rf \${DIRS_TO_MAKE}
31422CF_EOF
31423
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031424rm -f headers.sed headers.sh
31425
31426echo creating headers.sh
31427cat >headers.sh <<CF_EOF
Steve Kondikae271bc2015-11-15 02:50:53 +010031428#! $SHELL
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031429# This shell script is generated by the 'configure' script. It is invoked in a
31430# subdirectory of the build tree. It generates a sed-script in the parent
31431# directory that is used to adjust includes for header files that reside in a
31432# subdirectory of /usr/include, etc.
31433PRG=""
31434while test \$# != 3
31435do
31436PRG="\$PRG \$1"; shift
31437done
31438DST=\$1
31439REF=\$2
31440SRC=\$3
Steve Kondikae271bc2015-11-15 02:50:53 +010031441TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31442TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031443echo installing \$SRC in \$DST
31444CF_EOF
31445
micky3879b9f5e72025-07-08 18:04:53 -040031446if test "$WITH_CURSES_H" = yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031447 cat >>headers.sh <<CF_EOF
31448case \$DST in
Steve Kondikae271bc2015-11-15 02:50:53 +010031449(/*/include/*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031450 END=\`basename \$DST\`
micky3879b9f5e72025-07-08 18:04:53 -040031451 for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031452 do
31453 NAME=\`basename \$i\`
31454 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31455 done
31456 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031457(*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031458 echo "" >> \$TMPSED
31459 ;;
31460esac
31461CF_EOF
31462
31463else
31464 cat >>headers.sh <<CF_EOF
31465case \$DST in
Steve Kondikae271bc2015-11-15 02:50:53 +010031466(/*/include/*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031467 END=\`basename \$DST\`
micky3879b9f5e72025-07-08 18:04:53 -040031468 for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031469 do
31470 NAME=\`basename \$i\`
31471 if test "\$NAME" = "curses.h"
31472 then
31473 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31474 NAME=ncurses.h
31475 fi
31476 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31477 done
31478 ;;
Steve Kondikae271bc2015-11-15 02:50:53 +010031479(*)
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031480 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31481 ;;
31482esac
31483CF_EOF
31484fi
31485cat >>headers.sh <<CF_EOF
31486rm -f \$TMPSRC
31487sed -f \$TMPSED \$SRC > \$TMPSRC
31488NAME=\`basename \$SRC\`
31489CF_EOF
micky3879b9f5e72025-07-08 18:04:53 -040031490if test "$WITH_CURSES_H" != yes; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031491 cat >>headers.sh <<CF_EOF
31492test "\$NAME" = "curses.h" && NAME=ncurses.h
31493CF_EOF
31494fi
31495cat >>headers.sh <<CF_EOF
31496# Just in case someone gzip'd manpages, remove the conflicting copy.
31497test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31498
31499eval \$PRG \$TMPSRC \$DST/\$NAME
31500rm -f \$TMPSRC \$TMPSED
31501CF_EOF
31502
31503chmod 0755 headers.sh
31504
31505for cf_dir in $SRC_SUBDIRS
31506do
micky3879b9f5e72025-07-08 18:04:53 -040031507 if test ! -d "$srcdir/$cf_dir" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031508 continue
31509 fi
31510
micky3879b9f5e72025-07-08 18:04:53 -040031511 if test -f "$srcdir/$cf_dir/headers" ; then
31512 $AWK -f "$srcdir/mk-hdr.awk" \
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031513 subset="$LIB_SUBSETS" \
31514 compat="$WITH_CURSES_H" \
micky3879b9f5e72025-07-08 18:04:53 -040031515 "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031516 fi
31517
micky3879b9f5e72025-07-08 18:04:53 -040031518 if test -f "$srcdir/$cf_dir/modules" ; then
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031519 if test "$cf_dir" != "c++" ; then
micky3879b9f5e72025-07-08 18:04:53 -040031520 if test "x$cf_cv_make_PHONY" = xyes ; then
31521 cat >> $cf_dir/Makefile <<-CF_EOF
31522
31523 .PHONY : depend
31524CF_EOF
31525 fi
31526
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031527 cat >>$cf_dir/Makefile <<"CF_EOF"
31528depend : ${AUTO_SRC}
31529 makedepend -- ${CPPFLAGS} -- ${C_SRC}
31530
31531# DO NOT DELETE THIS LINE -- make depend depends on it.
31532CF_EOF
31533 fi
31534 fi
31535done
31536
micky3879b9f5e72025-07-08 18:04:53 -040031537if test "$MANPAGE_RENAMES" != no ; then
31538 # Construct a sed-script to perform renaming within man-pages
31539 test -n "$verbose" && echo "creating edit_man.sed"
31540 test ! -d man && mkdir man
31541 FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31542fi
31543
Steve Kondikae271bc2015-11-15 02:50:53 +010031544if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31545if test -z "$USE_OLD_MAKERULES" ; then
micky3879b9f5e72025-07-08 18:04:53 -040031546 $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
Steve Kondikae271bc2015-11-15 02:50:53 +010031547fi
31548fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031549 ;;
31550 esac
31551done
31552EOF
31553
micky3879b9f5e72025-07-08 18:04:53 -040031554cat >>"$CONFIG_STATUS" <<\EOF
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031555
31556{ (exit 0); exit 0; }
31557EOF
micky3879b9f5e72025-07-08 18:04:53 -040031558chmod +x "$CONFIG_STATUS"
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031559ac_clean_files=$ac_clean_files_save
31560
31561# configure is writing to config.log, and then calls config.status.
31562# config.status does its own redirection, appending to config.log.
31563# Unfortunately, on DOS this fails, as config.log is still kept open
31564# by configure, so config.status won't be able to write to it; its
31565# output is simply discarded. So we exec the FD to /dev/null,
31566# effectively closing config.log, so it can be properly (re)opened and
31567# appended to by config.status. When coming back to configure, we
31568# need to make the FD available again.
31569if test "$no_create" != yes; then
31570 ac_cs_success=:
31571 exec 5>/dev/null
micky3879b9f5e72025-07-08 18:04:53 -040031572 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031573 exec 5>>config.log
31574 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31575 # would make configure fail if this is the last instruction.
micky3879b9f5e72025-07-08 18:04:53 -040031576 "$ac_cs_success" || { (exit 1); exit 1; }
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053031577fi
Steve Kondikae271bc2015-11-15 02:50:53 +010031578${MAKE:-make} preinstall