blob: acc844c8936d642a4f9c5e26924e8054cf03d0c9 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#! /bin/sh
Bram Moolenaar071d4272004-06-13 20:20:40 +00002# Guess values for system-dependent variables and create Makefiles.
Illia Bobyra96d5442023-08-30 16:30:15 +02003# Generated by GNU Autoconf 2.71.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004#
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Illia Bobyra96d5442023-08-30 16:30:15 +02006# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
7# Inc.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008#
9#
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012## -------------------- ##
13## M4sh Initialization. ##
14## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
Bram Moolenaar446cb832008-06-24 21:56:24 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020018as_nop=:
19if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000021 emulate sh
22 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000026 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020027else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000033esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000034fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000035
36
Illia Bobyra96d5442023-08-30 16:30:15 +020037
38# Reset variables that may have inherited troublesome values from
39# the environment.
40
41# IFS needs to be set, to space, tab, and newline, in precisely that order.
42# (If _AS_PATH_WALK were called with IFS unset, it would have the
43# side effect of setting IFS to empty, thus disabling word splitting.)
44# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000045as_nl='
46'
47export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020048IFS=" "" $as_nl"
49
50PS1='$ '
51PS2='> '
52PS4='+ '
53
54# Ensure predictable behavior from utilities with locale-dependent output.
55LC_ALL=C
56export LC_ALL
57LANGUAGE=C
58export LANGUAGE
59
60# We cannot yet rely on "unset" to work, but we need these variables
61# to be unset--not just set to an empty or harmless value--now, to
62# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
63# also avoids known problems related to "unset" and subshell syntax
64# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
65for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
66do eval test \${$as_var+y} \
67 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68done
69
70# Ensure that fds 0, 1, and 2 are open.
71if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
72if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
73if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000074
75# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020076if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000083
Bram Moolenaar495de9c2005-01-25 22:03:25 +000084
Bram Moolenaar446cb832008-06-24 21:56:24 +000085# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010086as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020087case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000088 *[\\/]* ) as_myself=$0 ;;
89 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
90for as_dir in $PATH
91do
92 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020093 case $as_dir in #(((
94 '') as_dir=./ ;;
95 */) ;;
96 *) as_dir=$as_dir/ ;;
97 esac
98 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020099 done
Bram Moolenaar446cb832008-06-24 21:56:24 +0000100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200110 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200111 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000112fi
113
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200114
Bram Moolenaar7db77842014-03-27 17:40:59 +0100115# Use a proper internal environment variable to ensure we don't fall
116 # into an infinite loop, continuously re-executing ourselves.
117 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
118 _as_can_reexec=no; export _as_can_reexec;
119 # We cannot yet assume a decent shell, so we have to provide a
120# neutralization value for shells without unset; and this also
121# works around shells that cannot unset nonexistent variables.
122# Preserve -v and -x to the replacement shell.
123BASH_ENV=/dev/null
124ENV=/dev/null
125(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
126case $- in # ((((
127 *v*x* | *x*v* ) as_opts=-vx ;;
128 *v* ) as_opts=-v ;;
129 *x* ) as_opts=-x ;;
130 * ) as_opts= ;;
131esac
132exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
133# Admittedly, this is quite paranoid, since all the known shells bail
134# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200135printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
136exit 255
Bram Moolenaar7db77842014-03-27 17:40:59 +0100137 fi
138 # We don't want this to propagate to other subprocesses.
139 { _as_can_reexec=; unset _as_can_reexec;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200140if test "x$CONFIG_SHELL" = x; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200141 as_bourne_compatible="as_nop=:
142if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
143then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200144 emulate sh
145 NULLCMD=:
146 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
147 # is contrary to our usage. Disable this feature.
148 alias -g '\${1+\"\$@\"}'='\"\$@\"'
149 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +0200150else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200151 case \`(set -o) 2>/dev/null\` in #(
152 *posix*) :
153 set -o posix ;; #(
154 *) :
155 ;;
156esac
157fi
158"
159 as_required="as_fn_return () { (exit \$1); }
160as_fn_success () { as_fn_return 0; }
161as_fn_failure () { as_fn_return 1; }
162as_fn_ret_success () { return 0; }
163as_fn_ret_failure () { return 1; }
164
165exitcode=0
166as_fn_success || { exitcode=1; echo as_fn_success failed.; }
167as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
168as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
169as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Illia Bobyra96d5442023-08-30 16:30:15 +0200170if ( set x; as_fn_ret_success y && test x = \"\$1\" )
171then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200172
Illia Bobyra96d5442023-08-30 16:30:15 +0200173else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200174 exitcode=1; echo positional parameters were not saved.
175fi
Bram Moolenaar7db77842014-03-27 17:40:59 +0100176test x\$exitcode = x0 || exit 1
Illia Bobyra96d5442023-08-30 16:30:15 +0200177blah=\$(echo \$(echo blah))
178test x\"\$blah\" = xblah || exit 1
Bram Moolenaar7db77842014-03-27 17:40:59 +0100179test -x / || exit 1"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
184test \$(( 1 + 1 )) = 2 || exit 1"
Illia Bobyra96d5442023-08-30 16:30:15 +0200185 if (eval "$as_required") 2>/dev/null
186then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200187 as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200188else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200189 as_have_required=no
190fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200191 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
192then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200193
Illia Bobyra96d5442023-08-30 16:30:15 +0200194else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196as_found=false
197for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
198do
199 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200200 case $as_dir in #(((
201 '') as_dir=./ ;;
202 */) ;;
203 *) as_dir=$as_dir/ ;;
204 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200205 as_found=:
206 case $as_dir in #(
207 /*)
208 for as_base in sh bash ksh sh5; do
209 # Try only shells that exist, to save several forks.
Illia Bobyra96d5442023-08-30 16:30:15 +0200210 as_shell=$as_dir$as_base
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200211 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +0200212 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
213then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200214 CONFIG_SHELL=$as_shell as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200215 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
216then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200217 break 2
218fi
219fi
220 done;;
221 esac
222 as_found=false
223done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200224IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200225if $as_found
226then :
227
228else $as_nop
229 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
230 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
231then :
232 CONFIG_SHELL=$SHELL as_have_required=yes
233fi
234fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200235
236
Illia Bobyra96d5442023-08-30 16:30:15 +0200237 if test "x$CONFIG_SHELL" != x
238then :
Bram Moolenaar7db77842014-03-27 17:40:59 +0100239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200256printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +0100257exit 255
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200258fi
259
Illia Bobyra96d5442023-08-30 16:30:15 +0200260 if test x$as_have_required = xno
261then :
262 printf "%s\n" "$0: This script requires a shell more modern than all"
263 printf "%s\n" "$0: the shells that I found on your system."
264 if test ${ZSH_VERSION+y} ; then
265 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200267 else
Illia Bobyra96d5442023-08-30 16:30:15 +0200268 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200269$0: including any error possibly output before this
270$0: message. Then install a modern shell, or manually run
271$0: the script under such a shell if you do have one."
272 fi
273 exit 1
274fi
275fi
276fi
277SHELL=${CONFIG_SHELL-/bin/sh}
278export SHELL
279# Unset more variables known to interfere with behavior of common tools.
280CLICOLOR_FORCE= GREP_OPTIONS=
281unset CLICOLOR_FORCE GREP_OPTIONS
282
283## --------------------- ##
284## M4sh Shell Functions. ##
285## --------------------- ##
286# as_fn_unset VAR
287# ---------------
288# Portably unset VAR.
289as_fn_unset ()
290{
291 { eval $1=; unset $1;}
292}
293as_unset=as_fn_unset
294
Illia Bobyra96d5442023-08-30 16:30:15 +0200295
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200296# as_fn_set_status STATUS
297# -----------------------
298# Set $? to STATUS, without forking.
299as_fn_set_status ()
300{
301 return $1
302} # as_fn_set_status
303
304# as_fn_exit STATUS
305# -----------------
306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307as_fn_exit ()
308{
309 set +e
310 as_fn_set_status $1
311 exit $1
312} # as_fn_exit
Illia Bobyra96d5442023-08-30 16:30:15 +0200313# as_fn_nop
314# ---------
315# Do nothing but, unlike ":", preserve the value of $?.
316as_fn_nop ()
317{
318 return $?
319}
320as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200321
322# as_fn_mkdir_p
323# -------------
324# Create "$as_dir" as a directory, including parents if necessary.
325as_fn_mkdir_p ()
326{
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +0200335 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200344printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +0100365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200366
367
368} # as_fn_mkdir_p
Bram Moolenaar7db77842014-03-27 17:40:59 +0100369
370# as_fn_executable_p FILE
371# -----------------------
372# Test if FILE is an executable regular file.
373as_fn_executable_p ()
374{
375 test -f "$1" && test -x "$1"
376} # as_fn_executable_p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200377# as_fn_append VAR VALUE
378# ----------------------
379# Append the text in VALUE to the end of the definition contained in VAR. Take
380# advantage of any shell optimizations that allow amortized linear growth over
381# repeated appends, instead of the typical quadratic growth present in naive
382# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +0200383if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
384then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200385 eval 'as_fn_append ()
386 {
387 eval $1+=\$2
388 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200389else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200390 as_fn_append ()
391 {
392 eval $1=\$$1\$2
393 }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +0200401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200403 eval 'as_fn_arith ()
404 {
405 as_val=$(( $* ))
406 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200407else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200408 as_fn_arith ()
409 {
410 as_val=`expr "$@" || test $? -eq 1`
411 }
412fi # as_fn_arith
413
Illia Bobyra96d5442023-08-30 16:30:15 +0200414# as_fn_nop
415# ---------
416# Do nothing but, unlike ":", preserve the value of $?.
417as_fn_nop ()
418{
419 return $?
420}
421as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200422
Bram Moolenaar7db77842014-03-27 17:40:59 +0100423# as_fn_error STATUS ERROR [LINENO LOG_FD]
424# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200425# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
426# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +0100427# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200428as_fn_error ()
429{
Bram Moolenaar7db77842014-03-27 17:40:59 +0100430 as_status=$1; test $as_status -eq 0 && as_status=1
431 if test "$4"; then
432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +0200433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200434 fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200435 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200436 as_fn_exit $as_status
437} # as_fn_error
438
Bram Moolenaar446cb832008-06-24 21:56:24 +0000439if expr a : '\(a\)' >/dev/null 2>&1 &&
440 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000441 as_expr=expr
442else
443 as_expr=false
444fi
445
Bram Moolenaar446cb832008-06-24 21:56:24 +0000446if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000447 as_basename=basename
448else
449 as_basename=false
450fi
451
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200452if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
453 as_dirname=dirname
454else
455 as_dirname=false
456fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000457
Bram Moolenaar446cb832008-06-24 21:56:24 +0000458as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000459$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
460 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +0000461 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200462printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +0000463 sed '/^.*\/\([^/][^/]*\)\/*$/{
464 s//\1/
465 q
466 }
467 /^X\/\(\/\/\)$/{
468 s//\1/
469 q
470 }
471 /^X\/\(\/\).*/{
472 s//\1/
473 q
474 }
475 s/.*/./; q'`
476
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200477# Avoid depending upon Character Ranges.
478as_cr_letters='abcdefghijklmnopqrstuvwxyz'
479as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
480as_cr_Letters=$as_cr_letters$as_cr_LETTERS
481as_cr_digits='0123456789'
482as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000483
484
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200485 as_lineno_1=$LINENO as_lineno_1a=$LINENO
486 as_lineno_2=$LINENO as_lineno_2a=$LINENO
487 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
488 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
489 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000490 sed -n '
491 p
492 /[$]LINENO/=
493 ' <$as_myself |
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000494 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +0000495 s/[$]LINENO.*/&-/
496 t lineno
497 b
498 :lineno
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000499 N
Bram Moolenaar446cb832008-06-24 21:56:24 +0000500 :loop
501 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000502 t loop
Bram Moolenaar446cb832008-06-24 21:56:24 +0000503 s/-\n.*//
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000504 ' >$as_me.lineno &&
Bram Moolenaar446cb832008-06-24 21:56:24 +0000505 chmod +x "$as_me.lineno" ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200506 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000507
Bram Moolenaar7db77842014-03-27 17:40:59 +0100508 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
509 # already done that, so ensure we don't try to do so again and fall
510 # in an infinite loop. This has already happened in practice.
511 _as_can_reexec=no; export _as_can_reexec
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000512 # Don't try to exec as it changes $[0], causing all sort of problems
513 # (the dirname of $[0] is not the place where we might find the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000514 # original and so on. Autoconf is especially sensitive to this).
515 . "./$as_me.lineno"
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000516 # Exit status is that of the last command.
517 exit
518}
519
Illia Bobyra96d5442023-08-30 16:30:15 +0200520
521# Determine whether it's possible to make 'echo' print without a newline.
522# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
523# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000524ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200525case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +0000526-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200527 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +0000528 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200529 xy) ECHO_C='\c';;
530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
531 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000532 esac;;
533*)
534 ECHO_N='-n';;
535esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000536
Illia Bobyra96d5442023-08-30 16:30:15 +0200537# For backward compatibility with old third-party macros, we provide
538# the shell variables $as_echo and $as_echo_n. New code should use
539# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
540as_echo='printf %s\n'
541as_echo_n='printf %s'
542
543
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000544rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +0000545if test -d conf$$.dir; then
546 rm -f conf$$.dir/conf$$.file
547else
548 rm -f conf$$.dir
549 mkdir conf$$.dir 2>/dev/null
550fi
551if (echo >conf$$.file) 2>/dev/null; then
552 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000553 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000554 # ... but there are two gotchas:
555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100557 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +0100559 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000560 elif ln conf$$.file conf$$ 2>/dev/null; then
561 as_ln_s=ln
562 else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100563 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000564 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000565else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100566 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000567fi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000568rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
569rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000570
571if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200572 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000573else
574 test -d ./-p && rmdir ./-p
575 as_mkdir_p=false
576fi
577
Bram Moolenaar7db77842014-03-27 17:40:59 +0100578as_test_x='test -x'
579as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000580
581# Sed expression to map a string onto a valid CPP name.
582as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
583
584# Sed expression to map a string onto a valid variable name.
585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
586
587
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200588test -n "$DJDIR" || exec 7<&0 </dev/null
589exec 6>&1
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000590
591# Name of the host.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100592# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000593# so uname gets run too.
594ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000596#
597# Initializations.
598#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599ac_default_prefix=/usr/local
Bram Moolenaar446cb832008-06-24 21:56:24 +0000600ac_clean_files=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000601ac_config_libobj_dir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000602LIBOBJS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000603cross_compiling=no
604subdirs=
605MFLAGS=
606MAKEFLAGS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000607
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000608# Identity of this package.
Illia Bobyra96d5442023-08-30 16:30:15 +0200609PACKAGE_NAME=''
610PACKAGE_TARNAME=''
611PACKAGE_VERSION=''
612PACKAGE_STRING=''
613PACKAGE_BUGREPORT=''
614PACKAGE_URL=''
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000615
616ac_unique_file="vim.h"
617# Factoring default headers for most tests.
618ac_includes_default="\
Illia Bobyra96d5442023-08-30 16:30:15 +0200619#include <stddef.h>
620#ifdef HAVE_STDIO_H
621# include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000622#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200623#ifdef HAVE_STDLIB_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000624# include <stdlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000625#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000626#ifdef HAVE_STRING_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000627# include <string.h>
628#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000629#ifdef HAVE_INTTYPES_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000630# include <inttypes.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000631#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000632#ifdef HAVE_STDINT_H
633# include <stdint.h>
634#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200635#ifdef HAVE_STRINGS_H
636# include <strings.h>
637#endif
638#ifdef HAVE_SYS_TYPES_H
639# include <sys/types.h>
640#endif
641#ifdef HAVE_SYS_STAT_H
642# include <sys/stat.h>
643#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000644#ifdef HAVE_UNISTD_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000645# include <unistd.h>
646#endif"
647
Illia Bobyra96d5442023-08-30 16:30:15 +0200648ac_header_c_list=
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000649ac_subst_vars='LTLIBOBJS
Bram Moolenaar446cb832008-06-24 21:56:24 +0000650LIBOBJS
Bram Moolenaar22e193d2010-11-03 22:32:24 +0100651LINK_AS_NEEDED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000652DEPEND_CFLAGS_FILTER
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200653MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000654MAKEMO
655MSGFMT
656INSTALL_TOOL_LANGS
657INSTALL_LANGS
658TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000659GUI_X_LIBS
660GUITYPE
661GUI_LIB_LOC
662GUI_INC_LOC
663NARROW_PROTO
664MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100665GRESOURCE_OBJ
666GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200667UPDATE_DESKTOP_DATABASE
668GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100669GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000670GNOME_INCLUDEDIR
671GNOME_LIBDIR
672GNOME_LIBS
673GTK_LIBNAME
674GTK_LIBS
675GTK_CFLAGS
676PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000677X_LIB
678X_EXTRA_LIBS
679X_LIBS
680X_PRE_LIBS
681X_CFLAGS
682XMKMF
683xmkmfpath
Bram Moolenaar823edd12019-10-23 22:35:36 +0200684TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200685TERM_OBJ
686TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100687CHANNEL_OBJ
688CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000689NETBEANS_OBJ
690NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000691RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000692RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000693RUBY_CFLAGS
694RUBY_PRO
695RUBY_OBJ
696RUBY_SRC
697vi_cv_path_ruby
698TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000699TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000700TCL_CFLAGS
701TCL_PRO
702TCL_OBJ
703TCL_SRC
704vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200705PYTHON3_OBJ
706PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000707PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200708PYTHON3_CFLAGS
709PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200710vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200711vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000712PYTHON_OBJ
713PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000714PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000715PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000716PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000717vi_cv_path_python
718PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000719PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000720PERL_CFLAGS
721PERL_PRO
722PERL_OBJ
723PERL_SRC
724shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200725vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000726vi_cv_perllib
727vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000728MZSCHEME_MZC
729MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000730MZSCHEME_CFLAGS
731MZSCHEME_LIBS
732MZSCHEME_PRO
733MZSCHEME_OBJ
734MZSCHEME_SRC
735vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000736LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200737LUA_CFLAGS
738LUA_LIBS
739LUA_PRO
740LUA_OBJ
741LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200742vi_cv_path_plain_lua
743vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200744vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000745XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000746compiledby
747dogvimdiff
748dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200749QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000750line_break
751VIEWNAME
752EXNAME
753VIMNAME
754OS_EXTRA_OBJ
755OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100756XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000757CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200758CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200759BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000760STRIP
761AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100762FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000763EGREP
764GREP
765CPP
766OBJEXT
767EXEEXT
768ac_ct_CC
769CPPFLAGS
770LDFLAGS
771CFLAGS
772CC
773SET_MAKE
774target_alias
775host_alias
776build_alias
777LIBS
778ECHO_T
779ECHO_N
780ECHO_C
781DEFS
782mandir
783localedir
784libdir
785psdir
786pdfdir
787dvidir
788htmldir
789infodir
790docdir
791oldincludedir
792includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200793runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000794localstatedir
795sharedstatedir
796sysconfdir
797datadir
798datarootdir
799libexecdir
800sbindir
801bindir
802program_transform_name
803prefix
804exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200805PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000806PACKAGE_BUGREPORT
807PACKAGE_STRING
808PACKAGE_VERSION
809PACKAGE_TARNAME
810PACKAGE_NAME
811PATH_SEPARATOR
812SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000813ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000814ac_user_opts='
815enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100816enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000817enable_darwin
818with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100819with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000820with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000821with_vim_name
822with_ex_name
823with_view_name
824with_global_runtime
825with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200826enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000827enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200828enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000829with_features
830with_compiledby
831enable_xsmp
832enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200833enable_luainterp
834with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200835with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000836enable_mzschemeinterp
837with_plthome
838enable_perlinterp
839enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200840with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000841with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200842enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200843with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200844with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200845with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000846enable_tclinterp
847with_tclsh
848enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100849with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000850enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000851enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100852enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200853enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100854enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000855enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100856enable_rightleft
857enable_arabic
858enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000859enable_xim
860enable_fontset
861with_x
862enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000863enable_gtk2_check
864enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100865enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000866enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000867enable_gtktest
868with_gnome_includes
869with_gnome_libs
870with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200871enable_icon_cache_update
872enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000873with_motif_lib
874with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200875enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200876enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200877enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000878enable_acl
879enable_gpm
880enable_sysmouse
881enable_nls
882'
883 ac_precious_vars='build_alias
884host_alias
885target_alias
886CC
887CFLAGS
888LDFLAGS
889LIBS
890CPPFLAGS
891CPP
892XMKMF'
893
Bram Moolenaar071d4272004-06-13 20:20:40 +0000894
895# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000896ac_init_help=
897ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000898ac_unrecognized_opts=
899ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000900# The variables have the same names as the options, with
901# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000902cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000903exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905no_recursion=
906prefix=NONE
907program_prefix=NONE
908program_suffix=NONE
909program_transform_name=s,x,x,
910silent=
911site=
912srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000913verbose=
914x_includes=NONE
915x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000916
917# Installation directory options.
918# These are left unexpanded so users can "make install exec_prefix=/foo"
919# and all the variables that are supposed to be based on exec_prefix
920# by default will actually change.
921# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000922# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000923bindir='${exec_prefix}/bin'
924sbindir='${exec_prefix}/sbin'
925libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000926datarootdir='${prefix}/share'
927datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000928sysconfdir='${prefix}/etc'
929sharedstatedir='${prefix}/com'
930localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200931runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000932includedir='${prefix}/include'
933oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000934docdir='${datarootdir}/doc/${PACKAGE}'
935infodir='${datarootdir}/info'
936htmldir='${docdir}'
937dvidir='${docdir}'
938pdfdir='${docdir}'
939psdir='${docdir}'
940libdir='${exec_prefix}/lib'
941localedir='${datarootdir}/locale'
942mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000943
Bram Moolenaar071d4272004-06-13 20:20:40 +0000944ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000945ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000946for ac_option
947do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948 # If the previous option needs an argument, assign it.
949 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000950 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000951 ac_prev=
952 continue
953 fi
954
Bram Moolenaar446cb832008-06-24 21:56:24 +0000955 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100956 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
957 *=) ac_optarg= ;;
958 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000959 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000960
Bram Moolenaar446cb832008-06-24 21:56:24 +0000961 case $ac_dashdash$ac_option in
962 --)
963 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000964
965 -bindir | --bindir | --bindi | --bind | --bin | --bi)
966 ac_prev=bindir ;;
967 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000968 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000969
970 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000971 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000972 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000973 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974
975 -cache-file | --cache-file | --cache-fil | --cache-fi \
976 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
977 ac_prev=cache_file ;;
978 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
979 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000980 cache_file=$ac_optarg ;;
981
982 --config-cache | -C)
983 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000984
Bram Moolenaar446cb832008-06-24 21:56:24 +0000985 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000986 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000987 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000988 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000989
Bram Moolenaar446cb832008-06-24 21:56:24 +0000990 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
991 | --dataroo | --dataro | --datar)
992 ac_prev=datarootdir ;;
993 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
994 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
995 datarootdir=$ac_optarg ;;
996
Bram Moolenaar071d4272004-06-13 20:20:40 +0000997 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000998 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +0000999 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001000 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001001 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001002 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001003 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001004 case $ac_user_opts in
1005 *"
1006"enable_$ac_useropt"
1007"*) ;;
1008 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1009 ac_unrecognized_sep=', ';;
1010 esac
1011 eval enable_$ac_useropt=no ;;
1012
1013 -docdir | --docdir | --docdi | --doc | --do)
1014 ac_prev=docdir ;;
1015 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1016 docdir=$ac_optarg ;;
1017
1018 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1019 ac_prev=dvidir ;;
1020 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1021 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001022
1023 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001024 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001025 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001026 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001027 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001028 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001029 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001030 case $ac_user_opts in
1031 *"
1032"enable_$ac_useropt"
1033"*) ;;
1034 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1035 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001036 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001037 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001038
1039 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1040 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1041 | --exec | --exe | --ex)
1042 ac_prev=exec_prefix ;;
1043 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1044 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1045 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001046 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001047
1048 -gas | --gas | --ga | --g)
1049 # Obsolete; use --with-gas.
1050 with_gas=yes ;;
1051
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001052 -help | --help | --hel | --he | -h)
1053 ac_init_help=long ;;
1054 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1055 ac_init_help=recursive ;;
1056 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1057 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001058
1059 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001060 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001061 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001062 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001063
Bram Moolenaar446cb832008-06-24 21:56:24 +00001064 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1065 ac_prev=htmldir ;;
1066 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1067 | --ht=*)
1068 htmldir=$ac_optarg ;;
1069
Bram Moolenaar071d4272004-06-13 20:20:40 +00001070 -includedir | --includedir | --includedi | --included | --include \
1071 | --includ | --inclu | --incl | --inc)
1072 ac_prev=includedir ;;
1073 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1074 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001075 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001076
1077 -infodir | --infodir | --infodi | --infod | --info | --inf)
1078 ac_prev=infodir ;;
1079 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001080 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001081
1082 -libdir | --libdir | --libdi | --libd)
1083 ac_prev=libdir ;;
1084 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001085 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001086
1087 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1088 | --libexe | --libex | --libe)
1089 ac_prev=libexecdir ;;
1090 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1091 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001092 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001093
Bram Moolenaar446cb832008-06-24 21:56:24 +00001094 -localedir | --localedir | --localedi | --localed | --locale)
1095 ac_prev=localedir ;;
1096 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1097 localedir=$ac_optarg ;;
1098
Bram Moolenaar071d4272004-06-13 20:20:40 +00001099 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001100 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001101 ac_prev=localstatedir ;;
1102 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001103 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001104 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001105
1106 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1107 ac_prev=mandir ;;
1108 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001109 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001110
1111 -nfp | --nfp | --nf)
1112 # Obsolete; use --without-fp.
1113 with_fp=no ;;
1114
1115 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001116 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001117 no_create=yes ;;
1118
1119 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1120 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1121 no_recursion=yes ;;
1122
1123 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1124 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1125 | --oldin | --oldi | --old | --ol | --o)
1126 ac_prev=oldincludedir ;;
1127 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1128 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1129 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001130 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001131
1132 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1133 ac_prev=prefix ;;
1134 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001135 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001136
1137 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1138 | --program-pre | --program-pr | --program-p)
1139 ac_prev=program_prefix ;;
1140 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1141 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001142 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001143
1144 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1145 | --program-suf | --program-su | --program-s)
1146 ac_prev=program_suffix ;;
1147 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1148 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001149 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001150
1151 -program-transform-name | --program-transform-name \
1152 | --program-transform-nam | --program-transform-na \
1153 | --program-transform-n | --program-transform- \
1154 | --program-transform | --program-transfor \
1155 | --program-transfo | --program-transf \
1156 | --program-trans | --program-tran \
1157 | --progr-tra | --program-tr | --program-t)
1158 ac_prev=program_transform_name ;;
1159 -program-transform-name=* | --program-transform-name=* \
1160 | --program-transform-nam=* | --program-transform-na=* \
1161 | --program-transform-n=* | --program-transform-=* \
1162 | --program-transform=* | --program-transfor=* \
1163 | --program-transfo=* | --program-transf=* \
1164 | --program-trans=* | --program-tran=* \
1165 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001166 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001167
Bram Moolenaar446cb832008-06-24 21:56:24 +00001168 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1169 ac_prev=pdfdir ;;
1170 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1171 pdfdir=$ac_optarg ;;
1172
1173 -psdir | --psdir | --psdi | --psd | --ps)
1174 ac_prev=psdir ;;
1175 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1176 psdir=$ac_optarg ;;
1177
Bram Moolenaar071d4272004-06-13 20:20:40 +00001178 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1179 | -silent | --silent | --silen | --sile | --sil)
1180 silent=yes ;;
1181
Illia Bobyrf39842f2023-08-27 18:21:23 +02001182 -runstatedir | --runstatedir | --runstatedi | --runstated \
1183 | --runstate | --runstat | --runsta | --runst | --runs \
1184 | --run | --ru | --r)
1185 ac_prev=runstatedir ;;
1186 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1187 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1188 | --run=* | --ru=* | --r=*)
1189 runstatedir=$ac_optarg ;;
1190
Bram Moolenaar071d4272004-06-13 20:20:40 +00001191 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1192 ac_prev=sbindir ;;
1193 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1194 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001195 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001196
1197 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1198 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1199 | --sharedst | --shareds | --shared | --share | --shar \
1200 | --sha | --sh)
1201 ac_prev=sharedstatedir ;;
1202 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1203 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1204 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1205 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001206 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001207
1208 -site | --site | --sit)
1209 ac_prev=site ;;
1210 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001211 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001212
1213 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1214 ac_prev=srcdir ;;
1215 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001216 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001217
1218 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1219 | --syscon | --sysco | --sysc | --sys | --sy)
1220 ac_prev=sysconfdir ;;
1221 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1222 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001223 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001224
1225 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001226 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001227 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001228 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001229
1230 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1231 verbose=yes ;;
1232
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001233 -version | --version | --versio | --versi | --vers | -V)
1234 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001235
1236 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001237 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001238 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001239 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001240 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001241 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001242 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001243 case $ac_user_opts in
1244 *"
1245"with_$ac_useropt"
1246"*) ;;
1247 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1248 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001249 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001250 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001251
1252 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001253 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001254 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001255 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001256 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001257 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001258 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001259 case $ac_user_opts in
1260 *"
1261"with_$ac_useropt"
1262"*) ;;
1263 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1264 ac_unrecognized_sep=', ';;
1265 esac
1266 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001267
1268 --x)
1269 # Obsolete; use --with-x.
1270 with_x=yes ;;
1271
1272 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1273 | --x-incl | --x-inc | --x-in | --x-i)
1274 ac_prev=x_includes ;;
1275 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1276 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001277 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001278
1279 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1280 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1281 ac_prev=x_libraries ;;
1282 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1283 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001284 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001285
Bram Moolenaar7db77842014-03-27 17:40:59 +01001286 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1287Try \`$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001288 ;;
1289
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001290 *=*)
1291 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1292 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001293 case $ac_envvar in #(
1294 '' | [0-9]* | *[!_$as_cr_alnum]* )
Bram Moolenaar7db77842014-03-27 17:40:59 +01001295 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001296 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001297 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001298 export $ac_envvar ;;
1299
Bram Moolenaar071d4272004-06-13 20:20:40 +00001300 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001301 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001302 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001303 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001304 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001305 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001306 ;;
1307
1308 esac
1309done
1310
1311if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001312 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001313 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001314fi
1315
Bram Moolenaar446cb832008-06-24 21:56:24 +00001316if test -n "$ac_unrecognized_opts"; then
1317 case $enable_option_checking in
1318 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001319 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001320 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001321 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001322fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001323
Bram Moolenaar446cb832008-06-24 21:56:24 +00001324# Check all directory arguments for consistency.
1325for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1326 datadir sysconfdir sharedstatedir localstatedir includedir \
1327 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001328 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001329do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001330 eval ac_val=\$$ac_var
1331 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001332 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001333 */ )
1334 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1335 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001336 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001337 # Be sure to have absolute directory names.
1338 case $ac_val in
1339 [\\/$]* | ?:[\\/]* ) continue;;
1340 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1341 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001342 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001343done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001344
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001345# There might be people who depend on the old broken behavior: `$host'
1346# used to hold the argument of --host etc.
1347# FIXME: To remove some day.
1348build=$build_alias
1349host=$host_alias
1350target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001351
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001352# FIXME: To remove some day.
1353if test "x$host_alias" != x; then
1354 if test "x$build_alias" = x; then
1355 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001356 elif test "x$build_alias" != "x$host_alias"; then
1357 cross_compiling=yes
1358 fi
1359fi
1360
1361ac_tool_prefix=
1362test -n "$host_alias" && ac_tool_prefix=$host_alias-
1363
1364test "$silent" = yes && exec 6>/dev/null
1365
Bram Moolenaar071d4272004-06-13 20:20:40 +00001366
Bram Moolenaar446cb832008-06-24 21:56:24 +00001367ac_pwd=`pwd` && test -n "$ac_pwd" &&
1368ac_ls_di=`ls -di .` &&
1369ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001370 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001371test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001372 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001373
1374
Bram Moolenaar071d4272004-06-13 20:20:40 +00001375# Find the source files, if location was not specified.
1376if test -z "$srcdir"; then
1377 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001378 # Try the directory containing this script, then the parent directory.
1379 ac_confdir=`$as_dirname -- "$as_myself" ||
1380$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1381 X"$as_myself" : 'X\(//\)[^/]' \| \
1382 X"$as_myself" : 'X\(//\)$' \| \
1383 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001384printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001385 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1386 s//\1/
1387 q
1388 }
1389 /^X\(\/\/\)[^/].*/{
1390 s//\1/
1391 q
1392 }
1393 /^X\(\/\/\)$/{
1394 s//\1/
1395 q
1396 }
1397 /^X\(\/\).*/{
1398 s//\1/
1399 q
1400 }
1401 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001402 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001403 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001404 srcdir=..
1405 fi
1406else
1407 ac_srcdir_defaulted=no
1408fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001409if test ! -r "$srcdir/$ac_unique_file"; then
1410 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001411 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001412fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001413ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1414ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001415 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001416 pwd)`
1417# When building in place, set srcdir=.
1418if test "$ac_abs_confdir" = "$ac_pwd"; then
1419 srcdir=.
1420fi
1421# Remove unnecessary trailing slashes from srcdir.
1422# Double slashes in file names in object file debugging info
1423# mess up M-x gdb in Emacs.
1424case $srcdir in
1425*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1426esac
1427for ac_var in $ac_precious_vars; do
1428 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1429 eval ac_env_${ac_var}_value=\$${ac_var}
1430 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1431 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1432done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001433
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001434#
1435# Report the --help message.
1436#
1437if test "$ac_init_help" = "long"; then
1438 # Omit some internal or obsolete options to make the list less imposing.
1439 # This message is too long to be a string in the A/UX 3.1 sh.
1440 cat <<_ACEOF
1441\`configure' configures this package to adapt to many kinds of systems.
1442
1443Usage: $0 [OPTION]... [VAR=VALUE]...
1444
1445To assign environment variables (e.g., CC, CFLAGS...), specify them as
1446VAR=VALUE. See below for descriptions of some of the useful variables.
1447
1448Defaults for the options are specified in brackets.
1449
1450Configuration:
1451 -h, --help display this help and exit
1452 --help=short display options specific to this package
1453 --help=recursive display the short help of all the included packages
1454 -V, --version display version information and exit
Bram Moolenaar7db77842014-03-27 17:40:59 +01001455 -q, --quiet, --silent do not print \`checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001456 --cache-file=FILE cache test results in FILE [disabled]
1457 -C, --config-cache alias for \`--cache-file=config.cache'
1458 -n, --no-create do not create output files
1459 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1460
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001461Installation directories:
1462 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001463 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001464 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001465 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001466
1467By default, \`make install' will install all the files in
1468\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1469an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1470for instance \`--prefix=\$HOME'.
1471
1472For better control, use the options below.
1473
1474Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001475 --bindir=DIR user executables [EPREFIX/bin]
1476 --sbindir=DIR system admin executables [EPREFIX/sbin]
1477 --libexecdir=DIR program executables [EPREFIX/libexec]
1478 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1479 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1480 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001481 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001482 --libdir=DIR object code libraries [EPREFIX/lib]
1483 --includedir=DIR C header files [PREFIX/include]
1484 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1485 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1486 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1487 --infodir=DIR info documentation [DATAROOTDIR/info]
1488 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1489 --mandir=DIR man documentation [DATAROOTDIR/man]
1490 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1491 --htmldir=DIR html documentation [DOCDIR]
1492 --dvidir=DIR dvi documentation [DOCDIR]
1493 --pdfdir=DIR pdf documentation [DOCDIR]
1494 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001495_ACEOF
1496
1497 cat <<\_ACEOF
1498
1499X features:
1500 --x-includes=DIR X include files are in DIR
1501 --x-libraries=DIR X library files are in DIR
1502_ACEOF
1503fi
1504
1505if test -n "$ac_init_help"; then
1506
1507 cat <<\_ACEOF
1508
1509Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001510 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001511 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1512 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001513 --enable-fail-if-missing Fail if dependencies on additional features
1514 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001515 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001516 --disable-smack Do not check for Smack support.
1517 --disable-selinux Do not check for SELinux support.
Christian Brabandte085dfd2023-09-30 12:49:18 +02001518 --disable-xattr Do not check for XATTR support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001519 --disable-xsmp Disable XSMP session management
1520 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001521 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1522 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001523 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001524 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001525 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001526 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001527 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001528 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001529 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001530 --disable-channel Disable process communication support.
1531 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001532 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001533 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001534 --disable-rightleft Do not include Right-to-Left language support.
1535 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001536 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001537 --enable-xim Include XIM input support.
1538 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001539 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001540 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001541 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001542 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001543 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001544 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001545 --disable-icon-cache-update update disabled
1546 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001547 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001548 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001549 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001550 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001551 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001552 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001553 --disable-nls Don't support NLS (gettext()).
1554
1555Optional Packages:
1556 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1557 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001558 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001559 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001560 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1561 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001562 --with-vim-name=NAME what to call the Vim executable
1563 --with-ex-name=NAME what to call the Ex executable
1564 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001565 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001566 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001567 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001568 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001569 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001570 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001571 --with-plthome=PLTHOME Use PLTHOME.
Bram Moolenaare1a32312018-04-15 16:03:25 +02001572 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1573 --with-python-config-dir=PATH Python's config directory (deprecated)
1574 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02001575 --with-python3-stable-abi=VERSION stable ABI version to target (e.g. 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001576 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001577 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001578 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001579 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001580 --with-gnome-includes=DIR Specify location of GNOME headers
1581 --with-gnome-libs=DIR Specify location of GNOME libs
1582 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001583 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001584 --with-tlib=library terminal library to be used
1585
1586Some influential environment variables:
1587 CC C compiler command
1588 CFLAGS C compiler flags
1589 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1590 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001591 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001592 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001593 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001594 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001595 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001596
1597Use these variables to override the choices made by `configure' or to help
1598it to find libraries and programs with nonstandard names/locations.
1599
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001600Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001601_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001602ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001603fi
1604
1605if test "$ac_init_help" = "recursive"; then
1606 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001607 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001608 test -d "$ac_dir" ||
1609 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1610 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001611 ac_builddir=.
1612
Bram Moolenaar446cb832008-06-24 21:56:24 +00001613case "$ac_dir" in
1614.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1615*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001616 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001617 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001618 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001619 case $ac_top_builddir_sub in
1620 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1621 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1622 esac ;;
1623esac
1624ac_abs_top_builddir=$ac_pwd
1625ac_abs_builddir=$ac_pwd$ac_dir_suffix
1626# for backward compatibility:
1627ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001628
1629case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001630 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001631 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001632 ac_top_srcdir=$ac_top_builddir_sub
1633 ac_abs_top_srcdir=$ac_pwd ;;
1634 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001635 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001636 ac_top_srcdir=$srcdir
1637 ac_abs_top_srcdir=$srcdir ;;
1638 *) # Relative name.
1639 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1640 ac_top_srcdir=$ac_top_build_prefix$srcdir
1641 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001642esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001643ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001644
Bram Moolenaar446cb832008-06-24 21:56:24 +00001645 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001646 # Check for configure.gnu first; this name is used for a wrapper for
1647 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001648 if test -f "$ac_srcdir/configure.gnu"; then
1649 echo &&
1650 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1651 elif test -f "$ac_srcdir/configure"; then
1652 echo &&
1653 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001654 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001655 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001656 fi || ac_status=$?
1657 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001658 done
1659fi
1660
Bram Moolenaar446cb832008-06-24 21:56:24 +00001661test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001662if $ac_init_version; then
1663 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001664configure
Illia Bobyra96d5442023-08-30 16:30:15 +02001665generated by GNU Autoconf 2.71
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001666
Illia Bobyra96d5442023-08-30 16:30:15 +02001667Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001668This configure script is free software; the Free Software Foundation
1669gives unlimited permission to copy, distribute and modify it.
1670_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001671 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001672fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001673
1674## ------------------------ ##
1675## Autoconf initialization. ##
1676## ------------------------ ##
1677
1678# ac_fn_c_try_compile LINENO
1679# --------------------------
1680# Try to compile conftest.$ac_ext, and return whether this succeeded.
1681ac_fn_c_try_compile ()
1682{
1683 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001684 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001685 if { { ac_try="$ac_compile"
1686case "(($ac_try" in
1687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1688 *) ac_try_echo=$ac_try;;
1689esac
1690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001691printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001692 (eval "$ac_compile") 2>conftest.err
1693 ac_status=$?
1694 if test -s conftest.err; then
1695 grep -v '^ *+' conftest.err >conftest.er1
1696 cat conftest.er1 >&5
1697 mv -f conftest.er1 conftest.err
1698 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001699 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001700 test $ac_status = 0; } && {
1701 test -z "$ac_c_werror_flag" ||
1702 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001703 } && test -s conftest.$ac_objext
1704then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001705 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001706else $as_nop
1707 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001708sed 's/^/| /' conftest.$ac_ext >&5
1709
1710 ac_retval=1
1711fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001712 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001713 as_fn_set_status $ac_retval
1714
1715} # ac_fn_c_try_compile
1716
1717# ac_fn_c_try_cpp LINENO
1718# ----------------------
1719# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1720ac_fn_c_try_cpp ()
1721{
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723 if { { ac_try="$ac_cpp conftest.$ac_ext"
1724case "(($ac_try" in
1725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1726 *) ac_try_echo=$ac_try;;
1727esac
1728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001729printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001730 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1731 ac_status=$?
1732 if test -s conftest.err; then
1733 grep -v '^ *+' conftest.err >conftest.er1
1734 cat conftest.er1 >&5
1735 mv -f conftest.er1 conftest.err
1736 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001737 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001738 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001739 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1740 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001741 }
1742then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001743 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001744else $as_nop
1745 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001746sed 's/^/| /' conftest.$ac_ext >&5
1747
1748 ac_retval=1
1749fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001751 as_fn_set_status $ac_retval
1752
1753} # ac_fn_c_try_cpp
1754
1755# ac_fn_c_try_link LINENO
1756# -----------------------
1757# Try to link conftest.$ac_ext, and return whether this succeeded.
1758ac_fn_c_try_link ()
1759{
1760 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001761 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001762 if { { ac_try="$ac_link"
1763case "(($ac_try" in
1764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765 *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001768printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001769 (eval "$ac_link") 2>conftest.err
1770 ac_status=$?
1771 if test -s conftest.err; then
1772 grep -v '^ *+' conftest.err >conftest.er1
1773 cat conftest.er1 >&5
1774 mv -f conftest.er1 conftest.err
1775 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001776 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001777 test $ac_status = 0; } && {
1778 test -z "$ac_c_werror_flag" ||
1779 test ! -s conftest.err
1780 } && test -s conftest$ac_exeext && {
1781 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001782 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001783 }
1784then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001785 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001786else $as_nop
1787 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001788sed 's/^/| /' conftest.$ac_ext >&5
1789
1790 ac_retval=1
1791fi
1792 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1793 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1794 # interfere with the next link command; also delete a directory that is
1795 # left behind by Apple's compiler. We do this before executing the actions.
1796 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001798 as_fn_set_status $ac_retval
1799
1800} # ac_fn_c_try_link
1801
Illia Bobyr0e82b592023-08-29 21:16:29 +02001802# ac_fn_c_try_run LINENO
1803# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001804# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1805# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001806ac_fn_c_try_run ()
1807{
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 if { { ac_try="$ac_link"
1810case "(($ac_try" in
1811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812 *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001815printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001816 (eval "$ac_link") 2>&5
1817 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001818 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001819 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1820 { { case "(($ac_try" in
1821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822 *) ac_try_echo=$ac_try;;
1823esac
1824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001825printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001826 (eval "$ac_try") 2>&5
1827 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001828 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1829 test $ac_status = 0; }; }
1830then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001831 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001832else $as_nop
1833 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1834 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001835sed 's/^/| /' conftest.$ac_ext >&5
1836
1837 ac_retval=$ac_status
1838fi
1839 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1840 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1841 as_fn_set_status $ac_retval
1842
1843} # ac_fn_c_try_run
1844
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001845# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1846# -------------------------------------------------------
1847# Tests whether HEADER exists and can be compiled using the include files in
1848# INCLUDES, setting the cache variable VAR accordingly.
1849ac_fn_c_check_header_compile ()
1850{
1851 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1853printf %s "checking for $2... " >&6; }
1854if eval test \${$3+y}
1855then :
1856 printf %s "(cached) " >&6
1857else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1859/* end confdefs.h. */
1860$4
1861#include <$2>
1862_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001863if ac_fn_c_try_compile "$LINENO"
1864then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001865 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001866else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001867 eval "$3=no"
1868fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001869rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001870fi
1871eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1873printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001874 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001875
1876} # ac_fn_c_check_header_compile
1877
1878# ac_fn_c_check_func LINENO FUNC VAR
1879# ----------------------------------
1880# Tests whether FUNC exists, setting the cache variable VAR accordingly
1881ac_fn_c_check_func ()
1882{
1883 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885printf %s "checking for $2... " >&6; }
1886if eval test \${$3+y}
1887then :
1888 printf %s "(cached) " >&6
1889else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1893 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1894#define $2 innocuous_$2
1895
1896/* System header to define __stub macros and hopefully few prototypes,
Illia Bobyra96d5442023-08-30 16:30:15 +02001897 which can conflict with char $2 (); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001898
Illia Bobyra96d5442023-08-30 16:30:15 +02001899#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001900#undef $2
1901
1902/* Override any GCC internal prototype to avoid an error.
1903 Use char because int might match the return type of a GCC
1904 builtin and then its argument prototype would still apply. */
1905#ifdef __cplusplus
1906extern "C"
1907#endif
1908char $2 ();
1909/* The GNU C library defines this for functions which it implements
1910 to always fail with ENOSYS. Some functions are actually named
1911 something starting with __ and the normal name is an alias. */
1912#if defined __stub_$2 || defined __stub___$2
1913choke me
1914#endif
1915
1916int
Illia Bobyra96d5442023-08-30 16:30:15 +02001917main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001918{
1919return $2 ();
1920 ;
1921 return 0;
1922}
1923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001924if ac_fn_c_try_link "$LINENO"
1925then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001926 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001927else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001928 eval "$3=no"
1929fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001930rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001931 conftest$ac_exeext conftest.$ac_ext
1932fi
1933eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001937
1938} # ac_fn_c_check_func
1939
Bram Moolenaar914703b2010-05-31 21:59:46 +02001940# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1941# --------------------------------------------
1942# Tries to find the compile-time value of EXPR in a program that includes
1943# INCLUDES, setting VAR accordingly. Returns whether the value could be
1944# computed
1945ac_fn_c_compute_int ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 if test "$cross_compiling" = yes; then
1949 # Depending upon the size, compute the lo and hi bounds.
1950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1951/* end confdefs.h. */
1952$4
1953int
Illia Bobyra96d5442023-08-30 16:30:15 +02001954main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001955{
1956static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001957test_array [0] = 0;
1958return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001959
1960 ;
1961 return 0;
1962}
1963_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001964if ac_fn_c_try_compile "$LINENO"
1965then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001966 ac_lo=0 ac_mid=0
1967 while :; do
1968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969/* end confdefs.h. */
1970$4
1971int
Illia Bobyra96d5442023-08-30 16:30:15 +02001972main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001973{
1974static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001975test_array [0] = 0;
1976return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001977
1978 ;
1979 return 0;
1980}
1981_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001982if ac_fn_c_try_compile "$LINENO"
1983then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001984 ac_hi=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02001985else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001986 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1987 if test $ac_lo -le $ac_mid; then
1988 ac_lo= ac_hi=
1989 break
1990 fi
1991 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1992fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001993rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02001994 done
Illia Bobyra96d5442023-08-30 16:30:15 +02001995else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
Illia Bobyra96d5442023-08-30 16:30:15 +02002000main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002001{
2002static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002003test_array [0] = 0;
2004return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002010if ac_fn_c_try_compile "$LINENO"
2011then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002012 ac_hi=-1 ac_mid=-1
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
Illia Bobyra96d5442023-08-30 16:30:15 +02002018main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002019{
2020static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002021test_array [0] = 0;
2022return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002028if ac_fn_c_try_compile "$LINENO"
2029then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002030 ac_lo=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02002031else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002032 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2033 if test $ac_mid -le $ac_hi; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2038fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002039rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002040 done
Illia Bobyra96d5442023-08-30 16:30:15 +02002041else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002042 ac_lo= ac_hi=
2043fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002044rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002045fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002046rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002047# Binary search between lo and hi bounds.
2048while test "x$ac_lo" != "x$ac_hi"; do
2049 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
Illia Bobyra96d5442023-08-30 16:30:15 +02002054main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002055{
2056static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002057test_array [0] = 0;
2058return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002064if ac_fn_c_try_compile "$LINENO"
2065then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002066 ac_hi=$ac_mid
Illia Bobyra96d5442023-08-30 16:30:15 +02002067else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002068 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2069fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002070rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002071done
2072case $ac_lo in #((
2073?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2074'') ac_retval=1 ;;
2075esac
2076 else
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002080static long int longval (void) { return $2; }
2081static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002082#include <stdio.h>
2083#include <stdlib.h>
2084int
Illia Bobyra96d5442023-08-30 16:30:15 +02002085main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002086{
2087
2088 FILE *f = fopen ("conftest.val", "w");
2089 if (! f)
2090 return 1;
2091 if (($2) < 0)
2092 {
2093 long int i = longval ();
2094 if (i != ($2))
2095 return 1;
2096 fprintf (f, "%ld", i);
2097 }
2098 else
2099 {
2100 unsigned long int i = ulongval ();
2101 if (i != ($2))
2102 return 1;
2103 fprintf (f, "%lu", i);
2104 }
2105 /* Do not output a trailing newline, as this causes \r\n confusion
2106 on some platforms. */
2107 return ferror (f) || fclose (f) != 0;
2108
2109 ;
2110 return 0;
2111}
2112_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002113if ac_fn_c_try_run "$LINENO"
2114then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002115 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02002116else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002117 ac_retval=1
2118fi
2119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2120 conftest.$ac_objext conftest.beam conftest.$ac_ext
2121rm -f conftest.val
2122
2123 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002124 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002125 as_fn_set_status $ac_retval
2126
2127} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002128
2129# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2130# -------------------------------------------
2131# Tests whether TYPE exists after having included INCLUDES, setting cache
2132# variable VAR accordingly.
2133ac_fn_c_check_type ()
2134{
2135 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2137printf %s "checking for $2... " >&6; }
2138if eval test \${$3+y}
2139then :
2140 printf %s "(cached) " >&6
2141else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002142 eval "$3=no"
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h. */
2145$4
2146int
Illia Bobyra96d5442023-08-30 16:30:15 +02002147main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002148{
2149if (sizeof ($2))
2150 return 0;
2151 ;
2152 return 0;
2153}
2154_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002155if ac_fn_c_try_compile "$LINENO"
2156then :
Mike Gilberta055b442023-08-20 19:01:41 +02002157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2158/* end confdefs.h. */
2159$4
2160int
Illia Bobyra96d5442023-08-30 16:30:15 +02002161main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002162{
2163if (sizeof (($2)))
2164 return 0;
2165 ;
2166 return 0;
2167}
2168_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002169if ac_fn_c_try_compile "$LINENO"
2170then :
Mike Gilberta055b442023-08-20 19:01:41 +02002171
Illia Bobyra96d5442023-08-30 16:30:15 +02002172else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002173 eval "$3=yes"
2174fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002175rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002176fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002177rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002178fi
2179eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2181printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002182 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2183
2184} # ac_fn_c_check_type
2185
2186# ac_fn_c_find_uintX_t LINENO BITS VAR
2187# ------------------------------------
2188# Finds an unsigned integer type with width BITS, setting cache variable VAR
2189# accordingly.
2190ac_fn_c_find_uintX_t ()
2191{
2192 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2194printf %s "checking for uint$2_t... " >&6; }
2195if eval test \${$3+y}
2196then :
2197 printf %s "(cached) " >&6
2198else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002199 eval "$3=no"
2200 # Order is important - never check a type that is potentially smaller
2201 # than half of the expected target width.
2202 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2203 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2205/* end confdefs.h. */
2206$ac_includes_default
2207int
Illia Bobyra96d5442023-08-30 16:30:15 +02002208main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002209{
2210static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2211test_array [0] = 0;
2212return test_array [0];
2213
2214 ;
2215 return 0;
2216}
2217_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002218if ac_fn_c_try_compile "$LINENO"
2219then :
Mike Gilberta055b442023-08-20 19:01:41 +02002220 case $ac_type in #(
2221 uint$2_t) :
2222 eval "$3=yes" ;; #(
2223 *) :
2224 eval "$3=\$ac_type" ;;
2225esac
2226fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002227rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2228 if eval test \"x\$"$3"\" = x"no"
2229then :
Mike Gilberta055b442023-08-20 19:01:41 +02002230
Illia Bobyra96d5442023-08-30 16:30:15 +02002231else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002232 break
2233fi
2234 done
2235fi
2236eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2238printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002239 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2240
2241} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002242ac_configure_args_raw=
2243for ac_arg
2244do
2245 case $ac_arg in
2246 *\'*)
2247 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2248 esac
2249 as_fn_append ac_configure_args_raw " '$ac_arg'"
2250done
2251
2252case $ac_configure_args_raw in
2253 *$as_nl*)
2254 ac_safe_unquote= ;;
2255 *)
2256 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2257 ac_unsafe_a="$ac_unsafe_z#~"
2258 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2259 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2260esac
2261
Bram Moolenaar446cb832008-06-24 21:56:24 +00002262cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002263This file contains any messages produced by compilers while
2264running configure, to aid debugging if configure makes a mistake.
2265
2266It was created by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +02002267generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002268
Illia Bobyra96d5442023-08-30 16:30:15 +02002269 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002270
2271_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002272exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002273{
2274cat <<_ASUNAME
2275## --------- ##
2276## Platform. ##
2277## --------- ##
2278
2279hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2280uname -m = `(uname -m) 2>/dev/null || echo unknown`
2281uname -r = `(uname -r) 2>/dev/null || echo unknown`
2282uname -s = `(uname -s) 2>/dev/null || echo unknown`
2283uname -v = `(uname -v) 2>/dev/null || echo unknown`
2284
2285/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2286/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2287
2288/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2289/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2290/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002291/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002292/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2293/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2294/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2295
2296_ASUNAME
2297
2298as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2299for as_dir in $PATH
2300do
2301 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002302 case $as_dir in #(((
2303 '') as_dir=./ ;;
2304 */) ;;
2305 *) as_dir=$as_dir/ ;;
2306 esac
2307 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002308 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002309IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002310
2311} >&5
2312
2313cat >&5 <<_ACEOF
2314
2315
2316## ----------- ##
2317## Core tests. ##
2318## ----------- ##
2319
2320_ACEOF
2321
2322
2323# Keep a trace of the command line.
2324# Strip out --no-create and --no-recursion so they do not pile up.
2325# Strip out --silent because we don't want to record it for future runs.
2326# Also quote any args containing shell meta-characters.
2327# Make two passes to allow for proper duplicate-argument suppression.
2328ac_configure_args=
2329ac_configure_args0=
2330ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002331ac_must_keep_next=false
2332for ac_pass in 1 2
2333do
2334 for ac_arg
2335 do
2336 case $ac_arg in
2337 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2339 | -silent | --silent | --silen | --sile | --sil)
2340 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002341 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002342 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002343 esac
2344 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002345 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002346 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002347 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002348 if test $ac_must_keep_next = true; then
2349 ac_must_keep_next=false # Got value, back to normal.
2350 else
2351 case $ac_arg in
2352 *=* | --config-cache | -C | -disable-* | --disable-* \
2353 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2354 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2355 | -with-* | --with-* | -without-* | --without-* | --x)
2356 case "$ac_configure_args0 " in
2357 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2358 esac
2359 ;;
2360 -* ) ac_must_keep_next=true ;;
2361 esac
2362 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002363 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002364 ;;
2365 esac
2366 done
2367done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002368{ ac_configure_args0=; unset ac_configure_args0;}
2369{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002370
2371# When interrupted or exit'd, cleanup temporary files, and complete
2372# config.log. We remove comments because anyway the quotes in there
2373# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002374# WARNING: Use '\'' to represent an apostrophe within the trap.
2375# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002376trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002377 # Sanitize IFS.
2378 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002379 # Save into config.log some information that might help in debugging.
2380 {
2381 echo
2382
Illia Bobyra96d5442023-08-30 16:30:15 +02002383 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002384## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002385## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002386 echo
2387 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002388(
2389 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2390 eval ac_val=\$$ac_var
2391 case $ac_val in #(
2392 *${as_nl}*)
2393 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002394 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2395printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002396 esac
2397 case $ac_var in #(
2398 _ | IFS | as_nl) ;; #(
2399 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002400 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002401 esac ;;
2402 esac
2403 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002404 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002405 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2406 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002407 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002408 "s/'\''/'\''\\\\'\'''\''/g;
2409 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2410 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002411 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002412 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002413 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002414 esac |
2415 sort
2416)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002417 echo
2418
Illia Bobyra96d5442023-08-30 16:30:15 +02002419 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002420## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002421## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002422 echo
2423 for ac_var in $ac_subst_vars
2424 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002425 eval ac_val=\$$ac_var
2426 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002427 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002428 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002429 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002430 done | sort
2431 echo
2432
2433 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002434 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002435## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002436## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002437 echo
2438 for ac_var in $ac_subst_files
2439 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002440 eval ac_val=\$$ac_var
2441 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002442 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002443 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002444 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002445 done | sort
2446 echo
2447 fi
2448
2449 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002450 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002451## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002452## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002453 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002454 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002455 echo
2456 fi
2457 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002458 printf "%s\n" "$as_me: caught signal $ac_signal"
2459 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002460 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002461 rm -f core *.core core.conftest.* &&
2462 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002463 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002464' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002465for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002466 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002467done
2468ac_signal=0
2469
2470# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002471rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002472
Illia Bobyra96d5442023-08-30 16:30:15 +02002473printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002474
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002475# Predefined preprocessor variables.
2476
Illia Bobyra96d5442023-08-30 16:30:15 +02002477printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002478
Illia Bobyra96d5442023-08-30 16:30:15 +02002479printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002480
Illia Bobyra96d5442023-08-30 16:30:15 +02002481printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002482
Illia Bobyra96d5442023-08-30 16:30:15 +02002483printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002484
Illia Bobyra96d5442023-08-30 16:30:15 +02002485printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002486
Illia Bobyra96d5442023-08-30 16:30:15 +02002487printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002488
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002489
2490# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002491# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002492if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002493 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002494elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002495 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002496else
Illia Bobyra96d5442023-08-30 16:30:15 +02002497 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002498fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002499
2500for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002501do
Illia Bobyra96d5442023-08-30 16:30:15 +02002502 case $ac_site_file in #(
2503 */*) :
2504 ;; #(
2505 *) :
2506 ac_site_file=./$ac_site_file ;;
2507esac
2508 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2510printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002511 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002512 . "$ac_site_file" \
Illia Bobyra96d5442023-08-30 16:30:15 +02002513 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2514printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002515as_fn_error $? "failed to load site script $ac_site_file
2516See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002517 fi
2518done
2519
2520if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002521 # Some versions of bash will fail to source /dev/null (special files
2522 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2523 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2525printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002526 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002527 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2528 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002529 esac
2530 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002531else
Illia Bobyra96d5442023-08-30 16:30:15 +02002532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2533printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002534 >$cache_file
2535fi
2536
Illia Bobyra96d5442023-08-30 16:30:15 +02002537# Test code for whether the C compiler supports C89 (global declarations)
2538ac_c_conftest_c89_globals='
2539/* Does the compiler advertise C89 conformance?
2540 Do not test the value of __STDC__, because some compilers set it to 0
2541 while being otherwise adequately conformant. */
2542#if !defined __STDC__
2543# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002544#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002545
Illia Bobyra96d5442023-08-30 16:30:15 +02002546#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002547#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002548struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002549/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002550struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002551struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002552static char *e (p, i)
2553 char **p;
2554 int i;
2555{
2556 return p[i];
2557}
2558static char *f (char * (*g) (char **, int), char **p, ...)
2559{
2560 char *s;
2561 va_list v;
2562 va_start (v,p);
2563 s = g (p, va_arg (v,int));
2564 va_end (v);
2565 return s;
2566}
2567
2568/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002569 function prototypes and stuff, but not \xHH hex character constants.
2570 These do not provoke an error unfortunately, instead are silently treated
2571 as an "x". The following induces an error, until -std is added to get
2572 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2573 array size at least. It is necessary to write \x00 == 0 to get something
2574 that is true only with -std. */
2575int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002576
Bram Moolenaar446cb832008-06-24 21:56:24 +00002577/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2578 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002579#define FOO(x) '\''x'\''
2580int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002581
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002582int test (int i, double x);
2583struct s1 {int (*f) (int a);};
2584struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002585int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2586 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002587
Illia Bobyra96d5442023-08-30 16:30:15 +02002588# Test code for whether the C compiler supports C89 (body of main).
2589ac_c_conftest_c89_main='
2590ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2591'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002592
Illia Bobyra96d5442023-08-30 16:30:15 +02002593# Test code for whether the C compiler supports C99 (global declarations)
2594ac_c_conftest_c99_globals='
2595// Does the compiler advertise C99 conformance?
2596#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2597# error "Compiler does not advertise C99 conformance"
2598#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002599
Bram Moolenaar22640082018-04-19 20:39:41 +02002600#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002601extern int puts (const char *);
2602extern int printf (const char *, ...);
2603extern int dprintf (int, const char *, ...);
2604extern void *malloc (size_t);
Bram Moolenaar22640082018-04-19 20:39:41 +02002605
2606// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002607// dprintf is used instead of fprintf to avoid needing to declare
2608// FILE and stderr.
2609#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002610#define showlist(...) puts (#__VA_ARGS__)
2611#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2612static void
2613test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002614{
Bram Moolenaar22640082018-04-19 20:39:41 +02002615 int x = 1234;
2616 int y = 5678;
2617 debug ("Flag");
2618 debug ("X = %d\n", x);
2619 showlist (The first, second, and third items.);
2620 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002621}
2622
Bram Moolenaar22640082018-04-19 20:39:41 +02002623// Check long long types.
2624#define BIG64 18446744073709551615ull
2625#define BIG32 4294967295ul
2626#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2627#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002628 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002629#endif
2630#if BIG_OK
2631#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002632 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002633#endif
2634static long long int bignum = -9223372036854775807LL;
2635static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002636
Bram Moolenaar22640082018-04-19 20:39:41 +02002637struct incomplete_array
2638{
2639 int datasize;
2640 double data[];
2641};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002642
Bram Moolenaar22640082018-04-19 20:39:41 +02002643struct named_init {
2644 int number;
2645 const wchar_t *name;
2646 double average;
2647};
2648
2649typedef const char *ccp;
2650
2651static inline int
2652test_restrict (ccp restrict text)
2653{
2654 // See if C++-style comments work.
2655 // Iterate through items via the restricted pointer.
2656 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002657 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002658 continue;
2659 return 0;
2660}
2661
2662// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002663static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002664test_varargs (const char *format, ...)
2665{
2666 va_list args;
2667 va_start (args, format);
2668 va_list args_copy;
2669 va_copy (args_copy, args);
2670
Illia Bobyra96d5442023-08-30 16:30:15 +02002671 const char *str = "";
2672 int number = 0;
2673 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002674
2675 while (*format)
2676 {
2677 switch (*format++)
2678 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002679 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002680 str = va_arg (args_copy, const char *);
2681 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002682 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002683 number = va_arg (args_copy, int);
2684 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002685 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002686 fnumber = va_arg (args_copy, double);
2687 break;
2688 default:
2689 break;
2690 }
2691 }
2692 va_end (args_copy);
2693 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002694
2695 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002696}
Illia Bobyra96d5442023-08-30 16:30:15 +02002697'
Bram Moolenaar22640082018-04-19 20:39:41 +02002698
Illia Bobyra96d5442023-08-30 16:30:15 +02002699# Test code for whether the C compiler supports C99 (body of main).
2700ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002701 // Check bool.
2702 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002703 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002704
2705 // Check restrict.
2706 if (test_restrict ("String literal") == 0)
2707 success = true;
2708 char *restrict newvar = "Another string";
2709
2710 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002711 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002712 test_varargs_macros ();
2713
2714 // Check flexible array members.
2715 struct incomplete_array *ia =
2716 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2717 ia->datasize = 10;
2718 for (int i = 0; i < ia->datasize; ++i)
2719 ia->data[i] = i * 1.234;
2720
2721 // Check named initializers.
2722 struct named_init ni = {
2723 .number = 34,
2724 .name = L"Test wide string",
2725 .average = 543.34343,
2726 };
2727
2728 ni.number = 58;
2729
2730 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002731 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002732 dynamic_array[ni.number - 1] = 543;
2733
2734 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002735 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2736 || dynamic_array[ni.number - 1] != 543);
2737'
2738
2739# Test code for whether the C compiler supports C11 (global declarations)
2740ac_c_conftest_c11_globals='
2741// Does the compiler advertise C11 conformance?
2742#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2743# error "Compiler does not advertise C11 conformance"
2744#endif
2745
2746// Check _Alignas.
2747char _Alignas (double) aligned_as_double;
2748char _Alignas (0) no_special_alignment;
2749extern char aligned_as_int;
2750char _Alignas (0) _Alignas (int) aligned_as_int;
2751
2752// Check _Alignof.
2753enum
2754{
2755 int_alignment = _Alignof (int),
2756 int_array_alignment = _Alignof (int[100]),
2757 char_alignment = _Alignof (char)
2758};
2759_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2760
2761// Check _Noreturn.
2762int _Noreturn does_not_return (void) { for (;;) continue; }
2763
2764// Check _Static_assert.
2765struct test_static_assert
2766{
2767 int x;
2768 _Static_assert (sizeof (int) <= sizeof (long int),
2769 "_Static_assert does not work in struct");
2770 long int y;
2771};
2772
2773// Check UTF-8 literals.
2774#define u8 syntax error!
2775char const utf8_literal[] = u8"happens to be ASCII" "another string";
2776
2777// Check duplicate typedefs.
2778typedef long *long_ptr;
2779typedef long int *long_ptr;
2780typedef long_ptr long_ptr;
2781
2782// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2783struct anonymous
2784{
2785 union {
2786 struct { int i; int j; };
2787 struct { int k; long int l; } w;
2788 };
2789 int m;
2790} v1;
2791'
2792
2793# Test code for whether the C compiler supports C11 (body of main).
2794ac_c_conftest_c11_main='
2795 _Static_assert ((offsetof (struct anonymous, i)
2796 == offsetof (struct anonymous, w.k)),
2797 "Anonymous union alignment botch");
2798 v1.i = 2;
2799 v1.w.k = 5;
2800 ok |= v1.i != 5;
2801'
2802
2803# Test code for whether the C compiler supports C11 (complete).
2804ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2805${ac_c_conftest_c99_globals}
2806${ac_c_conftest_c11_globals}
2807
2808int
2809main (int argc, char **argv)
2810{
2811 int ok = 0;
2812 ${ac_c_conftest_c89_main}
2813 ${ac_c_conftest_c99_main}
2814 ${ac_c_conftest_c11_main}
2815 return ok;
2816}
2817"
2818
2819# Test code for whether the C compiler supports C99 (complete).
2820ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2821${ac_c_conftest_c99_globals}
2822
2823int
2824main (int argc, char **argv)
2825{
2826 int ok = 0;
2827 ${ac_c_conftest_c89_main}
2828 ${ac_c_conftest_c99_main}
2829 return ok;
2830}
2831"
2832
2833# Test code for whether the C compiler supports C89 (complete).
2834ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2835
2836int
2837main (int argc, char **argv)
2838{
2839 int ok = 0;
2840 ${ac_c_conftest_c89_main}
2841 return ok;
2842}
2843"
2844
2845as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2846as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2847as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2848as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2849as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2850as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2851as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2852as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2853as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2854as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2855as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2856as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2857# Check that the precious variables saved in the cache have kept the same
2858# value.
2859ac_cache_corrupted=false
2860for ac_var in $ac_precious_vars; do
2861 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2862 eval ac_new_set=\$ac_env_${ac_var}_set
2863 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2864 eval ac_new_val=\$ac_env_${ac_var}_value
2865 case $ac_old_set,$ac_new_set in
2866 set,)
2867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2868printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2869 ac_cache_corrupted=: ;;
2870 ,set)
2871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2872printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2873 ac_cache_corrupted=: ;;
2874 ,);;
2875 *)
2876 if test "x$ac_old_val" != "x$ac_new_val"; then
2877 # differences in whitespace do not lead to failure.
2878 ac_old_val_w=`echo x $ac_old_val`
2879 ac_new_val_w=`echo x $ac_new_val`
2880 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2882printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2883 ac_cache_corrupted=:
2884 else
2885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2886printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2887 eval $ac_var=\$ac_old_val
2888 fi
2889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2890printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2892printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2893 fi;;
2894 esac
2895 # Pass precious variables to config.status.
2896 if test "$ac_new_set" = set; then
2897 case $ac_new_val in
2898 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2899 *) ac_arg=$ac_var=$ac_new_val ;;
2900 esac
2901 case " $ac_configure_args " in
2902 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2903 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2904 esac
2905 fi
2906done
2907if $ac_cache_corrupted; then
2908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2909printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2911printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2912 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2913 and start over" "$LINENO" 5
2914fi
2915## -------------------- ##
2916## Main body of script. ##
2917## -------------------- ##
2918
2919ac_ext=c
2920ac_cpp='$CPP $CPPFLAGS'
2921ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2922ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2923ac_compiler_gnu=$ac_cv_c_compiler_gnu
2924
2925
2926
2927ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2928
2929
2930printf "%s\n" "#define UNIX 1" >>confdefs.h
2931
2932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2933printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2934set x ${MAKE-make}
2935ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2936if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2937then :
2938 printf %s "(cached) " >&6
2939else $as_nop
2940 cat >conftest.make <<\_ACEOF
2941SHELL = /bin/sh
2942all:
2943 @echo '@@@%%%=$(MAKE)=@@@%%%'
2944_ACEOF
2945# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2946case `${MAKE-make} -f conftest.make 2>/dev/null` in
2947 *@@@%%%=?*=@@@%%%*)
2948 eval ac_cv_prog_make_${ac_make}_set=yes;;
2949 *)
2950 eval ac_cv_prog_make_${ac_make}_set=no;;
2951esac
2952rm -f conftest.make
2953fi
2954if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2956printf "%s\n" "yes" >&6; }
2957 SET_MAKE=
2958else
2959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2960printf "%s\n" "no" >&6; }
2961 SET_MAKE="MAKE=${MAKE-make}"
2962fi
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974ac_ext=c
2975ac_cpp='$CPP $CPPFLAGS'
2976ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2977ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2978ac_compiler_gnu=$ac_cv_c_compiler_gnu
2979if test -n "$ac_tool_prefix"; then
2980 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2981set dummy ${ac_tool_prefix}gcc; ac_word=$2
2982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2983printf %s "checking for $ac_word... " >&6; }
2984if test ${ac_cv_prog_CC+y}
2985then :
2986 printf %s "(cached) " >&6
2987else $as_nop
2988 if test -n "$CC"; then
2989 ac_cv_prog_CC="$CC" # Let the user override the test.
2990else
2991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2992for as_dir in $PATH
2993do
2994 IFS=$as_save_IFS
2995 case $as_dir in #(((
2996 '') as_dir=./ ;;
2997 */) ;;
2998 *) as_dir=$as_dir/ ;;
2999 esac
3000 for ac_exec_ext in '' $ac_executable_extensions; do
3001 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3002 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3003 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3004 break 2
3005 fi
3006done
3007 done
3008IFS=$as_save_IFS
3009
3010fi
3011fi
3012CC=$ac_cv_prog_CC
3013if test -n "$CC"; then
3014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3015printf "%s\n" "$CC" >&6; }
3016else
3017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018printf "%s\n" "no" >&6; }
3019fi
3020
3021
3022fi
3023if test -z "$ac_cv_prog_CC"; then
3024 ac_ct_CC=$CC
3025 # Extract the first word of "gcc", so it can be a program name with args.
3026set dummy gcc; ac_word=$2
3027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3028printf %s "checking for $ac_word... " >&6; }
3029if test ${ac_cv_prog_ac_ct_CC+y}
3030then :
3031 printf %s "(cached) " >&6
3032else $as_nop
3033 if test -n "$ac_ct_CC"; then
3034 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3035else
3036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3037for as_dir in $PATH
3038do
3039 IFS=$as_save_IFS
3040 case $as_dir in #(((
3041 '') as_dir=./ ;;
3042 */) ;;
3043 *) as_dir=$as_dir/ ;;
3044 esac
3045 for ac_exec_ext in '' $ac_executable_extensions; do
3046 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3047 ac_cv_prog_ac_ct_CC="gcc"
3048 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3049 break 2
3050 fi
3051done
3052 done
3053IFS=$as_save_IFS
3054
3055fi
3056fi
3057ac_ct_CC=$ac_cv_prog_ac_ct_CC
3058if test -n "$ac_ct_CC"; then
3059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3060printf "%s\n" "$ac_ct_CC" >&6; }
3061else
3062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3063printf "%s\n" "no" >&6; }
3064fi
3065
3066 if test "x$ac_ct_CC" = x; then
3067 CC=""
3068 else
3069 case $cross_compiling:$ac_tool_warned in
3070yes:)
3071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3072printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3073ac_tool_warned=yes ;;
3074esac
3075 CC=$ac_ct_CC
3076 fi
3077else
3078 CC="$ac_cv_prog_CC"
3079fi
3080
3081if test -z "$CC"; then
3082 if test -n "$ac_tool_prefix"; then
3083 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3084set dummy ${ac_tool_prefix}cc; ac_word=$2
3085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3086printf %s "checking for $ac_word... " >&6; }
3087if test ${ac_cv_prog_CC+y}
3088then :
3089 printf %s "(cached) " >&6
3090else $as_nop
3091 if test -n "$CC"; then
3092 ac_cv_prog_CC="$CC" # Let the user override the test.
3093else
3094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3095for as_dir in $PATH
3096do
3097 IFS=$as_save_IFS
3098 case $as_dir in #(((
3099 '') as_dir=./ ;;
3100 */) ;;
3101 *) as_dir=$as_dir/ ;;
3102 esac
3103 for ac_exec_ext in '' $ac_executable_extensions; do
3104 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3105 ac_cv_prog_CC="${ac_tool_prefix}cc"
3106 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3107 break 2
3108 fi
3109done
3110 done
3111IFS=$as_save_IFS
3112
3113fi
3114fi
3115CC=$ac_cv_prog_CC
3116if test -n "$CC"; then
3117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3118printf "%s\n" "$CC" >&6; }
3119else
3120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3121printf "%s\n" "no" >&6; }
3122fi
3123
3124
3125 fi
3126fi
3127if test -z "$CC"; then
3128 # Extract the first word of "cc", so it can be a program name with args.
3129set dummy cc; ac_word=$2
3130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3131printf %s "checking for $ac_word... " >&6; }
3132if test ${ac_cv_prog_CC+y}
3133then :
3134 printf %s "(cached) " >&6
3135else $as_nop
3136 if test -n "$CC"; then
3137 ac_cv_prog_CC="$CC" # Let the user override the test.
3138else
3139 ac_prog_rejected=no
3140as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3141for as_dir in $PATH
3142do
3143 IFS=$as_save_IFS
3144 case $as_dir in #(((
3145 '') as_dir=./ ;;
3146 */) ;;
3147 *) as_dir=$as_dir/ ;;
3148 esac
3149 for ac_exec_ext in '' $ac_executable_extensions; do
3150 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3151 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3152 ac_prog_rejected=yes
3153 continue
3154 fi
3155 ac_cv_prog_CC="cc"
3156 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3157 break 2
3158 fi
3159done
3160 done
3161IFS=$as_save_IFS
3162
3163if test $ac_prog_rejected = yes; then
3164 # We found a bogon in the path, so make sure we never use it.
3165 set dummy $ac_cv_prog_CC
3166 shift
3167 if test $# != 0; then
3168 # We chose a different compiler from the bogus one.
3169 # However, it has the same basename, so the bogon will be chosen
3170 # first if we set CC to just the basename; use the full file name.
3171 shift
3172 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3173 fi
3174fi
3175fi
3176fi
3177CC=$ac_cv_prog_CC
3178if test -n "$CC"; then
3179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3180printf "%s\n" "$CC" >&6; }
3181else
3182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3183printf "%s\n" "no" >&6; }
3184fi
3185
3186
3187fi
3188if test -z "$CC"; then
3189 if test -n "$ac_tool_prefix"; then
3190 for ac_prog in cl.exe
3191 do
3192 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3193set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3195printf %s "checking for $ac_word... " >&6; }
3196if test ${ac_cv_prog_CC+y}
3197then :
3198 printf %s "(cached) " >&6
3199else $as_nop
3200 if test -n "$CC"; then
3201 ac_cv_prog_CC="$CC" # Let the user override the test.
3202else
3203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3204for as_dir in $PATH
3205do
3206 IFS=$as_save_IFS
3207 case $as_dir in #(((
3208 '') as_dir=./ ;;
3209 */) ;;
3210 *) as_dir=$as_dir/ ;;
3211 esac
3212 for ac_exec_ext in '' $ac_executable_extensions; do
3213 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3214 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3215 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3216 break 2
3217 fi
3218done
3219 done
3220IFS=$as_save_IFS
3221
3222fi
3223fi
3224CC=$ac_cv_prog_CC
3225if test -n "$CC"; then
3226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3227printf "%s\n" "$CC" >&6; }
3228else
3229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3230printf "%s\n" "no" >&6; }
3231fi
3232
3233
3234 test -n "$CC" && break
3235 done
3236fi
3237if test -z "$CC"; then
3238 ac_ct_CC=$CC
3239 for ac_prog in cl.exe
3240do
3241 # Extract the first word of "$ac_prog", so it can be a program name with args.
3242set dummy $ac_prog; ac_word=$2
3243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3244printf %s "checking for $ac_word... " >&6; }
3245if test ${ac_cv_prog_ac_ct_CC+y}
3246then :
3247 printf %s "(cached) " >&6
3248else $as_nop
3249 if test -n "$ac_ct_CC"; then
3250 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3251else
3252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3253for as_dir in $PATH
3254do
3255 IFS=$as_save_IFS
3256 case $as_dir in #(((
3257 '') as_dir=./ ;;
3258 */) ;;
3259 *) as_dir=$as_dir/ ;;
3260 esac
3261 for ac_exec_ext in '' $ac_executable_extensions; do
3262 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3263 ac_cv_prog_ac_ct_CC="$ac_prog"
3264 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3265 break 2
3266 fi
3267done
3268 done
3269IFS=$as_save_IFS
3270
3271fi
3272fi
3273ac_ct_CC=$ac_cv_prog_ac_ct_CC
3274if test -n "$ac_ct_CC"; then
3275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3276printf "%s\n" "$ac_ct_CC" >&6; }
3277else
3278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3279printf "%s\n" "no" >&6; }
3280fi
3281
3282
3283 test -n "$ac_ct_CC" && break
3284done
3285
3286 if test "x$ac_ct_CC" = x; then
3287 CC=""
3288 else
3289 case $cross_compiling:$ac_tool_warned in
3290yes:)
3291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3292printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3293ac_tool_warned=yes ;;
3294esac
3295 CC=$ac_ct_CC
3296 fi
3297fi
3298
3299fi
3300if test -z "$CC"; then
3301 if test -n "$ac_tool_prefix"; then
3302 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3303set dummy ${ac_tool_prefix}clang; ac_word=$2
3304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3305printf %s "checking for $ac_word... " >&6; }
3306if test ${ac_cv_prog_CC+y}
3307then :
3308 printf %s "(cached) " >&6
3309else $as_nop
3310 if test -n "$CC"; then
3311 ac_cv_prog_CC="$CC" # Let the user override the test.
3312else
3313as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3314for as_dir in $PATH
3315do
3316 IFS=$as_save_IFS
3317 case $as_dir in #(((
3318 '') as_dir=./ ;;
3319 */) ;;
3320 *) as_dir=$as_dir/ ;;
3321 esac
3322 for ac_exec_ext in '' $ac_executable_extensions; do
3323 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3324 ac_cv_prog_CC="${ac_tool_prefix}clang"
3325 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3326 break 2
3327 fi
3328done
3329 done
3330IFS=$as_save_IFS
3331
3332fi
3333fi
3334CC=$ac_cv_prog_CC
3335if test -n "$CC"; then
3336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3337printf "%s\n" "$CC" >&6; }
3338else
3339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3340printf "%s\n" "no" >&6; }
3341fi
3342
3343
3344fi
3345if test -z "$ac_cv_prog_CC"; then
3346 ac_ct_CC=$CC
3347 # Extract the first word of "clang", so it can be a program name with args.
3348set dummy clang; ac_word=$2
3349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3350printf %s "checking for $ac_word... " >&6; }
3351if test ${ac_cv_prog_ac_ct_CC+y}
3352then :
3353 printf %s "(cached) " >&6
3354else $as_nop
3355 if test -n "$ac_ct_CC"; then
3356 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3357else
3358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3359for as_dir in $PATH
3360do
3361 IFS=$as_save_IFS
3362 case $as_dir in #(((
3363 '') as_dir=./ ;;
3364 */) ;;
3365 *) as_dir=$as_dir/ ;;
3366 esac
3367 for ac_exec_ext in '' $ac_executable_extensions; do
3368 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3369 ac_cv_prog_ac_ct_CC="clang"
3370 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3371 break 2
3372 fi
3373done
3374 done
3375IFS=$as_save_IFS
3376
3377fi
3378fi
3379ac_ct_CC=$ac_cv_prog_ac_ct_CC
3380if test -n "$ac_ct_CC"; then
3381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3382printf "%s\n" "$ac_ct_CC" >&6; }
3383else
3384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3385printf "%s\n" "no" >&6; }
3386fi
3387
3388 if test "x$ac_ct_CC" = x; then
3389 CC=""
3390 else
3391 case $cross_compiling:$ac_tool_warned in
3392yes:)
3393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3394printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3395ac_tool_warned=yes ;;
3396esac
3397 CC=$ac_ct_CC
3398 fi
3399else
3400 CC="$ac_cv_prog_CC"
3401fi
3402
3403fi
3404
3405
3406test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3407printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3408as_fn_error $? "no acceptable C compiler found in \$PATH
3409See \`config.log' for more details" "$LINENO" 5; }
3410
3411# Provide some information about the compiler.
3412printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3413set X $ac_compile
3414ac_compiler=$2
3415for ac_option in --version -v -V -qversion -version; do
3416 { { ac_try="$ac_compiler $ac_option >&5"
3417case "(($ac_try" in
3418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3419 *) ac_try_echo=$ac_try;;
3420esac
3421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3422printf "%s\n" "$ac_try_echo"; } >&5
3423 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3424 ac_status=$?
3425 if test -s conftest.err; then
3426 sed '10a\
3427... rest of stderr output deleted ...
3428 10q' conftest.err >conftest.er1
3429 cat conftest.er1 >&5
3430 fi
3431 rm -f conftest.er1 conftest.err
3432 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3433 test $ac_status = 0; }
3434done
3435
3436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3437/* end confdefs.h. */
3438
3439int
3440main (void)
3441{
Bram Moolenaar22640082018-04-19 20:39:41 +02003442
Bram Moolenaar2e324952018-04-14 14:37:07 +02003443 ;
3444 return 0;
3445}
3446_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003447ac_clean_files_save=$ac_clean_files
3448ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3449# Try to create an executable without -o first, disregard a.out.
3450# It will help us diagnose broken compilers, and finding out an intuition
3451# of exeext.
3452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3453printf %s "checking whether the C compiler works... " >&6; }
3454ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3455
3456# The possible output files:
3457ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3458
3459ac_rmfiles=
3460for ac_file in $ac_files
3461do
3462 case $ac_file in
3463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3464 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3465 esac
3466done
3467rm -f $ac_rmfiles
3468
3469if { { ac_try="$ac_link_default"
3470case "(($ac_try" in
3471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3472 *) ac_try_echo=$ac_try;;
3473esac
3474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3475printf "%s\n" "$ac_try_echo"; } >&5
3476 (eval "$ac_link_default") 2>&5
3477 ac_status=$?
3478 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3479 test $ac_status = 0; }
3480then :
3481 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3482# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3483# in a Makefile. We should not override ac_cv_exeext if it was cached,
3484# so that the user can short-circuit this test for compilers unknown to
3485# Autoconf.
3486for ac_file in $ac_files ''
3487do
3488 test -f "$ac_file" || continue
3489 case $ac_file in
3490 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3491 ;;
3492 [ab].out )
3493 # We found the default executable, but exeext='' is most
3494 # certainly right.
3495 break;;
3496 *.* )
3497 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3498 then :; else
3499 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3500 fi
3501 # We set ac_cv_exeext here because the later test for it is not
3502 # safe: cross compilers may not add the suffix if given an `-o'
3503 # argument, so we may need to know it at that point already.
3504 # Even if this section looks crufty: it has the advantage of
3505 # actually working.
3506 break;;
3507 * )
3508 break;;
3509 esac
3510done
3511test "$ac_cv_exeext" = no && ac_cv_exeext=
3512
3513else $as_nop
3514 ac_file=''
3515fi
3516if test -z "$ac_file"
3517then :
3518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3519printf "%s\n" "no" >&6; }
3520printf "%s\n" "$as_me: failed program was:" >&5
3521sed 's/^/| /' conftest.$ac_ext >&5
3522
3523{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3524printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3525as_fn_error 77 "C compiler cannot create executables
3526See \`config.log' for more details" "$LINENO" 5; }
3527else $as_nop
3528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3529printf "%s\n" "yes" >&6; }
3530fi
3531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3532printf %s "checking for C compiler default output file name... " >&6; }
3533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3534printf "%s\n" "$ac_file" >&6; }
3535ac_exeext=$ac_cv_exeext
3536
3537rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3538ac_clean_files=$ac_clean_files_save
3539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3540printf %s "checking for suffix of executables... " >&6; }
3541if { { ac_try="$ac_link"
3542case "(($ac_try" in
3543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3544 *) ac_try_echo=$ac_try;;
3545esac
3546eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3547printf "%s\n" "$ac_try_echo"; } >&5
3548 (eval "$ac_link") 2>&5
3549 ac_status=$?
3550 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3551 test $ac_status = 0; }
3552then :
3553 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3554# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3555# work properly (i.e., refer to `conftest.exe'), while it won't with
3556# `rm'.
3557for ac_file in conftest.exe conftest conftest.*; do
3558 test -f "$ac_file" || continue
3559 case $ac_file in
3560 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3561 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3562 break;;
3563 * ) break;;
3564 esac
3565done
3566else $as_nop
3567 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3568printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3569as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3570See \`config.log' for more details" "$LINENO" 5; }
3571fi
3572rm -f conftest conftest$ac_cv_exeext
3573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3574printf "%s\n" "$ac_cv_exeext" >&6; }
3575
3576rm -f conftest.$ac_ext
3577EXEEXT=$ac_cv_exeext
3578ac_exeext=$EXEEXT
3579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3580/* end confdefs.h. */
3581#include <stdio.h>
3582int
3583main (void)
3584{
3585FILE *f = fopen ("conftest.out", "w");
3586 return ferror (f) || fclose (f) != 0;
3587
3588 ;
3589 return 0;
3590}
3591_ACEOF
3592ac_clean_files="$ac_clean_files conftest.out"
3593# Check that the compiler produces executables we can run. If not, either
3594# the compiler is broken, or we cross compile.
3595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3596printf %s "checking whether we are cross compiling... " >&6; }
3597if test "$cross_compiling" != yes; then
3598 { { ac_try="$ac_link"
3599case "(($ac_try" in
3600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3601 *) ac_try_echo=$ac_try;;
3602esac
3603eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3604printf "%s\n" "$ac_try_echo"; } >&5
3605 (eval "$ac_link") 2>&5
3606 ac_status=$?
3607 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3608 test $ac_status = 0; }
3609 if { ac_try='./conftest$ac_cv_exeext'
3610 { { case "(($ac_try" in
3611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3612 *) ac_try_echo=$ac_try;;
3613esac
3614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3615printf "%s\n" "$ac_try_echo"; } >&5
3616 (eval "$ac_try") 2>&5
3617 ac_status=$?
3618 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3619 test $ac_status = 0; }; }; then
3620 cross_compiling=no
3621 else
3622 if test "$cross_compiling" = maybe; then
3623 cross_compiling=yes
3624 else
3625 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3626printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3627as_fn_error 77 "cannot run C compiled programs.
3628If you meant to cross compile, use \`--host'.
3629See \`config.log' for more details" "$LINENO" 5; }
3630 fi
3631 fi
3632fi
3633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3634printf "%s\n" "$cross_compiling" >&6; }
3635
3636rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3637ac_clean_files=$ac_clean_files_save
3638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3639printf %s "checking for suffix of object files... " >&6; }
3640if test ${ac_cv_objext+y}
3641then :
3642 printf %s "(cached) " >&6
3643else $as_nop
3644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3645/* end confdefs.h. */
3646
3647int
3648main (void)
3649{
3650
3651 ;
3652 return 0;
3653}
3654_ACEOF
3655rm -f conftest.o conftest.obj
3656if { { ac_try="$ac_compile"
3657case "(($ac_try" in
3658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659 *) ac_try_echo=$ac_try;;
3660esac
3661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3662printf "%s\n" "$ac_try_echo"; } >&5
3663 (eval "$ac_compile") 2>&5
3664 ac_status=$?
3665 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3666 test $ac_status = 0; }
3667then :
3668 for ac_file in conftest.o conftest.obj conftest.*; do
3669 test -f "$ac_file" || continue;
3670 case $ac_file in
3671 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3672 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3673 break;;
3674 esac
3675done
3676else $as_nop
3677 printf "%s\n" "$as_me: failed program was:" >&5
3678sed 's/^/| /' conftest.$ac_ext >&5
3679
3680{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3681printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3682as_fn_error $? "cannot compute suffix of object files: cannot compile
3683See \`config.log' for more details" "$LINENO" 5; }
3684fi
3685rm -f conftest.$ac_cv_objext conftest.$ac_ext
3686fi
3687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3688printf "%s\n" "$ac_cv_objext" >&6; }
3689OBJEXT=$ac_cv_objext
3690ac_objext=$OBJEXT
3691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3692printf %s "checking whether the compiler supports GNU C... " >&6; }
3693if test ${ac_cv_c_compiler_gnu+y}
3694then :
3695 printf %s "(cached) " >&6
3696else $as_nop
3697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3698/* end confdefs.h. */
3699
3700int
3701main (void)
3702{
3703#ifndef __GNUC__
3704 choke me
3705#endif
3706
3707 ;
3708 return 0;
3709}
3710_ACEOF
3711if ac_fn_c_try_compile "$LINENO"
3712then :
3713 ac_compiler_gnu=yes
3714else $as_nop
3715 ac_compiler_gnu=no
3716fi
3717rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3718ac_cv_c_compiler_gnu=$ac_compiler_gnu
3719
3720fi
3721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3722printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3723ac_compiler_gnu=$ac_cv_c_compiler_gnu
3724
3725if test $ac_compiler_gnu = yes; then
3726 GCC=yes
3727else
3728 GCC=
3729fi
3730ac_test_CFLAGS=${CFLAGS+y}
3731ac_save_CFLAGS=$CFLAGS
3732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3733printf %s "checking whether $CC accepts -g... " >&6; }
3734if test ${ac_cv_prog_cc_g+y}
3735then :
3736 printf %s "(cached) " >&6
3737else $as_nop
3738 ac_save_c_werror_flag=$ac_c_werror_flag
3739 ac_c_werror_flag=yes
3740 ac_cv_prog_cc_g=no
3741 CFLAGS="-g"
3742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3743/* end confdefs.h. */
3744
3745int
3746main (void)
3747{
3748
3749 ;
3750 return 0;
3751}
3752_ACEOF
3753if ac_fn_c_try_compile "$LINENO"
3754then :
3755 ac_cv_prog_cc_g=yes
3756else $as_nop
3757 CFLAGS=""
3758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3759/* end confdefs.h. */
3760
3761int
3762main (void)
3763{
3764
3765 ;
3766 return 0;
3767}
3768_ACEOF
3769if ac_fn_c_try_compile "$LINENO"
3770then :
3771
3772else $as_nop
3773 ac_c_werror_flag=$ac_save_c_werror_flag
3774 CFLAGS="-g"
3775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3776/* end confdefs.h. */
3777
3778int
3779main (void)
3780{
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786if ac_fn_c_try_compile "$LINENO"
3787then :
3788 ac_cv_prog_cc_g=yes
3789fi
3790rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3791fi
3792rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3793fi
3794rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3795 ac_c_werror_flag=$ac_save_c_werror_flag
3796fi
3797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3798printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3799if test $ac_test_CFLAGS; then
3800 CFLAGS=$ac_save_CFLAGS
3801elif test $ac_cv_prog_cc_g = yes; then
3802 if test "$GCC" = yes; then
3803 CFLAGS="-g -O2"
3804 else
3805 CFLAGS="-g"
3806 fi
3807else
3808 if test "$GCC" = yes; then
3809 CFLAGS="-O2"
3810 else
3811 CFLAGS=
3812 fi
3813fi
3814ac_prog_cc_stdc=no
3815if test x$ac_prog_cc_stdc = xno
3816then :
3817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3818printf %s "checking for $CC option to enable C11 features... " >&6; }
3819if test ${ac_cv_prog_cc_c11+y}
3820then :
3821 printf %s "(cached) " >&6
3822else $as_nop
3823 ac_cv_prog_cc_c11=no
3824ac_save_CC=$CC
3825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3826/* end confdefs.h. */
3827$ac_c_conftest_c11_program
3828_ACEOF
3829for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003830do
3831 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003832 if ac_fn_c_try_compile "$LINENO"
3833then :
3834 ac_cv_prog_cc_c11=$ac_arg
3835fi
3836rm -f core conftest.err conftest.$ac_objext conftest.beam
3837 test "x$ac_cv_prog_cc_c11" != "xno" && break
3838done
3839rm -f conftest.$ac_ext
3840CC=$ac_save_CC
3841fi
3842
3843if test "x$ac_cv_prog_cc_c11" = xno
3844then :
3845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3846printf "%s\n" "unsupported" >&6; }
3847else $as_nop
3848 if test "x$ac_cv_prog_cc_c11" = x
3849then :
3850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3851printf "%s\n" "none needed" >&6; }
3852else $as_nop
3853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3854printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3855 CC="$CC $ac_cv_prog_cc_c11"
3856fi
3857 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3858 ac_prog_cc_stdc=c11
3859fi
3860fi
3861if test x$ac_prog_cc_stdc = xno
3862then :
3863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3864printf %s "checking for $CC option to enable C99 features... " >&6; }
3865if test ${ac_cv_prog_cc_c99+y}
3866then :
3867 printf %s "(cached) " >&6
3868else $as_nop
3869 ac_cv_prog_cc_c99=no
3870ac_save_CC=$CC
3871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3872/* end confdefs.h. */
3873$ac_c_conftest_c99_program
3874_ACEOF
3875for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3876do
3877 CC="$ac_save_CC $ac_arg"
3878 if ac_fn_c_try_compile "$LINENO"
3879then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003880 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003881fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003882rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003883 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003884done
3885rm -f conftest.$ac_ext
3886CC=$ac_save_CC
Bram Moolenaar2e324952018-04-14 14:37:07 +02003887fi
3888
Illia Bobyra96d5442023-08-30 16:30:15 +02003889if test "x$ac_cv_prog_cc_c99" = xno
3890then :
3891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3892printf "%s\n" "unsupported" >&6; }
3893else $as_nop
3894 if test "x$ac_cv_prog_cc_c99" = x
3895then :
3896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3897printf "%s\n" "none needed" >&6; }
3898else $as_nop
3899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3900printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3901 CC="$CC $ac_cv_prog_cc_c99"
3902fi
3903 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3904 ac_prog_cc_stdc=c99
3905fi
3906fi
3907if test x$ac_prog_cc_stdc = xno
3908then :
3909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3910printf %s "checking for $CC option to enable C89 features... " >&6; }
3911if test ${ac_cv_prog_cc_c89+y}
3912then :
3913 printf %s "(cached) " >&6
3914else $as_nop
3915 ac_cv_prog_cc_c89=no
3916ac_save_CC=$CC
3917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3918/* end confdefs.h. */
3919$ac_c_conftest_c89_program
3920_ACEOF
3921for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3922do
3923 CC="$ac_save_CC $ac_arg"
3924 if ac_fn_c_try_compile "$LINENO"
3925then :
3926 ac_cv_prog_cc_c89=$ac_arg
3927fi
3928rm -f core conftest.err conftest.$ac_objext conftest.beam
3929 test "x$ac_cv_prog_cc_c89" != "xno" && break
3930done
3931rm -f conftest.$ac_ext
3932CC=$ac_save_CC
3933fi
3934
3935if test "x$ac_cv_prog_cc_c89" = xno
3936then :
3937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3938printf "%s\n" "unsupported" >&6; }
3939else $as_nop
3940 if test "x$ac_cv_prog_cc_c89" = x
3941then :
3942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3943printf "%s\n" "none needed" >&6; }
3944else $as_nop
3945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3946printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3947 CC="$CC $ac_cv_prog_cc_c89"
3948fi
3949 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3950 ac_prog_cc_stdc=c89
3951fi
3952fi
3953
3954ac_ext=c
3955ac_cpp='$CPP $CPPFLAGS'
3956ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3957ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3958ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02003959 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003960ac_cpp='$CPP $CPPFLAGS'
3961ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3962ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3963ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02003964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3965printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00003966# On Suns, sometimes $CPP names a directory.
3967if test -n "$CPP" && test -d "$CPP"; then
3968 CPP=
3969fi
3970if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003971 if test ${ac_cv_prog_CPP+y}
3972then :
3973 printf %s "(cached) " >&6
3974else $as_nop
3975 # Double quotes because $CC needs to be expanded
3976 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003977 do
3978 ac_preproc_ok=false
3979for ac_c_preproc_warn_flag in '' yes
3980do
3981 # Use a header file that comes with gcc, so configuring glibc
3982 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003983 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003984 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003986/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02003987#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003988 Syntax error
3989_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003990if ac_fn_c_try_cpp "$LINENO"
3991then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003992
Illia Bobyra96d5442023-08-30 16:30:15 +02003993else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003994 # Broken: fails on valid input.
3995continue
3996fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01003997rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003998
Bram Moolenaar446cb832008-06-24 21:56:24 +00003999 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004000 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004002/* end confdefs.h. */
4003#include <ac_nonexistent.h>
4004_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004005if ac_fn_c_try_cpp "$LINENO"
4006then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004007 # Broken: success on invalid input.
4008continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004009else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004010 # Passes both tests.
4011ac_preproc_ok=:
4012break
4013fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004014rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004015
4016done
4017# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004018rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004019if $ac_preproc_ok
4020then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004021 break
4022fi
4023
4024 done
4025 ac_cv_prog_CPP=$CPP
4026
4027fi
4028 CPP=$ac_cv_prog_CPP
4029else
4030 ac_cv_prog_CPP=$CPP
4031fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004032{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4033printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004034ac_preproc_ok=false
4035for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004036do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004037 # Use a header file that comes with gcc, so configuring glibc
4038 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004039 # On the NeXT, cc -E runs the code through the compiler's parser,
4040 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004042/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004043#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004044 Syntax error
4045_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004046if ac_fn_c_try_cpp "$LINENO"
4047then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004048
Illia Bobyra96d5442023-08-30 16:30:15 +02004049else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004050 # Broken: fails on valid input.
4051continue
4052fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004053rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004054
Bram Moolenaar446cb832008-06-24 21:56:24 +00004055 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004056 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004058/* end confdefs.h. */
4059#include <ac_nonexistent.h>
4060_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004061if ac_fn_c_try_cpp "$LINENO"
4062then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004063 # Broken: success on invalid input.
4064continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004065else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004066 # Passes both tests.
4067ac_preproc_ok=:
4068break
4069fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004070rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004071
4072done
4073# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004074rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004075if $ac_preproc_ok
4076then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004077
Illia Bobyra96d5442023-08-30 16:30:15 +02004078else $as_nop
4079 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4080printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004081as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4082See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004083fi
4084
4085ac_ext=c
4086ac_cpp='$CPP $CPPFLAGS'
4087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4089ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4091printf %s "checking for grep that handles long lines and -e... " >&6; }
4092if test ${ac_cv_path_GREP+y}
4093then :
4094 printf %s "(cached) " >&6
4095else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004096 if test -z "$GREP"; then
4097 ac_path_GREP_found=false
4098 # Loop through the user's path and test for each of PROGNAME-LIST
4099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4100for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4101do
4102 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004103 case $as_dir in #(((
4104 '') as_dir=./ ;;
4105 */) ;;
4106 *) as_dir=$as_dir/ ;;
4107 esac
4108 for ac_prog in grep ggrep
4109 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004110 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004111 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004112 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004113# Check for GNU ac_path_GREP and select it if it is found.
4114 # Check for GNU $ac_path_GREP
4115case `"$ac_path_GREP" --version 2>&1` in
4116*GNU*)
4117 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4118*)
4119 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004120 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004121 while :
4122 do
4123 cat "conftest.in" "conftest.in" >"conftest.tmp"
4124 mv "conftest.tmp" "conftest.in"
4125 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004126 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004127 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4128 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004129 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004130 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4131 # Best one so far, save it but keep looking for a better one
4132 ac_cv_path_GREP="$ac_path_GREP"
4133 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004134 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004135 # 10*(2^10) chars as input seems more than enough
4136 test $ac_count -gt 10 && break
4137 done
4138 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4139esac
4140
4141 $ac_path_GREP_found && break 3
4142 done
4143 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004144 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004145IFS=$as_save_IFS
4146 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004147 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +00004148 fi
4149else
4150 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004151fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004152
4153fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4155printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004156 GREP="$ac_cv_path_GREP"
4157
4158
Illia Bobyra96d5442023-08-30 16:30:15 +02004159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4160printf %s "checking for egrep... " >&6; }
4161if test ${ac_cv_path_EGREP+y}
4162then :
4163 printf %s "(cached) " >&6
4164else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004165 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4166 then ac_cv_path_EGREP="$GREP -E"
4167 else
4168 if test -z "$EGREP"; then
4169 ac_path_EGREP_found=false
4170 # Loop through the user's path and test for each of PROGNAME-LIST
4171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4172for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4173do
4174 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004175 case $as_dir in #(((
4176 '') as_dir=./ ;;
4177 */) ;;
4178 *) as_dir=$as_dir/ ;;
4179 esac
4180 for ac_prog in egrep
4181 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004182 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004183 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004184 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004185# Check for GNU ac_path_EGREP and select it if it is found.
4186 # Check for GNU $ac_path_EGREP
4187case `"$ac_path_EGREP" --version 2>&1` in
4188*GNU*)
4189 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4190*)
4191 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004192 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004193 while :
4194 do
4195 cat "conftest.in" "conftest.in" >"conftest.tmp"
4196 mv "conftest.tmp" "conftest.in"
4197 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004198 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004199 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4200 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004201 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004202 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4203 # Best one so far, save it but keep looking for a better one
4204 ac_cv_path_EGREP="$ac_path_EGREP"
4205 ac_path_EGREP_max=$ac_count
4206 fi
4207 # 10*(2^10) chars as input seems more than enough
4208 test $ac_count -gt 10 && break
4209 done
4210 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4211esac
4212
4213 $ac_path_EGREP_found && break 3
4214 done
4215 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004216 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004217IFS=$as_save_IFS
4218 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004219 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +00004220 fi
4221else
4222 ac_cv_path_EGREP=$EGREP
4223fi
4224
4225 fi
4226fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4228printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004229 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004230
Illia Bobyra96d5442023-08-30 16:30:15 +02004231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4232printf %s "checking for fgrep... " >&6; }
4233if test ${ac_cv_path_FGREP+y}
4234then :
4235 printf %s "(cached) " >&6
4236else $as_nop
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004237 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4238 then ac_cv_path_FGREP="$GREP -F"
4239 else
4240 if test -z "$FGREP"; then
4241 ac_path_FGREP_found=false
4242 # Loop through the user's path and test for each of PROGNAME-LIST
4243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4244for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4245do
4246 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004247 case $as_dir in #(((
4248 '') as_dir=./ ;;
4249 */) ;;
4250 *) as_dir=$as_dir/ ;;
4251 esac
4252 for ac_prog in fgrep
4253 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004254 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004255 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004256 as_fn_executable_p "$ac_path_FGREP" || continue
4257# Check for GNU ac_path_FGREP and select it if it is found.
4258 # Check for GNU $ac_path_FGREP
4259case `"$ac_path_FGREP" --version 2>&1` in
4260*GNU*)
4261 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4262*)
4263 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004264 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004265 while :
4266 do
4267 cat "conftest.in" "conftest.in" >"conftest.tmp"
4268 mv "conftest.tmp" "conftest.in"
4269 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004270 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004271 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4272 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4273 as_fn_arith $ac_count + 1 && ac_count=$as_val
4274 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4275 # Best one so far, save it but keep looking for a better one
4276 ac_cv_path_FGREP="$ac_path_FGREP"
4277 ac_path_FGREP_max=$ac_count
4278 fi
4279 # 10*(2^10) chars as input seems more than enough
4280 test $ac_count -gt 10 && break
4281 done
4282 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4283esac
4284
4285 $ac_path_FGREP_found && break 3
4286 done
4287 done
4288 done
4289IFS=$as_save_IFS
4290 if test -z "$ac_cv_path_FGREP"; then
4291 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4292 fi
4293else
4294 ac_cv_path_FGREP=$FGREP
4295fi
4296
4297 fi
4298fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4300printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004301 FGREP="$ac_cv_path_FGREP"
4302
Bram Moolenaarc0394412017-04-20 20:20:23 +02004303 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004304do
4305 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004306set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4308printf %s "checking for $ac_word... " >&6; }
4309if test ${ac_cv_prog_AWK+y}
4310then :
4311 printf %s "(cached) " >&6
4312else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004313 if test -n "$AWK"; then
4314 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4315else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4317for as_dir in $PATH
4318do
4319 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004320 case $as_dir in #(((
4321 '') as_dir=./ ;;
4322 */) ;;
4323 *) as_dir=$as_dir/ ;;
4324 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004325 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004326 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004327 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004328 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004329 break 2
4330 fi
4331done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004332 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004333IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004334
Bram Moolenaar071d4272004-06-13 20:20:40 +00004335fi
4336fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004337AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004338if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4340printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004341else
Illia Bobyra96d5442023-08-30 16:30:15 +02004342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4343printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004344fi
4345
Bram Moolenaar446cb832008-06-24 21:56:24 +00004346
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004347 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004348done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004349
Bram Moolenaar071d4272004-06-13 20:20:40 +00004350# Extract the first word of "strip", so it can be a program name with args.
4351set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4353printf %s "checking for $ac_word... " >&6; }
4354if test ${ac_cv_prog_STRIP+y}
4355then :
4356 printf %s "(cached) " >&6
4357else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004358 if test -n "$STRIP"; then
4359 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4360else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362for as_dir in $PATH
4363do
4364 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004365 case $as_dir in #(((
4366 '') as_dir=./ ;;
4367 */) ;;
4368 *) as_dir=$as_dir/ ;;
4369 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004370 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004371 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004372 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004373 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004374 break 2
4375 fi
4376done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004377 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004378IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004379
Bram Moolenaar071d4272004-06-13 20:20:40 +00004380 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4381fi
4382fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004383STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004384if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4386printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004387else
Illia Bobyra96d5442023-08-30 16:30:15 +02004388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4389printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004390fi
4391
4392
Bram Moolenaar071d4272004-06-13 20:20:40 +00004393
4394
Bram Moolenaar071d4272004-06-13 20:20:40 +00004395
Illia Bobyrf39842f2023-08-27 18:21:23 +02004396
Illia Bobyra96d5442023-08-30 16:30:15 +02004397{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4398printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4399if test ${ac_cv_header_sys_wait_h+y}
4400then :
4401 printf %s "(cached) " >&6
4402else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004404/* end confdefs.h. */
4405#include <sys/types.h>
4406#include <sys/wait.h>
4407#ifndef WEXITSTATUS
4408# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4409#endif
4410#ifndef WIFEXITED
4411# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4412#endif
4413
4414int
Illia Bobyra96d5442023-08-30 16:30:15 +02004415main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004416{
4417 int s;
4418 wait (&s);
4419 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4420 ;
4421 return 0;
4422}
4423_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004424if ac_fn_c_try_compile "$LINENO"
4425then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004426 ac_cv_header_sys_wait_h=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004427else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004428 ac_cv_header_sys_wait_h=no
Bram Moolenaar446cb832008-06-24 21:56:24 +00004429fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004430rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004431fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4433printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004434if test $ac_cv_header_sys_wait_h = yes; then
4435
Illia Bobyra96d5442023-08-30 16:30:15 +02004436printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004437
4438fi
4439
4440
Bram Moolenaar22640082018-04-19 20:39:41 +02004441if test x"$ac_cv_prog_cc_c99" != xno; then
4442
4443
Illia Bobyra96d5442023-08-30 16:30:15 +02004444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4445printf %s "checking for unsigned long long int... " >&6; }
4446if test ${ac_cv_type_unsigned_long_long_int+y}
4447then :
4448 printf %s "(cached) " >&6
4449else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004450 ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004451 case $ac_prog_cc_stdc in
4452 no | c89) ;;
4453 *)
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004455/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004456
4457 /* For now, do not test the preprocessor; as of 2007 there are too many
4458 implementations with broken preprocessors. Perhaps this can
4459 be revisited in 2012. In the meantime, code should not expect
4460 #if to work with literals wider than 32 bits. */
4461 /* Test literals. */
4462 long long int ll = 9223372036854775807ll;
4463 long long int nll = -9223372036854775807LL;
4464 unsigned long long int ull = 18446744073709551615ULL;
4465 /* Test constant expressions. */
4466 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4467 ? 1 : -1)];
4468 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4469 ? 1 : -1)];
4470 int i = 63;
4471int
Illia Bobyra96d5442023-08-30 16:30:15 +02004472main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004473{
4474/* Test availability of runtime routines for shift and division. */
4475 long long int llmax = 9223372036854775807ll;
4476 unsigned long long int ullmax = 18446744073709551615ull;
4477 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4478 | (llmax / ll) | (llmax % ll)
4479 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4480 | (ullmax / ull) | (ullmax % ull));
4481 ;
4482 return 0;
4483}
4484
4485_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004486if ac_fn_c_try_link "$LINENO"
4487then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004488
Illia Bobyra96d5442023-08-30 16:30:15 +02004489else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004490 ac_cv_type_unsigned_long_long_int=no
4491fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004492rm -f core conftest.err conftest.$ac_objext conftest.beam \
4493 conftest$ac_exeext conftest.$ac_ext;;
4494 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004495fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4497printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004498 if test $ac_cv_type_unsigned_long_long_int = yes; then
4499
Illia Bobyra96d5442023-08-30 16:30:15 +02004500printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004501
4502 fi
4503
4504
4505
Illia Bobyra96d5442023-08-30 16:30:15 +02004506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4507printf %s "checking for long long int... " >&6; }
4508if test ${ac_cv_type_long_long_int+y}
4509then :
4510 printf %s "(cached) " >&6
4511else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004512 ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004513 case $ac_prog_cc_stdc in
4514 no | c89) ;;
4515 *)
4516 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4517 if test $ac_cv_type_long_long_int = yes; then
4518 if test "$cross_compiling" = yes
4519then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004520 :
Illia Bobyra96d5442023-08-30 16:30:15 +02004521else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4523/* end confdefs.h. */
4524#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004525 #ifndef LLONG_MAX
4526 # define HALF \
4527 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4528 # define LLONG_MAX (HALF - 1 + HALF)
4529 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004530int
Illia Bobyra96d5442023-08-30 16:30:15 +02004531main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004532{
4533long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004534 int i;
4535 for (i = 0; ; i++)
4536 {
4537 long long int m = n << i;
4538 if (m >> i != n)
4539 return 1;
4540 if (LLONG_MAX / 2 < m)
4541 break;
4542 }
4543 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004544 ;
4545 return 0;
4546}
4547_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004548if ac_fn_c_try_run "$LINENO"
4549then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004550
Illia Bobyra96d5442023-08-30 16:30:15 +02004551else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004552 ac_cv_type_long_long_int=no
4553fi
4554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4555 conftest.$ac_objext conftest.beam conftest.$ac_ext
4556fi
4557
Illia Bobyra96d5442023-08-30 16:30:15 +02004558 fi;;
4559 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004560fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4562printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004563 if test $ac_cv_type_long_long_int = yes; then
4564
Illia Bobyra96d5442023-08-30 16:30:15 +02004565printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004566
4567 fi
4568
4569 if test "$ac_cv_type_long_long_int" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004570 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4571printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004572as_fn_error $? "Compiler does not support long long int
4573See \`config.log' for more details" "$LINENO" 5; }
4574 fi
4575
Illia Bobyra96d5442023-08-30 16:30:15 +02004576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4577printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004578 trailing_commas=no
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580/* end confdefs.h. */
4581
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004582int
Illia Bobyra96d5442023-08-30 16:30:15 +02004583main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004584{
4585
Bram Moolenaar22640082018-04-19 20:39:41 +02004586 enum {
4587 one,
4588 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004589 ;
4590 return 0;
4591}
4592_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004593if ac_fn_c_try_compile "$LINENO"
4594then :
4595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4596printf "%s\n" "yes" >&6; }; trailing_commas=yes
4597else $as_nop
4598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4599printf "%s\n" "no" >&6; }
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004600fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004601rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004602 if test "$trailing_commas" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004603 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4604printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004605as_fn_error $? "Compiler does not support trailing comma in enum
4606See \`config.log' for more details" "$LINENO" 5; }
4607 fi
4608
Illia Bobyra96d5442023-08-30 16:30:15 +02004609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4610printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004611 slash_comments=no
4612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4613/* end confdefs.h. */
4614
4615int
Illia Bobyra96d5442023-08-30 16:30:15 +02004616main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004617{
4618// C++ comments?
4619 ;
4620 return 0;
4621}
4622_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004623if ac_fn_c_try_compile "$LINENO"
4624then :
4625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4626printf "%s\n" "yes" >&6; }; slash_comments=yes
4627else $as_nop
4628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4629printf "%s\n" "no" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004630fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004631rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004632 if test "$slash_comments" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004633 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4634printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004635as_fn_error $? "Compiler does not support C++ comments
4636See \`config.log' for more details" "$LINENO" 5; }
4637 fi
4638fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004639
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004640if test -n "$SOURCE_DATE_EPOCH"; then
4641 DATE_FMT="%b %d %Y %H:%M:%S"
4642 BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u "+$DATE_FMT")
Illia Bobyra96d5442023-08-30 16:30:15 +02004643 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004644
4645 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4646
4647fi
4648
Bram Moolenaarf788a062011-12-14 20:51:25 +01004649
Illia Bobyra96d5442023-08-30 16:30:15 +02004650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4651printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004652# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004653if test ${enable_fail_if_missing+y}
4654then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004655 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02004656else $as_nop
Bram Moolenaarf788a062011-12-14 20:51:25 +01004657 fail_if_missing="no"
4658fi
4659
Illia Bobyra96d5442023-08-30 16:30:15 +02004660{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4661printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004662
Bram Moolenaard2a05492018-07-27 22:35:15 +02004663with_x_arg="$with_x"
4664
Bram Moolenaar446cb832008-06-24 21:56:24 +00004665if test -z "$CFLAGS"; then
4666 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004667 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004668fi
Rose00d07e72023-05-06 18:07:14 +01004669
Bram Moolenaar446cb832008-06-24 21:56:24 +00004670if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004671 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004672 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004673 gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004674 fi
Rose00d07e72023-05-06 18:07:14 +01004675
4676 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004677 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4678 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4679 else
4680 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4681 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4682 CFLAGS="$CFLAGS -fno-strength-reduce"
4683 fi
4684 fi
4685fi
4686
Illia Bobyra96d5442023-08-30 16:30:15 +02004687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4688printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004689CLANG_VERSION_STRING=`$CC --version 2>/dev/null | sed -n -e 's/^.*clang[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004690if test x"$CLANG_VERSION_STRING" != x"" ; then
4691 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4692 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4693 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4694 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4696printf "%s\n" "$CLANG_VERSION" >&6; }
4697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4698printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004699 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004702 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4703 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4705printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004706 fi
4707else
Illia Bobyra96d5442023-08-30 16:30:15 +02004708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4709printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004710fi
4711
Bram Moolenaar839e9542016-04-14 16:46:02 +02004712CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004713if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4715printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004716 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004717fi
4718
Bram Moolenaar839e9542016-04-14 16:46:02 +02004719
Bram Moolenaar446cb832008-06-24 21:56:24 +00004720test "$GCC" = yes && CPP_MM=M;
4721
4722if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4724printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004725 sh ./toolcheck 1>&6
4726fi
4727
4728OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4729
Illia Bobyra96d5442023-08-30 16:30:15 +02004730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4731printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004732if test "x$vim_cv_uname_output" = "x" ; then
4733 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4735printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004736else
Illia Bobyra96d5442023-08-30 16:30:15 +02004737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4738printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004739fi
4740
Illia Bobyra96d5442023-08-30 16:30:15 +02004741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4742printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004743if test "x$vim_cv_uname_r_output" = "x" ; then
4744 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4746printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004747else
Illia Bobyra96d5442023-08-30 16:30:15 +02004748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4749printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004750fi
4751
Illia Bobyra96d5442023-08-30 16:30:15 +02004752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4753printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004754if test "x$vim_cv_uname_m_output" = "x" ; then
4755 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4757printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004758else
Illia Bobyra96d5442023-08-30 16:30:15 +02004759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4760printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004761fi
4762
Illia Bobyra96d5442023-08-30 16:30:15 +02004763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4764printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004765case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004766 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4767printf "%s\n" "yes" >&6; };;
4768 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004770esac
4771
Illia Bobyra96d5442023-08-30 16:30:15 +02004772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4773printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004774case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004775 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4776 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004777 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4778printf "%s\n" "yes" >&6; };;
4779 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004781esac
4782
Illia Bobyra96d5442023-08-30 16:30:15 +02004783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4784printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004785if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4787printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004788 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004789 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004790
Illia Bobyra96d5442023-08-30 16:30:15 +02004791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4792printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004793 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004794if test ${enable_darwin+y}
4795then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004796 enableval=$enable_darwin;
Illia Bobyra96d5442023-08-30 16:30:15 +02004797else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004798 enable_darwin="yes"
4799fi
4800
4801 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803printf "%s\n" "no" >&6; }
4804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4805printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004806 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4808printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004809 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4811printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004812 enable_darwin=no
4813 fi
4814 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4816printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004817 fi
4818
Illia Bobyra96d5442023-08-30 16:30:15 +02004819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4820printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004821
4822# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004823if test ${with_mac_arch+y}
4824then :
4825 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4826printf "%s\n" "$MACARCH" >&6; }
4827else $as_nop
4828 MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4829printf "%s\n" "defaulting to $MACARCH" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004830fi
4831
4832
Illia Bobyra96d5442023-08-30 16:30:15 +02004833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4834printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004835
4836# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004837if test ${with_developer_dir+y}
4838then :
4839 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4840printf "%s\n" "$DEVELOPER_DIR" >&6; }
4841else $as_nop
4842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4843printf "%s\n" "not present" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004844fi
4845
4846
4847 if test "x$DEVELOPER_DIR" = "x"; then
4848 # Extract the first word of "xcode-select", so it can be a program name with args.
4849set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851printf %s "checking for $ac_word... " >&6; }
4852if test ${ac_cv_path_XCODE_SELECT+y}
4853then :
4854 printf %s "(cached) " >&6
4855else $as_nop
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004856 case $XCODE_SELECT in
4857 [\\/]* | ?:[\\/]*)
4858 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4859 ;;
4860 *)
4861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862for as_dir in $PATH
4863do
4864 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004865 case $as_dir in #(((
4866 '') as_dir=./ ;;
4867 */) ;;
4868 *) as_dir=$as_dir/ ;;
4869 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004870 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004871 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4872 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4873 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004874 break 2
4875 fi
4876done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004877 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004878IFS=$as_save_IFS
4879
4880 ;;
4881esac
4882fi
4883XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4884if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4886printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004887else
Illia Bobyra96d5442023-08-30 16:30:15 +02004888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4889printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004890fi
4891
4892
4893 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4895printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004896 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4898printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004899 else
4900 DEVELOPER_DIR=/Developer
4901 fi
4902 fi
4903
Bram Moolenaar446cb832008-06-24 21:56:24 +00004904 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4906printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004907 save_cppflags="$CPPFLAGS"
4908 save_cflags="$CFLAGS"
4909 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004910 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004912/* end confdefs.h. */
4913
4914int
Illia Bobyra96d5442023-08-30 16:30:15 +02004915main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004916{
4917
4918 ;
4919 return 0;
4920}
4921_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004922if ac_fn_c_try_link "$LINENO"
4923then :
4924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
4925printf "%s\n" "found" >&6; }
4926else $as_nop
4927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4928printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004929 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02004930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4931printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004932 CPPFLAGS="$CPPFLAGS -arch i386"
4933 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004935/* end confdefs.h. */
4936
4937int
Illia Bobyra96d5442023-08-30 16:30:15 +02004938main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004939{
4940
4941 ;
4942 return 0;
4943}
4944_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004945if ac_fn_c_try_link "$LINENO"
4946then :
4947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4948printf "%s\n" "yes" >&6; }; MACARCH="intel"
4949else $as_nop
4950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004952 MACARCH="ppc"
4953 CPPFLAGS="$save_cppflags -arch ppc"
4954 LDFLAGS="$save_ldflags -arch ppc"
4955fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004956rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004957 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004958fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004959rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004960 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004961 elif test "x$MACARCH" = "xintel"; then
4962 CPPFLAGS="$CPPFLAGS -arch intel"
4963 LDFLAGS="$LDFLAGS -arch intel"
4964 elif test "x$MACARCH" = "xppc"; then
4965 CPPFLAGS="$CPPFLAGS -arch ppc"
4966 LDFLAGS="$LDFLAGS -arch ppc"
4967 fi
4968
4969 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02004970 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02004971 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00004972 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02004973 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01004974
Bram Moolenaard0573012017-10-28 21:11:06 +02004975 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02004976
Bram Moolenaar0b40d082022-03-08 13:32:37 +00004977 if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
Bram Moolenaar040f9752020-08-11 23:08:48 +02004978 with_x=no
4979 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004980 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004981else
Illia Bobyra96d5442023-08-30 16:30:15 +02004982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4983printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02004984fi
4985
Illia Bobyra96d5442023-08-30 16:30:15 +02004986ac_header= ac_cache=
4987for ac_item in $ac_header_c_list
4988do
4989 if test $ac_cache; then
4990 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4991 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4992 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4993 fi
4994 ac_header= ac_cache=
4995 elif test $ac_header; then
4996 ac_cache=$ac_item
4997 else
4998 ac_header=$ac_item
4999 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005000done
5001
5002
Illia Bobyra96d5442023-08-30 16:30:15 +02005003
5004
5005
5006
5007
5008
5009if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5010then :
5011
5012printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005013
Bram Moolenaar39766a72013-11-03 00:41:00 +01005014fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005015ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5016if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5017then :
5018 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005019
Illia Bobyra96d5442023-08-30 16:30:15 +02005020fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005021
Evan Miller25448072022-12-30 10:42:23 +00005022# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005023ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5024if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5025then :
5026 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005027
5028fi
5029
Bram Moolenaar39766a72013-11-03 00:41:00 +01005030
Bram Moolenaar071d4272004-06-13 20:20:40 +00005031
5032
5033
Bram Moolenaar446cb832008-06-24 21:56:24 +00005034if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5036printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005037 have_local_include=''
5038 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005039
5040# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005041if test ${with_local_dir+y}
5042then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005043 withval=$with_local_dir;
5044 local_dir="$withval"
5045 case "$withval" in
5046 */*) ;;
5047 no)
5048 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005049 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005050 have_local_lib=yes
5051 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005052 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005053 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5055printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005056
Illia Bobyra96d5442023-08-30 16:30:15 +02005057else $as_nop
Bram Moolenaarc236c162008-07-13 17:41:49 +00005058
5059 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5061printf "%s\n" "Defaulting to $local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005062
5063fi
5064
5065 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005066 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005067 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005068 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005069 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005070 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005071 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5072 tt=`echo "$LDFLAGS" | sed -e "s+-L${local_dir}/lib ++g" -e "s+-L${local_dir}/lib$++g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005073 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005074 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005075 fi
5076 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005077 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5078 tt=`echo "$CPPFLAGS" | sed -e "s+-I${local_dir}/include ++g" -e "s+-I${local_dir}/include$++g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005079 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005080 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005081 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005082 fi
5083fi
5084
Illia Bobyra96d5442023-08-30 16:30:15 +02005085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5086printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005087
Bram Moolenaar446cb832008-06-24 21:56:24 +00005088# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005089if test ${with_vim_name+y}
5090then :
5091 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5092printf "%s\n" "$VIMNAME" >&6; }
5093else $as_nop
5094 VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5095printf "%s\n" "Defaulting to $VIMNAME" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005096fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005097
5098
Illia Bobyra96d5442023-08-30 16:30:15 +02005099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5100printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005101
5102# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005103if test ${with_ex_name+y}
5104then :
5105 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5106printf "%s\n" "$EXNAME" >&6; }
5107else $as_nop
5108 EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5109printf "%s\n" "Defaulting to ex" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005110fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005111
5112
Illia Bobyra96d5442023-08-30 16:30:15 +02005113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5114printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005115
5116# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005117if test ${with_view_name+y}
5118then :
5119 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5120printf "%s\n" "$VIEWNAME" >&6; }
5121else $as_nop
5122 VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5123printf "%s\n" "Defaulting to view" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005124fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005125
5126
5127
Illia Bobyra96d5442023-08-30 16:30:15 +02005128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5129printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005130
5131# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005132if test ${with_global_runtime+y}
5133then :
5134 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5135printf "%s\n" "$withval" >&6; }
5136else $as_nop
5137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5138printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005139fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005140
5141
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005142if test "X$RUNTIME_GLOBAL" != "X"; then
5143 RUNTIME_GLOBAL_AFTER=$(printf -- "$RUNTIME_GLOBAL\\n" | $AWK -F, 'BEGIN { comma=0 } { for (i = NF; i > 0; i--) { if (comma) { printf ",%s/after", $i } else { printf "%s/after", $i; comma=1 } } } END { printf "\n" }')
Illia Bobyra96d5442023-08-30 16:30:15 +02005144 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005145
Illia Bobyra96d5442023-08-30 16:30:15 +02005146 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005147
5148fi
5149
Illia Bobyra96d5442023-08-30 16:30:15 +02005150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5151printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005152
5153# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005154if test ${with_modified_by+y}
5155then :
5156 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5157printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005158
Illia Bobyra96d5442023-08-30 16:30:15 +02005159else $as_nop
5160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005162fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005163
Bram Moolenaar446cb832008-06-24 21:56:24 +00005164
Illia Bobyra96d5442023-08-30 16:30:15 +02005165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5166printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005168/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005169
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005170int
Illia Bobyra96d5442023-08-30 16:30:15 +02005171main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005172{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005173 /* TryCompile function for CharSet.
5174 Treat any failure as ASCII for compatibility with existing art.
5175 Use compile-time rather than run-time tests for cross-compiler
5176 tolerance. */
5177#if '0'!=240
5178make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005179#endif
5180 ;
5181 return 0;
5182}
5183_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005184if ac_fn_c_try_compile "$LINENO"
5185then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005186 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005187cf_cv_ebcdic=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005188else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005189 # TryCompile action if false
Bram Moolenaar071d4272004-06-13 20:20:40 +00005190cf_cv_ebcdic=no
5191fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005193# end of TryCompile ])
5194# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5196printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005197case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005198 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005199
5200 line_break='"\\n"'
5201 ;;
5202 *) line_break='"\\012"';;
5203esac
5204
5205
5206if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5208printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005209case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005210 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005211 if test "$CC" = "cc"; then
5212 ccm="$_CC_CCMODE"
5213 ccn="CC"
5214 else
5215 if test "$CC" = "c89"; then
5216 ccm="$_CC_C89MODE"
5217 ccn="C89"
5218 else
5219 ccm=1
5220 fi
5221 fi
5222 if test "$ccm" != "1"; then
5223 echo ""
5224 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005225 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005226 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005227 echo " Do:"
5228 echo " export _CC_${ccn}MODE=1"
5229 echo " and then call configure again."
5230 echo "------------------------------------------"
5231 exit 1
5232 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005233 # Set CFLAGS for configure process.
5234 # This will be reset later for config.mk.
5235 # Use haltonmsg to force error for missing H files.
5236 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5237 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5239printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005240 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005241 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005244 ;;
5245esac
5246fi
5247
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005248if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005249 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005250else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005251 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005252fi
5253
5254
5255
Illia Bobyra96d5442023-08-30 16:30:15 +02005256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5257printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005258# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005259if test ${enable_smack+y}
5260then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005261 enableval=$enable_smack;
Illia Bobyra96d5442023-08-30 16:30:15 +02005262else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005263 enable_smack="yes"
5264fi
5265
5266if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268printf "%s\n" "no" >&6; }
5269 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5270if test "x$ac_cv_header_linux_xattr_h" = xyes
5271then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005272 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005273else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005274 enable_smack="no"
5275fi
5276
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005277else
Illia Bobyra96d5442023-08-30 16:30:15 +02005278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5279printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005280fi
5281if test "$enable_smack" = "yes"; then
Illia Bobyr8c358e02023-09-30 22:57:19 +02005282 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5283if test "x$ac_cv_header_sys_xattr_h" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +02005284then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005285 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005286else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005287 enable_smack="no"
5288fi
5289
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005290fi
5291if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5293printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5294
5295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005296/* end confdefs.h. */
5297#include <linux/xattr.h>
5298_ACEOF
5299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +02005300 $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
5301then :
5302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5303printf "%s\n" "yes" >&6; }
5304else $as_nop
5305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5306printf "%s\n" "no" >&6; }; enable_smack="no"
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005307fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005308rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005309
5310fi
5311if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5313printf %s "checking for setxattr in -lattr... " >&6; }
5314if test ${ac_cv_lib_attr_setxattr+y}
5315then :
5316 printf %s "(cached) " >&6
5317else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005318 ac_check_lib_save_LIBS=$LIBS
5319LIBS="-lattr $LIBS"
5320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
5323/* Override any GCC internal prototype to avoid an error.
5324 Use char because int might match the return type of a GCC
5325 builtin and then its argument prototype would still apply. */
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005326char setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005327int
Illia Bobyra96d5442023-08-30 16:30:15 +02005328main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005329{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005330return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005331 ;
5332 return 0;
5333}
5334_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005335if ac_fn_c_try_link "$LINENO"
5336then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005337 ac_cv_lib_attr_setxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005338else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005339 ac_cv_lib_attr_setxattr=no
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005340fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005341rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005342 conftest$ac_exeext conftest.$ac_ext
5343LIBS=$ac_check_lib_save_LIBS
5344fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5346printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5347if test "x$ac_cv_lib_attr_setxattr" = xyes
5348then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005349 LIBS="$LIBS -lattr"
5350 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005351 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005352
5353fi
5354
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005355fi
5356
5357if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5359printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005360 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005361if test ${enable_selinux+y}
5362then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005363 enableval=$enable_selinux;
Illia Bobyra96d5442023-08-30 16:30:15 +02005364else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005365 enable_selinux="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005366fi
5367
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005368 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370printf "%s\n" "no" >&6; }
5371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5372printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5373if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5374then :
5375 printf %s "(cached) " >&6
5376else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005377 ac_check_lib_save_LIBS=$LIBS
5378LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005380/* end confdefs.h. */
5381
Bram Moolenaar446cb832008-06-24 21:56:24 +00005382/* Override any GCC internal prototype to avoid an error.
5383 Use char because int might match the return type of a GCC
5384 builtin and then its argument prototype would still apply. */
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005385char is_selinux_enabled ();
5386int
Illia Bobyra96d5442023-08-30 16:30:15 +02005387main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005388{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005389return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005390 ;
5391 return 0;
5392}
5393_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005394if ac_fn_c_try_link "$LINENO"
5395then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005396 ac_cv_lib_selinux_is_selinux_enabled=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005397else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005398 ac_cv_lib_selinux_is_selinux_enabled=no
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005399fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005400rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005401 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005402LIBS=$ac_check_lib_save_LIBS
5403fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5405printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5406if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5407then :
5408 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5409if test "x$ac_cv_header_selinux_selinux_h" = xyes
5410then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005411 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005412 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005413
5414fi
5415
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005416fi
5417
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005418 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5420printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005421 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005422fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005423
Christian Brabandte085dfd2023-09-30 12:49:18 +02005424{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5425printf %s "checking --enable-xattr argument... " >&6; }
5426# Check whether --enable-xattr was given.
5427if test ${enable_xattr+y}
5428then :
5429 enableval=$enable_xattr;
5430else $as_nop
5431 enable_xattr="yes"
5432fi
5433
5434if test "$enable_xattr" = "yes"; then
5435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5436printf "%s\n" "yes" >&6; }
Illia Bobyr8c358e02023-09-30 22:57:19 +02005437 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5438if test "x$ac_cv_header_sys_xattr_h" = xyes
Christian Brabandte085dfd2023-09-30 12:49:18 +02005439then :
5440 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5441
5442fi
5443
5444else
5445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5446printf "%s\n" "no" >&6; }
5447fi
5448
5449
Illia Bobyra96d5442023-08-30 16:30:15 +02005450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5451printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005452
Bram Moolenaar446cb832008-06-24 21:56:24 +00005453# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005454if test ${with_features+y}
5455then :
5456 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5457printf "%s\n" "$features" >&6; }
5458else $as_nop
5459 features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5460printf "%s\n" "Defaulting to huge" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005461fi
5462
Bram Moolenaar071d4272004-06-13 20:20:40 +00005463
Martin Tournoij7904fa42022-10-04 16:28:45 +01005464case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005465 small) features="tiny" ;;
5466 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005467esac
5468
Bram Moolenaar071d4272004-06-13 20:20:40 +00005469dovimdiff=""
5470dogvimdiff=""
5471case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005472 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005473 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005474 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005475 dovimdiff="installvimdiff";
5476 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005477 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005478 dovimdiff="installvimdiff";
5479 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005480 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5481printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005482esac
5483
5484
5485
5486
Martin Tournoij7904fa42022-10-04 16:28:45 +01005487if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005488 has_eval=no
5489else
5490 has_eval=yes
5491fi
5492
Illia Bobyra96d5442023-08-30 16:30:15 +02005493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5494printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005495
Bram Moolenaar446cb832008-06-24 21:56:24 +00005496# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005497if test ${with_compiledby+y}
5498then :
5499 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5500printf "%s\n" "$withval" >&6; }
5501else $as_nop
5502 compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5503printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005504fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005505
5506
Bram Moolenaar446cb832008-06-24 21:56:24 +00005507
Illia Bobyra96d5442023-08-30 16:30:15 +02005508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5509printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005510# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005511if test ${enable_xsmp+y}
5512then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005513 enableval=$enable_xsmp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005514else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005515 enable_xsmp="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005516fi
5517
Bram Moolenaar071d4272004-06-13 20:20:40 +00005518
5519if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5521printf "%s\n" "no" >&6; }
5522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5523printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005524 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005525if test ${enable_xsmp_interact+y}
5526then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005527 enableval=$enable_xsmp_interact;
Illia Bobyra96d5442023-08-30 16:30:15 +02005528else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005529 enable_xsmp_interact="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005530fi
5531
Bram Moolenaar071d4272004-06-13 20:20:40 +00005532 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534printf "%s\n" "no" >&6; }
5535 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005536
5537 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5539printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005540 fi
5541else
Illia Bobyra96d5442023-08-30 16:30:15 +02005542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5543printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005544fi
5545
Illia Bobyra96d5442023-08-30 16:30:15 +02005546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5547printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005548if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5550printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005551else
Illia Bobyra96d5442023-08-30 16:30:15 +02005552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5553printf "%s\n" "enabled" >&6; }
5554 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005555
5556 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5557
5558fi
5559
Illia Bobyra96d5442023-08-30 16:30:15 +02005560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5561printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005562# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005563if test ${enable_luainterp+y}
5564then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005565 enableval=$enable_luainterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005566else $as_nop
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005567 enable_luainterp="no"
5568fi
5569
Illia Bobyra96d5442023-08-30 16:30:15 +02005570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5571printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005572
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005573if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005574 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005575 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005576 fi
5577
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005578
5579
Illia Bobyra96d5442023-08-30 16:30:15 +02005580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5581printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005582
5583# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005584if test ${with_lua_prefix+y}
5585then :
5586 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5587printf "%s\n" "$with_lua_prefix" >&6; }
5588else $as_nop
5589 with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5590printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005591fi
5592
5593
5594 if test "X$with_lua_prefix" != "X"; then
5595 vi_cv_path_lua_pfx="$with_lua_prefix"
5596 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5598printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005599 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5601printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005602 vi_cv_path_lua_pfx="$LUA_PREFIX"
5603 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5605printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005606 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005607 fi
5608 fi
5609
Illia Bobyra96d5442023-08-30 16:30:15 +02005610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5611printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005612
5613# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005614if test ${with_luajit+y}
5615then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005616 withval=$with_luajit; vi_cv_with_luajit="$withval"
Illia Bobyra96d5442023-08-30 16:30:15 +02005617else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005618 vi_cv_with_luajit="no"
5619fi
5620
Illia Bobyra96d5442023-08-30 16:30:15 +02005621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5622printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005623
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005624 LUA_INC=
5625 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005626 if test "x$vi_cv_with_luajit" != "xno"; then
5627 # Extract the first word of "luajit", so it can be a program name with args.
5628set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5630printf %s "checking for $ac_word... " >&6; }
5631if test ${ac_cv_path_vi_cv_path_luajit+y}
5632then :
5633 printf %s "(cached) " >&6
5634else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005635 case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005636 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005637 ac_cv_path_vi_cv_path_luajit="$vi_cv_path_luajit" # Let the user override the test with a path.
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005638 ;;
5639 *)
5640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005644 case $as_dir in #(((
5645 '') as_dir=./ ;;
5646 */) ;;
5647 *) as_dir=$as_dir/ ;;
5648 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005649 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005650 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5651 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5652 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005653 break 2
5654 fi
5655done
5656 done
5657IFS=$as_save_IFS
5658
5659 ;;
5660esac
5661fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005662vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5663if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5665printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005666else
Illia Bobyra96d5442023-08-30 16:30:15 +02005667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005669fi
5670
5671
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005672 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5674printf %s "checking LuaJIT version... " >&6; }
5675if test ${vi_cv_version_luajit+y}
5676then :
5677 printf %s "(cached) " >&6
5678else $as_nop
ichizokbddc6ad2023-08-29 20:54:32 +02005679 vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-*[a-z0-9]*\)* .*/\1/'`
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005680fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5682printf "%s\n" "$vi_cv_version_luajit" >&6; }
5683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5684printf %s "checking Lua version of LuaJIT... " >&6; }
5685if test ${vi_cv_version_lua_luajit+y}
5686then :
5687 printf %s "(cached) " >&6
5688else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005689 vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5690fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5692printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005693 vi_cv_path_lua="$vi_cv_path_luajit"
5694 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5695 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005696 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005697 # Extract the first word of "lua", so it can be a program name with args.
5698set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700printf %s "checking for $ac_word... " >&6; }
5701if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5702then :
5703 printf %s "(cached) " >&6
5704else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005705 case $vi_cv_path_plain_lua in
5706 [\\/]* | ?:[\\/]*)
5707 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5708 ;;
5709 *)
5710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005714 case $as_dir in #(((
5715 '') as_dir=./ ;;
5716 */) ;;
5717 *) as_dir=$as_dir/ ;;
5718 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005719 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005720 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5721 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5722 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005723 break 2
5724 fi
5725done
5726 done
5727IFS=$as_save_IFS
5728
5729 ;;
5730esac
5731fi
5732vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5733if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5735printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005736else
Illia Bobyra96d5442023-08-30 16:30:15 +02005737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005739fi
5740
5741
5742 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5744printf %s "checking Lua version... " >&6; }
5745if test ${vi_cv_version_plain_lua+y}
5746then :
5747 printf %s "(cached) " >&6
5748else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005749 vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5750fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5752printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005753 fi
5754 vi_cv_path_lua="$vi_cv_path_plain_lua"
5755 vi_cv_version_lua="$vi_cv_version_plain_lua"
5756 fi
5757 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit" >&5
5759printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005760 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5762printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005763 LUA_INC=/luajit-$vi_cv_version_luajit
5764 fi
5765 fi
5766 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5768printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005769 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5771printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005772 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5774printf "%s\n" "no" >&6; }
5775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
5776printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005777 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5779printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005780 LUA_INC=/lua$vi_cv_version_lua
5781 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005784
5785 # Detect moonjit:
5786 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5787 lua_suf=/moonjit-2.3
5788 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02005789 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005790 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01005791 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005792 lua_suf="/$lua_suf"
5793 break
5794 fi
5795 done
Illia Bobyra96d5442023-08-30 16:30:15 +02005796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5797printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005798 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5800printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005801 LUA_INC=$lua_suf
5802 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005805 vi_cv_path_lua_pfx=
5806 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005807 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005808 fi
5809 fi
5810 fi
5811
5812 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005813 if test "x$vi_cv_with_luajit" != "xno"; then
5814 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5815 if test "X$multiarch" != "X"; then
5816 lib_multiarch="lib/${multiarch}"
5817 else
5818 lib_multiarch="lib"
5819 fi
5820 if test "X$vi_cv_version_lua" = "X"; then
5821 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5822 else
5823 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5824 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005825 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005826 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5827 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005828 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005829 LUALIBDIR=lib
5830 fi
5831 if test "X$LUA_INC" != "X"; then
5832 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
5833 else
5834 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005835 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005836 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005837 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005838 lua_ok="yes"
5839 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5841printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005842 libs_save=$LIBS
5843 LIBS="$LIBS $LUA_LIBS"
5844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5845/* end confdefs.h. */
5846
5847int
Illia Bobyra96d5442023-08-30 16:30:15 +02005848main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005849{
5850
5851 ;
5852 return 0;
5853}
5854_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005855if ac_fn_c_try_link "$LINENO"
5856then :
5857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5858printf "%s\n" "yes" >&6; }; lua_ok="yes"
5859else $as_nop
5860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS=""
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005862fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005863rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005864 conftest$ac_exeext conftest.$ac_ext
5865 LIBS=$libs_save
5866 fi
5867 if test "x$lua_ok" = "xyes"; then
5868 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5869 LUA_SRC="if_lua.c"
5870 LUA_OBJ="objects/if_lua.o"
5871 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02005872 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005873
5874 fi
5875 if test "$enable_luainterp" = "dynamic"; then
5876 if test "x$vi_cv_with_luajit" != "xno"; then
5877 luajit="jit"
5878 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005879 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5880 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5881 else
Bram Moolenaard0573012017-10-28 21:11:06 +02005882 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005883 ext="dylib"
5884 indexes=""
5885 else
5886 ext="so"
5887 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5888 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5889 if test "X$multiarch" != "X"; then
5890 lib_multiarch="lib/${multiarch}"
5891 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02005892 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5894printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005895 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02005896 if test -z "$subdir"; then
5897 continue
5898 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005899 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5900 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5901 for i in $indexes ""; do
5902 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02005903 sover2="$i"
5904 break 3
5905 fi
5906 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01005907 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005908 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005909 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005910 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5912printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005913 lua_ok="no"
5914 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5915 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5917printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005918 lua_ok="yes"
5919 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5920 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005921 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005922 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005923
5924 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005925 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005926 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005927 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02005928 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005929 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005930 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5931 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005932 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005933 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01005934 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01005935 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005936
5937
5938
5939
5940
ichizok8bb3fe42021-12-28 15:51:45 +00005941
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005942fi
5943
5944
Illia Bobyra96d5442023-08-30 16:30:15 +02005945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5946printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005947# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005948if test ${enable_mzschemeinterp+y}
5949then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005950 enableval=$enable_mzschemeinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005951else $as_nop
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005952 enable_mzschemeinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005953fi
5954
Illia Bobyra96d5442023-08-30 16:30:15 +02005955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5956printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005957
5958if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005959
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005960
Illia Bobyra96d5442023-08-30 16:30:15 +02005961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5962printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005963
Bram Moolenaar446cb832008-06-24 21:56:24 +00005964# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005965if test ${with_plthome+y}
5966then :
5967 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5968printf "%s\n" "$with_plthome" >&6; }
5969else $as_nop
5970 with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5971printf "%s\n" "\"no\"" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005972fi
5973
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005974
5975 if test "X$with_plthome" != "X"; then
5976 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005977 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005978 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5980printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005981 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5983printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005984 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005985 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005986 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5988printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005989 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005990set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5992printf %s "checking for $ac_word... " >&6; }
5993if test ${ac_cv_path_vi_cv_path_mzscheme+y}
5994then :
5995 printf %s "(cached) " >&6
5996else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005997 case $vi_cv_path_mzscheme in
5998 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005999 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6000 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006001 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH
6004do
6005 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006006 case $as_dir in #(((
6007 '') as_dir=./ ;;
6008 */) ;;
6009 *) as_dir=$as_dir/ ;;
6010 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006011 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006012 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6013 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6014 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006015 break 2
6016 fi
6017done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006018 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006019IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006020
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006021 ;;
6022esac
6023fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006024vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006025if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6027printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006028else
Illia Bobyra96d5442023-08-30 16:30:15 +02006029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006031fi
6032
6033
Bram Moolenaar446cb832008-06-24 21:56:24 +00006034
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006035 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006036 lsout=`ls -l $vi_cv_path_mzscheme`
6037 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6038 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6039 fi
6040 fi
6041
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006042 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6044printf %s "checking MzScheme install prefix... " >&6; }
6045if test ${vi_cv_path_mzscheme_pfx+y}
6046then :
6047 printf %s "(cached) " >&6
6048else $as_nop
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006049 echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006050 (build-path (call-with-values \
6051 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006052 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6053 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
6054 sed -e 's+/$++'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006055fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006056{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6057printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006058 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006059 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006060 fi
6061 fi
6062
6063 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6065printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006066 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6067 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6069printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006070 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6072printf "%s\n" "not found" >&6; }
6073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6074printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006075 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6076 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6078printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006079 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6081printf "%s\n" "no" >&6; }
6082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6083printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006084 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6086printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006087 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006088 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090printf "%s\n" "no" >&6; }
6091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6092printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006093 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6095printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006096 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006097 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099printf "%s\n" "no" >&6; }
6100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6101printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006102 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6104printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006105 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006106 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6108printf "%s\n" "no" >&6; }
6109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6110printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006111 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6113printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006114 SCHEME_INC=/usr/include/racket
6115 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6117printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006118 vi_cv_path_mzscheme_pfx=
6119 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006120 fi
6121 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006122 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006123 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006124 fi
6125 fi
6126
6127 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006128
Illia Bobyra96d5442023-08-30 16:30:15 +02006129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6130printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006131 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6132 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6134printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006135 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6137printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006138 fi
6139
6140 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6141 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006142 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006143 MZSCHEME_LIBS="-framework Racket"
6144 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6145 elif test -f "${path}/libmzscheme3m.a"; then
6146 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6147 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6148 elif test -f "${path}/libracket3m.a"; then
6149 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006150 if test -f "${path}/librktio.a"; then
6151 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6152 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006153 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6154 elif test -f "${path}/libracket.a"; then
6155 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6156 elif test -f "${path}/libmzscheme.a"; then
6157 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6158 else
6159 if test -f "${path}/libmzscheme3m.so"; then
6160 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6161 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6162 elif test -f "${path}/libracket3m.so"; then
6163 MZSCHEME_LIBS="-L${path} -lracket3m"
6164 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6165 elif test -f "${path}/libracket.so"; then
6166 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6167 else
6168 if test "$path" != "$SCHEME_LIB"; then
6169 continue
6170 fi
6171 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6172 fi
6173 if test "$GCC" = yes; then
6174 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006175 elif test "$vim_cv_uname_output" = SunOS &&
6176 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006177 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6178 fi
6179 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006180 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006181 if test "X$MZSCHEME_LIBS" != "X"; then
6182 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006183 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006184 done
6185
Illia Bobyra96d5442023-08-30 16:30:15 +02006186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6187printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006188 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6190printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006191 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6192 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6193 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6195printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006196 fi
6197
Illia Bobyra96d5442023-08-30 16:30:15 +02006198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6199printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006200 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6201 if test "X$SCHEME_CONFIGDIR" != "X"; then
6202 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6204printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006205 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6207printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006208 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006209
Illia Bobyra96d5442023-08-30 16:30:15 +02006210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6211printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006212 SCHEME_COLLECTS=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-collects-dir))) (when (path? p) (let-values (((base _1 _2) (split-path p))) (display base))))'`
6213 if test "X$SCHEME_COLLECTS" = "X"; then
6214 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6215 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006216 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006217 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6218 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006219 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006220 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6221 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6222 else
6223 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6224 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6225 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006226 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006227 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006228 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006229 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006230 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6232printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006233 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6235printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006236 fi
6237
Illia Bobyra96d5442023-08-30 16:30:15 +02006238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6239printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006240 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006241 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006242 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6243 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006244 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006245 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006246 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006247 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6248 MZSCHEME_MOD="++lib scheme/base"
6249 else
6250 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6251 MZSCHEME_EXTRA="mzscheme_base.c"
6252 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6253 MZSCHEME_MOD=""
6254 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006255 fi
6256 fi
6257 if test "X$MZSCHEME_EXTRA" != "X" ; then
6258 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6260printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006261 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6263printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006264 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006265
Illia Bobyra96d5442023-08-30 16:30:15 +02006266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6267printf %s "checking for ffi_type_void in -lffi... " >&6; }
6268if test ${ac_cv_lib_ffi_ffi_type_void+y}
6269then :
6270 printf %s "(cached) " >&6
6271else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006272 ac_check_lib_save_LIBS=$LIBS
6273LIBS="-lffi $LIBS"
6274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6275/* end confdefs.h. */
6276
6277/* Override any GCC internal prototype to avoid an error.
6278 Use char because int might match the return type of a GCC
6279 builtin and then its argument prototype would still apply. */
Bram Moolenaar9e902192013-07-17 18:58:11 +02006280char ffi_type_void ();
6281int
Illia Bobyra96d5442023-08-30 16:30:15 +02006282main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006283{
6284return ffi_type_void ();
6285 ;
6286 return 0;
6287}
6288_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006289if ac_fn_c_try_link "$LINENO"
6290then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006291 ac_cv_lib_ffi_ffi_type_void=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006292else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006293 ac_cv_lib_ffi_ffi_type_void=no
6294fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006295rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006296 conftest$ac_exeext conftest.$ac_ext
6297LIBS=$ac_check_lib_save_LIBS
6298fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6300printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6301if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6302then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006303 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6304fi
6305
6306
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006307 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006308 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006309
Illia Bobyra96d5442023-08-30 16:30:15 +02006310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6311printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006312 cflags_save=$CFLAGS
6313 libs_save=$LIBS
6314 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6315 LIBS="$LIBS $MZSCHEME_LIBS"
6316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6317/* end confdefs.h. */
6318
6319int
Illia Bobyra96d5442023-08-30 16:30:15 +02006320main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006321{
6322
6323 ;
6324 return 0;
6325}
6326_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006327if ac_fn_c_try_link "$LINENO"
6328then :
6329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6330printf "%s\n" "yes" >&6; }; mzs_ok=yes
6331else $as_nop
6332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6333printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
Bram Moolenaar9e902192013-07-17 18:58:11 +02006334fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006335rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006336 conftest$ac_exeext conftest.$ac_ext
6337 CFLAGS=$cflags_save
6338 LIBS=$libs_save
6339 if test $mzs_ok = yes; then
6340 MZSCHEME_SRC="if_mzsch.c"
6341 MZSCHEME_OBJ="objects/if_mzsch.o"
6342 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006343 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006344
6345 else
6346 MZSCHEME_CFLAGS=
6347 MZSCHEME_LIBS=
6348 MZSCHEME_EXTRA=
6349 MZSCHEME_MZC=
6350 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006351 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006352
6353
6354
6355
6356
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006357
6358
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006359fi
6360
6361
Illia Bobyra96d5442023-08-30 16:30:15 +02006362{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6363printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006364# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006365if test ${enable_perlinterp+y}
6366then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006367 enableval=$enable_perlinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006368else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006369 enable_perlinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006370fi
6371
Illia Bobyra96d5442023-08-30 16:30:15 +02006372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6373printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006374if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006375 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006376 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006377 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006378
Bram Moolenaar071d4272004-06-13 20:20:40 +00006379 # Extract the first word of "perl", so it can be a program name with args.
6380set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6382printf %s "checking for $ac_word... " >&6; }
6383if test ${ac_cv_path_vi_cv_path_perl+y}
6384then :
6385 printf %s "(cached) " >&6
6386else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006387 case $vi_cv_path_perl in
6388 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006389 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6390 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006391 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6393for as_dir in $PATH
6394do
6395 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006396 case $as_dir in #(((
6397 '') as_dir=./ ;;
6398 */) ;;
6399 *) as_dir=$as_dir/ ;;
6400 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006401 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006402 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6403 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6404 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006405 break 2
6406 fi
6407done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006408 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006409IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006410
Bram Moolenaar071d4272004-06-13 20:20:40 +00006411 ;;
6412esac
6413fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006414vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006415if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6417printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006418else
Illia Bobyra96d5442023-08-30 16:30:15 +02006419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006421fi
6422
Bram Moolenaar446cb832008-06-24 21:56:24 +00006423
Bram Moolenaar071d4272004-06-13 20:20:40 +00006424 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6426printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006427 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6428 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006429 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006430 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6431 badthreads=no
6432 else
6433 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6434 eval `$vi_cv_path_perl -V:use5005threads`
6435 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6436 badthreads=no
6437 else
6438 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6440printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006441 fi
6442 else
6443 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6445printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006446 fi
6447 fi
6448 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6450printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006451 eval `$vi_cv_path_perl -V:shrpenv`
6452 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6453 shrpenv=""
6454 fi
6455 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006456
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006457 vi_cv_perl_extutils=unknown_perl_extutils_path
6458 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6459 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6460 if test -f "$xsubpp_path"; then
6461 vi_cv_perl_xsubpp="$xsubpp_path"
6462 fi
6463 done
6464
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006465 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006466 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6467 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006468 -e 's/-pipe //' \
6469 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006470 -e 's/-D_FORTIFY_SOURCE=.//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006471 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6472 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6473 -e 's/-bE:perl.exp//' -e 's/-lc //'`
6474 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6475 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6476
Illia Bobyra96d5442023-08-30 16:30:15 +02006477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6478printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006479 cflags_save=$CFLAGS
6480 libs_save=$LIBS
6481 ldflags_save=$LDFLAGS
6482 CFLAGS="$CFLAGS $perlcppflags"
6483 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006484 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006485 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006487/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006488
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006489int
Illia Bobyra96d5442023-08-30 16:30:15 +02006490main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006491{
6492
6493 ;
6494 return 0;
6495}
6496_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006497if ac_fn_c_try_link "$LINENO"
6498then :
6499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6500printf "%s\n" "yes" >&6; }; perl_ok=yes
6501else $as_nop
6502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6503printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006504fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006505rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006506 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006507 CFLAGS=$cflags_save
6508 LIBS=$libs_save
6509 LDFLAGS=$ldflags_save
6510 if test $perl_ok = yes; then
6511 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006512 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006513 fi
6514 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006515 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006516 LDFLAGS="$perlldflags $LDFLAGS"
6517 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006518 fi
6519 PERL_LIBS=$perllibs
6520 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6521 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6522 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006523 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006524
6525 fi
6526 fi
6527 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6529printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006530 fi
6531 fi
6532
Bram Moolenaard0573012017-10-28 21:11:06 +02006533 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006534 dir=/System/Library/Perl
6535 darwindir=$dir/darwin
6536 if test -d $darwindir; then
6537 PERL=/usr/bin/perl
6538 else
6539 dir=/System/Library/Perl/5.8.1
6540 darwindir=$dir/darwin-thread-multi-2level
6541 if test -d $darwindir; then
6542 PERL=/usr/bin/perl
6543 fi
6544 fi
6545 if test -n "$PERL"; then
6546 PERL_DIR="$dir"
6547 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6548 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6549 PERL_LIBS="-L$darwindir/CORE -lperl"
6550 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006551 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6552 PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006553 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006554 if test "$enable_perlinterp" = "dynamic"; then
6555 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006556 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006557
6558 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006559 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006560 fi
6561 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006562
6563 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006564 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006565 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006566fi
6567
6568
6569
6570
6571
6572
6573
ichizok8bb3fe42021-12-28 15:51:45 +00006574
Illia Bobyra96d5442023-08-30 16:30:15 +02006575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6576printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006577# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006578if test ${enable_pythoninterp+y}
6579then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006580 enableval=$enable_pythoninterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006581else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006582 enable_pythoninterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006583fi
6584
Illia Bobyra96d5442023-08-30 16:30:15 +02006585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6586printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006587if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006588 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006589 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006590 fi
6591
Illia Bobyra96d5442023-08-30 16:30:15 +02006592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6593printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006594
6595
6596# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006597if test ${with_python_command+y}
6598then :
6599 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6600printf "%s\n" "$vi_cv_path_python" >&6; }
6601else $as_nop
6602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6603printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006604fi
6605
6606
6607 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006608 for ac_prog in python2 python
6609do
6610 # Extract the first word of "$ac_prog", so it can be a program name with args.
6611set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613printf %s "checking for $ac_word... " >&6; }
6614if test ${ac_cv_path_vi_cv_path_python+y}
6615then :
6616 printf %s "(cached) " >&6
6617else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006618 case $vi_cv_path_python in
6619 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006620 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6621 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006622 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624for as_dir in $PATH
6625do
6626 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006627 case $as_dir in #(((
6628 '') as_dir=./ ;;
6629 */) ;;
6630 *) as_dir=$as_dir/ ;;
6631 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006632 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006633 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6634 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6635 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006636 break 2
6637 fi
6638done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006639 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006640IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006641
Bram Moolenaar071d4272004-06-13 20:20:40 +00006642 ;;
6643esac
6644fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006645vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006646if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6648printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006649else
Illia Bobyra96d5442023-08-30 16:30:15 +02006650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6651printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006652fi
6653
Bram Moolenaar446cb832008-06-24 21:56:24 +00006654
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006655 test -n "$vi_cv_path_python" && break
6656done
6657
Bram Moolenaare1a32312018-04-15 16:03:25 +02006658 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006659 if test "X$vi_cv_path_python" != "X"; then
6660
Illia Bobyra96d5442023-08-30 16:30:15 +02006661 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6662printf %s "checking Python version... " >&6; }
6663if test ${vi_cv_var_python_version+y}
6664then :
6665 printf %s "(cached) " >&6
6666else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006667 vi_cv_var_python_version=`
6668 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006669
Bram Moolenaar071d4272004-06-13 20:20:40 +00006670fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6672printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006673
Illia Bobyra96d5442023-08-30 16:30:15 +02006674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6675printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006676 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02006677 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006678 then
Illia Bobyra96d5442023-08-30 16:30:15 +02006679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6680printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006681
Illia Bobyra96d5442023-08-30 16:30:15 +02006682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6683printf %s "checking Python's install prefix... " >&6; }
6684if test ${vi_cv_path_python_pfx+y}
6685then :
6686 printf %s "(cached) " >&6
6687else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006688 vi_cv_path_python_pfx=`
6689 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006690 "import sys; print sys.prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006691fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6693printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006694
Illia Bobyra96d5442023-08-30 16:30:15 +02006695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6696printf %s "checking Python's execution prefix... " >&6; }
6697if test ${vi_cv_path_python_epfx+y}
6698then :
6699 printf %s "(cached) " >&6
6700else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006701 vi_cv_path_python_epfx=`
6702 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006703 "import sys; print sys.exec_prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006704fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006705{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6706printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006707
Bram Moolenaar071d4272004-06-13 20:20:40 +00006708
Illia Bobyra96d5442023-08-30 16:30:15 +02006709 if test ${vi_cv_path_pythonpath+y}
6710then :
6711 printf %s "(cached) " >&6
6712else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006713 vi_cv_path_pythonpath=`
6714 unset PYTHONPATH;
6715 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006716 "import sys, string; print string.join(sys.path,':')"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006717fi
6718
6719
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006720
6721
Bram Moolenaar446cb832008-06-24 21:56:24 +00006722# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006723if test ${with_python_config_dir+y}
6724then :
Bram Moolenaard0882402018-04-10 18:13:05 +02006725 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00006726fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006727
Bram Moolenaar446cb832008-06-24 21:56:24 +00006728
Illia Bobyra96d5442023-08-30 16:30:15 +02006729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6730printf %s "checking Python's configuration directory... " >&6; }
6731if test ${vi_cv_path_python_conf+y}
6732then :
6733 printf %s "(cached) " >&6
6734else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006735
Bram Moolenaar071d4272004-06-13 20:20:40 +00006736 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02006737 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6738 if test -d "$d" && test -f "$d/config.c"; then
6739 vi_cv_path_python_conf="$d"
6740 else
6741 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6742 for subdir in lib64 lib share; do
6743 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6744 if test -d "$d" && test -f "$d/config.c"; then
6745 vi_cv_path_python_conf="$d"
6746 fi
6747 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00006748 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02006749 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006750
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006751fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6753printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006754
6755 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6756
6757 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6759printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006760 else
6761
Illia Bobyra96d5442023-08-30 16:30:15 +02006762 if test ${vi_cv_path_python_plibs+y}
6763then :
6764 printf %s "(cached) " >&6
6765else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006766
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006767 pwd=`pwd`
6768 tmp_mkf="$pwd/config-PyMake$$"
6769 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006770__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02006771 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006772 @echo "python_LIBS='$(LIBS)'"
6773 @echo "python_SYSLIBS='$(SYSLIBS)'"
6774 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02006775 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02006776 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006777 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6778 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6779 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006780eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006781 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6782 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02006783 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006784 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6785 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006786 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6787 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6788 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006789 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02006790 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01006791 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01006792 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6793 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6794 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6795 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6796 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6797 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6798 fi
6799 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6800 fi
6801 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02006802 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006803 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6804 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006805
Bram Moolenaar071d4272004-06-13 20:20:40 +00006806fi
6807
Illia Bobyra96d5442023-08-30 16:30:15 +02006808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6809printf %s "checking Python's dll name... " >&6; }
6810if test ${vi_cv_dll_name_python+y}
6811then :
6812 printf %s "(cached) " >&6
6813else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006814
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006815 if test "X$python_DLLLIBRARY" != "X"; then
6816 vi_cv_dll_name_python="$python_DLLLIBRARY"
6817 else
6818 vi_cv_dll_name_python="$python_INSTSONAME"
6819 fi
6820
6821fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6823printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006824
Bram Moolenaar071d4272004-06-13 20:20:40 +00006825 PYTHON_LIBS="${vi_cv_path_python_plibs}"
6826 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02006827 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006828 else
Bram Moolenaar04249582018-04-10 13:29:34 +02006829 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006830 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02006831 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02006832 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6833
6834 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006835 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02006836 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006837
Illia Bobyra96d5442023-08-30 16:30:15 +02006838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6839printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006840 threadsafe_flag=
6841 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006842 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006843 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006844 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006845 threadsafe_flag="-D_THREAD_SAFE"
6846 thread_lib="-pthread"
6847 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006848 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02006849 threadsafe_flag="-pthreads"
6850 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006851 fi
6852 libs_save_old=$LIBS
6853 if test -n "$threadsafe_flag"; then
6854 cflags_save=$CFLAGS
6855 CFLAGS="$CFLAGS $threadsafe_flag"
6856 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006858/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006859
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006860int
Illia Bobyra96d5442023-08-30 16:30:15 +02006861main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006862{
6863
6864 ;
6865 return 0;
6866}
6867_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006868if ac_fn_c_try_link "$LINENO"
6869then :
6870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6871printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6872else $as_nop
6873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6874printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006875
Bram Moolenaar071d4272004-06-13 20:20:40 +00006876fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006877rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006878 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006879 CFLAGS=$cflags_save
6880 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6882printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006883 fi
6884
Illia Bobyra96d5442023-08-30 16:30:15 +02006885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6886printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006887 cflags_save=$CFLAGS
6888 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02006889 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006890 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006892/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006893
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006894int
Illia Bobyra96d5442023-08-30 16:30:15 +02006895main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006896{
6897
6898 ;
6899 return 0;
6900}
6901_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006902if ac_fn_c_try_link "$LINENO"
6903then :
6904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6905printf "%s\n" "yes" >&6; }; python_ok=yes
6906else $as_nop
6907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6908printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006909fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006910rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006911 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006912 CFLAGS=$cflags_save
6913 LIBS=$libs_save
6914 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006915 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006916
6917 else
6918 LIBS=$libs_save_old
6919 PYTHON_SRC=
6920 PYTHON_OBJ=
6921 PYTHON_LIBS=
6922 PYTHON_CFLAGS=
6923 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006924 fi
6925 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6927printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006928 fi
6929 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006930
6931 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006932 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006933 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006934fi
6935
6936
6937
6938
6939
6940
6941
ichizok8bb3fe42021-12-28 15:51:45 +00006942
Illia Bobyra96d5442023-08-30 16:30:15 +02006943{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6944printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006945# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006946if test ${enable_python3interp+y}
6947then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006948 enableval=$enable_python3interp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006949else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006950 enable_python3interp="no"
6951fi
6952
Illia Bobyra96d5442023-08-30 16:30:15 +02006953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6954printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006955if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006956 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006957 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006958 fi
6959
Illia Bobyra96d5442023-08-30 16:30:15 +02006960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6961printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006962
6963
6964# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006965if test ${with_python3_command+y}
6966then :
6967 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6968printf "%s\n" "$vi_cv_path_python3" >&6; }
6969else $as_nop
6970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6971printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006972fi
6973
6974
6975 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006976 for ac_prog in python3 python
6977do
6978 # Extract the first word of "$ac_prog", so it can be a program name with args.
6979set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6981printf %s "checking for $ac_word... " >&6; }
6982if test ${ac_cv_path_vi_cv_path_python3+y}
6983then :
6984 printf %s "(cached) " >&6
6985else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006986 case $vi_cv_path_python3 in
6987 [\\/]* | ?:[\\/]*)
6988 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
6989 ;;
6990 *)
6991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6992for as_dir in $PATH
6993do
6994 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006995 case $as_dir in #(((
6996 '') as_dir=./ ;;
6997 */) ;;
6998 *) as_dir=$as_dir/ ;;
6999 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007000 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007001 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7002 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7003 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007004 break 2
7005 fi
7006done
7007 done
7008IFS=$as_save_IFS
7009
7010 ;;
7011esac
7012fi
7013vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7014if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7016printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007017else
Illia Bobyra96d5442023-08-30 16:30:15 +02007018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7019printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007020fi
7021
7022
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007023 test -n "$vi_cv_path_python3" && break
7024done
7025
Bram Moolenaare1a32312018-04-15 16:03:25 +02007026 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007027 if test "X$vi_cv_path_python3" != "X"; then
7028
Illia Bobyra96d5442023-08-30 16:30:15 +02007029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7030printf %s "checking Python version... " >&6; }
7031if test ${vi_cv_var_python3_version+y}
7032then :
7033 printf %s "(cached) " >&6
7034else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007035 vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007036 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007037
7038fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7040printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007041
Illia Bobyra96d5442023-08-30 16:30:15 +02007042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7043printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007044 if ${vi_cv_path_python3} -c \
7045 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7046 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7048printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007049
Illia Bobyra96d5442023-08-30 16:30:15 +02007050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
7051printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007052
7053
7054# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007055if test ${with_python3_stable_abi+y}
7056then :
7057 withval=$with_python3_stable_abi; vi_cv_var_python3_stable_abi="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_stable_abi" >&5
7058printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
7059else $as_nop
7060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7061printf "%s\n" "no" >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007062fi
7063
7064 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007065 if test ${vi_cv_var_python3_stable_abi_hex+y}
7066then :
7067 printf %s "(cached) " >&6
7068else $as_nop
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007069
7070 vi_cv_var_python3_stable_abi_hex=`
7071 ${vi_cv_path_python3} -c \
7072 "major_minor='${vi_cv_var_python3_stable_abi}'.split('.'); print('0x{0:X}'.format( (int(major_minor.__getitem__(0))<<24) + (int(major_minor.__getitem__(1))<<16) ))"`
7073fi
7074
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007075 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007076 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7077 fi
7078 fi
7079
Illia Bobyra96d5442023-08-30 16:30:15 +02007080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7081printf %s "checking Python's abiflags... " >&6; }
7082if test ${vi_cv_var_python3_abiflags+y}
7083then :
7084 printf %s "(cached) " >&6
7085else $as_nop
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007086
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007087 vi_cv_var_python3_abiflags=
7088 if ${vi_cv_path_python3} -c \
7089 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7090 then
7091 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7092 "import sys; print(sys.abiflags)"`
7093 fi
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007094fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7096printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007097
Illia Bobyra96d5442023-08-30 16:30:15 +02007098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7099printf %s "checking Python's install prefix... " >&6; }
7100if test ${vi_cv_path_python3_pfx+y}
7101then :
7102 printf %s "(cached) " >&6
7103else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007104 vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007105 ${vi_cv_path_python3} -c \
7106 "import sys; print(sys.prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007107fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7109printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007110
Illia Bobyra96d5442023-08-30 16:30:15 +02007111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7112printf %s "checking Python's execution prefix... " >&6; }
7113if test ${vi_cv_path_python3_epfx+y}
7114then :
7115 printf %s "(cached) " >&6
7116else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007117 vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007118 ${vi_cv_path_python3} -c \
7119 "import sys; print(sys.exec_prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007120fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7122printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007123
Illia Bobyra96d5442023-08-30 16:30:15 +02007124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7125printf %s "checking Python's include path... " >&6; }
7126if test ${vi_cv_path_python3_include+y}
7127then :
7128 printf %s "(cached) " >&6
7129else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007130 vi_cv_path_python3_include=`
7131 ${vi_cv_path_python3} -c \
7132 "import sysconfig; print(sysconfig.get_path(\"include\"))"`
7133fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7135printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007136
Illia Bobyra96d5442023-08-30 16:30:15 +02007137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7138printf %s "checking Python's include path... " >&6; }
7139if test ${vi_cv_path_python3_platinclude+y}
7140then :
7141 printf %s "(cached) " >&6
7142else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007143 vi_cv_path_python3_platinclude=`
7144 ${vi_cv_path_python3} -c \
7145 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"`
7146fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7148printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007149
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007150
Illia Bobyra96d5442023-08-30 16:30:15 +02007151 if test ${vi_cv_path_python3path+y}
7152then :
7153 printf %s "(cached) " >&6
7154else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007155 vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007156 unset PYTHONPATH;
7157 ${vi_cv_path_python3} -c \
7158 "import sys, string; print(':'.join(sys.path))"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007159fi
7160
7161
7162
7163
7164# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007165if test ${with_python3_config_dir+y}
7166then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007167 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007168fi
7169
7170
Illia Bobyra96d5442023-08-30 16:30:15 +02007171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7172printf %s "checking Python's configuration directory... " >&6; }
7173if test ${vi_cv_path_python3_conf+y}
7174then :
7175 printf %s "(cached) " >&6
7176else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007177
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007178 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007179 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007180 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7181 if test "x$d" = "x"; then
7182 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7183 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007184 if test -d "$d" && test -f "$d/config.c"; then
7185 vi_cv_path_python3_conf="$d"
7186 else
7187 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7188 for subdir in lib64 lib share; do
7189 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7190 if test -d "$d" && test -f "$d/config.c"; then
7191 vi_cv_path_python3_conf="$d"
7192 fi
7193 done
7194 done
7195 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007196
7197fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7199printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007200
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007201 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007202
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007203 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7205printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007206 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007207
Illia Bobyra96d5442023-08-30 16:30:15 +02007208 if test ${vi_cv_path_python3_plibs+y}
7209then :
7210 printf %s "(cached) " >&6
7211else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007212
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007213 pwd=`pwd`
7214 tmp_mkf="$pwd/config-PyMake$$"
7215 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007216__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007217 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007218 @echo "python3_LIBS='$(LIBS)'"
7219 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007220 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007221 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007222 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007223eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007224 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7225 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007226 vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007227 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7228 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7229 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
7230
7231fi
7232
Illia Bobyra96d5442023-08-30 16:30:15 +02007233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7234printf %s "checking Python3's dll name... " >&6; }
7235if test ${vi_cv_dll_name_python3+y}
7236then :
7237 printf %s "(cached) " >&6
7238else $as_nop
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007239
7240 if test "X$python3_DLLLIBRARY" != "X"; then
7241 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007242 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7243 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007244 else
7245 vi_cv_dll_name_python3="$python3_INSTSONAME"
7246 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007247
7248fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7250printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007251
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007252 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007253 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7254 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007255 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007256 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007257 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007258 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7259 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7260 fi
7261 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7262 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7263 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007264 PYTHON3_SRC="if_python3.c"
7265 PYTHON3_OBJ="objects/if_python3.o"
7266
Illia Bobyra96d5442023-08-30 16:30:15 +02007267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7268printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007269 threadsafe_flag=
7270 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007271 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007272 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007273 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007274 threadsafe_flag="-D_THREAD_SAFE"
7275 thread_lib="-pthread"
7276 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007277 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007278 threadsafe_flag="-pthreads"
7279 fi
7280 fi
7281 libs_save_old=$LIBS
7282 if test -n "$threadsafe_flag"; then
7283 cflags_save=$CFLAGS
7284 CFLAGS="$CFLAGS $threadsafe_flag"
7285 LIBS="$LIBS $thread_lib"
7286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007287/* end confdefs.h. */
7288
7289int
Illia Bobyra96d5442023-08-30 16:30:15 +02007290main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007291{
7292
7293 ;
7294 return 0;
7295}
7296_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007297if ac_fn_c_try_link "$LINENO"
7298then :
7299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7300printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
7301else $as_nop
7302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7303printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007304
7305fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007306rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007307 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007308 CFLAGS=$cflags_save
7309 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007312 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007313
Illia Bobyra96d5442023-08-30 16:30:15 +02007314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7315printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007316 cflags_save=$CFLAGS
7317 libs_save=$LIBS
7318 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7319 LIBS="$LIBS $PYTHON3_LIBS"
7320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007321/* end confdefs.h. */
7322
7323int
Illia Bobyra96d5442023-08-30 16:30:15 +02007324main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007325{
7326
7327 ;
7328 return 0;
7329}
7330_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007331if ac_fn_c_try_link "$LINENO"
7332then :
7333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7334printf "%s\n" "yes" >&6; }; python3_ok=yes
7335else $as_nop
7336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7337printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007338fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007339rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007340 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007341 CFLAGS=$cflags_save
7342 LIBS=$libs_save
7343 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007344 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007345
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007346 else
7347 LIBS=$libs_save_old
7348 PYTHON3_SRC=
7349 PYTHON3_OBJ=
7350 PYTHON3_LIBS=
7351 PYTHON3_CFLAGS=
7352 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007353 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007354 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7356printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007357 fi
7358 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007359 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007360 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007361 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007362fi
7363
7364
7365
7366
7367
7368
ichizok8bb3fe42021-12-28 15:51:45 +00007369
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007370if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007371 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007372
Illia Bobyra96d5442023-08-30 16:30:15 +02007373 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007374
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007375 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007376 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007377
7378 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7380printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007381 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007382 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007383 libs_save=$LIBS
7384 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007385 if test "$cross_compiling" = yes
7386then :
7387 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7388printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007389as_fn_error $? "cannot run test program while cross compiling
7390See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007391else $as_nop
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7393/* end confdefs.h. */
7394
7395 #include <dlfcn.h>
7396 /* If this program fails, then RTLD_GLOBAL is needed.
7397 * RTLD_GLOBAL will be used and then it is not possible to
7398 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007399 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007400 */
7401
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007402 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007403 {
7404 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007405 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007406 if (pylib != 0)
7407 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007408 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007409 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7410 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7411 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007412 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007413 (*init)();
7414 needed = (*simple)("import termios") == -1;
7415 (*final)();
7416 dlclose(pylib);
7417 }
7418 return !needed;
7419 }
7420
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007421 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007422 {
7423 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007424 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007425 not_needed = 1;
7426 return !not_needed;
7427 }
7428_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007429if ac_fn_c_try_run "$LINENO"
7430then :
7431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7432printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007433
Illia Bobyra96d5442023-08-30 16:30:15 +02007434else $as_nop
7435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7436printf "%s\n" "no" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007437fi
7438rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7439 conftest.$ac_objext conftest.beam conftest.$ac_ext
7440fi
7441
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007442
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007443 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007444 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007445
Illia Bobyra96d5442023-08-30 16:30:15 +02007446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7447printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007448 cflags_save=$CFLAGS
7449 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007450 libs_save=$LIBS
7451 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007452 if test "$cross_compiling" = yes
7453then :
7454 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7455printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007456as_fn_error $? "cannot run test program while cross compiling
7457See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007458else $as_nop
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7460/* end confdefs.h. */
7461
7462 #include <dlfcn.h>
7463 #include <wchar.h>
7464 /* If this program fails, then RTLD_GLOBAL is needed.
7465 * RTLD_GLOBAL will be used and then it is not possible to
7466 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007467 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007468 */
7469
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007470 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007471 {
7472 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007473 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007474 if (pylib != 0)
7475 {
7476 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7477 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7478 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7479 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7480 (*pfx)(prefix);
7481 (*init)();
7482 needed = (*simple)("import termios") == -1;
7483 (*final)();
7484 dlclose(pylib);
7485 }
7486 return !needed;
7487 }
7488
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007489 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007490 {
7491 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007492 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007493 not_needed = 1;
7494 return !not_needed;
7495 }
7496_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007497if ac_fn_c_try_run "$LINENO"
7498then :
7499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7500printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007501
Illia Bobyra96d5442023-08-30 16:30:15 +02007502else $as_nop
7503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504printf "%s\n" "no" >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007505fi
7506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7507 conftest.$ac_objext conftest.beam conftest.$ac_ext
7508fi
7509
7510
7511 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007512 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007513
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007514 PYTHON_SRC="if_python.c"
7515 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007516 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007517 PYTHON_LIBS=
7518 PYTHON3_SRC="if_python3.c"
7519 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007520 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007521 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007522elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007523 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007524
7525 PYTHON_SRC="if_python.c"
7526 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007527 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007528 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007529elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7531printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007532 cflags_save=$CFLAGS
7533 libs_save=$LIBS
7534 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7535 LIBS="$LIBS $PYTHON_LIBS"
7536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7537/* end confdefs.h. */
7538
7539int
Illia Bobyra96d5442023-08-30 16:30:15 +02007540main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007541{
7542
7543 ;
7544 return 0;
7545}
7546_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007547if ac_fn_c_try_link "$LINENO"
7548then :
7549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7550printf "%s\n" "yes" >&6; }; fpie_ok=yes
7551else $as_nop
7552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7553printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007554fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007555rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007556 conftest$ac_exeext conftest.$ac_ext
7557 CFLAGS=$cflags_save
7558 LIBS=$libs_save
7559 if test $fpie_ok = yes; then
7560 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7561 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007562elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007563 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007564
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007565 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007566 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007567
7568 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007569 PYTHON3_SRC="if_python3.c"
7570 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007571 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007572 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007573elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7575printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007576 cflags_save=$CFLAGS
7577 libs_save=$LIBS
7578 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7579 LIBS="$LIBS $PYTHON3_LIBS"
7580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7581/* end confdefs.h. */
7582
7583int
Illia Bobyra96d5442023-08-30 16:30:15 +02007584main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007585{
7586
7587 ;
7588 return 0;
7589}
7590_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007591if ac_fn_c_try_link "$LINENO"
7592then :
7593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7594printf "%s\n" "yes" >&6; }; fpie_ok=yes
7595else $as_nop
7596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7597printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007598fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007599rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007600 conftest$ac_exeext conftest.$ac_ext
7601 CFLAGS=$cflags_save
7602 LIBS=$libs_save
7603 if test $fpie_ok = yes; then
7604 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7605 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007606fi
7607
Illia Bobyra96d5442023-08-30 16:30:15 +02007608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7609printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007610# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007611if test ${enable_tclinterp+y}
7612then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007613 enableval=$enable_tclinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007614else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007615 enable_tclinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007616fi
7617
Illia Bobyra96d5442023-08-30 16:30:15 +02007618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7619printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007620
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007621if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007622
Illia Bobyra96d5442023-08-30 16:30:15 +02007623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7624printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007625
Bram Moolenaar446cb832008-06-24 21:56:24 +00007626# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007627if test ${with_tclsh+y}
7628then :
7629 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7630printf "%s\n" "$tclsh_name" >&6; }
7631else $as_nop
7632 tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007634fi
7635
Bram Moolenaar071d4272004-06-13 20:20:40 +00007636 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7637set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639printf %s "checking for $ac_word... " >&6; }
7640if test ${ac_cv_path_vi_cv_path_tcl+y}
7641then :
7642 printf %s "(cached) " >&6
7643else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007644 case $vi_cv_path_tcl in
7645 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007646 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7647 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007648 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7650for as_dir in $PATH
7651do
7652 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007653 case $as_dir in #(((
7654 '') as_dir=./ ;;
7655 */) ;;
7656 *) as_dir=$as_dir/ ;;
7657 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007658 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007659 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7660 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7661 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007662 break 2
7663 fi
7664done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007665 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007666IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007667
Bram Moolenaar071d4272004-06-13 20:20:40 +00007668 ;;
7669esac
7670fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007671vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007672if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7674printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007675else
Illia Bobyra96d5442023-08-30 16:30:15 +02007676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7677printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007678fi
7679
Bram Moolenaar071d4272004-06-13 20:20:40 +00007680
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007681
Bram Moolenaar446cb832008-06-24 21:56:24 +00007682
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007683 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7684 tclsh_name="tclsh8.4"
7685 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7686set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7688printf %s "checking for $ac_word... " >&6; }
7689if test ${ac_cv_path_vi_cv_path_tcl+y}
7690then :
7691 printf %s "(cached) " >&6
7692else $as_nop
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007693 case $vi_cv_path_tcl in
7694 [\\/]* | ?:[\\/]*)
7695 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7696 ;;
7697 *)
7698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7699for as_dir in $PATH
7700do
7701 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007702 case $as_dir in #(((
7703 '') as_dir=./ ;;
7704 */) ;;
7705 *) as_dir=$as_dir/ ;;
7706 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007707 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007708 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7709 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7710 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007711 break 2
7712 fi
7713done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007714 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007715IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007716
7717 ;;
7718esac
7719fi
7720vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007721if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7723printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007724else
Illia Bobyra96d5442023-08-30 16:30:15 +02007725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7726printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007727fi
7728
Bram Moolenaar446cb832008-06-24 21:56:24 +00007729
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007730 fi
7731 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007732 tclsh_name="tclsh8.2"
7733 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7734set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7736printf %s "checking for $ac_word... " >&6; }
7737if test ${ac_cv_path_vi_cv_path_tcl+y}
7738then :
7739 printf %s "(cached) " >&6
7740else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007741 case $vi_cv_path_tcl in
7742 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007743 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7744 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007745 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7747for as_dir in $PATH
7748do
7749 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007750 case $as_dir in #(((
7751 '') as_dir=./ ;;
7752 */) ;;
7753 *) as_dir=$as_dir/ ;;
7754 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007755 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007756 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7757 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7758 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007759 break 2
7760 fi
7761done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007762 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007763IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007764
Bram Moolenaar071d4272004-06-13 20:20:40 +00007765 ;;
7766esac
7767fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007768vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007769if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7771printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007772else
Illia Bobyra96d5442023-08-30 16:30:15 +02007773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007775fi
7776
Bram Moolenaar446cb832008-06-24 21:56:24 +00007777
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007778 fi
7779 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7780 tclsh_name="tclsh8.0"
7781 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7782set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7784printf %s "checking for $ac_word... " >&6; }
7785if test ${ac_cv_path_vi_cv_path_tcl+y}
7786then :
7787 printf %s "(cached) " >&6
7788else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007789 case $vi_cv_path_tcl in
7790 [\\/]* | ?:[\\/]*)
7791 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7792 ;;
7793 *)
7794 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7795for as_dir in $PATH
7796do
7797 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007798 case $as_dir in #(((
7799 '') as_dir=./ ;;
7800 */) ;;
7801 *) as_dir=$as_dir/ ;;
7802 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007803 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007804 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7805 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7806 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007807 break 2
7808 fi
7809done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007810 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007811IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007812
7813 ;;
7814esac
7815fi
7816vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007817if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7819printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007820else
Illia Bobyra96d5442023-08-30 16:30:15 +02007821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7822printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007823fi
7824
Bram Moolenaar446cb832008-06-24 21:56:24 +00007825
Bram Moolenaar071d4272004-06-13 20:20:40 +00007826 fi
7827 if test "X$vi_cv_path_tcl" = "X"; then
7828 tclsh_name="tclsh"
7829 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7830set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7832printf %s "checking for $ac_word... " >&6; }
7833if test ${ac_cv_path_vi_cv_path_tcl+y}
7834then :
7835 printf %s "(cached) " >&6
7836else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007837 case $vi_cv_path_tcl in
7838 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007839 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7840 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007841 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7843for as_dir in $PATH
7844do
7845 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007846 case $as_dir in #(((
7847 '') as_dir=./ ;;
7848 */) ;;
7849 *) as_dir=$as_dir/ ;;
7850 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007851 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007852 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7853 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7854 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007855 break 2
7856 fi
7857done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007858 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007859IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007860
Bram Moolenaar071d4272004-06-13 20:20:40 +00007861 ;;
7862esac
7863fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007864vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007865if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7867printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007868else
Illia Bobyra96d5442023-08-30 16:30:15 +02007869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7870printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007871fi
7872
Bram Moolenaar446cb832008-06-24 21:56:24 +00007873
Bram Moolenaar071d4272004-06-13 20:20:40 +00007874 fi
7875 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7877printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007878 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007879 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02007880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7881printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00007882 tclloc=`echo 'set l [info library];set i [string last lib $l];incr i -2;puts [string range $l 0 $i]' | $vi_cv_path_tcl -`
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007883 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007884
Illia Bobyra96d5442023-08-30 16:30:15 +02007885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7886printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007887 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00007888 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007889 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007890 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /System/Library/Frameworks/Tcl.framework/Headers `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework/Versions/Current/Headers"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007891 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00007892 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00007893 for try in $tclinc; do
7894 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7896printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007897 TCL_INC=$try
7898 break
7899 fi
7900 done
7901 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7903printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007904 SKIP_TCL=YES
7905 fi
7906 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7908printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007909 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007910 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007911 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007912 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007913 tclcnf=`echo $tclinc | sed s/include/lib/g`
7914 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007915 fi
7916 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01007917 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7919printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007920 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007921 if test "$enable_tclinterp" = "dynamic"; then
7922 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7923 else
7924 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7925 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00007926 TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007927 break
7928 fi
7929 done
7930 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7932printf "%s\n" "<not found>" >&6; }
7933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7934printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007935 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007936 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007937 for ext in .so .a ; do
7938 for ver in "" $tclver ; do
7939 for try in $tcllib ; do
7940 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01007941 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7943printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007944 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007945 if test "$vim_cv_uname_output" = SunOS &&
7946 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007947 TCL_LIBS="$TCL_LIBS -R $try"
7948 fi
7949 break 3
7950 fi
7951 done
7952 done
7953 done
7954 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7956printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007957 SKIP_TCL=YES
7958 fi
7959 fi
7960 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007961 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007962
7963 TCL_SRC=if_tcl.c
7964 TCL_OBJ=objects/if_tcl.o
7965 TCL_PRO=if_tcl.pro
7966 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7967 fi
7968 fi
7969 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
7971printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007972 fi
7973 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007974 if test "$enable_tclinterp" = "dynamic"; then
7975 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007976 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007977
7978 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
7979 fi
7980 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01007981 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007982 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01007983 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007984fi
7985
7986
7987
7988
7989
7990
ichizok8bb3fe42021-12-28 15:51:45 +00007991
Illia Bobyra96d5442023-08-30 16:30:15 +02007992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
7993printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007994# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007995if test ${enable_rubyinterp+y}
7996then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007997 enableval=$enable_rubyinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007998else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007999 enable_rubyinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008000fi
8001
Illia Bobyra96d5442023-08-30 16:30:15 +02008002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8003printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008004if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008005 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008006 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008007 fi
8008
Illia Bobyra96d5442023-08-30 16:30:15 +02008009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8010printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008011
Bram Moolenaar948733a2011-05-05 18:10:16 +02008012
Bram Moolenaar165641d2010-02-17 16:23:09 +01008013# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008014if test ${with_ruby_command+y}
8015then :
8016 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8017printf "%s\n" "$RUBY_CMD" >&6; }
8018else $as_nop
8019 RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8020printf "%s\n" "defaulting to $RUBY_CMD" >&6; }
Bram Moolenaar165641d2010-02-17 16:23:09 +01008021fi
8022
Bram Moolenaar165641d2010-02-17 16:23:09 +01008023 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8024set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8026printf %s "checking for $ac_word... " >&6; }
8027if test ${ac_cv_path_vi_cv_path_ruby+y}
8028then :
8029 printf %s "(cached) " >&6
8030else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008031 case $vi_cv_path_ruby in
8032 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008033 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8034 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008035 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8037for as_dir in $PATH
8038do
8039 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008040 case $as_dir in #(((
8041 '') as_dir=./ ;;
8042 */) ;;
8043 *) as_dir=$as_dir/ ;;
8044 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008045 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008046 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8047 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8048 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008049 break 2
8050 fi
8051done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008052 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008053IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008054
Bram Moolenaar071d4272004-06-13 20:20:40 +00008055 ;;
8056esac
8057fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008058vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008059if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8061printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008062else
Illia Bobyra96d5442023-08-30 16:30:15 +02008063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8064printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008065fi
8066
Bram Moolenaar446cb832008-06-24 21:56:24 +00008067
Bram Moolenaar071d4272004-06-13 20:20:40 +00008068 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8070printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008071 if $vi_cv_path_ruby -e 'RUBY_VERSION >= "1.9.1" or exit 1' >/dev/null 2>/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8073printf "%s\n" "OK" >&6; }
8074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8075printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008076 ruby_rbconfig="RbConfig"
8077 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8078 ruby_rbconfig="Config"
8079 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8081printf "%s\n" "$ruby_rbconfig" >&6; }
8082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8083printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008084 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008085 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8087printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008088 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008089 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8090 if test -d "$rubyarchdir"; then
8091 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008092 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008093 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008094 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008095 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008096 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008097 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008098 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008099 if test "X$rubylibs" != "X"; then
8100 RUBY_LIBS="$rubylibs"
8101 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008102 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8103 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008104 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Bram Moolenaard5a986f2020-12-06 21:11:31 +01008105 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008106 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8107 elif test "$librubyarg" = "libruby.a"; then
8108 librubyarg="-lruby"
8109 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008110 fi
8111
8112 if test "X$librubyarg" != "X"; then
8113 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8114 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008115
8116
Bram Moolenaar071d4272004-06-13 20:20:40 +00008117 RUBY_SRC="if_ruby.c"
8118 RUBY_OBJ="objects/if_ruby.o"
8119 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008120 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008121
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008122 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008123 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008124 if test -z "$libruby_soname"; then
8125 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8126 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008127 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008128
Bram Moolenaar41a41412020-01-07 21:32:19 +01008129 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008130 RUBY_LIBS=
8131 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008132 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8133 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8134 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008135 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8137printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008138 fi
8139 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8141printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008142 fi
8143 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008144
8145 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008146 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008147 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008148fi
8149
8150
8151
8152
8153
8154
ichizok8bb3fe42021-12-28 15:51:45 +00008155
Illia Bobyra96d5442023-08-30 16:30:15 +02008156{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8157printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008158# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008159if test ${enable_cscope+y}
8160then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008161 enableval=$enable_cscope;
Illia Bobyra96d5442023-08-30 16:30:15 +02008162else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008163 enable_cscope="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008164fi
8165
Illia Bobyra96d5442023-08-30 16:30:15 +02008166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8167printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008168if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008169 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008170
8171fi
8172
Illia Bobyra96d5442023-08-30 16:30:15 +02008173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8174printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008175# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008176if test ${enable_netbeans+y}
8177then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008178 enableval=$enable_netbeans;
Illia Bobyra96d5442023-08-30 16:30:15 +02008179else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008180 enable_netbeans="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008181fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008182
Bram Moolenaar446cb832008-06-24 21:56:24 +00008183if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008184 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8186printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008187 enable_netbeans="no"
8188 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8190printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008191 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008192else
Illia Bobyra96d5442023-08-30 16:30:15 +02008193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8194printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008195fi
8196
Illia Bobyra96d5442023-08-30 16:30:15 +02008197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8198printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008199# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008200if test ${enable_channel+y}
8201then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008202 enableval=$enable_channel;
Illia Bobyra96d5442023-08-30 16:30:15 +02008203else $as_nop
Bram Moolenaare0874f82016-01-24 20:36:41 +01008204 enable_channel="yes"
8205fi
8206
8207if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008208 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8210printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008211 enable_channel="no"
8212 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8214printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008215 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008216else
Bram Moolenaar16435482016-01-24 21:31:54 +01008217 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8219printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008220 enable_netbeans="no"
8221 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8223printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008224 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008225fi
8226
Bram Moolenaar16435482016-01-24 21:31:54 +01008227if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008228 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8230printf %s "checking for socket in -lnetwork... " >&6; }
8231if test ${ac_cv_lib_network_socket+y}
8232then :
8233 printf %s "(cached) " >&6
8234else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008235 ac_check_lib_save_LIBS=$LIBS
8236LIBS="-lnetwork $LIBS"
8237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238/* end confdefs.h. */
8239
8240/* Override any GCC internal prototype to avoid an error.
8241 Use char because int might match the return type of a GCC
8242 builtin and then its argument prototype would still apply. */
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008243char socket ();
8244int
Illia Bobyra96d5442023-08-30 16:30:15 +02008245main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008246{
8247return socket ();
8248 ;
8249 return 0;
8250}
8251_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008252if ac_fn_c_try_link "$LINENO"
8253then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008254 ac_cv_lib_network_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008255else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008256 ac_cv_lib_network_socket=no
8257fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008258rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008259 conftest$ac_exeext conftest.$ac_ext
8260LIBS=$ac_check_lib_save_LIBS
8261fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8263printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8264if test "x$ac_cv_lib_network_socket" = xyes
8265then :
8266 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008267
8268 LIBS="-lnetwork $LIBS"
8269
8270fi
8271
8272 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8274printf %s "checking for socket in -lsocket... " >&6; }
8275if test ${ac_cv_lib_socket_socket+y}
8276then :
8277 printf %s "(cached) " >&6
8278else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008279 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008280LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008282/* end confdefs.h. */
8283
Bram Moolenaar446cb832008-06-24 21:56:24 +00008284/* Override any GCC internal prototype to avoid an error.
8285 Use char because int might match the return type of a GCC
8286 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008287char socket ();
8288int
Illia Bobyra96d5442023-08-30 16:30:15 +02008289main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008290{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008291return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008292 ;
8293 return 0;
8294}
8295_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008296if ac_fn_c_try_link "$LINENO"
8297then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008298 ac_cv_lib_socket_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008299else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008300 ac_cv_lib_socket_socket=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008301fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008302rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008303 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008304LIBS=$ac_check_lib_save_LIBS
8305fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8307printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8308if test "x$ac_cv_lib_socket_socket" = xyes
8309then :
8310 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008311
8312 LIBS="-lsocket $LIBS"
8313
Bram Moolenaar071d4272004-06-13 20:20:40 +00008314fi
8315
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008316 fi
8317
Illia Bobyra96d5442023-08-30 16:30:15 +02008318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8319printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8320if test ${vim_cv_ipv6_networking+y}
8321then :
8322 printf %s "(cached) " >&6
8323else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8325/* end confdefs.h. */
8326
8327#include <stdio.h>
8328#include <stdlib.h>
8329#include <stdarg.h>
8330#include <fcntl.h>
8331#include <netdb.h>
8332#include <netinet/in.h>
8333#include <errno.h>
8334#include <sys/types.h>
8335#include <sys/socket.h>
8336 /* Check bitfields */
8337 struct nbbuf {
8338 unsigned int initDone:1;
8339 unsigned short signmaplen;
8340 };
8341
8342int
Illia Bobyra96d5442023-08-30 16:30:15 +02008343main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008344{
8345
8346 /* Check creating a socket. */
8347 struct sockaddr_in server;
8348 struct addrinfo *res;
8349 (void)socket(AF_INET, SOCK_STREAM, 0);
8350 (void)htons(100);
8351 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8352 if (errno == ECONNREFUSED)
8353 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8354 (void)freeaddrinfo(res);
8355
8356 ;
8357 return 0;
8358}
8359_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008360if ac_fn_c_try_link "$LINENO"
8361then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008362 vim_cv_ipv6_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008363else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008364 vim_cv_ipv6_networking="no"
8365fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008366rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008367 conftest$ac_exeext conftest.$ac_ext
8368fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008369{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8370printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008371
8372 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008373 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008374
Illia Bobyra96d5442023-08-30 16:30:15 +02008375 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8376if test "x$ac_cv_func_inet_ntop" = xyes
8377then :
8378 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008379
8380fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008381
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008382 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8384printf %s "checking for gethostbyname in -lnsl... " >&6; }
8385if test ${ac_cv_lib_nsl_gethostbyname+y}
8386then :
8387 printf %s "(cached) " >&6
8388else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008389 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008390LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008392/* end confdefs.h. */
8393
Bram Moolenaar446cb832008-06-24 21:56:24 +00008394/* Override any GCC internal prototype to avoid an error.
8395 Use char because int might match the return type of a GCC
8396 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008397char gethostbyname ();
8398int
Illia Bobyra96d5442023-08-30 16:30:15 +02008399main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008400{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008401return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008402 ;
8403 return 0;
8404}
8405_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008406if ac_fn_c_try_link "$LINENO"
8407then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008408 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008409else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008410 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008411fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008412rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008413 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008414LIBS=$ac_check_lib_save_LIBS
8415fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8417printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8418if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8419then :
8420 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008421
8422 LIBS="-lnsl $LIBS"
8423
Bram Moolenaar071d4272004-06-13 20:20:40 +00008424fi
8425
Illia Bobyra96d5442023-08-30 16:30:15 +02008426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8427printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8428if test ${vim_cv_ipv4_networking+y}
8429then :
8430 printf %s "(cached) " >&6
8431else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008433/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008434
8435#include <stdio.h>
8436#include <stdlib.h>
8437#include <stdarg.h>
8438#include <fcntl.h>
8439#include <netdb.h>
8440#include <netinet/in.h>
8441#include <errno.h>
8442#include <sys/types.h>
8443#include <sys/socket.h>
8444 /* Check bitfields */
8445 struct nbbuf {
8446 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008447 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008448 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008449
8450int
Illia Bobyra96d5442023-08-30 16:30:15 +02008451main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008452{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008453
8454 /* Check creating a socket. */
8455 struct sockaddr_in server;
8456 (void)socket(AF_INET, SOCK_STREAM, 0);
8457 (void)htons(100);
8458 (void)gethostbyname("microsoft.com");
8459 if (errno == ECONNREFUSED)
8460 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008461
8462 ;
8463 return 0;
8464}
8465_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008466if ac_fn_c_try_link "$LINENO"
8467then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008468 vim_cv_ipv4_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008469else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008470 vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008471fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008472rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008473 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00008474fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008475{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8476printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008477 fi
8478fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008479if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008480 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008481
8482 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008483
Bram Moolenaar071d4272004-06-13 20:20:40 +00008484 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008485
Bram Moolenaar071d4272004-06-13 20:20:40 +00008486fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008487if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008488 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008489
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008490 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008491
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008492 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008493
8494fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008495
Illia Bobyra96d5442023-08-30 16:30:15 +02008496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8497printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008498# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008499if test ${enable_terminal+y}
8500then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008501 enableval=$enable_terminal;
Illia Bobyra96d5442023-08-30 16:30:15 +02008502else $as_nop
Bram Moolenaar595a4022017-09-03 19:15:57 +02008503 enable_terminal="auto"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008504fi
8505
Bram Moolenaar595a4022017-09-03 19:15:57 +02008506if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008507 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8509printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008510 enable_terminal="no"
8511 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008512 if test "$enable_terminal" = "auto"; then
8513 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8515printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008516 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8518printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008519 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008520 fi
8521else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008522 if test "$enable_terminal" = "auto"; then
8523 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8525printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008526 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8528printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008529 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008530fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008531if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008532 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008533
Bram Moolenaar93268052019-10-10 13:22:54 +02008534 TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/creen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008535
Bram Moolenaar93268052019-10-10 13:22:54 +02008536 TERM_OBJ="objects/vterm_encoding.o objects/vterm_keyboard.o objects/vterm_mouse.o objects/vterm_parser.o objects/vterm_pen.o objects/vterm_screen.o objects/vterm_state.o objects/vterm_unicode.o objects/vterm_vterm.o"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008537
Bram Moolenaar823edd12019-10-23 22:35:36 +02008538 TERM_TEST="test_libvterm"
8539
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008540fi
8541
Illia Bobyra96d5442023-08-30 16:30:15 +02008542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8543printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008544# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008545if test ${enable_autoservername+y}
8546then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008547 enableval=$enable_autoservername;
Illia Bobyra96d5442023-08-30 16:30:15 +02008548else $as_nop
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008549 enable_autoservername="no"
8550fi
8551
Illia Bobyra96d5442023-08-30 16:30:15 +02008552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8553printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008554if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008555 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008556
8557fi
8558
Illia Bobyra96d5442023-08-30 16:30:15 +02008559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8560printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008561# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008562if test ${enable_multibyte+y}
8563then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008564 enableval=$enable_multibyte;
Illia Bobyra96d5442023-08-30 16:30:15 +02008565else $as_nop
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008566 enable_multibyte="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008567fi
8568
Illia Bobyra96d5442023-08-30 16:30:15 +02008569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8570printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008571if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008572 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8573 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008574fi
8575
Illia Bobyra96d5442023-08-30 16:30:15 +02008576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8577printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008578# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008579if test ${enable_rightleft+y}
8580then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008581 enableval=$enable_rightleft;
Illia Bobyra96d5442023-08-30 16:30:15 +02008582else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008583 enable_rightleft="yes"
8584fi
8585
8586if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8588printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008589else
Illia Bobyra96d5442023-08-30 16:30:15 +02008590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8591printf "%s\n" "yes" >&6; }
8592 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008593
8594fi
8595
Illia Bobyra96d5442023-08-30 16:30:15 +02008596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8597printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008598# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008599if test ${enable_arabic+y}
8600then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008601 enableval=$enable_arabic;
Illia Bobyra96d5442023-08-30 16:30:15 +02008602else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008603 enable_arabic="yes"
8604fi
8605
8606if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8608printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008609else
Illia Bobyra96d5442023-08-30 16:30:15 +02008610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8611printf "%s\n" "yes" >&6; }
8612 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008613
8614fi
8615
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008616# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008617if test ${enable_farsi+y}
8618then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008619 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008620fi
8621
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008622
Illia Bobyra96d5442023-08-30 16:30:15 +02008623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8624printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008625# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008626if test ${enable_xim+y}
8627then :
8628 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8629printf "%s\n" "$enable_xim" >&6; }
8630else $as_nop
8631 enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8632printf "%s\n" "defaulting to auto" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008633fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008634
Bram Moolenaar446cb832008-06-24 21:56:24 +00008635
Illia Bobyra96d5442023-08-30 16:30:15 +02008636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8637printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008638# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008639if test ${enable_fontset+y}
8640then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008641 enableval=$enable_fontset;
Illia Bobyra96d5442023-08-30 16:30:15 +02008642else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008643 enable_fontset="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008644fi
8645
Illia Bobyra96d5442023-08-30 16:30:15 +02008646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8647printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008648
8649test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02008650test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00008651if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8653printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008654else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008655
Bram Moolenaar071d4272004-06-13 20:20:40 +00008656 # Extract the first word of "xmkmf", so it can be a program name with args.
8657set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8659printf %s "checking for $ac_word... " >&6; }
8660if test ${ac_cv_path_xmkmfpath+y}
8661then :
8662 printf %s "(cached) " >&6
8663else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008664 case $xmkmfpath in
8665 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008666 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8667 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008668 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008669 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8670for as_dir in $PATH
8671do
8672 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008673 case $as_dir in #(((
8674 '') as_dir=./ ;;
8675 */) ;;
8676 *) as_dir=$as_dir/ ;;
8677 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008678 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008679 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8680 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
8681 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008682 break 2
8683 fi
8684done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008685 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008686IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008687
Bram Moolenaar071d4272004-06-13 20:20:40 +00008688 ;;
8689esac
8690fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008691xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00008692if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8694printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008695else
Illia Bobyra96d5442023-08-30 16:30:15 +02008696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8697printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008698fi
8699
8700
Bram Moolenaar446cb832008-06-24 21:56:24 +00008701
Illia Bobyra96d5442023-08-30 16:30:15 +02008702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8703printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008704
Bram Moolenaar071d4272004-06-13 20:20:40 +00008705
Bram Moolenaar446cb832008-06-24 21:56:24 +00008706# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008707if test ${with_x+y}
8708then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008709 withval=$with_x;
8710fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008711
8712# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8713if test "x$with_x" = xno; then
8714 # The user explicitly disabled X.
8715 have_x=disabled
8716else
Bram Moolenaar446cb832008-06-24 21:56:24 +00008717 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01008718 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008719 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8720then :
8721 printf %s "(cached) " >&6
8722else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008723 # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02008724ac_x_includes=no
8725ac_x_libraries=no
8726# Do we need to do anything special at all?
8727ac_save_LIBS=$LIBS
8728LIBS="-lX11 $LIBS"
8729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8730/* end confdefs.h. */
8731#include <X11/Xlib.h>
8732int
8733main (void)
8734{
8735XrmInitialize ()
8736 ;
8737 return 0;
8738}
8739_ACEOF
8740if ac_fn_c_try_link "$LINENO"
8741then :
8742 # We can compile and link X programs with no special options.
8743 ac_x_includes=
8744 ac_x_libraries=
8745fi
8746rm -f core conftest.err conftest.$ac_objext conftest.beam \
8747 conftest$ac_exeext conftest.$ac_ext
8748LIBS="$ac_save_LIBS"
8749# If that didn't work, only try xmkmf and file system searches
8750# for native compilation.
8751if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8752then :
8753 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008754if mkdir conftest.dir; then
8755 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008756 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00008757incroot:
8758 @echo incroot='${INCROOT}'
8759usrlibdir:
8760 @echo usrlibdir='${USRLIBDIR}'
8761libdir:
8762 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008763_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00008764 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008765 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008766 for ac_var in incroot usrlibdir libdir; do
8767 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8768 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008769 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008770 for ac_extension in a so sl dylib la dll; do
8771 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8772 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008773 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00008774 fi
8775 done
8776 # Screen out bogus values from the imake configuration. They are
8777 # bogus both because they are the default anyway, and because
8778 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008779 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00008780 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008781 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008782 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008783 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00008784 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008785 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008786 esac
8787 fi
8788 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00008789 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00008790fi
8791
Illia Bobyra96d5442023-08-30 16:30:15 +02008792 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008793# Check X11 before X11Rn because it is often a symlink to the current release.
8794ac_x_header_dirs='
8795/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008796/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008797/usr/X11R6/include
8798/usr/X11R5/include
8799/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00008800
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008801/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008802/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008803/usr/include/X11R6
8804/usr/include/X11R5
8805/usr/include/X11R4
8806
8807/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008808/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008809/usr/local/X11R6/include
8810/usr/local/X11R5/include
8811/usr/local/X11R4/include
8812
8813/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008814/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008815/usr/local/include/X11R6
8816/usr/local/include/X11R5
8817/usr/local/include/X11R4
8818
Illia Bobyra96d5442023-08-30 16:30:15 +02008819/opt/X11/include
8820
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008821/usr/X386/include
8822/usr/x386/include
8823/usr/XFree86/include/X11
8824
8825/usr/include
8826/usr/local/include
8827/usr/unsupported/include
8828/usr/athena/include
8829/usr/local/x11r5/include
8830/usr/lpp/Xamples/include
8831
8832/usr/openwin/include
8833/usr/openwin/share/include'
8834
8835if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008836 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008837 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008839/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008840#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008841_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008842if ac_fn_c_try_cpp "$LINENO"
8843then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00008844 # We can compile using X headers with no special include directory.
8845ac_x_includes=
Illia Bobyra96d5442023-08-30 16:30:15 +02008846else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008847 for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00008848 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008849 ac_x_includes=$ac_dir
8850 break
8851 fi
8852done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008853fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01008854rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008855fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008856
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008857if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008858 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008859 # See if we find them without any special options.
8860 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008861 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00008862 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008864/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008865#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008866int
Illia Bobyra96d5442023-08-30 16:30:15 +02008867main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008868{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008869XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008870 ;
8871 return 0;
8872}
8873_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008874if ac_fn_c_try_link "$LINENO"
8875then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008876 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008877# We can link X programs with no special library path.
8878ac_x_libraries=
Illia Bobyra96d5442023-08-30 16:30:15 +02008879else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008880 LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02008881for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008882do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008883 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00008884 for ac_extension in a so sl dylib la dll; do
8885 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008886 ac_x_libraries=$ac_dir
8887 break 2
8888 fi
8889 done
8890done
8891fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008892rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008893 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008894fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008895
Illia Bobyra96d5442023-08-30 16:30:15 +02008896fi
8897# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008898case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008899 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008900 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02008901 ac_cv_have_x="have_x=no" ;; #(
8902 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008903 # Record where we found X for the cache.
8904 ac_cv_have_x="have_x=yes\
8905 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02008906 ac_x_libraries='$ac_x_libraries'" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00008907esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008908fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00008909;; #(
8910 *) have_x=yes;;
8911 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008912 eval "$ac_cv_have_x"
8913fi # $with_x != no
8914
8915if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8917printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008918 no_x=yes
8919else
8920 # If each of the values was on the command line, it overrides each guess.
8921 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8922 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8923 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008924 ac_cv_have_x="have_x=yes\
8925 ac_x_includes='$x_includes'\
8926 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02008927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8928printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008929fi
8930
8931if test "$no_x" = yes; then
8932 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008933
Illia Bobyra96d5442023-08-30 16:30:15 +02008934printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008935
8936 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8937else
8938 if test -n "$x_includes"; then
8939 X_CFLAGS="$X_CFLAGS -I$x_includes"
8940 fi
8941
8942 # It would also be nice to do this for all -L options, not just this one.
8943 if test -n "$x_libraries"; then
8944 X_LIBS="$X_LIBS -L$x_libraries"
8945 # For Solaris; some versions of Sun CC require a space after -R and
8946 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02008947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8948printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008949 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8950 ac_xsave_c_werror_flag=$ac_c_werror_flag
8951 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008953/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008954
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008955int
Illia Bobyra96d5442023-08-30 16:30:15 +02008956main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008957{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008958
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008959 ;
8960 return 0;
8961}
8962_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008963if ac_fn_c_try_link "$LINENO"
8964then :
8965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8966printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008967 X_LIBS="$X_LIBS -R$x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02008968else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008969 LIBS="$ac_xsave_LIBS -R $x_libraries"
8970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008971/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008972
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008973int
Illia Bobyra96d5442023-08-30 16:30:15 +02008974main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008975{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008976
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008977 ;
8978 return 0;
8979}
8980_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008981if ac_fn_c_try_link "$LINENO"
8982then :
8983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8984printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008985 X_LIBS="$X_LIBS -R $x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02008986else $as_nop
8987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
8988printf "%s\n" "neither works" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008989fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008990rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008991 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00008992fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008993rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008994 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00008995 ac_c_werror_flag=$ac_xsave_c_werror_flag
8996 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008997 fi
8998
8999 # Check for system-dependent libraries X programs must link with.
9000 # Do this before checking for the system-independent R6 libraries
9001 # (-lICE), since we may need -lsocket or whatever for X linking.
9002
9003 if test "$ISC" = yes; then
9004 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9005 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009006 # Martyn Johnson says this is needed for Ultrix, if the X
9007 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009008 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009009 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009011/* end confdefs.h. */
9012
Bram Moolenaar446cb832008-06-24 21:56:24 +00009013/* Override any GCC internal prototype to avoid an error.
9014 Use char because int might match the return type of a GCC
9015 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009016char XOpenDisplay ();
9017int
Illia Bobyra96d5442023-08-30 16:30:15 +02009018main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009019{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009020return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009021 ;
9022 return 0;
9023}
9024_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009025if ac_fn_c_try_link "$LINENO"
9026then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009027
Illia Bobyra96d5442023-08-30 16:30:15 +02009028else $as_nop
9029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9030printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9031if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9032then :
9033 printf %s "(cached) " >&6
9034else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009035 ac_check_lib_save_LIBS=$LIBS
9036LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009038/* end confdefs.h. */
9039
Bram Moolenaar446cb832008-06-24 21:56:24 +00009040/* Override any GCC internal prototype to avoid an error.
9041 Use char because int might match the return type of a GCC
9042 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009043char dnet_ntoa ();
9044int
Illia Bobyra96d5442023-08-30 16:30:15 +02009045main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009046{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009047return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009048 ;
9049 return 0;
9050}
9051_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009052if ac_fn_c_try_link "$LINENO"
9053then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009054 ac_cv_lib_dnet_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009055else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009056 ac_cv_lib_dnet_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009057fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009058rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009059 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009060LIBS=$ac_check_lib_save_LIBS
9061fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9063printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9064if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9065then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009066 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009067fi
9068
9069 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9071printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9072if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9073then :
9074 printf %s "(cached) " >&6
9075else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009076 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009077LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009079/* end confdefs.h. */
9080
Bram Moolenaar446cb832008-06-24 21:56:24 +00009081/* Override any GCC internal prototype to avoid an error.
9082 Use char because int might match the return type of a GCC
9083 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009084char dnet_ntoa ();
9085int
Illia Bobyra96d5442023-08-30 16:30:15 +02009086main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009087{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009088return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009089 ;
9090 return 0;
9091}
9092_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009093if ac_fn_c_try_link "$LINENO"
9094then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009095 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009096else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009097 ac_cv_lib_dnet_stub_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009098fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009099rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009100 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009101LIBS=$ac_check_lib_save_LIBS
9102fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9104printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9105if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9106then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009107 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009108fi
9109
9110 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009111fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009112rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009113 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009114 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009115
9116 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9117 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009118 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009119 # needs -lnsl.
9120 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009121 # on Irix 5.2, according to T.E. Dickey.
9122 # The functions gethostbyname, getservbyname, and inet_addr are
9123 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009124 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009125if test "x$ac_cv_func_gethostbyname" = xyes
9126then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009127
Bram Moolenaar071d4272004-06-13 20:20:40 +00009128fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009129
Bram Moolenaar071d4272004-06-13 20:20:40 +00009130 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9132printf %s "checking for gethostbyname in -lnsl... " >&6; }
9133if test ${ac_cv_lib_nsl_gethostbyname+y}
9134then :
9135 printf %s "(cached) " >&6
9136else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009137 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009138LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009140/* end confdefs.h. */
9141
Bram Moolenaar446cb832008-06-24 21:56:24 +00009142/* Override any GCC internal prototype to avoid an error.
9143 Use char because int might match the return type of a GCC
9144 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009145char gethostbyname ();
9146int
Illia Bobyra96d5442023-08-30 16:30:15 +02009147main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009148{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009149return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009150 ;
9151 return 0;
9152}
9153_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009154if ac_fn_c_try_link "$LINENO"
9155then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009156 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009157else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009158 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009159fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009160rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009161 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009162LIBS=$ac_check_lib_save_LIBS
9163fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9165printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9166if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9167then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009168 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009169fi
9170
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009171 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9173printf %s "checking for gethostbyname in -lbsd... " >&6; }
9174if test ${ac_cv_lib_bsd_gethostbyname+y}
9175then :
9176 printf %s "(cached) " >&6
9177else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009178 ac_check_lib_save_LIBS=$LIBS
9179LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009181/* end confdefs.h. */
9182
Bram Moolenaar446cb832008-06-24 21:56:24 +00009183/* Override any GCC internal prototype to avoid an error.
9184 Use char because int might match the return type of a GCC
9185 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009186char gethostbyname ();
9187int
Illia Bobyra96d5442023-08-30 16:30:15 +02009188main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009189{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009190return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009191 ;
9192 return 0;
9193}
9194_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009195if ac_fn_c_try_link "$LINENO"
9196then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009197 ac_cv_lib_bsd_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009198else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009199 ac_cv_lib_bsd_gethostbyname=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009200fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009201rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009202 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009203LIBS=$ac_check_lib_save_LIBS
9204fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9206printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9207if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9208then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009209 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9210fi
9211
9212 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009213 fi
9214
9215 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9216 # socket/setsockopt and other routines are undefined under SCO ODT
9217 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009218 # on later versions), says Simon Leinen: it contains gethostby*
9219 # variants that don't use the name server (or something). -lsocket
9220 # must be given before -lnsl if both are needed. We assume that
9221 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009222 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009223if test "x$ac_cv_func_connect" = xyes
9224then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009225
Bram Moolenaar071d4272004-06-13 20:20:40 +00009226fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009227
Bram Moolenaar071d4272004-06-13 20:20:40 +00009228 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9230printf %s "checking for connect in -lsocket... " >&6; }
9231if test ${ac_cv_lib_socket_connect+y}
9232then :
9233 printf %s "(cached) " >&6
9234else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009235 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009236LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009238/* end confdefs.h. */
9239
Bram Moolenaar446cb832008-06-24 21:56:24 +00009240/* Override any GCC internal prototype to avoid an error.
9241 Use char because int might match the return type of a GCC
9242 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009243char connect ();
9244int
Illia Bobyra96d5442023-08-30 16:30:15 +02009245main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009246{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009247return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009248 ;
9249 return 0;
9250}
9251_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009252if ac_fn_c_try_link "$LINENO"
9253then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009254 ac_cv_lib_socket_connect=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009255else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009256 ac_cv_lib_socket_connect=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009257fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009258rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009259 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009260LIBS=$ac_check_lib_save_LIBS
9261fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9263printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9264if test "x$ac_cv_lib_socket_connect" = xyes
9265then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009266 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009267fi
9268
9269 fi
9270
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009271 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009272 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009273if test "x$ac_cv_func_remove" = xyes
9274then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009275
Bram Moolenaar071d4272004-06-13 20:20:40 +00009276fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009277
Bram Moolenaar071d4272004-06-13 20:20:40 +00009278 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9280printf %s "checking for remove in -lposix... " >&6; }
9281if test ${ac_cv_lib_posix_remove+y}
9282then :
9283 printf %s "(cached) " >&6
9284else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009285 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009286LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009288/* end confdefs.h. */
9289
Bram Moolenaar446cb832008-06-24 21:56:24 +00009290/* Override any GCC internal prototype to avoid an error.
9291 Use char because int might match the return type of a GCC
9292 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009293char remove ();
9294int
Illia Bobyra96d5442023-08-30 16:30:15 +02009295main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009296{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009297return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009298 ;
9299 return 0;
9300}
9301_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009302if ac_fn_c_try_link "$LINENO"
9303then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009304 ac_cv_lib_posix_remove=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009305else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009306 ac_cv_lib_posix_remove=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009307fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009308rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009309 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009310LIBS=$ac_check_lib_save_LIBS
9311fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9313printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9314if test "x$ac_cv_lib_posix_remove" = xyes
9315then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009316 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009317fi
9318
9319 fi
9320
9321 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009322 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009323if test "x$ac_cv_func_shmat" = xyes
9324then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009325
Bram Moolenaar071d4272004-06-13 20:20:40 +00009326fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009327
Bram Moolenaar071d4272004-06-13 20:20:40 +00009328 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9330printf %s "checking for shmat in -lipc... " >&6; }
9331if test ${ac_cv_lib_ipc_shmat+y}
9332then :
9333 printf %s "(cached) " >&6
9334else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009335 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009336LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009338/* end confdefs.h. */
9339
Bram Moolenaar446cb832008-06-24 21:56:24 +00009340/* Override any GCC internal prototype to avoid an error.
9341 Use char because int might match the return type of a GCC
9342 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009343char shmat ();
9344int
Illia Bobyra96d5442023-08-30 16:30:15 +02009345main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009346{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009347return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009348 ;
9349 return 0;
9350}
9351_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009352if ac_fn_c_try_link "$LINENO"
9353then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009354 ac_cv_lib_ipc_shmat=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009355else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009356 ac_cv_lib_ipc_shmat=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009357fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009358rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009359 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009360LIBS=$ac_check_lib_save_LIBS
9361fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009362{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9363printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9364if test "x$ac_cv_lib_ipc_shmat" = xyes
9365then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009366 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009367fi
9368
9369 fi
9370 fi
9371
9372 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009373 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009374 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9375 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9376 # check for ICE first), but we must link in the order -lSM -lICE or
9377 # we get undefined symbols. So assume we have SM if we have ICE.
9378 # These have to be linked with before -lX11, unlike the other
9379 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009380 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9382printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9383if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9384then :
9385 printf %s "(cached) " >&6
9386else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009387 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009388LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009390/* end confdefs.h. */
9391
Bram Moolenaar446cb832008-06-24 21:56:24 +00009392/* Override any GCC internal prototype to avoid an error.
9393 Use char because int might match the return type of a GCC
9394 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009395char IceConnectionNumber ();
9396int
Illia Bobyra96d5442023-08-30 16:30:15 +02009397main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009398{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009399return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009400 ;
9401 return 0;
9402}
9403_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009404if ac_fn_c_try_link "$LINENO"
9405then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009406 ac_cv_lib_ICE_IceConnectionNumber=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009407else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009408 ac_cv_lib_ICE_IceConnectionNumber=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009409fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009410rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009411 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009412LIBS=$ac_check_lib_save_LIBS
9413fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9415printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9416if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9417then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009418 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009419fi
9420
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009421 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009422
9423fi
9424
9425
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009426 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009427 CFLAGS="$CFLAGS -W c,dll"
9428 LDFLAGS="$LDFLAGS -W l,dll"
9429 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9430 fi
9431
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009432
Bram Moolenaar071d4272004-06-13 20:20:40 +00009433 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9434 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9436printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009437 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009438 if test "$vim_cv_uname_output" = SunOS &&
9439 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009440 X_LIBS="$X_LIBS -R $x_libraries"
9441 fi
9442 fi
9443
9444 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9445 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9447printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009448 X_CFLAGS="$X_CFLAGS -I$x_includes"
9449 fi
9450
9451 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9452 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9453 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9454
9455
Illia Bobyra96d5442023-08-30 16:30:15 +02009456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9457printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009458 cflags_save=$CFLAGS
9459 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009461/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009462#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009463#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009464int
Illia Bobyra96d5442023-08-30 16:30:15 +02009465main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009466{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009467
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009472if ac_fn_c_try_compile "$LINENO"
9473then :
9474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9475printf "%s\n" "yes" >&6; }
9476else $as_nop
9477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9478printf "%s\n" "no" >&6; }; no_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009479fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009480rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009481 CFLAGS=$cflags_save
9482
9483 if test "${no_x-no}" = yes; then
9484 with_x=no
9485 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009486 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009487
9488 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009489
Bram Moolenaar071d4272004-06-13 20:20:40 +00009490
9491 ac_save_LDFLAGS="$LDFLAGS"
9492 LDFLAGS="-L$x_libraries $LDFLAGS"
9493
Illia Bobyra96d5442023-08-30 16:30:15 +02009494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9495printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9496if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9497then :
9498 printf %s "(cached) " >&6
9499else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009500 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009501LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009503/* end confdefs.h. */
9504
Bram Moolenaar446cb832008-06-24 21:56:24 +00009505/* Override any GCC internal prototype to avoid an error.
9506 Use char because int might match the return type of a GCC
9507 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009508char _XdmcpAuthDoIt ();
9509int
Illia Bobyra96d5442023-08-30 16:30:15 +02009510main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009511{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009512return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009513 ;
9514 return 0;
9515}
9516_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009517if ac_fn_c_try_link "$LINENO"
9518then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009519 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009520else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009521 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009522fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009523rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009524 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009525LIBS=$ac_check_lib_save_LIBS
9526fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9528printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9529if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
9530then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009531 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009532fi
9533
9534
Illia Bobyra96d5442023-08-30 16:30:15 +02009535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9536printf %s "checking for IceOpenConnection in -lICE... " >&6; }
9537if test ${ac_cv_lib_ICE_IceOpenConnection+y}
9538then :
9539 printf %s "(cached) " >&6
9540else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009541 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009542LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009544/* end confdefs.h. */
9545
Bram Moolenaar446cb832008-06-24 21:56:24 +00009546/* Override any GCC internal prototype to avoid an error.
9547 Use char because int might match the return type of a GCC
9548 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009549char IceOpenConnection ();
9550int
Illia Bobyra96d5442023-08-30 16:30:15 +02009551main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009552{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009553return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009554 ;
9555 return 0;
9556}
9557_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009558if ac_fn_c_try_link "$LINENO"
9559then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009560 ac_cv_lib_ICE_IceOpenConnection=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009561else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009562 ac_cv_lib_ICE_IceOpenConnection=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009563fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009564rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009565 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009566LIBS=$ac_check_lib_save_LIBS
9567fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009568{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
9569printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9570if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
9571then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009572 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009573fi
9574
9575
9576 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +02009577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9578printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9579if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
9580then :
9581 printf %s "(cached) " >&6
9582else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009583 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009584LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009586/* end confdefs.h. */
9587
Bram Moolenaar446cb832008-06-24 21:56:24 +00009588/* Override any GCC internal prototype to avoid an error.
9589 Use char because int might match the return type of a GCC
9590 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009591char XpmCreatePixmapFromData ();
9592int
Illia Bobyra96d5442023-08-30 16:30:15 +02009593main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009594{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009595return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009596 ;
9597 return 0;
9598}
9599_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009600if ac_fn_c_try_link "$LINENO"
9601then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009602 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009603else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009604 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009605fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009606rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009607 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009608LIBS=$ac_check_lib_save_LIBS
9609fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9611printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9612if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
9613then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009614 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009615fi
9616
9617
Illia Bobyra96d5442023-08-30 16:30:15 +02009618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9619printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009620 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +02009621 if test "$GCC" = yes; then
9622 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9623 else
9624 CFLAGS="$CFLAGS $X_CFLAGS"
9625 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009627/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009628#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009629int
Illia Bobyra96d5442023-08-30 16:30:15 +02009630main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009631{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009632
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009633 ;
9634 return 0;
9635}
9636_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009637if ac_fn_c_try_compile "$LINENO"
9638then :
9639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9640printf "%s\n" "no" >&6; }
9641else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009642 CFLAGS="$CFLAGS -Wno-implicit-int"
9643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009644/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009645#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009646int
Illia Bobyra96d5442023-08-30 16:30:15 +02009647main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009648{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009649
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009650 ;
9651 return 0;
9652}
9653_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009654if ac_fn_c_try_compile "$LINENO"
9655then :
9656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9657printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9658else $as_nop
9659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9660printf "%s\n" "test failed" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009661
Bram Moolenaar071d4272004-06-13 20:20:40 +00009662fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009663rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009664
Bram Moolenaar071d4272004-06-13 20:20:40 +00009665fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009666rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009667 CFLAGS=$cflags_save
9668
9669 LDFLAGS="$ac_save_LDFLAGS"
9670
Mike Gilberta055b442023-08-20 19:01:41 +02009671 # The cast to long int works around a bug in the HP C Compiler
9672# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9673# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9674# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +02009675{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
9676printf %s "checking size of wchar_t... " >&6; }
9677if test ${ac_cv_sizeof_wchar_t+y}
9678then :
9679 printf %s "(cached) " >&6
9680else $as_nop
9681 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
9682then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009683
Illia Bobyra96d5442023-08-30 16:30:15 +02009684else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02009685 if test "$ac_cv_type_wchar_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009686 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9687printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +02009688as_fn_error 77 "cannot compute sizeof (wchar_t)
9689See \`config.log' for more details" "$LINENO" 5; }
9690 else
9691 ac_cv_sizeof_wchar_t=0
9692 fi
9693fi
9694
9695fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009696{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
9697printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02009698
9699
9700
Illia Bobyra96d5442023-08-30 16:30:15 +02009701printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009702
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009703
Mike Gilberta055b442023-08-20 19:01:41 +02009704 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009705 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009706
9707 fi
9708
Bram Moolenaar071d4272004-06-13 20:20:40 +00009709 fi
9710fi
9711
Bram Moolenaard2a05492018-07-27 22:35:15 +02009712if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9713 as_fn_error $? "could not configure X" "$LINENO" 5
9714fi
9715
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009716test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009717
Illia Bobyra96d5442023-08-30 16:30:15 +02009718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9719printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009720# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009721if test ${enable_gui+y}
9722then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009723 enableval=$enable_gui;
Illia Bobyra96d5442023-08-30 16:30:15 +02009724else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009725 enable_gui="auto"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009726fi
9727
Bram Moolenaar071d4272004-06-13 20:20:40 +00009728
9729enable_gui_canon=`echo "_$enable_gui" | \
9730 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9731
Bram Moolenaar071d4272004-06-13 20:20:40 +00009732SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +01009733SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009734SKIP_GNOME=YES
9735SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009736SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009737SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009738GUITYPE=NONE
9739
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009740if test "x$HAIKU" = "xyes"; then
9741 SKIP_HAIKU=
9742 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009743 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9744printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009745 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009746 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9747printf "%s\n" "yes - automatic GUI support" >&6; } ;;
9748 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9749printf "%s\n" "auto - automatic GUI support" >&6; } ;;
9750 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9751printf "%s\n" "Haiku GUI support" >&6; } ;;
9752 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9753printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009754 SKIP_HAIKU=YES ;;
9755 esac
9756elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009757 SKIP_PHOTON=
9758 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009759 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9760printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009761 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009762 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9763printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009764 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009765 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9766printf "%s\n" "Photon GUI support" >&6; } ;;
9767 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9768printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009769 SKIP_PHOTON=YES ;;
9770 esac
9771
Bram Moolenaar040f9752020-08-11 23:08:48 +02009772elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9773 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009774 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9775printf "%s\n" "no GUI support" >&6; } ;;
9776 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9777printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +02009778 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009779 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9780printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
9781 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9782printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +02009783 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009784else
9785
Bram Moolenaar071d4272004-06-13 20:20:40 +00009786 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009787 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9788printf "%s\n" "no GUI support" >&6; } ;;
9789 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9790printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009791 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009792 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +01009793 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009794 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +00009795 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009796 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9797printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009798 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009799 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9800printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009801 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009802 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009803 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9804printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009805 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009806 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9807printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009808 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009809 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9810printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009811 esac
9812
9813fi
9814
Bram Moolenaar071d4272004-06-13 20:20:40 +00009815if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9816 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9818printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009819 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009820if test ${enable_gtk2_check+y}
9821then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009822 enableval=$enable_gtk2_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009823else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009824 enable_gtk2_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009825fi
9826
Illia Bobyra96d5442023-08-30 16:30:15 +02009827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9828printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009829 if test "x$enable_gtk2_check" = "xno"; then
9830 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009831 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009832 fi
9833fi
9834
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009835if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9837printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009838 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009839if test ${enable_gnome_check+y}
9840then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009841 enableval=$enable_gnome_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009842else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009843 enable_gnome_check="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009844fi
9845
Illia Bobyra96d5442023-08-30 16:30:15 +02009846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9847printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009848 if test "x$enable_gnome_check" = "xno"; then
9849 SKIP_GNOME=YES
9850 fi
9851fi
9852
Bram Moolenaar98921892016-02-23 17:14:37 +01009853if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9855printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009856 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009857if test ${enable_gtk3_check+y}
9858then :
Bram Moolenaar98921892016-02-23 17:14:37 +01009859 enableval=$enable_gtk3_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009860else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +01009861 enable_gtk3_check="yes"
9862fi
9863
Illia Bobyra96d5442023-08-30 16:30:15 +02009864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9865printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009866 if test "x$enable_gtk3_check" = "xno"; then
9867 SKIP_GTK3=YES
9868 fi
9869fi
9870
Bram Moolenaar071d4272004-06-13 20:20:40 +00009871if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9873printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009874 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009875if test ${enable_motif_check+y}
9876then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009877 enableval=$enable_motif_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009878else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009879 enable_motif_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009880fi
9881
Illia Bobyra96d5442023-08-30 16:30:15 +02009882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9883printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009884 if test "x$enable_motif_check" = "xno"; then
9885 SKIP_MOTIF=YES
9886 fi
9887fi
9888
Bram Moolenaar071d4272004-06-13 20:20:40 +00009889
9890
9891
9892
9893
9894
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009895if test "X$PKG_CONFIG" = "X"; then
9896 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +01009897 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9898set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009899{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9900printf %s "checking for $ac_word... " >&6; }
9901if test ${ac_cv_path_PKG_CONFIG+y}
9902then :
9903 printf %s "(cached) " >&6
9904else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009905 case $PKG_CONFIG in
9906 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009907 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9908 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009909 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9911for as_dir in $PATH
9912do
9913 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009914 case $as_dir in #(((
9915 '') as_dir=./ ;;
9916 */) ;;
9917 *) as_dir=$as_dir/ ;;
9918 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009919 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009920 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9921 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9922 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009923 break 2
9924 fi
9925done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009926 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009927IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009928
Bram Moolenaar071d4272004-06-13 20:20:40 +00009929 ;;
9930esac
9931fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009932PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +00009933if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9935printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009936else
Illia Bobyra96d5442023-08-30 16:30:15 +02009937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9938printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009939fi
9940
Bram Moolenaar446cb832008-06-24 21:56:24 +00009941
Bram Moolenaard6d30422018-01-28 22:48:55 +01009942fi
9943if test -z "$ac_cv_path_PKG_CONFIG"; then
9944 ac_pt_PKG_CONFIG=$PKG_CONFIG
9945 # Extract the first word of "pkg-config", so it can be a program name with args.
9946set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9948printf %s "checking for $ac_word... " >&6; }
9949if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
9950then :
9951 printf %s "(cached) " >&6
9952else $as_nop
Bram Moolenaard6d30422018-01-28 22:48:55 +01009953 case $ac_pt_PKG_CONFIG in
9954 [\\/]* | ?:[\\/]*)
9955 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9956 ;;
9957 *)
9958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009962 case $as_dir in #(((
9963 '') as_dir=./ ;;
9964 */) ;;
9965 *) as_dir=$as_dir/ ;;
9966 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +01009967 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009968 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9969 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9970 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +01009971 break 2
9972 fi
9973done
9974 done
9975IFS=$as_save_IFS
9976
9977 ;;
9978esac
9979fi
9980ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9981if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9983printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +01009984else
Illia Bobyra96d5442023-08-30 16:30:15 +02009985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +01009987fi
9988
9989 if test "x$ac_pt_PKG_CONFIG" = x; then
9990 PKG_CONFIG="no"
9991 else
9992 case $cross_compiling:$ac_tool_warned in
9993yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +02009994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9995printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +01009996ac_tool_warned=yes ;;
9997esac
9998 PKG_CONFIG=$ac_pt_PKG_CONFIG
9999 fi
10000else
10001 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10002fi
10003
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010004fi
10005
10006
10007if test -z "$SKIP_GTK2"; then
10008
Illia Bobyra96d5442023-08-30 16:30:15 +020010009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10010printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010011 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010012if test ${enable_gtktest+y}
10013then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010014 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010015else $as_nop
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010016 enable_gtktest=yes
10017fi
10018
10019 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10021printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010022 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10024printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010025 fi
10026
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010027 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010028 save_skip_gtk3=$SKIP_GTK3
10029 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010030
Bram Moolenaar071d4272004-06-13 20:20:40 +000010031 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10032 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010033 no_gtk=""
10034 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10035 && $PKG_CONFIG --exists gtk+-2.0; then
10036 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010037 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10039printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010040 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010041 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010042 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10043 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10044 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10045 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10046 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10047 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10048 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10049 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010050 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10051 && $PKG_CONFIG --exists gtk+-3.0; then
10052 {
10053 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10055printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010056
10057 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10058 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10059 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10060 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10061 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10062 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10063 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10064 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10065 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10066 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010067 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10069printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010070 no_gtk=yes
10071 fi
10072
10073 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10074 {
10075 ac_save_CFLAGS="$CFLAGS"
10076 ac_save_LIBS="$LIBS"
10077 CFLAGS="$CFLAGS $GTK_CFLAGS"
10078 LIBS="$LIBS $GTK_LIBS"
10079
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010080 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010081 if test "$cross_compiling" = yes
10082then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010083 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010084else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010086/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010087
10088#include <gtk/gtk.h>
10089#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010090#if STDC_HEADERS
10091# include <stdlib.h>
10092# include <stddef.h>
10093#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010094
10095int
10096main ()
10097{
10098int major, minor, micro;
10099char *tmp_version;
10100
10101system ("touch conf.gtktest");
10102
10103/* HP/UX 9 (%@#!) writes to sscanf strings */
10104tmp_version = g_strdup("$min_gtk_version");
10105if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10106 printf("%s, bad version string\n", "$min_gtk_version");
10107 exit(1);
10108 }
10109
10110if ((gtk_major_version > major) ||
10111 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10112 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10113 (gtk_micro_version >= micro)))
10114{
10115 return 0;
10116}
10117return 1;
10118}
10119
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010120_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010121if ac_fn_c_try_run "$LINENO"
10122then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010123
Illia Bobyra96d5442023-08-30 16:30:15 +020010124else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010125 no_gtk=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010126fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010129fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010130
Bram Moolenaar071d4272004-06-13 20:20:40 +000010131 CFLAGS="$ac_save_CFLAGS"
10132 LIBS="$ac_save_LIBS"
10133 }
10134 fi
10135 if test "x$no_gtk" = x ; then
10136 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10138printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010139 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10141printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010142 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010143 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010144 GTK_LIBNAME="$GTK_LIBS"
10145 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010146 else
10147 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010150 GTK_CFLAGS=""
10151 GTK_LIBS=""
10152 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010153 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10154 as_fn_error $? "could not configure GTK" "$LINENO" 5
10155 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010156 }
10157 fi
10158 }
10159 else
10160 GTK_CFLAGS=""
10161 GTK_LIBS=""
10162 :
10163 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010164
10165
Bram Moolenaar071d4272004-06-13 20:20:40 +000010166 rm -f conf.gtktest
10167
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010168 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010169 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010170 SKIP_MOTIF=YES
10171 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010172
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010173 else
10174 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010175 fi
10176 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010177 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010178 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010179 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010180
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010181
10182
10183
10184
10185
Bram Moolenaar446cb832008-06-24 21:56:24 +000010186# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010187if test ${with_gnome_includes+y}
10188then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010189 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010190
Bram Moolenaar446cb832008-06-24 21:56:24 +000010191fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010192
10193
Bram Moolenaar446cb832008-06-24 21:56:24 +000010194
10195# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010196if test ${with_gnome_libs+y}
10197then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010198 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010199
Bram Moolenaar446cb832008-06-24 21:56:24 +000010200fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010201
10202
Bram Moolenaar446cb832008-06-24 21:56:24 +000010203
10204# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010205if test ${with_gnome+y}
10206then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010207 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010208 want_gnome=yes
10209 have_gnome=yes
10210 else
10211 if test "x$withval" = xno; then
10212 want_gnome=no
10213 else
10214 want_gnome=yes
10215 LDFLAGS="$LDFLAGS -L$withval/lib"
10216 CFLAGS="$CFLAGS -I$withval/include"
10217 gnome_prefix=$withval/lib
10218 fi
10219 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010220else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000010221 want_gnome=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000010222fi
10223
Bram Moolenaar071d4272004-06-13 20:20:40 +000010224
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010225 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010226 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10228printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010229 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10231printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010232 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10233 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10234 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010235
Illia Bobyra96d5442023-08-30 16:30:15 +020010236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10237printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010238 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10240printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010241 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010242 GNOME_LIBS="$GNOME_LIBS -pthread"
10243 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10245printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010246 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010247 have_gnome=yes
10248 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10250printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010251 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010252 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010253 fi
10254 fi
10255 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010256 fi
10257
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010258 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010259 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010260
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010261 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10262 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010263 fi
10264 }
10265 fi
10266 fi
10267fi
10268
Bram Moolenaar98921892016-02-23 17:14:37 +010010269
10270if test -z "$SKIP_GTK3"; then
10271
Illia Bobyra96d5442023-08-30 16:30:15 +020010272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10273printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010274 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010275if test ${enable_gtktest+y}
10276then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010277 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010278else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010279 enable_gtktest=yes
10280fi
10281
10282 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10284printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010285 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10287printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010288 fi
10289
Bram Moolenaar98921892016-02-23 17:14:37 +010010290 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010291 save_skip_gtk2=$SKIP_GTK2
10292 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010293
10294 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10295 {
10296 no_gtk=""
10297 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10298 && $PKG_CONFIG --exists gtk+-2.0; then
10299 {
10300 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10302printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010303 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10304 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10305 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10306 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10307 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10308 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10309 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10310 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10311 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10312 }
10313 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10314 && $PKG_CONFIG --exists gtk+-3.0; then
10315 {
10316 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10318printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010319
10320 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10321 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10322 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10323 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10324 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10325 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10326 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10327 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10328 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10329 }
10330 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10332printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010333 no_gtk=yes
10334 fi
10335
10336 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10337 {
10338 ac_save_CFLAGS="$CFLAGS"
10339 ac_save_LIBS="$LIBS"
10340 CFLAGS="$CFLAGS $GTK_CFLAGS"
10341 LIBS="$LIBS $GTK_LIBS"
10342
10343 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010344 if test "$cross_compiling" = yes
10345then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010346 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010347else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10349/* end confdefs.h. */
10350
10351#include <gtk/gtk.h>
10352#include <stdio.h>
10353#if STDC_HEADERS
10354# include <stdlib.h>
10355# include <stddef.h>
10356#endif
10357
10358int
10359main ()
10360{
10361int major, minor, micro;
10362char *tmp_version;
10363
10364system ("touch conf.gtktest");
10365
10366/* HP/UX 9 (%@#!) writes to sscanf strings */
10367tmp_version = g_strdup("$min_gtk_version");
10368if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10369 printf("%s, bad version string\n", "$min_gtk_version");
10370 exit(1);
10371 }
10372
10373if ((gtk_major_version > major) ||
10374 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10375 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10376 (gtk_micro_version >= micro)))
10377{
10378 return 0;
10379}
10380return 1;
10381}
10382
10383_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010384if ac_fn_c_try_run "$LINENO"
10385then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010386
Illia Bobyra96d5442023-08-30 16:30:15 +020010387else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010388 no_gtk=yes
10389fi
10390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10391 conftest.$ac_objext conftest.beam conftest.$ac_ext
10392fi
10393
10394 CFLAGS="$ac_save_CFLAGS"
10395 LIBS="$ac_save_LIBS"
10396 }
10397 fi
10398 if test "x$no_gtk" = x ; then
10399 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10401printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010402 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10404printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010405 fi
10406 GUI_LIB_LOC="$GTK_LIBDIR"
10407 GTK_LIBNAME="$GTK_LIBS"
10408 GUI_INC_LOC="$GTK_CFLAGS"
10409 else
10410 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10412printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010413 GTK_CFLAGS=""
10414 GTK_LIBS=""
10415 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010416 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10417 as_fn_error $? "could not configure GTK" "$LINENO" 5
10418 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010419 }
10420 fi
10421 }
10422 else
10423 GTK_CFLAGS=""
10424 GTK_LIBS=""
10425 :
10426 fi
10427
10428
10429 rm -f conf.gtktest
10430
10431 if test "x$GTK_CFLAGS" != "x"; then
10432 SKIP_GTK2=YES
10433 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010434 SKIP_MOTIF=YES
10435 GUITYPE=GTK
10436
Illia Bobyra96d5442023-08-30 16:30:15 +020010437 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010438
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010439 else
10440 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010441 fi
10442 fi
10443fi
10444
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010445if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10447printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010448 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10449 if test "x$gdk_pixbuf_version" != x ; then
10450 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10451 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10452 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010453 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10455printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010456 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10457set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10459printf %s "checking for $ac_word... " >&6; }
10460if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10461then :
10462 printf %s "(cached) " >&6
10463else $as_nop
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010464 case $GLIB_COMPILE_RESOURCES in
10465 [\\/]* | ?:[\\/]*)
10466 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10467 ;;
10468 *)
10469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010473 case $as_dir in #(((
10474 '') as_dir=./ ;;
10475 */) ;;
10476 *) as_dir=$as_dir/ ;;
10477 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010478 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010479 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10480 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
10481 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010482 break 2
10483 fi
10484done
10485 done
10486IFS=$as_save_IFS
10487
10488 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
10489 ;;
10490esac
10491fi
10492GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
10493if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
10495printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010496else
Illia Bobyra96d5442023-08-30 16:30:15 +020010497 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10498printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010499fi
10500
10501
Illia Bobyra96d5442023-08-30 16:30:15 +020010502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
10503printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010504 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010505 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020010506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10507printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010508 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10510printf "%s\n" "usable." >&6; }
10511 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010512
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010513 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10514 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010515 fi
10516 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10518printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010519 fi
10520 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10522printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010523 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010524
Illia Bobyra96d5442023-08-30 16:30:15 +020010525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10526printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010527 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010528if test ${enable_icon_cache_update+y}
10529then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010530 enableval=$enable_icon_cache_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010531else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010532 enable_icon_cache_update="yes"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010533fi
10534
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010535 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10537printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010538 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10539set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10541printf %s "checking for $ac_word... " >&6; }
10542if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
10543then :
10544 printf %s "(cached) " >&6
10545else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010546 case $GTK_UPDATE_ICON_CACHE in
10547 [\\/]* | ?:[\\/]*)
10548 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10549 ;;
10550 *)
10551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10552for as_dir in $PATH
10553do
10554 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010555 case $as_dir in #(((
10556 '') as_dir=./ ;;
10557 */) ;;
10558 *) as_dir=$as_dir/ ;;
10559 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010560 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010561 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10562 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
10563 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010564 break 2
10565 fi
10566done
10567 done
10568IFS=$as_save_IFS
10569
10570 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10571 ;;
10572esac
10573fi
10574GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10575if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10577printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010578else
Illia Bobyra96d5442023-08-30 16:30:15 +020010579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10580printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010581fi
10582
10583
10584 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10586printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010587 fi
10588 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10590printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010591 fi
10592
Illia Bobyra96d5442023-08-30 16:30:15 +020010593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10594printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010595 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010596if test ${enable_desktop_database_update+y}
10597then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010598 enableval=$enable_desktop_database_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010599else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010600 enable_desktop_database_update="yes"
10601fi
10602
10603 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10605printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010606 # Extract the first word of "update-desktop-database", so it can be a program name with args.
10607set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10609printf %s "checking for $ac_word... " >&6; }
10610if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
10611then :
10612 printf %s "(cached) " >&6
10613else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010614 case $UPDATE_DESKTOP_DATABASE in
10615 [\\/]* | ?:[\\/]*)
10616 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10617 ;;
10618 *)
10619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10620for as_dir in $PATH
10621do
10622 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010623 case $as_dir in #(((
10624 '') as_dir=./ ;;
10625 */) ;;
10626 *) as_dir=$as_dir/ ;;
10627 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010628 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010629 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10630 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
10631 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010632 break 2
10633 fi
10634done
10635 done
10636IFS=$as_save_IFS
10637
10638 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10639 ;;
10640esac
10641fi
10642UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10643if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10645printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010646else
Illia Bobyra96d5442023-08-30 16:30:15 +020010647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010649fi
10650
10651
10652 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10654printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010655 fi
10656 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10658printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010659 fi
10660fi
10661
10662
10663
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010664
10665
10666
10667
Bram Moolenaar071d4272004-06-13 20:20:40 +000010668if test -z "$SKIP_MOTIF"; then
10669 gui_XXX="/usr/XXX/Motif* /usr/Motif*/XXX /usr/XXX /usr/shlib /usr/X11*/XXX /usr/XXX/X11* /usr/dt/XXX /local/Motif*/XXX /local/XXX/Motif* /usr/local/Motif*/XXX /usr/local/XXX/Motif* /usr/local/XXX /usr/local/X11*/XXX /usr/local/LessTif/Motif*/XXX $MOTIFHOME/XXX"
10670 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10671
Illia Bobyra96d5442023-08-30 16:30:15 +020010672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10673printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010674 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10675 GUI_INC_LOC=
10676 for try in $gui_includes; do
10677 if test -f "$try/Xm/Xm.h"; then
10678 GUI_INC_LOC=$try
10679 fi
10680 done
10681 if test -n "$GUI_INC_LOC"; then
10682 if test "$GUI_INC_LOC" = /usr/include; then
10683 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10685printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010686 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10688printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010689 fi
10690 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10692printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010693 SKIP_MOTIF=YES
10694 fi
10695fi
10696
10697
10698if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10700printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010701
Bram Moolenaar446cb832008-06-24 21:56:24 +000010702# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010703if test ${with_motif_lib+y}
10704then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010705 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
10706fi
10707
Bram Moolenaar071d4272004-06-13 20:20:40 +000010708
10709 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10711printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010712 GUI_LIB_LOC=
10713 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010716
10717 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10718
Illia Bobyra96d5442023-08-30 16:30:15 +020010719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10720printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010010721 gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010722 GUI_LIB_LOC=
10723 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010010724 for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
Bram Moolenaar071d4272004-06-13 20:20:40 +000010725 if test -f "$libtry"; then
10726 GUI_LIB_LOC=$try
10727 fi
10728 done
10729 done
10730 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010010731 if test "$GUI_LIB_LOC" = /usr/lib \
10732 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020010733 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10734 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010735 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10737printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010738 else
10739 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10741printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010742 if test "$vim_cv_uname_output" = SunOS &&
10743 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010744 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10745 fi
10746 fi
10747 fi
10748 MOTIF_LIBNAME=-lXm
10749 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10751printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010752 SKIP_MOTIF=YES
10753 fi
10754 fi
10755fi
10756
10757if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010758 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010759
Bram Moolenaar071d4272004-06-13 20:20:40 +000010760fi
10761
Bram Moolenaare2adcf32022-03-12 11:57:25 +000010762if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010763 if test -n "$GUI_INC_LOC"; then
10764 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10765 fi
10766 if test -n "$GUI_LIB_LOC"; then
10767 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10768 fi
10769
10770 ldflags_save=$LDFLAGS
10771 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10773printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
10774if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
10775then :
10776 printf %s "(cached) " >&6
10777else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010778 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010779LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010781/* end confdefs.h. */
10782
Bram Moolenaar446cb832008-06-24 21:56:24 +000010783/* Override any GCC internal prototype to avoid an error.
10784 Use char because int might match the return type of a GCC
10785 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010786char XShapeQueryExtension ();
10787int
Illia Bobyra96d5442023-08-30 16:30:15 +020010788main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010789{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010790return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010791 ;
10792 return 0;
10793}
10794_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010795if ac_fn_c_try_link "$LINENO"
10796then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010797 ac_cv_lib_Xext_XShapeQueryExtension=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010798else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010799 ac_cv_lib_Xext_XShapeQueryExtension=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010800fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010801rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010802 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010803LIBS=$ac_check_lib_save_LIBS
10804fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10806printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10807if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
10808then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010809 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010810fi
10811
Illia Bobyra96d5442023-08-30 16:30:15 +020010812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10813printf %s "checking for wslen in -lw... " >&6; }
10814if test ${ac_cv_lib_w_wslen+y}
10815then :
10816 printf %s "(cached) " >&6
10817else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010818 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010819LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010821/* end confdefs.h. */
10822
Bram Moolenaar446cb832008-06-24 21:56:24 +000010823/* Override any GCC internal prototype to avoid an error.
10824 Use char because int might match the return type of a GCC
10825 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010826char wslen ();
10827int
Illia Bobyra96d5442023-08-30 16:30:15 +020010828main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010829{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010830return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010831 ;
10832 return 0;
10833}
10834_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010835if ac_fn_c_try_link "$LINENO"
10836then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010837 ac_cv_lib_w_wslen=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010838else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010839 ac_cv_lib_w_wslen=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010840fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010841rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010842 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010843LIBS=$ac_check_lib_save_LIBS
10844fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010845{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10846printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
10847if test "x$ac_cv_lib_w_wslen" = xyes
10848then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010849 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010850fi
10851
Illia Bobyra96d5442023-08-30 16:30:15 +020010852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10853printf %s "checking for dlsym in -ldl... " >&6; }
10854if test ${ac_cv_lib_dl_dlsym+y}
10855then :
10856 printf %s "(cached) " >&6
10857else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010858 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010859LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010861/* end confdefs.h. */
10862
Bram Moolenaar446cb832008-06-24 21:56:24 +000010863/* Override any GCC internal prototype to avoid an error.
10864 Use char because int might match the return type of a GCC
10865 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010866char dlsym ();
10867int
Illia Bobyra96d5442023-08-30 16:30:15 +020010868main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010869{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010870return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010871 ;
10872 return 0;
10873}
10874_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010875if ac_fn_c_try_link "$LINENO"
10876then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010877 ac_cv_lib_dl_dlsym=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010878else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010879 ac_cv_lib_dl_dlsym=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010880fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010881rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010882 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010883LIBS=$ac_check_lib_save_LIBS
10884fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10886printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
10887if test "x$ac_cv_lib_dl_dlsym" = xyes
10888then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010889 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010890fi
10891
Illia Bobyra96d5442023-08-30 16:30:15 +020010892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10893printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10894if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
10895then :
10896 printf %s "(cached) " >&6
10897else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010898 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010899LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010901/* end confdefs.h. */
10902
Bram Moolenaar446cb832008-06-24 21:56:24 +000010903/* Override any GCC internal prototype to avoid an error.
10904 Use char because int might match the return type of a GCC
10905 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010906char XmuCreateStippledPixmap ();
10907int
Illia Bobyra96d5442023-08-30 16:30:15 +020010908main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010909{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010910return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010911 ;
10912 return 0;
10913}
10914_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010915if ac_fn_c_try_link "$LINENO"
10916then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010917 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010918else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010919 ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010920fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010921rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010922 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010923LIBS=$ac_check_lib_save_LIBS
10924fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10926printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10927if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
10928then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010929 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010930fi
10931
10932 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10934printf %s "checking for XpEndJob in -lXp... " >&6; }
10935if test ${ac_cv_lib_Xp_XpEndJob+y}
10936then :
10937 printf %s "(cached) " >&6
10938else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010939 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010940LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010942/* end confdefs.h. */
10943
Bram Moolenaar446cb832008-06-24 21:56:24 +000010944/* Override any GCC internal prototype to avoid an error.
10945 Use char because int might match the return type of a GCC
10946 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010947char XpEndJob ();
10948int
Illia Bobyra96d5442023-08-30 16:30:15 +020010949main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010950{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010951return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010956if ac_fn_c_try_link "$LINENO"
10957then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010958 ac_cv_lib_Xp_XpEndJob=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010959else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010960 ac_cv_lib_Xp_XpEndJob=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010961fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010962rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010963 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010964LIBS=$ac_check_lib_save_LIBS
10965fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
10967printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
10968if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
10969then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010970 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010971fi
10972
10973 fi
10974 LDFLAGS=$ldflags_save
10975
Illia Bobyra96d5442023-08-30 16:30:15 +020010976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
10977printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010978 NARROW_PROTO=
10979 rm -fr conftestdir
10980 if mkdir conftestdir; then
10981 cd conftestdir
10982 cat > Imakefile <<'EOF'
10983acfindx:
10984 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
10985EOF
10986 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10987 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10988 fi
10989 cd ..
10990 rm -fr conftestdir
10991 fi
10992 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010995 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
10997printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010998 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010999
Bram Moolenaar071d4272004-06-13 20:20:40 +000011000fi
11001
11002if test "$enable_xsmp" = "yes"; then
11003 cppflags_save=$CPPFLAGS
11004 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011005 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11006if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11007then :
11008 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011009
11010fi
11011
Bram Moolenaar071d4272004-06-13 20:20:40 +000011012 CPPFLAGS=$cppflags_save
11013fi
11014
11015
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011016if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011017 cppflags_save=$CPPFLAGS
11018 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011019 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11020if test "x$ac_cv_header_X11_xpm_h" = xyes
11021then :
11022 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11023
11024fi
11025ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11026if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11027then :
11028 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011029
11030fi
11031
Bram Moolenaar071d4272004-06-13 20:20:40 +000011032
11033 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11035printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011037/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011038#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011039_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011041 $EGREP "XIMText" >/dev/null 2>&1
11042then :
11043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11044printf "%s\n" "yes" >&6; }
11045else $as_nop
11046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11047printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011048fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011049rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011050
11051 fi
11052 CPPFLAGS=$cppflags_save
11053
Bram Moolenaar54612582019-11-21 17:13:31 +010011054 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11056printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011057 enable_xim="yes"
11058 fi
11059fi
11060
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011061if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011062 cppflags_save=$CPPFLAGS
11063 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11065printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011067/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011068
11069#include <X11/Intrinsic.h>
11070#include <X11/Xmu/Editres.h>
11071int
Illia Bobyra96d5442023-08-30 16:30:15 +020011072main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011073{
11074int i; i = 0;
11075 ;
11076 return 0;
11077}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011078_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011079if ac_fn_c_try_compile "$LINENO"
11080then :
11081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11082printf "%s\n" "yes" >&6; }
11083 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011084
Illia Bobyra96d5442023-08-30 16:30:15 +020011085else $as_nop
11086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11087printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011088fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011089rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011090 CPPFLAGS=$cppflags_save
11091fi
11092
11093if test -z "$SKIP_MOTIF"; then
11094 cppflags_save=$CPPFLAGS
11095 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011096 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011097 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11098if test "x$ac_cv_header_Xm_Xm_h" = xyes
11099then :
11100 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011101
11102fi
11103
Bram Moolenaar77c19352012-06-13 19:19:41 +020011104 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011105 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11106if test "x$ac_cv_header_Xm_Xm_h" = xyes
11107then :
11108 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011109
11110fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011111ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11112if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11113then :
11114 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011115
Illia Bobyra96d5442023-08-30 16:30:15 +020011116fi
11117ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11118if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11119then :
11120 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11121
11122fi
11123ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11124if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11125then :
11126 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11127
11128fi
11129ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11130if test "x$ac_cv_header_Xm_Manager_h" = xyes
11131then :
11132 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11133
11134fi
11135ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11136if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11137then :
11138 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11139
11140fi
11141ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11142if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11143then :
11144 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11145
11146fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011147
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011148 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011149
Bram Moolenaar77c19352012-06-13 19:19:41 +020011150 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11152printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011154/* end confdefs.h. */
11155#include <Xm/XpmP.h>
11156int
Illia Bobyra96d5442023-08-30 16:30:15 +020011157main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011158{
11159XpmAttributes_21 attr;
11160 ;
11161 return 0;
11162}
11163_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011164if ac_fn_c_try_compile "$LINENO"
11165then :
11166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11167printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011168
Illia Bobyra96d5442023-08-30 16:30:15 +020011169else $as_nop
11170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011172
11173
11174fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011175rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011176 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011177 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011178
11179 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011180 CPPFLAGS=$cppflags_save
11181fi
11182
11183if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11185printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011186 enable_xim="no"
11187fi
11188if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11190printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011191 enable_fontset="no"
11192fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011193if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11195printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011196 enable_fontset="no"
11197fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011198
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011199if test -z "$SKIP_HAIKU"; then
11200 GUITYPE=HAIKUGUI
11201fi
11202
Bram Moolenaar071d4272004-06-13 20:20:40 +000011203if test -z "$SKIP_PHOTON"; then
11204 GUITYPE=PHOTONGUI
11205fi
11206
11207
11208
11209
11210
11211
11212if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011213 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011214fi
11215
11216if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011217 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011218
11219fi
11220if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011221 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011222
11223fi
11224
11225
11226
Illia Bobyra96d5442023-08-30 16:30:15 +020011227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11228printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011229if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11231printf "%s\n" "/proc/self/exe" >&6; }
11232 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011233
11234elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11236printf "%s\n" "/proc/self/path/a.out" >&6; }
11237 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011238
11239elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11241printf "%s\n" "/proc/curproc/file" >&6; }
11242 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011243
11244else
Illia Bobyra96d5442023-08-30 16:30:15 +020011245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11246printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011247fi
11248
Illia Bobyra96d5442023-08-30 16:30:15 +020011249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11250printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011251case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011252 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11253printf "%s\n" "yes" >&6; }
11254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11255printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011256 if test "x$with_x" = "xno" ; then
11257 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11259printf "%s\n" "yes" >&6; }
11260 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011261
11262 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11264printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011265 fi ;;
11266
Illia Bobyra96d5442023-08-30 16:30:15 +020011267 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11268printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011269esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011270
Bram Moolenaar071d4272004-06-13 20:20:40 +000011271
Illia Bobyra96d5442023-08-30 16:30:15 +020011272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11273printf %s "checking whether toupper is broken... " >&6; }
11274if test ${vim_cv_toupper_broken+y}
11275then :
11276 printf %s "(cached) " >&6
11277else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011278
Illia Bobyra96d5442023-08-30 16:30:15 +020011279 if test "$cross_compiling" = yes
11280then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011281
Bram Moolenaar7db77842014-03-27 17:40:59 +010011282 as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000011283
Illia Bobyra96d5442023-08-30 16:30:15 +020011284else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11286/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011287
11288#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011289#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011290#if STDC_HEADERS
11291# include <stdlib.h>
11292# include <stddef.h>
11293#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011294int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011295
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011296_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011297if ac_fn_c_try_run "$LINENO"
11298then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011299
11300 vim_cv_toupper_broken=yes
11301
Illia Bobyra96d5442023-08-30 16:30:15 +020011302else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011303
11304 vim_cv_toupper_broken=no
11305
Bram Moolenaar071d4272004-06-13 20:20:40 +000011306fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011309fi
11310
Bram Moolenaar446cb832008-06-24 21:56:24 +000011311fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11313printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011314
11315if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011316 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011317
11318fi
11319
Illia Bobyra96d5442023-08-30 16:30:15 +020011320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11321printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011323/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011324#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011325int
Illia Bobyra96d5442023-08-30 16:30:15 +020011326main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011327{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011328printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011329 ;
11330 return 0;
11331}
11332_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011333if ac_fn_c_try_compile "$LINENO"
11334then :
11335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11336printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011337
Illia Bobyra96d5442023-08-30 16:30:15 +020011338else $as_nop
11339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11340printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011341fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011342rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011343
Illia Bobyra96d5442023-08-30 16:30:15 +020011344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11345printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011347/* end confdefs.h. */
11348#include <stdio.h>
11349int
Illia Bobyra96d5442023-08-30 16:30:15 +020011350main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011351{
11352int x __attribute__((unused));
11353 ;
11354 return 0;
11355}
11356_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011357if ac_fn_c_try_compile "$LINENO"
11358then :
11359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11360printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011361
Illia Bobyra96d5442023-08-30 16:30:15 +020011362else $as_nop
11363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11364printf "%s\n" "no" >&6; }
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011365fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011366rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011367
Illia Bobyra96d5442023-08-30 16:30:15 +020011368ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
11369if test "x$ac_cv_header_elf_h" = xyes
11370then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011371 HAS_ELF=1
Bram Moolenaar071d4272004-06-13 20:20:40 +000011372fi
11373
11374if test "$HAS_ELF" = 1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
11376printf %s "checking for main in -lelf... " >&6; }
11377if test ${ac_cv_lib_elf_main+y}
11378then :
11379 printf %s "(cached) " >&6
11380else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011381 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011382LIBS="-lelf $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011384/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011385
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011386
11387int
Illia Bobyra96d5442023-08-30 16:30:15 +020011388main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011389{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011390return main ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011391 ;
11392 return 0;
11393}
11394_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011395if ac_fn_c_try_link "$LINENO"
11396then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011397 ac_cv_lib_elf_main=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011398else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011399 ac_cv_lib_elf_main=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011400fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011401rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011402 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011403LIBS=$ac_check_lib_save_LIBS
11404fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
11406printf "%s\n" "$ac_cv_lib_elf_main" >&6; }
11407if test "x$ac_cv_lib_elf_main" = xyes
11408then :
11409 printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011410
11411 LIBS="-lelf $LIBS"
11412
Bram Moolenaar071d4272004-06-13 20:20:40 +000011413fi
11414
11415fi
11416
11417ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011418for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011419 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11421printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11422if eval test \${$as_ac_Header+y}
11423then :
11424 printf %s "(cached) " >&6
11425else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011427/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011428#include <sys/types.h>
11429#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011430
11431int
Illia Bobyra96d5442023-08-30 16:30:15 +020011432main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011433{
11434if ((DIR *) 0)
11435return 0;
11436 ;
11437 return 0;
11438}
11439_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011440if ac_fn_c_try_compile "$LINENO"
11441then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011442 eval "$as_ac_Header=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020011443else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011444 eval "$as_ac_Header=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011445fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011446rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011447fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011448eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11450printf "%s\n" "$ac_res" >&6; }
11451if eval test \"x\$"$as_ac_Header"\" = x"yes"
11452then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011453 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011454#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011455_ACEOF
11456
11457ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011458fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011459
Bram Moolenaar071d4272004-06-13 20:20:40 +000011460done
11461# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11462if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11464printf %s "checking for library containing opendir... " >&6; }
11465if test ${ac_cv_search_opendir+y}
11466then :
11467 printf %s "(cached) " >&6
11468else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011469 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011471/* end confdefs.h. */
11472
Bram Moolenaar446cb832008-06-24 21:56:24 +000011473/* Override any GCC internal prototype to avoid an error.
11474 Use char because int might match the return type of a GCC
11475 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011476char opendir ();
11477int
Illia Bobyra96d5442023-08-30 16:30:15 +020011478main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011479{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011480return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011481 ;
11482 return 0;
11483}
11484_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011485for ac_lib in '' dir
11486do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011487 if test -z "$ac_lib"; then
11488 ac_res="none required"
11489 else
11490 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011491 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011492 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011493 if ac_fn_c_try_link "$LINENO"
11494then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011495 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000011496fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011497rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011498 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011499 if test ${ac_cv_search_opendir+y}
11500then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011501 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011502fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011503done
Illia Bobyra96d5442023-08-30 16:30:15 +020011504if test ${ac_cv_search_opendir+y}
11505then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011506
Illia Bobyra96d5442023-08-30 16:30:15 +020011507else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011508 ac_cv_search_opendir=no
11509fi
11510rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011511LIBS=$ac_func_search_save_LIBS
11512fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11514printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011515ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011516if test "$ac_res" != no
11517then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011518 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011519
11520fi
11521
Bram Moolenaar071d4272004-06-13 20:20:40 +000011522else
Illia Bobyra96d5442023-08-30 16:30:15 +020011523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11524printf %s "checking for library containing opendir... " >&6; }
11525if test ${ac_cv_search_opendir+y}
11526then :
11527 printf %s "(cached) " >&6
11528else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011529 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011531/* end confdefs.h. */
11532
Bram Moolenaar446cb832008-06-24 21:56:24 +000011533/* Override any GCC internal prototype to avoid an error.
11534 Use char because int might match the return type of a GCC
11535 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011536char opendir ();
11537int
Illia Bobyra96d5442023-08-30 16:30:15 +020011538main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011539{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011540return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011541 ;
11542 return 0;
11543}
11544_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011545for ac_lib in '' x
11546do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011547 if test -z "$ac_lib"; then
11548 ac_res="none required"
11549 else
11550 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011551 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011552 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011553 if ac_fn_c_try_link "$LINENO"
11554then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011555 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011556fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011557rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011558 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011559 if test ${ac_cv_search_opendir+y}
11560then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011561 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011562fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011563done
Illia Bobyra96d5442023-08-30 16:30:15 +020011564if test ${ac_cv_search_opendir+y}
11565then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011566
Illia Bobyra96d5442023-08-30 16:30:15 +020011567else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011568 ac_cv_search_opendir=no
11569fi
11570rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011571LIBS=$ac_func_search_save_LIBS
11572fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11574printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011575ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011576if test "$ac_res" != no
11577then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011578 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011579
11580fi
11581
11582fi
11583
11584
Bram Moolenaar071d4272004-06-13 20:20:40 +000011585if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11587printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011589/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011590#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011591int
Illia Bobyra96d5442023-08-30 16:30:15 +020011592main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011593{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011594union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011595 ;
11596 return 0;
11597}
11598_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011599if ac_fn_c_try_compile "$LINENO"
11600then :
11601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11602printf "%s\n" "yes" >&6; }
11603 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011604
Illia Bobyra96d5442023-08-30 16:30:15 +020011605 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011606
Illia Bobyra96d5442023-08-30 16:30:15 +020011607else $as_nop
11608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011610fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011611rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011612fi
11613
Illia Bobyra96d5442023-08-30 16:30:15 +020011614ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11615if test "x$ac_cv_header_stdint_h" = xyes
11616then :
11617 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
11618
11619fi
11620ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
11621if test "x$ac_cv_header_stdlib_h" = xyes
11622then :
11623 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
11624
11625fi
11626ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
11627if test "x$ac_cv_header_string_h" = xyes
11628then :
11629 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
11630
11631fi
11632ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
11633if test "x$ac_cv_header_sys_select_h" = xyes
11634then :
11635 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
11636
11637fi
11638ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
11639if test "x$ac_cv_header_sys_utsname_h" = xyes
11640then :
11641 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
11642
11643fi
11644ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
11645if test "x$ac_cv_header_termcap_h" = xyes
11646then :
11647 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
11648
11649fi
11650ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
11651if test "x$ac_cv_header_fcntl_h" = xyes
11652then :
11653 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
11654
11655fi
11656ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
11657if test "x$ac_cv_header_sgtty_h" = xyes
11658then :
11659 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
11660
11661fi
11662ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
11663if test "x$ac_cv_header_sys_ioctl_h" = xyes
11664then :
11665 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
11666
11667fi
11668ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
11669if test "x$ac_cv_header_sys_time_h" = xyes
11670then :
11671 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
11672
11673fi
11674ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
11675if test "x$ac_cv_header_sys_types_h" = xyes
11676then :
11677 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
11678
11679fi
11680ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
11681if test "x$ac_cv_header_termio_h" = xyes
11682then :
11683 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
11684
11685fi
11686ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
11687if test "x$ac_cv_header_iconv_h" = xyes
11688then :
11689 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
11690
11691fi
11692ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11693if test "x$ac_cv_header_inttypes_h" = xyes
11694then :
11695 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11696
11697fi
11698ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11699if test "x$ac_cv_header_langinfo_h" = xyes
11700then :
11701 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
11702
11703fi
11704ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
11705if test "x$ac_cv_header_math_h" = xyes
11706then :
11707 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
11708
11709fi
11710ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11711if test "x$ac_cv_header_unistd_h" = xyes
11712then :
11713 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11714
11715fi
11716ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
11717if test "x$ac_cv_header_stropts_h" = xyes
11718then :
11719 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
11720
11721fi
11722ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
11723if test "x$ac_cv_header_errno_h" = xyes
11724then :
11725 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
11726
11727fi
11728ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
11729if test "x$ac_cv_header_sys_resource_h" = xyes
11730then :
11731 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
11732
11733fi
11734ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
11735if test "x$ac_cv_header_sys_systeminfo_h" = xyes
11736then :
11737 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
11738
11739fi
11740ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11741if test "x$ac_cv_header_locale_h" = xyes
11742then :
11743 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
11744
11745fi
11746ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
11747if test "x$ac_cv_header_sys_stream_h" = xyes
11748then :
11749 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
11750
11751fi
11752ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
11753if test "x$ac_cv_header_termios_h" = xyes
11754then :
11755 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
11756
11757fi
11758ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
11759if test "x$ac_cv_header_libc_h" = xyes
11760then :
11761 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
11762
11763fi
11764ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
11765if test "x$ac_cv_header_sys_statfs_h" = xyes
11766then :
11767 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
11768
11769fi
11770ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
11771if test "x$ac_cv_header_poll_h" = xyes
11772then :
11773 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
11774
11775fi
11776ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
11777if test "x$ac_cv_header_sys_poll_h" = xyes
11778then :
11779 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
11780
11781fi
11782ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
11783if test "x$ac_cv_header_pwd_h" = xyes
11784then :
11785 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
11786
11787fi
11788ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
11789if test "x$ac_cv_header_utime_h" = xyes
11790then :
11791 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
11792
11793fi
11794ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11795if test "x$ac_cv_header_sys_param_h" = xyes
11796then :
11797 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11798
11799fi
11800ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
11801if test "x$ac_cv_header_sys_ptms_h" = xyes
11802then :
11803 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
11804
11805fi
11806ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
11807if test "x$ac_cv_header_libintl_h" = xyes
11808then :
11809 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
11810
11811fi
11812ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
11813if test "x$ac_cv_header_libgen_h" = xyes
11814then :
11815 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
11816
11817fi
11818ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
11819if test "x$ac_cv_header_util_debug_h" = xyes
11820then :
11821 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
11822
11823fi
11824ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
11825if test "x$ac_cv_header_util_msg18n_h" = xyes
11826then :
11827 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
11828
11829fi
11830ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
11831if test "x$ac_cv_header_frame_h" = xyes
11832then :
11833 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
11834
11835fi
11836ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
11837if test "x$ac_cv_header_sys_acl_h" = xyes
11838then :
11839 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
11840
11841fi
11842ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
11843if test "x$ac_cv_header_sys_access_h" = xyes
11844then :
11845 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
11846
11847fi
11848ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
11849if test "x$ac_cv_header_sys_sysinfo_h" = xyes
11850then :
11851 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
11852
11853fi
11854ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11855if test "x$ac_cv_header_wchar_h" = xyes
11856then :
11857 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
11858
11859fi
11860ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11861if test "x$ac_cv_header_wctype_h" = xyes
11862then :
11863 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011864
11865fi
11866
Bram Moolenaar071d4272004-06-13 20:20:40 +000011867
Illia Bobyra96d5442023-08-30 16:30:15 +020011868ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "#if defined HAVE_SYS_STREAM_H
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011869# include <sys/stream.h>
11870#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011871"
Illia Bobyra96d5442023-08-30 16:30:15 +020011872if test "x$ac_cv_header_sys_ptem_h" = xyes
11873then :
11874 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011875
11876fi
11877
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011878
Illia Bobyra96d5442023-08-30 16:30:15 +020011879ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if defined HAVE_SYS_PARAM_H
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011880# include <sys/param.h>
11881#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011882"
Illia Bobyra96d5442023-08-30 16:30:15 +020011883if test "x$ac_cv_header_sys_sysctl_h" = xyes
11884then :
11885 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011886
11887fi
11888
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011889
11890
Illia Bobyra96d5442023-08-30 16:30:15 +020011891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11892printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011894/* end confdefs.h. */
11895
11896#include <pthread.h>
11897#include <pthread_np.h>
11898int
Illia Bobyra96d5442023-08-30 16:30:15 +020011899main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011900{
11901int i; i = 0;
11902 ;
11903 return 0;
11904}
11905_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011906if ac_fn_c_try_compile "$LINENO"
11907then :
11908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11909printf "%s\n" "yes" >&6; }
11910 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011911
Illia Bobyra96d5442023-08-30 16:30:15 +020011912else $as_nop
11913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11914printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011915fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011916rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011917
Illia Bobyra96d5442023-08-30 16:30:15 +020011918ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11919if test "x$ac_cv_header_strings_h" = xyes
11920then :
11921 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011922
11923fi
11924
Bram Moolenaard0573012017-10-28 21:11:06 +020011925if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011926 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000011927
11928else
Bram Moolenaar071d4272004-06-13 20:20:40 +000011929
Illia Bobyra96d5442023-08-30 16:30:15 +020011930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11931printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011932cppflags_save=$CPPFLAGS
11933CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011935/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011936
11937#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11938# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
11939 /* but don't do it on AIX 5.1 (Uribarri) */
11940#endif
11941#ifdef HAVE_XM_XM_H
11942# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
11943#endif
11944#ifdef HAVE_STRING_H
11945# include <string.h>
11946#endif
11947#if defined(HAVE_STRINGS_H)
11948# include <strings.h>
11949#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000011950
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011951int
Illia Bobyra96d5442023-08-30 16:30:15 +020011952main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011953{
11954int i; i = 0;
11955 ;
11956 return 0;
11957}
11958_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011959if ac_fn_c_try_compile "$LINENO"
11960then :
11961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11962printf "%s\n" "yes" >&6; }
11963else $as_nop
11964 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011965
Illia Bobyra96d5442023-08-30 16:30:15 +020011966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011968fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011969rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011970CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000011971fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011972
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011973if test $ac_cv_c_compiler_gnu = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
11975printf %s "checking whether $CC needs -traditional... " >&6; }
11976if test ${ac_cv_prog_gcc_traditional+y}
11977then :
11978 printf %s "(cached) " >&6
11979else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011980 ac_pattern="Autoconf.*'x'"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011982/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011983#include <sgtty.h>
11984Autoconf TIOCGETP
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011985_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011987 $EGREP "$ac_pattern" >/dev/null 2>&1
11988then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011989 ac_cv_prog_gcc_traditional=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011990else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000011991 ac_cv_prog_gcc_traditional=no
11992fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011993rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011994
11995
11996 if test $ac_cv_prog_gcc_traditional = no; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011998/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011999#include <termio.h>
12000Autoconf TCGETA
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012001_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012003 $EGREP "$ac_pattern" >/dev/null 2>&1
12004then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012005 ac_cv_prog_gcc_traditional=yes
12006fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012007rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012008
12009 fi
12010fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012011{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
12012printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012013 if test $ac_cv_prog_gcc_traditional = yes; then
12014 CC="$CC -traditional"
12015 fi
12016fi
12017
Illia Bobyra96d5442023-08-30 16:30:15 +020012018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12019printf %s "checking for an ANSI C-conforming const... " >&6; }
12020if test ${ac_cv_c_const+y}
12021then :
12022 printf %s "(cached) " >&6
12023else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012025/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012026
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012027int
Illia Bobyra96d5442023-08-30 16:30:15 +020012028main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012029{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012030
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012031#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012032 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012033 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012034 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012035 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012036 char const *const *pcpcc;
12037 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012038 /* NEC SVR4.0.2 mips cc rejects this. */
12039 struct point {int x, y;};
12040 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012041 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012042 It does not let you subtract one const X* pointer from another in
12043 an arm of an if-expression whose if-part is not a constant
12044 expression */
12045 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012046 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012047 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012048 ++pcpcc;
12049 ppc = (char**) pcpcc;
12050 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012051 { /* SCO 3.2v4 cc rejects this sort of thing. */
12052 char tx;
12053 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012054 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012055
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012056 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012057 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012058 }
12059 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12060 int x[] = {25, 17};
12061 const int *foo = &x[0];
12062 ++foo;
12063 }
12064 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12065 typedef const int *iptr;
12066 iptr p = 0;
12067 ++p;
12068 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012069 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012070 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012071 struct s { int j; const int *ap[3]; } bx;
12072 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012073 }
12074 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12075 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012076 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012077 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012078 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012079#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012080
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012081 ;
12082 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012083}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012084_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012085if ac_fn_c_try_compile "$LINENO"
12086then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012087 ac_cv_c_const=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012088else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012089 ac_cv_c_const=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012090fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012091rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012092fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012093{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12094printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012095if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012096
Illia Bobyra96d5442023-08-30 16:30:15 +020012097printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012098
12099fi
12100
Illia Bobyra96d5442023-08-30 16:30:15 +020012101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12102printf %s "checking for working volatile... " >&6; }
12103if test ${ac_cv_c_volatile+y}
12104then :
12105 printf %s "(cached) " >&6
12106else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012108/* end confdefs.h. */
12109
12110int
Illia Bobyra96d5442023-08-30 16:30:15 +020012111main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012112{
12113
12114volatile int x;
12115int * volatile y = (int *) 0;
12116return !x && !y;
12117 ;
12118 return 0;
12119}
12120_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012121if ac_fn_c_try_compile "$LINENO"
12122then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012123 ac_cv_c_volatile=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012124else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012125 ac_cv_c_volatile=no
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012126fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012127rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012128fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12130printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012131if test $ac_cv_c_volatile = no; then
12132
Illia Bobyra96d5442023-08-30 16:30:15 +020012133printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012134
12135fi
12136
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012137ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012138if test "x$ac_cv_type_mode_t" = xyes
12139then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012140
Illia Bobyra96d5442023-08-30 16:30:15 +020012141else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012142
Illia Bobyra96d5442023-08-30 16:30:15 +020012143printf "%s\n" "#define mode_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012144
12145fi
12146
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012147ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012148if test "x$ac_cv_type_off_t" = xyes
12149then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012150
Illia Bobyra96d5442023-08-30 16:30:15 +020012151else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012152
Illia Bobyra96d5442023-08-30 16:30:15 +020012153printf "%s\n" "#define off_t long int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012154
12155fi
12156
Bram Moolenaar071d4272004-06-13 20:20:40 +000012157
Illia Bobyra96d5442023-08-30 16:30:15 +020012158 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12159"
12160if test "x$ac_cv_type_pid_t" = xyes
12161then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012162
Illia Bobyra96d5442023-08-30 16:30:15 +020012163else $as_nop
12164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165/* end confdefs.h. */
12166
12167 #if defined _WIN64 && !defined __CYGWIN__
12168 LLP64
12169 #endif
12170
12171int
12172main (void)
12173{
12174
12175 ;
12176 return 0;
12177}
12178
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012179_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012180if ac_fn_c_try_compile "$LINENO"
12181then :
12182 ac_pid_type='int'
12183else $as_nop
12184 ac_pid_type='__int64'
12185fi
12186rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12187
12188printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12189
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012190
12191fi
12192
Illia Bobyra96d5442023-08-30 16:30:15 +020012193
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012194ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012195if test "x$ac_cv_type_size_t" = xyes
12196then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012197
Illia Bobyra96d5442023-08-30 16:30:15 +020012198else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012199
Illia Bobyra96d5442023-08-30 16:30:15 +020012200printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012201
12202fi
12203
Illia Bobyra96d5442023-08-30 16:30:15 +020012204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12205printf %s "checking for uid_t in sys/types.h... " >&6; }
12206if test ${ac_cv_type_uid_t+y}
12207then :
12208 printf %s "(cached) " >&6
12209else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012211/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012212#include <sys/types.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012213
12214_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012216 $EGREP "uid_t" >/dev/null 2>&1
12217then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012218 ac_cv_type_uid_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012219else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012220 ac_cv_type_uid_t=no
12221fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012222rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012223
12224fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12226printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012227if test $ac_cv_type_uid_t = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000012228
Illia Bobyra96d5442023-08-30 16:30:15 +020012229printf "%s\n" "#define uid_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012230
12231
Illia Bobyra96d5442023-08-30 16:30:15 +020012232printf "%s\n" "#define gid_t int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012233
12234fi
12235
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012236ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12237case $ac_cv_c_uint32_t in #(
12238 no|yes) ;; #(
12239 *)
12240
Illia Bobyra96d5442023-08-30 16:30:15 +020012241printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012242
12243
Illia Bobyra96d5442023-08-30 16:30:15 +020012244printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012245;;
12246 esac
12247
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012248
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012249
Illia Bobyrf39842f2023-08-27 18:21:23 +020012250
12251
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012252ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012253if test "x$ac_cv_type_ino_t" = xyes
12254then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012255
Illia Bobyra96d5442023-08-30 16:30:15 +020012256else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012257
Illia Bobyra96d5442023-08-30 16:30:15 +020012258printf "%s\n" "#define ino_t long" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012259
12260fi
12261
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012262ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012263if test "x$ac_cv_type_dev_t" = xyes
12264then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012265
Illia Bobyra96d5442023-08-30 16:30:15 +020012266else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012267
Illia Bobyra96d5442023-08-30 16:30:15 +020012268printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012269
12270fi
12271
Illia Bobyra96d5442023-08-30 16:30:15 +020012272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12273printf %s "checking whether byte ordering is bigendian... " >&6; }
12274if test ${ac_cv_c_bigendian+y}
12275then :
12276 printf %s "(cached) " >&6
12277else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012278 ac_cv_c_bigendian=unknown
12279 # See if we're dealing with a universal compiler.
12280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12281/* end confdefs.h. */
12282#ifndef __APPLE_CC__
12283 not a universal capable compiler
12284 #endif
12285 typedef int dummy;
12286
12287_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012288if ac_fn_c_try_compile "$LINENO"
12289then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012290
12291 # Check for potential -arch flags. It is not universal unless
12292 # there are at least two -arch flags with different values.
12293 ac_arch=
12294 ac_prev=
12295 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12296 if test -n "$ac_prev"; then
12297 case $ac_word in
12298 i?86 | x86_64 | ppc | ppc64)
12299 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12300 ac_arch=$ac_word
12301 else
12302 ac_cv_c_bigendian=universal
12303 break
12304 fi
12305 ;;
12306 esac
12307 ac_prev=
12308 elif test "x$ac_word" = "x-arch"; then
12309 ac_prev=arch
12310 fi
12311 done
12312fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012313rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012314 if test $ac_cv_c_bigendian = unknown; then
12315 # See if sys/param.h defines the BYTE_ORDER macro.
12316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12317/* end confdefs.h. */
12318#include <sys/types.h>
12319 #include <sys/param.h>
12320
12321int
Illia Bobyra96d5442023-08-30 16:30:15 +020012322main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012323{
12324#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12325 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12326 && LITTLE_ENDIAN)
12327 bogus endian macros
12328 #endif
12329
12330 ;
12331 return 0;
12332}
12333_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012334if ac_fn_c_try_compile "$LINENO"
12335then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012336 # It does; now see whether it defined to BIG_ENDIAN or not.
12337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12338/* end confdefs.h. */
12339#include <sys/types.h>
12340 #include <sys/param.h>
12341
12342int
Illia Bobyra96d5442023-08-30 16:30:15 +020012343main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012344{
12345#if BYTE_ORDER != BIG_ENDIAN
12346 not big endian
12347 #endif
12348
12349 ;
12350 return 0;
12351}
12352_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012353if ac_fn_c_try_compile "$LINENO"
12354then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012355 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012356else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012357 ac_cv_c_bigendian=no
12358fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012359rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012360fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012361rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012362 fi
12363 if test $ac_cv_c_bigendian = unknown; then
12364 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12366/* end confdefs.h. */
12367#include <limits.h>
12368
12369int
Illia Bobyra96d5442023-08-30 16:30:15 +020012370main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012371{
12372#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12373 bogus endian macros
12374 #endif
12375
12376 ;
12377 return 0;
12378}
12379_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012380if ac_fn_c_try_compile "$LINENO"
12381then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012382 # It does; now see whether it defined to _BIG_ENDIAN or not.
12383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12384/* end confdefs.h. */
12385#include <limits.h>
12386
12387int
Illia Bobyra96d5442023-08-30 16:30:15 +020012388main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012389{
12390#ifndef _BIG_ENDIAN
12391 not big endian
12392 #endif
12393
12394 ;
12395 return 0;
12396}
12397_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012398if ac_fn_c_try_compile "$LINENO"
12399then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012400 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012401else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012402 ac_cv_c_bigendian=no
12403fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012404rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012405fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012406rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012407 fi
12408 if test $ac_cv_c_bigendian = unknown; then
12409 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012410 if test "$cross_compiling" = yes
12411then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012412 # Try to guess by grepping values from an object file.
12413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12414/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012415unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012416 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012417 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012418 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12419 int use_ascii (int i) {
12420 return ascii_mm[i] + ascii_ii[i];
12421 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012422 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012423 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012424 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012425 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12426 int use_ebcdic (int i) {
12427 return ebcdic_mm[i] + ebcdic_ii[i];
12428 }
12429 extern int foo;
12430
12431int
Illia Bobyra96d5442023-08-30 16:30:15 +020012432main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012433{
12434return use_ascii (foo) == use_ebcdic (foo);
12435 ;
12436 return 0;
12437}
12438_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012439if ac_fn_c_try_compile "$LINENO"
12440then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012441 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12442 ac_cv_c_bigendian=yes
12443 fi
12444 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12445 if test "$ac_cv_c_bigendian" = unknown; then
12446 ac_cv_c_bigendian=no
12447 else
12448 # finding both strings is unlikely to happen, but who knows?
12449 ac_cv_c_bigendian=unknown
12450 fi
12451 fi
12452fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012453rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12454else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12456/* end confdefs.h. */
12457$ac_includes_default
12458int
Illia Bobyra96d5442023-08-30 16:30:15 +020012459main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012460{
12461
12462 /* Are we little or big endian? From Harbison&Steele. */
12463 union
12464 {
12465 long int l;
12466 char c[sizeof (long int)];
12467 } u;
12468 u.l = 1;
12469 return u.c[sizeof (long int) - 1] == 1;
12470
12471 ;
12472 return 0;
12473}
12474_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012475if ac_fn_c_try_run "$LINENO"
12476then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012477 ac_cv_c_bigendian=no
Illia Bobyra96d5442023-08-30 16:30:15 +020012478else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012479 ac_cv_c_bigendian=yes
12480fi
12481rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12482 conftest.$ac_objext conftest.beam conftest.$ac_ext
12483fi
12484
12485 fi
12486fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12488printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012489 case $ac_cv_c_bigendian in #(
12490 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020012491 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012492;; #(
12493 no)
12494 ;; #(
12495 universal)
12496
Illia Bobyra96d5442023-08-30 16:30:15 +020012497printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012498
12499 ;; #(
12500 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010012501 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012502 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12503 esac
12504
Illia Bobyra96d5442023-08-30 16:30:15 +020012505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12506printf %s "checking for inline... " >&6; }
12507if test ${ac_cv_c_inline+y}
12508then :
12509 printf %s "(cached) " >&6
12510else $as_nop
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012511 ac_cv_c_inline=no
12512for ac_kw in inline __inline__ __inline; do
12513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12514/* end confdefs.h. */
12515#ifndef __cplusplus
12516typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020012517static $ac_kw foo_t static_foo (void) {return 0; }
12518$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012519#endif
12520
12521_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012522if ac_fn_c_try_compile "$LINENO"
12523then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012524 ac_cv_c_inline=$ac_kw
12525fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012526rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012527 test "$ac_cv_c_inline" != no && break
12528done
12529
12530fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12532printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012533
12534case $ac_cv_c_inline in
12535 inline | yes) ;;
12536 *)
12537 case $ac_cv_c_inline in
12538 no) ac_val=;;
12539 *) ac_val=$ac_cv_c_inline;;
12540 esac
12541 cat >>confdefs.h <<_ACEOF
12542#ifndef __cplusplus
12543#define inline $ac_val
12544#endif
12545_ACEOF
12546 ;;
12547esac
12548
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012549
Illia Bobyra96d5442023-08-30 16:30:15 +020012550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
12551printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012552if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
12554printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012555else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012557/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012558
12559#include <sys/types.h>
12560#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012561# include <stdlib.h>
12562# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012563#endif
12564#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000012565# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012566#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012567
12568_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012570 $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
12571then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012572 ac_cv_type_rlim_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012573else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012574 ac_cv_type_rlim_t=no
12575fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012576rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012577
Illia Bobyra96d5442023-08-30 16:30:15 +020012578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
12579printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012580fi
12581if test $ac_cv_type_rlim_t = no; then
12582 cat >> confdefs.h <<\EOF
12583#define rlim_t unsigned long
12584EOF
12585fi
12586
Illia Bobyra96d5442023-08-30 16:30:15 +020012587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
12588printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012589if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
12591printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012592else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012594/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012595
12596#include <sys/types.h>
12597#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012598# include <stdlib.h>
12599# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012600#endif
12601#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012602
12603_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012605 $EGREP "stack_t" >/dev/null 2>&1
12606then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012607 ac_cv_type_stack_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012608else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012609 ac_cv_type_stack_t=no
12610fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012611rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012612
Illia Bobyra96d5442023-08-30 16:30:15 +020012613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
12614printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012615fi
12616if test $ac_cv_type_stack_t = no; then
12617 cat >> confdefs.h <<\EOF
12618#define stack_t struct sigaltstack
12619EOF
12620fi
12621
Illia Bobyra96d5442023-08-30 16:30:15 +020012622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
12623printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012625/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012626
12627#include <sys/types.h>
12628#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012629# include <stdlib.h>
12630# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012631#endif
12632#include <signal.h>
12633#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012634
12635int
Illia Bobyra96d5442023-08-30 16:30:15 +020012636main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012637{
12638stack_t sigstk; sigstk.ss_base = 0;
12639 ;
12640 return 0;
12641}
12642_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012643if ac_fn_c_try_compile "$LINENO"
12644then :
12645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12646printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012647
Illia Bobyra96d5442023-08-30 16:30:15 +020012648else $as_nop
12649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12650printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012651fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012652rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012653
12654olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020012655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
12656printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012657
Bram Moolenaar446cb832008-06-24 21:56:24 +000012658# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020012659if test ${with_tlib+y}
12660then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012661 withval=$with_tlib;
12662fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012663
12664if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
12666printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012667 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020012668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
12669printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012671/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012672
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012673int
Illia Bobyra96d5442023-08-30 16:30:15 +020012674main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012675{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012676
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012677 ;
12678 return 0;
12679}
12680_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012681if ac_fn_c_try_link "$LINENO"
12682then :
12683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
12684printf "%s\n" "OK" >&6; }
12685else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012686 as_fn_error $? "FAILED" "$LINENO" 5
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012687fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012688rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012689 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012690 olibs="$LIBS"
12691else
Illia Bobyra96d5442023-08-30 16:30:15 +020012692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
12693printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000012694 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010012695 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
12696 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012697 esac
12698 for libname in $tlibs; do
Illia Bobyra96d5442023-08-30 16:30:15 +020012699 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | $as_tr_sh`
12700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
12701printf %s "checking for tgetent in -l${libname}... " >&6; }
12702if eval test \${$as_ac_Lib+y}
12703then :
12704 printf %s "(cached) " >&6
12705else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012706 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000012707LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012709/* end confdefs.h. */
12710
Bram Moolenaar446cb832008-06-24 21:56:24 +000012711/* Override any GCC internal prototype to avoid an error.
12712 Use char because int might match the return type of a GCC
12713 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012714char tgetent ();
12715int
Illia Bobyra96d5442023-08-30 16:30:15 +020012716main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012717{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012718return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012719 ;
12720 return 0;
12721}
12722_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012723if ac_fn_c_try_link "$LINENO"
12724then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012725 eval "$as_ac_Lib=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020012726else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012727 eval "$as_ac_Lib=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012728fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012729rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012730 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012731LIBS=$ac_check_lib_save_LIBS
12732fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012733eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020012734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12735printf "%s\n" "$ac_res" >&6; }
12736if eval test \"x\$"$as_ac_Lib"\" = x"yes"
12737then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012738 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012739#define `printf "%s\n" "HAVE_LIB${libname}" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012740_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012741
12742 LIBS="-l${libname} $LIBS"
12743
Bram Moolenaar071d4272004-06-13 20:20:40 +000012744fi
12745
12746 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012747 if test "$cross_compiling" = yes
12748then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012749 res="FAIL"
Illia Bobyra96d5442023-08-30 16:30:15 +020012750else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012752/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012753
12754#ifdef HAVE_TERMCAP_H
12755# include <termcap.h>
12756#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012757#if STDC_HEADERS
12758# include <stdlib.h>
12759# include <stddef.h>
12760#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012761int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012762_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012763if ac_fn_c_try_run "$LINENO"
12764then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012765 res="OK"
Illia Bobyra96d5442023-08-30 16:30:15 +020012766else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012767 res="FAIL"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012768fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012769rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12770 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012771fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012772
Bram Moolenaar071d4272004-06-13 20:20:40 +000012773 if test "$res" = "OK"; then
12774 break
12775 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12777printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012778 LIBS="$olibs"
12779 fi
12780 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012781 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12783printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012784 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012785fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012786
12787if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12789printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012791/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020012792int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012793int
Illia Bobyra96d5442023-08-30 16:30:15 +020012794main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012795{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012796char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012797 ;
12798 return 0;
12799}
12800_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012801if ac_fn_c_try_link "$LINENO"
12802then :
12803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12804printf "%s\n" "yes" >&6; }
12805else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012806 as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012807 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020012808 On Linux that would be the libncurses-dev package.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012809 Or specify the name of the library with --with-tlib." "$LINENO" 5
12810fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012811rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012812 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012813fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012814
Illia Bobyra96d5442023-08-30 16:30:15 +020012815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12816printf %s "checking whether we talk terminfo... " >&6; }
12817if test ${vim_cv_terminfo+y}
12818then :
12819 printf %s "(cached) " >&6
12820else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012821
Illia Bobyra96d5442023-08-30 16:30:15 +020012822 if test "$cross_compiling" = yes
12823then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012824
Bram Moolenaar7db77842014-03-27 17:40:59 +010012825 as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012826
Illia Bobyra96d5442023-08-30 16:30:15 +020012827else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12829/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012830
Bram Moolenaar446cb832008-06-24 21:56:24 +000012831#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012832#ifdef HAVE_TERMCAP_H
12833# include <termcap.h>
12834#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012835#ifdef HAVE_STRING_H
12836# include <string.h>
12837#endif
12838#if STDC_HEADERS
12839# include <stdlib.h>
12840# include <stddef.h>
12841#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012842int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012843{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012844
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012845_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012846if ac_fn_c_try_run "$LINENO"
12847then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012848
12849 vim_cv_terminfo=no
12850
Illia Bobyra96d5442023-08-30 16:30:15 +020012851else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012852
12853 vim_cv_terminfo=yes
12854
12855fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12857 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012858fi
12859
12860
Bram Moolenaar446cb832008-06-24 21:56:24 +000012861fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012862{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12863printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012864
12865if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012866 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012867
12868fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012869
Illia Bobyra96d5442023-08-30 16:30:15 +020012870{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12871printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
12872if test ${vim_cv_tgetent+y}
12873then :
12874 printf %s "(cached) " >&6
12875else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012876
Illia Bobyra96d5442023-08-30 16:30:15 +020012877 if test "$cross_compiling" = yes
12878then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012879
Bram Moolenaar696cbd22017-04-28 15:45:46 +020012880 as_fn_error $? "failed to compile test program." "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012881
Illia Bobyra96d5442023-08-30 16:30:15 +020012882else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12884/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012885
Bram Moolenaar446cb832008-06-24 21:56:24 +000012886#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012887#ifdef HAVE_TERMCAP_H
12888# include <termcap.h>
12889#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012890#if STDC_HEADERS
12891# include <stdlib.h>
12892# include <stddef.h>
12893#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012894int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012895{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012896
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012897_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012898if ac_fn_c_try_run "$LINENO"
12899then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012900
Bram Moolenaara88254f2017-11-02 23:04:14 +010012901 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000012902
Illia Bobyra96d5442023-08-30 16:30:15 +020012903else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012904
Bram Moolenaara88254f2017-11-02 23:04:14 +010012905 vim_cv_tgetent=non-zero
Bram Moolenaar446cb832008-06-24 21:56:24 +000012906
Bram Moolenaar071d4272004-06-13 20:20:40 +000012907fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012910fi
12911
Bram Moolenaar446cb832008-06-24 21:56:24 +000012912
Bram Moolenaar446cb832008-06-24 21:56:24 +000012913fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12915printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012916
Bram Moolenaara88254f2017-11-02 23:04:14 +010012917if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012918 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012919
Bram Moolenaar446cb832008-06-24 21:56:24 +000012920fi
12921
Illia Bobyra96d5442023-08-30 16:30:15 +020012922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12923printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012925/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012926
12927#ifdef HAVE_TERMCAP_H
12928# include <termcap.h>
12929#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012930
12931int
Illia Bobyra96d5442023-08-30 16:30:15 +020012932main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012933{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012934ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012935 ;
12936 return 0;
12937}
12938_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012939if ac_fn_c_try_link "$LINENO"
12940then :
12941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12942printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012943
Illia Bobyra96d5442023-08-30 16:30:15 +020012944else $as_nop
12945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12946printf "%s\n" "no" >&6; }
12947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12948printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012950/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012951
12952#ifdef HAVE_TERMCAP_H
12953# include <termcap.h>
12954#endif
12955extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012956
12957int
Illia Bobyra96d5442023-08-30 16:30:15 +020012958main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012959{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012960ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012961 ;
12962 return 0;
12963}
12964_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012965if ac_fn_c_try_link "$LINENO"
12966then :
12967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12968printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012969
Illia Bobyra96d5442023-08-30 16:30:15 +020012970else $as_nop
12971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12972printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012973fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012974rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012975 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012976
12977fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012978rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012979 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012980
Illia Bobyra96d5442023-08-30 16:30:15 +020012981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
12982printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012984/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012985
12986#ifdef HAVE_TERMCAP_H
12987# include <termcap.h>
12988#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012989
12990int
Illia Bobyra96d5442023-08-30 16:30:15 +020012991main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012992{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012993if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012994 ;
12995 return 0;
12996}
12997_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012998if ac_fn_c_try_link "$LINENO"
12999then :
13000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13001printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013002
Illia Bobyra96d5442023-08-30 16:30:15 +020013003else $as_nop
13004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13005printf "%s\n" "no" >&6; }
13006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13007printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013009/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013010
13011#ifdef HAVE_TERMCAP_H
13012# include <termcap.h>
13013#endif
13014extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013015
13016int
Illia Bobyra96d5442023-08-30 16:30:15 +020013017main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013018{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013019if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013020 ;
13021 return 0;
13022}
13023_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013024if ac_fn_c_try_link "$LINENO"
13025then :
13026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13027printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013028
Illia Bobyra96d5442023-08-30 16:30:15 +020013029else $as_nop
13030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13031printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013032fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013033rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013034 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013035
13036fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013037rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013038 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013039
Illia Bobyra96d5442023-08-30 16:30:15 +020013040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13041printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013043/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013044
13045#ifdef HAVE_TERMCAP_H
13046# include <termcap.h>
13047#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013048
13049int
Illia Bobyra96d5442023-08-30 16:30:15 +020013050main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013051{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013052extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013053 ;
13054 return 0;
13055}
13056_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013057if ac_fn_c_try_compile "$LINENO"
13058then :
13059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13060printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013061
Illia Bobyra96d5442023-08-30 16:30:15 +020013062else $as_nop
13063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13064printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013065fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013067
Illia Bobyra96d5442023-08-30 16:30:15 +020013068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13069printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13071/* end confdefs.h. */
13072
13073#ifdef HAVE_TERMCAP_H
13074# include <termcap.h>
13075#endif
13076#include <term.h>
13077
13078int
Illia Bobyra96d5442023-08-30 16:30:15 +020013079main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013080{
13081if (cur_term) del_curterm(cur_term);
13082 ;
13083 return 0;
13084}
13085_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013086if ac_fn_c_try_link "$LINENO"
13087then :
13088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13089printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013090
Illia Bobyra96d5442023-08-30 16:30:15 +020013091else $as_nop
13092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13093printf "%s\n" "no" >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013094fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013095rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013096 conftest$ac_exeext conftest.$ac_ext
13097
Illia Bobyra96d5442023-08-30 16:30:15 +020013098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13099printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013101/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013102
13103#include <sys/types.h>
13104#include <sys/time.h>
13105#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013106int
Illia Bobyra96d5442023-08-30 16:30:15 +020013107main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013108{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013109
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013110 ;
13111 return 0;
13112}
13113_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013114if ac_fn_c_try_compile "$LINENO"
13115then :
13116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13117printf "%s\n" "yes" >&6; }
13118 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013119
Illia Bobyra96d5442023-08-30 16:30:15 +020013120else $as_nop
13121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13122printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013123fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013124rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013125
Illia Bobyra96d5442023-08-30 16:30:15 +020013126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13127printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013128if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013129 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013130
Illia Bobyra96d5442023-08-30 16:30:15 +020013131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13132printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013133else
Illia Bobyra96d5442023-08-30 16:30:15 +020013134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13135printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013136fi
13137
Illia Bobyra96d5442023-08-30 16:30:15 +020013138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13139printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013140if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013142/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013143
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013144// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13145char *ptsname(int);
13146int unlockpt(int);
13147int grantpt(int);
13148
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013149int
Illia Bobyra96d5442023-08-30 16:30:15 +020013150main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013151{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013152
13153 ptsname(0);
13154 grantpt(0);
13155 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013156 ;
13157 return 0;
13158}
13159_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013160if ac_fn_c_try_link "$LINENO"
13161then :
13162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13163printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013164
Illia Bobyra96d5442023-08-30 16:30:15 +020013165else $as_nop
13166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13167printf "%s\n" "no" >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013168fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013169rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013170 conftest$ac_exeext conftest.$ac_ext
13171else
Illia Bobyra96d5442023-08-30 16:30:15 +020013172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13173printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013174fi
13175
Illia Bobyra96d5442023-08-30 16:30:15 +020013176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13177printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013178if test -d /dev/ptym ; then
13179 pdir='/dev/ptym'
13180else
13181 pdir='/dev'
13182fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013184/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013185#ifdef M_UNIX
13186 yes;
13187#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013188
13189_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020013191 $EGREP "yes" >/dev/null 2>&1
13192then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013193 ptys=`echo /dev/ptyp??`
Illia Bobyra96d5442023-08-30 16:30:15 +020013194else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000013195 ptys=`echo $pdir/pty??`
13196fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013197rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013198
13199if test "$ptys" != "$pdir/pty??" ; then
13200 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13201 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013202 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013203
Illia Bobyra96d5442023-08-30 16:30:15 +020013204 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013205
Illia Bobyra96d5442023-08-30 16:30:15 +020013206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13207printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013208else
Illia Bobyra96d5442023-08-30 16:30:15 +020013209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13210printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013211fi
13212
Bram Moolenaar446cb832008-06-24 21:56:24 +000013213
Illia Bobyra96d5442023-08-30 16:30:15 +020013214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13215printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013217/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013218
13219#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013220int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013221{
13222 struct sigcontext *scont;
13223 scont = (struct sigcontext *)0;
13224 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013225}
13226int
Illia Bobyra96d5442023-08-30 16:30:15 +020013227main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013228{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013229
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013234if ac_fn_c_try_compile "$LINENO"
13235then :
13236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13237printf "%s\n" "yes" >&6; }
13238 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013239
Illia Bobyra96d5442023-08-30 16:30:15 +020013240else $as_nop
13241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13242printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013243fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013244rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013245
Illia Bobyra96d5442023-08-30 16:30:15 +020013246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13247printf %s "checking getcwd implementation is broken... " >&6; }
13248if test ${vim_cv_getcwd_broken+y}
13249then :
13250 printf %s "(cached) " >&6
13251else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013252
Illia Bobyra96d5442023-08-30 16:30:15 +020013253 if test "$cross_compiling" = yes
13254then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013255
Bram Moolenaar7db77842014-03-27 17:40:59 +010013256 as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000013257
Illia Bobyra96d5442023-08-30 16:30:15 +020013258else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13260/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013261
Bram Moolenaar446cb832008-06-24 21:56:24 +000013262#include "confdefs.h"
13263#ifdef HAVE_UNISTD_H
13264#include <unistd.h>
13265#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013266char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013267int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013268{
13269 char buffer[500];
13270 extern char **environ;
13271 environ = dagger;
13272 return getcwd(buffer, 500) ? 0 : 1;
13273}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013274
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013275_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013276if ac_fn_c_try_run "$LINENO"
13277then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013278
13279 vim_cv_getcwd_broken=no
13280
Illia Bobyra96d5442023-08-30 16:30:15 +020013281else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013282
13283 vim_cv_getcwd_broken=yes
13284
13285fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13287 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013288fi
13289
13290
Bram Moolenaar446cb832008-06-24 21:56:24 +000013291fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013292{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13293printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013294
13295if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013296 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013297
Bram Moolenaar63d25552019-05-10 21:28:38 +020013298 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013299if test "x$ac_cv_func_getwd" = xyes
13300then :
13301 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013302
Bram Moolenaar071d4272004-06-13 20:20:40 +000013303fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013304
Illia Bobyra96d5442023-08-30 16:30:15 +020013305fi
13306
13307ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13308if test "x$ac_cv_func_fchdir" = xyes
13309then :
13310 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013311
Bram Moolenaar071d4272004-06-13 20:20:40 +000013312fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013313ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13314if test "x$ac_cv_func_fchown" = xyes
13315then :
13316 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013317
Illia Bobyra96d5442023-08-30 16:30:15 +020013318fi
13319ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13320if test "x$ac_cv_func_fchmod" = xyes
13321then :
13322 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13323
13324fi
13325ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13326if test "x$ac_cv_func_fsync" = xyes
13327then :
13328 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13329
13330fi
13331ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13332if test "x$ac_cv_func_getcwd" = xyes
13333then :
13334 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13335
13336fi
13337ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13338if test "x$ac_cv_func_getpseudotty" = xyes
13339then :
13340 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13341
13342fi
13343ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13344if test "x$ac_cv_func_getpwent" = xyes
13345then :
13346 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13347
13348fi
13349ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13350if test "x$ac_cv_func_getpwnam" = xyes
13351then :
13352 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13353
13354fi
13355ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13356if test "x$ac_cv_func_getpwuid" = xyes
13357then :
13358 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13359
13360fi
13361ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13362if test "x$ac_cv_func_getrlimit" = xyes
13363then :
13364 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13365
13366fi
13367ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13368if test "x$ac_cv_func_gettimeofday" = xyes
13369then :
13370 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13371
13372fi
13373ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13374if test "x$ac_cv_func_localtime_r" = xyes
13375then :
13376 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13377
13378fi
13379ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13380if test "x$ac_cv_func_lstat" = xyes
13381then :
13382 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13383
13384fi
13385ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13386if test "x$ac_cv_func_memset" = xyes
13387then :
13388 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13389
13390fi
13391ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13392if test "x$ac_cv_func_mkdtemp" = xyes
13393then :
13394 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13395
13396fi
13397ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13398if test "x$ac_cv_func_nanosleep" = xyes
13399then :
13400 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13401
13402fi
13403ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13404if test "x$ac_cv_func_opendir" = xyes
13405then :
13406 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13407
13408fi
13409ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13410if test "x$ac_cv_func_putenv" = xyes
13411then :
13412 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13413
13414fi
13415ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13416if test "x$ac_cv_func_qsort" = xyes
13417then :
13418 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13419
13420fi
13421ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13422if test "x$ac_cv_func_readlink" = xyes
13423then :
13424 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13425
13426fi
13427ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13428if test "x$ac_cv_func_select" = xyes
13429then :
13430 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13431
13432fi
13433ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13434if test "x$ac_cv_func_setenv" = xyes
13435then :
13436 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13437
13438fi
13439ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13440if test "x$ac_cv_func_getpgid" = xyes
13441then :
13442 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13443
13444fi
13445ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13446if test "x$ac_cv_func_setpgid" = xyes
13447then :
13448 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13449
13450fi
13451ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13452if test "x$ac_cv_func_setsid" = xyes
13453then :
13454 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13455
13456fi
13457ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13458if test "x$ac_cv_func_sigaltstack" = xyes
13459then :
13460 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13461
13462fi
13463ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
13464if test "x$ac_cv_func_sigstack" = xyes
13465then :
13466 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
13467
13468fi
13469ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
13470if test "x$ac_cv_func_sigset" = xyes
13471then :
13472 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
13473
13474fi
13475ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
13476if test "x$ac_cv_func_sigsetjmp" = xyes
13477then :
13478 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
13479
13480fi
13481ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13482if test "x$ac_cv_func_sigaction" = xyes
13483then :
13484 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13485
13486fi
13487ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
13488if test "x$ac_cv_func_sigprocmask" = xyes
13489then :
13490 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
13491
13492fi
13493ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
13494if test "x$ac_cv_func_sigvec" = xyes
13495then :
13496 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
13497
13498fi
13499ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
13500if test "x$ac_cv_func_strcasecmp" = xyes
13501then :
13502 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
13503
13504fi
13505ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
13506if test "x$ac_cv_func_strcoll" = xyes
13507then :
13508 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
13509
13510fi
13511ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13512if test "x$ac_cv_func_strerror" = xyes
13513then :
13514 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
13515
13516fi
13517ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13518if test "x$ac_cv_func_strftime" = xyes
13519then :
13520 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13521
13522fi
13523ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
13524if test "x$ac_cv_func_stricmp" = xyes
13525then :
13526 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
13527
13528fi
13529ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13530if test "x$ac_cv_func_strncasecmp" = xyes
13531then :
13532 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
13533
13534fi
13535ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
13536if test "x$ac_cv_func_strnicmp" = xyes
13537then :
13538 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
13539
13540fi
13541ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
13542if test "x$ac_cv_func_strpbrk" = xyes
13543then :
13544 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
13545
13546fi
13547ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
13548if test "x$ac_cv_func_strptime" = xyes
13549then :
13550 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
13551
13552fi
13553ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13554if test "x$ac_cv_func_strtol" = xyes
13555then :
13556 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
13557
13558fi
13559ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
13560if test "x$ac_cv_func_tgetent" = xyes
13561then :
13562 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
13563
13564fi
13565ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13566if test "x$ac_cv_func_towlower" = xyes
13567then :
13568 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
13569
13570fi
13571ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
13572if test "x$ac_cv_func_towupper" = xyes
13573then :
13574 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
13575
13576fi
13577ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
13578if test "x$ac_cv_func_iswupper" = xyes
13579then :
13580 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
13581
13582fi
13583ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
13584if test "x$ac_cv_func_tzset" = xyes
13585then :
13586 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
13587
13588fi
13589ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
13590if test "x$ac_cv_func_usleep" = xyes
13591then :
13592 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
13593
13594fi
13595ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
13596if test "x$ac_cv_func_utime" = xyes
13597then :
13598 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
13599
13600fi
13601ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13602if test "x$ac_cv_func_utimes" = xyes
13603then :
13604 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13605
13606fi
13607ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
13608if test "x$ac_cv_func_mblen" = xyes
13609then :
13610 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
13611
13612fi
13613ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13614if test "x$ac_cv_func_ftruncate" = xyes
13615then :
13616 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13617
13618fi
13619ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13620if test "x$ac_cv_func_unsetenv" = xyes
13621then :
13622 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
13623
13624fi
13625ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
13626if test "x$ac_cv_func_posix_openpt" = xyes
13627then :
13628 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
13629
13630fi
13631ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13632if test "x$ac_cv_func_clock_gettime" = xyes
13633then :
13634 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013635
13636fi
13637
Bram Moolenaar643b6142018-09-12 20:29:09 +020013638
Illia Bobyra96d5442023-08-30 16:30:15 +020013639
13640
13641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
13642printf %s "checking types of arguments for select... " >&6; }
13643if test ${ac_cv_func_select_args+y}
13644then :
13645 printf %s "(cached) " >&6
13646else $as_nop
13647 ac_cv_func_select_args='int,int *,struct timeval *'
13648for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020013649 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
13650 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
13651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h. */
13653$ac_includes_default
13654#ifdef HAVE_SYS_SELECT_H
13655# include <sys/select.h>
13656#endif
13657#ifdef HAVE_SYS_SOCKET_H
13658# include <sys/socket.h>
13659#endif
13660
13661int
Illia Bobyra96d5442023-08-30 16:30:15 +020013662main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020013663{
13664extern int select ($ac_arg1,
13665 $ac_arg234, $ac_arg234, $ac_arg234,
13666 $ac_arg5);
13667 ;
13668 return 0;
13669}
13670_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013671if ac_fn_c_try_compile "$LINENO"
13672then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020013673 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
13674fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013675rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020013676 done
13677 done
13678done
Bram Moolenaar643b6142018-09-12 20:29:09 +020013679
13680fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
13682printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020013683ac_save_IFS=$IFS; IFS=','
13684set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
13685IFS=$ac_save_IFS
13686shift
13687
Illia Bobyra96d5442023-08-30 16:30:15 +020013688printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013689
13690
Illia Bobyra96d5442023-08-30 16:30:15 +020013691printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013692
13693
Illia Bobyra96d5442023-08-30 16:30:15 +020013694printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013695
Illia Bobyra96d5442023-08-30 16:30:15 +020013696rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020013697
Illia Bobyra96d5442023-08-30 16:30:15 +020013698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13699printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13700if test ${ac_cv_sys_largefile_source+y}
13701then :
13702 printf %s "(cached) " >&6
13703else $as_nop
Bram Moolenaar25153e12010-02-24 14:47:08 +010013704 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013706/* end confdefs.h. */
13707#include <sys/types.h> /* for off_t */
13708 #include <stdio.h>
13709int
Illia Bobyra96d5442023-08-30 16:30:15 +020013710main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013711{
13712int (*fp) (FILE *, off_t, int) = fseeko;
13713 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13714 ;
13715 return 0;
13716}
13717_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013718if ac_fn_c_try_link "$LINENO"
13719then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013720 ac_cv_sys_largefile_source=no; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013721fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013722rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013723 conftest$ac_exeext conftest.$ac_ext
13724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013725/* end confdefs.h. */
13726#define _LARGEFILE_SOURCE 1
13727#include <sys/types.h> /* for off_t */
13728 #include <stdio.h>
13729int
Illia Bobyra96d5442023-08-30 16:30:15 +020013730main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013731{
13732int (*fp) (FILE *, off_t, int) = fseeko;
13733 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13734 ;
13735 return 0;
13736}
13737_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013738if ac_fn_c_try_link "$LINENO"
13739then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013740 ac_cv_sys_largefile_source=1; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013741fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013742rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013743 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013744 ac_cv_sys_largefile_source=unknown
13745 break
13746done
13747fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13749printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
Bram Moolenaar25153e12010-02-24 14:47:08 +010013750case $ac_cv_sys_largefile_source in #(
13751 no | unknown) ;;
13752 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013753printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013754;;
13755esac
13756rm -rf conftest*
13757
13758# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13759# in glibc 2.1.3, but that breaks too many other things.
13760# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13761if test $ac_cv_sys_largefile_source != unknown; then
13762
Illia Bobyra96d5442023-08-30 16:30:15 +020013763printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013764
13765fi
13766
Bram Moolenaar071d4272004-06-13 20:20:40 +000013767
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013768# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013769if test ${enable_largefile+y}
13770then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013771 enableval=$enable_largefile;
13772fi
13773
13774if test "$enable_largefile" != no; then
13775
Illia Bobyra96d5442023-08-30 16:30:15 +020013776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13777printf %s "checking for special C compiler options needed for large files... " >&6; }
13778if test ${ac_cv_sys_largefile_CC+y}
13779then :
13780 printf %s "(cached) " >&6
13781else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013782 ac_cv_sys_largefile_CC=no
13783 if test "$GCC" != yes; then
13784 ac_save_CC=$CC
13785 while :; do
13786 # IRIX 6.2 and later do not support large files by default,
13787 # so use the C compiler's -n32 option if that helps.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013789/* end confdefs.h. */
13790#include <sys/types.h>
13791 /* Check that off_t can represent 2**63 - 1 correctly.
13792 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13793 since some C++ compilers masquerading as C compilers
13794 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013795#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013796 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13797 && LARGE_OFF_T % 2147483647 == 1)
13798 ? 1 : -1];
13799int
Illia Bobyra96d5442023-08-30 16:30:15 +020013800main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013801{
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013807 if ac_fn_c_try_compile "$LINENO"
13808then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013809 break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013810fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013811rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013812 CC="$CC -n32"
Illia Bobyra96d5442023-08-30 16:30:15 +020013813 if ac_fn_c_try_compile "$LINENO"
13814then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013815 ac_cv_sys_largefile_CC=' -n32'; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013816fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013817rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013818 break
13819 done
13820 CC=$ac_save_CC
13821 rm -f conftest.$ac_ext
13822 fi
13823fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13825printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013826 if test "$ac_cv_sys_largefile_CC" != no; then
13827 CC=$CC$ac_cv_sys_largefile_CC
13828 fi
13829
Illia Bobyra96d5442023-08-30 16:30:15 +020013830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13831printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13832if test ${ac_cv_sys_file_offset_bits+y}
13833then :
13834 printf %s "(cached) " >&6
13835else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013836 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013838/* end confdefs.h. */
13839#include <sys/types.h>
13840 /* Check that off_t can represent 2**63 - 1 correctly.
13841 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13842 since some C++ compilers masquerading as C compilers
13843 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013844#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013845 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13846 && LARGE_OFF_T % 2147483647 == 1)
13847 ? 1 : -1];
13848int
Illia Bobyra96d5442023-08-30 16:30:15 +020013849main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013850{
13851
13852 ;
13853 return 0;
13854}
13855_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013856if ac_fn_c_try_compile "$LINENO"
13857then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013858 ac_cv_sys_file_offset_bits=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013859fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013860rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013862/* end confdefs.h. */
13863#define _FILE_OFFSET_BITS 64
13864#include <sys/types.h>
13865 /* Check that off_t can represent 2**63 - 1 correctly.
13866 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13867 since some C++ compilers masquerading as C compilers
13868 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013869#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013870 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13871 && LARGE_OFF_T % 2147483647 == 1)
13872 ? 1 : -1];
13873int
Illia Bobyra96d5442023-08-30 16:30:15 +020013874main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013875{
13876
13877 ;
13878 return 0;
13879}
13880_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013881if ac_fn_c_try_compile "$LINENO"
13882then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013883 ac_cv_sys_file_offset_bits=64; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013884fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013885rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013886 ac_cv_sys_file_offset_bits=unknown
13887 break
13888done
13889fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13891printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013892case $ac_cv_sys_file_offset_bits in #(
13893 no | unknown) ;;
13894 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013895printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013896;;
13897esac
13898rm -rf conftest*
13899 if test $ac_cv_sys_file_offset_bits = unknown; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13901printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13902if test ${ac_cv_sys_large_files+y}
13903then :
13904 printf %s "(cached) " >&6
13905else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013906 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013908/* end confdefs.h. */
13909#include <sys/types.h>
13910 /* Check that off_t can represent 2**63 - 1 correctly.
13911 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13912 since some C++ compilers masquerading as C compilers
13913 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013914#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013915 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13916 && LARGE_OFF_T % 2147483647 == 1)
13917 ? 1 : -1];
13918int
Illia Bobyra96d5442023-08-30 16:30:15 +020013919main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013920{
13921
13922 ;
13923 return 0;
13924}
13925_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013926if ac_fn_c_try_compile "$LINENO"
13927then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013928 ac_cv_sys_large_files=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013929fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013930rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013932/* end confdefs.h. */
13933#define _LARGE_FILES 1
13934#include <sys/types.h>
13935 /* Check that off_t can represent 2**63 - 1 correctly.
13936 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13937 since some C++ compilers masquerading as C compilers
13938 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013939#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013940 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13941 && LARGE_OFF_T % 2147483647 == 1)
13942 ? 1 : -1];
13943int
Illia Bobyra96d5442023-08-30 16:30:15 +020013944main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013945{
13946
13947 ;
13948 return 0;
13949}
13950_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013951if ac_fn_c_try_compile "$LINENO"
13952then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013953 ac_cv_sys_large_files=1; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013954fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013955rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013956 ac_cv_sys_large_files=unknown
13957 break
13958done
13959fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013960{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13961printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013962case $ac_cv_sys_large_files in #(
13963 no | unknown) ;;
13964 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013965printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013966;;
13967esac
13968rm -rf conftest*
13969 fi
13970fi
13971
13972
Illia Bobyra96d5442023-08-30 16:30:15 +020013973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
13974printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013975# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013976if test ${enable_canberra+y}
13977then :
Bram Moolenaar21606672019-06-14 20:40:58 +020013978 enableval=$enable_canberra;
Illia Bobyra96d5442023-08-30 16:30:15 +020013979else $as_nop
Bram Moolenaar21606672019-06-14 20:40:58 +020013980 enable_canberra="maybe"
13981fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020013982
Bram Moolenaar21606672019-06-14 20:40:58 +020013983
13984if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010013985 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
13987printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013988 enable_canberra="yes"
13989 else
Illia Bobyra96d5442023-08-30 16:30:15 +020013990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
13991printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020013992 enable_canberra="no"
13993 fi
13994else
Bram Moolenaar12471262022-01-18 11:11:25 +000013995 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
13997printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000013998 enable_canberra="no"
13999 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14001printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014002 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014003fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014004if test "$enable_canberra" = "yes"; then
14005 if test "x$PKG_CONFIG" != "xno"; then
14006 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14007 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14008 fi
14009 if test "x$canberra_lib" = "x"; then
14010 canberra_lib=-lcanberra
14011 canberra_cflags=-D_REENTRANT
14012 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14014printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014015 ac_save_CFLAGS="$CFLAGS"
14016 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014017 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014018 CFLAGS="$CFLAGS $canberra_cflags"
14019 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014020 LIBS="$LIBS $canberra_lib"
14021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014022/* end confdefs.h. */
14023
Bram Moolenaar21606672019-06-14 20:40:58 +020014024 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014025
14026int
Illia Bobyra96d5442023-08-30 16:30:15 +020014027main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014028{
14029
Bram Moolenaar21606672019-06-14 20:40:58 +020014030 ca_context *hello;
14031 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014032 ;
14033 return 0;
14034}
14035_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014036if ac_fn_c_try_link "$LINENO"
14037then :
14038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14039printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014040
Illia Bobyra96d5442023-08-30 16:30:15 +020014041else $as_nop
14042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14043printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014044fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014045rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014046 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014047fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014048
Illia Bobyra96d5442023-08-30 16:30:15 +020014049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14050printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014051# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014052if test ${enable_libsodium+y}
14053then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014054 enableval=$enable_libsodium;
Illia Bobyra96d5442023-08-30 16:30:15 +020014055else $as_nop
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014056 enable_libsodium="maybe"
14057fi
14058
14059
14060if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014061 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14063printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014064 enable_libsodium="yes"
14065 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14067printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014068 enable_libsodium="no"
14069 fi
14070else
Illia Bobyra96d5442023-08-30 16:30:15 +020014071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14072printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014073fi
14074if test "$enable_libsodium" = "yes"; then
14075 if test "x$PKG_CONFIG" != "xno"; then
14076 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14077 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14078 fi
14079 if test "x$libsodium_lib" = "x"; then
14080 libsodium_lib=-lsodium
14081 libsodium_cflags=
14082 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14084printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014085 ac_save_CFLAGS="$CFLAGS"
14086 ac_save_LIBS="$LIBS"
14087 CFLAGS="$CFLAGS $libsodium_cflags"
14088 LIBS="$LIBS $libsodium_lib"
14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090/* end confdefs.h. */
14091
14092 # include <sodium.h>
14093
14094int
Illia Bobyra96d5442023-08-30 16:30:15 +020014095main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014096{
14097
14098 printf("%d", sodium_init());
14099 ;
14100 return 0;
14101}
14102_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014103if ac_fn_c_try_link "$LINENO"
14104then :
14105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14106printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014107
Illia Bobyra96d5442023-08-30 16:30:15 +020014108else $as_nop
14109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14110printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014111fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014112rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014113 conftest$ac_exeext conftest.$ac_ext
14114fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014115
Illia Bobyra96d5442023-08-30 16:30:15 +020014116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14117printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014119/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014120#include <sys/types.h>
14121#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014122int
Illia Bobyra96d5442023-08-30 16:30:15 +020014123main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014124{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014125 struct stat st;
14126 int n;
14127
14128 stat("/", &st);
14129 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014130 ;
14131 return 0;
14132}
14133_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014134if ac_fn_c_try_compile "$LINENO"
14135then :
14136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14137printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014138
Illia Bobyra96d5442023-08-30 16:30:15 +020014139else $as_nop
14140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14141printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014142fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014143rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014144
Illia Bobyra96d5442023-08-30 16:30:15 +020014145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14146printf %s "checking for timer_create without -lrt... " >&6; }
14147if test ${vim_cv_timer_create+y}
14148then :
14149 printf %s "(cached) " >&6
14150else $as_nop
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014151
Illia Bobyra96d5442023-08-30 16:30:15 +020014152if test "$cross_compiling" = yes
14153then :
14154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
14155printf "%s\n" "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&2;}
Richard Purdie509695c2022-07-24 20:48:00 +010014156
Illia Bobyra96d5442023-08-30 16:30:15 +020014157else $as_nop
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014159/* end confdefs.h. */
14160
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014161#if STDC_HEADERS
14162# include <stdlib.h>
14163# include <stddef.h>
14164#endif
14165#include <signal.h>
14166#include <time.h>
Bram Moolenaare5303952022-06-19 17:05:47 +010014167static void set_flag(union sigval sv) {}
Paul Ollis65745772022-06-05 16:55:54 +010014168
14169int
Illia Bobyra96d5442023-08-30 16:30:15 +020014170main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014171{
14172
14173 struct timespec ts;
14174 struct sigevent action = {0};
14175 timer_t timer_id;
14176
14177 action.sigev_notify = SIGEV_THREAD;
14178 action.sigev_notify_function = set_flag;
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014179 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14180 exit(1); // cannot create a monotonic timer
Paul Ollis65745772022-06-05 16:55:54 +010014181
14182 ;
14183 return 0;
14184}
14185_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014186if ac_fn_c_try_run "$LINENO"
14187then :
Richard Purdie509695c2022-07-24 20:48:00 +010014188 vim_cv_timer_create=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014189else $as_nop
Richard Purdie509695c2022-07-24 20:48:00 +010014190 vim_cv_timer_create=no
Paul Ollis65745772022-06-05 16:55:54 +010014191fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14193 conftest.$ac_objext conftest.beam conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014194fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014195
14196fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14198printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014199
14200if test "x$vim_cv_timer_create" = "xno" ; then
14201 save_LIBS="$LIBS"
14202 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14204printf %s "checking for timer_create with -lrt... " >&6; }
14205if test ${vim_cv_timer_create_with_lrt+y}
14206then :
14207 printf %s "(cached) " >&6
14208else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014209
Illia Bobyra96d5442023-08-30 16:30:15 +020014210 if test "$cross_compiling" = yes
14211then :
14212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&5
14213printf "%s\n" "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&2;}
Bram Moolenaarefffa532022-07-28 22:39:54 +010014214
Illia Bobyra96d5442023-08-30 16:30:15 +020014215else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217/* end confdefs.h. */
14218
14219 #if STDC_HEADERS
14220 # include <stdlib.h>
14221 # include <stddef.h>
14222 #endif
14223 #include <signal.h>
14224 #include <time.h>
14225 static void set_flag(union sigval sv) {}
14226
14227int
Illia Bobyra96d5442023-08-30 16:30:15 +020014228main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014229{
14230
14231 struct timespec ts;
14232 struct sigevent action = {0};
14233 timer_t timer_id;
14234
14235 action.sigev_notify = SIGEV_THREAD;
14236 action.sigev_notify_function = set_flag;
14237 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14238 exit(1); // cannot create a monotonic timer
14239
14240 ;
14241 return 0;
14242}
14243_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014244if ac_fn_c_try_run "$LINENO"
14245then :
Bram Moolenaarefffa532022-07-28 22:39:54 +010014246 vim_cv_timer_create_with_lrt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014247else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014248 vim_cv_timer_create_with_lrt=no
14249fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14251 conftest.$ac_objext conftest.beam conftest.$ac_ext
14252fi
14253
Richard Purdie509695c2022-07-24 20:48:00 +010014254fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14256printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014257 LIBS="$save_LIBS"
14258else
14259 vim_cv_timer_create_with_lrt=no
14260fi
Richard Purdie509695c2022-07-24 20:48:00 +010014261
14262if test "x$vim_cv_timer_create" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014263 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014264
14265fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014266if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014267 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014268
Bram Moolenaarefffa532022-07-28 22:39:54 +010014269 LIBS="$LIBS -lrt"
14270fi
Richard Purdie509695c2022-07-24 20:48:00 +010014271
Illia Bobyra96d5442023-08-30 16:30:15 +020014272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14273printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14274if test ${vim_cv_stat_ignores_slash+y}
14275then :
14276 printf %s "(cached) " >&6
14277else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014278
Illia Bobyra96d5442023-08-30 16:30:15 +020014279 if test "$cross_compiling" = yes
14280then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014281
Bram Moolenaar7db77842014-03-27 17:40:59 +010014282 as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000014283
Illia Bobyra96d5442023-08-30 16:30:15 +020014284else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14286/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014287
14288#include "confdefs.h"
14289#if STDC_HEADERS
14290# include <stdlib.h>
14291# include <stddef.h>
14292#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014293#include <sys/types.h>
14294#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014295int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014296
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014297_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014298if ac_fn_c_try_run "$LINENO"
14299then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014300
14301 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014302
Illia Bobyra96d5442023-08-30 16:30:15 +020014303else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014304
14305 vim_cv_stat_ignores_slash=no
14306
Bram Moolenaar071d4272004-06-13 20:20:40 +000014307fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14309 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014310fi
14311
Bram Moolenaar446cb832008-06-24 21:56:24 +000014312
Bram Moolenaar446cb832008-06-24 21:56:24 +000014313fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14315printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014316
14317if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014318 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014319
14320fi
14321
Illia Bobyra96d5442023-08-30 16:30:15 +020014322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14323printf %s "checking for nanoseconds field of struct stat... " >&6; }
14324if test ${ac_cv_struct_st_mtim_nsec+y}
14325then :
14326 printf %s "(cached) " >&6
14327else $as_nop
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014328 ac_save_CPPFLAGS="$CPPFLAGS"
14329 ac_cv_struct_st_mtim_nsec=no
14330 # st_mtim.tv_nsec -- the usual case
14331 # st_mtim._tv_nsec -- Solaris 2.6, if
14332 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14333 # && !defined __EXTENSIONS__)
14334 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14335 # st_mtime_n -- AIX 5.2 and above
14336 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14337 for ac_val in st_mtim.tv_nsec st_mtim._tv_nsec st_mtim.st__tim.tv_nsec st_mtime_n st_mtimespec.tv_nsec; do
14338 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14340/* end confdefs.h. */
14341#include <sys/types.h>
14342#include <sys/stat.h>
14343int
Illia Bobyra96d5442023-08-30 16:30:15 +020014344main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014345{
14346struct stat s; s.ST_MTIM_NSEC;
14347 ;
14348 return 0;
14349}
14350_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014351if ac_fn_c_try_compile "$LINENO"
14352then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014353 ac_cv_struct_st_mtim_nsec=$ac_val; break
14354fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014355rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014356 done
14357 CPPFLAGS="$ac_save_CPPFLAGS"
14358
14359fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14361printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014362if test $ac_cv_struct_st_mtim_nsec != no; then
14363
Illia Bobyra96d5442023-08-30 16:30:15 +020014364printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014365
14366fi
14367
Illia Bobyra96d5442023-08-30 16:30:15 +020014368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14369printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014370save_LIBS="$LIBS"
14371LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014373/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014374
14375#ifdef HAVE_ICONV_H
14376# include <iconv.h>
14377#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014378
14379int
Illia Bobyra96d5442023-08-30 16:30:15 +020014380main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014381{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014382iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014383 ;
14384 return 0;
14385}
14386_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014387if ac_fn_c_try_link "$LINENO"
14388then :
14389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14390printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014391
Illia Bobyra96d5442023-08-30 16:30:15 +020014392else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014393 LIBS="$save_LIBS"
14394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014395/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014396
14397#ifdef HAVE_ICONV_H
14398# include <iconv.h>
14399#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014400
14401int
Illia Bobyra96d5442023-08-30 16:30:15 +020014402main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014403{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014404iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014405 ;
14406 return 0;
14407}
14408_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014409if ac_fn_c_try_link "$LINENO"
14410then :
14411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14412printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014413
Illia Bobyra96d5442023-08-30 16:30:15 +020014414else $as_nop
14415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14416printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014417fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014418rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014419 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014420fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014421rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014422 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014423
14424
Illia Bobyra96d5442023-08-30 16:30:15 +020014425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
14426printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014428/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014429
14430#ifdef HAVE_LANGINFO_H
14431# include <langinfo.h>
14432#endif
14433
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014434int
Illia Bobyra96d5442023-08-30 16:30:15 +020014435main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014436{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014437char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014438 ;
14439 return 0;
14440}
14441_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014442if ac_fn_c_try_link "$LINENO"
14443then :
14444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14445printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014446
Illia Bobyra96d5442023-08-30 16:30:15 +020014447else $as_nop
14448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14449printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014450fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014451rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014452 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014453
Illia Bobyra96d5442023-08-30 16:30:15 +020014454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
14455printf %s "checking for strtod in -lm... " >&6; }
14456if test ${ac_cv_lib_m_strtod+y}
14457then :
14458 printf %s "(cached) " >&6
14459else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014460 ac_check_lib_save_LIBS=$LIBS
14461LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014463/* end confdefs.h. */
14464
14465/* Override any GCC internal prototype to avoid an error.
14466 Use char because int might match the return type of a GCC
14467 builtin and then its argument prototype would still apply. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014468char strtod ();
14469int
Illia Bobyra96d5442023-08-30 16:30:15 +020014470main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014471{
14472return strtod ();
14473 ;
14474 return 0;
14475}
14476_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014477if ac_fn_c_try_link "$LINENO"
14478then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014479 ac_cv_lib_m_strtod=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014480else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014481 ac_cv_lib_m_strtod=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014482fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014483rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014484 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014485LIBS=$ac_check_lib_save_LIBS
14486fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
14488printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
14489if test "x$ac_cv_lib_m_strtod" = xyes
14490then :
14491 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014492
14493 LIBS="-lm $LIBS"
14494
14495fi
14496
Bram Moolenaar446cb832008-06-24 21:56:24 +000014497
Illia Bobyra96d5442023-08-30 16:30:15 +020014498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
14499printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501/* end confdefs.h. */
14502
14503#ifdef HAVE_MATH_H
14504# include <math.h>
14505#endif
14506#if STDC_HEADERS
14507# include <stdlib.h>
14508# include <stddef.h>
14509#endif
14510
14511int
Illia Bobyra96d5442023-08-30 16:30:15 +020014512main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014513{
14514int r = isinf(1.11);
14515 ;
14516 return 0;
14517}
14518_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014519if ac_fn_c_try_link "$LINENO"
14520then :
14521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14522printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014523
Illia Bobyra96d5442023-08-30 16:30:15 +020014524else $as_nop
14525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14526printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014527fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014528rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014529 conftest$ac_exeext conftest.$ac_ext
14530
Illia Bobyra96d5442023-08-30 16:30:15 +020014531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
14532printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14534/* end confdefs.h. */
14535
14536#ifdef HAVE_MATH_H
14537# include <math.h>
14538#endif
14539#if STDC_HEADERS
14540# include <stdlib.h>
14541# include <stddef.h>
14542#endif
14543
14544int
Illia Bobyra96d5442023-08-30 16:30:15 +020014545main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014546{
14547int r = isnan(1.11);
14548 ;
14549 return 0;
14550}
14551_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014552if ac_fn_c_try_link "$LINENO"
14553then :
14554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14555printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014556
Illia Bobyra96d5442023-08-30 16:30:15 +020014557else $as_nop
14558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14559printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014560fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014561rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014562 conftest$ac_exeext conftest.$ac_ext
14563
Illia Bobyra96d5442023-08-30 16:30:15 +020014564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
14565printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014566# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014567if test ${enable_acl+y}
14568then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014569 enableval=$enable_acl;
Illia Bobyra96d5442023-08-30 16:30:15 +020014570else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014571 enable_acl="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014572fi
14573
Bram Moolenaar071d4272004-06-13 20:20:40 +000014574if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14576printf "%s\n" "no" >&6; }
14577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
14578printf %s "checking for acl_get_file in -lposix1e... " >&6; }
14579if test ${ac_cv_lib_posix1e_acl_get_file+y}
14580then :
14581 printf %s "(cached) " >&6
14582else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014583 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014584LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014586/* end confdefs.h. */
14587
Bram Moolenaar446cb832008-06-24 21:56:24 +000014588/* Override any GCC internal prototype to avoid an error.
14589 Use char because int might match the return type of a GCC
14590 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014591char acl_get_file ();
14592int
Illia Bobyra96d5442023-08-30 16:30:15 +020014593main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014594{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014595return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014596 ;
14597 return 0;
14598}
14599_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014600if ac_fn_c_try_link "$LINENO"
14601then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014602 ac_cv_lib_posix1e_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014603else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014604 ac_cv_lib_posix1e_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014605fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014606rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014607 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014608LIBS=$ac_check_lib_save_LIBS
14609fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
14611printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
14612if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
14613then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014614 LIBS="$LIBS -lposix1e"
Illia Bobyra96d5442023-08-30 16:30:15 +020014615else $as_nop
14616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
14617printf %s "checking for acl_get_file in -lacl... " >&6; }
14618if test ${ac_cv_lib_acl_acl_get_file+y}
14619then :
14620 printf %s "(cached) " >&6
14621else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014622 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014623LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014625/* end confdefs.h. */
14626
Bram Moolenaar446cb832008-06-24 21:56:24 +000014627/* Override any GCC internal prototype to avoid an error.
14628 Use char because int might match the return type of a GCC
14629 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014630char acl_get_file ();
14631int
Illia Bobyra96d5442023-08-30 16:30:15 +020014632main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014633{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014634return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014635 ;
14636 return 0;
14637}
14638_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014639if ac_fn_c_try_link "$LINENO"
14640then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014641 ac_cv_lib_acl_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014642else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014643 ac_cv_lib_acl_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014644fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014645rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014646 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014647LIBS=$ac_check_lib_save_LIBS
14648fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
14650printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
14651if test "x$ac_cv_lib_acl_acl_get_file" = xyes
14652then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014653 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020014654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
14655printf %s "checking for fgetxattr in -lattr... " >&6; }
14656if test ${ac_cv_lib_attr_fgetxattr+y}
14657then :
14658 printf %s "(cached) " >&6
14659else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014660 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014661LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014663/* end confdefs.h. */
14664
Bram Moolenaar446cb832008-06-24 21:56:24 +000014665/* Override any GCC internal prototype to avoid an error.
14666 Use char because int might match the return type of a GCC
14667 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014668char fgetxattr ();
14669int
Illia Bobyra96d5442023-08-30 16:30:15 +020014670main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014671{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014672return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014673 ;
14674 return 0;
14675}
14676_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014677if ac_fn_c_try_link "$LINENO"
14678then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014679 ac_cv_lib_attr_fgetxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014680else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014681 ac_cv_lib_attr_fgetxattr=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014682fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014683rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014684 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014685LIBS=$ac_check_lib_save_LIBS
14686fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014687{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
14688printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
14689if test "x$ac_cv_lib_attr_fgetxattr" = xyes
14690then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014691 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014692fi
14693
Bram Moolenaar071d4272004-06-13 20:20:40 +000014694fi
14695
14696fi
14697
14698
Illia Bobyra96d5442023-08-30 16:30:15 +020014699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
14700printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014702/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014703
14704#include <sys/types.h>
14705#ifdef HAVE_SYS_ACL_H
14706# include <sys/acl.h>
14707#endif
14708acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014709int
Illia Bobyra96d5442023-08-30 16:30:15 +020014710main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014711{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014712acl = acl_get_file("foo", ACL_TYPE_ACCESS);
14713 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
14714 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014715 ;
14716 return 0;
14717}
14718_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014719if ac_fn_c_try_link "$LINENO"
14720then :
14721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14722printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014723
Illia Bobyra96d5442023-08-30 16:30:15 +020014724else $as_nop
14725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14726printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014727fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014728rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014729 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014730
Illia Bobyra96d5442023-08-30 16:30:15 +020014731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
14732printf %s "checking for acl_get in -lsec... " >&6; }
14733if test ${ac_cv_lib_sec_acl_get+y}
14734then :
14735 printf %s "(cached) " >&6
14736else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014737 ac_check_lib_save_LIBS=$LIBS
14738LIBS="-lsec $LIBS"
14739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14740/* end confdefs.h. */
14741
14742/* Override any GCC internal prototype to avoid an error.
14743 Use char because int might match the return type of a GCC
14744 builtin and then its argument prototype would still apply. */
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014745char acl_get ();
14746int
Illia Bobyra96d5442023-08-30 16:30:15 +020014747main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014748{
14749return acl_get ();
14750 ;
14751 return 0;
14752}
14753_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014754if ac_fn_c_try_link "$LINENO"
14755then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014756 ac_cv_lib_sec_acl_get=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014757else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014758 ac_cv_lib_sec_acl_get=no
14759fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014760rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014761 conftest$ac_exeext conftest.$ac_ext
14762LIBS=$ac_check_lib_save_LIBS
14763fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
14765printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
14766if test "x$ac_cv_lib_sec_acl_get" = xyes
14767then :
14768 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014769
Illia Bobyra96d5442023-08-30 16:30:15 +020014770else $as_nop
14771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
14772printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014774/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014775
14776#ifdef HAVE_SYS_ACL_H
14777# include <sys/acl.h>
14778#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014779int
Illia Bobyra96d5442023-08-30 16:30:15 +020014780main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014781{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014782acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014783
14784 ;
14785 return 0;
14786}
14787_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014788if ac_fn_c_try_link "$LINENO"
14789then :
14790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14791printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014792
Illia Bobyra96d5442023-08-30 16:30:15 +020014793else $as_nop
14794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14795printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014796fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014797rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014798 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014799fi
14800
Bram Moolenaar446cb832008-06-24 21:56:24 +000014801
Illia Bobyra96d5442023-08-30 16:30:15 +020014802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
14803printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014805/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014806
Bram Moolenaar446cb832008-06-24 21:56:24 +000014807#if STDC_HEADERS
14808# include <stdlib.h>
14809# include <stddef.h>
14810#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014811#ifdef HAVE_SYS_ACL_H
14812# include <sys/acl.h>
14813#endif
14814#ifdef HAVE_SYS_ACCESS_H
14815# include <sys/access.h>
14816#endif
14817#define _ALL_SOURCE
14818
14819#include <sys/stat.h>
14820
14821int aclsize;
14822struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014823int
Illia Bobyra96d5442023-08-30 16:30:15 +020014824main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014825{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014826aclsize = sizeof(struct acl);
14827 aclent = (void *)malloc(aclsize);
14828 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014829
14830 ;
14831 return 0;
14832}
14833_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014834if ac_fn_c_try_link "$LINENO"
14835then :
14836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14837printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014838
Illia Bobyra96d5442023-08-30 16:30:15 +020014839else $as_nop
14840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14841printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014842fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014843rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014844 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014845else
Illia Bobyra96d5442023-08-30 16:30:15 +020014846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14847printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014848fi
14849
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014850if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
14852printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014853 ac_save_CFLAGS="$CFLAGS"
14854 ac_save_LIBS="$LIBS"
14855 CFLAGS="$CFLAGS $GTK_CFLAGS"
14856 LIBS="$LIBS $GTK_LIBS"
14857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14858/* end confdefs.h. */
14859#include <gtk/gtk.h>
14860int
Illia Bobyra96d5442023-08-30 16:30:15 +020014861main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014862{
14863 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
14864 ;
14865 return 0;
14866}
14867_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014868if ac_fn_c_try_link "$LINENO"
14869then :
14870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14871printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014872
Illia Bobyra96d5442023-08-30 16:30:15 +020014873else $as_nop
14874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14875printf "%s\n" "no" >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014876fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014877rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020014878 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014879 CFLAGS="$ac_save_CFLAGS"
14880 LIBS="$ac_save_LIBS"
14881fi
14882
Illia Bobyra96d5442023-08-30 16:30:15 +020014883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
14884printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014885# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014886if test ${enable_gpm+y}
14887then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014888 enableval=$enable_gpm;
Illia Bobyra96d5442023-08-30 16:30:15 +020014889else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014890 enable_gpm="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014891fi
14892
Bram Moolenaar071d4272004-06-13 20:20:40 +000014893
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014894if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
14896printf "%s\n" "$enable_gpm" >&6; }
14897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
14898printf %s "checking for gpm... " >&6; }
14899if test ${vi_cv_have_gpm+y}
14900then :
14901 printf %s "(cached) " >&6
14902else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014903 olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014905/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014906#include <gpm.h>
14907 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014908int
Illia Bobyra96d5442023-08-30 16:30:15 +020014909main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014910{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014911Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014912 ;
14913 return 0;
14914}
14915_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014916if ac_fn_c_try_link "$LINENO"
14917then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014918 vi_cv_have_gpm=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014919else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014920 vi_cv_have_gpm=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014921fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014922rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014923 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014924 LIBS="$olibs"
14925
14926fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014927{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
14928printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014929 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014930 if test "$enable_gpm" = "yes"; then
14931 LIBS="$LIBS -lgpm"
14932 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014933 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014934
14935 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014936 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014937
14938 fi
14939else
Illia Bobyra96d5442023-08-30 16:30:15 +020014940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14941printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014942fi
14943
Illia Bobyra96d5442023-08-30 16:30:15 +020014944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
14945printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014946# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014947if test ${enable_sysmouse+y}
14948then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014949 enableval=$enable_sysmouse;
Illia Bobyra96d5442023-08-30 16:30:15 +020014950else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014951 enable_sysmouse="yes"
14952fi
14953
14954
14955if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14957printf "%s\n" "no" >&6; }
14958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
14959printf %s "checking for sysmouse... " >&6; }
14960if test ${vi_cv_have_sysmouse+y}
14961then :
14962 printf %s "(cached) " >&6
14963else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014965/* end confdefs.h. */
14966#include <sys/consio.h>
14967 #include <signal.h>
14968 #include <sys/fbio.h>
14969int
Illia Bobyra96d5442023-08-30 16:30:15 +020014970main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014971{
14972struct mouse_info mouse;
14973 mouse.operation = MOUSE_MODE;
14974 mouse.operation = MOUSE_SHOW;
14975 mouse.u.mode.mode = 0;
14976 mouse.u.mode.signal = SIGUSR2;
14977 ;
14978 return 0;
14979}
14980_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014981if ac_fn_c_try_link "$LINENO"
14982then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014983 vi_cv_have_sysmouse=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014984else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014985 vi_cv_have_sysmouse=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014986fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014987rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014988 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014989
14990fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
14992printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014993 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014994 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014995
14996 fi
14997else
Illia Bobyra96d5442023-08-30 16:30:15 +020014998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14999printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015000fi
15001
Illia Bobyra96d5442023-08-30 16:30:15 +020015002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15003printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015005/* end confdefs.h. */
15006#if HAVE_FCNTL_H
15007# include <fcntl.h>
15008#endif
15009int
Illia Bobyra96d5442023-08-30 16:30:15 +020015010main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015011{
15012 int flag = FD_CLOEXEC;
15013 ;
15014 return 0;
15015}
15016_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015017if ac_fn_c_try_compile "$LINENO"
15018then :
15019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15020printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015021
Illia Bobyra96d5442023-08-30 16:30:15 +020015022else $as_nop
15023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15024printf "%s\n" "not usable" >&6; }
Bram Moolenaarf05da212009-11-17 16:13:15 +000015025fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015026rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015027
Illia Bobyra96d5442023-08-30 16:30:15 +020015028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15029printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015031/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015032#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015033int
Illia Bobyra96d5442023-08-30 16:30:15 +020015034main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015035{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015036rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015037 ;
15038 return 0;
15039}
15040_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015041if ac_fn_c_try_link "$LINENO"
15042then :
15043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15044printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015045
Illia Bobyra96d5442023-08-30 16:30:15 +020015046else $as_nop
15047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15048printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015049fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015050rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015051 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015052
Illia Bobyra96d5442023-08-30 16:30:15 +020015053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15054printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056/* end confdefs.h. */
15057#include <sys/types.h>
15058#include <dirent.h>
15059int
Illia Bobyra96d5442023-08-30 16:30:15 +020015060main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015061{
15062DIR * dir=opendir("dirname"); dirfd(dir);
15063 ;
15064 return 0;
15065}
15066_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015067if ac_fn_c_try_link "$LINENO"
15068then :
15069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15070printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015071
Illia Bobyra96d5442023-08-30 16:30:15 +020015072else $as_nop
15073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15074printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015075fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015076rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015077 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015078
Illia Bobyra96d5442023-08-30 16:30:15 +020015079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15080printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h. */
15083#include <sys/file.h>
15084int
Illia Bobyra96d5442023-08-30 16:30:15 +020015085main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015086{
15087flock(10, LOCK_SH);
15088 ;
15089 return 0;
15090}
15091_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015092if ac_fn_c_try_link "$LINENO"
15093then :
15094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15095printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015096
Illia Bobyra96d5442023-08-30 16:30:15 +020015097else $as_nop
15098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15099printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015100fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015101rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015102 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015103
Illia Bobyra96d5442023-08-30 16:30:15 +020015104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15105printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015107/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015108#include <sys/types.h>
15109#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015110int
Illia Bobyra96d5442023-08-30 16:30:15 +020015111main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015112{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015113 int mib[2], r;
15114 size_t len;
15115
15116 mib[0] = CTL_HW;
15117 mib[1] = HW_USERMEM;
15118 len = sizeof(r);
15119 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015120
15121 ;
15122 return 0;
15123}
15124_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015125if ac_fn_c_try_compile "$LINENO"
15126then :
15127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15128printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015129
Illia Bobyra96d5442023-08-30 16:30:15 +020015130else $as_nop
15131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15132printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015133fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015134rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015135
Illia Bobyra96d5442023-08-30 16:30:15 +020015136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15137printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015139/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015140#include <sys/types.h>
15141#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015142int
Illia Bobyra96d5442023-08-30 16:30:15 +020015143main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015144{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015145 struct sysinfo sinfo;
15146 int t;
15147
15148 (void)sysinfo(&sinfo);
15149 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015150
15151 ;
15152 return 0;
15153}
15154_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015155if ac_fn_c_try_link "$LINENO"
15156then :
15157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15158printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015159
Illia Bobyra96d5442023-08-30 16:30:15 +020015160else $as_nop
15161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15162printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015163fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015164rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015165 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015166
Illia Bobyra96d5442023-08-30 16:30:15 +020015167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15168printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015170/* end confdefs.h. */
15171#include <sys/types.h>
15172#include <sys/sysinfo.h>
15173int
Illia Bobyra96d5442023-08-30 16:30:15 +020015174main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015175{
15176 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015177 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015178
15179 ;
15180 return 0;
15181}
15182_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015183if ac_fn_c_try_compile "$LINENO"
15184then :
15185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15186printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015187
Illia Bobyra96d5442023-08-30 16:30:15 +020015188else $as_nop
15189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15190printf "%s\n" "no" >&6; }
Bram Moolenaar914572a2007-05-01 11:37:47 +000015191fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015192rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015193
Illia Bobyra96d5442023-08-30 16:30:15 +020015194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15195printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15197/* end confdefs.h. */
15198#include <sys/types.h>
15199#include <sys/sysinfo.h>
15200int
Illia Bobyra96d5442023-08-30 16:30:15 +020015201main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015202{
15203 struct sysinfo sinfo;
15204 long ut;
15205
15206 (void)sysinfo(&sinfo);
15207 ut = sinfo.uptime;
15208
15209 ;
15210 return 0;
15211}
15212_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015213if ac_fn_c_try_compile "$LINENO"
15214then :
15215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15216printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015217
Illia Bobyra96d5442023-08-30 16:30:15 +020015218else $as_nop
15219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15220printf "%s\n" "no" >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015221fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015222rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015223
Illia Bobyra96d5442023-08-30 16:30:15 +020015224{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15225printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015227/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015228#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015229int
Illia Bobyra96d5442023-08-30 16:30:15 +020015230main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015231{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015232 (void)sysconf(_SC_PAGESIZE);
15233 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015234
15235 ;
15236 return 0;
15237}
15238_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015239if ac_fn_c_try_compile "$LINENO"
15240then :
15241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15242printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015243
Illia Bobyra96d5442023-08-30 16:30:15 +020015244else $as_nop
15245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15246printf "%s\n" "not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015247fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015248rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015249
Illia Bobyra96d5442023-08-30 16:30:15 +020015250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15251printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15253/* end confdefs.h. */
15254#include <unistd.h>
15255int
Illia Bobyra96d5442023-08-30 16:30:15 +020015256main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015257{
15258 (void)sysconf(_SC_SIGSTKSZ);
15259
15260 ;
15261 return 0;
15262}
15263_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015264if ac_fn_c_try_compile "$LINENO"
15265then :
15266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15267printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015268
Illia Bobyra96d5442023-08-30 16:30:15 +020015269else $as_nop
15270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15271printf "%s\n" "not usable" >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015272fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015273rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015274
Bram Moolenaar914703b2010-05-31 21:59:46 +020015275# The cast to long int works around a bug in the HP C Compiler
15276# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15277# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15278# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15280printf %s "checking size of int... " >&6; }
15281if test ${ac_cv_sizeof_int+y}
15282then :
15283 printf %s "(cached) " >&6
15284else $as_nop
15285 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
15286then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015287
Illia Bobyra96d5442023-08-30 16:30:15 +020015288else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015289 if test "$ac_cv_type_int" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015290 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15291printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015292as_fn_error 77 "cannot compute sizeof (int)
15293See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015294 else
15295 ac_cv_sizeof_int=0
15296 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015297fi
15298
Bram Moolenaar446cb832008-06-24 21:56:24 +000015299fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15301printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015302
15303
15304
Illia Bobyra96d5442023-08-30 16:30:15 +020015305printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015306
15307
Bram Moolenaar914703b2010-05-31 21:59:46 +020015308# The cast to long int works around a bug in the HP C Compiler
15309# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15310# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15311# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15313printf %s "checking size of long... " >&6; }
15314if test ${ac_cv_sizeof_long+y}
15315then :
15316 printf %s "(cached) " >&6
15317else $as_nop
15318 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
15319then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015320
Illia Bobyra96d5442023-08-30 16:30:15 +020015321else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015322 if test "$ac_cv_type_long" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015323 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15324printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015325as_fn_error 77 "cannot compute sizeof (long)
15326See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015327 else
15328 ac_cv_sizeof_long=0
15329 fi
15330fi
15331
15332fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15334printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015335
15336
15337
Illia Bobyra96d5442023-08-30 16:30:15 +020015338printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015339
15340
15341# The cast to long int works around a bug in the HP C Compiler
15342# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15343# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15344# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15346printf %s "checking size of time_t... " >&6; }
15347if test ${ac_cv_sizeof_time_t+y}
15348then :
15349 printf %s "(cached) " >&6
15350else $as_nop
15351 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
15352then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015353
Illia Bobyra96d5442023-08-30 16:30:15 +020015354else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015355 if test "$ac_cv_type_time_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015356 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15357printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015358as_fn_error 77 "cannot compute sizeof (time_t)
15359See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015360 else
15361 ac_cv_sizeof_time_t=0
15362 fi
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015363fi
15364
15365fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15367printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015368
15369
15370
Illia Bobyra96d5442023-08-30 16:30:15 +020015371printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015372
15373
Bram Moolenaar914703b2010-05-31 21:59:46 +020015374# The cast to long int works around a bug in the HP C Compiler
15375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15377# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15379printf %s "checking size of off_t... " >&6; }
15380if test ${ac_cv_sizeof_off_t+y}
15381then :
15382 printf %s "(cached) " >&6
15383else $as_nop
15384 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
15385then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015386
Illia Bobyra96d5442023-08-30 16:30:15 +020015387else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015388 if test "$ac_cv_type_off_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015389 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15390printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015391as_fn_error 77 "cannot compute sizeof (off_t)
15392See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015393 else
15394 ac_cv_sizeof_off_t=0
15395 fi
15396fi
15397
15398fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15400printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015401
15402
15403
Illia Bobyra96d5442023-08-30 16:30:15 +020015404printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015405
15406
15407
Illia Bobyra96d5442023-08-30 16:30:15 +020015408printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015409
Illia Bobyra96d5442023-08-30 16:30:15 +020015410printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015411
15412
Illia Bobyra96d5442023-08-30 16:30:15 +020015413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
15414printf %s "checking uint32_t is 32 bits... " >&6; }
15415if test "$cross_compiling" = yes
15416then :
15417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
15418printf "%s\n" "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
15419else $as_nop
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15421/* end confdefs.h. */
15422
15423#ifdef HAVE_STDINT_H
15424# include <stdint.h>
15425#endif
15426#ifdef HAVE_INTTYPES_H
15427# include <inttypes.h>
15428#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015429int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015430 uint32_t nr1 = (uint32_t)-1;
15431 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020015432 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
15433 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015434}
15435_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015436if ac_fn_c_try_run "$LINENO"
15437then :
15438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15439printf "%s\n" "ok" >&6; }
15440else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010015441 as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015442fi
15443rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15444 conftest.$ac_objext conftest.beam conftest.$ac_ext
15445fi
15446
15447
Bram Moolenaar446cb832008-06-24 21:56:24 +000015448
Bram Moolenaar071d4272004-06-13 20:20:40 +000015449bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000015450#include "confdefs.h"
15451#ifdef HAVE_STRING_H
15452# include <string.h>
15453#endif
15454#if STDC_HEADERS
15455# include <stdlib.h>
15456# include <stddef.h>
15457#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015458int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000015459 char buf[10];
15460 strcpy(buf, "abcdefghi");
15461 mch_memmove(buf, buf + 2, 3);
15462 if (strncmp(buf, "ababcf", 6))
15463 exit(1);
15464 strcpy(buf, "abcdefghi");
15465 mch_memmove(buf + 2, buf, 3);
15466 if (strncmp(buf, "cdedef", 6))
15467 exit(1);
15468 exit(0); /* libc version works properly. */
15469}'
15470
Illia Bobyra96d5442023-08-30 16:30:15 +020015471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
15472printf %s "checking whether memmove handles overlaps... " >&6; }
15473if test ${vim_cv_memmove_handles_overlap+y}
15474then :
15475 printf %s "(cached) " >&6
15476else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015477
Illia Bobyra96d5442023-08-30 16:30:15 +020015478 if test "$cross_compiling" = yes
15479then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015480
Bram Moolenaar7db77842014-03-27 17:40:59 +010015481 as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015482
Illia Bobyra96d5442023-08-30 16:30:15 +020015483else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15485/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015486#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015487_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015488if ac_fn_c_try_run "$LINENO"
15489then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015490
15491 vim_cv_memmove_handles_overlap=yes
15492
Illia Bobyra96d5442023-08-30 16:30:15 +020015493else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015494
15495 vim_cv_memmove_handles_overlap=no
15496
15497fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015500fi
15501
15502
Bram Moolenaar446cb832008-06-24 21:56:24 +000015503fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
15505printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015506
15507if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015508 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015509
Bram Moolenaar071d4272004-06-13 20:20:40 +000015510else
Illia Bobyra96d5442023-08-30 16:30:15 +020015511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
15512printf %s "checking whether bcopy handles overlaps... " >&6; }
15513if test ${vim_cv_bcopy_handles_overlap+y}
15514then :
15515 printf %s "(cached) " >&6
15516else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015517
Illia Bobyra96d5442023-08-30 16:30:15 +020015518 if test "$cross_compiling" = yes
15519then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015520
Bram Moolenaar7db77842014-03-27 17:40:59 +010015521 as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015522
Illia Bobyra96d5442023-08-30 16:30:15 +020015523else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15525/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015526#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
15527_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015528if ac_fn_c_try_run "$LINENO"
15529then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015530
15531 vim_cv_bcopy_handles_overlap=yes
15532
Illia Bobyra96d5442023-08-30 16:30:15 +020015533else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015534
15535 vim_cv_bcopy_handles_overlap=no
15536
15537fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15539 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015540fi
15541
15542
Bram Moolenaar446cb832008-06-24 21:56:24 +000015543fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
15545printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015546
15547 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015548 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015549
Bram Moolenaar446cb832008-06-24 21:56:24 +000015550 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
15552printf %s "checking whether memcpy handles overlaps... " >&6; }
15553if test ${vim_cv_memcpy_handles_overlap+y}
15554then :
15555 printf %s "(cached) " >&6
15556else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015557
Illia Bobyra96d5442023-08-30 16:30:15 +020015558 if test "$cross_compiling" = yes
15559then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015560
Bram Moolenaar7db77842014-03-27 17:40:59 +010015561 as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015562
Illia Bobyra96d5442023-08-30 16:30:15 +020015563else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15565/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015566#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015567_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015568if ac_fn_c_try_run "$LINENO"
15569then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015570
15571 vim_cv_memcpy_handles_overlap=yes
15572
Illia Bobyra96d5442023-08-30 16:30:15 +020015573else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015574
15575 vim_cv_memcpy_handles_overlap=no
15576
Bram Moolenaar071d4272004-06-13 20:20:40 +000015577fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015580fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015581
15582
Bram Moolenaar071d4272004-06-13 20:20:40 +000015583fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
15585printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015586
15587 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015588 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015589
15590 fi
15591 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015592fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015593
Bram Moolenaar071d4272004-06-13 20:20:40 +000015594
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015595if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000015596 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015597 libs_save=$LIBS
15598 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
15599 CFLAGS="$CFLAGS $X_CFLAGS"
15600
Illia Bobyra96d5442023-08-30 16:30:15 +020015601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
15602printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015604/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015605#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015606int
Illia Bobyra96d5442023-08-30 16:30:15 +020015607main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015608{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015609
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015610 ;
15611 return 0;
15612}
15613_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015614if ac_fn_c_try_compile "$LINENO"
15615then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015617/* end confdefs.h. */
15618
Bram Moolenaar446cb832008-06-24 21:56:24 +000015619/* Override any GCC internal prototype to avoid an error.
15620 Use char because int might match the return type of a GCC
15621 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015622char _Xsetlocale ();
15623int
Illia Bobyra96d5442023-08-30 16:30:15 +020015624main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015625{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015626return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015627 ;
15628 return 0;
15629}
15630_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015631if ac_fn_c_try_link "$LINENO"
15632then :
15633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15634printf "%s\n" "yes" >&6; }
15635 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015636
Illia Bobyra96d5442023-08-30 16:30:15 +020015637else $as_nop
15638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15639printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015640fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015641rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015642 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015643else $as_nop
15644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15645printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015646fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015647rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015648
Illia Bobyra96d5442023-08-30 16:30:15 +020015649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
15650printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15652/* end confdefs.h. */
15653
15654/* Override any GCC internal prototype to avoid an error.
15655 Use char because int might match the return type of a GCC
15656 builtin and then its argument prototype would still apply. */
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015657char Xutf8SetWMProperties ();
15658int
Illia Bobyra96d5442023-08-30 16:30:15 +020015659main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015660{
15661return Xutf8SetWMProperties ();
15662 ;
15663 return 0;
15664}
15665_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015666if ac_fn_c_try_link "$LINENO"
15667then :
15668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15669printf "%s\n" "yes" >&6; }
15670 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015671
Illia Bobyra96d5442023-08-30 16:30:15 +020015672else $as_nop
15673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15674printf "%s\n" "no" >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015675fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015676rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015677 conftest$ac_exeext conftest.$ac_ext
15678
Bram Moolenaar071d4272004-06-13 20:20:40 +000015679 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015680 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000015681fi
15682
Illia Bobyra96d5442023-08-30 16:30:15 +020015683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
15684printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
15685if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
15686then :
15687 printf %s "(cached) " >&6
15688else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015689 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015690LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015692/* end confdefs.h. */
15693
Bram Moolenaar446cb832008-06-24 21:56:24 +000015694/* Override any GCC internal prototype to avoid an error.
15695 Use char because int might match the return type of a GCC
15696 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015697char _xpg4_setrunelocale ();
15698int
Illia Bobyra96d5442023-08-30 16:30:15 +020015699main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015700{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015701return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015702 ;
15703 return 0;
15704}
15705_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015706if ac_fn_c_try_link "$LINENO"
15707then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015708 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015709else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015710 ac_cv_lib_xpg4__xpg4_setrunelocale=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000015711fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015712rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015713 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015714LIBS=$ac_check_lib_save_LIBS
15715fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
15717printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
15718if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
15719then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015720 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015721fi
15722
15723
Illia Bobyra96d5442023-08-30 16:30:15 +020015724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
15725printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015726test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015727if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015728 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015729elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015730 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015731elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015732 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015733else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000015734 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015735 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
15736 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
15737 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
15738 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
15739 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
15740 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
15741 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
15742fi
15743test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020015744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
15745printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015746
Illia Bobyra96d5442023-08-30 16:30:15 +020015747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
15748printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015749MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000015750(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
Illia Bobyra96d5442023-08-30 16:30:15 +020015751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
15752printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015753if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015754 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015755
15756fi
15757
Illia Bobyra96d5442023-08-30 16:30:15 +020015758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
15759printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015760# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015761if test ${enable_nls+y}
15762then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015763 enableval=$enable_nls;
Illia Bobyra96d5442023-08-30 16:30:15 +020015764else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015765 enable_nls="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000015766fi
15767
Bram Moolenaar071d4272004-06-13 20:20:40 +000015768
15769if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15771printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000015772
15773 INSTALL_LANGS=install-languages
15774
15775 INSTALL_TOOL_LANGS=install-tool-languages
15776
15777
Bram Moolenaar071d4272004-06-13 20:20:40 +000015778 # Extract the first word of "msgfmt", so it can be a program name with args.
15779set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020015780{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15781printf %s "checking for $ac_word... " >&6; }
15782if test ${ac_cv_prog_MSGFMT+y}
15783then :
15784 printf %s "(cached) " >&6
15785else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015786 if test -n "$MSGFMT"; then
15787 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15788else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15790for as_dir in $PATH
15791do
15792 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020015793 case $as_dir in #(((
15794 '') as_dir=./ ;;
15795 */) ;;
15796 *) as_dir=$as_dir/ ;;
15797 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015798 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020015799 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015800 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020015801 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015802 break 2
15803 fi
15804done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015805 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000015806IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015807
Bram Moolenaar071d4272004-06-13 20:20:40 +000015808fi
15809fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015810MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000015811if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15813printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015814else
Illia Bobyra96d5442023-08-30 16:30:15 +020015815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15816printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015817fi
15818
Bram Moolenaar446cb832008-06-24 21:56:24 +000015819
Illia Bobyra96d5442023-08-30 16:30:15 +020015820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
15821printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015822 if test -f po/Makefile; then
15823 have_gettext="no"
15824 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015825 olibs=$LIBS
15826 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015828/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015829#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015830int
Illia Bobyra96d5442023-08-30 16:30:15 +020015831main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015832{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015833gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015834 ;
15835 return 0;
15836}
15837_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015838if ac_fn_c_try_link "$LINENO"
15839then :
15840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
15841printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
15842else $as_nop
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015843 LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015845/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015846#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015847int
Illia Bobyra96d5442023-08-30 16:30:15 +020015848main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015849{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015850gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015851 ;
15852 return 0;
15853}
15854_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015855if ac_fn_c_try_link "$LINENO"
15856then :
15857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
15858printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015859 LIBS="$olibs -lintl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015860else $as_nop
15861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
15862printf "%s\n" "gettext() doesn't work" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015863 LIBS=$olibs
15864fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015866 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015867fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015868rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015869 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015870 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
15872printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015873 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010015874 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015875 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015876
15877 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015878
Illia Bobyra96d5442023-08-30 16:30:15 +020015879 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
15880if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
15881then :
15882 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015883
Bram Moolenaar071d4272004-06-13 20:20:40 +000015884fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015885
Illia Bobyra96d5442023-08-30 16:30:15 +020015886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
15887printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015889/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015890#include <libintl.h>
15891 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015892int
Illia Bobyra96d5442023-08-30 16:30:15 +020015893main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015894{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015895++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015896 ;
15897 return 0;
15898}
15899_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015900if ac_fn_c_try_link "$LINENO"
15901then :
15902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15903printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015904
Illia Bobyra96d5442023-08-30 16:30:15 +020015905else $as_nop
15906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15907printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015908fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015909rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015910 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
15912printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015913 MSGFMT_DESKTOP=
15914 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015915 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
15917printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015918 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15920printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015921 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
15922 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015923 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15925printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015926 fi
15927
Bram Moolenaar071d4272004-06-13 20:20:40 +000015928 fi
15929 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
15931printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015932 fi
15933else
Illia Bobyra96d5442023-08-30 16:30:15 +020015934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15935printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015936fi
15937
Illia Bobyra96d5442023-08-30 16:30:15 +020015938ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15939if test "x$ac_cv_header_dlfcn_h" = xyes
15940then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015941 DLL=dlfcn.h
Illia Bobyra96d5442023-08-30 16:30:15 +020015942else $as_nop
15943 ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
15944if test "x$ac_cv_header_dl_h" = xyes
15945then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015946 DLL=dl.h
15947fi
15948
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015949fi
15950
Bram Moolenaar071d4272004-06-13 20:20:40 +000015951if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015952
Illia Bobyra96d5442023-08-30 16:30:15 +020015953printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015954
Illia Bobyra96d5442023-08-30 16:30:15 +020015955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
15956printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015958/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015959
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015960int
Illia Bobyra96d5442023-08-30 16:30:15 +020015961main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015962{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015963
15964 extern void* dlopen();
15965 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015966
15967 ;
15968 return 0;
15969}
15970_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015971if ac_fn_c_try_link "$LINENO"
15972then :
15973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15974printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015975
Illia Bobyra96d5442023-08-30 16:30:15 +020015976printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015977
Illia Bobyra96d5442023-08-30 16:30:15 +020015978else $as_nop
15979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15980printf "%s\n" "no" >&6; };
15981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
15982printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015983 olibs=$LIBS
15984 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015986/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015987
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015988int
Illia Bobyra96d5442023-08-30 16:30:15 +020015989main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015990{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015991
15992 extern void* dlopen();
15993 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015994
15995 ;
15996 return 0;
15997}
15998_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015999if ac_fn_c_try_link "$LINENO"
16000then :
16001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16002printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016003
Illia Bobyra96d5442023-08-30 16:30:15 +020016004printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016005
Illia Bobyra96d5442023-08-30 16:30:15 +020016006else $as_nop
16007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16008printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016009 LIBS=$olibs
16010fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016011rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016012 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016013fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016014rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016015 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16017printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016019/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016020
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016021int
Illia Bobyra96d5442023-08-30 16:30:15 +020016022main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016023{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016024
16025 extern void* dlsym();
16026 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016027
16028 ;
16029 return 0;
16030}
16031_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016032if ac_fn_c_try_link "$LINENO"
16033then :
16034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16035printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016036
Illia Bobyra96d5442023-08-30 16:30:15 +020016037printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016038
Illia Bobyra96d5442023-08-30 16:30:15 +020016039else $as_nop
16040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16041printf "%s\n" "no" >&6; };
16042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16043printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016044 olibs=$LIBS
16045 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016047/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016048
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016049int
Illia Bobyra96d5442023-08-30 16:30:15 +020016050main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016051{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016052
16053 extern void* dlsym();
16054 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016055
16056 ;
16057 return 0;
16058}
16059_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016060if ac_fn_c_try_link "$LINENO"
16061then :
16062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16063printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016064
Illia Bobyra96d5442023-08-30 16:30:15 +020016065printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016066
Illia Bobyra96d5442023-08-30 16:30:15 +020016067else $as_nop
16068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16069printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016070 LIBS=$olibs
16071fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016072rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016073 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016074fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016075rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016076 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016077elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016078
Illia Bobyra96d5442023-08-30 16:30:15 +020016079printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016080
Illia Bobyra96d5442023-08-30 16:30:15 +020016081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16082printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016084/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016085
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016086int
Illia Bobyra96d5442023-08-30 16:30:15 +020016087main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016088{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016089
16090 extern void* shl_load();
16091 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016092
16093 ;
16094 return 0;
16095}
16096_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016097if ac_fn_c_try_link "$LINENO"
16098then :
16099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16100printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016101
Illia Bobyra96d5442023-08-30 16:30:15 +020016102printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016103
Illia Bobyra96d5442023-08-30 16:30:15 +020016104else $as_nop
16105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16106printf "%s\n" "no" >&6; };
16107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16108printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016109 olibs=$LIBS
16110 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016112/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016113
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016114int
Illia Bobyra96d5442023-08-30 16:30:15 +020016115main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016116{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016117
16118 extern void* shl_load();
16119 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016120
16121 ;
16122 return 0;
16123}
16124_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016125if ac_fn_c_try_link "$LINENO"
16126then :
16127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16128printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016129
Illia Bobyra96d5442023-08-30 16:30:15 +020016130printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016131
Illia Bobyra96d5442023-08-30 16:30:15 +020016132else $as_nop
16133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16134printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016135 LIBS=$olibs
16136fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016137rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016138 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016139fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016140rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016141 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016142fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016143ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16144if test "x$ac_cv_header_setjmp_h" = xyes
16145then :
16146 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016147
16148fi
16149
Bram Moolenaar071d4272004-06-13 20:20:40 +000016150
Bram Moolenaard0573012017-10-28 21:11:06 +020016151if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016152 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16153 LIBS=`echo $LIBS | sed s/-ldl//`
16154 PERL_LIBS="$PERL_LIBS -ldl"
16155 fi
16156fi
16157
Bram Moolenaard0573012017-10-28 21:11:06 +020016158if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16160printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016161 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016162 if test "$features" = "tiny"; then
16163 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16164 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16166printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016167 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016168 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16170printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016171 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016172 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016173 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16175printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016176 fi
16177fi
16178
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016179if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016180 CFLAGS="$CFLAGS -D_REENTRANT"
16181fi
16182
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016183DEPEND_CFLAGS_FILTER=
16184if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16186printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016187 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016188 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016189 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16191printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016192 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16194printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016195 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16197printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016198 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016199 CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
16200 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16202printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016203 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16205printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016206 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016207fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016208
Bram Moolenaar071d4272004-06-13 20:20:40 +000016209
Illia Bobyra96d5442023-08-30 16:30:15 +020016210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16211printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016212if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16214printf "%s\n" "yes" >&6; }
16215 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016216
16217else
Illia Bobyra96d5442023-08-30 16:30:15 +020016218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16219printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016220fi
16221
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010016222LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
16223
Illia Bobyra96d5442023-08-30 16:30:15 +020016224{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
16225printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016226LINK_AS_NEEDED=
16227# Check if linker supports --as-needed and --no-as-needed options
16228if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020016229 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
16230 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16231 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016232 LINK_AS_NEEDED=yes
16233fi
16234if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16236printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016237else
Illia Bobyra96d5442023-08-30 16:30:15 +020016238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16239printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016240fi
16241
16242
Bram Moolenaar77c19352012-06-13 19:19:41 +020016243# IBM z/OS reset CFLAGS for config.mk
16244if test "$zOSUnix" = "yes"; then
16245 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
16246fi
16247
Bram Moolenaar446cb832008-06-24 21:56:24 +000016248ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
16249
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016250cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016251# This file is a shell script that caches the results of configure
16252# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016253# scripts and configure runs, see configure's option --config-cache.
16254# It is not useful on other systems. If it contains results you don't
16255# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016256#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016257# config.status only pays attention to the cache file if you give it
16258# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016259#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016260# `ac_cv_env_foo' variables (set or unset) will be overridden when
16261# loading this file, other *unset* `ac_cv_foo' will be assigned the
16262# following values.
16263
16264_ACEOF
16265
Bram Moolenaar071d4272004-06-13 20:20:40 +000016266# The following way of writing the cache mishandles newlines in values,
16267# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016268# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016269# Ultrix sh set writes to stderr and can't be redirected directly,
16270# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016271(
16272 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16273 eval ac_val=\$$ac_var
16274 case $ac_val in #(
16275 *${as_nl}*)
16276 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016277 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16278printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016279 esac
16280 case $ac_var in #(
16281 _ | IFS | as_nl) ;; #(
16282 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016283 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016284 esac ;;
16285 esac
16286 done
16287
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016288 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016289 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16290 *${as_nl}ac_space=\ *)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016291 # `set' does not quote correctly, so add quotes: double-quote
16292 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016293 sed -n \
16294 "s/'/'\\\\''/g;
16295 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016296 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016297 *)
16298 # `set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016299 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016300 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016301 esac |
16302 sort
16303) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016304 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000016305 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016306 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000016307 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020016308 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016309 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000016310 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16311 :end' >>confcache
16312if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16313 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016314 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16316printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016317 if test ! -f "$cache_file" || test -h "$cache_file"; then
16318 cat confcache >"$cache_file"
16319 else
16320 case $cache_file in #(
16321 */* | ?:*)
16322 mv -f confcache "$cache_file"$$ &&
16323 mv -f "$cache_file"$$ "$cache_file" ;; #(
16324 *)
16325 mv -f confcache "$cache_file" ;;
16326 esac
16327 fi
16328 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016329 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16331printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000016332 fi
16333fi
16334rm -f confcache
16335
Bram Moolenaar071d4272004-06-13 20:20:40 +000016336test "x$prefix" = xNONE && prefix=$ac_default_prefix
16337# Let make expand exec_prefix.
16338test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16339
Bram Moolenaar071d4272004-06-13 20:20:40 +000016340DEFS=-DHAVE_CONFIG_H
16341
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016342ac_libobjs=
16343ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010016344U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016345for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16346 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016347 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020016348 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016349 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16350 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016351 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16352 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016353done
16354LIBOBJS=$ac_libobjs
16355
16356LTLIBOBJS=$ac_ltlibobjs
16357
16358
16359
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020016360
Bram Moolenaar7db77842014-03-27 17:40:59 +010016361: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016362ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016363ac_clean_files_save=$ac_clean_files
16364ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020016365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16366printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016367as_write_fail=0
16368cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016369#! $SHELL
16370# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016371# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016372# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016373# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016374
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016375debug=false
16376ac_cs_recheck=false
16377ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000016378
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016379SHELL=\${CONFIG_SHELL-$SHELL}
16380export SHELL
16381_ASEOF
16382cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16383## -------------------- ##
16384## M4sh Initialization. ##
16385## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000016386
Bram Moolenaar446cb832008-06-24 21:56:24 +000016387# Be more Bourne compatible
16388DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020016389as_nop=:
16390if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16391then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016392 emulate sh
16393 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000016394 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016395 # is contrary to our usage. Disable this feature.
16396 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016397 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020016398else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016399 case `(set -o) 2>/dev/null` in #(
16400 *posix*) :
16401 set -o posix ;; #(
16402 *) :
16403 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016404esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016405fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016406
16407
Illia Bobyra96d5442023-08-30 16:30:15 +020016408
16409# Reset variables that may have inherited troublesome values from
16410# the environment.
16411
16412# IFS needs to be set, to space, tab, and newline, in precisely that order.
16413# (If _AS_PATH_WALK were called with IFS unset, it would have the
16414# side effect of setting IFS to empty, thus disabling word splitting.)
16415# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016416as_nl='
16417'
16418export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020016419IFS=" "" $as_nl"
16420
16421PS1='$ '
16422PS2='> '
16423PS4='+ '
16424
16425# Ensure predictable behavior from utilities with locale-dependent output.
16426LC_ALL=C
16427export LC_ALL
16428LANGUAGE=C
16429export LANGUAGE
16430
16431# We cannot yet rely on "unset" to work, but we need these variables
16432# to be unset--not just set to an empty or harmless value--now, to
16433# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
16434# also avoids known problems related to "unset" and subshell syntax
16435# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
16436for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
16437do eval test \${$as_var+y} \
16438 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16439done
16440
16441# Ensure that fds 0, 1, and 2 are open.
16442if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
16443if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
16444if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016445
16446# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020016447if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016448 PATH_SEPARATOR=:
16449 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16450 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16451 PATH_SEPARATOR=';'
16452 }
16453fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016454
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016455
Bram Moolenaar446cb832008-06-24 21:56:24 +000016456# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016457as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016458case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016459 *[\\/]* ) as_myself=$0 ;;
16460 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16461for as_dir in $PATH
16462do
16463 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016464 case $as_dir in #(((
16465 '') as_dir=./ ;;
16466 */) ;;
16467 *) as_dir=$as_dir/ ;;
16468 esac
16469 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016470 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016471IFS=$as_save_IFS
16472
16473 ;;
16474esac
16475# We did not find ourselves, most probably we were run as `sh COMMAND'
16476# in which case we are not to be found in the path.
16477if test "x$as_myself" = x; then
16478 as_myself=$0
16479fi
16480if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016481 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016482 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000016483fi
16484
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016485
16486
Bram Moolenaar7db77842014-03-27 17:40:59 +010016487# as_fn_error STATUS ERROR [LINENO LOG_FD]
16488# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016489# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16490# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010016491# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016492as_fn_error ()
16493{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016494 as_status=$1; test $as_status -eq 0 && as_status=1
16495 if test "$4"; then
16496 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020016497 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016498 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016499 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016500 as_fn_exit $as_status
16501} # as_fn_error
16502
16503
Illia Bobyra96d5442023-08-30 16:30:15 +020016504
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016505# as_fn_set_status STATUS
16506# -----------------------
16507# Set $? to STATUS, without forking.
16508as_fn_set_status ()
16509{
16510 return $1
16511} # as_fn_set_status
16512
16513# as_fn_exit STATUS
16514# -----------------
16515# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16516as_fn_exit ()
16517{
16518 set +e
16519 as_fn_set_status $1
16520 exit $1
16521} # as_fn_exit
16522
16523# as_fn_unset VAR
16524# ---------------
16525# Portably unset VAR.
16526as_fn_unset ()
16527{
16528 { eval $1=; unset $1;}
16529}
16530as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020016531
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016532# as_fn_append VAR VALUE
16533# ----------------------
16534# Append the text in VALUE to the end of the definition contained in VAR. Take
16535# advantage of any shell optimizations that allow amortized linear growth over
16536# repeated appends, instead of the typical quadratic growth present in naive
16537# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020016538if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
16539then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016540 eval 'as_fn_append ()
16541 {
16542 eval $1+=\$2
16543 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016544else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016545 as_fn_append ()
16546 {
16547 eval $1=\$$1\$2
16548 }
16549fi # as_fn_append
16550
16551# as_fn_arith ARG...
16552# ------------------
16553# Perform arithmetic evaluation on the ARGs, and store the result in the
16554# global $as_val. Take advantage of shells that can avoid forks. The arguments
16555# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020016556if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
16557then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016558 eval 'as_fn_arith ()
16559 {
16560 as_val=$(( $* ))
16561 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016562else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016563 as_fn_arith ()
16564 {
16565 as_val=`expr "$@" || test $? -eq 1`
16566 }
16567fi # as_fn_arith
16568
16569
Bram Moolenaar446cb832008-06-24 21:56:24 +000016570if expr a : '\(a\)' >/dev/null 2>&1 &&
16571 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016572 as_expr=expr
16573else
16574 as_expr=false
16575fi
16576
Bram Moolenaar446cb832008-06-24 21:56:24 +000016577if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016578 as_basename=basename
16579else
16580 as_basename=false
16581fi
16582
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016583if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16584 as_dirname=dirname
16585else
16586 as_dirname=false
16587fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016588
Bram Moolenaar446cb832008-06-24 21:56:24 +000016589as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016590$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16591 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000016592 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016593printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016594 sed '/^.*\/\([^/][^/]*\)\/*$/{
16595 s//\1/
16596 q
16597 }
16598 /^X\/\(\/\/\)$/{
16599 s//\1/
16600 q
16601 }
16602 /^X\/\(\/\).*/{
16603 s//\1/
16604 q
16605 }
16606 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016607
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016608# Avoid depending upon Character Ranges.
16609as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16610as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16611as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16612as_cr_digits='0123456789'
16613as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016614
Illia Bobyra96d5442023-08-30 16:30:15 +020016615
16616# Determine whether it's possible to make 'echo' print without a newline.
16617# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
16618# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016619ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016620case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016621-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016622 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000016623 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016624 xy) ECHO_C='\c';;
16625 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16626 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016627 esac;;
16628*)
16629 ECHO_N='-n';;
16630esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016631
Illia Bobyra96d5442023-08-30 16:30:15 +020016632# For backward compatibility with old third-party macros, we provide
16633# the shell variables $as_echo and $as_echo_n. New code should use
16634# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
16635as_echo='printf %s\n'
16636as_echo_n='printf %s'
16637
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016638rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000016639if test -d conf$$.dir; then
16640 rm -f conf$$.dir/conf$$.file
16641else
16642 rm -f conf$$.dir
16643 mkdir conf$$.dir 2>/dev/null
16644fi
16645if (echo >conf$$.file) 2>/dev/null; then
16646 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016647 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016648 # ... but there are two gotchas:
16649 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16650 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016651 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016652 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016653 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016654 elif ln conf$$.file conf$$ 2>/dev/null; then
16655 as_ln_s=ln
16656 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016657 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016658 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016659else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016660 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016661fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016662rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16663rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016664
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016665
16666# as_fn_mkdir_p
16667# -------------
16668# Create "$as_dir" as a directory, including parents if necessary.
16669as_fn_mkdir_p ()
16670{
16671
16672 case $as_dir in #(
16673 -*) as_dir=./$as_dir;;
16674 esac
16675 test -d "$as_dir" || eval $as_mkdir_p || {
16676 as_dirs=
16677 while :; do
16678 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016679 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016680 *) as_qdir=$as_dir;;
16681 esac
16682 as_dirs="'$as_qdir' $as_dirs"
16683 as_dir=`$as_dirname -- "$as_dir" ||
16684$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16685 X"$as_dir" : 'X\(//\)[^/]' \| \
16686 X"$as_dir" : 'X\(//\)$' \| \
16687 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016688printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016689 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16690 s//\1/
16691 q
16692 }
16693 /^X\(\/\/\)[^/].*/{
16694 s//\1/
16695 q
16696 }
16697 /^X\(\/\/\)$/{
16698 s//\1/
16699 q
16700 }
16701 /^X\(\/\).*/{
16702 s//\1/
16703 q
16704 }
16705 s/.*/./; q'`
16706 test -d "$as_dir" && break
16707 done
16708 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010016709 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016710
16711
16712} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016713if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016714 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016715else
16716 test -d ./-p && rmdir ./-p
16717 as_mkdir_p=false
16718fi
16719
Bram Moolenaar7db77842014-03-27 17:40:59 +010016720
16721# as_fn_executable_p FILE
16722# -----------------------
16723# Test if FILE is an executable regular file.
16724as_fn_executable_p ()
16725{
16726 test -f "$1" && test -x "$1"
16727} # as_fn_executable_p
16728as_test_x='test -x'
16729as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016730
16731# Sed expression to map a string onto a valid CPP name.
16732as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16733
16734# Sed expression to map a string onto a valid variable name.
16735as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16736
16737
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016738exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016739## ----------------------------------- ##
16740## Main body of $CONFIG_STATUS script. ##
16741## ----------------------------------- ##
16742_ASEOF
16743test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016744
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016745cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16746# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016747# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000016748# values after options handling.
16749ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016750This file was extended by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +020016751generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016752
16753 CONFIG_FILES = $CONFIG_FILES
16754 CONFIG_HEADERS = $CONFIG_HEADERS
16755 CONFIG_LINKS = $CONFIG_LINKS
16756 CONFIG_COMMANDS = $CONFIG_COMMANDS
16757 $ $0 $@
16758
Bram Moolenaar446cb832008-06-24 21:56:24 +000016759on `(hostname || uname -n) 2>/dev/null | sed 1q`
16760"
16761
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016762_ACEOF
16763
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016764case $ac_config_files in *"
16765"*) set x $ac_config_files; shift; ac_config_files=$*;;
16766esac
16767
16768case $ac_config_headers in *"
16769"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16770esac
16771
16772
Bram Moolenaar446cb832008-06-24 21:56:24 +000016773cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016774# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016775config_files="$ac_config_files"
16776config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016777
Bram Moolenaar446cb832008-06-24 21:56:24 +000016778_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016779
Bram Moolenaar446cb832008-06-24 21:56:24 +000016780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016781ac_cs_usage="\
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016782\`$as_me' instantiates files and other configuration actions
16783from templates according to the current configuration. Unless the files
16784and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016785
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016786Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016787
16788 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000016789 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016790 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016791 -q, --quiet, --silent
16792 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016793 -d, --debug don't remove temporary files
16794 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016795 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016796 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016797 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016798 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016799
16800Configuration files:
16801$config_files
16802
16803Configuration headers:
16804$config_headers
16805
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016806Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016807
Bram Moolenaar446cb832008-06-24 21:56:24 +000016808_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016809ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
16810ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016811cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020016812ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016813ac_cs_version="\\
16814config.status
Illia Bobyra96d5442023-08-30 16:30:15 +020016815configured by $0, generated by GNU Autoconf 2.71,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016816 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016817
Illia Bobyra96d5442023-08-30 16:30:15 +020016818Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016819This config.status script is free software; the Free Software Foundation
16820gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000016821
16822ac_pwd='$ac_pwd'
16823srcdir='$srcdir'
16824AWK='$AWK'
16825test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016826_ACEOF
16827
Bram Moolenaar446cb832008-06-24 21:56:24 +000016828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16829# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016830ac_need_defaults=:
16831while test $# != 0
16832do
16833 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010016834 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016835 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16836 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016837 ac_shift=:
16838 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016839 --*=)
16840 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16841 ac_optarg=
16842 ac_shift=:
16843 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016844 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016845 ac_option=$1
16846 ac_optarg=$2
16847 ac_shift=shift
16848 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016849 esac
16850
16851 case $ac_option in
16852 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016853 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16854 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016855 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020016856 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016857 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020016858 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016859 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016860 debug=: ;;
16861 --file | --fil | --fi | --f )
16862 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016863 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016864 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016865 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016866 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016867 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016868 ac_need_defaults=false;;
16869 --header | --heade | --head | --hea )
16870 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016871 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016872 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016873 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016874 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016875 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016876 --he | --h)
16877 # Conflict between --help and --header
Bram Moolenaar7db77842014-03-27 17:40:59 +010016878 as_fn_error $? "ambiguous option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016879Try \`$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016880 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020016881 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016882 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16883 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16884 ac_cs_silent=: ;;
16885
16886 # This is an error.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016887 -*) as_fn_error $? "unrecognized option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016888Try \`$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016889
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016890 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016891 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016892
16893 esac
16894 shift
16895done
16896
16897ac_configure_extra_args=
16898
16899if $ac_cs_silent; then
16900 exec 6>/dev/null
16901 ac_configure_extra_args="$ac_configure_extra_args --silent"
16902fi
16903
16904_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016905cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016906if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016907 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000016908 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020016909 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000016910 CONFIG_SHELL='$SHELL'
16911 export CONFIG_SHELL
16912 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016913fi
16914
16915_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016916cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16917exec 5>>auto/config.log
16918{
16919 echo
16920 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16921## Running $as_me. ##
16922_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020016923 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016924} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016925
Bram Moolenaar446cb832008-06-24 21:56:24 +000016926_ACEOF
16927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16928_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016929
Bram Moolenaar446cb832008-06-24 21:56:24 +000016930cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016931
Bram Moolenaar446cb832008-06-24 21:56:24 +000016932# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016933for ac_config_target in $ac_config_targets
16934do
Bram Moolenaar446cb832008-06-24 21:56:24 +000016935 case $ac_config_target in
16936 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
16937 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
16938
Bram Moolenaar7db77842014-03-27 17:40:59 +010016939 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016940 esac
16941done
16942
Bram Moolenaar446cb832008-06-24 21:56:24 +000016943
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016944# If the user did not use the arguments to specify the items to instantiate,
16945# then the envvar interface is used. Set only those that are not.
16946# We use the long form for the default assignment because of an extremely
16947# bizarre bug on SunOS 4.1.3.
16948if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016949 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
16950 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016951fi
16952
16953# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000016954# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016955# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016956# Hook for its removal unless debugging.
16957# Note that there is a small window in which the directory will not be cleaned:
16958# after its creation but before its name has been assigned to `$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016959$debug ||
16960{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016961 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000016962 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010016963 : "${ac_tmp:=$tmp}"
16964 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000016965' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016966 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016967}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016968# Create a (secure) tmp directory for tmp files.
16969
16970{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016971 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010016972 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016973} ||
16974{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016975 tmp=./conf$$-$RANDOM
16976 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010016977} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
16978ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016979
Bram Moolenaar446cb832008-06-24 21:56:24 +000016980# Set up the scripts for CONFIG_FILES section.
16981# No need to generate them if there are no CONFIG_FILES.
16982# This happens for instance with `./config.status config.h'.
16983if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016984
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016985
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016986ac_cr=`echo X | tr X '\015'`
16987# On cygwin, bash can eat \r inside `` if the user requested igncr.
16988# But we know of no other shell where ac_cr would be empty at this
16989# point, so we can use a bashism as a fallback.
16990if test "x$ac_cr" = x; then
16991 eval ac_cr=\$\'\\r\'
16992fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016993ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16994if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016995 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016996else
Bram Moolenaar446cb832008-06-24 21:56:24 +000016997 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016998fi
16999
Bram Moolenaar7db77842014-03-27 17:40:59 +010017000echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017001_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017002
Bram Moolenaar446cb832008-06-24 21:56:24 +000017003
17004{
17005 echo "cat >conf$$subs.awk <<_ACEOF" &&
17006 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17007 echo "_ACEOF"
17008} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017009 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17010ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017011ac_delim='%!_!# '
17012for ac_last_try in false false false false false :; do
17013 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017014 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017015
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017016 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17017 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017018 break
17019 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017020 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017021 else
17022 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17023 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017024done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017025rm -f conf$$subs.sh
17026
17027cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017028cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017029_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017030sed -n '
17031h
17032s/^/S["/; s/!.*/"]=/
17033p
17034g
17035s/^[^!]*!//
17036:repl
17037t repl
17038s/'"$ac_delim"'$//
17039t delim
17040:nl
17041h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017042s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017043t more1
17044s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17045p
17046n
17047b repl
17048:more1
17049s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17050p
17051g
17052s/.\{148\}//
17053t nl
17054:delim
17055h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017056s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017057t more2
17058s/["\\]/\\&/g; s/^/"/; s/$/"/
17059p
17060b
17061:more2
17062s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17063p
17064g
17065s/.\{148\}//
17066t delim
17067' <conf$$subs.awk | sed '
17068/^[^""]/{
17069 N
17070 s/\n//
17071}
17072' >>$CONFIG_STATUS || ac_write_fail=1
17073rm -f conf$$subs.awk
17074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17075_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017076cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017077 for (key in S) S_is_set[key] = 1
17078 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017079
Bram Moolenaar446cb832008-06-24 21:56:24 +000017080}
17081{
17082 line = $ 0
17083 nfields = split(line, field, "@")
17084 substed = 0
17085 len = length(field[1])
17086 for (i = 2; i < nfields; i++) {
17087 key = field[i]
17088 keylen = length(key)
17089 if (S_is_set[key]) {
17090 value = S[key]
17091 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17092 len += length(value) + length(field[++i])
17093 substed = 1
17094 } else
17095 len += 1 + keylen
17096 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017097
Bram Moolenaar446cb832008-06-24 21:56:24 +000017098 print line
17099}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017100
Bram Moolenaar446cb832008-06-24 21:56:24 +000017101_ACAWK
17102_ACEOF
17103cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17104if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17105 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17106else
17107 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017108fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17109 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017110_ACEOF
17111
Bram Moolenaar7db77842014-03-27 17:40:59 +010017112# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17113# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017114# trailing colons and then remove the whole line if VPATH becomes empty
17115# (actually we leave an empty line to preserve line numbers).
17116if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017117 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17118h
17119s///
17120s/^/:/
17121s/[ ]*$/:/
17122s/:\$(srcdir):/:/g
17123s/:\${srcdir}:/:/g
17124s/:@srcdir@:/:/g
17125s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017126s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017127x
17128s/\(=[ ]*\).*/\1/
17129G
17130s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017131s/^[^=]*=[ ]*$//
17132}'
17133fi
17134
17135cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17136fi # test -n "$CONFIG_FILES"
17137
17138# Set up the scripts for CONFIG_HEADERS section.
17139# No need to generate them if there are no CONFIG_HEADERS.
17140# This happens for instance with `./config.status Makefile'.
17141if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017142cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017143BEGIN {
17144_ACEOF
17145
17146# Transform confdefs.h into an awk script `defines.awk', embedded as
17147# here-document in config.status, that substitutes the proper values into
17148# config.h.in to produce config.h.
17149
17150# Create a delimiter string that does not exist in confdefs.h, to ease
17151# handling of long lines.
17152ac_delim='%!_!# '
17153for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017154 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17155 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017156 break
17157 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017158 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017159 else
17160 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17161 fi
17162done
17163
17164# For the awk script, D is an array of macro values keyed by name,
17165# likewise P contains macro parameters if any. Preserve backslash
17166# newline sequences.
17167
17168ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17169sed -n '
17170s/.\{148\}/&'"$ac_delim"'/g
17171t rset
17172:rset
17173s/^[ ]*#[ ]*define[ ][ ]*/ /
17174t def
17175d
17176:def
17177s/\\$//
17178t bsnl
17179s/["\\]/\\&/g
17180s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17181D["\1"]=" \3"/p
17182s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17183d
17184:bsnl
17185s/["\\]/\\&/g
17186s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17187D["\1"]=" \3\\\\\\n"\\/p
17188t cont
17189s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17190t cont
17191d
17192:cont
17193n
17194s/.\{148\}/&'"$ac_delim"'/g
17195t clear
17196:clear
17197s/\\$//
17198t bsnlc
17199s/["\\]/\\&/g; s/^/"/; s/$/"/p
17200d
17201:bsnlc
17202s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17203b cont
17204' <confdefs.h | sed '
17205s/'"$ac_delim"'/"\\\
17206"/g' >>$CONFIG_STATUS || ac_write_fail=1
17207
17208cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17209 for (key in D) D_is_set[key] = 1
17210 FS = ""
17211}
17212/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17213 line = \$ 0
17214 split(line, arg, " ")
17215 if (arg[1] == "#") {
17216 defundef = arg[2]
17217 mac1 = arg[3]
17218 } else {
17219 defundef = substr(arg[1], 2)
17220 mac1 = arg[2]
17221 }
17222 split(mac1, mac2, "(") #)
17223 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017224 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017225 if (D_is_set[macro]) {
17226 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000017227 print prefix "define", macro P[macro] D[macro]
17228 next
17229 } else {
17230 # Replace #undef with comments. This is necessary, for example,
17231 # in the case of _POSIX_SOURCE, which is predefined and required
17232 # on some systems where configure will not decide to define it.
17233 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017234 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017235 next
17236 }
17237 }
17238}
17239{ print }
17240_ACAWK
17241_ACEOF
17242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017243 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017244fi # test -n "$CONFIG_HEADERS"
17245
17246
17247eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17248shift
17249for ac_tag
17250do
17251 case $ac_tag in
17252 :[FHLC]) ac_mode=$ac_tag; continue;;
17253 esac
17254 case $ac_mode$ac_tag in
17255 :[FHL]*:*);;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017256 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017257 :[FH]-) ac_tag=-:-;;
17258 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17259 esac
17260 ac_save_IFS=$IFS
17261 IFS=:
17262 set x $ac_tag
17263 IFS=$ac_save_IFS
17264 shift
17265 ac_file=$1
17266 shift
17267
17268 case $ac_mode in
17269 :L) ac_source=$1;;
17270 :[FH])
17271 ac_file_inputs=
17272 for ac_f
17273 do
17274 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017275 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017276 *) # Look for the file first in the build tree, then in the source tree
17277 # (if the path is not absolute). The absolute path cannot be DOS-style,
17278 # because $ac_f cannot contain `:'.
17279 test -f "$ac_f" ||
17280 case $ac_f in
17281 [\\/$]*) false;;
17282 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17283 esac ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017284 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017285 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020017286 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017287 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017288 done
17289
17290 # Let's still pretend it is `configure' which instantiates (i.e., don't
17291 # use $as_me), people would be surprised to read:
17292 # /* config.h. Generated by config.status. */
17293 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020017294 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017295 `' by configure.'
17296 if test x"$ac_file" != x-; then
17297 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020017298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17299printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017300 fi
17301 # Neutralize special characters interpreted by sed in replacement strings.
17302 case $configure_input in #(
17303 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020017304 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017305 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17306 *) ac_sed_conf_input=$configure_input;;
17307 esac
17308
17309 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017310 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17311 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017312 esac
17313 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000017314 esac
17315
Bram Moolenaar446cb832008-06-24 21:56:24 +000017316 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017317$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17318 X"$ac_file" : 'X\(//\)[^/]' \| \
17319 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017320 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017321printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017322 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17323 s//\1/
17324 q
17325 }
17326 /^X\(\/\/\)[^/].*/{
17327 s//\1/
17328 q
17329 }
17330 /^X\(\/\/\)$/{
17331 s//\1/
17332 q
17333 }
17334 /^X\(\/\).*/{
17335 s//\1/
17336 q
17337 }
17338 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017339 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000017340 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017341
Bram Moolenaar446cb832008-06-24 21:56:24 +000017342case "$ac_dir" in
17343.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17344*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017345 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017346 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020017347 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017348 case $ac_top_builddir_sub in
17349 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17350 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17351 esac ;;
17352esac
17353ac_abs_top_builddir=$ac_pwd
17354ac_abs_builddir=$ac_pwd$ac_dir_suffix
17355# for backward compatibility:
17356ac_top_builddir=$ac_top_build_prefix
17357
17358case $srcdir in
17359 .) # We are building in place.
17360 ac_srcdir=.
17361 ac_top_srcdir=$ac_top_builddir_sub
17362 ac_abs_top_srcdir=$ac_pwd ;;
17363 [\\/]* | ?:[\\/]* ) # Absolute name.
17364 ac_srcdir=$srcdir$ac_dir_suffix;
17365 ac_top_srcdir=$srcdir
17366 ac_abs_top_srcdir=$srcdir ;;
17367 *) # Relative name.
17368 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17369 ac_top_srcdir=$ac_top_build_prefix$srcdir
17370 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17371esac
17372ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17373
17374
17375 case $ac_mode in
17376 :F)
17377 #
17378 # CONFIG_FILE
17379 #
17380
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017381_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017382
Bram Moolenaar446cb832008-06-24 21:56:24 +000017383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17384# If the template does not know about datarootdir, expand it.
17385# FIXME: This hack should be removed a few years after 2.60.
17386ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017387ac_sed_dataroot='
17388/datarootdir/ {
17389 p
17390 q
17391}
17392/@datadir@/p
17393/@docdir@/p
17394/@infodir@/p
17395/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017396/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017397case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17398*datarootdir*) ac_datarootdir_seen=yes;;
17399*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17401printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017402_ACEOF
17403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17404 ac_datarootdir_hack='
17405 s&@datadir@&$datadir&g
17406 s&@docdir@&$docdir&g
17407 s&@infodir@&$infodir&g
17408 s&@localedir@&$localedir&g
17409 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017410 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017411esac
17412_ACEOF
17413
17414# Neutralize VPATH when `$srcdir' = `.'.
17415# Shell code in configure.ac might set extrasub.
17416# FIXME: do we really want to maintain this feature?
17417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17418ac_sed_extra="$ac_vpsub
17419$extrasub
17420_ACEOF
17421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17422:t
17423/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17424s|@configure_input@|$ac_sed_conf_input|;t t
17425s&@top_builddir@&$ac_top_builddir_sub&;t t
17426s&@top_build_prefix@&$ac_top_build_prefix&;t t
17427s&@srcdir@&$ac_srcdir&;t t
17428s&@abs_srcdir@&$ac_abs_srcdir&;t t
17429s&@top_srcdir@&$ac_top_srcdir&;t t
17430s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17431s&@builddir@&$ac_builddir&;t t
17432s&@abs_builddir@&$ac_abs_builddir&;t t
17433s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17434$ac_datarootdir_hack
17435"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017436eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17437 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017438
17439test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017440 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17441 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17442 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +020017443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017444which seems to be undefined. Please make sure it is defined" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017445printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017446which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017447
Bram Moolenaar7db77842014-03-27 17:40:59 +010017448 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017449 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017450 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17451 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017452 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017453 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017454 ;;
17455 :H)
17456 #
17457 # CONFIG_HEADER
17458 #
17459 if test x"$ac_file" != x-; then
17460 {
Illia Bobyra96d5442023-08-30 16:30:15 +020017461 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017462 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17463 } >"$ac_tmp/config.h" \
17464 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17465 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17467printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017468 else
17469 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017470 mv "$ac_tmp/config.h" "$ac_file" \
17471 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017472 fi
17473 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017474 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017475 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17476 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017477 fi
17478 ;;
17479
17480
17481 esac
17482
17483done # for ac_tag
17484
Bram Moolenaar071d4272004-06-13 20:20:40 +000017485
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017486as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017487_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017488ac_clean_files=$ac_clean_files_save
17489
Bram Moolenaar446cb832008-06-24 21:56:24 +000017490test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017491 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017492
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017493
17494# configure is writing to config.log, and then calls config.status.
17495# config.status does its own redirection, appending to config.log.
17496# Unfortunately, on DOS this fails, as config.log is still kept open
17497# by configure, so config.status won't be able to write to it; its
17498# output is simply discarded. So we exec the FD to /dev/null,
17499# effectively closing config.log, so it can be properly (re)opened and
17500# appended to by config.status. When coming back to configure, we
17501# need to make the FD available again.
17502if test "$no_create" != yes; then
17503 ac_cs_success=:
17504 ac_config_status_args=
17505 test "$silent" = yes &&
17506 ac_config_status_args="$ac_config_status_args --quiet"
17507 exec 5>/dev/null
17508 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000017509 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017510 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17511 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017512 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017513fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017514if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17516printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017517fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017518
17519
Illia Bobyra96d5442023-08-30 16:30:15 +020017520