blob: 9712104cde7ae79e5b4d721f031f01ffd265dd9c [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
RestorerZe498caf2024-03-12 22:11:36 +0100653MSGFMTCMD
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200654MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000655MAKEMO
656MSGFMT
657INSTALL_TOOL_LANGS
658INSTALL_LANGS
659TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000660GUI_X_LIBS
661GUITYPE
662GUI_LIB_LOC
663GUI_INC_LOC
664NARROW_PROTO
665MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100666GRESOURCE_OBJ
667GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200668UPDATE_DESKTOP_DATABASE
669GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100670GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000671GNOME_INCLUDEDIR
672GNOME_LIBDIR
673GNOME_LIBS
674GTK_LIBNAME
675GTK_LIBS
676GTK_CFLAGS
677PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000678X_LIB
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684xmkmfpath
Bram Moolenaar823edd12019-10-23 22:35:36 +0200685TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200686TERM_OBJ
687TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100688CHANNEL_OBJ
689CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000690NETBEANS_OBJ
691NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000692RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000693RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000694RUBY_CFLAGS
695RUBY_PRO
696RUBY_OBJ
697RUBY_SRC
698vi_cv_path_ruby
699TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000700TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000701TCL_CFLAGS
702TCL_PRO
703TCL_OBJ
704TCL_SRC
705vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200706PYTHON3_OBJ
707PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000708PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200709PYTHON3_CFLAGS
710PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200711vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200712vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000713PYTHON_OBJ
714PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000715PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000716PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000717PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000718vi_cv_path_python
719PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000720PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000721PERL_CFLAGS
722PERL_PRO
723PERL_OBJ
724PERL_SRC
725shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200726vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000727vi_cv_perllib
728vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000729MZSCHEME_MZC
730MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000731MZSCHEME_CFLAGS
732MZSCHEME_LIBS
733MZSCHEME_PRO
734MZSCHEME_OBJ
735MZSCHEME_SRC
736vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000737LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200738LUA_CFLAGS
739LUA_LIBS
740LUA_PRO
741LUA_OBJ
742LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200743vi_cv_path_plain_lua
744vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200745vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000746XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000747compiledby
748dogvimdiff
749dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200750QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000751line_break
752VIEWNAME
753EXNAME
754VIMNAME
755OS_EXTRA_OBJ
756OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100757XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000758CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200759CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200760BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000761STRIP
762AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100763FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000764EGREP
765GREP
766CPP
767OBJEXT
768EXEEXT
769ac_ct_CC
770CPPFLAGS
771LDFLAGS
772CFLAGS
773CC
774SET_MAKE
775target_alias
776host_alias
777build_alias
778LIBS
779ECHO_T
780ECHO_N
781ECHO_C
782DEFS
783mandir
784localedir
785libdir
786psdir
787pdfdir
788dvidir
789htmldir
790infodir
791docdir
792oldincludedir
793includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200794runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000795localstatedir
796sharedstatedir
797sysconfdir
798datadir
799datarootdir
800libexecdir
801sbindir
802bindir
803program_transform_name
804prefix
805exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200806PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000807PACKAGE_BUGREPORT
808PACKAGE_STRING
809PACKAGE_VERSION
810PACKAGE_TARNAME
811PACKAGE_NAME
812PATH_SEPARATOR
813SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000814ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000815ac_user_opts='
816enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100817enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000818enable_darwin
819with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100820with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000821with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000822with_vim_name
823with_ex_name
824with_view_name
825with_global_runtime
826with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200827enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000828enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200829enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000830with_features
831with_compiledby
832enable_xsmp
833enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200834enable_luainterp
835with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200836with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000837enable_mzschemeinterp
838with_plthome
839enable_perlinterp
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +0100840with_xsubpp
Bram Moolenaar446cb832008-06-24 21:56:24 +0000841enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200842with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000843with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200844enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200845with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200846with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200847with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000848enable_tclinterp
849with_tclsh
850enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100851with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000852enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000853enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100854enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200855enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100856enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000857enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100858enable_rightleft
859enable_arabic
860enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000861enable_xim
862enable_fontset
863with_x
864enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000865enable_gtk2_check
866enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100867enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000868enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000869enable_gtktest
870with_gnome_includes
871with_gnome_libs
872with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200873enable_icon_cache_update
874enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000875with_motif_lib
876with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200877enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200878enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200879enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000880enable_acl
881enable_gpm
882enable_sysmouse
883enable_nls
884'
885 ac_precious_vars='build_alias
886host_alias
887target_alias
888CC
889CFLAGS
890LDFLAGS
891LIBS
892CPPFLAGS
893CPP
894XMKMF'
895
Bram Moolenaar071d4272004-06-13 20:20:40 +0000896
897# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000898ac_init_help=
899ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000900ac_unrecognized_opts=
901ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000902# The variables have the same names as the options, with
903# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000904cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000907no_recursion=
908prefix=NONE
909program_prefix=NONE
910program_suffix=NONE
911program_transform_name=s,x,x,
912silent=
913site=
914srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000915verbose=
916x_includes=NONE
917x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000918
919# Installation directory options.
920# These are left unexpanded so users can "make install exec_prefix=/foo"
921# and all the variables that are supposed to be based on exec_prefix
922# by default will actually change.
923# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000924# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925bindir='${exec_prefix}/bin'
926sbindir='${exec_prefix}/sbin'
927libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000928datarootdir='${prefix}/share'
929datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000930sysconfdir='${prefix}/etc'
931sharedstatedir='${prefix}/com'
932localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200933runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000934includedir='${prefix}/include'
935oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000936docdir='${datarootdir}/doc/${PACKAGE}'
937infodir='${datarootdir}/info'
938htmldir='${docdir}'
939dvidir='${docdir}'
940pdfdir='${docdir}'
941psdir='${docdir}'
942libdir='${exec_prefix}/lib'
943localedir='${datarootdir}/locale'
944mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945
Bram Moolenaar071d4272004-06-13 20:20:40 +0000946ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000947ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948for ac_option
949do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000950 # If the previous option needs an argument, assign it.
951 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000952 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000953 ac_prev=
954 continue
955 fi
956
Bram Moolenaar446cb832008-06-24 21:56:24 +0000957 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100958 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
959 *=) ac_optarg= ;;
960 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000961 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000962
Bram Moolenaar446cb832008-06-24 21:56:24 +0000963 case $ac_dashdash$ac_option in
964 --)
965 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000966
967 -bindir | --bindir | --bindi | --bind | --bin | --bi)
968 ac_prev=bindir ;;
969 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000970 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000971
972 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000973 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000974 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000975 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000976
977 -cache-file | --cache-file | --cache-fil | --cache-fi \
978 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
979 ac_prev=cache_file ;;
980 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
981 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000982 cache_file=$ac_optarg ;;
983
984 --config-cache | -C)
985 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000986
Bram Moolenaar446cb832008-06-24 21:56:24 +0000987 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000988 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000989 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000990 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000991
Bram Moolenaar446cb832008-06-24 21:56:24 +0000992 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
993 | --dataroo | --dataro | --datar)
994 ac_prev=datarootdir ;;
995 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
996 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
997 datarootdir=$ac_optarg ;;
998
Bram Moolenaar071d4272004-06-13 20:20:40 +0000999 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001000 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001001 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001002 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001003 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001004 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001005 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001006 case $ac_user_opts in
1007 *"
1008"enable_$ac_useropt"
1009"*) ;;
1010 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1011 ac_unrecognized_sep=', ';;
1012 esac
1013 eval enable_$ac_useropt=no ;;
1014
1015 -docdir | --docdir | --docdi | --doc | --do)
1016 ac_prev=docdir ;;
1017 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1018 docdir=$ac_optarg ;;
1019
1020 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1021 ac_prev=dvidir ;;
1022 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1023 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001024
1025 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001026 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001027 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001028 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001029 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001030 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001031 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001032 case $ac_user_opts in
1033 *"
1034"enable_$ac_useropt"
1035"*) ;;
1036 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1037 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001038 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001039 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001040
1041 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1042 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1043 | --exec | --exe | --ex)
1044 ac_prev=exec_prefix ;;
1045 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1046 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1047 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001048 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001049
1050 -gas | --gas | --ga | --g)
1051 # Obsolete; use --with-gas.
1052 with_gas=yes ;;
1053
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001054 -help | --help | --hel | --he | -h)
1055 ac_init_help=long ;;
1056 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1057 ac_init_help=recursive ;;
1058 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1059 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001060
1061 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001062 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001063 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001064 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001065
Bram Moolenaar446cb832008-06-24 21:56:24 +00001066 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1067 ac_prev=htmldir ;;
1068 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1069 | --ht=*)
1070 htmldir=$ac_optarg ;;
1071
Bram Moolenaar071d4272004-06-13 20:20:40 +00001072 -includedir | --includedir | --includedi | --included | --include \
1073 | --includ | --inclu | --incl | --inc)
1074 ac_prev=includedir ;;
1075 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1076 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001077 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001078
1079 -infodir | --infodir | --infodi | --infod | --info | --inf)
1080 ac_prev=infodir ;;
1081 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001082 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001083
1084 -libdir | --libdir | --libdi | --libd)
1085 ac_prev=libdir ;;
1086 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001087 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001088
1089 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1090 | --libexe | --libex | --libe)
1091 ac_prev=libexecdir ;;
1092 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1093 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001094 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001095
Bram Moolenaar446cb832008-06-24 21:56:24 +00001096 -localedir | --localedir | --localedi | --localed | --locale)
1097 ac_prev=localedir ;;
1098 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1099 localedir=$ac_optarg ;;
1100
Bram Moolenaar071d4272004-06-13 20:20:40 +00001101 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001102 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001103 ac_prev=localstatedir ;;
1104 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001105 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001106 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001107
1108 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1109 ac_prev=mandir ;;
1110 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001111 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001112
1113 -nfp | --nfp | --nf)
1114 # Obsolete; use --without-fp.
1115 with_fp=no ;;
1116
1117 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001118 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001119 no_create=yes ;;
1120
1121 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1122 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1123 no_recursion=yes ;;
1124
1125 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1126 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1127 | --oldin | --oldi | --old | --ol | --o)
1128 ac_prev=oldincludedir ;;
1129 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1130 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1131 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001132 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001133
1134 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1135 ac_prev=prefix ;;
1136 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001137 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001138
1139 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1140 | --program-pre | --program-pr | --program-p)
1141 ac_prev=program_prefix ;;
1142 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1143 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001144 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001145
1146 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1147 | --program-suf | --program-su | --program-s)
1148 ac_prev=program_suffix ;;
1149 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1150 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001151 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001152
1153 -program-transform-name | --program-transform-name \
1154 | --program-transform-nam | --program-transform-na \
1155 | --program-transform-n | --program-transform- \
1156 | --program-transform | --program-transfor \
1157 | --program-transfo | --program-transf \
1158 | --program-trans | --program-tran \
1159 | --progr-tra | --program-tr | --program-t)
1160 ac_prev=program_transform_name ;;
1161 -program-transform-name=* | --program-transform-name=* \
1162 | --program-transform-nam=* | --program-transform-na=* \
1163 | --program-transform-n=* | --program-transform-=* \
1164 | --program-transform=* | --program-transfor=* \
1165 | --program-transfo=* | --program-transf=* \
1166 | --program-trans=* | --program-tran=* \
1167 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001168 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001169
Bram Moolenaar446cb832008-06-24 21:56:24 +00001170 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1171 ac_prev=pdfdir ;;
1172 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1173 pdfdir=$ac_optarg ;;
1174
1175 -psdir | --psdir | --psdi | --psd | --ps)
1176 ac_prev=psdir ;;
1177 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1178 psdir=$ac_optarg ;;
1179
Bram Moolenaar071d4272004-06-13 20:20:40 +00001180 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1181 | -silent | --silent | --silen | --sile | --sil)
1182 silent=yes ;;
1183
Illia Bobyrf39842f2023-08-27 18:21:23 +02001184 -runstatedir | --runstatedir | --runstatedi | --runstated \
1185 | --runstate | --runstat | --runsta | --runst | --runs \
1186 | --run | --ru | --r)
1187 ac_prev=runstatedir ;;
1188 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1189 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1190 | --run=* | --ru=* | --r=*)
1191 runstatedir=$ac_optarg ;;
1192
Bram Moolenaar071d4272004-06-13 20:20:40 +00001193 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1194 ac_prev=sbindir ;;
1195 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1196 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001197 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001198
1199 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1200 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1201 | --sharedst | --shareds | --shared | --share | --shar \
1202 | --sha | --sh)
1203 ac_prev=sharedstatedir ;;
1204 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1205 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1206 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1207 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001208 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001209
1210 -site | --site | --sit)
1211 ac_prev=site ;;
1212 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001213 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001214
1215 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1216 ac_prev=srcdir ;;
1217 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001218 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001219
1220 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1221 | --syscon | --sysco | --sysc | --sys | --sy)
1222 ac_prev=sysconfdir ;;
1223 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1224 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001225 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001226
1227 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001228 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001229 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001230 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001231
1232 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1233 verbose=yes ;;
1234
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001235 -version | --version | --versio | --versi | --vers | -V)
1236 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001237
1238 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001239 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001240 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001241 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001242 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001243 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001244 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001245 case $ac_user_opts in
1246 *"
1247"with_$ac_useropt"
1248"*) ;;
1249 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1250 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001251 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001252 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001253
1254 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001255 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001256 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001258 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001259 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001260 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001261 case $ac_user_opts in
1262 *"
1263"with_$ac_useropt"
1264"*) ;;
1265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1266 ac_unrecognized_sep=', ';;
1267 esac
1268 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001269
1270 --x)
1271 # Obsolete; use --with-x.
1272 with_x=yes ;;
1273
1274 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1275 | --x-incl | --x-inc | --x-in | --x-i)
1276 ac_prev=x_includes ;;
1277 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1278 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001279 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001280
1281 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1282 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1283 ac_prev=x_libraries ;;
1284 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1285 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001286 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001287
Bram Moolenaar7db77842014-03-27 17:40:59 +01001288 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1289Try \`$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001290 ;;
1291
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001292 *=*)
1293 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1294 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001295 case $ac_envvar in #(
1296 '' | [0-9]* | *[!_$as_cr_alnum]* )
Bram Moolenaar7db77842014-03-27 17:40:59 +01001297 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001298 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001299 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001300 export $ac_envvar ;;
1301
Bram Moolenaar071d4272004-06-13 20:20:40 +00001302 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001303 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001304 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001305 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001306 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001307 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001308 ;;
1309
1310 esac
1311done
1312
1313if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001314 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001315 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001316fi
1317
Bram Moolenaar446cb832008-06-24 21:56:24 +00001318if test -n "$ac_unrecognized_opts"; then
1319 case $enable_option_checking in
1320 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001321 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001322 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001323 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001324fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001325
Bram Moolenaar446cb832008-06-24 21:56:24 +00001326# Check all directory arguments for consistency.
1327for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1328 datadir sysconfdir sharedstatedir localstatedir includedir \
1329 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001330 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001331do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001332 eval ac_val=\$$ac_var
1333 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001334 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001335 */ )
1336 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1337 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001338 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001339 # Be sure to have absolute directory names.
1340 case $ac_val in
1341 [\\/$]* | ?:[\\/]* ) continue;;
1342 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1343 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001344 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001345done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001346
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001347# There might be people who depend on the old broken behavior: `$host'
1348# used to hold the argument of --host etc.
1349# FIXME: To remove some day.
1350build=$build_alias
1351host=$host_alias
1352target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001353
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001354# FIXME: To remove some day.
1355if test "x$host_alias" != x; then
1356 if test "x$build_alias" = x; then
1357 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001358 elif test "x$build_alias" != "x$host_alias"; then
1359 cross_compiling=yes
1360 fi
1361fi
1362
1363ac_tool_prefix=
1364test -n "$host_alias" && ac_tool_prefix=$host_alias-
1365
1366test "$silent" = yes && exec 6>/dev/null
1367
Bram Moolenaar071d4272004-06-13 20:20:40 +00001368
Bram Moolenaar446cb832008-06-24 21:56:24 +00001369ac_pwd=`pwd` && test -n "$ac_pwd" &&
1370ac_ls_di=`ls -di .` &&
1371ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001372 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001373test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001374 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001375
1376
Bram Moolenaar071d4272004-06-13 20:20:40 +00001377# Find the source files, if location was not specified.
1378if test -z "$srcdir"; then
1379 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001380 # Try the directory containing this script, then the parent directory.
1381 ac_confdir=`$as_dirname -- "$as_myself" ||
1382$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1383 X"$as_myself" : 'X\(//\)[^/]' \| \
1384 X"$as_myself" : 'X\(//\)$' \| \
1385 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001386printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1388 s//\1/
1389 q
1390 }
1391 /^X\(\/\/\)[^/].*/{
1392 s//\1/
1393 q
1394 }
1395 /^X\(\/\/\)$/{
1396 s//\1/
1397 q
1398 }
1399 /^X\(\/\).*/{
1400 s//\1/
1401 q
1402 }
1403 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001404 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001405 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001406 srcdir=..
1407 fi
1408else
1409 ac_srcdir_defaulted=no
1410fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001411if test ! -r "$srcdir/$ac_unique_file"; then
1412 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001413 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001414fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001415ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1416ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001417 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001418 pwd)`
1419# When building in place, set srcdir=.
1420if test "$ac_abs_confdir" = "$ac_pwd"; then
1421 srcdir=.
1422fi
1423# Remove unnecessary trailing slashes from srcdir.
1424# Double slashes in file names in object file debugging info
1425# mess up M-x gdb in Emacs.
1426case $srcdir in
1427*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1428esac
1429for ac_var in $ac_precious_vars; do
1430 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1431 eval ac_env_${ac_var}_value=\$${ac_var}
1432 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1433 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1434done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001435
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001436#
1437# Report the --help message.
1438#
1439if test "$ac_init_help" = "long"; then
1440 # Omit some internal or obsolete options to make the list less imposing.
1441 # This message is too long to be a string in the A/UX 3.1 sh.
1442 cat <<_ACEOF
1443\`configure' configures this package to adapt to many kinds of systems.
1444
1445Usage: $0 [OPTION]... [VAR=VALUE]...
1446
1447To assign environment variables (e.g., CC, CFLAGS...), specify them as
1448VAR=VALUE. See below for descriptions of some of the useful variables.
1449
1450Defaults for the options are specified in brackets.
1451
1452Configuration:
1453 -h, --help display this help and exit
1454 --help=short display options specific to this package
1455 --help=recursive display the short help of all the included packages
1456 -V, --version display version information and exit
Bram Moolenaar7db77842014-03-27 17:40:59 +01001457 -q, --quiet, --silent do not print \`checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001458 --cache-file=FILE cache test results in FILE [disabled]
1459 -C, --config-cache alias for \`--cache-file=config.cache'
1460 -n, --no-create do not create output files
1461 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1462
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001463Installation directories:
1464 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001465 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001466 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001467 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001468
1469By default, \`make install' will install all the files in
1470\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1471an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1472for instance \`--prefix=\$HOME'.
1473
1474For better control, use the options below.
1475
1476Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001477 --bindir=DIR user executables [EPREFIX/bin]
1478 --sbindir=DIR system admin executables [EPREFIX/sbin]
1479 --libexecdir=DIR program executables [EPREFIX/libexec]
1480 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1481 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1482 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001483 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001484 --libdir=DIR object code libraries [EPREFIX/lib]
1485 --includedir=DIR C header files [PREFIX/include]
1486 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1487 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1488 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1489 --infodir=DIR info documentation [DATAROOTDIR/info]
1490 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1491 --mandir=DIR man documentation [DATAROOTDIR/man]
1492 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1493 --htmldir=DIR html documentation [DOCDIR]
1494 --dvidir=DIR dvi documentation [DOCDIR]
1495 --pdfdir=DIR pdf documentation [DOCDIR]
1496 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001497_ACEOF
1498
1499 cat <<\_ACEOF
1500
1501X features:
1502 --x-includes=DIR X include files are in DIR
1503 --x-libraries=DIR X library files are in DIR
1504_ACEOF
1505fi
1506
1507if test -n "$ac_init_help"; then
1508
1509 cat <<\_ACEOF
1510
1511Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001512 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001513 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1514 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001515 --enable-fail-if-missing Fail if dependencies on additional features
1516 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001517 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001518 --disable-smack Do not check for Smack support.
1519 --disable-selinux Do not check for SELinux support.
Christian Brabandte085dfd2023-09-30 12:49:18 +02001520 --disable-xattr Do not check for XATTR support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001521 --disable-xsmp Disable XSMP session management
1522 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001523 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1524 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001525 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001526 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001527 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001528 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001529 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001530 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001531 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001532 --disable-channel Disable process communication support.
1533 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001534 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001535 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001536 --disable-rightleft Do not include Right-to-Left language support.
1537 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001538 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001539 --enable-xim Include XIM input support.
1540 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001541 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001542 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001543 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001544 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001545 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001546 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001547 --disable-icon-cache-update update disabled
1548 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001549 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001550 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001551 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001552 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001553 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001554 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001555 --disable-nls Don't support NLS (gettext()).
1556
1557Optional Packages:
1558 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1559 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001560 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001561 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001562 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1563 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001564 --with-vim-name=NAME what to call the Vim executable
1565 --with-ex-name=NAME what to call the Ex executable
1566 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001567 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001568 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001569 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001570 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001571 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001572 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001573 --with-plthome=PLTHOME Use PLTHOME.
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01001574 --with-xsubpp=PATH path to the xsubpp command
Bram Moolenaare1a32312018-04-15 16:03:25 +02001575 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1576 --with-python-config-dir=PATH Python's config directory (deprecated)
1577 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02001578 --with-python3-stable-abi=VERSION stable ABI version to target (e.g. 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001579 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001580 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001581 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001582 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001583 --with-gnome-includes=DIR Specify location of GNOME headers
1584 --with-gnome-libs=DIR Specify location of GNOME libs
1585 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001586 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001587 --with-tlib=library terminal library to be used
1588
1589Some influential environment variables:
1590 CC C compiler command
1591 CFLAGS C compiler flags
1592 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1593 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001594 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001595 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001596 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001597 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001598 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001599
1600Use these variables to override the choices made by `configure' or to help
1601it to find libraries and programs with nonstandard names/locations.
1602
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001603Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001604_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001605ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001606fi
1607
1608if test "$ac_init_help" = "recursive"; then
1609 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001610 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001611 test -d "$ac_dir" ||
1612 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1613 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001614 ac_builddir=.
1615
Bram Moolenaar446cb832008-06-24 21:56:24 +00001616case "$ac_dir" in
1617.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1618*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001619 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001620 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001621 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001622 case $ac_top_builddir_sub in
1623 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1624 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1625 esac ;;
1626esac
1627ac_abs_top_builddir=$ac_pwd
1628ac_abs_builddir=$ac_pwd$ac_dir_suffix
1629# for backward compatibility:
1630ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001631
1632case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001633 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001634 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001635 ac_top_srcdir=$ac_top_builddir_sub
1636 ac_abs_top_srcdir=$ac_pwd ;;
1637 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001638 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001639 ac_top_srcdir=$srcdir
1640 ac_abs_top_srcdir=$srcdir ;;
1641 *) # Relative name.
1642 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1643 ac_top_srcdir=$ac_top_build_prefix$srcdir
1644 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001645esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001646ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001647
Bram Moolenaar446cb832008-06-24 21:56:24 +00001648 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001649 # Check for configure.gnu first; this name is used for a wrapper for
1650 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001651 if test -f "$ac_srcdir/configure.gnu"; then
1652 echo &&
1653 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1654 elif test -f "$ac_srcdir/configure"; then
1655 echo &&
1656 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001657 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001658 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001659 fi || ac_status=$?
1660 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001661 done
1662fi
1663
Bram Moolenaar446cb832008-06-24 21:56:24 +00001664test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001665if $ac_init_version; then
1666 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001667configure
Illia Bobyra96d5442023-08-30 16:30:15 +02001668generated by GNU Autoconf 2.71
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001669
Illia Bobyra96d5442023-08-30 16:30:15 +02001670Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001671This configure script is free software; the Free Software Foundation
1672gives unlimited permission to copy, distribute and modify it.
1673_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001674 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001675fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001676
1677## ------------------------ ##
1678## Autoconf initialization. ##
1679## ------------------------ ##
1680
1681# ac_fn_c_try_compile LINENO
1682# --------------------------
1683# Try to compile conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_compile ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001687 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001688 if { { ac_try="$ac_compile"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001694printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001695 (eval "$ac_compile") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001702 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001703 test $ac_status = 0; } && {
1704 test -z "$ac_c_werror_flag" ||
1705 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001706 } && test -s conftest.$ac_objext
1707then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001708 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001709else $as_nop
1710 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=1
1714fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001716 as_fn_set_status $ac_retval
1717
1718} # ac_fn_c_try_compile
1719
1720# ac_fn_c_try_cpp LINENO
1721# ----------------------
1722# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1723ac_fn_c_try_cpp ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1726 if { { ac_try="$ac_cpp conftest.$ac_ext"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001732printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001740 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001741 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001742 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1743 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001744 }
1745then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001746 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001747else $as_nop
1748 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001749sed 's/^/| /' conftest.$ac_ext >&5
1750
1751 ac_retval=1
1752fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_cpp
1757
1758# ac_fn_c_try_link LINENO
1759# -----------------------
1760# Try to link conftest.$ac_ext, and return whether this succeeded.
1761ac_fn_c_try_link ()
1762{
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001764 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001765 if { { ac_try="$ac_link"
1766case "(($ac_try" in
1767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1768 *) ac_try_echo=$ac_try;;
1769esac
1770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001771printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001772 (eval "$ac_link") 2>conftest.err
1773 ac_status=$?
1774 if test -s conftest.err; then
1775 grep -v '^ *+' conftest.err >conftest.er1
1776 cat conftest.er1 >&5
1777 mv -f conftest.er1 conftest.err
1778 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001779 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001780 test $ac_status = 0; } && {
1781 test -z "$ac_c_werror_flag" ||
1782 test ! -s conftest.err
1783 } && test -s conftest$ac_exeext && {
1784 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001785 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001786 }
1787then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001788 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001789else $as_nop
1790 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001791sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=1
1794fi
1795 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1796 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1797 # interfere with the next link command; also delete a directory that is
1798 # left behind by Apple's compiler. We do this before executing the actions.
1799 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001800 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001801 as_fn_set_status $ac_retval
1802
1803} # ac_fn_c_try_link
1804
Illia Bobyr0e82b592023-08-29 21:16:29 +02001805# ac_fn_c_try_run LINENO
1806# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001807# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1808# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001809ac_fn_c_try_run ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 if { { ac_try="$ac_link"
1813case "(($ac_try" in
1814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1815 *) ac_try_echo=$ac_try;;
1816esac
1817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001818printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001819 (eval "$ac_link") 2>&5
1820 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001821 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001822 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1823 { { case "(($ac_try" in
1824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1825 *) ac_try_echo=$ac_try;;
1826esac
1827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001828printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001829 (eval "$ac_try") 2>&5
1830 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001831 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1832 test $ac_status = 0; }; }
1833then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001834 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001835else $as_nop
1836 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1837 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001838sed 's/^/| /' conftest.$ac_ext >&5
1839
1840 ac_retval=$ac_status
1841fi
1842 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1843 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1844 as_fn_set_status $ac_retval
1845
1846} # ac_fn_c_try_run
1847
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001848# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1849# -------------------------------------------------------
1850# Tests whether HEADER exists and can be compiled using the include files in
1851# INCLUDES, setting the cache variable VAR accordingly.
1852ac_fn_c_check_header_compile ()
1853{
1854 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1856printf %s "checking for $2... " >&6; }
1857if eval test \${$3+y}
1858then :
1859 printf %s "(cached) " >&6
1860else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1862/* end confdefs.h. */
1863$4
1864#include <$2>
1865_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001866if ac_fn_c_try_compile "$LINENO"
1867then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001868 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001869else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001870 eval "$3=no"
1871fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001872rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001873fi
1874eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1876printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001878
1879} # ac_fn_c_check_header_compile
1880
1881# ac_fn_c_check_func LINENO FUNC VAR
1882# ----------------------------------
1883# Tests whether FUNC exists, setting the cache variable VAR accordingly
1884ac_fn_c_check_func ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888printf %s "checking for $2... " >&6; }
1889if eval test \${$3+y}
1890then :
1891 printf %s "(cached) " >&6
1892else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1896 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1897#define $2 innocuous_$2
1898
1899/* System header to define __stub macros and hopefully few prototypes,
Illia Bobyra96d5442023-08-30 16:30:15 +02001900 which can conflict with char $2 (); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001901
Illia Bobyra96d5442023-08-30 16:30:15 +02001902#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001903#undef $2
1904
1905/* Override any GCC internal prototype to avoid an error.
1906 Use char because int might match the return type of a GCC
1907 builtin and then its argument prototype would still apply. */
1908#ifdef __cplusplus
1909extern "C"
1910#endif
1911char $2 ();
1912/* The GNU C library defines this for functions which it implements
1913 to always fail with ENOSYS. Some functions are actually named
1914 something starting with __ and the normal name is an alias. */
1915#if defined __stub_$2 || defined __stub___$2
1916choke me
1917#endif
1918
1919int
Illia Bobyra96d5442023-08-30 16:30:15 +02001920main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001921{
1922return $2 ();
1923 ;
1924 return 0;
1925}
1926_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001927if ac_fn_c_try_link "$LINENO"
1928then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001929 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001930else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001931 eval "$3=no"
1932fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001933rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001934 conftest$ac_exeext conftest.$ac_ext
1935fi
1936eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1938printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001939 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001940
1941} # ac_fn_c_check_func
1942
Bram Moolenaar914703b2010-05-31 21:59:46 +02001943# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1944# --------------------------------------------
1945# Tries to find the compile-time value of EXPR in a program that includes
1946# INCLUDES, setting VAR accordingly. Returns whether the value could be
1947# computed
1948ac_fn_c_compute_int ()
1949{
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 if test "$cross_compiling" = yes; then
1952 # Depending upon the size, compute the lo and hi bounds.
1953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1954/* end confdefs.h. */
1955$4
1956int
Illia Bobyra96d5442023-08-30 16:30:15 +02001957main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001958{
1959static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001960test_array [0] = 0;
1961return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001962
1963 ;
1964 return 0;
1965}
1966_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001967if ac_fn_c_try_compile "$LINENO"
1968then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001969 ac_lo=0 ac_mid=0
1970 while :; do
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972/* end confdefs.h. */
1973$4
1974int
Illia Bobyra96d5442023-08-30 16:30:15 +02001975main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001976{
1977static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001978test_array [0] = 0;
1979return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001980
1981 ;
1982 return 0;
1983}
1984_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001985if ac_fn_c_try_compile "$LINENO"
1986then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001987 ac_hi=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02001988else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001989 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1990 if test $ac_lo -le $ac_mid; then
1991 ac_lo= ac_hi=
1992 break
1993 fi
1994 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1995fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001996rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02001997 done
Illia Bobyra96d5442023-08-30 16:30:15 +02001998else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$4
2002int
Illia Bobyra96d5442023-08-30 16:30:15 +02002003main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002004{
2005static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002006test_array [0] = 0;
2007return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002008
2009 ;
2010 return 0;
2011}
2012_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002013if ac_fn_c_try_compile "$LINENO"
2014then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002015 ac_hi=-1 ac_mid=-1
2016 while :; do
2017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2018/* end confdefs.h. */
2019$4
2020int
Illia Bobyra96d5442023-08-30 16:30:15 +02002021main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002022{
2023static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002024test_array [0] = 0;
2025return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002026
2027 ;
2028 return 0;
2029}
2030_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002031if ac_fn_c_try_compile "$LINENO"
2032then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002033 ac_lo=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02002034else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002035 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2036 if test $ac_mid -le $ac_hi; then
2037 ac_lo= ac_hi=
2038 break
2039 fi
2040 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2041fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002042rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002043 done
Illia Bobyra96d5442023-08-30 16:30:15 +02002044else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002045 ac_lo= ac_hi=
2046fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002047rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002048fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002049rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002050# Binary search between lo and hi bounds.
2051while test "x$ac_lo" != "x$ac_hi"; do
2052 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
Illia Bobyra96d5442023-08-30 16:30:15 +02002057main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002058{
2059static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002060test_array [0] = 0;
2061return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002067if ac_fn_c_try_compile "$LINENO"
2068then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002069 ac_hi=$ac_mid
Illia Bobyra96d5442023-08-30 16:30:15 +02002070else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002071 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2072fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002073rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002074done
2075case $ac_lo in #((
2076?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2077'') ac_retval=1 ;;
2078esac
2079 else
2080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002083static long int longval (void) { return $2; }
2084static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002085#include <stdio.h>
2086#include <stdlib.h>
2087int
Illia Bobyra96d5442023-08-30 16:30:15 +02002088main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002089{
2090
2091 FILE *f = fopen ("conftest.val", "w");
2092 if (! f)
2093 return 1;
2094 if (($2) < 0)
2095 {
2096 long int i = longval ();
2097 if (i != ($2))
2098 return 1;
2099 fprintf (f, "%ld", i);
2100 }
2101 else
2102 {
2103 unsigned long int i = ulongval ();
2104 if (i != ($2))
2105 return 1;
2106 fprintf (f, "%lu", i);
2107 }
2108 /* Do not output a trailing newline, as this causes \r\n confusion
2109 on some platforms. */
2110 return ferror (f) || fclose (f) != 0;
2111
2112 ;
2113 return 0;
2114}
2115_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002116if ac_fn_c_try_run "$LINENO"
2117then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002118 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02002119else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002120 ac_retval=1
2121fi
2122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2123 conftest.$ac_objext conftest.beam conftest.$ac_ext
2124rm -f conftest.val
2125
2126 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002127 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002128 as_fn_set_status $ac_retval
2129
2130} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002131
2132# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2133# -------------------------------------------
2134# Tests whether TYPE exists after having included INCLUDES, setting cache
2135# variable VAR accordingly.
2136ac_fn_c_check_type ()
2137{
2138 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140printf %s "checking for $2... " >&6; }
2141if eval test \${$3+y}
2142then :
2143 printf %s "(cached) " >&6
2144else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002145 eval "$3=no"
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147/* end confdefs.h. */
2148$4
2149int
Illia Bobyra96d5442023-08-30 16:30:15 +02002150main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002151{
2152if (sizeof ($2))
2153 return 0;
2154 ;
2155 return 0;
2156}
2157_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002158if ac_fn_c_try_compile "$LINENO"
2159then :
Mike Gilberta055b442023-08-20 19:01:41 +02002160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163int
Illia Bobyra96d5442023-08-30 16:30:15 +02002164main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002165{
2166if (sizeof (($2)))
2167 return 0;
2168 ;
2169 return 0;
2170}
2171_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002172if ac_fn_c_try_compile "$LINENO"
2173then :
Mike Gilberta055b442023-08-20 19:01:41 +02002174
Illia Bobyra96d5442023-08-30 16:30:15 +02002175else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002176 eval "$3=yes"
2177fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002179fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002180rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002181fi
2182eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2184printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002185 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2186
2187} # ac_fn_c_check_type
2188
2189# ac_fn_c_find_uintX_t LINENO BITS VAR
2190# ------------------------------------
2191# Finds an unsigned integer type with width BITS, setting cache variable VAR
2192# accordingly.
2193ac_fn_c_find_uintX_t ()
2194{
2195 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2197printf %s "checking for uint$2_t... " >&6; }
2198if eval test \${$3+y}
2199then :
2200 printf %s "(cached) " >&6
2201else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002202 eval "$3=no"
2203 # Order is important - never check a type that is potentially smaller
2204 # than half of the expected target width.
2205 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2206 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h. */
2209$ac_includes_default
2210int
Illia Bobyra96d5442023-08-30 16:30:15 +02002211main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002212{
2213static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2214test_array [0] = 0;
2215return test_array [0];
2216
2217 ;
2218 return 0;
2219}
2220_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002221if ac_fn_c_try_compile "$LINENO"
2222then :
Mike Gilberta055b442023-08-20 19:01:41 +02002223 case $ac_type in #(
2224 uint$2_t) :
2225 eval "$3=yes" ;; #(
2226 *) :
2227 eval "$3=\$ac_type" ;;
2228esac
2229fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002230rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2231 if eval test \"x\$"$3"\" = x"no"
2232then :
Mike Gilberta055b442023-08-20 19:01:41 +02002233
Illia Bobyra96d5442023-08-30 16:30:15 +02002234else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002235 break
2236fi
2237 done
2238fi
2239eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002242 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2243
2244} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002245ac_configure_args_raw=
2246for ac_arg
2247do
2248 case $ac_arg in
2249 *\'*)
2250 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2251 esac
2252 as_fn_append ac_configure_args_raw " '$ac_arg'"
2253done
2254
2255case $ac_configure_args_raw in
2256 *$as_nl*)
2257 ac_safe_unquote= ;;
2258 *)
2259 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2260 ac_unsafe_a="$ac_unsafe_z#~"
2261 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2262 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2263esac
2264
Bram Moolenaar446cb832008-06-24 21:56:24 +00002265cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002266This file contains any messages produced by compilers while
2267running configure, to aid debugging if configure makes a mistake.
2268
2269It was created by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +02002270generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002271
Illia Bobyra96d5442023-08-30 16:30:15 +02002272 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002273
2274_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002275exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002276{
2277cat <<_ASUNAME
2278## --------- ##
2279## Platform. ##
2280## --------- ##
2281
2282hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2283uname -m = `(uname -m) 2>/dev/null || echo unknown`
2284uname -r = `(uname -r) 2>/dev/null || echo unknown`
2285uname -s = `(uname -s) 2>/dev/null || echo unknown`
2286uname -v = `(uname -v) 2>/dev/null || echo unknown`
2287
2288/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2289/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2290
2291/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2292/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2293/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002294/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002295/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2296/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2297/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2298
2299_ASUNAME
2300
2301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2302for as_dir in $PATH
2303do
2304 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002305 case $as_dir in #(((
2306 '') as_dir=./ ;;
2307 */) ;;
2308 *) as_dir=$as_dir/ ;;
2309 esac
2310 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002311 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002312IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002313
2314} >&5
2315
2316cat >&5 <<_ACEOF
2317
2318
2319## ----------- ##
2320## Core tests. ##
2321## ----------- ##
2322
2323_ACEOF
2324
2325
2326# Keep a trace of the command line.
2327# Strip out --no-create and --no-recursion so they do not pile up.
2328# Strip out --silent because we don't want to record it for future runs.
2329# Also quote any args containing shell meta-characters.
2330# Make two passes to allow for proper duplicate-argument suppression.
2331ac_configure_args=
2332ac_configure_args0=
2333ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002334ac_must_keep_next=false
2335for ac_pass in 1 2
2336do
2337 for ac_arg
2338 do
2339 case $ac_arg in
2340 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2341 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2342 | -silent | --silent | --silen | --sile | --sil)
2343 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002344 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002345 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002346 esac
2347 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002348 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002349 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002350 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002351 if test $ac_must_keep_next = true; then
2352 ac_must_keep_next=false # Got value, back to normal.
2353 else
2354 case $ac_arg in
2355 *=* | --config-cache | -C | -disable-* | --disable-* \
2356 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2357 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2358 | -with-* | --with-* | -without-* | --without-* | --x)
2359 case "$ac_configure_args0 " in
2360 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2361 esac
2362 ;;
2363 -* ) ac_must_keep_next=true ;;
2364 esac
2365 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002366 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002367 ;;
2368 esac
2369 done
2370done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002371{ ac_configure_args0=; unset ac_configure_args0;}
2372{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002373
2374# When interrupted or exit'd, cleanup temporary files, and complete
2375# config.log. We remove comments because anyway the quotes in there
2376# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002377# WARNING: Use '\'' to represent an apostrophe within the trap.
2378# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002379trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002380 # Sanitize IFS.
2381 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002382 # Save into config.log some information that might help in debugging.
2383 {
2384 echo
2385
Illia Bobyra96d5442023-08-30 16:30:15 +02002386 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002387## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002388## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002389 echo
2390 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002391(
2392 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2393 eval ac_val=\$$ac_var
2394 case $ac_val in #(
2395 *${as_nl}*)
2396 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002397 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2398printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002399 esac
2400 case $ac_var in #(
2401 _ | IFS | as_nl) ;; #(
2402 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002403 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002404 esac ;;
2405 esac
2406 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002407 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002408 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2409 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002410 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002411 "s/'\''/'\''\\\\'\'''\''/g;
2412 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2413 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002414 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002415 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002416 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002417 esac |
2418 sort
2419)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002420 echo
2421
Illia Bobyra96d5442023-08-30 16:30:15 +02002422 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002423## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002424## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002425 echo
2426 for ac_var in $ac_subst_vars
2427 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002428 eval ac_val=\$$ac_var
2429 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002430 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002431 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002432 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002433 done | sort
2434 echo
2435
2436 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002437 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002438## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002439## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002440 echo
2441 for ac_var in $ac_subst_files
2442 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002443 eval ac_val=\$$ac_var
2444 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002445 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002446 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002447 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002448 done | sort
2449 echo
2450 fi
2451
2452 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002453 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002454## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002455## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002456 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002457 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002458 echo
2459 fi
2460 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002461 printf "%s\n" "$as_me: caught signal $ac_signal"
2462 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002463 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002464 rm -f core *.core core.conftest.* &&
2465 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002466 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002467' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002468for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002469 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002470done
2471ac_signal=0
2472
2473# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002474rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002475
Illia Bobyra96d5442023-08-30 16:30:15 +02002476printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002477
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002478# Predefined preprocessor variables.
2479
Illia Bobyra96d5442023-08-30 16:30:15 +02002480printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002481
Illia Bobyra96d5442023-08-30 16:30:15 +02002482printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002483
Illia Bobyra96d5442023-08-30 16:30:15 +02002484printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002485
Illia Bobyra96d5442023-08-30 16:30:15 +02002486printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002487
Illia Bobyra96d5442023-08-30 16:30:15 +02002488printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002489
Illia Bobyra96d5442023-08-30 16:30:15 +02002490printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002491
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002492
2493# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002494# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002495if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002496 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002497elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002498 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002499else
Illia Bobyra96d5442023-08-30 16:30:15 +02002500 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002501fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002502
2503for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002504do
Illia Bobyra96d5442023-08-30 16:30:15 +02002505 case $ac_site_file in #(
2506 */*) :
2507 ;; #(
2508 *) :
2509 ac_site_file=./$ac_site_file ;;
2510esac
2511 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2513printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002514 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002515 . "$ac_site_file" \
Illia Bobyra96d5442023-08-30 16:30:15 +02002516 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2517printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002518as_fn_error $? "failed to load site script $ac_site_file
2519See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002520 fi
2521done
2522
2523if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002524 # Some versions of bash will fail to source /dev/null (special files
2525 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2526 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2528printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002529 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002530 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2531 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002532 esac
2533 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002534else
Illia Bobyra96d5442023-08-30 16:30:15 +02002535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2536printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002537 >$cache_file
2538fi
2539
Illia Bobyra96d5442023-08-30 16:30:15 +02002540# Test code for whether the C compiler supports C89 (global declarations)
2541ac_c_conftest_c89_globals='
2542/* Does the compiler advertise C89 conformance?
2543 Do not test the value of __STDC__, because some compilers set it to 0
2544 while being otherwise adequately conformant. */
2545#if !defined __STDC__
2546# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002547#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002548
Illia Bobyra96d5442023-08-30 16:30:15 +02002549#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002550#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002551struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002552/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002553struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002554struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002555static char *e (p, i)
2556 char **p;
2557 int i;
2558{
2559 return p[i];
2560}
2561static char *f (char * (*g) (char **, int), char **p, ...)
2562{
2563 char *s;
2564 va_list v;
2565 va_start (v,p);
2566 s = g (p, va_arg (v,int));
2567 va_end (v);
2568 return s;
2569}
2570
2571/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002572 function prototypes and stuff, but not \xHH hex character constants.
2573 These do not provoke an error unfortunately, instead are silently treated
2574 as an "x". The following induces an error, until -std is added to get
2575 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2576 array size at least. It is necessary to write \x00 == 0 to get something
2577 that is true only with -std. */
2578int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002579
Bram Moolenaar446cb832008-06-24 21:56:24 +00002580/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2581 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002582#define FOO(x) '\''x'\''
2583int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002584
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002585int test (int i, double x);
2586struct s1 {int (*f) (int a);};
2587struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002588int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2589 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002590
Illia Bobyra96d5442023-08-30 16:30:15 +02002591# Test code for whether the C compiler supports C89 (body of main).
2592ac_c_conftest_c89_main='
2593ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2594'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002595
Illia Bobyra96d5442023-08-30 16:30:15 +02002596# Test code for whether the C compiler supports C99 (global declarations)
2597ac_c_conftest_c99_globals='
2598// Does the compiler advertise C99 conformance?
2599#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2600# error "Compiler does not advertise C99 conformance"
2601#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002602
Bram Moolenaar22640082018-04-19 20:39:41 +02002603#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002604extern int puts (const char *);
2605extern int printf (const char *, ...);
2606extern int dprintf (int, const char *, ...);
2607extern void *malloc (size_t);
Bram Moolenaar22640082018-04-19 20:39:41 +02002608
2609// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002610// dprintf is used instead of fprintf to avoid needing to declare
2611// FILE and stderr.
2612#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002613#define showlist(...) puts (#__VA_ARGS__)
2614#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2615static void
2616test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002617{
Bram Moolenaar22640082018-04-19 20:39:41 +02002618 int x = 1234;
2619 int y = 5678;
2620 debug ("Flag");
2621 debug ("X = %d\n", x);
2622 showlist (The first, second, and third items.);
2623 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002624}
2625
Bram Moolenaar22640082018-04-19 20:39:41 +02002626// Check long long types.
2627#define BIG64 18446744073709551615ull
2628#define BIG32 4294967295ul
2629#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2630#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002631 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002632#endif
2633#if BIG_OK
2634#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002635 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002636#endif
2637static long long int bignum = -9223372036854775807LL;
2638static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002639
Bram Moolenaar22640082018-04-19 20:39:41 +02002640struct incomplete_array
2641{
2642 int datasize;
2643 double data[];
2644};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002645
Bram Moolenaar22640082018-04-19 20:39:41 +02002646struct named_init {
2647 int number;
2648 const wchar_t *name;
2649 double average;
2650};
2651
2652typedef const char *ccp;
2653
2654static inline int
2655test_restrict (ccp restrict text)
2656{
2657 // See if C++-style comments work.
2658 // Iterate through items via the restricted pointer.
2659 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002660 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002661 continue;
2662 return 0;
2663}
2664
2665// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002666static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002667test_varargs (const char *format, ...)
2668{
2669 va_list args;
2670 va_start (args, format);
2671 va_list args_copy;
2672 va_copy (args_copy, args);
2673
Illia Bobyra96d5442023-08-30 16:30:15 +02002674 const char *str = "";
2675 int number = 0;
2676 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002677
2678 while (*format)
2679 {
2680 switch (*format++)
2681 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002682 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002683 str = va_arg (args_copy, const char *);
2684 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002685 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002686 number = va_arg (args_copy, int);
2687 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002688 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002689 fnumber = va_arg (args_copy, double);
2690 break;
2691 default:
2692 break;
2693 }
2694 }
2695 va_end (args_copy);
2696 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002697
2698 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002699}
Illia Bobyra96d5442023-08-30 16:30:15 +02002700'
Bram Moolenaar22640082018-04-19 20:39:41 +02002701
Illia Bobyra96d5442023-08-30 16:30:15 +02002702# Test code for whether the C compiler supports C99 (body of main).
2703ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002704 // Check bool.
2705 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002706 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002707
2708 // Check restrict.
2709 if (test_restrict ("String literal") == 0)
2710 success = true;
2711 char *restrict newvar = "Another string";
2712
2713 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002714 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002715 test_varargs_macros ();
2716
2717 // Check flexible array members.
2718 struct incomplete_array *ia =
2719 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2720 ia->datasize = 10;
2721 for (int i = 0; i < ia->datasize; ++i)
2722 ia->data[i] = i * 1.234;
2723
2724 // Check named initializers.
2725 struct named_init ni = {
2726 .number = 34,
2727 .name = L"Test wide string",
2728 .average = 543.34343,
2729 };
2730
2731 ni.number = 58;
2732
2733 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002734 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002735 dynamic_array[ni.number - 1] = 543;
2736
2737 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002738 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2739 || dynamic_array[ni.number - 1] != 543);
2740'
2741
2742# Test code for whether the C compiler supports C11 (global declarations)
2743ac_c_conftest_c11_globals='
2744// Does the compiler advertise C11 conformance?
2745#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2746# error "Compiler does not advertise C11 conformance"
2747#endif
2748
2749// Check _Alignas.
2750char _Alignas (double) aligned_as_double;
2751char _Alignas (0) no_special_alignment;
2752extern char aligned_as_int;
2753char _Alignas (0) _Alignas (int) aligned_as_int;
2754
2755// Check _Alignof.
2756enum
2757{
2758 int_alignment = _Alignof (int),
2759 int_array_alignment = _Alignof (int[100]),
2760 char_alignment = _Alignof (char)
2761};
2762_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2763
2764// Check _Noreturn.
2765int _Noreturn does_not_return (void) { for (;;) continue; }
2766
2767// Check _Static_assert.
2768struct test_static_assert
2769{
2770 int x;
2771 _Static_assert (sizeof (int) <= sizeof (long int),
2772 "_Static_assert does not work in struct");
2773 long int y;
2774};
2775
2776// Check UTF-8 literals.
2777#define u8 syntax error!
2778char const utf8_literal[] = u8"happens to be ASCII" "another string";
2779
2780// Check duplicate typedefs.
2781typedef long *long_ptr;
2782typedef long int *long_ptr;
2783typedef long_ptr long_ptr;
2784
2785// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2786struct anonymous
2787{
2788 union {
2789 struct { int i; int j; };
2790 struct { int k; long int l; } w;
2791 };
2792 int m;
2793} v1;
2794'
2795
2796# Test code for whether the C compiler supports C11 (body of main).
2797ac_c_conftest_c11_main='
2798 _Static_assert ((offsetof (struct anonymous, i)
2799 == offsetof (struct anonymous, w.k)),
2800 "Anonymous union alignment botch");
2801 v1.i = 2;
2802 v1.w.k = 5;
2803 ok |= v1.i != 5;
2804'
2805
2806# Test code for whether the C compiler supports C11 (complete).
2807ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2808${ac_c_conftest_c99_globals}
2809${ac_c_conftest_c11_globals}
2810
2811int
2812main (int argc, char **argv)
2813{
2814 int ok = 0;
2815 ${ac_c_conftest_c89_main}
2816 ${ac_c_conftest_c99_main}
2817 ${ac_c_conftest_c11_main}
2818 return ok;
2819}
2820"
2821
2822# Test code for whether the C compiler supports C99 (complete).
2823ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2824${ac_c_conftest_c99_globals}
2825
2826int
2827main (int argc, char **argv)
2828{
2829 int ok = 0;
2830 ${ac_c_conftest_c89_main}
2831 ${ac_c_conftest_c99_main}
2832 return ok;
2833}
2834"
2835
2836# Test code for whether the C compiler supports C89 (complete).
2837ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2838
2839int
2840main (int argc, char **argv)
2841{
2842 int ok = 0;
2843 ${ac_c_conftest_c89_main}
2844 return ok;
2845}
2846"
2847
2848as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2849as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2850as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2851as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2852as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2853as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2854as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2855as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2856as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2857as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2858as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2859as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2860# Check that the precious variables saved in the cache have kept the same
2861# value.
2862ac_cache_corrupted=false
2863for ac_var in $ac_precious_vars; do
2864 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2865 eval ac_new_set=\$ac_env_${ac_var}_set
2866 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2867 eval ac_new_val=\$ac_env_${ac_var}_value
2868 case $ac_old_set,$ac_new_set in
2869 set,)
2870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2871printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2872 ac_cache_corrupted=: ;;
2873 ,set)
2874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2875printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2876 ac_cache_corrupted=: ;;
2877 ,);;
2878 *)
2879 if test "x$ac_old_val" != "x$ac_new_val"; then
2880 # differences in whitespace do not lead to failure.
2881 ac_old_val_w=`echo x $ac_old_val`
2882 ac_new_val_w=`echo x $ac_new_val`
2883 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2885printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2886 ac_cache_corrupted=:
2887 else
2888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2889printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2890 eval $ac_var=\$ac_old_val
2891 fi
2892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2893printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2895printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2896 fi;;
2897 esac
2898 # Pass precious variables to config.status.
2899 if test "$ac_new_set" = set; then
2900 case $ac_new_val in
2901 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2902 *) ac_arg=$ac_var=$ac_new_val ;;
2903 esac
2904 case " $ac_configure_args " in
2905 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2906 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2907 esac
2908 fi
2909done
2910if $ac_cache_corrupted; then
2911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2912printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2914printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2915 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2916 and start over" "$LINENO" 5
2917fi
2918## -------------------- ##
2919## Main body of script. ##
2920## -------------------- ##
2921
2922ac_ext=c
2923ac_cpp='$CPP $CPPFLAGS'
2924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2926ac_compiler_gnu=$ac_cv_c_compiler_gnu
2927
2928
2929
2930ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2931
2932
2933printf "%s\n" "#define UNIX 1" >>confdefs.h
2934
2935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2936printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2937set x ${MAKE-make}
2938ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2939if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2940then :
2941 printf %s "(cached) " >&6
2942else $as_nop
2943 cat >conftest.make <<\_ACEOF
2944SHELL = /bin/sh
2945all:
2946 @echo '@@@%%%=$(MAKE)=@@@%%%'
2947_ACEOF
2948# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2949case `${MAKE-make} -f conftest.make 2>/dev/null` in
2950 *@@@%%%=?*=@@@%%%*)
2951 eval ac_cv_prog_make_${ac_make}_set=yes;;
2952 *)
2953 eval ac_cv_prog_make_${ac_make}_set=no;;
2954esac
2955rm -f conftest.make
2956fi
2957if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2959printf "%s\n" "yes" >&6; }
2960 SET_MAKE=
2961else
2962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2963printf "%s\n" "no" >&6; }
2964 SET_MAKE="MAKE=${MAKE-make}"
2965fi
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977ac_ext=c
2978ac_cpp='$CPP $CPPFLAGS'
2979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2981ac_compiler_gnu=$ac_cv_c_compiler_gnu
2982if test -n "$ac_tool_prefix"; then
2983 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2984set dummy ${ac_tool_prefix}gcc; ac_word=$2
2985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2986printf %s "checking for $ac_word... " >&6; }
2987if test ${ac_cv_prog_CC+y}
2988then :
2989 printf %s "(cached) " >&6
2990else $as_nop
2991 if test -n "$CC"; then
2992 ac_cv_prog_CC="$CC" # Let the user override the test.
2993else
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997 IFS=$as_save_IFS
2998 case $as_dir in #(((
2999 '') as_dir=./ ;;
3000 */) ;;
3001 *) as_dir=$as_dir/ ;;
3002 esac
3003 for ac_exec_ext in '' $ac_executable_extensions; do
3004 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3005 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3006 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3007 break 2
3008 fi
3009done
3010 done
3011IFS=$as_save_IFS
3012
3013fi
3014fi
3015CC=$ac_cv_prog_CC
3016if test -n "$CC"; then
3017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3018printf "%s\n" "$CC" >&6; }
3019else
3020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021printf "%s\n" "no" >&6; }
3022fi
3023
3024
3025fi
3026if test -z "$ac_cv_prog_CC"; then
3027 ac_ct_CC=$CC
3028 # Extract the first word of "gcc", so it can be a program name with args.
3029set dummy gcc; ac_word=$2
3030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3031printf %s "checking for $ac_word... " >&6; }
3032if test ${ac_cv_prog_ac_ct_CC+y}
3033then :
3034 printf %s "(cached) " >&6
3035else $as_nop
3036 if test -n "$ac_ct_CC"; then
3037 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3038else
3039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3040for as_dir in $PATH
3041do
3042 IFS=$as_save_IFS
3043 case $as_dir in #(((
3044 '') as_dir=./ ;;
3045 */) ;;
3046 *) as_dir=$as_dir/ ;;
3047 esac
3048 for ac_exec_ext in '' $ac_executable_extensions; do
3049 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3050 ac_cv_prog_ac_ct_CC="gcc"
3051 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3052 break 2
3053 fi
3054done
3055 done
3056IFS=$as_save_IFS
3057
3058fi
3059fi
3060ac_ct_CC=$ac_cv_prog_ac_ct_CC
3061if test -n "$ac_ct_CC"; then
3062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3063printf "%s\n" "$ac_ct_CC" >&6; }
3064else
3065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3066printf "%s\n" "no" >&6; }
3067fi
3068
3069 if test "x$ac_ct_CC" = x; then
3070 CC=""
3071 else
3072 case $cross_compiling:$ac_tool_warned in
3073yes:)
3074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3075printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3076ac_tool_warned=yes ;;
3077esac
3078 CC=$ac_ct_CC
3079 fi
3080else
3081 CC="$ac_cv_prog_CC"
3082fi
3083
3084if test -z "$CC"; then
3085 if test -n "$ac_tool_prefix"; then
3086 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3087set dummy ${ac_tool_prefix}cc; ac_word=$2
3088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3089printf %s "checking for $ac_word... " >&6; }
3090if test ${ac_cv_prog_CC+y}
3091then :
3092 printf %s "(cached) " >&6
3093else $as_nop
3094 if test -n "$CC"; then
3095 ac_cv_prog_CC="$CC" # Let the user override the test.
3096else
3097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3098for as_dir in $PATH
3099do
3100 IFS=$as_save_IFS
3101 case $as_dir in #(((
3102 '') as_dir=./ ;;
3103 */) ;;
3104 *) as_dir=$as_dir/ ;;
3105 esac
3106 for ac_exec_ext in '' $ac_executable_extensions; do
3107 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3108 ac_cv_prog_CC="${ac_tool_prefix}cc"
3109 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3110 break 2
3111 fi
3112done
3113 done
3114IFS=$as_save_IFS
3115
3116fi
3117fi
3118CC=$ac_cv_prog_CC
3119if test -n "$CC"; then
3120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3121printf "%s\n" "$CC" >&6; }
3122else
3123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3124printf "%s\n" "no" >&6; }
3125fi
3126
3127
3128 fi
3129fi
3130if test -z "$CC"; then
3131 # Extract the first word of "cc", so it can be a program name with args.
3132set dummy cc; ac_word=$2
3133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3134printf %s "checking for $ac_word... " >&6; }
3135if test ${ac_cv_prog_CC+y}
3136then :
3137 printf %s "(cached) " >&6
3138else $as_nop
3139 if test -n "$CC"; then
3140 ac_cv_prog_CC="$CC" # Let the user override the test.
3141else
3142 ac_prog_rejected=no
3143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3144for as_dir in $PATH
3145do
3146 IFS=$as_save_IFS
3147 case $as_dir in #(((
3148 '') as_dir=./ ;;
3149 */) ;;
3150 *) as_dir=$as_dir/ ;;
3151 esac
3152 for ac_exec_ext in '' $ac_executable_extensions; do
3153 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3154 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3155 ac_prog_rejected=yes
3156 continue
3157 fi
3158 ac_cv_prog_CC="cc"
3159 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3160 break 2
3161 fi
3162done
3163 done
3164IFS=$as_save_IFS
3165
3166if test $ac_prog_rejected = yes; then
3167 # We found a bogon in the path, so make sure we never use it.
3168 set dummy $ac_cv_prog_CC
3169 shift
3170 if test $# != 0; then
3171 # We chose a different compiler from the bogus one.
3172 # However, it has the same basename, so the bogon will be chosen
3173 # first if we set CC to just the basename; use the full file name.
3174 shift
3175 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3176 fi
3177fi
3178fi
3179fi
3180CC=$ac_cv_prog_CC
3181if test -n "$CC"; then
3182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3183printf "%s\n" "$CC" >&6; }
3184else
3185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3186printf "%s\n" "no" >&6; }
3187fi
3188
3189
3190fi
3191if test -z "$CC"; then
3192 if test -n "$ac_tool_prefix"; then
3193 for ac_prog in cl.exe
3194 do
3195 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3198printf %s "checking for $ac_word... " >&6; }
3199if test ${ac_cv_prog_CC+y}
3200then :
3201 printf %s "(cached) " >&6
3202else $as_nop
3203 if test -n "$CC"; then
3204 ac_cv_prog_CC="$CC" # Let the user override the test.
3205else
3206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3207for as_dir in $PATH
3208do
3209 IFS=$as_save_IFS
3210 case $as_dir in #(((
3211 '') as_dir=./ ;;
3212 */) ;;
3213 *) as_dir=$as_dir/ ;;
3214 esac
3215 for ac_exec_ext in '' $ac_executable_extensions; do
3216 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3217 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3218 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3219 break 2
3220 fi
3221done
3222 done
3223IFS=$as_save_IFS
3224
3225fi
3226fi
3227CC=$ac_cv_prog_CC
3228if test -n "$CC"; then
3229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3230printf "%s\n" "$CC" >&6; }
3231else
3232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3233printf "%s\n" "no" >&6; }
3234fi
3235
3236
3237 test -n "$CC" && break
3238 done
3239fi
3240if test -z "$CC"; then
3241 ac_ct_CC=$CC
3242 for ac_prog in cl.exe
3243do
3244 # Extract the first word of "$ac_prog", so it can be a program name with args.
3245set dummy $ac_prog; ac_word=$2
3246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3247printf %s "checking for $ac_word... " >&6; }
3248if test ${ac_cv_prog_ac_ct_CC+y}
3249then :
3250 printf %s "(cached) " >&6
3251else $as_nop
3252 if test -n "$ac_ct_CC"; then
3253 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3254else
3255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256for as_dir in $PATH
3257do
3258 IFS=$as_save_IFS
3259 case $as_dir in #(((
3260 '') as_dir=./ ;;
3261 */) ;;
3262 *) as_dir=$as_dir/ ;;
3263 esac
3264 for ac_exec_ext in '' $ac_executable_extensions; do
3265 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3266 ac_cv_prog_ac_ct_CC="$ac_prog"
3267 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3268 break 2
3269 fi
3270done
3271 done
3272IFS=$as_save_IFS
3273
3274fi
3275fi
3276ac_ct_CC=$ac_cv_prog_ac_ct_CC
3277if test -n "$ac_ct_CC"; then
3278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3279printf "%s\n" "$ac_ct_CC" >&6; }
3280else
3281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3282printf "%s\n" "no" >&6; }
3283fi
3284
3285
3286 test -n "$ac_ct_CC" && break
3287done
3288
3289 if test "x$ac_ct_CC" = x; then
3290 CC=""
3291 else
3292 case $cross_compiling:$ac_tool_warned in
3293yes:)
3294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3295printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3296ac_tool_warned=yes ;;
3297esac
3298 CC=$ac_ct_CC
3299 fi
3300fi
3301
3302fi
3303if test -z "$CC"; then
3304 if test -n "$ac_tool_prefix"; then
3305 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3306set dummy ${ac_tool_prefix}clang; ac_word=$2
3307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3308printf %s "checking for $ac_word... " >&6; }
3309if test ${ac_cv_prog_CC+y}
3310then :
3311 printf %s "(cached) " >&6
3312else $as_nop
3313 if test -n "$CC"; then
3314 ac_cv_prog_CC="$CC" # Let the user override the test.
3315else
3316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317for as_dir in $PATH
3318do
3319 IFS=$as_save_IFS
3320 case $as_dir in #(((
3321 '') as_dir=./ ;;
3322 */) ;;
3323 *) as_dir=$as_dir/ ;;
3324 esac
3325 for ac_exec_ext in '' $ac_executable_extensions; do
3326 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3327 ac_cv_prog_CC="${ac_tool_prefix}clang"
3328 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331done
3332 done
3333IFS=$as_save_IFS
3334
3335fi
3336fi
3337CC=$ac_cv_prog_CC
3338if test -n "$CC"; then
3339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3340printf "%s\n" "$CC" >&6; }
3341else
3342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3343printf "%s\n" "no" >&6; }
3344fi
3345
3346
3347fi
3348if test -z "$ac_cv_prog_CC"; then
3349 ac_ct_CC=$CC
3350 # Extract the first word of "clang", so it can be a program name with args.
3351set dummy clang; ac_word=$2
3352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353printf %s "checking for $ac_word... " >&6; }
3354if test ${ac_cv_prog_ac_ct_CC+y}
3355then :
3356 printf %s "(cached) " >&6
3357else $as_nop
3358 if test -n "$ac_ct_CC"; then
3359 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3360else
3361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3362for as_dir in $PATH
3363do
3364 IFS=$as_save_IFS
3365 case $as_dir in #(((
3366 '') as_dir=./ ;;
3367 */) ;;
3368 *) as_dir=$as_dir/ ;;
3369 esac
3370 for ac_exec_ext in '' $ac_executable_extensions; do
3371 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3372 ac_cv_prog_ac_ct_CC="clang"
3373 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3374 break 2
3375 fi
3376done
3377 done
3378IFS=$as_save_IFS
3379
3380fi
3381fi
3382ac_ct_CC=$ac_cv_prog_ac_ct_CC
3383if test -n "$ac_ct_CC"; then
3384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3385printf "%s\n" "$ac_ct_CC" >&6; }
3386else
3387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388printf "%s\n" "no" >&6; }
3389fi
3390
3391 if test "x$ac_ct_CC" = x; then
3392 CC=""
3393 else
3394 case $cross_compiling:$ac_tool_warned in
3395yes:)
3396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3397printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3398ac_tool_warned=yes ;;
3399esac
3400 CC=$ac_ct_CC
3401 fi
3402else
3403 CC="$ac_cv_prog_CC"
3404fi
3405
3406fi
3407
3408
3409test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3410printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3411as_fn_error $? "no acceptable C compiler found in \$PATH
3412See \`config.log' for more details" "$LINENO" 5; }
3413
3414# Provide some information about the compiler.
3415printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3416set X $ac_compile
3417ac_compiler=$2
3418for ac_option in --version -v -V -qversion -version; do
3419 { { ac_try="$ac_compiler $ac_option >&5"
3420case "(($ac_try" in
3421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3422 *) ac_try_echo=$ac_try;;
3423esac
3424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3425printf "%s\n" "$ac_try_echo"; } >&5
3426 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3427 ac_status=$?
3428 if test -s conftest.err; then
3429 sed '10a\
3430... rest of stderr output deleted ...
3431 10q' conftest.err >conftest.er1
3432 cat conftest.er1 >&5
3433 fi
3434 rm -f conftest.er1 conftest.err
3435 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3436 test $ac_status = 0; }
3437done
3438
3439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3440/* end confdefs.h. */
3441
3442int
3443main (void)
3444{
Bram Moolenaar22640082018-04-19 20:39:41 +02003445
Bram Moolenaar2e324952018-04-14 14:37:07 +02003446 ;
3447 return 0;
3448}
3449_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003450ac_clean_files_save=$ac_clean_files
3451ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3452# Try to create an executable without -o first, disregard a.out.
3453# It will help us diagnose broken compilers, and finding out an intuition
3454# of exeext.
3455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3456printf %s "checking whether the C compiler works... " >&6; }
3457ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3458
3459# The possible output files:
3460ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3461
3462ac_rmfiles=
3463for ac_file in $ac_files
3464do
3465 case $ac_file in
3466 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3467 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3468 esac
3469done
3470rm -f $ac_rmfiles
3471
3472if { { ac_try="$ac_link_default"
3473case "(($ac_try" in
3474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3475 *) ac_try_echo=$ac_try;;
3476esac
3477eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3478printf "%s\n" "$ac_try_echo"; } >&5
3479 (eval "$ac_link_default") 2>&5
3480 ac_status=$?
3481 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3482 test $ac_status = 0; }
3483then :
3484 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3485# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3486# in a Makefile. We should not override ac_cv_exeext if it was cached,
3487# so that the user can short-circuit this test for compilers unknown to
3488# Autoconf.
3489for ac_file in $ac_files ''
3490do
3491 test -f "$ac_file" || continue
3492 case $ac_file in
3493 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3494 ;;
3495 [ab].out )
3496 # We found the default executable, but exeext='' is most
3497 # certainly right.
3498 break;;
3499 *.* )
3500 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3501 then :; else
3502 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3503 fi
3504 # We set ac_cv_exeext here because the later test for it is not
3505 # safe: cross compilers may not add the suffix if given an `-o'
3506 # argument, so we may need to know it at that point already.
3507 # Even if this section looks crufty: it has the advantage of
3508 # actually working.
3509 break;;
3510 * )
3511 break;;
3512 esac
3513done
3514test "$ac_cv_exeext" = no && ac_cv_exeext=
3515
3516else $as_nop
3517 ac_file=''
3518fi
3519if test -z "$ac_file"
3520then :
3521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3522printf "%s\n" "no" >&6; }
3523printf "%s\n" "$as_me: failed program was:" >&5
3524sed 's/^/| /' conftest.$ac_ext >&5
3525
3526{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3527printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3528as_fn_error 77 "C compiler cannot create executables
3529See \`config.log' for more details" "$LINENO" 5; }
3530else $as_nop
3531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3532printf "%s\n" "yes" >&6; }
3533fi
3534{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3535printf %s "checking for C compiler default output file name... " >&6; }
3536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3537printf "%s\n" "$ac_file" >&6; }
3538ac_exeext=$ac_cv_exeext
3539
3540rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3541ac_clean_files=$ac_clean_files_save
3542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3543printf %s "checking for suffix of executables... " >&6; }
3544if { { ac_try="$ac_link"
3545case "(($ac_try" in
3546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3547 *) ac_try_echo=$ac_try;;
3548esac
3549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3550printf "%s\n" "$ac_try_echo"; } >&5
3551 (eval "$ac_link") 2>&5
3552 ac_status=$?
3553 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3554 test $ac_status = 0; }
3555then :
3556 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3557# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3558# work properly (i.e., refer to `conftest.exe'), while it won't with
3559# `rm'.
3560for ac_file in conftest.exe conftest conftest.*; do
3561 test -f "$ac_file" || continue
3562 case $ac_file in
3563 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3564 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3565 break;;
3566 * ) break;;
3567 esac
3568done
3569else $as_nop
3570 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3571printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3572as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3573See \`config.log' for more details" "$LINENO" 5; }
3574fi
3575rm -f conftest conftest$ac_cv_exeext
3576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3577printf "%s\n" "$ac_cv_exeext" >&6; }
3578
3579rm -f conftest.$ac_ext
3580EXEEXT=$ac_cv_exeext
3581ac_exeext=$EXEEXT
3582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3583/* end confdefs.h. */
3584#include <stdio.h>
3585int
3586main (void)
3587{
3588FILE *f = fopen ("conftest.out", "w");
3589 return ferror (f) || fclose (f) != 0;
3590
3591 ;
3592 return 0;
3593}
3594_ACEOF
3595ac_clean_files="$ac_clean_files conftest.out"
3596# Check that the compiler produces executables we can run. If not, either
3597# the compiler is broken, or we cross compile.
3598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3599printf %s "checking whether we are cross compiling... " >&6; }
3600if test "$cross_compiling" != yes; then
3601 { { ac_try="$ac_link"
3602case "(($ac_try" in
3603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3604 *) ac_try_echo=$ac_try;;
3605esac
3606eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3607printf "%s\n" "$ac_try_echo"; } >&5
3608 (eval "$ac_link") 2>&5
3609 ac_status=$?
3610 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3611 test $ac_status = 0; }
3612 if { ac_try='./conftest$ac_cv_exeext'
3613 { { case "(($ac_try" in
3614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3615 *) ac_try_echo=$ac_try;;
3616esac
3617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3618printf "%s\n" "$ac_try_echo"; } >&5
3619 (eval "$ac_try") 2>&5
3620 ac_status=$?
3621 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3622 test $ac_status = 0; }; }; then
3623 cross_compiling=no
3624 else
3625 if test "$cross_compiling" = maybe; then
3626 cross_compiling=yes
3627 else
3628 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3629printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3630as_fn_error 77 "cannot run C compiled programs.
3631If you meant to cross compile, use \`--host'.
3632See \`config.log' for more details" "$LINENO" 5; }
3633 fi
3634 fi
3635fi
3636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3637printf "%s\n" "$cross_compiling" >&6; }
3638
3639rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3640ac_clean_files=$ac_clean_files_save
3641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3642printf %s "checking for suffix of object files... " >&6; }
3643if test ${ac_cv_objext+y}
3644then :
3645 printf %s "(cached) " >&6
3646else $as_nop
3647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3648/* end confdefs.h. */
3649
3650int
3651main (void)
3652{
3653
3654 ;
3655 return 0;
3656}
3657_ACEOF
3658rm -f conftest.o conftest.obj
3659if { { ac_try="$ac_compile"
3660case "(($ac_try" in
3661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3662 *) ac_try_echo=$ac_try;;
3663esac
3664eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3665printf "%s\n" "$ac_try_echo"; } >&5
3666 (eval "$ac_compile") 2>&5
3667 ac_status=$?
3668 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3669 test $ac_status = 0; }
3670then :
3671 for ac_file in conftest.o conftest.obj conftest.*; do
3672 test -f "$ac_file" || continue;
3673 case $ac_file in
3674 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3675 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3676 break;;
3677 esac
3678done
3679else $as_nop
3680 printf "%s\n" "$as_me: failed program was:" >&5
3681sed 's/^/| /' conftest.$ac_ext >&5
3682
3683{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3684printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3685as_fn_error $? "cannot compute suffix of object files: cannot compile
3686See \`config.log' for more details" "$LINENO" 5; }
3687fi
3688rm -f conftest.$ac_cv_objext conftest.$ac_ext
3689fi
3690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3691printf "%s\n" "$ac_cv_objext" >&6; }
3692OBJEXT=$ac_cv_objext
3693ac_objext=$OBJEXT
3694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3695printf %s "checking whether the compiler supports GNU C... " >&6; }
3696if test ${ac_cv_c_compiler_gnu+y}
3697then :
3698 printf %s "(cached) " >&6
3699else $as_nop
3700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3701/* end confdefs.h. */
3702
3703int
3704main (void)
3705{
3706#ifndef __GNUC__
3707 choke me
3708#endif
3709
3710 ;
3711 return 0;
3712}
3713_ACEOF
3714if ac_fn_c_try_compile "$LINENO"
3715then :
3716 ac_compiler_gnu=yes
3717else $as_nop
3718 ac_compiler_gnu=no
3719fi
3720rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3721ac_cv_c_compiler_gnu=$ac_compiler_gnu
3722
3723fi
3724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3725printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3726ac_compiler_gnu=$ac_cv_c_compiler_gnu
3727
3728if test $ac_compiler_gnu = yes; then
3729 GCC=yes
3730else
3731 GCC=
3732fi
3733ac_test_CFLAGS=${CFLAGS+y}
3734ac_save_CFLAGS=$CFLAGS
3735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3736printf %s "checking whether $CC accepts -g... " >&6; }
3737if test ${ac_cv_prog_cc_g+y}
3738then :
3739 printf %s "(cached) " >&6
3740else $as_nop
3741 ac_save_c_werror_flag=$ac_c_werror_flag
3742 ac_c_werror_flag=yes
3743 ac_cv_prog_cc_g=no
3744 CFLAGS="-g"
3745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3746/* end confdefs.h. */
3747
3748int
3749main (void)
3750{
3751
3752 ;
3753 return 0;
3754}
3755_ACEOF
3756if ac_fn_c_try_compile "$LINENO"
3757then :
3758 ac_cv_prog_cc_g=yes
3759else $as_nop
3760 CFLAGS=""
3761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3762/* end confdefs.h. */
3763
3764int
3765main (void)
3766{
3767
3768 ;
3769 return 0;
3770}
3771_ACEOF
3772if ac_fn_c_try_compile "$LINENO"
3773then :
3774
3775else $as_nop
3776 ac_c_werror_flag=$ac_save_c_werror_flag
3777 CFLAGS="-g"
3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3779/* end confdefs.h. */
3780
3781int
3782main (void)
3783{
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
3789if ac_fn_c_try_compile "$LINENO"
3790then :
3791 ac_cv_prog_cc_g=yes
3792fi
3793rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3794fi
3795rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3796fi
3797rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3798 ac_c_werror_flag=$ac_save_c_werror_flag
3799fi
3800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3801printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3802if test $ac_test_CFLAGS; then
3803 CFLAGS=$ac_save_CFLAGS
3804elif test $ac_cv_prog_cc_g = yes; then
3805 if test "$GCC" = yes; then
3806 CFLAGS="-g -O2"
3807 else
3808 CFLAGS="-g"
3809 fi
3810else
3811 if test "$GCC" = yes; then
3812 CFLAGS="-O2"
3813 else
3814 CFLAGS=
3815 fi
3816fi
3817ac_prog_cc_stdc=no
3818if test x$ac_prog_cc_stdc = xno
3819then :
3820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3821printf %s "checking for $CC option to enable C11 features... " >&6; }
3822if test ${ac_cv_prog_cc_c11+y}
3823then :
3824 printf %s "(cached) " >&6
3825else $as_nop
3826 ac_cv_prog_cc_c11=no
3827ac_save_CC=$CC
3828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3829/* end confdefs.h. */
3830$ac_c_conftest_c11_program
3831_ACEOF
3832for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003833do
3834 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003835 if ac_fn_c_try_compile "$LINENO"
3836then :
3837 ac_cv_prog_cc_c11=$ac_arg
3838fi
3839rm -f core conftest.err conftest.$ac_objext conftest.beam
3840 test "x$ac_cv_prog_cc_c11" != "xno" && break
3841done
3842rm -f conftest.$ac_ext
3843CC=$ac_save_CC
3844fi
3845
3846if test "x$ac_cv_prog_cc_c11" = xno
3847then :
3848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3849printf "%s\n" "unsupported" >&6; }
3850else $as_nop
3851 if test "x$ac_cv_prog_cc_c11" = x
3852then :
3853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3854printf "%s\n" "none needed" >&6; }
3855else $as_nop
3856 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3857printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3858 CC="$CC $ac_cv_prog_cc_c11"
3859fi
3860 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3861 ac_prog_cc_stdc=c11
3862fi
3863fi
3864if test x$ac_prog_cc_stdc = xno
3865then :
3866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3867printf %s "checking for $CC option to enable C99 features... " >&6; }
3868if test ${ac_cv_prog_cc_c99+y}
3869then :
3870 printf %s "(cached) " >&6
3871else $as_nop
3872 ac_cv_prog_cc_c99=no
3873ac_save_CC=$CC
3874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3875/* end confdefs.h. */
3876$ac_c_conftest_c99_program
3877_ACEOF
3878for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3879do
3880 CC="$ac_save_CC $ac_arg"
3881 if ac_fn_c_try_compile "$LINENO"
3882then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003883 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003884fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003885rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003886 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003887done
3888rm -f conftest.$ac_ext
3889CC=$ac_save_CC
Bram Moolenaar2e324952018-04-14 14:37:07 +02003890fi
3891
Illia Bobyra96d5442023-08-30 16:30:15 +02003892if test "x$ac_cv_prog_cc_c99" = xno
3893then :
3894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3895printf "%s\n" "unsupported" >&6; }
3896else $as_nop
3897 if test "x$ac_cv_prog_cc_c99" = x
3898then :
3899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3900printf "%s\n" "none needed" >&6; }
3901else $as_nop
3902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3903printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3904 CC="$CC $ac_cv_prog_cc_c99"
3905fi
3906 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3907 ac_prog_cc_stdc=c99
3908fi
3909fi
3910if test x$ac_prog_cc_stdc = xno
3911then :
3912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3913printf %s "checking for $CC option to enable C89 features... " >&6; }
3914if test ${ac_cv_prog_cc_c89+y}
3915then :
3916 printf %s "(cached) " >&6
3917else $as_nop
3918 ac_cv_prog_cc_c89=no
3919ac_save_CC=$CC
3920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3921/* end confdefs.h. */
3922$ac_c_conftest_c89_program
3923_ACEOF
3924for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3925do
3926 CC="$ac_save_CC $ac_arg"
3927 if ac_fn_c_try_compile "$LINENO"
3928then :
3929 ac_cv_prog_cc_c89=$ac_arg
3930fi
3931rm -f core conftest.err conftest.$ac_objext conftest.beam
3932 test "x$ac_cv_prog_cc_c89" != "xno" && break
3933done
3934rm -f conftest.$ac_ext
3935CC=$ac_save_CC
3936fi
3937
3938if test "x$ac_cv_prog_cc_c89" = xno
3939then :
3940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3941printf "%s\n" "unsupported" >&6; }
3942else $as_nop
3943 if test "x$ac_cv_prog_cc_c89" = x
3944then :
3945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3946printf "%s\n" "none needed" >&6; }
3947else $as_nop
3948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3949printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3950 CC="$CC $ac_cv_prog_cc_c89"
3951fi
3952 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3953 ac_prog_cc_stdc=c89
3954fi
3955fi
3956
3957ac_ext=c
3958ac_cpp='$CPP $CPPFLAGS'
3959ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3960ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3961ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02003962 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003963ac_cpp='$CPP $CPPFLAGS'
3964ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3965ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3966ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02003967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3968printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00003969# On Suns, sometimes $CPP names a directory.
3970if test -n "$CPP" && test -d "$CPP"; then
3971 CPP=
3972fi
3973if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003974 if test ${ac_cv_prog_CPP+y}
3975then :
3976 printf %s "(cached) " >&6
3977else $as_nop
3978 # Double quotes because $CC needs to be expanded
3979 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003980 do
3981 ac_preproc_ok=false
3982for ac_c_preproc_warn_flag in '' yes
3983do
3984 # Use a header file that comes with gcc, so configuring glibc
3985 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003986 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003987 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003989/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02003990#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003991 Syntax error
3992_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003993if ac_fn_c_try_cpp "$LINENO"
3994then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003995
Illia Bobyra96d5442023-08-30 16:30:15 +02003996else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003997 # Broken: fails on valid input.
3998continue
3999fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004000rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004001
Bram Moolenaar446cb832008-06-24 21:56:24 +00004002 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004003 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004005/* end confdefs.h. */
4006#include <ac_nonexistent.h>
4007_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004008if ac_fn_c_try_cpp "$LINENO"
4009then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004010 # Broken: success on invalid input.
4011continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004012else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004013 # Passes both tests.
4014ac_preproc_ok=:
4015break
4016fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004017rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004018
4019done
4020# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004021rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004022if $ac_preproc_ok
4023then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004024 break
4025fi
4026
4027 done
4028 ac_cv_prog_CPP=$CPP
4029
4030fi
4031 CPP=$ac_cv_prog_CPP
4032else
4033 ac_cv_prog_CPP=$CPP
4034fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4036printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004037ac_preproc_ok=false
4038for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004039do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004040 # Use a header file that comes with gcc, so configuring glibc
4041 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004042 # On the NeXT, cc -E runs the code through the compiler's parser,
4043 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004045/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004046#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004047 Syntax error
4048_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004049if ac_fn_c_try_cpp "$LINENO"
4050then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004051
Illia Bobyra96d5442023-08-30 16:30:15 +02004052else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004053 # Broken: fails on valid input.
4054continue
4055fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004056rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004057
Bram Moolenaar446cb832008-06-24 21:56:24 +00004058 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004059 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004061/* end confdefs.h. */
4062#include <ac_nonexistent.h>
4063_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004064if ac_fn_c_try_cpp "$LINENO"
4065then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004066 # Broken: success on invalid input.
4067continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004068else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004069 # Passes both tests.
4070ac_preproc_ok=:
4071break
4072fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004073rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004074
4075done
4076# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004077rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004078if $ac_preproc_ok
4079then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004080
Illia Bobyra96d5442023-08-30 16:30:15 +02004081else $as_nop
4082 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4083printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004084as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4085See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004086fi
4087
4088ac_ext=c
4089ac_cpp='$CPP $CPPFLAGS'
4090ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4091ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4092ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4094printf %s "checking for grep that handles long lines and -e... " >&6; }
4095if test ${ac_cv_path_GREP+y}
4096then :
4097 printf %s "(cached) " >&6
4098else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004099 if test -z "$GREP"; then
4100 ac_path_GREP_found=false
4101 # Loop through the user's path and test for each of PROGNAME-LIST
4102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4103for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4104do
4105 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004106 case $as_dir in #(((
4107 '') as_dir=./ ;;
4108 */) ;;
4109 *) as_dir=$as_dir/ ;;
4110 esac
4111 for ac_prog in grep ggrep
4112 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004113 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004114 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004115 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004116# Check for GNU ac_path_GREP and select it if it is found.
4117 # Check for GNU $ac_path_GREP
4118case `"$ac_path_GREP" --version 2>&1` in
4119*GNU*)
4120 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4121*)
4122 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004123 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004124 while :
4125 do
4126 cat "conftest.in" "conftest.in" >"conftest.tmp"
4127 mv "conftest.tmp" "conftest.in"
4128 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004129 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004130 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4131 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004132 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004133 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4134 # Best one so far, save it but keep looking for a better one
4135 ac_cv_path_GREP="$ac_path_GREP"
4136 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004137 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004138 # 10*(2^10) chars as input seems more than enough
4139 test $ac_count -gt 10 && break
4140 done
4141 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4142esac
4143
4144 $ac_path_GREP_found && break 3
4145 done
4146 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004147 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004148IFS=$as_save_IFS
4149 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004150 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 +00004151 fi
4152else
4153 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004154fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004155
4156fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4158printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004159 GREP="$ac_cv_path_GREP"
4160
4161
Illia Bobyra96d5442023-08-30 16:30:15 +02004162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4163printf %s "checking for egrep... " >&6; }
4164if test ${ac_cv_path_EGREP+y}
4165then :
4166 printf %s "(cached) " >&6
4167else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004168 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4169 then ac_cv_path_EGREP="$GREP -E"
4170 else
4171 if test -z "$EGREP"; then
4172 ac_path_EGREP_found=false
4173 # Loop through the user's path and test for each of PROGNAME-LIST
4174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4175for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4176do
4177 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004178 case $as_dir in #(((
4179 '') as_dir=./ ;;
4180 */) ;;
4181 *) as_dir=$as_dir/ ;;
4182 esac
4183 for ac_prog in egrep
4184 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004185 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004186 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004187 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004188# Check for GNU ac_path_EGREP and select it if it is found.
4189 # Check for GNU $ac_path_EGREP
4190case `"$ac_path_EGREP" --version 2>&1` in
4191*GNU*)
4192 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4193*)
4194 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004195 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004196 while :
4197 do
4198 cat "conftest.in" "conftest.in" >"conftest.tmp"
4199 mv "conftest.tmp" "conftest.in"
4200 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004201 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004202 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4203 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004204 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004205 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4206 # Best one so far, save it but keep looking for a better one
4207 ac_cv_path_EGREP="$ac_path_EGREP"
4208 ac_path_EGREP_max=$ac_count
4209 fi
4210 # 10*(2^10) chars as input seems more than enough
4211 test $ac_count -gt 10 && break
4212 done
4213 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4214esac
4215
4216 $ac_path_EGREP_found && break 3
4217 done
4218 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004219 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004220IFS=$as_save_IFS
4221 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004222 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 +00004223 fi
4224else
4225 ac_cv_path_EGREP=$EGREP
4226fi
4227
4228 fi
4229fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4231printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004232 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004233
Illia Bobyra96d5442023-08-30 16:30:15 +02004234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4235printf %s "checking for fgrep... " >&6; }
4236if test ${ac_cv_path_FGREP+y}
4237then :
4238 printf %s "(cached) " >&6
4239else $as_nop
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004240 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4241 then ac_cv_path_FGREP="$GREP -F"
4242 else
4243 if test -z "$FGREP"; then
4244 ac_path_FGREP_found=false
4245 # Loop through the user's path and test for each of PROGNAME-LIST
4246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4248do
4249 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004250 case $as_dir in #(((
4251 '') as_dir=./ ;;
4252 */) ;;
4253 *) as_dir=$as_dir/ ;;
4254 esac
4255 for ac_prog in fgrep
4256 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004257 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004258 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004259 as_fn_executable_p "$ac_path_FGREP" || continue
4260# Check for GNU ac_path_FGREP and select it if it is found.
4261 # Check for GNU $ac_path_FGREP
4262case `"$ac_path_FGREP" --version 2>&1` in
4263*GNU*)
4264 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4265*)
4266 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004267 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004268 while :
4269 do
4270 cat "conftest.in" "conftest.in" >"conftest.tmp"
4271 mv "conftest.tmp" "conftest.in"
4272 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004273 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004274 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4275 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4276 as_fn_arith $ac_count + 1 && ac_count=$as_val
4277 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4278 # Best one so far, save it but keep looking for a better one
4279 ac_cv_path_FGREP="$ac_path_FGREP"
4280 ac_path_FGREP_max=$ac_count
4281 fi
4282 # 10*(2^10) chars as input seems more than enough
4283 test $ac_count -gt 10 && break
4284 done
4285 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4286esac
4287
4288 $ac_path_FGREP_found && break 3
4289 done
4290 done
4291 done
4292IFS=$as_save_IFS
4293 if test -z "$ac_cv_path_FGREP"; then
4294 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4295 fi
4296else
4297 ac_cv_path_FGREP=$FGREP
4298fi
4299
4300 fi
4301fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4303printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004304 FGREP="$ac_cv_path_FGREP"
4305
Bram Moolenaarc0394412017-04-20 20:20:23 +02004306 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004307do
4308 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004309set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4311printf %s "checking for $ac_word... " >&6; }
4312if test ${ac_cv_prog_AWK+y}
4313then :
4314 printf %s "(cached) " >&6
4315else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004316 if test -n "$AWK"; then
4317 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4318else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4320for as_dir in $PATH
4321do
4322 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004323 case $as_dir in #(((
4324 '') as_dir=./ ;;
4325 */) ;;
4326 *) as_dir=$as_dir/ ;;
4327 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004328 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004329 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004330 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004331 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004332 break 2
4333 fi
4334done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004335 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004336IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004337
Bram Moolenaar071d4272004-06-13 20:20:40 +00004338fi
4339fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004340AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004341if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4343printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004344else
Illia Bobyra96d5442023-08-30 16:30:15 +02004345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4346printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004347fi
4348
Bram Moolenaar446cb832008-06-24 21:56:24 +00004349
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004350 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004351done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004352
Bram Moolenaar071d4272004-06-13 20:20:40 +00004353# Extract the first word of "strip", so it can be a program name with args.
4354set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4356printf %s "checking for $ac_word... " >&6; }
4357if test ${ac_cv_prog_STRIP+y}
4358then :
4359 printf %s "(cached) " >&6
4360else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004361 if test -n "$STRIP"; then
4362 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4363else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365for as_dir in $PATH
4366do
4367 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004368 case $as_dir in #(((
4369 '') as_dir=./ ;;
4370 */) ;;
4371 *) as_dir=$as_dir/ ;;
4372 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004373 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004374 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004375 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004376 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004377 break 2
4378 fi
4379done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004380 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004381IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004382
Bram Moolenaar071d4272004-06-13 20:20:40 +00004383 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4384fi
4385fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004386STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004387if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4389printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004390else
Illia Bobyra96d5442023-08-30 16:30:15 +02004391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004393fi
4394
4395
Bram Moolenaar071d4272004-06-13 20:20:40 +00004396
4397
Bram Moolenaar071d4272004-06-13 20:20:40 +00004398
Illia Bobyrf39842f2023-08-27 18:21:23 +02004399
Illia Bobyra96d5442023-08-30 16:30:15 +02004400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4401printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4402if test ${ac_cv_header_sys_wait_h+y}
4403then :
4404 printf %s "(cached) " >&6
4405else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004407/* end confdefs.h. */
4408#include <sys/types.h>
4409#include <sys/wait.h>
4410#ifndef WEXITSTATUS
4411# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4412#endif
4413#ifndef WIFEXITED
4414# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4415#endif
4416
4417int
Illia Bobyra96d5442023-08-30 16:30:15 +02004418main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004419{
4420 int s;
4421 wait (&s);
4422 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4423 ;
4424 return 0;
4425}
4426_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004427if ac_fn_c_try_compile "$LINENO"
4428then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004429 ac_cv_header_sys_wait_h=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004430else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004431 ac_cv_header_sys_wait_h=no
Bram Moolenaar446cb832008-06-24 21:56:24 +00004432fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004433rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004434fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4436printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004437if test $ac_cv_header_sys_wait_h = yes; then
4438
Illia Bobyra96d5442023-08-30 16:30:15 +02004439printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004440
4441fi
4442
4443
Bram Moolenaar22640082018-04-19 20:39:41 +02004444if test x"$ac_cv_prog_cc_c99" != xno; then
4445
4446
Illia Bobyra96d5442023-08-30 16:30:15 +02004447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4448printf %s "checking for unsigned long long int... " >&6; }
4449if test ${ac_cv_type_unsigned_long_long_int+y}
4450then :
4451 printf %s "(cached) " >&6
4452else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004453 ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004454 case $ac_prog_cc_stdc in
4455 no | c89) ;;
4456 *)
4457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004458/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004459
4460 /* For now, do not test the preprocessor; as of 2007 there are too many
4461 implementations with broken preprocessors. Perhaps this can
4462 be revisited in 2012. In the meantime, code should not expect
4463 #if to work with literals wider than 32 bits. */
4464 /* Test literals. */
4465 long long int ll = 9223372036854775807ll;
4466 long long int nll = -9223372036854775807LL;
4467 unsigned long long int ull = 18446744073709551615ULL;
4468 /* Test constant expressions. */
4469 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4470 ? 1 : -1)];
4471 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4472 ? 1 : -1)];
4473 int i = 63;
4474int
Illia Bobyra96d5442023-08-30 16:30:15 +02004475main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004476{
4477/* Test availability of runtime routines for shift and division. */
4478 long long int llmax = 9223372036854775807ll;
4479 unsigned long long int ullmax = 18446744073709551615ull;
4480 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4481 | (llmax / ll) | (llmax % ll)
4482 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4483 | (ullmax / ull) | (ullmax % ull));
4484 ;
4485 return 0;
4486}
4487
4488_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004489if ac_fn_c_try_link "$LINENO"
4490then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004491
Illia Bobyra96d5442023-08-30 16:30:15 +02004492else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004493 ac_cv_type_unsigned_long_long_int=no
4494fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004495rm -f core conftest.err conftest.$ac_objext conftest.beam \
4496 conftest$ac_exeext conftest.$ac_ext;;
4497 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004498fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4500printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004501 if test $ac_cv_type_unsigned_long_long_int = yes; then
4502
Illia Bobyra96d5442023-08-30 16:30:15 +02004503printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004504
4505 fi
4506
4507
4508
Illia Bobyra96d5442023-08-30 16:30:15 +02004509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4510printf %s "checking for long long int... " >&6; }
4511if test ${ac_cv_type_long_long_int+y}
4512then :
4513 printf %s "(cached) " >&6
4514else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004515 ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004516 case $ac_prog_cc_stdc in
4517 no | c89) ;;
4518 *)
4519 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4520 if test $ac_cv_type_long_long_int = yes; then
4521 if test "$cross_compiling" = yes
4522then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004523 :
Illia Bobyra96d5442023-08-30 16:30:15 +02004524else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004528 #ifndef LLONG_MAX
4529 # define HALF \
4530 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4531 # define LLONG_MAX (HALF - 1 + HALF)
4532 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004533int
Illia Bobyra96d5442023-08-30 16:30:15 +02004534main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004535{
4536long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004537 int i;
4538 for (i = 0; ; i++)
4539 {
4540 long long int m = n << i;
4541 if (m >> i != n)
4542 return 1;
4543 if (LLONG_MAX / 2 < m)
4544 break;
4545 }
4546 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004547 ;
4548 return 0;
4549}
4550_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004551if ac_fn_c_try_run "$LINENO"
4552then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004553
Illia Bobyra96d5442023-08-30 16:30:15 +02004554else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004555 ac_cv_type_long_long_int=no
4556fi
4557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4558 conftest.$ac_objext conftest.beam conftest.$ac_ext
4559fi
4560
Illia Bobyra96d5442023-08-30 16:30:15 +02004561 fi;;
4562 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004563fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4565printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004566 if test $ac_cv_type_long_long_int = yes; then
4567
Illia Bobyra96d5442023-08-30 16:30:15 +02004568printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004569
4570 fi
4571
4572 if test "$ac_cv_type_long_long_int" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004573 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4574printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004575as_fn_error $? "Compiler does not support long long int
4576See \`config.log' for more details" "$LINENO" 5; }
4577 fi
4578
Illia Bobyra96d5442023-08-30 16:30:15 +02004579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4580printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004581 trailing_commas=no
4582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4583/* end confdefs.h. */
4584
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004585int
Illia Bobyra96d5442023-08-30 16:30:15 +02004586main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004587{
4588
Bram Moolenaar22640082018-04-19 20:39:41 +02004589 enum {
4590 one,
4591 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004592 ;
4593 return 0;
4594}
4595_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004596if ac_fn_c_try_compile "$LINENO"
4597then :
4598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4599printf "%s\n" "yes" >&6; }; trailing_commas=yes
4600else $as_nop
4601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4602printf "%s\n" "no" >&6; }
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004603fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004604rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004605 if test "$trailing_commas" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004606 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4607printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004608as_fn_error $? "Compiler does not support trailing comma in enum
4609See \`config.log' for more details" "$LINENO" 5; }
4610 fi
4611
Illia Bobyra96d5442023-08-30 16:30:15 +02004612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4613printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004614 slash_comments=no
4615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4616/* end confdefs.h. */
4617
4618int
Illia Bobyra96d5442023-08-30 16:30:15 +02004619main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004620{
4621// C++ comments?
4622 ;
4623 return 0;
4624}
4625_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004626if ac_fn_c_try_compile "$LINENO"
4627then :
4628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4629printf "%s\n" "yes" >&6; }; slash_comments=yes
4630else $as_nop
4631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4632printf "%s\n" "no" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004633fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004634rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004635 if test "$slash_comments" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004636 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4637printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004638as_fn_error $? "Compiler does not support C++ comments
4639See \`config.log' for more details" "$LINENO" 5; }
4640 fi
4641fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004642
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004643if test -n "$SOURCE_DATE_EPOCH"; then
4644 DATE_FMT="%b %d %Y %H:%M:%S"
4645 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 +02004646 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004647
4648 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4649
4650fi
4651
Bram Moolenaarf788a062011-12-14 20:51:25 +01004652
Illia Bobyra96d5442023-08-30 16:30:15 +02004653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4654printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004655# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004656if test ${enable_fail_if_missing+y}
4657then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004658 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02004659else $as_nop
Bram Moolenaarf788a062011-12-14 20:51:25 +01004660 fail_if_missing="no"
4661fi
4662
Illia Bobyra96d5442023-08-30 16:30:15 +02004663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4664printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004665
Bram Moolenaard2a05492018-07-27 22:35:15 +02004666with_x_arg="$with_x"
4667
Bram Moolenaar446cb832008-06-24 21:56:24 +00004668if test -z "$CFLAGS"; then
4669 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004670 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004671fi
Rose00d07e72023-05-06 18:07:14 +01004672
Bram Moolenaar446cb832008-06-24 21:56:24 +00004673if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004674 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004675 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004676 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 +00004677 fi
Rose00d07e72023-05-06 18:07:14 +01004678
4679 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004680 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4681 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4682 else
4683 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4684 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4685 CFLAGS="$CFLAGS -fno-strength-reduce"
4686 fi
4687 fi
4688fi
4689
Illia Bobyra96d5442023-08-30 16:30:15 +02004690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4691printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004692CLANG_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 +02004693if test x"$CLANG_VERSION_STRING" != x"" ; then
4694 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4695 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4696 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4697 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4699printf "%s\n" "$CLANG_VERSION" >&6; }
4700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4701printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004702 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004705 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4706 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4708printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004709 fi
4710else
Illia Bobyra96d5442023-08-30 16:30:15 +02004711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4712printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004713fi
4714
Bram Moolenaar839e9542016-04-14 16:46:02 +02004715CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004716if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4718printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004719 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004720fi
4721
Bram Moolenaar839e9542016-04-14 16:46:02 +02004722
Bram Moolenaar446cb832008-06-24 21:56:24 +00004723test "$GCC" = yes && CPP_MM=M;
4724
4725if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4727printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004728 sh ./toolcheck 1>&6
4729fi
4730
4731OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4732
Illia Bobyra96d5442023-08-30 16:30:15 +02004733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4734printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004735if test "x$vim_cv_uname_output" = "x" ; then
4736 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4738printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004739else
Illia Bobyra96d5442023-08-30 16:30:15 +02004740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4741printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004742fi
4743
Illia Bobyra96d5442023-08-30 16:30:15 +02004744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4745printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004746if test "x$vim_cv_uname_r_output" = "x" ; then
4747 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4749printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004750else
Illia Bobyra96d5442023-08-30 16:30:15 +02004751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4752printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004753fi
4754
Illia Bobyra96d5442023-08-30 16:30:15 +02004755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4756printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004757if test "x$vim_cv_uname_m_output" = "x" ; then
4758 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4760printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004761else
Illia Bobyra96d5442023-08-30 16:30:15 +02004762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4763printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004764fi
4765
Illia Bobyra96d5442023-08-30 16:30:15 +02004766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4767printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004768case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004769 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4770printf "%s\n" "yes" >&6; };;
4771 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4772printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004773esac
4774
Illia Bobyra96d5442023-08-30 16:30:15 +02004775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4776printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004777case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004778 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4779 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004780 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4781printf "%s\n" "yes" >&6; };;
4782 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4783printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004784esac
4785
Illia Bobyra96d5442023-08-30 16:30:15 +02004786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4787printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004788if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4790printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004791 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004792 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004793
Illia Bobyra96d5442023-08-30 16:30:15 +02004794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4795printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004796 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004797if test ${enable_darwin+y}
4798then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004799 enableval=$enable_darwin;
Illia Bobyra96d5442023-08-30 16:30:15 +02004800else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004801 enable_darwin="yes"
4802fi
4803
4804 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806printf "%s\n" "no" >&6; }
4807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4808printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004809 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4811printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004812 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4814printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004815 enable_darwin=no
4816 fi
4817 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4819printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004820 fi
4821
Illia Bobyra96d5442023-08-30 16:30:15 +02004822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4823printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004824
4825# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004826if test ${with_mac_arch+y}
4827then :
4828 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4829printf "%s\n" "$MACARCH" >&6; }
4830else $as_nop
4831 MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4832printf "%s\n" "defaulting to $MACARCH" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004833fi
4834
4835
Illia Bobyra96d5442023-08-30 16:30:15 +02004836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4837printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004838
4839# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004840if test ${with_developer_dir+y}
4841then :
4842 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4843printf "%s\n" "$DEVELOPER_DIR" >&6; }
4844else $as_nop
4845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4846printf "%s\n" "not present" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004847fi
4848
4849
4850 if test "x$DEVELOPER_DIR" = "x"; then
4851 # Extract the first word of "xcode-select", so it can be a program name with args.
4852set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4854printf %s "checking for $ac_word... " >&6; }
4855if test ${ac_cv_path_XCODE_SELECT+y}
4856then :
4857 printf %s "(cached) " >&6
4858else $as_nop
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004859 case $XCODE_SELECT in
4860 [\\/]* | ?:[\\/]*)
4861 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4862 ;;
4863 *)
4864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865for as_dir in $PATH
4866do
4867 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004868 case $as_dir in #(((
4869 '') as_dir=./ ;;
4870 */) ;;
4871 *) as_dir=$as_dir/ ;;
4872 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004873 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004874 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4875 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4876 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004877 break 2
4878 fi
4879done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004880 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004881IFS=$as_save_IFS
4882
4883 ;;
4884esac
4885fi
4886XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4887if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4889printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004890else
Illia Bobyra96d5442023-08-30 16:30:15 +02004891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004893fi
4894
4895
4896 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4898printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004899 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4901printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004902 else
4903 DEVELOPER_DIR=/Developer
4904 fi
4905 fi
4906
Bram Moolenaar446cb832008-06-24 21:56:24 +00004907 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4909printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004910 save_cppflags="$CPPFLAGS"
4911 save_cflags="$CFLAGS"
4912 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004913 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004915/* end confdefs.h. */
4916
4917int
Illia Bobyra96d5442023-08-30 16:30:15 +02004918main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004919{
4920
4921 ;
4922 return 0;
4923}
4924_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004925if ac_fn_c_try_link "$LINENO"
4926then :
4927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
4928printf "%s\n" "found" >&6; }
4929else $as_nop
4930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4931printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004932 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02004933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4934printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004935 CPPFLAGS="$CPPFLAGS -arch i386"
4936 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004938/* end confdefs.h. */
4939
4940int
Illia Bobyra96d5442023-08-30 16:30:15 +02004941main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004942{
4943
4944 ;
4945 return 0;
4946}
4947_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004948if ac_fn_c_try_link "$LINENO"
4949then :
4950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4951printf "%s\n" "yes" >&6; }; MACARCH="intel"
4952else $as_nop
4953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004955 MACARCH="ppc"
4956 CPPFLAGS="$save_cppflags -arch ppc"
4957 LDFLAGS="$save_ldflags -arch ppc"
4958fi
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 +00004961fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004962rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004963 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004964 elif test "x$MACARCH" = "xintel"; then
4965 CPPFLAGS="$CPPFLAGS -arch intel"
4966 LDFLAGS="$LDFLAGS -arch intel"
4967 elif test "x$MACARCH" = "xppc"; then
4968 CPPFLAGS="$CPPFLAGS -arch ppc"
4969 LDFLAGS="$LDFLAGS -arch ppc"
4970 fi
4971
4972 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02004973 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02004974 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00004975 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02004976 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01004977
Bram Moolenaard0573012017-10-28 21:11:06 +02004978 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02004979
Bram Moolenaar0b40d082022-03-08 13:32:37 +00004980 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 +02004981 with_x=no
4982 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004983 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004984else
Illia Bobyra96d5442023-08-30 16:30:15 +02004985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02004987fi
4988
Illia Bobyra96d5442023-08-30 16:30:15 +02004989ac_header= ac_cache=
4990for ac_item in $ac_header_c_list
4991do
4992 if test $ac_cache; then
4993 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4994 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4995 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4996 fi
4997 ac_header= ac_cache=
4998 elif test $ac_header; then
4999 ac_cache=$ac_item
5000 else
5001 ac_header=$ac_item
5002 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005003done
5004
5005
Illia Bobyra96d5442023-08-30 16:30:15 +02005006
5007
5008
5009
5010
5011
5012if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5013then :
5014
5015printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005016
Bram Moolenaar39766a72013-11-03 00:41:00 +01005017fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005018ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5019if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5020then :
5021 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005022
Illia Bobyra96d5442023-08-30 16:30:15 +02005023fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005024
Evan Miller25448072022-12-30 10:42:23 +00005025# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005026ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5027if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5028then :
5029 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005030
5031fi
5032
Bram Moolenaar39766a72013-11-03 00:41:00 +01005033
Bram Moolenaar071d4272004-06-13 20:20:40 +00005034
5035
5036
Bram Moolenaar446cb832008-06-24 21:56:24 +00005037if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5039printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005040 have_local_include=''
5041 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005042
5043# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005044if test ${with_local_dir+y}
5045then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005046 withval=$with_local_dir;
5047 local_dir="$withval"
5048 case "$withval" in
5049 */*) ;;
5050 no)
5051 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005052 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005053 have_local_lib=yes
5054 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005055 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005056 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5058printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005059
Illia Bobyra96d5442023-08-30 16:30:15 +02005060else $as_nop
Bram Moolenaarc236c162008-07-13 17:41:49 +00005061
5062 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5064printf "%s\n" "Defaulting to $local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005065
5066fi
5067
5068 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005069 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005070 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005071 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005072 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005073 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005074 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5075 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 +00005076 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005077 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005078 fi
5079 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005080 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5081 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 +00005082 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005083 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005084 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005085 fi
5086fi
5087
Illia Bobyra96d5442023-08-30 16:30:15 +02005088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5089printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005090
Bram Moolenaar446cb832008-06-24 21:56:24 +00005091# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005092if test ${with_vim_name+y}
5093then :
5094 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5095printf "%s\n" "$VIMNAME" >&6; }
5096else $as_nop
5097 VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5098printf "%s\n" "Defaulting to $VIMNAME" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005099fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005100
5101
Illia Bobyra96d5442023-08-30 16:30:15 +02005102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5103printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005104
5105# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005106if test ${with_ex_name+y}
5107then :
5108 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5109printf "%s\n" "$EXNAME" >&6; }
5110else $as_nop
5111 EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5112printf "%s\n" "Defaulting to ex" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005113fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005114
5115
Illia Bobyra96d5442023-08-30 16:30:15 +02005116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5117printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005118
5119# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005120if test ${with_view_name+y}
5121then :
5122 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5123printf "%s\n" "$VIEWNAME" >&6; }
5124else $as_nop
5125 VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5126printf "%s\n" "Defaulting to view" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005127fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005128
5129
5130
Illia Bobyra96d5442023-08-30 16:30:15 +02005131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5132printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005133
5134# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005135if test ${with_global_runtime+y}
5136then :
5137 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5138printf "%s\n" "$withval" >&6; }
5139else $as_nop
5140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5141printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005142fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005143
5144
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005145if test "X$RUNTIME_GLOBAL" != "X"; then
5146 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 +02005147 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005148
Illia Bobyra96d5442023-08-30 16:30:15 +02005149 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005150
5151fi
5152
Illia Bobyra96d5442023-08-30 16:30:15 +02005153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5154printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005155
5156# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005157if test ${with_modified_by+y}
5158then :
5159 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5160printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005161
Illia Bobyra96d5442023-08-30 16:30:15 +02005162else $as_nop
5163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005165fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005166
Bram Moolenaar446cb832008-06-24 21:56:24 +00005167
Illia Bobyra96d5442023-08-30 16:30:15 +02005168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5169printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005171/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005172
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005173int
Illia Bobyra96d5442023-08-30 16:30:15 +02005174main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005175{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005176 /* TryCompile function for CharSet.
5177 Treat any failure as ASCII for compatibility with existing art.
5178 Use compile-time rather than run-time tests for cross-compiler
5179 tolerance. */
5180#if '0'!=240
5181make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005182#endif
5183 ;
5184 return 0;
5185}
5186_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005187if ac_fn_c_try_compile "$LINENO"
5188then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005189 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005190cf_cv_ebcdic=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005191else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005192 # TryCompile action if false
Bram Moolenaar071d4272004-06-13 20:20:40 +00005193cf_cv_ebcdic=no
5194fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005195rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005196# end of TryCompile ])
5197# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5199printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005200case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005201 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005202
5203 line_break='"\\n"'
5204 ;;
5205 *) line_break='"\\012"';;
5206esac
5207
5208
5209if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5211printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005212case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005213 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005214 if test "$CC" = "cc"; then
5215 ccm="$_CC_CCMODE"
5216 ccn="CC"
5217 else
5218 if test "$CC" = "c89"; then
5219 ccm="$_CC_C89MODE"
5220 ccn="C89"
5221 else
5222 ccm=1
5223 fi
5224 fi
5225 if test "$ccm" != "1"; then
5226 echo ""
5227 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005228 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005229 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005230 echo " Do:"
5231 echo " export _CC_${ccn}MODE=1"
5232 echo " and then call configure again."
5233 echo "------------------------------------------"
5234 exit 1
5235 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005236 # Set CFLAGS for configure process.
5237 # This will be reset later for config.mk.
5238 # Use haltonmsg to force error for missing H files.
5239 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5240 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5242printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005243 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005244 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005247 ;;
5248esac
5249fi
5250
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005251if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005252 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005253else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005254 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005255fi
5256
5257
5258
Illia Bobyra96d5442023-08-30 16:30:15 +02005259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5260printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005261# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005262if test ${enable_smack+y}
5263then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005264 enableval=$enable_smack;
Illia Bobyra96d5442023-08-30 16:30:15 +02005265else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005266 enable_smack="yes"
5267fi
5268
5269if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5271printf "%s\n" "no" >&6; }
5272 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5273if test "x$ac_cv_header_linux_xattr_h" = xyes
5274then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005275 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005276else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005277 enable_smack="no"
5278fi
5279
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005280else
Illia Bobyra96d5442023-08-30 16:30:15 +02005281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5282printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005283fi
5284if test "$enable_smack" = "yes"; then
Illia Bobyr8c358e02023-09-30 22:57:19 +02005285 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5286if test "x$ac_cv_header_sys_xattr_h" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +02005287then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005288 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005289else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005290 enable_smack="no"
5291fi
5292
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005293fi
5294if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5296printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5297
5298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005299/* end confdefs.h. */
5300#include <linux/xattr.h>
5301_ACEOF
5302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +02005303 $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
5304then :
5305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5306printf "%s\n" "yes" >&6; }
5307else $as_nop
5308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5309printf "%s\n" "no" >&6; }; enable_smack="no"
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005310fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005311rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005312
5313fi
5314if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5316printf %s "checking for setxattr in -lattr... " >&6; }
5317if test ${ac_cv_lib_attr_setxattr+y}
5318then :
5319 printf %s "(cached) " >&6
5320else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005321 ac_check_lib_save_LIBS=$LIBS
5322LIBS="-lattr $LIBS"
5323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5324/* end confdefs.h. */
5325
5326/* Override any GCC internal prototype to avoid an error.
5327 Use char because int might match the return type of a GCC
5328 builtin and then its argument prototype would still apply. */
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005329char setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005330int
Illia Bobyra96d5442023-08-30 16:30:15 +02005331main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005332{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005333return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005334 ;
5335 return 0;
5336}
5337_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005338if ac_fn_c_try_link "$LINENO"
5339then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005340 ac_cv_lib_attr_setxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005341else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005342 ac_cv_lib_attr_setxattr=no
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005343fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005344rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005345 conftest$ac_exeext conftest.$ac_ext
5346LIBS=$ac_check_lib_save_LIBS
5347fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5349printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5350if test "x$ac_cv_lib_attr_setxattr" = xyes
5351then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005352 LIBS="$LIBS -lattr"
5353 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005354 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005355
5356fi
5357
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005358fi
5359
5360if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5362printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005363 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005364if test ${enable_selinux+y}
5365then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005366 enableval=$enable_selinux;
Illia Bobyra96d5442023-08-30 16:30:15 +02005367else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005368 enable_selinux="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005369fi
5370
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005371 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373printf "%s\n" "no" >&6; }
5374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5375printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5376if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5377then :
5378 printf %s "(cached) " >&6
5379else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005380 ac_check_lib_save_LIBS=$LIBS
5381LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005383/* end confdefs.h. */
5384
Bram Moolenaar446cb832008-06-24 21:56:24 +00005385/* Override any GCC internal prototype to avoid an error.
5386 Use char because int might match the return type of a GCC
5387 builtin and then its argument prototype would still apply. */
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005388char is_selinux_enabled ();
5389int
Illia Bobyra96d5442023-08-30 16:30:15 +02005390main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005391{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005392return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005393 ;
5394 return 0;
5395}
5396_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005397if ac_fn_c_try_link "$LINENO"
5398then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005399 ac_cv_lib_selinux_is_selinux_enabled=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005400else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005401 ac_cv_lib_selinux_is_selinux_enabled=no
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005402fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005403rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005404 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005405LIBS=$ac_check_lib_save_LIBS
5406fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5408printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5409if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5410then :
5411 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5412if test "x$ac_cv_header_selinux_selinux_h" = xyes
5413then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005414 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005415 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005416
5417fi
5418
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005419fi
5420
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005421 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5423printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005424 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005425fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005426
Christian Brabandte085dfd2023-09-30 12:49:18 +02005427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5428printf %s "checking --enable-xattr argument... " >&6; }
5429# Check whether --enable-xattr was given.
5430if test ${enable_xattr+y}
5431then :
5432 enableval=$enable_xattr;
5433else $as_nop
5434 enable_xattr="yes"
5435fi
5436
5437if test "$enable_xattr" = "yes"; then
5438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5439printf "%s\n" "yes" >&6; }
Illia Bobyr8c358e02023-09-30 22:57:19 +02005440 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5441if test "x$ac_cv_header_sys_xattr_h" = xyes
Christian Brabandte085dfd2023-09-30 12:49:18 +02005442then :
5443 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5444
5445fi
5446
5447else
5448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449printf "%s\n" "no" >&6; }
5450fi
5451
5452
Illia Bobyra96d5442023-08-30 16:30:15 +02005453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5454printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005455
Bram Moolenaar446cb832008-06-24 21:56:24 +00005456# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005457if test ${with_features+y}
5458then :
5459 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5460printf "%s\n" "$features" >&6; }
5461else $as_nop
5462 features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5463printf "%s\n" "Defaulting to huge" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005464fi
5465
Bram Moolenaar071d4272004-06-13 20:20:40 +00005466
Martin Tournoij7904fa42022-10-04 16:28:45 +01005467case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005468 small) features="tiny" ;;
5469 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005470esac
5471
Bram Moolenaar071d4272004-06-13 20:20:40 +00005472dovimdiff=""
5473dogvimdiff=""
5474case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005475 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005476 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005477 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005478 dovimdiff="installvimdiff";
5479 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005480 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005481 dovimdiff="installvimdiff";
5482 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005483 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5484printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005485esac
5486
5487
5488
5489
Martin Tournoij7904fa42022-10-04 16:28:45 +01005490if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005491 has_eval=no
5492else
5493 has_eval=yes
5494fi
5495
Illia Bobyra96d5442023-08-30 16:30:15 +02005496{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5497printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005498
Bram Moolenaar446cb832008-06-24 21:56:24 +00005499# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005500if test ${with_compiledby+y}
5501then :
5502 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5503printf "%s\n" "$withval" >&6; }
5504else $as_nop
5505 compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005507fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005508
5509
Bram Moolenaar446cb832008-06-24 21:56:24 +00005510
Illia Bobyra96d5442023-08-30 16:30:15 +02005511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5512printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005513# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005514if test ${enable_xsmp+y}
5515then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005516 enableval=$enable_xsmp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005517else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005518 enable_xsmp="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005519fi
5520
Bram Moolenaar071d4272004-06-13 20:20:40 +00005521
5522if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524printf "%s\n" "no" >&6; }
5525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5526printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005527 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005528if test ${enable_xsmp_interact+y}
5529then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005530 enableval=$enable_xsmp_interact;
Illia Bobyra96d5442023-08-30 16:30:15 +02005531else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005532 enable_xsmp_interact="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005533fi
5534
Bram Moolenaar071d4272004-06-13 20:20:40 +00005535 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537printf "%s\n" "no" >&6; }
5538 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005539
5540 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5542printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005543 fi
5544else
Illia Bobyra96d5442023-08-30 16:30:15 +02005545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5546printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005547fi
5548
Illia Bobyra96d5442023-08-30 16:30:15 +02005549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5550printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005551if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5553printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005554else
Illia Bobyra96d5442023-08-30 16:30:15 +02005555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5556printf "%s\n" "enabled" >&6; }
5557 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005558
5559 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5560
5561fi
5562
Illia Bobyra96d5442023-08-30 16:30:15 +02005563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5564printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005565# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005566if test ${enable_luainterp+y}
5567then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005568 enableval=$enable_luainterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005569else $as_nop
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005570 enable_luainterp="no"
5571fi
5572
Illia Bobyra96d5442023-08-30 16:30:15 +02005573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5574printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005575
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005576if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005577 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005578 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005579 fi
5580
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005581
5582
Illia Bobyra96d5442023-08-30 16:30:15 +02005583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5584printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005585
5586# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005587if test ${with_lua_prefix+y}
5588then :
5589 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5590printf "%s\n" "$with_lua_prefix" >&6; }
5591else $as_nop
5592 with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005594fi
5595
5596
5597 if test "X$with_lua_prefix" != "X"; then
5598 vi_cv_path_lua_pfx="$with_lua_prefix"
5599 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5601printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005602 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5604printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005605 vi_cv_path_lua_pfx="$LUA_PREFIX"
5606 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5608printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005609 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005610 fi
5611 fi
5612
Illia Bobyra96d5442023-08-30 16:30:15 +02005613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5614printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005615
5616# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005617if test ${with_luajit+y}
5618then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005619 withval=$with_luajit; vi_cv_with_luajit="$withval"
Illia Bobyra96d5442023-08-30 16:30:15 +02005620else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005621 vi_cv_with_luajit="no"
5622fi
5623
Illia Bobyra96d5442023-08-30 16:30:15 +02005624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5625printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005626
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005627 LUA_INC=
5628 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005629 if test "x$vi_cv_with_luajit" != "xno"; then
5630 # Extract the first word of "luajit", so it can be a program name with args.
5631set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633printf %s "checking for $ac_word... " >&6; }
5634if test ${ac_cv_path_vi_cv_path_luajit+y}
5635then :
5636 printf %s "(cached) " >&6
5637else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005638 case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005639 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005640 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 +02005641 ;;
5642 *)
5643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005647 case $as_dir in #(((
5648 '') as_dir=./ ;;
5649 */) ;;
5650 *) as_dir=$as_dir/ ;;
5651 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005652 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005653 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5654 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5655 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005656 break 2
5657 fi
5658done
5659 done
5660IFS=$as_save_IFS
5661
5662 ;;
5663esac
5664fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005665vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5666if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5668printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005669else
Illia Bobyra96d5442023-08-30 16:30:15 +02005670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5671printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005672fi
5673
5674
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005675 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5677printf %s "checking LuaJIT version... " >&6; }
5678if test ${vi_cv_version_luajit+y}
5679then :
5680 printf %s "(cached) " >&6
5681else $as_nop
ichizokbddc6ad2023-08-29 20:54:32 +02005682 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 +02005683fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5685printf "%s\n" "$vi_cv_version_luajit" >&6; }
5686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5687printf %s "checking Lua version of LuaJIT... " >&6; }
5688if test ${vi_cv_version_lua_luajit+y}
5689then :
5690 printf %s "(cached) " >&6
5691else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005692 vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5693fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5695printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005696 vi_cv_path_lua="$vi_cv_path_luajit"
5697 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5698 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005699 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005700 # Extract the first word of "lua", so it can be a program name with args.
5701set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005702{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703printf %s "checking for $ac_word... " >&6; }
5704if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5705then :
5706 printf %s "(cached) " >&6
5707else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005708 case $vi_cv_path_plain_lua in
5709 [\\/]* | ?:[\\/]*)
5710 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5711 ;;
5712 *)
5713 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5714for as_dir in $PATH
5715do
5716 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005717 case $as_dir in #(((
5718 '') as_dir=./ ;;
5719 */) ;;
5720 *) as_dir=$as_dir/ ;;
5721 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005722 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005723 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5724 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5725 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005726 break 2
5727 fi
5728done
5729 done
5730IFS=$as_save_IFS
5731
5732 ;;
5733esac
5734fi
5735vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5736if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5738printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005739else
Illia Bobyra96d5442023-08-30 16:30:15 +02005740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005742fi
5743
5744
5745 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5747printf %s "checking Lua version... " >&6; }
5748if test ${vi_cv_version_plain_lua+y}
5749then :
5750 printf %s "(cached) " >&6
5751else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005752 vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5753fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5755printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005756 fi
5757 vi_cv_path_lua="$vi_cv_path_plain_lua"
5758 vi_cv_version_lua="$vi_cv_version_plain_lua"
5759 fi
5760 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005761 { 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
5762printf %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 +01005763 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5765printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005766 LUA_INC=/luajit-$vi_cv_version_luajit
5767 fi
5768 fi
5769 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5771printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005772 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5774printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005775 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777printf "%s\n" "no" >&6; }
5778 { 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
5779printf %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 +01005780 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5782printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005783 LUA_INC=/lua$vi_cv_version_lua
5784 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005787
5788 # Detect moonjit:
5789 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5790 lua_suf=/moonjit-2.3
5791 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02005792 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005793 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01005794 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005795 lua_suf="/$lua_suf"
5796 break
5797 fi
5798 done
Illia Bobyra96d5442023-08-30 16:30:15 +02005799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5800printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005801 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5803printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005804 LUA_INC=$lua_suf
5805 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005808 vi_cv_path_lua_pfx=
5809 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005810 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005811 fi
5812 fi
5813 fi
5814
5815 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005816 if test "x$vi_cv_with_luajit" != "xno"; then
5817 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5818 if test "X$multiarch" != "X"; then
5819 lib_multiarch="lib/${multiarch}"
5820 else
5821 lib_multiarch="lib"
5822 fi
5823 if test "X$vi_cv_version_lua" = "X"; then
5824 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5825 else
5826 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5827 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005828 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005829 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5830 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005831 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005832 LUALIBDIR=lib
5833 fi
5834 if test "X$LUA_INC" != "X"; then
5835 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
5836 else
5837 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005838 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005839 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005840 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005841 lua_ok="yes"
5842 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5844printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005845 libs_save=$LIBS
5846 LIBS="$LIBS $LUA_LIBS"
5847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5848/* end confdefs.h. */
5849
5850int
Illia Bobyra96d5442023-08-30 16:30:15 +02005851main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005852{
5853
5854 ;
5855 return 0;
5856}
5857_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005858if ac_fn_c_try_link "$LINENO"
5859then :
5860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5861printf "%s\n" "yes" >&6; }; lua_ok="yes"
5862else $as_nop
5863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS=""
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005865fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005866rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005867 conftest$ac_exeext conftest.$ac_ext
5868 LIBS=$libs_save
5869 fi
5870 if test "x$lua_ok" = "xyes"; then
5871 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5872 LUA_SRC="if_lua.c"
5873 LUA_OBJ="objects/if_lua.o"
5874 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02005875 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005876
5877 fi
5878 if test "$enable_luainterp" = "dynamic"; then
5879 if test "x$vi_cv_with_luajit" != "xno"; then
5880 luajit="jit"
5881 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005882 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5883 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5884 else
Bram Moolenaard0573012017-10-28 21:11:06 +02005885 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005886 ext="dylib"
5887 indexes=""
5888 else
5889 ext="so"
5890 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5891 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5892 if test "X$multiarch" != "X"; then
5893 lib_multiarch="lib/${multiarch}"
5894 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02005895 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5897printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005898 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02005899 if test -z "$subdir"; then
5900 continue
5901 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005902 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5903 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5904 for i in $indexes ""; do
5905 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02005906 sover2="$i"
5907 break 3
5908 fi
5909 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01005910 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005911 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005912 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005913 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5915printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005916 lua_ok="no"
5917 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5918 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5920printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005921 lua_ok="yes"
5922 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5923 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005924 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005925 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005926
5927 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005928 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005929 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005930 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02005931 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005932 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005933 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5934 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005935 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005936 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01005937 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01005938 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005939
5940
5941
5942
5943
ichizok8bb3fe42021-12-28 15:51:45 +00005944
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005945fi
5946
5947
Illia Bobyra96d5442023-08-30 16:30:15 +02005948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5949printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005950# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005951if test ${enable_mzschemeinterp+y}
5952then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005953 enableval=$enable_mzschemeinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005954else $as_nop
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005955 enable_mzschemeinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005956fi
5957
Illia Bobyra96d5442023-08-30 16:30:15 +02005958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5959printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005960
5961if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005962
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005963
Illia Bobyra96d5442023-08-30 16:30:15 +02005964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5965printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005966
Bram Moolenaar446cb832008-06-24 21:56:24 +00005967# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005968if test ${with_plthome+y}
5969then :
5970 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5971printf "%s\n" "$with_plthome" >&6; }
5972else $as_nop
5973 with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5974printf "%s\n" "\"no\"" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005975fi
5976
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005977
5978 if test "X$with_plthome" != "X"; then
5979 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005980 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005981 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5983printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005984 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5986printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005987 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005988 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005989 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5991printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005992 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005993set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995printf %s "checking for $ac_word... " >&6; }
5996if test ${ac_cv_path_vi_cv_path_mzscheme+y}
5997then :
5998 printf %s "(cached) " >&6
5999else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006000 case $vi_cv_path_mzscheme in
6001 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006002 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6003 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006004 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006009 case $as_dir in #(((
6010 '') as_dir=./ ;;
6011 */) ;;
6012 *) as_dir=$as_dir/ ;;
6013 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006014 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006015 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6016 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6017 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006018 break 2
6019 fi
6020done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006021 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006022IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006023
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006024 ;;
6025esac
6026fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006027vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006028if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6030printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006031else
Illia Bobyra96d5442023-08-30 16:30:15 +02006032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006034fi
6035
6036
Bram Moolenaar446cb832008-06-24 21:56:24 +00006037
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006038 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006039 lsout=`ls -l $vi_cv_path_mzscheme`
6040 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6041 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6042 fi
6043 fi
6044
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006045 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6047printf %s "checking MzScheme install prefix... " >&6; }
6048if test ${vi_cv_path_mzscheme_pfx+y}
6049then :
6050 printf %s "(cached) " >&6
6051else $as_nop
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006052 echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006053 (build-path (call-with-values \
6054 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006055 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6056 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
6057 sed -e 's+/$++'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006058fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6060printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006061 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006062 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006063 fi
6064 fi
6065
6066 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6068printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006069 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6070 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6072printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006073 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6075printf "%s\n" "not found" >&6; }
6076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6077printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006078 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6079 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6081printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006082 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084printf "%s\n" "no" >&6; }
6085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6086printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006087 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6089printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006090 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006091 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093printf "%s\n" "no" >&6; }
6094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6095printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006096 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6098printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006099 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006100 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102printf "%s\n" "no" >&6; }
6103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6104printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006105 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6107printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006108 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006109 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111printf "%s\n" "no" >&6; }
6112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6113printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006114 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6116printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006117 SCHEME_INC=/usr/include/racket
6118 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006121 vi_cv_path_mzscheme_pfx=
6122 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006123 fi
6124 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006125 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006126 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006127 fi
6128 fi
6129
6130 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006131
Illia Bobyra96d5442023-08-30 16:30:15 +02006132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6133printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006134 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6135 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6137printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006138 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6140printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006141 fi
6142
6143 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6144 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006145 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006146 MZSCHEME_LIBS="-framework Racket"
6147 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6148 elif test -f "${path}/libmzscheme3m.a"; then
6149 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6150 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6151 elif test -f "${path}/libracket3m.a"; then
6152 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006153 if test -f "${path}/librktio.a"; then
6154 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6155 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006156 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6157 elif test -f "${path}/libracket.a"; then
6158 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6159 elif test -f "${path}/libmzscheme.a"; then
6160 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6161 else
6162 if test -f "${path}/libmzscheme3m.so"; then
6163 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6164 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6165 elif test -f "${path}/libracket3m.so"; then
6166 MZSCHEME_LIBS="-L${path} -lracket3m"
6167 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6168 elif test -f "${path}/libracket.so"; then
6169 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6170 else
6171 if test "$path" != "$SCHEME_LIB"; then
6172 continue
6173 fi
6174 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6175 fi
6176 if test "$GCC" = yes; then
6177 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006178 elif test "$vim_cv_uname_output" = SunOS &&
6179 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006180 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6181 fi
6182 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006183 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006184 if test "X$MZSCHEME_LIBS" != "X"; then
6185 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006186 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006187 done
6188
Illia Bobyra96d5442023-08-30 16:30:15 +02006189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6190printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006191 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6193printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006194 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6195 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6196 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006199 fi
6200
Illia Bobyra96d5442023-08-30 16:30:15 +02006201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6202printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006203 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6204 if test "X$SCHEME_CONFIGDIR" != "X"; then
6205 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6207printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006208 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6210printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006211 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006212
Illia Bobyra96d5442023-08-30 16:30:15 +02006213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6214printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006215 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))))'`
6216 if test "X$SCHEME_COLLECTS" = "X"; then
6217 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6218 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006219 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006220 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6221 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006222 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006223 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6224 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6225 else
6226 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6227 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6228 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006229 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006230 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006231 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006232 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006233 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6235printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006236 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6238printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006239 fi
6240
Illia Bobyra96d5442023-08-30 16:30:15 +02006241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6242printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006243 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006244 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006245 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6246 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006247 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006248 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006249 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006250 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6251 MZSCHEME_MOD="++lib scheme/base"
6252 else
6253 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6254 MZSCHEME_EXTRA="mzscheme_base.c"
6255 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6256 MZSCHEME_MOD=""
6257 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006258 fi
6259 fi
6260 if test "X$MZSCHEME_EXTRA" != "X" ; then
6261 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6263printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006264 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6266printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006267 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006268
Illia Bobyra96d5442023-08-30 16:30:15 +02006269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6270printf %s "checking for ffi_type_void in -lffi... " >&6; }
6271if test ${ac_cv_lib_ffi_ffi_type_void+y}
6272then :
6273 printf %s "(cached) " >&6
6274else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006275 ac_check_lib_save_LIBS=$LIBS
6276LIBS="-lffi $LIBS"
6277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6278/* end confdefs.h. */
6279
6280/* Override any GCC internal prototype to avoid an error.
6281 Use char because int might match the return type of a GCC
6282 builtin and then its argument prototype would still apply. */
Bram Moolenaar9e902192013-07-17 18:58:11 +02006283char ffi_type_void ();
6284int
Illia Bobyra96d5442023-08-30 16:30:15 +02006285main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006286{
6287return ffi_type_void ();
6288 ;
6289 return 0;
6290}
6291_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006292if ac_fn_c_try_link "$LINENO"
6293then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006294 ac_cv_lib_ffi_ffi_type_void=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006295else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006296 ac_cv_lib_ffi_ffi_type_void=no
6297fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006298rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006299 conftest$ac_exeext conftest.$ac_ext
6300LIBS=$ac_check_lib_save_LIBS
6301fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6303printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6304if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6305then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006306 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6307fi
6308
6309
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006310 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006311 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006312
Illia Bobyra96d5442023-08-30 16:30:15 +02006313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6314printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006315 cflags_save=$CFLAGS
6316 libs_save=$LIBS
6317 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6318 LIBS="$LIBS $MZSCHEME_LIBS"
6319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6320/* end confdefs.h. */
6321
6322int
Illia Bobyra96d5442023-08-30 16:30:15 +02006323main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006324{
6325
6326 ;
6327 return 0;
6328}
6329_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006330if ac_fn_c_try_link "$LINENO"
6331then :
6332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6333printf "%s\n" "yes" >&6; }; mzs_ok=yes
6334else $as_nop
6335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6336printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
Bram Moolenaar9e902192013-07-17 18:58:11 +02006337fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006338rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006339 conftest$ac_exeext conftest.$ac_ext
6340 CFLAGS=$cflags_save
6341 LIBS=$libs_save
6342 if test $mzs_ok = yes; then
6343 MZSCHEME_SRC="if_mzsch.c"
6344 MZSCHEME_OBJ="objects/if_mzsch.o"
6345 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006346 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006347
6348 else
6349 MZSCHEME_CFLAGS=
6350 MZSCHEME_LIBS=
6351 MZSCHEME_EXTRA=
6352 MZSCHEME_MZC=
6353 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006354 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006355
6356
6357
6358
6359
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006360
6361
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006362fi
6363
6364
Illia Bobyra96d5442023-08-30 16:30:15 +02006365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6366printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006367# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006368if test ${enable_perlinterp+y}
6369then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006370 enableval=$enable_perlinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006371else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006372 enable_perlinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006373fi
6374
Illia Bobyra96d5442023-08-30 16:30:15 +02006375{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6376printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006377if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006378 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006379 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006380 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006381
Bram Moolenaar071d4272004-06-13 20:20:40 +00006382 # Extract the first word of "perl", so it can be a program name with args.
6383set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6385printf %s "checking for $ac_word... " >&6; }
6386if test ${ac_cv_path_vi_cv_path_perl+y}
6387then :
6388 printf %s "(cached) " >&6
6389else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006390 case $vi_cv_path_perl in
6391 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006392 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6393 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006394 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6396for as_dir in $PATH
6397do
6398 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006399 case $as_dir in #(((
6400 '') as_dir=./ ;;
6401 */) ;;
6402 *) as_dir=$as_dir/ ;;
6403 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006404 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006405 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6406 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6407 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006408 break 2
6409 fi
6410done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006411 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006412IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006413
Bram Moolenaar071d4272004-06-13 20:20:40 +00006414 ;;
6415esac
6416fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006417vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006418if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6420printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006421else
Illia Bobyra96d5442023-08-30 16:30:15 +02006422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006424fi
6425
Bram Moolenaar446cb832008-06-24 21:56:24 +00006426
Bram Moolenaar071d4272004-06-13 20:20:40 +00006427 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6429printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006430 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6431 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006432 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006433 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6434 badthreads=no
6435 else
6436 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6437 eval `$vi_cv_path_perl -V:use5005threads`
6438 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6439 badthreads=no
6440 else
6441 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6443printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006444 fi
6445 else
6446 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6448printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006449 fi
6450 fi
6451 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6453printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006454 eval `$vi_cv_path_perl -V:shrpenv`
6455 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6456 shrpenv=""
6457 fi
6458 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006459
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006460 vi_cv_perl_extutils=unknown_perl_extutils_path
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01006461
6462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
6463printf %s "checking --with-xsubpp path... " >&6; }
6464 vi_cv_perl_xsubpp=
6465
6466# Check whether --with-xsubpp was given.
6467if test ${with_xsubpp+y}
6468then :
6469 withval=$with_xsubpp;
6470 if test -f "$withval"
6471 then
6472 vi_cv_perl_xsubpp="$withval"
6473 fi
6474
6475fi
6476
6477
6478 if test "x$vi_cv_perl_xsubpp" = "x"
6479 then
6480 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6481 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6482 if test -f "$xsubpp_path"; then
6483 vi_cv_perl_xsubpp="$xsubpp_path"
6484 fi
6485 done
6486 fi
6487
6488 if test "x$vi_cv_perl_xsubpp" = "x"
6489 then
6490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
6491printf "%s\n" "empty" >&6; }
6492 else
6493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
6494printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
6495 fi
6496
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006497
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006498 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006499 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6500 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006501 -e 's/-pipe //' \
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006502 -e 's/-flto\(=auto\)\? //' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006503 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006504 -e 's/-D_FORTIFY_SOURCE=.//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006505 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6506 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6507 -e 's/-bE:perl.exp//' -e 's/-lc //'`
6508 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6509 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6510
Illia Bobyra96d5442023-08-30 16:30:15 +02006511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6512printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006513 cflags_save=$CFLAGS
6514 libs_save=$LIBS
6515 ldflags_save=$LDFLAGS
6516 CFLAGS="$CFLAGS $perlcppflags"
6517 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006518 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006519 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006521/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006522
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006523int
Illia Bobyra96d5442023-08-30 16:30:15 +02006524main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006525{
6526
6527 ;
6528 return 0;
6529}
6530_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006531if ac_fn_c_try_link "$LINENO"
6532then :
6533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6534printf "%s\n" "yes" >&6; }; perl_ok=yes
6535else $as_nop
6536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6537printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006538fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006539rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006540 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006541 CFLAGS=$cflags_save
6542 LIBS=$libs_save
6543 LDFLAGS=$ldflags_save
6544 if test $perl_ok = yes; then
6545 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006546 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006547 fi
6548 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006549 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006550 LDFLAGS="$perlldflags $LDFLAGS"
6551 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006552 fi
6553 PERL_LIBS=$perllibs
6554 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6555 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6556 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006557 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006558
6559 fi
6560 fi
6561 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6563printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006564 fi
6565 fi
6566
Bram Moolenaard0573012017-10-28 21:11:06 +02006567 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006568 dir=/System/Library/Perl
6569 darwindir=$dir/darwin
6570 if test -d $darwindir; then
6571 PERL=/usr/bin/perl
6572 else
6573 dir=/System/Library/Perl/5.8.1
6574 darwindir=$dir/darwin-thread-multi-2level
6575 if test -d $darwindir; then
6576 PERL=/usr/bin/perl
6577 fi
6578 fi
6579 if test -n "$PERL"; then
6580 PERL_DIR="$dir"
6581 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6582 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6583 PERL_LIBS="-L$darwindir/CORE -lperl"
6584 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006585 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6586 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 +00006587 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006588 if test "$enable_perlinterp" = "dynamic"; then
6589 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006590 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006591
6592 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006593 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006594 fi
6595 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006596
6597 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006598 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006599 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006600fi
6601
6602
6603
6604
6605
6606
6607
ichizok8bb3fe42021-12-28 15:51:45 +00006608
Illia Bobyra96d5442023-08-30 16:30:15 +02006609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6610printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006611# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006612if test ${enable_pythoninterp+y}
6613then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006614 enableval=$enable_pythoninterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006615else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006616 enable_pythoninterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006617fi
6618
Illia Bobyra96d5442023-08-30 16:30:15 +02006619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6620printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006621if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006622 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006623 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006624 fi
6625
Illia Bobyra96d5442023-08-30 16:30:15 +02006626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6627printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006628
6629
6630# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006631if test ${with_python_command+y}
6632then :
6633 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6634printf "%s\n" "$vi_cv_path_python" >&6; }
6635else $as_nop
6636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006638fi
6639
6640
6641 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006642 for ac_prog in python2 python
6643do
6644 # Extract the first word of "$ac_prog", so it can be a program name with args.
6645set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6647printf %s "checking for $ac_word... " >&6; }
6648if test ${ac_cv_path_vi_cv_path_python+y}
6649then :
6650 printf %s "(cached) " >&6
6651else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006652 case $vi_cv_path_python in
6653 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006654 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6655 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006656 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6658for as_dir in $PATH
6659do
6660 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006661 case $as_dir in #(((
6662 '') as_dir=./ ;;
6663 */) ;;
6664 *) as_dir=$as_dir/ ;;
6665 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006666 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006667 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6668 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6669 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006670 break 2
6671 fi
6672done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006673 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006674IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006675
Bram Moolenaar071d4272004-06-13 20:20:40 +00006676 ;;
6677esac
6678fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006679vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006680if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6682printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006683else
Illia Bobyra96d5442023-08-30 16:30:15 +02006684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6685printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006686fi
6687
Bram Moolenaar446cb832008-06-24 21:56:24 +00006688
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006689 test -n "$vi_cv_path_python" && break
6690done
6691
Bram Moolenaare1a32312018-04-15 16:03:25 +02006692 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006693 if test "X$vi_cv_path_python" != "X"; then
6694
Illia Bobyra96d5442023-08-30 16:30:15 +02006695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6696printf %s "checking Python version... " >&6; }
6697if test ${vi_cv_var_python_version+y}
6698then :
6699 printf %s "(cached) " >&6
6700else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006701 vi_cv_var_python_version=`
6702 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006703
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_var_python_version" >&5
6706printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006707
Illia Bobyra96d5442023-08-30 16:30:15 +02006708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6709printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006710 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02006711 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006712 then
Illia Bobyra96d5442023-08-30 16:30:15 +02006713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6714printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006715
Illia Bobyra96d5442023-08-30 16:30:15 +02006716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6717printf %s "checking Python's install prefix... " >&6; }
6718if test ${vi_cv_path_python_pfx+y}
6719then :
6720 printf %s "(cached) " >&6
6721else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006722 vi_cv_path_python_pfx=`
6723 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006724 "import sys; print sys.prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006725fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6727printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006728
Illia Bobyra96d5442023-08-30 16:30:15 +02006729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6730printf %s "checking Python's execution prefix... " >&6; }
6731if test ${vi_cv_path_python_epfx+y}
6732then :
6733 printf %s "(cached) " >&6
6734else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006735 vi_cv_path_python_epfx=`
6736 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006737 "import sys; print sys.exec_prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006738fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6740printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006741
Bram Moolenaar071d4272004-06-13 20:20:40 +00006742
Illia Bobyra96d5442023-08-30 16:30:15 +02006743 if test ${vi_cv_path_pythonpath+y}
6744then :
6745 printf %s "(cached) " >&6
6746else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006747 vi_cv_path_pythonpath=`
6748 unset PYTHONPATH;
6749 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006750 "import sys, string; print string.join(sys.path,':')"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006751fi
6752
6753
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006754
6755
Bram Moolenaar446cb832008-06-24 21:56:24 +00006756# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006757if test ${with_python_config_dir+y}
6758then :
Bram Moolenaard0882402018-04-10 18:13:05 +02006759 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00006760fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006761
Bram Moolenaar446cb832008-06-24 21:56:24 +00006762
Illia Bobyra96d5442023-08-30 16:30:15 +02006763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6764printf %s "checking Python's configuration directory... " >&6; }
6765if test ${vi_cv_path_python_conf+y}
6766then :
6767 printf %s "(cached) " >&6
6768else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006769
Bram Moolenaar071d4272004-06-13 20:20:40 +00006770 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02006771 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6772 if test -d "$d" && test -f "$d/config.c"; then
6773 vi_cv_path_python_conf="$d"
6774 else
6775 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6776 for subdir in lib64 lib share; do
6777 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6778 if test -d "$d" && test -f "$d/config.c"; then
6779 vi_cv_path_python_conf="$d"
6780 fi
6781 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00006782 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02006783 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006784
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006785fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6787printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006788
6789 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6790
6791 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006792 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6793printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006794 else
6795
Illia Bobyra96d5442023-08-30 16:30:15 +02006796 if test ${vi_cv_path_python_plibs+y}
6797then :
6798 printf %s "(cached) " >&6
6799else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006800
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006801 pwd=`pwd`
6802 tmp_mkf="$pwd/config-PyMake$$"
6803 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006804__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02006805 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006806 @echo "python_LIBS='$(LIBS)'"
6807 @echo "python_SYSLIBS='$(SYSLIBS)'"
6808 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02006809 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02006810 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006811 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6812 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6813 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006814eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006815 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6816 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02006817 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006818 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6819 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006820 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6821 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6822 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006823 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02006824 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01006825 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01006826 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6827 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6828 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6829 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6830 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6831 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6832 fi
6833 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6834 fi
6835 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02006836 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 +00006837 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6838 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006839
Bram Moolenaar071d4272004-06-13 20:20:40 +00006840fi
6841
Illia Bobyra96d5442023-08-30 16:30:15 +02006842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6843printf %s "checking Python's dll name... " >&6; }
6844if test ${vi_cv_dll_name_python+y}
6845then :
6846 printf %s "(cached) " >&6
6847else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006848
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006849 if test "X$python_DLLLIBRARY" != "X"; then
6850 vi_cv_dll_name_python="$python_DLLLIBRARY"
6851 else
6852 vi_cv_dll_name_python="$python_INSTSONAME"
6853 fi
6854
6855fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006856{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6857printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006858
Bram Moolenaar071d4272004-06-13 20:20:40 +00006859 PYTHON_LIBS="${vi_cv_path_python_plibs}"
6860 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02006861 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006862 else
Bram Moolenaar04249582018-04-10 13:29:34 +02006863 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 +00006864 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02006865 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02006866 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6867
6868 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006869 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02006870 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006871
Illia Bobyra96d5442023-08-30 16:30:15 +02006872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6873printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006874 threadsafe_flag=
6875 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006876 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006877 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006878 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006879 threadsafe_flag="-D_THREAD_SAFE"
6880 thread_lib="-pthread"
6881 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006882 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02006883 threadsafe_flag="-pthreads"
6884 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006885 fi
6886 libs_save_old=$LIBS
6887 if test -n "$threadsafe_flag"; then
6888 cflags_save=$CFLAGS
6889 CFLAGS="$CFLAGS $threadsafe_flag"
6890 LIBS="$LIBS $thread_lib"
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_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6906else $as_nop
6907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6908printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006909
Bram Moolenaar071d4272004-06-13 20:20:40 +00006910fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006911rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006912 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006913 CFLAGS=$cflags_save
6914 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6916printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006917 fi
6918
Illia Bobyra96d5442023-08-30 16:30:15 +02006919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6920printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006921 cflags_save=$CFLAGS
6922 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02006923 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006924 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006926/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006927
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006928int
Illia Bobyra96d5442023-08-30 16:30:15 +02006929main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006930{
6931
6932 ;
6933 return 0;
6934}
6935_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006936if ac_fn_c_try_link "$LINENO"
6937then :
6938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6939printf "%s\n" "yes" >&6; }; python_ok=yes
6940else $as_nop
6941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6942printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006943fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006944rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006945 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006946 CFLAGS=$cflags_save
6947 LIBS=$libs_save
6948 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006949 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006950
6951 else
6952 LIBS=$libs_save_old
6953 PYTHON_SRC=
6954 PYTHON_OBJ=
6955 PYTHON_LIBS=
6956 PYTHON_CFLAGS=
6957 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006958 fi
6959 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6961printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006962 fi
6963 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006964
6965 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006966 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006967 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006968fi
6969
6970
6971
6972
6973
6974
6975
ichizok8bb3fe42021-12-28 15:51:45 +00006976
Illia Bobyra96d5442023-08-30 16:30:15 +02006977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6978printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006979# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006980if test ${enable_python3interp+y}
6981then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006982 enableval=$enable_python3interp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006983else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006984 enable_python3interp="no"
6985fi
6986
Illia Bobyra96d5442023-08-30 16:30:15 +02006987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6988printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006989if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006990 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006991 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006992 fi
6993
Illia Bobyra96d5442023-08-30 16:30:15 +02006994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6995printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006996
6997
6998# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006999if test ${with_python3_command+y}
7000then :
7001 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7002printf "%s\n" "$vi_cv_path_python3" >&6; }
7003else $as_nop
7004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7005printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02007006fi
7007
7008
7009 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007010 for ac_prog in python3 python
7011do
7012 # Extract the first word of "$ac_prog", so it can be a program name with args.
7013set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7015printf %s "checking for $ac_word... " >&6; }
7016if test ${ac_cv_path_vi_cv_path_python3+y}
7017then :
7018 printf %s "(cached) " >&6
7019else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007020 case $vi_cv_path_python3 in
7021 [\\/]* | ?:[\\/]*)
7022 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
7023 ;;
7024 *)
7025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7026for as_dir in $PATH
7027do
7028 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007029 case $as_dir in #(((
7030 '') as_dir=./ ;;
7031 */) ;;
7032 *) as_dir=$as_dir/ ;;
7033 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007034 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007035 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7036 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7037 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007038 break 2
7039 fi
7040done
7041 done
7042IFS=$as_save_IFS
7043
7044 ;;
7045esac
7046fi
7047vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7048if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7050printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007051else
Illia Bobyra96d5442023-08-30 16:30:15 +02007052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7053printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007054fi
7055
7056
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007057 test -n "$vi_cv_path_python3" && break
7058done
7059
Bram Moolenaare1a32312018-04-15 16:03:25 +02007060 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007061 if test "X$vi_cv_path_python3" != "X"; then
7062
Illia Bobyra96d5442023-08-30 16:30:15 +02007063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7064printf %s "checking Python version... " >&6; }
7065if test ${vi_cv_var_python3_version+y}
7066then :
7067 printf %s "(cached) " >&6
7068else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007069 vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007070 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007071
7072fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7074printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007075
Illia Bobyra96d5442023-08-30 16:30:15 +02007076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7077printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007078 if ${vi_cv_path_python3} -c \
7079 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7080 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7082printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007083
Illia Bobyra96d5442023-08-30 16:30:15 +02007084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
7085printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007086
7087
7088# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007089if test ${with_python3_stable_abi+y}
7090then :
7091 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
7092printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
7093else $as_nop
7094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7095printf "%s\n" "no" >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007096fi
7097
7098 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007099 if test ${vi_cv_var_python3_stable_abi_hex+y}
7100then :
7101 printf %s "(cached) " >&6
7102else $as_nop
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007103
7104 vi_cv_var_python3_stable_abi_hex=`
7105 ${vi_cv_path_python3} -c \
7106 "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) ))"`
7107fi
7108
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007109 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007110 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7111 fi
7112 fi
7113
Illia Bobyra96d5442023-08-30 16:30:15 +02007114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7115printf %s "checking Python's abiflags... " >&6; }
7116if test ${vi_cv_var_python3_abiflags+y}
7117then :
7118 printf %s "(cached) " >&6
7119else $as_nop
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007120
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007121 vi_cv_var_python3_abiflags=
7122 if ${vi_cv_path_python3} -c \
7123 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7124 then
7125 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7126 "import sys; print(sys.abiflags)"`
7127 fi
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007128fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007129{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7130printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007131
Illia Bobyra96d5442023-08-30 16:30:15 +02007132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7133printf %s "checking Python's install prefix... " >&6; }
7134if test ${vi_cv_path_python3_pfx+y}
7135then :
7136 printf %s "(cached) " >&6
7137else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007138 vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007139 ${vi_cv_path_python3} -c \
7140 "import sys; print(sys.prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007141fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007142{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7143printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007144
Illia Bobyra96d5442023-08-30 16:30:15 +02007145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7146printf %s "checking Python's execution prefix... " >&6; }
7147if test ${vi_cv_path_python3_epfx+y}
7148then :
7149 printf %s "(cached) " >&6
7150else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007151 vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007152 ${vi_cv_path_python3} -c \
7153 "import sys; print(sys.exec_prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007154fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7156printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007157
Illia Bobyra96d5442023-08-30 16:30:15 +02007158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7159printf %s "checking Python's include path... " >&6; }
7160if test ${vi_cv_path_python3_include+y}
7161then :
7162 printf %s "(cached) " >&6
7163else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007164 vi_cv_path_python3_include=`
7165 ${vi_cv_path_python3} -c \
7166 "import sysconfig; print(sysconfig.get_path(\"include\"))"`
7167fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7169printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007170
Illia Bobyra96d5442023-08-30 16:30:15 +02007171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7172printf %s "checking Python's include path... " >&6; }
7173if test ${vi_cv_path_python3_platinclude+y}
7174then :
7175 printf %s "(cached) " >&6
7176else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007177 vi_cv_path_python3_platinclude=`
7178 ${vi_cv_path_python3} -c \
7179 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"`
7180fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7182printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007183
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007184
Illia Bobyra96d5442023-08-30 16:30:15 +02007185 if test ${vi_cv_path_python3path+y}
7186then :
7187 printf %s "(cached) " >&6
7188else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007189 vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007190 unset PYTHONPATH;
7191 ${vi_cv_path_python3} -c \
7192 "import sys, string; print(':'.join(sys.path))"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007193fi
7194
7195
7196
7197
7198# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007199if test ${with_python3_config_dir+y}
7200then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007201 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007202fi
7203
7204
Illia Bobyra96d5442023-08-30 16:30:15 +02007205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7206printf %s "checking Python's configuration directory... " >&6; }
7207if test ${vi_cv_path_python3_conf+y}
7208then :
7209 printf %s "(cached) " >&6
7210else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007211
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007212 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007213 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007214 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7215 if test "x$d" = "x"; then
7216 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7217 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007218 if test -d "$d" && test -f "$d/config.c"; then
7219 vi_cv_path_python3_conf="$d"
7220 else
7221 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7222 for subdir in lib64 lib share; do
7223 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7224 if test -d "$d" && test -f "$d/config.c"; then
7225 vi_cv_path_python3_conf="$d"
7226 fi
7227 done
7228 done
7229 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007230
7231fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7233printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007234
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007235 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007236
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007237 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7239printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007240 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007241
Illia Bobyra96d5442023-08-30 16:30:15 +02007242 if test ${vi_cv_path_python3_plibs+y}
7243then :
7244 printf %s "(cached) " >&6
7245else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007246
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007247 pwd=`pwd`
7248 tmp_mkf="$pwd/config-PyMake$$"
7249 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007250__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007251 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007252 @echo "python3_LIBS='$(LIBS)'"
7253 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007254 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007255 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007256 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007257eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007258 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7259 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007260 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 +02007261 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7262 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7263 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
7264
7265fi
7266
Illia Bobyra96d5442023-08-30 16:30:15 +02007267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7268printf %s "checking Python3's dll name... " >&6; }
7269if test ${vi_cv_dll_name_python3+y}
7270then :
7271 printf %s "(cached) " >&6
7272else $as_nop
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007273
7274 if test "X$python3_DLLLIBRARY" != "X"; then
7275 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007276 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7277 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007278 else
7279 vi_cv_dll_name_python3="$python3_INSTSONAME"
7280 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007281
7282fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7284printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007285
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007286 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007287 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7288 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007289 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007290 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007291 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007292 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7293 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7294 fi
7295 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7296 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7297 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007298 PYTHON3_SRC="if_python3.c"
7299 PYTHON3_OBJ="objects/if_python3.o"
7300
Illia Bobyra96d5442023-08-30 16:30:15 +02007301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7302printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007303 threadsafe_flag=
7304 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007305 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007306 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007307 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007308 threadsafe_flag="-D_THREAD_SAFE"
7309 thread_lib="-pthread"
7310 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007311 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007312 threadsafe_flag="-pthreads"
7313 fi
7314 fi
7315 libs_save_old=$LIBS
7316 if test -n "$threadsafe_flag"; then
7317 cflags_save=$CFLAGS
7318 CFLAGS="$CFLAGS $threadsafe_flag"
7319 LIBS="$LIBS $thread_lib"
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_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
7335else $as_nop
7336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007338
7339fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007340rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007341 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007342 CFLAGS=$cflags_save
7343 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7345printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007346 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007347
Illia Bobyra96d5442023-08-30 16:30:15 +02007348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7349printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007350 cflags_save=$CFLAGS
7351 libs_save=$LIBS
7352 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7353 LIBS="$LIBS $PYTHON3_LIBS"
7354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007355/* end confdefs.h. */
7356
7357int
Illia Bobyra96d5442023-08-30 16:30:15 +02007358main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007359{
7360
7361 ;
7362 return 0;
7363}
7364_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007365if ac_fn_c_try_link "$LINENO"
7366then :
7367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7368printf "%s\n" "yes" >&6; }; python3_ok=yes
7369else $as_nop
7370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7371printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007372fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007373rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007374 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007375 CFLAGS=$cflags_save
7376 LIBS=$libs_save
7377 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007378 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007379
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007380 else
7381 LIBS=$libs_save_old
7382 PYTHON3_SRC=
7383 PYTHON3_OBJ=
7384 PYTHON3_LIBS=
7385 PYTHON3_CFLAGS=
7386 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007387 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007388 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7390printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007391 fi
7392 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007393 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007394 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007395 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007396fi
7397
7398
7399
7400
7401
7402
ichizok8bb3fe42021-12-28 15:51:45 +00007403
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007404if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007405 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007406
Illia Bobyra96d5442023-08-30 16:30:15 +02007407 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007408
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007409 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007410 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007411
7412 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7414printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007415 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007416 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007417 libs_save=$LIBS
7418 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007419 if test "$cross_compiling" = yes
7420then :
7421 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7422printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007423as_fn_error $? "cannot run test program while cross compiling
7424See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007425else $as_nop
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7427/* end confdefs.h. */
7428
7429 #include <dlfcn.h>
7430 /* If this program fails, then RTLD_GLOBAL is needed.
7431 * RTLD_GLOBAL will be used and then it is not possible to
7432 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007433 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007434 */
7435
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007436 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007437 {
7438 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007439 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007440 if (pylib != 0)
7441 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007442 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007443 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7444 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7445 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007446 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007447 (*init)();
7448 needed = (*simple)("import termios") == -1;
7449 (*final)();
7450 dlclose(pylib);
7451 }
7452 return !needed;
7453 }
7454
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007455 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007456 {
7457 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007458 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007459 not_needed = 1;
7460 return !not_needed;
7461 }
7462_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007463if ac_fn_c_try_run "$LINENO"
7464then :
7465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7466printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007467
Illia Bobyra96d5442023-08-30 16:30:15 +02007468else $as_nop
7469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7470printf "%s\n" "no" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007471fi
7472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7473 conftest.$ac_objext conftest.beam conftest.$ac_ext
7474fi
7475
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007476
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007477 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007478 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007479
Illia Bobyra96d5442023-08-30 16:30:15 +02007480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7481printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007482 cflags_save=$CFLAGS
7483 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007484 libs_save=$LIBS
7485 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007486 if test "$cross_compiling" = yes
7487then :
7488 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7489printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007490as_fn_error $? "cannot run test program while cross compiling
7491See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007492else $as_nop
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7494/* end confdefs.h. */
7495
7496 #include <dlfcn.h>
7497 #include <wchar.h>
7498 /* If this program fails, then RTLD_GLOBAL is needed.
7499 * RTLD_GLOBAL will be used and then it is not possible to
7500 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007501 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007502 */
7503
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007504 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007505 {
7506 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007507 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007508 if (pylib != 0)
7509 {
7510 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7511 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7512 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7513 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7514 (*pfx)(prefix);
7515 (*init)();
7516 needed = (*simple)("import termios") == -1;
7517 (*final)();
7518 dlclose(pylib);
7519 }
7520 return !needed;
7521 }
7522
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007523 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007524 {
7525 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007526 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007527 not_needed = 1;
7528 return !not_needed;
7529 }
7530_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007531if ac_fn_c_try_run "$LINENO"
7532then :
7533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7534printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007535
Illia Bobyra96d5442023-08-30 16:30:15 +02007536else $as_nop
7537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7538printf "%s\n" "no" >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007539fi
7540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7541 conftest.$ac_objext conftest.beam conftest.$ac_ext
7542fi
7543
7544
7545 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007546 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007547
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007548 PYTHON_SRC="if_python.c"
7549 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007550 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007551 PYTHON_LIBS=
7552 PYTHON3_SRC="if_python3.c"
7553 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007554 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007555 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007556elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007557 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007558
7559 PYTHON_SRC="if_python.c"
7560 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007561 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007562 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007563elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7565printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007566 cflags_save=$CFLAGS
7567 libs_save=$LIBS
7568 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7569 LIBS="$LIBS $PYTHON_LIBS"
7570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7571/* end confdefs.h. */
7572
7573int
Illia Bobyra96d5442023-08-30 16:30:15 +02007574main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007575{
7576
7577 ;
7578 return 0;
7579}
7580_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007581if ac_fn_c_try_link "$LINENO"
7582then :
7583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7584printf "%s\n" "yes" >&6; }; fpie_ok=yes
7585else $as_nop
7586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007588fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007589rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007590 conftest$ac_exeext conftest.$ac_ext
7591 CFLAGS=$cflags_save
7592 LIBS=$libs_save
7593 if test $fpie_ok = yes; then
7594 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7595 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007596elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007597 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007598
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007599 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007600 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007601
7602 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007603 PYTHON3_SRC="if_python3.c"
7604 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007605 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007606 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007607elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7609printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007610 cflags_save=$CFLAGS
7611 libs_save=$LIBS
7612 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7613 LIBS="$LIBS $PYTHON3_LIBS"
7614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7615/* end confdefs.h. */
7616
7617int
Illia Bobyra96d5442023-08-30 16:30:15 +02007618main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007619{
7620
7621 ;
7622 return 0;
7623}
7624_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007625if ac_fn_c_try_link "$LINENO"
7626then :
7627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7628printf "%s\n" "yes" >&6; }; fpie_ok=yes
7629else $as_nop
7630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7631printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007632fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007633rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007634 conftest$ac_exeext conftest.$ac_ext
7635 CFLAGS=$cflags_save
7636 LIBS=$libs_save
7637 if test $fpie_ok = yes; then
7638 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7639 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007640fi
7641
Illia Bobyra96d5442023-08-30 16:30:15 +02007642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7643printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007644# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007645if test ${enable_tclinterp+y}
7646then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007647 enableval=$enable_tclinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007648else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007649 enable_tclinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007650fi
7651
Illia Bobyra96d5442023-08-30 16:30:15 +02007652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7653printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007654
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007655if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007656
Illia Bobyra96d5442023-08-30 16:30:15 +02007657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7658printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007659
Bram Moolenaar446cb832008-06-24 21:56:24 +00007660# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007661if test ${with_tclsh+y}
7662then :
7663 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7664printf "%s\n" "$tclsh_name" >&6; }
7665else $as_nop
7666 tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7667printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007668fi
7669
Bram Moolenaar071d4272004-06-13 20:20:40 +00007670 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7671set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673printf %s "checking for $ac_word... " >&6; }
7674if test ${ac_cv_path_vi_cv_path_tcl+y}
7675then :
7676 printf %s "(cached) " >&6
7677else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007678 case $vi_cv_path_tcl in
7679 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007680 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7681 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007682 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007687 case $as_dir in #(((
7688 '') as_dir=./ ;;
7689 */) ;;
7690 *) as_dir=$as_dir/ ;;
7691 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007692 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007693 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7694 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7695 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007696 break 2
7697 fi
7698done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007699 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007700IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007701
Bram Moolenaar071d4272004-06-13 20:20:40 +00007702 ;;
7703esac
7704fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007705vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007706if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7708printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007709else
Illia Bobyra96d5442023-08-30 16:30:15 +02007710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7711printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007712fi
7713
Bram Moolenaar071d4272004-06-13 20:20:40 +00007714
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007715
Bram Moolenaar446cb832008-06-24 21:56:24 +00007716
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007717 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7718 tclsh_name="tclsh8.4"
7719 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7720set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7722printf %s "checking for $ac_word... " >&6; }
7723if test ${ac_cv_path_vi_cv_path_tcl+y}
7724then :
7725 printf %s "(cached) " >&6
7726else $as_nop
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007727 case $vi_cv_path_tcl in
7728 [\\/]* | ?:[\\/]*)
7729 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7730 ;;
7731 *)
7732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7733for as_dir in $PATH
7734do
7735 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007736 case $as_dir in #(((
7737 '') as_dir=./ ;;
7738 */) ;;
7739 *) as_dir=$as_dir/ ;;
7740 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007741 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007742 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7743 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7744 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007745 break 2
7746 fi
7747done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007748 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007749IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007750
7751 ;;
7752esac
7753fi
7754vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007755if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7757printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007758else
Illia Bobyra96d5442023-08-30 16:30:15 +02007759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7760printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007761fi
7762
Bram Moolenaar446cb832008-06-24 21:56:24 +00007763
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007764 fi
7765 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007766 tclsh_name="tclsh8.2"
7767 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7768set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7770printf %s "checking for $ac_word... " >&6; }
7771if test ${ac_cv_path_vi_cv_path_tcl+y}
7772then :
7773 printf %s "(cached) " >&6
7774else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007775 case $vi_cv_path_tcl in
7776 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007777 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7778 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007779 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7781for as_dir in $PATH
7782do
7783 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007784 case $as_dir in #(((
7785 '') as_dir=./ ;;
7786 */) ;;
7787 *) as_dir=$as_dir/ ;;
7788 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007789 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007790 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7791 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7792 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007793 break 2
7794 fi
7795done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007796 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007797IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007798
Bram Moolenaar071d4272004-06-13 20:20:40 +00007799 ;;
7800esac
7801fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007802vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007803if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7805printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007806else
Illia Bobyra96d5442023-08-30 16:30:15 +02007807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7808printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007809fi
7810
Bram Moolenaar446cb832008-06-24 21:56:24 +00007811
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007812 fi
7813 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7814 tclsh_name="tclsh8.0"
7815 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7816set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7818printf %s "checking for $ac_word... " >&6; }
7819if test ${ac_cv_path_vi_cv_path_tcl+y}
7820then :
7821 printf %s "(cached) " >&6
7822else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007823 case $vi_cv_path_tcl in
7824 [\\/]* | ?:[\\/]*)
7825 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7826 ;;
7827 *)
7828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7829for as_dir in $PATH
7830do
7831 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007832 case $as_dir in #(((
7833 '') as_dir=./ ;;
7834 */) ;;
7835 *) as_dir=$as_dir/ ;;
7836 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007837 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007838 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7839 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7840 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007841 break 2
7842 fi
7843done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007844 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007845IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007846
7847 ;;
7848esac
7849fi
7850vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007851if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7853printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007854else
Illia Bobyra96d5442023-08-30 16:30:15 +02007855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007857fi
7858
Bram Moolenaar446cb832008-06-24 21:56:24 +00007859
Bram Moolenaar071d4272004-06-13 20:20:40 +00007860 fi
7861 if test "X$vi_cv_path_tcl" = "X"; then
7862 tclsh_name="tclsh"
7863 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7864set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7866printf %s "checking for $ac_word... " >&6; }
7867if test ${ac_cv_path_vi_cv_path_tcl+y}
7868then :
7869 printf %s "(cached) " >&6
7870else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007871 case $vi_cv_path_tcl in
7872 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007873 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7874 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007875 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7877for as_dir in $PATH
7878do
7879 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007880 case $as_dir in #(((
7881 '') as_dir=./ ;;
7882 */) ;;
7883 *) as_dir=$as_dir/ ;;
7884 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007885 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007886 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7887 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7888 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007889 break 2
7890 fi
7891done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007892 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007893IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007894
Bram Moolenaar071d4272004-06-13 20:20:40 +00007895 ;;
7896esac
7897fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007898vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007899if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7901printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007902else
Illia Bobyra96d5442023-08-30 16:30:15 +02007903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7904printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007905fi
7906
Bram Moolenaar446cb832008-06-24 21:56:24 +00007907
Bram Moolenaar071d4272004-06-13 20:20:40 +00007908 fi
7909 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7911printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007912 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007913 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02007914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7915printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00007916 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 +01007917 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007918
Illia Bobyra96d5442023-08-30 16:30:15 +02007919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7920printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007921 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00007922 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 +00007923 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007924 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 +00007925 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00007926 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00007927 for try in $tclinc; do
7928 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7930printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007931 TCL_INC=$try
7932 break
7933 fi
7934 done
7935 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7937printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007938 SKIP_TCL=YES
7939 fi
7940 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7942printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007943 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007944 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007945 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007946 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007947 tclcnf=`echo $tclinc | sed s/include/lib/g`
7948 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007949 fi
7950 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01007951 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7953printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007954 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007955 if test "$enable_tclinterp" = "dynamic"; then
7956 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7957 else
7958 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7959 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00007960 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 +00007961 break
7962 fi
7963 done
7964 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7966printf "%s\n" "<not found>" >&6; }
7967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7968printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007969 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007970 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007971 for ext in .so .a ; do
7972 for ver in "" $tclver ; do
7973 for try in $tcllib ; do
7974 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01007975 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7977printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007978 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007979 if test "$vim_cv_uname_output" = SunOS &&
7980 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007981 TCL_LIBS="$TCL_LIBS -R $try"
7982 fi
7983 break 3
7984 fi
7985 done
7986 done
7987 done
7988 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7990printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007991 SKIP_TCL=YES
7992 fi
7993 fi
7994 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007995 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007996
7997 TCL_SRC=if_tcl.c
7998 TCL_OBJ=objects/if_tcl.o
7999 TCL_PRO=if_tcl.pro
8000 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
8001 fi
8002 fi
8003 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
8005printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008006 fi
8007 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008008 if test "$enable_tclinterp" = "dynamic"; then
8009 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008010 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008011
8012 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
8013 fi
8014 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008015 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008016 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008017 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008018fi
8019
8020
8021
8022
8023
8024
ichizok8bb3fe42021-12-28 15:51:45 +00008025
Illia Bobyra96d5442023-08-30 16:30:15 +02008026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
8027printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008028# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008029if test ${enable_rubyinterp+y}
8030then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008031 enableval=$enable_rubyinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02008032else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008033 enable_rubyinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008034fi
8035
Illia Bobyra96d5442023-08-30 16:30:15 +02008036{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8037printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008038if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008039 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008040 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008041 fi
8042
Illia Bobyra96d5442023-08-30 16:30:15 +02008043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8044printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008045
Bram Moolenaar948733a2011-05-05 18:10:16 +02008046
Bram Moolenaar165641d2010-02-17 16:23:09 +01008047# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008048if test ${with_ruby_command+y}
8049then :
8050 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8051printf "%s\n" "$RUBY_CMD" >&6; }
8052else $as_nop
8053 RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8054printf "%s\n" "defaulting to $RUBY_CMD" >&6; }
Bram Moolenaar165641d2010-02-17 16:23:09 +01008055fi
8056
Bram Moolenaar165641d2010-02-17 16:23:09 +01008057 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8058set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060printf %s "checking for $ac_word... " >&6; }
8061if test ${ac_cv_path_vi_cv_path_ruby+y}
8062then :
8063 printf %s "(cached) " >&6
8064else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008065 case $vi_cv_path_ruby in
8066 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008067 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8068 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008069 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8071for as_dir in $PATH
8072do
8073 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008074 case $as_dir in #(((
8075 '') as_dir=./ ;;
8076 */) ;;
8077 *) as_dir=$as_dir/ ;;
8078 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008079 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008080 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8081 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8082 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008083 break 2
8084 fi
8085done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008086 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008087IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008088
Bram Moolenaar071d4272004-06-13 20:20:40 +00008089 ;;
8090esac
8091fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008092vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008093if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8095printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008096else
Illia Bobyra96d5442023-08-30 16:30:15 +02008097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8098printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008099fi
8100
Bram Moolenaar446cb832008-06-24 21:56:24 +00008101
Bram Moolenaar071d4272004-06-13 20:20:40 +00008102 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8104printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008105 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 +02008106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8107printf "%s\n" "OK" >&6; }
8108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8109printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008110 ruby_rbconfig="RbConfig"
8111 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8112 ruby_rbconfig="Config"
8113 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8115printf "%s\n" "$ruby_rbconfig" >&6; }
8116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8117printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008118 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 +00008119 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8121printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008122 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008123 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8124 if test -d "$rubyarchdir"; then
8125 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008126 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008127 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008128 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008129 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008130 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008131 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008132 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008133 if test "X$rubylibs" != "X"; then
8134 RUBY_LIBS="$rubylibs"
8135 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008136 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8137 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008138 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Illia Bobyre379e212023-09-30 22:59:27 +02008139 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby" >/dev/null; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008140 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8141 elif test "$librubyarg" = "libruby.a"; then
8142 librubyarg="-lruby"
8143 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008144 fi
8145
8146 if test "X$librubyarg" != "X"; then
8147 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8148 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008149
8150
Bram Moolenaar071d4272004-06-13 20:20:40 +00008151 RUBY_SRC="if_ruby.c"
8152 RUBY_OBJ="objects/if_ruby.o"
8153 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008154 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008155
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008156 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008157 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008158 if test -z "$libruby_soname"; then
8159 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8160 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008161 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008162
Bram Moolenaar41a41412020-01-07 21:32:19 +01008163 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008164 RUBY_LIBS=
8165 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008166 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8167 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8168 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008169 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8171printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008172 fi
8173 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8175printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008176 fi
8177 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008178
8179 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008180 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008181 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008182fi
8183
8184
8185
8186
8187
8188
ichizok8bb3fe42021-12-28 15:51:45 +00008189
Illia Bobyra96d5442023-08-30 16:30:15 +02008190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8191printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008192# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008193if test ${enable_cscope+y}
8194then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008195 enableval=$enable_cscope;
Illia Bobyra96d5442023-08-30 16:30:15 +02008196else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008197 enable_cscope="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008198fi
8199
Illia Bobyra96d5442023-08-30 16:30:15 +02008200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8201printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008202if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008203 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008204
8205fi
8206
Illia Bobyra96d5442023-08-30 16:30:15 +02008207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8208printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008209# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008210if test ${enable_netbeans+y}
8211then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008212 enableval=$enable_netbeans;
Illia Bobyra96d5442023-08-30 16:30:15 +02008213else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008214 enable_netbeans="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008215fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008216
Bram Moolenaar446cb832008-06-24 21:56:24 +00008217if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008218 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8220printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008221 enable_netbeans="no"
8222 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8224printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008225 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008226else
Illia Bobyra96d5442023-08-30 16:30:15 +02008227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8228printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008229fi
8230
Illia Bobyra96d5442023-08-30 16:30:15 +02008231{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8232printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008233# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008234if test ${enable_channel+y}
8235then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008236 enableval=$enable_channel;
Illia Bobyra96d5442023-08-30 16:30:15 +02008237else $as_nop
Bram Moolenaare0874f82016-01-24 20:36:41 +01008238 enable_channel="yes"
8239fi
8240
8241if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008242 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8244printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008245 enable_channel="no"
8246 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8248printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008249 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008250else
Bram Moolenaar16435482016-01-24 21:31:54 +01008251 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8253printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008254 enable_netbeans="no"
8255 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8257printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008258 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008259fi
8260
Bram Moolenaar16435482016-01-24 21:31:54 +01008261if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008262 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8264printf %s "checking for socket in -lnetwork... " >&6; }
8265if test ${ac_cv_lib_network_socket+y}
8266then :
8267 printf %s "(cached) " >&6
8268else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008269 ac_check_lib_save_LIBS=$LIBS
8270LIBS="-lnetwork $LIBS"
8271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8272/* end confdefs.h. */
8273
8274/* Override any GCC internal prototype to avoid an error.
8275 Use char because int might match the return type of a GCC
8276 builtin and then its argument prototype would still apply. */
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008277char socket ();
8278int
Illia Bobyra96d5442023-08-30 16:30:15 +02008279main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008280{
8281return socket ();
8282 ;
8283 return 0;
8284}
8285_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008286if ac_fn_c_try_link "$LINENO"
8287then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008288 ac_cv_lib_network_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008289else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008290 ac_cv_lib_network_socket=no
8291fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008292rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008293 conftest$ac_exeext conftest.$ac_ext
8294LIBS=$ac_check_lib_save_LIBS
8295fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8297printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8298if test "x$ac_cv_lib_network_socket" = xyes
8299then :
8300 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008301
8302 LIBS="-lnetwork $LIBS"
8303
8304fi
8305
8306 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8308printf %s "checking for socket in -lsocket... " >&6; }
8309if test ${ac_cv_lib_socket_socket+y}
8310then :
8311 printf %s "(cached) " >&6
8312else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008313 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008314LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008316/* end confdefs.h. */
8317
Bram Moolenaar446cb832008-06-24 21:56:24 +00008318/* Override any GCC internal prototype to avoid an error.
8319 Use char because int might match the return type of a GCC
8320 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008321char socket ();
8322int
Illia Bobyra96d5442023-08-30 16:30:15 +02008323main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008324{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008325return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008326 ;
8327 return 0;
8328}
8329_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008330if ac_fn_c_try_link "$LINENO"
8331then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008332 ac_cv_lib_socket_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008333else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008334 ac_cv_lib_socket_socket=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008335fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008336rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008337 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008338LIBS=$ac_check_lib_save_LIBS
8339fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8341printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8342if test "x$ac_cv_lib_socket_socket" = xyes
8343then :
8344 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008345
8346 LIBS="-lsocket $LIBS"
8347
Bram Moolenaar071d4272004-06-13 20:20:40 +00008348fi
8349
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008350 fi
8351
Illia Bobyra96d5442023-08-30 16:30:15 +02008352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8353printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8354if test ${vim_cv_ipv6_networking+y}
8355then :
8356 printf %s "(cached) " >&6
8357else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8359/* end confdefs.h. */
8360
8361#include <stdio.h>
8362#include <stdlib.h>
8363#include <stdarg.h>
8364#include <fcntl.h>
8365#include <netdb.h>
8366#include <netinet/in.h>
8367#include <errno.h>
8368#include <sys/types.h>
8369#include <sys/socket.h>
8370 /* Check bitfields */
8371 struct nbbuf {
8372 unsigned int initDone:1;
8373 unsigned short signmaplen;
8374 };
8375
8376int
Illia Bobyra96d5442023-08-30 16:30:15 +02008377main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008378{
8379
8380 /* Check creating a socket. */
8381 struct sockaddr_in server;
8382 struct addrinfo *res;
8383 (void)socket(AF_INET, SOCK_STREAM, 0);
8384 (void)htons(100);
8385 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8386 if (errno == ECONNREFUSED)
8387 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8388 (void)freeaddrinfo(res);
8389
8390 ;
8391 return 0;
8392}
8393_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008394if ac_fn_c_try_link "$LINENO"
8395then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008396 vim_cv_ipv6_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008397else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008398 vim_cv_ipv6_networking="no"
8399fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008400rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008401 conftest$ac_exeext conftest.$ac_ext
8402fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8404printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008405
8406 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008407 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008408
Illia Bobyra96d5442023-08-30 16:30:15 +02008409 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8410if test "x$ac_cv_func_inet_ntop" = xyes
8411then :
8412 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008413
8414fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008415
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008416 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8418printf %s "checking for gethostbyname in -lnsl... " >&6; }
8419if test ${ac_cv_lib_nsl_gethostbyname+y}
8420then :
8421 printf %s "(cached) " >&6
8422else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008423 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008424LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008426/* end confdefs.h. */
8427
Bram Moolenaar446cb832008-06-24 21:56:24 +00008428/* Override any GCC internal prototype to avoid an error.
8429 Use char because int might match the return type of a GCC
8430 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008431char gethostbyname ();
8432int
Illia Bobyra96d5442023-08-30 16:30:15 +02008433main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008434{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008435return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008436 ;
8437 return 0;
8438}
8439_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008440if ac_fn_c_try_link "$LINENO"
8441then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008442 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008443else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008444 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008445fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008446rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008447 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008448LIBS=$ac_check_lib_save_LIBS
8449fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8451printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8452if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8453then :
8454 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008455
8456 LIBS="-lnsl $LIBS"
8457
Bram Moolenaar071d4272004-06-13 20:20:40 +00008458fi
8459
Illia Bobyra96d5442023-08-30 16:30:15 +02008460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8461printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8462if test ${vim_cv_ipv4_networking+y}
8463then :
8464 printf %s "(cached) " >&6
8465else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008467/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008468
8469#include <stdio.h>
8470#include <stdlib.h>
8471#include <stdarg.h>
8472#include <fcntl.h>
8473#include <netdb.h>
8474#include <netinet/in.h>
8475#include <errno.h>
8476#include <sys/types.h>
8477#include <sys/socket.h>
8478 /* Check bitfields */
8479 struct nbbuf {
8480 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008481 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008482 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008483
8484int
Illia Bobyra96d5442023-08-30 16:30:15 +02008485main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008486{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008487
8488 /* Check creating a socket. */
8489 struct sockaddr_in server;
8490 (void)socket(AF_INET, SOCK_STREAM, 0);
8491 (void)htons(100);
8492 (void)gethostbyname("microsoft.com");
8493 if (errno == ECONNREFUSED)
8494 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008495
8496 ;
8497 return 0;
8498}
8499_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008500if ac_fn_c_try_link "$LINENO"
8501then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008502 vim_cv_ipv4_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008503else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008504 vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008505fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008506rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008507 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00008508fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008509{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8510printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008511 fi
8512fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008513if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008514 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008515
8516 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008517
Bram Moolenaar071d4272004-06-13 20:20:40 +00008518 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008519
Bram Moolenaar071d4272004-06-13 20:20:40 +00008520fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008521if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008522 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008523
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008524 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008525
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008526 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008527
8528fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008529
Illia Bobyra96d5442023-08-30 16:30:15 +02008530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8531printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008532# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008533if test ${enable_terminal+y}
8534then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008535 enableval=$enable_terminal;
Illia Bobyra96d5442023-08-30 16:30:15 +02008536else $as_nop
Bram Moolenaar595a4022017-09-03 19:15:57 +02008537 enable_terminal="auto"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008538fi
8539
Bram Moolenaar595a4022017-09-03 19:15:57 +02008540if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008541 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8543printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008544 enable_terminal="no"
8545 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008546 if test "$enable_terminal" = "auto"; then
8547 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8549printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008550 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8552printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008553 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008554 fi
8555else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008556 if test "$enable_terminal" = "auto"; then
8557 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8559printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008560 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8562printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008563 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008564fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008565if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008566 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008567
Bram Moolenaar93268052019-10-10 13:22:54 +02008568 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 +02008569
Bram Moolenaar93268052019-10-10 13:22:54 +02008570 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 +02008571
Bram Moolenaar823edd12019-10-23 22:35:36 +02008572 TERM_TEST="test_libvterm"
8573
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008574fi
8575
Illia Bobyra96d5442023-08-30 16:30:15 +02008576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8577printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008578# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008579if test ${enable_autoservername+y}
8580then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008581 enableval=$enable_autoservername;
Illia Bobyra96d5442023-08-30 16:30:15 +02008582else $as_nop
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008583 enable_autoservername="no"
8584fi
8585
Illia Bobyra96d5442023-08-30 16:30:15 +02008586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8587printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008588if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008589 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008590
8591fi
8592
Illia Bobyra96d5442023-08-30 16:30:15 +02008593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8594printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008595# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008596if test ${enable_multibyte+y}
8597then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008598 enableval=$enable_multibyte;
Illia Bobyra96d5442023-08-30 16:30:15 +02008599else $as_nop
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008600 enable_multibyte="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008601fi
8602
Illia Bobyra96d5442023-08-30 16:30:15 +02008603{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8604printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008605if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008606 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8607 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008608fi
8609
Illia Bobyra96d5442023-08-30 16:30:15 +02008610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8611printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008612# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008613if test ${enable_rightleft+y}
8614then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008615 enableval=$enable_rightleft;
Illia Bobyra96d5442023-08-30 16:30:15 +02008616else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008617 enable_rightleft="yes"
8618fi
8619
8620if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8622printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008623else
Illia Bobyra96d5442023-08-30 16:30:15 +02008624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8625printf "%s\n" "yes" >&6; }
8626 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008627
8628fi
8629
Illia Bobyra96d5442023-08-30 16:30:15 +02008630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8631printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008632# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008633if test ${enable_arabic+y}
8634then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008635 enableval=$enable_arabic;
Illia Bobyra96d5442023-08-30 16:30:15 +02008636else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008637 enable_arabic="yes"
8638fi
8639
8640if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8642printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008643else
Illia Bobyra96d5442023-08-30 16:30:15 +02008644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8645printf "%s\n" "yes" >&6; }
8646 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008647
8648fi
8649
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008650# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008651if test ${enable_farsi+y}
8652then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008653 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008654fi
8655
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008656
Illia Bobyra96d5442023-08-30 16:30:15 +02008657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8658printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008659# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008660if test ${enable_xim+y}
8661then :
8662 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8663printf "%s\n" "$enable_xim" >&6; }
8664else $as_nop
8665 enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8666printf "%s\n" "defaulting to auto" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008667fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008668
Bram Moolenaar446cb832008-06-24 21:56:24 +00008669
Illia Bobyra96d5442023-08-30 16:30:15 +02008670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8671printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008672# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008673if test ${enable_fontset+y}
8674then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008675 enableval=$enable_fontset;
Illia Bobyra96d5442023-08-30 16:30:15 +02008676else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008677 enable_fontset="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008678fi
8679
Illia Bobyra96d5442023-08-30 16:30:15 +02008680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8681printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008682
8683test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02008684test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00008685if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8687printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008688else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008689
Bram Moolenaar071d4272004-06-13 20:20:40 +00008690 # Extract the first word of "xmkmf", so it can be a program name with args.
8691set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693printf %s "checking for $ac_word... " >&6; }
8694if test ${ac_cv_path_xmkmfpath+y}
8695then :
8696 printf %s "(cached) " >&6
8697else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008698 case $xmkmfpath in
8699 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008700 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8701 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008702 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704for as_dir in $PATH
8705do
8706 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008707 case $as_dir in #(((
8708 '') as_dir=./ ;;
8709 */) ;;
8710 *) as_dir=$as_dir/ ;;
8711 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008712 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008713 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8714 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
8715 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008716 break 2
8717 fi
8718done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008719 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008720IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008721
Bram Moolenaar071d4272004-06-13 20:20:40 +00008722 ;;
8723esac
8724fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008725xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00008726if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8728printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008729else
Illia Bobyra96d5442023-08-30 16:30:15 +02008730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8731printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008732fi
8733
8734
Bram Moolenaar446cb832008-06-24 21:56:24 +00008735
Illia Bobyra96d5442023-08-30 16:30:15 +02008736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8737printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008738
Bram Moolenaar071d4272004-06-13 20:20:40 +00008739
Bram Moolenaar446cb832008-06-24 21:56:24 +00008740# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008741if test ${with_x+y}
8742then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008743 withval=$with_x;
8744fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008745
8746# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8747if test "x$with_x" = xno; then
8748 # The user explicitly disabled X.
8749 have_x=disabled
8750else
Bram Moolenaar446cb832008-06-24 21:56:24 +00008751 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01008752 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008753 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8754then :
8755 printf %s "(cached) " >&6
8756else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008757 # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02008758ac_x_includes=no
8759ac_x_libraries=no
8760# Do we need to do anything special at all?
8761ac_save_LIBS=$LIBS
8762LIBS="-lX11 $LIBS"
8763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8764/* end confdefs.h. */
8765#include <X11/Xlib.h>
8766int
8767main (void)
8768{
8769XrmInitialize ()
8770 ;
8771 return 0;
8772}
8773_ACEOF
8774if ac_fn_c_try_link "$LINENO"
8775then :
8776 # We can compile and link X programs with no special options.
8777 ac_x_includes=
8778 ac_x_libraries=
8779fi
8780rm -f core conftest.err conftest.$ac_objext conftest.beam \
8781 conftest$ac_exeext conftest.$ac_ext
8782LIBS="$ac_save_LIBS"
8783# If that didn't work, only try xmkmf and file system searches
8784# for native compilation.
8785if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8786then :
8787 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008788if mkdir conftest.dir; then
8789 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008790 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00008791incroot:
8792 @echo incroot='${INCROOT}'
8793usrlibdir:
8794 @echo usrlibdir='${USRLIBDIR}'
8795libdir:
8796 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008797_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00008798 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008799 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008800 for ac_var in incroot usrlibdir libdir; do
8801 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8802 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008803 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008804 for ac_extension in a so sl dylib la dll; do
8805 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8806 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008807 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00008808 fi
8809 done
8810 # Screen out bogus values from the imake configuration. They are
8811 # bogus both because they are the default anyway, and because
8812 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008813 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00008814 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008815 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008816 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008817 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00008818 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008819 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008820 esac
8821 fi
8822 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00008823 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00008824fi
8825
Illia Bobyra96d5442023-08-30 16:30:15 +02008826 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008827# Check X11 before X11Rn because it is often a symlink to the current release.
8828ac_x_header_dirs='
8829/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008830/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008831/usr/X11R6/include
8832/usr/X11R5/include
8833/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00008834
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008835/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008836/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008837/usr/include/X11R6
8838/usr/include/X11R5
8839/usr/include/X11R4
8840
8841/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008842/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008843/usr/local/X11R6/include
8844/usr/local/X11R5/include
8845/usr/local/X11R4/include
8846
8847/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008848/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008849/usr/local/include/X11R6
8850/usr/local/include/X11R5
8851/usr/local/include/X11R4
8852
Illia Bobyra96d5442023-08-30 16:30:15 +02008853/opt/X11/include
8854
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008855/usr/X386/include
8856/usr/x386/include
8857/usr/XFree86/include/X11
8858
8859/usr/include
8860/usr/local/include
8861/usr/unsupported/include
8862/usr/athena/include
8863/usr/local/x11r5/include
8864/usr/lpp/Xamples/include
8865
8866/usr/openwin/include
8867/usr/openwin/share/include'
8868
8869if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008870 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008871 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008873/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008874#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008875_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008876if ac_fn_c_try_cpp "$LINENO"
8877then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00008878 # We can compile using X headers with no special include directory.
8879ac_x_includes=
Illia Bobyra96d5442023-08-30 16:30:15 +02008880else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008881 for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00008882 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008883 ac_x_includes=$ac_dir
8884 break
8885 fi
8886done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008887fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01008888rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008889fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008890
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008891if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008892 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008893 # See if we find them without any special options.
8894 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008895 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00008896 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008898/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008899#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008900int
Illia Bobyra96d5442023-08-30 16:30:15 +02008901main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008902{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008903XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008904 ;
8905 return 0;
8906}
8907_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008908if ac_fn_c_try_link "$LINENO"
8909then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008910 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008911# We can link X programs with no special library path.
8912ac_x_libraries=
Illia Bobyra96d5442023-08-30 16:30:15 +02008913else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008914 LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02008915for 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 +00008916do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008917 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00008918 for ac_extension in a so sl dylib la dll; do
8919 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008920 ac_x_libraries=$ac_dir
8921 break 2
8922 fi
8923 done
8924done
8925fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008926rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008927 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008928fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008929
Illia Bobyra96d5442023-08-30 16:30:15 +02008930fi
8931# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008932case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008933 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008934 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02008935 ac_cv_have_x="have_x=no" ;; #(
8936 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008937 # Record where we found X for the cache.
8938 ac_cv_have_x="have_x=yes\
8939 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02008940 ac_x_libraries='$ac_x_libraries'" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00008941esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008942fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00008943;; #(
8944 *) have_x=yes;;
8945 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008946 eval "$ac_cv_have_x"
8947fi # $with_x != no
8948
8949if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8951printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008952 no_x=yes
8953else
8954 # If each of the values was on the command line, it overrides each guess.
8955 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8956 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8957 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008958 ac_cv_have_x="have_x=yes\
8959 ac_x_includes='$x_includes'\
8960 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02008961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8962printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008963fi
8964
8965if test "$no_x" = yes; then
8966 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008967
Illia Bobyra96d5442023-08-30 16:30:15 +02008968printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008969
8970 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8971else
8972 if test -n "$x_includes"; then
8973 X_CFLAGS="$X_CFLAGS -I$x_includes"
8974 fi
8975
8976 # It would also be nice to do this for all -L options, not just this one.
8977 if test -n "$x_libraries"; then
8978 X_LIBS="$X_LIBS -L$x_libraries"
8979 # For Solaris; some versions of Sun CC require a space after -R and
8980 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02008981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8982printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008983 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8984 ac_xsave_c_werror_flag=$ac_c_werror_flag
8985 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008987/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008988
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008989int
Illia Bobyra96d5442023-08-30 16:30:15 +02008990main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008991{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008992
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008993 ;
8994 return 0;
8995}
8996_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008997if ac_fn_c_try_link "$LINENO"
8998then :
8999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9000printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009001 X_LIBS="$X_LIBS -R$x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009002else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009003 LIBS="$ac_xsave_LIBS -R $x_libraries"
9004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009005/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009006
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009007int
Illia Bobyra96d5442023-08-30 16:30:15 +02009008main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009009{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009010
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009011 ;
9012 return 0;
9013}
9014_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009015if ac_fn_c_try_link "$LINENO"
9016then :
9017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9018printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009019 X_LIBS="$X_LIBS -R $x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009020else $as_nop
9021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
9022printf "%s\n" "neither works" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009023fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009024rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009025 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009026fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009027rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009028 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009029 ac_c_werror_flag=$ac_xsave_c_werror_flag
9030 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009031 fi
9032
9033 # Check for system-dependent libraries X programs must link with.
9034 # Do this before checking for the system-independent R6 libraries
9035 # (-lICE), since we may need -lsocket or whatever for X linking.
9036
9037 if test "$ISC" = yes; then
9038 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9039 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009040 # Martyn Johnson says this is needed for Ultrix, if the X
9041 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009042 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009043 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009045/* end confdefs.h. */
9046
Bram Moolenaar446cb832008-06-24 21:56:24 +00009047/* Override any GCC internal prototype to avoid an error.
9048 Use char because int might match the return type of a GCC
9049 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009050char XOpenDisplay ();
9051int
Illia Bobyra96d5442023-08-30 16:30:15 +02009052main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009053{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009054return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009055 ;
9056 return 0;
9057}
9058_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009059if ac_fn_c_try_link "$LINENO"
9060then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009061
Illia Bobyra96d5442023-08-30 16:30:15 +02009062else $as_nop
9063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9064printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9065if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9066then :
9067 printf %s "(cached) " >&6
9068else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009069 ac_check_lib_save_LIBS=$LIBS
9070LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009072/* end confdefs.h. */
9073
Bram Moolenaar446cb832008-06-24 21:56:24 +00009074/* Override any GCC internal prototype to avoid an error.
9075 Use char because int might match the return type of a GCC
9076 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009077char dnet_ntoa ();
9078int
Illia Bobyra96d5442023-08-30 16:30:15 +02009079main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009080{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009081return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009082 ;
9083 return 0;
9084}
9085_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009086if ac_fn_c_try_link "$LINENO"
9087then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009088 ac_cv_lib_dnet_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009089else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009090 ac_cv_lib_dnet_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009091fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009092rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009093 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009094LIBS=$ac_check_lib_save_LIBS
9095fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9097printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9098if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9099then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009100 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009101fi
9102
9103 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9105printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9106if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9107then :
9108 printf %s "(cached) " >&6
9109else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009110 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009111LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009113/* end confdefs.h. */
9114
Bram Moolenaar446cb832008-06-24 21:56:24 +00009115/* Override any GCC internal prototype to avoid an error.
9116 Use char because int might match the return type of a GCC
9117 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009118char dnet_ntoa ();
9119int
Illia Bobyra96d5442023-08-30 16:30:15 +02009120main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009121{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009122return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009123 ;
9124 return 0;
9125}
9126_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009127if ac_fn_c_try_link "$LINENO"
9128then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009129 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009130else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009131 ac_cv_lib_dnet_stub_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009132fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009133rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009134 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009135LIBS=$ac_check_lib_save_LIBS
9136fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009137{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9138printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9139if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9140then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009141 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009142fi
9143
9144 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009145fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009146rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009147 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009148 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009149
9150 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9151 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009152 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009153 # needs -lnsl.
9154 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009155 # on Irix 5.2, according to T.E. Dickey.
9156 # The functions gethostbyname, getservbyname, and inet_addr are
9157 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009158 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009159if test "x$ac_cv_func_gethostbyname" = xyes
9160then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009161
Bram Moolenaar071d4272004-06-13 20:20:40 +00009162fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009163
Bram Moolenaar071d4272004-06-13 20:20:40 +00009164 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9166printf %s "checking for gethostbyname in -lnsl... " >&6; }
9167if test ${ac_cv_lib_nsl_gethostbyname+y}
9168then :
9169 printf %s "(cached) " >&6
9170else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009171 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009172LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009174/* end confdefs.h. */
9175
Bram Moolenaar446cb832008-06-24 21:56:24 +00009176/* Override any GCC internal prototype to avoid an error.
9177 Use char because int might match the return type of a GCC
9178 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009179char gethostbyname ();
9180int
Illia Bobyra96d5442023-08-30 16:30:15 +02009181main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009182{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009183return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009184 ;
9185 return 0;
9186}
9187_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009188if ac_fn_c_try_link "$LINENO"
9189then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009190 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009191else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009192 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009193fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009194rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009195 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009196LIBS=$ac_check_lib_save_LIBS
9197fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9199printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9200if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9201then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009202 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009203fi
9204
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009205 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9207printf %s "checking for gethostbyname in -lbsd... " >&6; }
9208if test ${ac_cv_lib_bsd_gethostbyname+y}
9209then :
9210 printf %s "(cached) " >&6
9211else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009212 ac_check_lib_save_LIBS=$LIBS
9213LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009215/* end confdefs.h. */
9216
Bram Moolenaar446cb832008-06-24 21:56:24 +00009217/* Override any GCC internal prototype to avoid an error.
9218 Use char because int might match the return type of a GCC
9219 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009220char gethostbyname ();
9221int
Illia Bobyra96d5442023-08-30 16:30:15 +02009222main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009223{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009224return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009225 ;
9226 return 0;
9227}
9228_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009229if ac_fn_c_try_link "$LINENO"
9230then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009231 ac_cv_lib_bsd_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009232else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009233 ac_cv_lib_bsd_gethostbyname=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009234fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009235rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009236 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009237LIBS=$ac_check_lib_save_LIBS
9238fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9240printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9241if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9242then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009243 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9244fi
9245
9246 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009247 fi
9248
9249 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9250 # socket/setsockopt and other routines are undefined under SCO ODT
9251 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009252 # on later versions), says Simon Leinen: it contains gethostby*
9253 # variants that don't use the name server (or something). -lsocket
9254 # must be given before -lnsl if both are needed. We assume that
9255 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009256 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009257if test "x$ac_cv_func_connect" = xyes
9258then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009259
Bram Moolenaar071d4272004-06-13 20:20:40 +00009260fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009261
Bram Moolenaar071d4272004-06-13 20:20:40 +00009262 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9264printf %s "checking for connect in -lsocket... " >&6; }
9265if test ${ac_cv_lib_socket_connect+y}
9266then :
9267 printf %s "(cached) " >&6
9268else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009269 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009270LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009272/* end confdefs.h. */
9273
Bram Moolenaar446cb832008-06-24 21:56:24 +00009274/* Override any GCC internal prototype to avoid an error.
9275 Use char because int might match the return type of a GCC
9276 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009277char connect ();
9278int
Illia Bobyra96d5442023-08-30 16:30:15 +02009279main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009280{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009281return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009282 ;
9283 return 0;
9284}
9285_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009286if ac_fn_c_try_link "$LINENO"
9287then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009288 ac_cv_lib_socket_connect=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009289else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009290 ac_cv_lib_socket_connect=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009291fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009292rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009293 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009294LIBS=$ac_check_lib_save_LIBS
9295fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009296{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9297printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9298if test "x$ac_cv_lib_socket_connect" = xyes
9299then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009300 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009301fi
9302
9303 fi
9304
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009305 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009306 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009307if test "x$ac_cv_func_remove" = xyes
9308then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009309
Bram Moolenaar071d4272004-06-13 20:20:40 +00009310fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009311
Bram Moolenaar071d4272004-06-13 20:20:40 +00009312 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9314printf %s "checking for remove in -lposix... " >&6; }
9315if test ${ac_cv_lib_posix_remove+y}
9316then :
9317 printf %s "(cached) " >&6
9318else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009319 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009320LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009322/* end confdefs.h. */
9323
Bram Moolenaar446cb832008-06-24 21:56:24 +00009324/* Override any GCC internal prototype to avoid an error.
9325 Use char because int might match the return type of a GCC
9326 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009327char remove ();
9328int
Illia Bobyra96d5442023-08-30 16:30:15 +02009329main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009330{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009331return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009332 ;
9333 return 0;
9334}
9335_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009336if ac_fn_c_try_link "$LINENO"
9337then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009338 ac_cv_lib_posix_remove=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009339else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009340 ac_cv_lib_posix_remove=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009341fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009342rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009343 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009344LIBS=$ac_check_lib_save_LIBS
9345fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9347printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9348if test "x$ac_cv_lib_posix_remove" = xyes
9349then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009350 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009351fi
9352
9353 fi
9354
9355 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009356 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009357if test "x$ac_cv_func_shmat" = xyes
9358then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009359
Bram Moolenaar071d4272004-06-13 20:20:40 +00009360fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009361
Bram Moolenaar071d4272004-06-13 20:20:40 +00009362 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9364printf %s "checking for shmat in -lipc... " >&6; }
9365if test ${ac_cv_lib_ipc_shmat+y}
9366then :
9367 printf %s "(cached) " >&6
9368else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009369 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009370LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009372/* end confdefs.h. */
9373
Bram Moolenaar446cb832008-06-24 21:56:24 +00009374/* Override any GCC internal prototype to avoid an error.
9375 Use char because int might match the return type of a GCC
9376 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009377char shmat ();
9378int
Illia Bobyra96d5442023-08-30 16:30:15 +02009379main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009380{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009381return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009382 ;
9383 return 0;
9384}
9385_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009386if ac_fn_c_try_link "$LINENO"
9387then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009388 ac_cv_lib_ipc_shmat=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009389else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009390 ac_cv_lib_ipc_shmat=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009391fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009392rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009393 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009394LIBS=$ac_check_lib_save_LIBS
9395fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9397printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9398if test "x$ac_cv_lib_ipc_shmat" = xyes
9399then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009400 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009401fi
9402
9403 fi
9404 fi
9405
9406 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009407 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009408 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9409 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9410 # check for ICE first), but we must link in the order -lSM -lICE or
9411 # we get undefined symbols. So assume we have SM if we have ICE.
9412 # These have to be linked with before -lX11, unlike the other
9413 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009414 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9416printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9417if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9418then :
9419 printf %s "(cached) " >&6
9420else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009421 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009422LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009424/* end confdefs.h. */
9425
Bram Moolenaar446cb832008-06-24 21:56:24 +00009426/* Override any GCC internal prototype to avoid an error.
9427 Use char because int might match the return type of a GCC
9428 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009429char IceConnectionNumber ();
9430int
Illia Bobyra96d5442023-08-30 16:30:15 +02009431main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009432{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009433return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009434 ;
9435 return 0;
9436}
9437_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009438if ac_fn_c_try_link "$LINENO"
9439then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009440 ac_cv_lib_ICE_IceConnectionNumber=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009441else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009442 ac_cv_lib_ICE_IceConnectionNumber=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009443fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009444rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009445 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009446LIBS=$ac_check_lib_save_LIBS
9447fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9449printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9450if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9451then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009452 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009453fi
9454
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009455 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009456
9457fi
9458
9459
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009460 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009461 CFLAGS="$CFLAGS -W c,dll"
9462 LDFLAGS="$LDFLAGS -W l,dll"
9463 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9464 fi
9465
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009466
Bram Moolenaar071d4272004-06-13 20:20:40 +00009467 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9468 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9470printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009471 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009472 if test "$vim_cv_uname_output" = SunOS &&
9473 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009474 X_LIBS="$X_LIBS -R $x_libraries"
9475 fi
9476 fi
9477
9478 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9479 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9481printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009482 X_CFLAGS="$X_CFLAGS -I$x_includes"
9483 fi
9484
9485 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9486 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9487 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9488
9489
Illia Bobyra96d5442023-08-30 16:30:15 +02009490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9491printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009492 cflags_save=$CFLAGS
9493 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009495/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009496#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009497#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009498int
Illia Bobyra96d5442023-08-30 16:30:15 +02009499main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009500{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009501
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009502 ;
9503 return 0;
9504}
9505_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009506if ac_fn_c_try_compile "$LINENO"
9507then :
9508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9509printf "%s\n" "yes" >&6; }
9510else $as_nop
9511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9512printf "%s\n" "no" >&6; }; no_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009513fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009514rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009515 CFLAGS=$cflags_save
9516
9517 if test "${no_x-no}" = yes; then
9518 with_x=no
9519 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009520 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009521
9522 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009523
Bram Moolenaar071d4272004-06-13 20:20:40 +00009524
9525 ac_save_LDFLAGS="$LDFLAGS"
9526 LDFLAGS="-L$x_libraries $LDFLAGS"
9527
Illia Bobyra96d5442023-08-30 16:30:15 +02009528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9529printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9530if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9531then :
9532 printf %s "(cached) " >&6
9533else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009534 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009535LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009537/* end confdefs.h. */
9538
Bram Moolenaar446cb832008-06-24 21:56:24 +00009539/* Override any GCC internal prototype to avoid an error.
9540 Use char because int might match the return type of a GCC
9541 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009542char _XdmcpAuthDoIt ();
9543int
Illia Bobyra96d5442023-08-30 16:30:15 +02009544main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009545{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009546return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009547 ;
9548 return 0;
9549}
9550_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009551if ac_fn_c_try_link "$LINENO"
9552then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009553 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009554else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009555 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009556fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009557rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009558 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009559LIBS=$ac_check_lib_save_LIBS
9560fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9562printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9563if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
9564then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009565 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009566fi
9567
9568
Illia Bobyra96d5442023-08-30 16:30:15 +02009569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9570printf %s "checking for IceOpenConnection in -lICE... " >&6; }
9571if test ${ac_cv_lib_ICE_IceOpenConnection+y}
9572then :
9573 printf %s "(cached) " >&6
9574else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009575 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009576LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009578/* end confdefs.h. */
9579
Bram Moolenaar446cb832008-06-24 21:56:24 +00009580/* Override any GCC internal prototype to avoid an error.
9581 Use char because int might match the return type of a GCC
9582 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009583char IceOpenConnection ();
9584int
Illia Bobyra96d5442023-08-30 16:30:15 +02009585main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009586{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009587return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009588 ;
9589 return 0;
9590}
9591_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009592if ac_fn_c_try_link "$LINENO"
9593then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009594 ac_cv_lib_ICE_IceOpenConnection=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009595else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009596 ac_cv_lib_ICE_IceOpenConnection=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009597fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009598rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009599 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009600LIBS=$ac_check_lib_save_LIBS
9601fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009602{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
9603printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9604if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
9605then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009606 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009607fi
9608
9609
9610 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +02009611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9612printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9613if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
9614then :
9615 printf %s "(cached) " >&6
9616else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009617 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009618LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009620/* end confdefs.h. */
9621
Bram Moolenaar446cb832008-06-24 21:56:24 +00009622/* Override any GCC internal prototype to avoid an error.
9623 Use char because int might match the return type of a GCC
9624 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009625char XpmCreatePixmapFromData ();
9626int
Illia Bobyra96d5442023-08-30 16:30:15 +02009627main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009628{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009629return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009630 ;
9631 return 0;
9632}
9633_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009634if ac_fn_c_try_link "$LINENO"
9635then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009636 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009637else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009638 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009639fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009640rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009641 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009642LIBS=$ac_check_lib_save_LIBS
9643fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9645printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9646if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
9647then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009648 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009649fi
9650
9651
Illia Bobyra96d5442023-08-30 16:30:15 +02009652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9653printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009654 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +02009655 if test "$GCC" = yes; then
9656 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9657 else
9658 CFLAGS="$CFLAGS $X_CFLAGS"
9659 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009661/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009662#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009663int
Illia Bobyra96d5442023-08-30 16:30:15 +02009664main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009665{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009666
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009667 ;
9668 return 0;
9669}
9670_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009671if ac_fn_c_try_compile "$LINENO"
9672then :
9673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9674printf "%s\n" "no" >&6; }
9675else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009676 CFLAGS="$CFLAGS -Wno-implicit-int"
9677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009678/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009679#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009680int
Illia Bobyra96d5442023-08-30 16:30:15 +02009681main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009682{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009683
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009684 ;
9685 return 0;
9686}
9687_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009688if ac_fn_c_try_compile "$LINENO"
9689then :
9690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9691printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9692else $as_nop
9693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9694printf "%s\n" "test failed" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009695
Bram Moolenaar071d4272004-06-13 20:20:40 +00009696fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009697rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009698
Bram Moolenaar071d4272004-06-13 20:20:40 +00009699fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009700rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009701 CFLAGS=$cflags_save
9702
9703 LDFLAGS="$ac_save_LDFLAGS"
9704
Mike Gilberta055b442023-08-20 19:01:41 +02009705 # The cast to long int works around a bug in the HP C Compiler
9706# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9707# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9708# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +02009709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
9710printf %s "checking size of wchar_t... " >&6; }
9711if test ${ac_cv_sizeof_wchar_t+y}
9712then :
9713 printf %s "(cached) " >&6
9714else $as_nop
9715 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
9716then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009717
Illia Bobyra96d5442023-08-30 16:30:15 +02009718else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02009719 if test "$ac_cv_type_wchar_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009720 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9721printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +02009722as_fn_error 77 "cannot compute sizeof (wchar_t)
9723See \`config.log' for more details" "$LINENO" 5; }
9724 else
9725 ac_cv_sizeof_wchar_t=0
9726 fi
9727fi
9728
9729fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
9731printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02009732
9733
9734
Illia Bobyra96d5442023-08-30 16:30:15 +02009735printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009736
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009737
Mike Gilberta055b442023-08-20 19:01:41 +02009738 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009739 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009740
9741 fi
9742
Bram Moolenaar071d4272004-06-13 20:20:40 +00009743 fi
9744fi
9745
Bram Moolenaard2a05492018-07-27 22:35:15 +02009746if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9747 as_fn_error $? "could not configure X" "$LINENO" 5
9748fi
9749
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009750test "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 +00009751
Illia Bobyra96d5442023-08-30 16:30:15 +02009752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9753printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009754# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009755if test ${enable_gui+y}
9756then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009757 enableval=$enable_gui;
Illia Bobyra96d5442023-08-30 16:30:15 +02009758else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009759 enable_gui="auto"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009760fi
9761
Bram Moolenaar071d4272004-06-13 20:20:40 +00009762
9763enable_gui_canon=`echo "_$enable_gui" | \
9764 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9765
Bram Moolenaar071d4272004-06-13 20:20:40 +00009766SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +01009767SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009768SKIP_GNOME=YES
9769SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009770SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009771SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009772GUITYPE=NONE
9773
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009774if test "x$HAIKU" = "xyes"; then
9775 SKIP_HAIKU=
9776 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009777 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9778printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009779 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009780 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9781printf "%s\n" "yes - automatic GUI support" >&6; } ;;
9782 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9783printf "%s\n" "auto - automatic GUI support" >&6; } ;;
9784 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9785printf "%s\n" "Haiku GUI support" >&6; } ;;
9786 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9787printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009788 SKIP_HAIKU=YES ;;
9789 esac
9790elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009791 SKIP_PHOTON=
9792 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009793 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9794printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009795 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009796 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9797printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009798 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009799 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9800printf "%s\n" "Photon GUI support" >&6; } ;;
9801 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9802printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009803 SKIP_PHOTON=YES ;;
9804 esac
9805
Bram Moolenaar040f9752020-08-11 23:08:48 +02009806elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9807 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009808 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9809printf "%s\n" "no GUI support" >&6; } ;;
9810 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9811printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +02009812 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009813 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9814printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
9815 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9816printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +02009817 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009818else
9819
Bram Moolenaar071d4272004-06-13 20:20:40 +00009820 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009821 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9822printf "%s\n" "no GUI support" >&6; } ;;
9823 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9824printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009825 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009826 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +01009827 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009828 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +00009829 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009830 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9831printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009832 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009833 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9834printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009835 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009836 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009837 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9838printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009839 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009840 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9841printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009842 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009843 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9844printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009845 esac
9846
9847fi
9848
Bram Moolenaar071d4272004-06-13 20:20:40 +00009849if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9850 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9852printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009853 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009854if test ${enable_gtk2_check+y}
9855then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009856 enableval=$enable_gtk2_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009857else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009858 enable_gtk2_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009859fi
9860
Illia Bobyra96d5442023-08-30 16:30:15 +02009861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9862printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009863 if test "x$enable_gtk2_check" = "xno"; then
9864 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009865 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009866 fi
9867fi
9868
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009869if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9871printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009872 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009873if test ${enable_gnome_check+y}
9874then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009875 enableval=$enable_gnome_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009876else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009877 enable_gnome_check="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009878fi
9879
Illia Bobyra96d5442023-08-30 16:30:15 +02009880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9881printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009882 if test "x$enable_gnome_check" = "xno"; then
9883 SKIP_GNOME=YES
9884 fi
9885fi
9886
Bram Moolenaar98921892016-02-23 17:14:37 +01009887if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009888 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9889printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009890 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009891if test ${enable_gtk3_check+y}
9892then :
Bram Moolenaar98921892016-02-23 17:14:37 +01009893 enableval=$enable_gtk3_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009894else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +01009895 enable_gtk3_check="yes"
9896fi
9897
Illia Bobyra96d5442023-08-30 16:30:15 +02009898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9899printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009900 if test "x$enable_gtk3_check" = "xno"; then
9901 SKIP_GTK3=YES
9902 fi
9903fi
9904
Bram Moolenaar071d4272004-06-13 20:20:40 +00009905if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9907printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009908 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009909if test ${enable_motif_check+y}
9910then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009911 enableval=$enable_motif_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009912else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009913 enable_motif_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009914fi
9915
Illia Bobyra96d5442023-08-30 16:30:15 +02009916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9917printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009918 if test "x$enable_motif_check" = "xno"; then
9919 SKIP_MOTIF=YES
9920 fi
9921fi
9922
Bram Moolenaar071d4272004-06-13 20:20:40 +00009923
9924
9925
9926
9927
9928
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009929if test "X$PKG_CONFIG" = "X"; then
9930 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +01009931 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9932set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9934printf %s "checking for $ac_word... " >&6; }
9935if test ${ac_cv_path_PKG_CONFIG+y}
9936then :
9937 printf %s "(cached) " >&6
9938else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009939 case $PKG_CONFIG in
9940 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009941 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9942 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009943 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9945for as_dir in $PATH
9946do
9947 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009948 case $as_dir in #(((
9949 '') as_dir=./ ;;
9950 */) ;;
9951 *) as_dir=$as_dir/ ;;
9952 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009953 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009954 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9955 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9956 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009957 break 2
9958 fi
9959done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009960 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009961IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009962
Bram Moolenaar071d4272004-06-13 20:20:40 +00009963 ;;
9964esac
9965fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009966PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +00009967if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9969printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009970else
Illia Bobyra96d5442023-08-30 16:30:15 +02009971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009973fi
9974
Bram Moolenaar446cb832008-06-24 21:56:24 +00009975
Bram Moolenaard6d30422018-01-28 22:48:55 +01009976fi
9977if test -z "$ac_cv_path_PKG_CONFIG"; then
9978 ac_pt_PKG_CONFIG=$PKG_CONFIG
9979 # Extract the first word of "pkg-config", so it can be a program name with args.
9980set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9982printf %s "checking for $ac_word... " >&6; }
9983if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
9984then :
9985 printf %s "(cached) " >&6
9986else $as_nop
Bram Moolenaard6d30422018-01-28 22:48:55 +01009987 case $ac_pt_PKG_CONFIG in
9988 [\\/]* | ?:[\\/]*)
9989 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9990 ;;
9991 *)
9992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9993for as_dir in $PATH
9994do
9995 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009996 case $as_dir in #(((
9997 '') as_dir=./ ;;
9998 */) ;;
9999 *) as_dir=$as_dir/ ;;
10000 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +010010001 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010002 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10003 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10004 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +010010005 break 2
10006 fi
10007done
10008 done
10009IFS=$as_save_IFS
10010
10011 ;;
10012esac
10013fi
10014ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10015if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10017printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010018else
Illia Bobyra96d5442023-08-30 16:30:15 +020010019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010021fi
10022
10023 if test "x$ac_pt_PKG_CONFIG" = x; then
10024 PKG_CONFIG="no"
10025 else
10026 case $cross_compiling:$ac_tool_warned in
10027yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +020010028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10029printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +010010030ac_tool_warned=yes ;;
10031esac
10032 PKG_CONFIG=$ac_pt_PKG_CONFIG
10033 fi
10034else
10035 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10036fi
10037
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010038fi
10039
10040
10041if test -z "$SKIP_GTK2"; then
10042
Illia Bobyra96d5442023-08-30 16:30:15 +020010043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10044printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010045 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010046if test ${enable_gtktest+y}
10047then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010048 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010049else $as_nop
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010050 enable_gtktest=yes
10051fi
10052
10053 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10055printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010056 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10058printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010059 fi
10060
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010061 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010062 save_skip_gtk3=$SKIP_GTK3
10063 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010064
Bram Moolenaar071d4272004-06-13 20:20:40 +000010065 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10066 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010067 no_gtk=""
10068 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10069 && $PKG_CONFIG --exists gtk+-2.0; then
10070 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010071 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10073printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010074 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010075 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010076 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10077 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10078 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10079 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10080 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10081 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10082 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10083 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010084 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10085 && $PKG_CONFIG --exists gtk+-3.0; then
10086 {
10087 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10089printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010090
10091 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10092 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10093 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10094 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10095 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10096 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10097 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10098 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10099 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10100 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010101 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10103printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010104 no_gtk=yes
10105 fi
10106
10107 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10108 {
10109 ac_save_CFLAGS="$CFLAGS"
10110 ac_save_LIBS="$LIBS"
10111 CFLAGS="$CFLAGS $GTK_CFLAGS"
10112 LIBS="$LIBS $GTK_LIBS"
10113
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010114 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010115 if test "$cross_compiling" = yes
10116then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010117 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010118else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010120/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010121
10122#include <gtk/gtk.h>
10123#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010124#if STDC_HEADERS
10125# include <stdlib.h>
10126# include <stddef.h>
10127#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010128
10129int
10130main ()
10131{
10132int major, minor, micro;
10133char *tmp_version;
10134
10135system ("touch conf.gtktest");
10136
10137/* HP/UX 9 (%@#!) writes to sscanf strings */
10138tmp_version = g_strdup("$min_gtk_version");
10139if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10140 printf("%s, bad version string\n", "$min_gtk_version");
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010141 g_free(tmp_version);
Bram Moolenaar071d4272004-06-13 20:20:40 +000010142 exit(1);
10143 }
10144
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010145g_free(tmp_version);
10146
Bram Moolenaar071d4272004-06-13 20:20:40 +000010147if ((gtk_major_version > major) ||
10148 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10149 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10150 (gtk_micro_version >= micro)))
10151{
10152 return 0;
10153}
10154return 1;
10155}
10156
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010157_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010158if ac_fn_c_try_run "$LINENO"
10159then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010160
Illia Bobyra96d5442023-08-30 16:30:15 +020010161else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010162 no_gtk=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010163fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010166fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010167
Bram Moolenaar071d4272004-06-13 20:20:40 +000010168 CFLAGS="$ac_save_CFLAGS"
10169 LIBS="$ac_save_LIBS"
10170 }
10171 fi
10172 if test "x$no_gtk" = x ; then
10173 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10175printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010176 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010177 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10178printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010179 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010180 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010181 GTK_LIBNAME="$GTK_LIBS"
10182 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010183 else
10184 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10186printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010187 GTK_CFLAGS=""
10188 GTK_LIBS=""
10189 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010190 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10191 as_fn_error $? "could not configure GTK" "$LINENO" 5
10192 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010193 }
10194 fi
10195 }
10196 else
10197 GTK_CFLAGS=""
10198 GTK_LIBS=""
10199 :
10200 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010201
10202
Bram Moolenaar071d4272004-06-13 20:20:40 +000010203 rm -f conf.gtktest
10204
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010205 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010206 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010207 SKIP_MOTIF=YES
10208 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010209
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010210 else
10211 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010212 fi
10213 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010214 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010215 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010216 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010217
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010218
10219
10220
10221
10222
Bram Moolenaar446cb832008-06-24 21:56:24 +000010223# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010224if test ${with_gnome_includes+y}
10225then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010226 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010227
Bram Moolenaar446cb832008-06-24 21:56:24 +000010228fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010229
10230
Bram Moolenaar446cb832008-06-24 21:56:24 +000010231
10232# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010233if test ${with_gnome_libs+y}
10234then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010235 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010236
Bram Moolenaar446cb832008-06-24 21:56:24 +000010237fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010238
10239
Bram Moolenaar446cb832008-06-24 21:56:24 +000010240
10241# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010242if test ${with_gnome+y}
10243then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010244 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010245 want_gnome=yes
10246 have_gnome=yes
10247 else
10248 if test "x$withval" = xno; then
10249 want_gnome=no
10250 else
10251 want_gnome=yes
10252 LDFLAGS="$LDFLAGS -L$withval/lib"
10253 CFLAGS="$CFLAGS -I$withval/include"
10254 gnome_prefix=$withval/lib
10255 fi
10256 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010257else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000010258 want_gnome=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000010259fi
10260
Bram Moolenaar071d4272004-06-13 20:20:40 +000010261
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010262 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010263 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10265printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010266 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10268printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010269 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10270 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10271 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010272
Illia Bobyra96d5442023-08-30 16:30:15 +020010273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10274printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010275 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10277printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010278 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010279 GNOME_LIBS="$GNOME_LIBS -pthread"
10280 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010283 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010284 have_gnome=yes
10285 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10287printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010288 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010289 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010290 fi
10291 fi
10292 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010293 fi
10294
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010295 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010296 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010297
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010298 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10299 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010300 fi
10301 }
10302 fi
10303 fi
10304fi
10305
Bram Moolenaar98921892016-02-23 17:14:37 +010010306
10307if test -z "$SKIP_GTK3"; then
10308
Illia Bobyra96d5442023-08-30 16:30:15 +020010309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10310printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010311 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010312if test ${enable_gtktest+y}
10313then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010314 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010315else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010316 enable_gtktest=yes
10317fi
10318
10319 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10321printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010322 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010323 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10324printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010325 fi
10326
Bram Moolenaar98921892016-02-23 17:14:37 +010010327 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010328 save_skip_gtk2=$SKIP_GTK2
10329 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010330
10331 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10332 {
10333 no_gtk=""
10334 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10335 && $PKG_CONFIG --exists gtk+-2.0; then
10336 {
10337 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10339printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010340 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10341 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10342 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10343 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10344 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10345 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10346 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10347 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10348 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10349 }
10350 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10351 && $PKG_CONFIG --exists gtk+-3.0; then
10352 {
10353 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10355printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010356
10357 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10358 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10359 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10360 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10361 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10362 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10363 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10364 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10365 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10366 }
10367 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10369printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010370 no_gtk=yes
10371 fi
10372
10373 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10374 {
10375 ac_save_CFLAGS="$CFLAGS"
10376 ac_save_LIBS="$LIBS"
10377 CFLAGS="$CFLAGS $GTK_CFLAGS"
10378 LIBS="$LIBS $GTK_LIBS"
10379
10380 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010381 if test "$cross_compiling" = yes
10382then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010383 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010384else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10386/* end confdefs.h. */
10387
10388#include <gtk/gtk.h>
10389#include <stdio.h>
10390#if STDC_HEADERS
10391# include <stdlib.h>
10392# include <stddef.h>
10393#endif
10394
10395int
10396main ()
10397{
10398int major, minor, micro;
10399char *tmp_version;
10400
10401system ("touch conf.gtktest");
10402
10403/* HP/UX 9 (%@#!) writes to sscanf strings */
10404tmp_version = g_strdup("$min_gtk_version");
10405if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10406 printf("%s, bad version string\n", "$min_gtk_version");
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010407 g_free(tmp_version);
Bram Moolenaar98921892016-02-23 17:14:37 +010010408 exit(1);
10409 }
10410
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010411g_free(tmp_version);
10412
Bram Moolenaar98921892016-02-23 17:14:37 +010010413if ((gtk_major_version > major) ||
10414 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10415 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10416 (gtk_micro_version >= micro)))
10417{
10418 return 0;
10419}
10420return 1;
10421}
10422
10423_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010424if ac_fn_c_try_run "$LINENO"
10425then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010426
Illia Bobyra96d5442023-08-30 16:30:15 +020010427else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010428 no_gtk=yes
10429fi
10430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10431 conftest.$ac_objext conftest.beam conftest.$ac_ext
10432fi
10433
10434 CFLAGS="$ac_save_CFLAGS"
10435 LIBS="$ac_save_LIBS"
10436 }
10437 fi
10438 if test "x$no_gtk" = x ; then
10439 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10441printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010442 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10444printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010445 fi
10446 GUI_LIB_LOC="$GTK_LIBDIR"
10447 GTK_LIBNAME="$GTK_LIBS"
10448 GUI_INC_LOC="$GTK_CFLAGS"
10449 else
10450 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010453 GTK_CFLAGS=""
10454 GTK_LIBS=""
10455 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010456 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10457 as_fn_error $? "could not configure GTK" "$LINENO" 5
10458 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010459 }
10460 fi
10461 }
10462 else
10463 GTK_CFLAGS=""
10464 GTK_LIBS=""
10465 :
10466 fi
10467
10468
10469 rm -f conf.gtktest
10470
10471 if test "x$GTK_CFLAGS" != "x"; then
10472 SKIP_GTK2=YES
10473 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010474 SKIP_MOTIF=YES
10475 GUITYPE=GTK
10476
Illia Bobyra96d5442023-08-30 16:30:15 +020010477 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010478
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010479 else
10480 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010481 fi
10482 fi
10483fi
10484
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010485if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10487printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010488 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10489 if test "x$gdk_pixbuf_version" != x ; then
10490 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10491 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10492 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010493 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10495printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010496 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10497set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10499printf %s "checking for $ac_word... " >&6; }
10500if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10501then :
10502 printf %s "(cached) " >&6
10503else $as_nop
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010504 case $GLIB_COMPILE_RESOURCES in
10505 [\\/]* | ?:[\\/]*)
10506 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10507 ;;
10508 *)
10509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10510for as_dir in $PATH
10511do
10512 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010513 case $as_dir in #(((
10514 '') as_dir=./ ;;
10515 */) ;;
10516 *) as_dir=$as_dir/ ;;
10517 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010518 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010519 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10520 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
10521 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010522 break 2
10523 fi
10524done
10525 done
10526IFS=$as_save_IFS
10527
10528 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
10529 ;;
10530esac
10531fi
10532GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
10533if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
10535printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010536else
Illia Bobyra96d5442023-08-30 16:30:15 +020010537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10538printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010539fi
10540
10541
Illia Bobyra96d5442023-08-30 16:30:15 +020010542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
10543printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010544 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010545 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020010546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10547printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010548 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10550printf "%s\n" "usable." >&6; }
10551 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010552
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010553 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10554 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010555 fi
10556 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10558printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010559 fi
10560 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10562printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010563 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010564
Illia Bobyra96d5442023-08-30 16:30:15 +020010565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10566printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010567 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010568if test ${enable_icon_cache_update+y}
10569then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010570 enableval=$enable_icon_cache_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010571else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010572 enable_icon_cache_update="yes"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010573fi
10574
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010575 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10577printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010578 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10579set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581printf %s "checking for $ac_word... " >&6; }
10582if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
10583then :
10584 printf %s "(cached) " >&6
10585else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010586 case $GTK_UPDATE_ICON_CACHE in
10587 [\\/]* | ?:[\\/]*)
10588 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10589 ;;
10590 *)
10591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10592for as_dir in $PATH
10593do
10594 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010595 case $as_dir in #(((
10596 '') as_dir=./ ;;
10597 */) ;;
10598 *) as_dir=$as_dir/ ;;
10599 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010600 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010601 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10602 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
10603 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010604 break 2
10605 fi
10606done
10607 done
10608IFS=$as_save_IFS
10609
10610 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10611 ;;
10612esac
10613fi
10614GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10615if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10617printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010618else
Illia Bobyra96d5442023-08-30 16:30:15 +020010619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010621fi
10622
10623
10624 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10626printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010627 fi
10628 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10630printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010631 fi
10632
Illia Bobyra96d5442023-08-30 16:30:15 +020010633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10634printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010635 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010636if test ${enable_desktop_database_update+y}
10637then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010638 enableval=$enable_desktop_database_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010639else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010640 enable_desktop_database_update="yes"
10641fi
10642
10643 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10645printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010646 # Extract the first word of "update-desktop-database", so it can be a program name with args.
10647set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10649printf %s "checking for $ac_word... " >&6; }
10650if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
10651then :
10652 printf %s "(cached) " >&6
10653else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010654 case $UPDATE_DESKTOP_DATABASE in
10655 [\\/]* | ?:[\\/]*)
10656 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10657 ;;
10658 *)
10659 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10660for as_dir in $PATH
10661do
10662 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010663 case $as_dir in #(((
10664 '') as_dir=./ ;;
10665 */) ;;
10666 *) as_dir=$as_dir/ ;;
10667 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010668 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010669 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10670 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
10671 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010672 break 2
10673 fi
10674done
10675 done
10676IFS=$as_save_IFS
10677
10678 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10679 ;;
10680esac
10681fi
10682UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10683if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10685printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010686else
Illia Bobyra96d5442023-08-30 16:30:15 +020010687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10688printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010689fi
10690
10691
10692 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10694printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010695 fi
10696 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10698printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010699 fi
10700fi
10701
10702
10703
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010704
10705
10706
10707
Bram Moolenaar071d4272004-06-13 20:20:40 +000010708if test -z "$SKIP_MOTIF"; then
10709 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"
10710 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10711
Illia Bobyra96d5442023-08-30 16:30:15 +020010712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10713printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010714 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10715 GUI_INC_LOC=
10716 for try in $gui_includes; do
10717 if test -f "$try/Xm/Xm.h"; then
10718 GUI_INC_LOC=$try
10719 fi
10720 done
10721 if test -n "$GUI_INC_LOC"; then
10722 if test "$GUI_INC_LOC" = /usr/include; then
10723 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10725printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010726 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10728printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010729 fi
10730 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10732printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010733 SKIP_MOTIF=YES
10734 fi
10735fi
10736
10737
10738if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10740printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010741
Bram Moolenaar446cb832008-06-24 21:56:24 +000010742# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010743if test ${with_motif_lib+y}
10744then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010745 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
10746fi
10747
Bram Moolenaar071d4272004-06-13 20:20:40 +000010748
10749 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10751printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010752 GUI_LIB_LOC=
10753 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010756
10757 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10758
Illia Bobyra96d5442023-08-30 16:30:15 +020010759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10760printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010010761 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 +000010762 GUI_LIB_LOC=
10763 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010010764 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 +000010765 if test -f "$libtry"; then
10766 GUI_LIB_LOC=$try
10767 fi
10768 done
10769 done
10770 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010010771 if test "$GUI_LIB_LOC" = /usr/lib \
10772 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020010773 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10774 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010775 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10777printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010778 else
10779 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10781printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010782 if test "$vim_cv_uname_output" = SunOS &&
10783 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010784 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10785 fi
10786 fi
10787 fi
10788 MOTIF_LIBNAME=-lXm
10789 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10791printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010792 SKIP_MOTIF=YES
10793 fi
10794 fi
10795fi
10796
10797if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010798 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010799
Bram Moolenaar071d4272004-06-13 20:20:40 +000010800fi
10801
Bram Moolenaare2adcf32022-03-12 11:57:25 +000010802if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010803 if test -n "$GUI_INC_LOC"; then
10804 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10805 fi
10806 if test -n "$GUI_LIB_LOC"; then
10807 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10808 fi
10809
10810 ldflags_save=$LDFLAGS
10811 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10813printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
10814if test ${ac_cv_lib_Xext_XShapeQueryExtension+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="-lXext -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 XShapeQueryExtension ();
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 XShapeQueryExtension ();
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_Xext_XShapeQueryExtension=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010838else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010839 ac_cv_lib_Xext_XShapeQueryExtension=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_Xext_XShapeQueryExtension" >&5
10846printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10847if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
10848then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010849 GUI_X_LIBS="-lXext"
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 wslen in -lw" >&5
10853printf %s "checking for wslen in -lw... " >&6; }
10854if test ${ac_cv_lib_w_wslen+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="-lw $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 wslen ();
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 wslen ();
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_w_wslen=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010878else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010879 ac_cv_lib_w_wslen=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_w_wslen" >&5
10886printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
10887if test "x$ac_cv_lib_w_wslen" = xyes
10888then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010889 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
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 dlsym in -ldl" >&5
10893printf %s "checking for dlsym in -ldl... " >&6; }
10894if test ${ac_cv_lib_dl_dlsym+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="-ldl $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 dlsym ();
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 dlsym ();
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_dl_dlsym=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010918else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010919 ac_cv_lib_dl_dlsym=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_dl_dlsym" >&5
10926printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
10927if test "x$ac_cv_lib_dl_dlsym" = xyes
10928then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010929 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010930fi
10931
Illia Bobyra96d5442023-08-30 16:30:15 +020010932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10933printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10934if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
10935then :
10936 printf %s "(cached) " >&6
10937else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010938 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010939LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010941/* end confdefs.h. */
10942
Bram Moolenaar446cb832008-06-24 21:56:24 +000010943/* Override any GCC internal prototype to avoid an error.
10944 Use char because int might match the return type of a GCC
10945 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010946char XmuCreateStippledPixmap ();
10947int
Illia Bobyra96d5442023-08-30 16:30:15 +020010948main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010949{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010950return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010951 ;
10952 return 0;
10953}
10954_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010955if ac_fn_c_try_link "$LINENO"
10956then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010957 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010958else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010959 ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010960fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010961rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010962 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010963LIBS=$ac_check_lib_save_LIBS
10964fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10966printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10967if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
10968then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010969 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010970fi
10971
10972 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10974printf %s "checking for XpEndJob in -lXp... " >&6; }
10975if test ${ac_cv_lib_Xp_XpEndJob+y}
10976then :
10977 printf %s "(cached) " >&6
10978else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010979 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010980LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010982/* end confdefs.h. */
10983
Bram Moolenaar446cb832008-06-24 21:56:24 +000010984/* Override any GCC internal prototype to avoid an error.
10985 Use char because int might match the return type of a GCC
10986 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010987char XpEndJob ();
10988int
Illia Bobyra96d5442023-08-30 16:30:15 +020010989main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010990{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010991return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010992 ;
10993 return 0;
10994}
10995_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010996if ac_fn_c_try_link "$LINENO"
10997then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010998 ac_cv_lib_Xp_XpEndJob=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010999else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011000 ac_cv_lib_Xp_XpEndJob=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011001fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011002rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011003 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011004LIBS=$ac_check_lib_save_LIBS
11005fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11007printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11008if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11009then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011010 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011011fi
11012
11013 fi
11014 LDFLAGS=$ldflags_save
11015
Illia Bobyra96d5442023-08-30 16:30:15 +020011016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11017printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011018 NARROW_PROTO=
11019 rm -fr conftestdir
11020 if mkdir conftestdir; then
11021 cd conftestdir
11022 cat > Imakefile <<'EOF'
11023acfindx:
11024 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11025EOF
11026 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11027 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11028 fi
11029 cd ..
11030 rm -fr conftestdir
11031 fi
11032 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11034printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011035 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11037printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011038 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011039
Bram Moolenaar071d4272004-06-13 20:20:40 +000011040fi
11041
11042if test "$enable_xsmp" = "yes"; then
11043 cppflags_save=$CPPFLAGS
11044 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011045 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11046if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11047then :
11048 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011049
11050fi
11051
Bram Moolenaar071d4272004-06-13 20:20:40 +000011052 CPPFLAGS=$cppflags_save
11053fi
11054
11055
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011056if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011057 cppflags_save=$CPPFLAGS
11058 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011059 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11060if test "x$ac_cv_header_X11_xpm_h" = xyes
11061then :
11062 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11063
11064fi
11065ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11066if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11067then :
11068 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011069
11070fi
11071
Bram Moolenaar071d4272004-06-13 20:20:40 +000011072
11073 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11075printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011077/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011078#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011079_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011081 $EGREP "XIMText" >/dev/null 2>&1
11082then :
11083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11084printf "%s\n" "yes" >&6; }
11085else $as_nop
11086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11087printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011088fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011089rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011090
11091 fi
11092 CPPFLAGS=$cppflags_save
11093
Bram Moolenaar54612582019-11-21 17:13:31 +010011094 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11096printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011097 enable_xim="yes"
11098 fi
11099fi
11100
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011101if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011102 cppflags_save=$CPPFLAGS
11103 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11105printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011107/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011108
11109#include <X11/Intrinsic.h>
11110#include <X11/Xmu/Editres.h>
11111int
Illia Bobyra96d5442023-08-30 16:30:15 +020011112main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011113{
11114int i; i = 0;
11115 ;
11116 return 0;
11117}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011118_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011119if ac_fn_c_try_compile "$LINENO"
11120then :
11121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11122printf "%s\n" "yes" >&6; }
11123 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011124
Illia Bobyra96d5442023-08-30 16:30:15 +020011125else $as_nop
11126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11127printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011128fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011129rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011130 CPPFLAGS=$cppflags_save
11131fi
11132
11133if test -z "$SKIP_MOTIF"; then
11134 cppflags_save=$CPPFLAGS
11135 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011136 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011137 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11138if test "x$ac_cv_header_Xm_Xm_h" = xyes
11139then :
11140 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011141
11142fi
11143
Bram Moolenaar77c19352012-06-13 19:19:41 +020011144 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011145 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11146if test "x$ac_cv_header_Xm_Xm_h" = xyes
11147then :
11148 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011149
11150fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011151ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11152if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11153then :
11154 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011155
Illia Bobyra96d5442023-08-30 16:30:15 +020011156fi
11157ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11158if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11159then :
11160 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11161
11162fi
11163ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11164if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11165then :
11166 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11167
11168fi
11169ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11170if test "x$ac_cv_header_Xm_Manager_h" = xyes
11171then :
11172 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11173
11174fi
11175ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11176if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11177then :
11178 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11179
11180fi
11181ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11182if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11183then :
11184 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11185
11186fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011187
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011188 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011189
Bram Moolenaar77c19352012-06-13 19:19:41 +020011190 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11192printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011194/* end confdefs.h. */
11195#include <Xm/XpmP.h>
11196int
Illia Bobyra96d5442023-08-30 16:30:15 +020011197main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011198{
11199XpmAttributes_21 attr;
11200 ;
11201 return 0;
11202}
11203_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011204if ac_fn_c_try_compile "$LINENO"
11205then :
11206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11207printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011208
Illia Bobyra96d5442023-08-30 16:30:15 +020011209else $as_nop
11210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11211printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011212
11213
11214fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011215rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011216 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011217 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011218
11219 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011220 CPPFLAGS=$cppflags_save
11221fi
11222
11223if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11225printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011226 enable_xim="no"
11227fi
11228if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11230printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011231 enable_fontset="no"
11232fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011233if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11235printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011236 enable_fontset="no"
11237fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011238
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011239if test -z "$SKIP_HAIKU"; then
11240 GUITYPE=HAIKUGUI
11241fi
11242
Bram Moolenaar071d4272004-06-13 20:20:40 +000011243if test -z "$SKIP_PHOTON"; then
11244 GUITYPE=PHOTONGUI
11245fi
11246
11247
11248
11249
11250
11251
11252if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011253 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011254fi
11255
11256if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011257 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011258
11259fi
11260if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011261 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011262
11263fi
11264
11265
11266
Illia Bobyra96d5442023-08-30 16:30:15 +020011267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11268printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011269if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11271printf "%s\n" "/proc/self/exe" >&6; }
11272 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011273
11274elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11276printf "%s\n" "/proc/self/path/a.out" >&6; }
11277 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011278
11279elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11281printf "%s\n" "/proc/curproc/file" >&6; }
11282 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011283
11284else
Illia Bobyra96d5442023-08-30 16:30:15 +020011285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011287fi
11288
Illia Bobyra96d5442023-08-30 16:30:15 +020011289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11290printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011291case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011292 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11293printf "%s\n" "yes" >&6; }
11294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11295printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011296 if test "x$with_x" = "xno" ; then
11297 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11299printf "%s\n" "yes" >&6; }
11300 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011301
11302 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011303 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11304printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011305 fi ;;
11306
Illia Bobyra96d5442023-08-30 16:30:15 +020011307 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11308printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011309esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011310
Bram Moolenaar071d4272004-06-13 20:20:40 +000011311
Illia Bobyra96d5442023-08-30 16:30:15 +020011312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11313printf %s "checking whether toupper is broken... " >&6; }
11314if test ${vim_cv_toupper_broken+y}
11315then :
11316 printf %s "(cached) " >&6
11317else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011318
Illia Bobyra96d5442023-08-30 16:30:15 +020011319 if test "$cross_compiling" = yes
11320then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011321
Bram Moolenaar7db77842014-03-27 17:40:59 +010011322 as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000011323
Illia Bobyra96d5442023-08-30 16:30:15 +020011324else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11326/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011327
11328#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011329#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011330#if STDC_HEADERS
11331# include <stdlib.h>
11332# include <stddef.h>
11333#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011334int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011335
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011336_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011337if ac_fn_c_try_run "$LINENO"
11338then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011339
11340 vim_cv_toupper_broken=yes
11341
Illia Bobyra96d5442023-08-30 16:30:15 +020011342else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011343
11344 vim_cv_toupper_broken=no
11345
Bram Moolenaar071d4272004-06-13 20:20:40 +000011346fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11348 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011349fi
11350
Bram Moolenaar446cb832008-06-24 21:56:24 +000011351fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11353printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011354
11355if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011356 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011357
11358fi
11359
Illia Bobyra96d5442023-08-30 16:30:15 +020011360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11361printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011363/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011364#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011365int
Illia Bobyra96d5442023-08-30 16:30:15 +020011366main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011367{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011368printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011369 ;
11370 return 0;
11371}
11372_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011373if ac_fn_c_try_compile "$LINENO"
11374then :
11375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11376printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011377
Illia Bobyra96d5442023-08-30 16:30:15 +020011378else $as_nop
11379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011381fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011382rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011383
Illia Bobyra96d5442023-08-30 16:30:15 +020011384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11385printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011387/* end confdefs.h. */
11388#include <stdio.h>
11389int
Illia Bobyra96d5442023-08-30 16:30:15 +020011390main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011391{
11392int x __attribute__((unused));
11393 ;
11394 return 0;
11395}
11396_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011397if ac_fn_c_try_compile "$LINENO"
11398then :
11399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11400printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011401
Illia Bobyra96d5442023-08-30 16:30:15 +020011402else $as_nop
11403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404printf "%s\n" "no" >&6; }
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011405fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011406rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011407
Illia Bobyra96d5442023-08-30 16:30:15 +020011408ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
11409if test "x$ac_cv_header_elf_h" = xyes
11410then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011411 HAS_ELF=1
Bram Moolenaar071d4272004-06-13 20:20:40 +000011412fi
11413
11414if test "$HAS_ELF" = 1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
11416printf %s "checking for main in -lelf... " >&6; }
11417if test ${ac_cv_lib_elf_main+y}
11418then :
11419 printf %s "(cached) " >&6
11420else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011421 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011422LIBS="-lelf $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011424/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011425
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011426
11427int
Illia Bobyra96d5442023-08-30 16:30:15 +020011428main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011429{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011430return main ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011431 ;
11432 return 0;
11433}
11434_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011435if ac_fn_c_try_link "$LINENO"
11436then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011437 ac_cv_lib_elf_main=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011438else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011439 ac_cv_lib_elf_main=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011440fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011441rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011442 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011443LIBS=$ac_check_lib_save_LIBS
11444fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
11446printf "%s\n" "$ac_cv_lib_elf_main" >&6; }
11447if test "x$ac_cv_lib_elf_main" = xyes
11448then :
11449 printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011450
11451 LIBS="-lelf $LIBS"
11452
Bram Moolenaar071d4272004-06-13 20:20:40 +000011453fi
11454
11455fi
11456
11457ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011458for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011459 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11461printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11462if eval test \${$as_ac_Header+y}
11463then :
11464 printf %s "(cached) " >&6
11465else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011467/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011468#include <sys/types.h>
11469#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011470
11471int
Illia Bobyra96d5442023-08-30 16:30:15 +020011472main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011473{
11474if ((DIR *) 0)
11475return 0;
11476 ;
11477 return 0;
11478}
11479_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011480if ac_fn_c_try_compile "$LINENO"
11481then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011482 eval "$as_ac_Header=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020011483else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011484 eval "$as_ac_Header=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011485fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011486rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011487fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011488eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11490printf "%s\n" "$ac_res" >&6; }
11491if eval test \"x\$"$as_ac_Header"\" = x"yes"
11492then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011493 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011494#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011495_ACEOF
11496
11497ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011498fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011499
Bram Moolenaar071d4272004-06-13 20:20:40 +000011500done
11501# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11502if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011503 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11504printf %s "checking for library containing opendir... " >&6; }
11505if test ${ac_cv_search_opendir+y}
11506then :
11507 printf %s "(cached) " >&6
11508else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011509 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011511/* end confdefs.h. */
11512
Bram Moolenaar446cb832008-06-24 21:56:24 +000011513/* Override any GCC internal prototype to avoid an error.
11514 Use char because int might match the return type of a GCC
11515 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011516char opendir ();
11517int
Illia Bobyra96d5442023-08-30 16:30:15 +020011518main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011519{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011520return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011521 ;
11522 return 0;
11523}
11524_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011525for ac_lib in '' dir
11526do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011527 if test -z "$ac_lib"; then
11528 ac_res="none required"
11529 else
11530 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011531 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011532 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011533 if ac_fn_c_try_link "$LINENO"
11534then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011535 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000011536fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011537rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011538 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011539 if test ${ac_cv_search_opendir+y}
11540then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011541 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011542fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011543done
Illia Bobyra96d5442023-08-30 16:30:15 +020011544if test ${ac_cv_search_opendir+y}
11545then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011546
Illia Bobyra96d5442023-08-30 16:30:15 +020011547else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011548 ac_cv_search_opendir=no
11549fi
11550rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011551LIBS=$ac_func_search_save_LIBS
11552fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11554printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011555ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011556if test "$ac_res" != no
11557then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011558 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011559
11560fi
11561
Bram Moolenaar071d4272004-06-13 20:20:40 +000011562else
Illia Bobyra96d5442023-08-30 16:30:15 +020011563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11564printf %s "checking for library containing opendir... " >&6; }
11565if test ${ac_cv_search_opendir+y}
11566then :
11567 printf %s "(cached) " >&6
11568else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011569 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011571/* end confdefs.h. */
11572
Bram Moolenaar446cb832008-06-24 21:56:24 +000011573/* Override any GCC internal prototype to avoid an error.
11574 Use char because int might match the return type of a GCC
11575 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011576char opendir ();
11577int
Illia Bobyra96d5442023-08-30 16:30:15 +020011578main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011579{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011580return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011581 ;
11582 return 0;
11583}
11584_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011585for ac_lib in '' x
11586do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011587 if test -z "$ac_lib"; then
11588 ac_res="none required"
11589 else
11590 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011591 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011592 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011593 if ac_fn_c_try_link "$LINENO"
11594then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011595 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011596fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011597rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011598 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011599 if test ${ac_cv_search_opendir+y}
11600then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011601 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011602fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011603done
Illia Bobyra96d5442023-08-30 16:30:15 +020011604if test ${ac_cv_search_opendir+y}
11605then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011606
Illia Bobyra96d5442023-08-30 16:30:15 +020011607else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011608 ac_cv_search_opendir=no
11609fi
11610rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011611LIBS=$ac_func_search_save_LIBS
11612fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011613{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11614printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011615ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011616if test "$ac_res" != no
11617then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011618 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011619
11620fi
11621
11622fi
11623
11624
Bram Moolenaar071d4272004-06-13 20:20:40 +000011625if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11627printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011629/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011630#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011631int
Illia Bobyra96d5442023-08-30 16:30:15 +020011632main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011633{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011634union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011635 ;
11636 return 0;
11637}
11638_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011639if ac_fn_c_try_compile "$LINENO"
11640then :
11641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11642printf "%s\n" "yes" >&6; }
11643 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011644
Illia Bobyra96d5442023-08-30 16:30:15 +020011645 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011646
Illia Bobyra96d5442023-08-30 16:30:15 +020011647else $as_nop
11648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011650fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011651rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011652fi
11653
Illia Bobyra96d5442023-08-30 16:30:15 +020011654ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11655if test "x$ac_cv_header_stdint_h" = xyes
11656then :
11657 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
11658
11659fi
11660ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
11661if test "x$ac_cv_header_stdlib_h" = xyes
11662then :
11663 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
11664
11665fi
11666ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
11667if test "x$ac_cv_header_string_h" = xyes
11668then :
11669 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
11670
11671fi
11672ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
11673if test "x$ac_cv_header_sys_select_h" = xyes
11674then :
11675 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
11676
11677fi
11678ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
11679if test "x$ac_cv_header_sys_utsname_h" = xyes
11680then :
11681 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
11682
11683fi
11684ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
11685if test "x$ac_cv_header_termcap_h" = xyes
11686then :
11687 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
11688
11689fi
11690ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
11691if test "x$ac_cv_header_fcntl_h" = xyes
11692then :
11693 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
11694
11695fi
11696ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
11697if test "x$ac_cv_header_sgtty_h" = xyes
11698then :
11699 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
11700
11701fi
11702ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
11703if test "x$ac_cv_header_sys_ioctl_h" = xyes
11704then :
11705 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
11706
11707fi
11708ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
11709if test "x$ac_cv_header_sys_time_h" = xyes
11710then :
11711 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
11712
11713fi
11714ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
11715if test "x$ac_cv_header_sys_types_h" = xyes
11716then :
11717 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
11718
11719fi
11720ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
11721if test "x$ac_cv_header_termio_h" = xyes
11722then :
11723 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
11724
11725fi
11726ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
11727if test "x$ac_cv_header_iconv_h" = xyes
11728then :
11729 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
11730
11731fi
11732ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11733if test "x$ac_cv_header_inttypes_h" = xyes
11734then :
11735 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11736
11737fi
11738ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11739if test "x$ac_cv_header_langinfo_h" = xyes
11740then :
11741 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
11742
11743fi
11744ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
11745if test "x$ac_cv_header_math_h" = xyes
11746then :
11747 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
11748
11749fi
11750ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11751if test "x$ac_cv_header_unistd_h" = xyes
11752then :
11753 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11754
11755fi
11756ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
11757if test "x$ac_cv_header_stropts_h" = xyes
11758then :
11759 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
11760
11761fi
11762ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
11763if test "x$ac_cv_header_errno_h" = xyes
11764then :
11765 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
11766
11767fi
11768ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
11769if test "x$ac_cv_header_sys_resource_h" = xyes
11770then :
11771 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
11772
11773fi
11774ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
11775if test "x$ac_cv_header_sys_systeminfo_h" = xyes
11776then :
11777 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
11778
11779fi
11780ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11781if test "x$ac_cv_header_locale_h" = xyes
11782then :
11783 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
11784
11785fi
11786ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
11787if test "x$ac_cv_header_sys_stream_h" = xyes
11788then :
11789 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
11790
11791fi
11792ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
11793if test "x$ac_cv_header_termios_h" = xyes
11794then :
11795 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
11796
11797fi
11798ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
11799if test "x$ac_cv_header_libc_h" = xyes
11800then :
11801 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
11802
11803fi
11804ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
11805if test "x$ac_cv_header_sys_statfs_h" = xyes
11806then :
11807 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
11808
11809fi
11810ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
11811if test "x$ac_cv_header_poll_h" = xyes
11812then :
11813 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
11814
11815fi
11816ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
11817if test "x$ac_cv_header_sys_poll_h" = xyes
11818then :
11819 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
11820
11821fi
11822ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
11823if test "x$ac_cv_header_pwd_h" = xyes
11824then :
11825 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
11826
11827fi
11828ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
11829if test "x$ac_cv_header_utime_h" = xyes
11830then :
11831 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
11832
11833fi
11834ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11835if test "x$ac_cv_header_sys_param_h" = xyes
11836then :
11837 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11838
11839fi
11840ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
11841if test "x$ac_cv_header_sys_ptms_h" = xyes
11842then :
11843 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
11844
11845fi
11846ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
11847if test "x$ac_cv_header_libintl_h" = xyes
11848then :
11849 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
11850
11851fi
11852ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
11853if test "x$ac_cv_header_libgen_h" = xyes
11854then :
11855 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
11856
11857fi
11858ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
11859if test "x$ac_cv_header_util_debug_h" = xyes
11860then :
11861 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
11862
11863fi
11864ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
11865if test "x$ac_cv_header_util_msg18n_h" = xyes
11866then :
11867 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
11868
11869fi
11870ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
11871if test "x$ac_cv_header_frame_h" = xyes
11872then :
11873 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
11874
11875fi
11876ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
11877if test "x$ac_cv_header_sys_acl_h" = xyes
11878then :
11879 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
11880
11881fi
11882ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
11883if test "x$ac_cv_header_sys_access_h" = xyes
11884then :
11885 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
11886
11887fi
11888ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
11889if test "x$ac_cv_header_sys_sysinfo_h" = xyes
11890then :
11891 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
11892
11893fi
11894ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11895if test "x$ac_cv_header_wchar_h" = xyes
11896then :
11897 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
11898
11899fi
11900ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11901if test "x$ac_cv_header_wctype_h" = xyes
11902then :
11903 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011904
11905fi
11906
Bram Moolenaar071d4272004-06-13 20:20:40 +000011907
Illia Bobyra96d5442023-08-30 16:30:15 +020011908ac_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 +000011909# include <sys/stream.h>
11910#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011911"
Illia Bobyra96d5442023-08-30 16:30:15 +020011912if test "x$ac_cv_header_sys_ptem_h" = xyes
11913then :
11914 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011915
11916fi
11917
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011918
Illia Bobyra96d5442023-08-30 16:30:15 +020011919ac_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 +000011920# include <sys/param.h>
11921#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011922"
Illia Bobyra96d5442023-08-30 16:30:15 +020011923if test "x$ac_cv_header_sys_sysctl_h" = xyes
11924then :
11925 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011926
11927fi
11928
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011929
11930
Illia Bobyra96d5442023-08-30 16:30:15 +020011931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11932printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011934/* end confdefs.h. */
11935
11936#include <pthread.h>
11937#include <pthread_np.h>
11938int
Illia Bobyra96d5442023-08-30 16:30:15 +020011939main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011940{
11941int i; i = 0;
11942 ;
11943 return 0;
11944}
11945_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011946if ac_fn_c_try_compile "$LINENO"
11947then :
11948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11949printf "%s\n" "yes" >&6; }
11950 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011951
Illia Bobyra96d5442023-08-30 16:30:15 +020011952else $as_nop
11953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11954printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011955fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011956rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011957
Illia Bobyra96d5442023-08-30 16:30:15 +020011958ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11959if test "x$ac_cv_header_strings_h" = xyes
11960then :
11961 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011962
11963fi
11964
Bram Moolenaard0573012017-10-28 21:11:06 +020011965if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011966 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000011967
11968else
Bram Moolenaar071d4272004-06-13 20:20:40 +000011969
Illia Bobyra96d5442023-08-30 16:30:15 +020011970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11971printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011972cppflags_save=$CPPFLAGS
11973CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011975/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011976
11977#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11978# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
11979 /* but don't do it on AIX 5.1 (Uribarri) */
11980#endif
11981#ifdef HAVE_XM_XM_H
11982# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
11983#endif
11984#ifdef HAVE_STRING_H
11985# include <string.h>
11986#endif
11987#if defined(HAVE_STRINGS_H)
11988# include <strings.h>
11989#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000011990
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011991int
Illia Bobyra96d5442023-08-30 16:30:15 +020011992main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011993{
11994int i; i = 0;
11995 ;
11996 return 0;
11997}
11998_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011999if ac_fn_c_try_compile "$LINENO"
12000then :
12001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12002printf "%s\n" "yes" >&6; }
12003else $as_nop
12004 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012005
Illia Bobyra96d5442023-08-30 16:30:15 +020012006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12007printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012008fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012009rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012010CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000012011fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012012
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012013if test $ac_cv_c_compiler_gnu = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
12015printf %s "checking whether $CC needs -traditional... " >&6; }
12016if test ${ac_cv_prog_gcc_traditional+y}
12017then :
12018 printf %s "(cached) " >&6
12019else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012020 ac_pattern="Autoconf.*'x'"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012022/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012023#include <sgtty.h>
12024Autoconf TIOCGETP
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012025_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012027 $EGREP "$ac_pattern" >/dev/null 2>&1
12028then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012029 ac_cv_prog_gcc_traditional=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012030else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012031 ac_cv_prog_gcc_traditional=no
12032fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012033rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012034
12035
12036 if test $ac_cv_prog_gcc_traditional = no; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012038/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012039#include <termio.h>
12040Autoconf TCGETA
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012041_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012043 $EGREP "$ac_pattern" >/dev/null 2>&1
12044then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012045 ac_cv_prog_gcc_traditional=yes
12046fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012047rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012048
12049 fi
12050fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
12052printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012053 if test $ac_cv_prog_gcc_traditional = yes; then
12054 CC="$CC -traditional"
12055 fi
12056fi
12057
Illia Bobyra96d5442023-08-30 16:30:15 +020012058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12059printf %s "checking for an ANSI C-conforming const... " >&6; }
12060if test ${ac_cv_c_const+y}
12061then :
12062 printf %s "(cached) " >&6
12063else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012065/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012066
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012067int
Illia Bobyra96d5442023-08-30 16:30:15 +020012068main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012069{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012070
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012071#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012072 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012073 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012074 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012075 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012076 char const *const *pcpcc;
12077 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012078 /* NEC SVR4.0.2 mips cc rejects this. */
12079 struct point {int x, y;};
12080 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012081 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012082 It does not let you subtract one const X* pointer from another in
12083 an arm of an if-expression whose if-part is not a constant
12084 expression */
12085 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012086 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012087 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012088 ++pcpcc;
12089 ppc = (char**) pcpcc;
12090 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012091 { /* SCO 3.2v4 cc rejects this sort of thing. */
12092 char tx;
12093 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012094 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012095
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012096 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012097 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012098 }
12099 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12100 int x[] = {25, 17};
12101 const int *foo = &x[0];
12102 ++foo;
12103 }
12104 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12105 typedef const int *iptr;
12106 iptr p = 0;
12107 ++p;
12108 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012109 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012110 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012111 struct s { int j; const int *ap[3]; } bx;
12112 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012113 }
12114 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12115 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012116 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012117 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012118 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012119#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012120
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012121 ;
12122 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012123}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012124_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012125if ac_fn_c_try_compile "$LINENO"
12126then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012127 ac_cv_c_const=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012128else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012129 ac_cv_c_const=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012130fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012131rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012132fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12134printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012135if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012136
Illia Bobyra96d5442023-08-30 16:30:15 +020012137printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012138
12139fi
12140
Illia Bobyra96d5442023-08-30 16:30:15 +020012141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12142printf %s "checking for working volatile... " >&6; }
12143if test ${ac_cv_c_volatile+y}
12144then :
12145 printf %s "(cached) " >&6
12146else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012148/* end confdefs.h. */
12149
12150int
Illia Bobyra96d5442023-08-30 16:30:15 +020012151main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012152{
12153
12154volatile int x;
12155int * volatile y = (int *) 0;
12156return !x && !y;
12157 ;
12158 return 0;
12159}
12160_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012161if ac_fn_c_try_compile "$LINENO"
12162then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012163 ac_cv_c_volatile=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012164else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012165 ac_cv_c_volatile=no
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012166fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012167rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012168fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012169{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12170printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012171if test $ac_cv_c_volatile = no; then
12172
Illia Bobyra96d5442023-08-30 16:30:15 +020012173printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012174
12175fi
12176
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012177ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012178if test "x$ac_cv_type_mode_t" = xyes
12179then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012180
Illia Bobyra96d5442023-08-30 16:30:15 +020012181else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012182
Illia Bobyra96d5442023-08-30 16:30:15 +020012183printf "%s\n" "#define mode_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012184
12185fi
12186
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012187ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012188if test "x$ac_cv_type_off_t" = xyes
12189then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012190
Illia Bobyra96d5442023-08-30 16:30:15 +020012191else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012192
Illia Bobyra96d5442023-08-30 16:30:15 +020012193printf "%s\n" "#define off_t long int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012194
12195fi
12196
Bram Moolenaar071d4272004-06-13 20:20:40 +000012197
Illia Bobyra96d5442023-08-30 16:30:15 +020012198 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12199"
12200if test "x$ac_cv_type_pid_t" = xyes
12201then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012202
Illia Bobyra96d5442023-08-30 16:30:15 +020012203else $as_nop
12204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12205/* end confdefs.h. */
12206
12207 #if defined _WIN64 && !defined __CYGWIN__
12208 LLP64
12209 #endif
12210
12211int
12212main (void)
12213{
12214
12215 ;
12216 return 0;
12217}
12218
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012219_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012220if ac_fn_c_try_compile "$LINENO"
12221then :
12222 ac_pid_type='int'
12223else $as_nop
12224 ac_pid_type='__int64'
12225fi
12226rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12227
12228printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12229
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012230
12231fi
12232
Illia Bobyra96d5442023-08-30 16:30:15 +020012233
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012234ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012235if test "x$ac_cv_type_size_t" = xyes
12236then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012237
Illia Bobyra96d5442023-08-30 16:30:15 +020012238else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012239
Illia Bobyra96d5442023-08-30 16:30:15 +020012240printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012241
12242fi
12243
Illia Bobyra96d5442023-08-30 16:30:15 +020012244{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12245printf %s "checking for uid_t in sys/types.h... " >&6; }
12246if test ${ac_cv_type_uid_t+y}
12247then :
12248 printf %s "(cached) " >&6
12249else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012251/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012252#include <sys/types.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012253
12254_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012256 $EGREP "uid_t" >/dev/null 2>&1
12257then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012258 ac_cv_type_uid_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012259else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012260 ac_cv_type_uid_t=no
12261fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012262rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012263
12264fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12266printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012267if test $ac_cv_type_uid_t = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000012268
Illia Bobyra96d5442023-08-30 16:30:15 +020012269printf "%s\n" "#define uid_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012270
12271
Illia Bobyra96d5442023-08-30 16:30:15 +020012272printf "%s\n" "#define gid_t int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012273
12274fi
12275
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012276ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12277case $ac_cv_c_uint32_t in #(
12278 no|yes) ;; #(
12279 *)
12280
Illia Bobyra96d5442023-08-30 16:30:15 +020012281printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012282
12283
Illia Bobyra96d5442023-08-30 16:30:15 +020012284printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012285;;
12286 esac
12287
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012288
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012289
Illia Bobyrf39842f2023-08-27 18:21:23 +020012290
12291
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012292ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012293if test "x$ac_cv_type_ino_t" = xyes
12294then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012295
Illia Bobyra96d5442023-08-30 16:30:15 +020012296else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012297
Illia Bobyra96d5442023-08-30 16:30:15 +020012298printf "%s\n" "#define ino_t long" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012299
12300fi
12301
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012302ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012303if test "x$ac_cv_type_dev_t" = xyes
12304then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012305
Illia Bobyra96d5442023-08-30 16:30:15 +020012306else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012307
Illia Bobyra96d5442023-08-30 16:30:15 +020012308printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012309
12310fi
12311
Illia Bobyra96d5442023-08-30 16:30:15 +020012312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12313printf %s "checking whether byte ordering is bigendian... " >&6; }
12314if test ${ac_cv_c_bigendian+y}
12315then :
12316 printf %s "(cached) " >&6
12317else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012318 ac_cv_c_bigendian=unknown
12319 # See if we're dealing with a universal compiler.
12320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12321/* end confdefs.h. */
12322#ifndef __APPLE_CC__
12323 not a universal capable compiler
12324 #endif
12325 typedef int dummy;
12326
12327_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012328if ac_fn_c_try_compile "$LINENO"
12329then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012330
12331 # Check for potential -arch flags. It is not universal unless
12332 # there are at least two -arch flags with different values.
12333 ac_arch=
12334 ac_prev=
12335 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12336 if test -n "$ac_prev"; then
12337 case $ac_word in
12338 i?86 | x86_64 | ppc | ppc64)
12339 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12340 ac_arch=$ac_word
12341 else
12342 ac_cv_c_bigendian=universal
12343 break
12344 fi
12345 ;;
12346 esac
12347 ac_prev=
12348 elif test "x$ac_word" = "x-arch"; then
12349 ac_prev=arch
12350 fi
12351 done
12352fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012353rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012354 if test $ac_cv_c_bigendian = unknown; then
12355 # See if sys/param.h defines the BYTE_ORDER macro.
12356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12357/* end confdefs.h. */
12358#include <sys/types.h>
12359 #include <sys/param.h>
12360
12361int
Illia Bobyra96d5442023-08-30 16:30:15 +020012362main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012363{
12364#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12365 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12366 && LITTLE_ENDIAN)
12367 bogus endian macros
12368 #endif
12369
12370 ;
12371 return 0;
12372}
12373_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012374if ac_fn_c_try_compile "$LINENO"
12375then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012376 # It does; now see whether it defined to BIG_ENDIAN or not.
12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12378/* end confdefs.h. */
12379#include <sys/types.h>
12380 #include <sys/param.h>
12381
12382int
Illia Bobyra96d5442023-08-30 16:30:15 +020012383main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012384{
12385#if BYTE_ORDER != BIG_ENDIAN
12386 not big endian
12387 #endif
12388
12389 ;
12390 return 0;
12391}
12392_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012393if ac_fn_c_try_compile "$LINENO"
12394then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012395 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012396else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012397 ac_cv_c_bigendian=no
12398fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012399rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012400fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012401rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012402 fi
12403 if test $ac_cv_c_bigendian = unknown; then
12404 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12406/* end confdefs.h. */
12407#include <limits.h>
12408
12409int
Illia Bobyra96d5442023-08-30 16:30:15 +020012410main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012411{
12412#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12413 bogus endian macros
12414 #endif
12415
12416 ;
12417 return 0;
12418}
12419_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012420if ac_fn_c_try_compile "$LINENO"
12421then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012422 # It does; now see whether it defined to _BIG_ENDIAN or not.
12423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424/* end confdefs.h. */
12425#include <limits.h>
12426
12427int
Illia Bobyra96d5442023-08-30 16:30:15 +020012428main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012429{
12430#ifndef _BIG_ENDIAN
12431 not big endian
12432 #endif
12433
12434 ;
12435 return 0;
12436}
12437_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012438if ac_fn_c_try_compile "$LINENO"
12439then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012440 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012441else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012442 ac_cv_c_bigendian=no
12443fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012444rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012445fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012446rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012447 fi
12448 if test $ac_cv_c_bigendian = unknown; then
12449 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012450 if test "$cross_compiling" = yes
12451then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012452 # Try to guess by grepping values from an object file.
12453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12454/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012455unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012456 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012457 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012458 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12459 int use_ascii (int i) {
12460 return ascii_mm[i] + ascii_ii[i];
12461 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012462 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012463 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012464 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012465 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12466 int use_ebcdic (int i) {
12467 return ebcdic_mm[i] + ebcdic_ii[i];
12468 }
12469 extern int foo;
12470
12471int
Illia Bobyra96d5442023-08-30 16:30:15 +020012472main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012473{
12474return use_ascii (foo) == use_ebcdic (foo);
12475 ;
12476 return 0;
12477}
12478_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012479if ac_fn_c_try_compile "$LINENO"
12480then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012481 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12482 ac_cv_c_bigendian=yes
12483 fi
12484 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12485 if test "$ac_cv_c_bigendian" = unknown; then
12486 ac_cv_c_bigendian=no
12487 else
12488 # finding both strings is unlikely to happen, but who knows?
12489 ac_cv_c_bigendian=unknown
12490 fi
12491 fi
12492fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012493rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12494else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12496/* end confdefs.h. */
12497$ac_includes_default
12498int
Illia Bobyra96d5442023-08-30 16:30:15 +020012499main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012500{
12501
12502 /* Are we little or big endian? From Harbison&Steele. */
12503 union
12504 {
12505 long int l;
12506 char c[sizeof (long int)];
12507 } u;
12508 u.l = 1;
12509 return u.c[sizeof (long int) - 1] == 1;
12510
12511 ;
12512 return 0;
12513}
12514_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012515if ac_fn_c_try_run "$LINENO"
12516then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012517 ac_cv_c_bigendian=no
Illia Bobyra96d5442023-08-30 16:30:15 +020012518else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012519 ac_cv_c_bigendian=yes
12520fi
12521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12522 conftest.$ac_objext conftest.beam conftest.$ac_ext
12523fi
12524
12525 fi
12526fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12528printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012529 case $ac_cv_c_bigendian in #(
12530 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020012531 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012532;; #(
12533 no)
12534 ;; #(
12535 universal)
12536
Illia Bobyra96d5442023-08-30 16:30:15 +020012537printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012538
12539 ;; #(
12540 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010012541 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012542 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12543 esac
12544
Illia Bobyra96d5442023-08-30 16:30:15 +020012545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12546printf %s "checking for inline... " >&6; }
12547if test ${ac_cv_c_inline+y}
12548then :
12549 printf %s "(cached) " >&6
12550else $as_nop
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012551 ac_cv_c_inline=no
12552for ac_kw in inline __inline__ __inline; do
12553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12554/* end confdefs.h. */
12555#ifndef __cplusplus
12556typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020012557static $ac_kw foo_t static_foo (void) {return 0; }
12558$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012559#endif
12560
12561_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012562if ac_fn_c_try_compile "$LINENO"
12563then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012564 ac_cv_c_inline=$ac_kw
12565fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012566rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012567 test "$ac_cv_c_inline" != no && break
12568done
12569
12570fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12572printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012573
12574case $ac_cv_c_inline in
12575 inline | yes) ;;
12576 *)
12577 case $ac_cv_c_inline in
12578 no) ac_val=;;
12579 *) ac_val=$ac_cv_c_inline;;
12580 esac
12581 cat >>confdefs.h <<_ACEOF
12582#ifndef __cplusplus
12583#define inline $ac_val
12584#endif
12585_ACEOF
12586 ;;
12587esac
12588
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012589
Illia Bobyra96d5442023-08-30 16:30:15 +020012590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
12591printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012592if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
12594printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012595else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012597/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012598
12599#include <sys/types.h>
12600#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012601# include <stdlib.h>
12602# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012603#endif
12604#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000012605# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012606#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012607
12608_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012610 $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
12611then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012612 ac_cv_type_rlim_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012613else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012614 ac_cv_type_rlim_t=no
12615fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012616rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012617
Illia Bobyra96d5442023-08-30 16:30:15 +020012618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
12619printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012620fi
12621if test $ac_cv_type_rlim_t = no; then
12622 cat >> confdefs.h <<\EOF
12623#define rlim_t unsigned long
12624EOF
12625fi
12626
Illia Bobyra96d5442023-08-30 16:30:15 +020012627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
12628printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012629if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
12631printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012632else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012634/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012635
12636#include <sys/types.h>
12637#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012638# include <stdlib.h>
12639# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012640#endif
12641#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012642
12643_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012645 $EGREP "stack_t" >/dev/null 2>&1
12646then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012647 ac_cv_type_stack_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012648else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012649 ac_cv_type_stack_t=no
12650fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012651rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012652
Illia Bobyra96d5442023-08-30 16:30:15 +020012653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
12654printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012655fi
12656if test $ac_cv_type_stack_t = no; then
12657 cat >> confdefs.h <<\EOF
12658#define stack_t struct sigaltstack
12659EOF
12660fi
12661
Illia Bobyra96d5442023-08-30 16:30:15 +020012662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
12663printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012665/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012666
12667#include <sys/types.h>
12668#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012669# include <stdlib.h>
12670# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012671#endif
12672#include <signal.h>
12673#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012674
12675int
Illia Bobyra96d5442023-08-30 16:30:15 +020012676main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012677{
12678stack_t sigstk; sigstk.ss_base = 0;
12679 ;
12680 return 0;
12681}
12682_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012683if ac_fn_c_try_compile "$LINENO"
12684then :
12685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12686printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012687
Illia Bobyra96d5442023-08-30 16:30:15 +020012688else $as_nop
12689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12690printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012691fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012692rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012693
12694olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020012695{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
12696printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012697
Bram Moolenaar446cb832008-06-24 21:56:24 +000012698# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020012699if test ${with_tlib+y}
12700then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012701 withval=$with_tlib;
12702fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012703
12704if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
12706printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012707 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020012708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
12709printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012711/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012712
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012713int
Illia Bobyra96d5442023-08-30 16:30:15 +020012714main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012715{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012716
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012717 ;
12718 return 0;
12719}
12720_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012721if ac_fn_c_try_link "$LINENO"
12722then :
12723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
12724printf "%s\n" "OK" >&6; }
12725else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012726 as_fn_error $? "FAILED" "$LINENO" 5
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012727fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012728rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012729 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012730 olibs="$LIBS"
12731else
Illia Bobyra96d5442023-08-30 16:30:15 +020012732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
12733printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000012734 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010012735 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
12736 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012737 esac
12738 for libname in $tlibs; do
Illia Bobyra96d5442023-08-30 16:30:15 +020012739 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | $as_tr_sh`
12740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
12741printf %s "checking for tgetent in -l${libname}... " >&6; }
12742if eval test \${$as_ac_Lib+y}
12743then :
12744 printf %s "(cached) " >&6
12745else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012746 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000012747LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012749/* end confdefs.h. */
12750
Bram Moolenaar446cb832008-06-24 21:56:24 +000012751/* Override any GCC internal prototype to avoid an error.
12752 Use char because int might match the return type of a GCC
12753 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012754char tgetent ();
12755int
Illia Bobyra96d5442023-08-30 16:30:15 +020012756main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012757{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012758return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012759 ;
12760 return 0;
12761}
12762_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012763if ac_fn_c_try_link "$LINENO"
12764then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012765 eval "$as_ac_Lib=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020012766else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012767 eval "$as_ac_Lib=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012768fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012769rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012770 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012771LIBS=$ac_check_lib_save_LIBS
12772fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012773eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020012774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12775printf "%s\n" "$ac_res" >&6; }
12776if eval test \"x\$"$as_ac_Lib"\" = x"yes"
12777then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012778 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012779#define `printf "%s\n" "HAVE_LIB${libname}" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012780_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012781
12782 LIBS="-l${libname} $LIBS"
12783
Bram Moolenaar071d4272004-06-13 20:20:40 +000012784fi
12785
12786 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012787 if test "$cross_compiling" = yes
12788then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012789 res="FAIL"
Illia Bobyra96d5442023-08-30 16:30:15 +020012790else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012792/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012793
12794#ifdef HAVE_TERMCAP_H
12795# include <termcap.h>
12796#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012797#if STDC_HEADERS
12798# include <stdlib.h>
12799# include <stddef.h>
12800#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012801int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012802_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012803if ac_fn_c_try_run "$LINENO"
12804then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012805 res="OK"
Illia Bobyra96d5442023-08-30 16:30:15 +020012806else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012807 res="FAIL"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012808fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12810 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012811fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012812
Bram Moolenaar071d4272004-06-13 20:20:40 +000012813 if test "$res" = "OK"; then
12814 break
12815 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12817printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012818 LIBS="$olibs"
12819 fi
12820 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012821 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12823printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012824 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012825fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012826
12827if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12829printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012831/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020012832int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012833int
Illia Bobyra96d5442023-08-30 16:30:15 +020012834main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012835{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012836char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012837 ;
12838 return 0;
12839}
12840_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012841if ac_fn_c_try_link "$LINENO"
12842then :
12843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12844printf "%s\n" "yes" >&6; }
12845else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012846 as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012847 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020012848 On Linux that would be the libncurses-dev package.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012849 Or specify the name of the library with --with-tlib." "$LINENO" 5
12850fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012851rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012852 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012853fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012854
Illia Bobyra96d5442023-08-30 16:30:15 +020012855{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12856printf %s "checking whether we talk terminfo... " >&6; }
12857if test ${vim_cv_terminfo+y}
12858then :
12859 printf %s "(cached) " >&6
12860else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012861
Illia Bobyra96d5442023-08-30 16:30:15 +020012862 if test "$cross_compiling" = yes
12863then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012864
Bram Moolenaar7db77842014-03-27 17:40:59 +010012865 as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012866
Illia Bobyra96d5442023-08-30 16:30:15 +020012867else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12869/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012870
Bram Moolenaar446cb832008-06-24 21:56:24 +000012871#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012872#ifdef HAVE_TERMCAP_H
12873# include <termcap.h>
12874#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012875#ifdef HAVE_STRING_H
12876# include <string.h>
12877#endif
12878#if STDC_HEADERS
12879# include <stdlib.h>
12880# include <stddef.h>
12881#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012882int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012883{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012884
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012885_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012886if ac_fn_c_try_run "$LINENO"
12887then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012888
12889 vim_cv_terminfo=no
12890
Illia Bobyra96d5442023-08-30 16:30:15 +020012891else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012892
12893 vim_cv_terminfo=yes
12894
12895fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12897 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012898fi
12899
12900
Bram Moolenaar446cb832008-06-24 21:56:24 +000012901fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12903printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012904
12905if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012906 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012907
12908fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012909
Illia Bobyra96d5442023-08-30 16:30:15 +020012910{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12911printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
12912if test ${vim_cv_tgetent+y}
12913then :
12914 printf %s "(cached) " >&6
12915else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012916
Illia Bobyra96d5442023-08-30 16:30:15 +020012917 if test "$cross_compiling" = yes
12918then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012919
Bram Moolenaar696cbd22017-04-28 15:45:46 +020012920 as_fn_error $? "failed to compile test program." "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012921
Illia Bobyra96d5442023-08-30 16:30:15 +020012922else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12924/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012925
Bram Moolenaar446cb832008-06-24 21:56:24 +000012926#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012927#ifdef HAVE_TERMCAP_H
12928# include <termcap.h>
12929#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012930#if STDC_HEADERS
12931# include <stdlib.h>
12932# include <stddef.h>
12933#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012934int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012935{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012936
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012937_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012938if ac_fn_c_try_run "$LINENO"
12939then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012940
Bram Moolenaara88254f2017-11-02 23:04:14 +010012941 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000012942
Illia Bobyra96d5442023-08-30 16:30:15 +020012943else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012944
Bram Moolenaara88254f2017-11-02 23:04:14 +010012945 vim_cv_tgetent=non-zero
Bram Moolenaar446cb832008-06-24 21:56:24 +000012946
Bram Moolenaar071d4272004-06-13 20:20:40 +000012947fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012950fi
12951
Bram Moolenaar446cb832008-06-24 21:56:24 +000012952
Bram Moolenaar446cb832008-06-24 21:56:24 +000012953fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012954{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12955printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012956
Bram Moolenaara88254f2017-11-02 23:04:14 +010012957if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012958 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012959
Bram Moolenaar446cb832008-06-24 21:56:24 +000012960fi
12961
Illia Bobyra96d5442023-08-30 16:30:15 +020012962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12963printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012965/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012966
12967#ifdef HAVE_TERMCAP_H
12968# include <termcap.h>
12969#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012970
12971int
Illia Bobyra96d5442023-08-30 16:30:15 +020012972main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012973{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012974ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012975 ;
12976 return 0;
12977}
12978_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012979if ac_fn_c_try_link "$LINENO"
12980then :
12981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12982printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012983
Illia Bobyra96d5442023-08-30 16:30:15 +020012984else $as_nop
12985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12986printf "%s\n" "no" >&6; }
12987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12988printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012990/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012991
12992#ifdef HAVE_TERMCAP_H
12993# include <termcap.h>
12994#endif
12995extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012996
12997int
Illia Bobyra96d5442023-08-30 16:30:15 +020012998main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012999{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013000ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013001 ;
13002 return 0;
13003}
13004_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013005if ac_fn_c_try_link "$LINENO"
13006then :
13007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13008printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013009
Illia Bobyra96d5442023-08-30 16:30:15 +020013010else $as_nop
13011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13012printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013013fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013014rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013015 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013016
13017fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013018rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013019 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013020
Illia Bobyra96d5442023-08-30 16:30:15 +020013021{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
13022printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013024/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013025
13026#ifdef HAVE_TERMCAP_H
13027# include <termcap.h>
13028#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013029
13030int
Illia Bobyra96d5442023-08-30 16:30:15 +020013031main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013032{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013033if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013034 ;
13035 return 0;
13036}
13037_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013038if ac_fn_c_try_link "$LINENO"
13039then :
13040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13041printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013042
Illia Bobyra96d5442023-08-30 16:30:15 +020013043else $as_nop
13044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13045printf "%s\n" "no" >&6; }
13046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13047printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013049/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013050
13051#ifdef HAVE_TERMCAP_H
13052# include <termcap.h>
13053#endif
13054extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013055
13056int
Illia Bobyra96d5442023-08-30 16:30:15 +020013057main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013058{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013059if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013060 ;
13061 return 0;
13062}
13063_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013064if ac_fn_c_try_link "$LINENO"
13065then :
13066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13067printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013068
Illia Bobyra96d5442023-08-30 16:30:15 +020013069else $as_nop
13070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13071printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013072fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013073rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013074 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013075
13076fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013077rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013078 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013079
Illia Bobyra96d5442023-08-30 16:30:15 +020013080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13081printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013083/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013084
13085#ifdef HAVE_TERMCAP_H
13086# include <termcap.h>
13087#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013088
13089int
Illia Bobyra96d5442023-08-30 16:30:15 +020013090main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013091{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013092extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013093 ;
13094 return 0;
13095}
13096_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013097if ac_fn_c_try_compile "$LINENO"
13098then :
13099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13100printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013101
Illia Bobyra96d5442023-08-30 16:30:15 +020013102else $as_nop
13103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13104printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013105fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013106rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013107
Illia Bobyra96d5442023-08-30 16:30:15 +020013108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13109printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13111/* end confdefs.h. */
13112
13113#ifdef HAVE_TERMCAP_H
13114# include <termcap.h>
13115#endif
13116#include <term.h>
13117
13118int
Illia Bobyra96d5442023-08-30 16:30:15 +020013119main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013120{
13121if (cur_term) del_curterm(cur_term);
13122 ;
13123 return 0;
13124}
13125_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013126if ac_fn_c_try_link "$LINENO"
13127then :
13128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13129printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013130
Illia Bobyra96d5442023-08-30 16:30:15 +020013131else $as_nop
13132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13133printf "%s\n" "no" >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013134fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013135rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013136 conftest$ac_exeext conftest.$ac_ext
13137
Illia Bobyra96d5442023-08-30 16:30:15 +020013138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13139printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013141/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013142
13143#include <sys/types.h>
13144#include <sys/time.h>
13145#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013146int
Illia Bobyra96d5442023-08-30 16:30:15 +020013147main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013148{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013149
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013150 ;
13151 return 0;
13152}
13153_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013154if ac_fn_c_try_compile "$LINENO"
13155then :
13156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13157printf "%s\n" "yes" >&6; }
13158 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013159
Illia Bobyra96d5442023-08-30 16:30:15 +020013160else $as_nop
13161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13162printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013163fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013164rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013165
Illia Bobyra96d5442023-08-30 16:30:15 +020013166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13167printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013168if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013169 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013170
Illia Bobyra96d5442023-08-30 16:30:15 +020013171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13172printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013173else
Illia Bobyra96d5442023-08-30 16:30:15 +020013174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013176fi
13177
Illia Bobyra96d5442023-08-30 16:30:15 +020013178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13179printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013180if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013182/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013183
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013184// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13185char *ptsname(int);
13186int unlockpt(int);
13187int grantpt(int);
13188
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013189int
Illia Bobyra96d5442023-08-30 16:30:15 +020013190main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013191{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013192
13193 ptsname(0);
13194 grantpt(0);
13195 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013196 ;
13197 return 0;
13198}
13199_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013200if ac_fn_c_try_link "$LINENO"
13201then :
13202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13203printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013204
Illia Bobyra96d5442023-08-30 16:30:15 +020013205else $as_nop
13206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13207printf "%s\n" "no" >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013208fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013209rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013210 conftest$ac_exeext conftest.$ac_ext
13211else
Illia Bobyra96d5442023-08-30 16:30:15 +020013212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13213printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013214fi
13215
Illia Bobyra96d5442023-08-30 16:30:15 +020013216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13217printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013218if test -d /dev/ptym ; then
13219 pdir='/dev/ptym'
13220else
13221 pdir='/dev'
13222fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013224/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013225#ifdef M_UNIX
13226 yes;
13227#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013228
13229_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020013231 $EGREP "yes" >/dev/null 2>&1
13232then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013233 ptys=`echo /dev/ptyp??`
Illia Bobyra96d5442023-08-30 16:30:15 +020013234else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000013235 ptys=`echo $pdir/pty??`
13236fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013237rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013238
13239if test "$ptys" != "$pdir/pty??" ; then
13240 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13241 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013242 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013243
Illia Bobyra96d5442023-08-30 16:30:15 +020013244 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013245
Illia Bobyra96d5442023-08-30 16:30:15 +020013246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13247printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013248else
Illia Bobyra96d5442023-08-30 16:30:15 +020013249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13250printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013251fi
13252
Bram Moolenaar446cb832008-06-24 21:56:24 +000013253
Illia Bobyra96d5442023-08-30 16:30:15 +020013254{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13255printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013257/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013258
13259#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013260int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013261{
13262 struct sigcontext *scont;
13263 scont = (struct sigcontext *)0;
13264 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013265}
13266int
Illia Bobyra96d5442023-08-30 16:30:15 +020013267main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013268{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013269
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013270 ;
13271 return 0;
13272}
13273_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013274if ac_fn_c_try_compile "$LINENO"
13275then :
13276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13277printf "%s\n" "yes" >&6; }
13278 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013279
Illia Bobyra96d5442023-08-30 16:30:15 +020013280else $as_nop
13281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13282printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013283fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013284rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013285
Illia Bobyra96d5442023-08-30 16:30:15 +020013286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13287printf %s "checking getcwd implementation is broken... " >&6; }
13288if test ${vim_cv_getcwd_broken+y}
13289then :
13290 printf %s "(cached) " >&6
13291else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013292
Illia Bobyra96d5442023-08-30 16:30:15 +020013293 if test "$cross_compiling" = yes
13294then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013295
Bram Moolenaar7db77842014-03-27 17:40:59 +010013296 as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000013297
Illia Bobyra96d5442023-08-30 16:30:15 +020013298else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013301
Bram Moolenaar446cb832008-06-24 21:56:24 +000013302#include "confdefs.h"
13303#ifdef HAVE_UNISTD_H
13304#include <unistd.h>
13305#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013306char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013307int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013308{
13309 char buffer[500];
13310 extern char **environ;
13311 environ = dagger;
13312 return getcwd(buffer, 500) ? 0 : 1;
13313}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013314
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013315_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013316if ac_fn_c_try_run "$LINENO"
13317then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013318
13319 vim_cv_getcwd_broken=no
13320
Illia Bobyra96d5442023-08-30 16:30:15 +020013321else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013322
13323 vim_cv_getcwd_broken=yes
13324
13325fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013328fi
13329
13330
Bram Moolenaar446cb832008-06-24 21:56:24 +000013331fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13333printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013334
13335if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013336 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013337
Bram Moolenaar63d25552019-05-10 21:28:38 +020013338 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013339if test "x$ac_cv_func_getwd" = xyes
13340then :
13341 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013342
Bram Moolenaar071d4272004-06-13 20:20:40 +000013343fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013344
Illia Bobyra96d5442023-08-30 16:30:15 +020013345fi
13346
13347ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13348if test "x$ac_cv_func_fchdir" = xyes
13349then :
13350 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013351
Bram Moolenaar071d4272004-06-13 20:20:40 +000013352fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013353ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13354if test "x$ac_cv_func_fchown" = xyes
13355then :
13356 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013357
Illia Bobyra96d5442023-08-30 16:30:15 +020013358fi
13359ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13360if test "x$ac_cv_func_fchmod" = xyes
13361then :
13362 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13363
13364fi
13365ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13366if test "x$ac_cv_func_fsync" = xyes
13367then :
13368 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13369
13370fi
13371ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13372if test "x$ac_cv_func_getcwd" = xyes
13373then :
13374 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13375
13376fi
13377ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13378if test "x$ac_cv_func_getpseudotty" = xyes
13379then :
13380 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13381
13382fi
13383ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13384if test "x$ac_cv_func_getpwent" = xyes
13385then :
13386 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13387
13388fi
13389ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13390if test "x$ac_cv_func_getpwnam" = xyes
13391then :
13392 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13393
13394fi
13395ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13396if test "x$ac_cv_func_getpwuid" = xyes
13397then :
13398 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13399
13400fi
13401ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13402if test "x$ac_cv_func_getrlimit" = xyes
13403then :
13404 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13405
13406fi
13407ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13408if test "x$ac_cv_func_gettimeofday" = xyes
13409then :
13410 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13411
13412fi
13413ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13414if test "x$ac_cv_func_localtime_r" = xyes
13415then :
13416 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13417
13418fi
13419ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13420if test "x$ac_cv_func_lstat" = xyes
13421then :
13422 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13423
13424fi
13425ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13426if test "x$ac_cv_func_memset" = xyes
13427then :
13428 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13429
13430fi
13431ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13432if test "x$ac_cv_func_mkdtemp" = xyes
13433then :
13434 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13435
13436fi
13437ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13438if test "x$ac_cv_func_nanosleep" = xyes
13439then :
13440 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13441
13442fi
13443ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13444if test "x$ac_cv_func_opendir" = xyes
13445then :
13446 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13447
13448fi
13449ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13450if test "x$ac_cv_func_putenv" = xyes
13451then :
13452 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13453
13454fi
13455ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13456if test "x$ac_cv_func_qsort" = xyes
13457then :
13458 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13459
13460fi
13461ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13462if test "x$ac_cv_func_readlink" = xyes
13463then :
13464 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13465
13466fi
13467ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13468if test "x$ac_cv_func_select" = xyes
13469then :
13470 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13471
13472fi
13473ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13474if test "x$ac_cv_func_setenv" = xyes
13475then :
13476 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13477
13478fi
13479ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13480if test "x$ac_cv_func_getpgid" = xyes
13481then :
13482 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13483
13484fi
13485ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13486if test "x$ac_cv_func_setpgid" = xyes
13487then :
13488 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13489
13490fi
13491ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13492if test "x$ac_cv_func_setsid" = xyes
13493then :
13494 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13495
13496fi
13497ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13498if test "x$ac_cv_func_sigaltstack" = xyes
13499then :
13500 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13501
13502fi
13503ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
13504if test "x$ac_cv_func_sigstack" = xyes
13505then :
13506 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
13507
13508fi
13509ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
13510if test "x$ac_cv_func_sigset" = xyes
13511then :
13512 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
13513
13514fi
13515ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
13516if test "x$ac_cv_func_sigsetjmp" = xyes
13517then :
13518 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
13519
13520fi
13521ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13522if test "x$ac_cv_func_sigaction" = xyes
13523then :
13524 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13525
13526fi
13527ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
13528if test "x$ac_cv_func_sigprocmask" = xyes
13529then :
13530 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
13531
13532fi
13533ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
13534if test "x$ac_cv_func_sigvec" = xyes
13535then :
13536 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
13537
13538fi
13539ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
13540if test "x$ac_cv_func_strcasecmp" = xyes
13541then :
13542 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
13543
13544fi
13545ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
13546if test "x$ac_cv_func_strcoll" = xyes
13547then :
13548 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
13549
13550fi
13551ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13552if test "x$ac_cv_func_strerror" = xyes
13553then :
13554 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
13555
13556fi
13557ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13558if test "x$ac_cv_func_strftime" = xyes
13559then :
13560 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13561
13562fi
13563ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
13564if test "x$ac_cv_func_stricmp" = xyes
13565then :
13566 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
13567
13568fi
13569ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13570if test "x$ac_cv_func_strncasecmp" = xyes
13571then :
13572 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
13573
13574fi
13575ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
13576if test "x$ac_cv_func_strnicmp" = xyes
13577then :
13578 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
13579
13580fi
13581ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
13582if test "x$ac_cv_func_strpbrk" = xyes
13583then :
13584 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
13585
13586fi
13587ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
13588if test "x$ac_cv_func_strptime" = xyes
13589then :
13590 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
13591
13592fi
13593ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13594if test "x$ac_cv_func_strtol" = xyes
13595then :
13596 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
13597
13598fi
13599ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
13600if test "x$ac_cv_func_tgetent" = xyes
13601then :
13602 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
13603
13604fi
13605ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13606if test "x$ac_cv_func_towlower" = xyes
13607then :
13608 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
13609
13610fi
13611ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
13612if test "x$ac_cv_func_towupper" = xyes
13613then :
13614 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
13615
13616fi
13617ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
13618if test "x$ac_cv_func_iswupper" = xyes
13619then :
13620 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
13621
13622fi
13623ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
13624if test "x$ac_cv_func_tzset" = xyes
13625then :
13626 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
13627
13628fi
13629ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
13630if test "x$ac_cv_func_usleep" = xyes
13631then :
13632 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
13633
13634fi
13635ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
13636if test "x$ac_cv_func_utime" = xyes
13637then :
13638 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
13639
13640fi
13641ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13642if test "x$ac_cv_func_utimes" = xyes
13643then :
13644 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13645
13646fi
13647ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
13648if test "x$ac_cv_func_mblen" = xyes
13649then :
13650 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
13651
13652fi
13653ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13654if test "x$ac_cv_func_ftruncate" = xyes
13655then :
13656 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13657
13658fi
13659ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13660if test "x$ac_cv_func_unsetenv" = xyes
13661then :
13662 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
13663
13664fi
13665ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
13666if test "x$ac_cv_func_posix_openpt" = xyes
13667then :
13668 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
13669
13670fi
13671ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13672if test "x$ac_cv_func_clock_gettime" = xyes
13673then :
13674 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013675
13676fi
13677
Bram Moolenaar643b6142018-09-12 20:29:09 +020013678
Illia Bobyra96d5442023-08-30 16:30:15 +020013679
13680
13681{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
13682printf %s "checking types of arguments for select... " >&6; }
13683if test ${ac_cv_func_select_args+y}
13684then :
13685 printf %s "(cached) " >&6
13686else $as_nop
13687 ac_cv_func_select_args='int,int *,struct timeval *'
13688for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020013689 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
13690 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
13691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13692/* end confdefs.h. */
13693$ac_includes_default
13694#ifdef HAVE_SYS_SELECT_H
13695# include <sys/select.h>
13696#endif
13697#ifdef HAVE_SYS_SOCKET_H
13698# include <sys/socket.h>
13699#endif
13700
13701int
Illia Bobyra96d5442023-08-30 16:30:15 +020013702main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020013703{
13704extern int select ($ac_arg1,
13705 $ac_arg234, $ac_arg234, $ac_arg234,
13706 $ac_arg5);
13707 ;
13708 return 0;
13709}
13710_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013711if ac_fn_c_try_compile "$LINENO"
13712then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020013713 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
13714fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013715rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020013716 done
13717 done
13718done
Bram Moolenaar643b6142018-09-12 20:29:09 +020013719
13720fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
13722printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020013723ac_save_IFS=$IFS; IFS=','
13724set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
13725IFS=$ac_save_IFS
13726shift
13727
Illia Bobyra96d5442023-08-30 16:30:15 +020013728printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013729
13730
Illia Bobyra96d5442023-08-30 16:30:15 +020013731printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013732
13733
Illia Bobyra96d5442023-08-30 16:30:15 +020013734printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013735
Illia Bobyra96d5442023-08-30 16:30:15 +020013736rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020013737
Illia Bobyra96d5442023-08-30 16:30:15 +020013738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13739printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13740if test ${ac_cv_sys_largefile_source+y}
13741then :
13742 printf %s "(cached) " >&6
13743else $as_nop
Bram Moolenaar25153e12010-02-24 14:47:08 +010013744 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013746/* end confdefs.h. */
13747#include <sys/types.h> /* for off_t */
13748 #include <stdio.h>
13749int
Illia Bobyra96d5442023-08-30 16:30:15 +020013750main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013751{
13752int (*fp) (FILE *, off_t, int) = fseeko;
13753 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13754 ;
13755 return 0;
13756}
13757_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013758if ac_fn_c_try_link "$LINENO"
13759then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013760 ac_cv_sys_largefile_source=no; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013761fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013762rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013763 conftest$ac_exeext conftest.$ac_ext
13764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013765/* end confdefs.h. */
13766#define _LARGEFILE_SOURCE 1
13767#include <sys/types.h> /* for off_t */
13768 #include <stdio.h>
13769int
Illia Bobyra96d5442023-08-30 16:30:15 +020013770main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013771{
13772int (*fp) (FILE *, off_t, int) = fseeko;
13773 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13774 ;
13775 return 0;
13776}
13777_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013778if ac_fn_c_try_link "$LINENO"
13779then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013780 ac_cv_sys_largefile_source=1; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013781fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013782rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013783 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013784 ac_cv_sys_largefile_source=unknown
13785 break
13786done
13787fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013788{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13789printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
Bram Moolenaar25153e12010-02-24 14:47:08 +010013790case $ac_cv_sys_largefile_source in #(
13791 no | unknown) ;;
13792 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013793printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013794;;
13795esac
13796rm -rf conftest*
13797
13798# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13799# in glibc 2.1.3, but that breaks too many other things.
13800# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13801if test $ac_cv_sys_largefile_source != unknown; then
13802
Illia Bobyra96d5442023-08-30 16:30:15 +020013803printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013804
13805fi
13806
Bram Moolenaar071d4272004-06-13 20:20:40 +000013807
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013808# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013809if test ${enable_largefile+y}
13810then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013811 enableval=$enable_largefile;
13812fi
13813
13814if test "$enable_largefile" != no; then
13815
Illia Bobyra96d5442023-08-30 16:30:15 +020013816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13817printf %s "checking for special C compiler options needed for large files... " >&6; }
13818if test ${ac_cv_sys_largefile_CC+y}
13819then :
13820 printf %s "(cached) " >&6
13821else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013822 ac_cv_sys_largefile_CC=no
13823 if test "$GCC" != yes; then
13824 ac_save_CC=$CC
13825 while :; do
13826 # IRIX 6.2 and later do not support large files by default,
13827 # so use the C compiler's -n32 option if that helps.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013829/* end confdefs.h. */
13830#include <sys/types.h>
13831 /* Check that off_t can represent 2**63 - 1 correctly.
13832 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13833 since some C++ compilers masquerading as C compilers
13834 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013835#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013836 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13837 && LARGE_OFF_T % 2147483647 == 1)
13838 ? 1 : -1];
13839int
Illia Bobyra96d5442023-08-30 16:30:15 +020013840main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013841{
13842
13843 ;
13844 return 0;
13845}
13846_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013847 if ac_fn_c_try_compile "$LINENO"
13848then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013849 break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013850fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013851rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013852 CC="$CC -n32"
Illia Bobyra96d5442023-08-30 16:30:15 +020013853 if ac_fn_c_try_compile "$LINENO"
13854then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013855 ac_cv_sys_largefile_CC=' -n32'; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013856fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013857rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013858 break
13859 done
13860 CC=$ac_save_CC
13861 rm -f conftest.$ac_ext
13862 fi
13863fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13865printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013866 if test "$ac_cv_sys_largefile_CC" != no; then
13867 CC=$CC$ac_cv_sys_largefile_CC
13868 fi
13869
Illia Bobyra96d5442023-08-30 16:30:15 +020013870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13871printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13872if test ${ac_cv_sys_file_offset_bits+y}
13873then :
13874 printf %s "(cached) " >&6
13875else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013876 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013878/* end confdefs.h. */
13879#include <sys/types.h>
13880 /* Check that off_t can represent 2**63 - 1 correctly.
13881 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13882 since some C++ compilers masquerading as C compilers
13883 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013884#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013885 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13886 && LARGE_OFF_T % 2147483647 == 1)
13887 ? 1 : -1];
13888int
Illia Bobyra96d5442023-08-30 16:30:15 +020013889main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013890{
13891
13892 ;
13893 return 0;
13894}
13895_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013896if ac_fn_c_try_compile "$LINENO"
13897then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013898 ac_cv_sys_file_offset_bits=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013899fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013900rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013902/* end confdefs.h. */
13903#define _FILE_OFFSET_BITS 64
13904#include <sys/types.h>
13905 /* Check that off_t can represent 2**63 - 1 correctly.
13906 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13907 since some C++ compilers masquerading as C compilers
13908 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013909#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013910 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13911 && LARGE_OFF_T % 2147483647 == 1)
13912 ? 1 : -1];
13913int
Illia Bobyra96d5442023-08-30 16:30:15 +020013914main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013915{
13916
13917 ;
13918 return 0;
13919}
13920_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013921if ac_fn_c_try_compile "$LINENO"
13922then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013923 ac_cv_sys_file_offset_bits=64; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013924fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013925rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013926 ac_cv_sys_file_offset_bits=unknown
13927 break
13928done
13929fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13931printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013932case $ac_cv_sys_file_offset_bits in #(
13933 no | unknown) ;;
13934 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013935printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013936;;
13937esac
13938rm -rf conftest*
13939 if test $ac_cv_sys_file_offset_bits = unknown; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13941printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13942if test ${ac_cv_sys_large_files+y}
13943then :
13944 printf %s "(cached) " >&6
13945else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013946 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013948/* end confdefs.h. */
13949#include <sys/types.h>
13950 /* Check that off_t can represent 2**63 - 1 correctly.
13951 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13952 since some C++ compilers masquerading as C compilers
13953 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013954#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013955 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13956 && LARGE_OFF_T % 2147483647 == 1)
13957 ? 1 : -1];
13958int
Illia Bobyra96d5442023-08-30 16:30:15 +020013959main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013960{
13961
13962 ;
13963 return 0;
13964}
13965_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013966if ac_fn_c_try_compile "$LINENO"
13967then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013968 ac_cv_sys_large_files=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013969fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013970rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013972/* end confdefs.h. */
13973#define _LARGE_FILES 1
13974#include <sys/types.h>
13975 /* Check that off_t can represent 2**63 - 1 correctly.
13976 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13977 since some C++ compilers masquerading as C compilers
13978 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013979#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013980 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13981 && LARGE_OFF_T % 2147483647 == 1)
13982 ? 1 : -1];
13983int
Illia Bobyra96d5442023-08-30 16:30:15 +020013984main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013985{
13986
13987 ;
13988 return 0;
13989}
13990_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013991if ac_fn_c_try_compile "$LINENO"
13992then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013993 ac_cv_sys_large_files=1; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013994fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013995rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013996 ac_cv_sys_large_files=unknown
13997 break
13998done
13999fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14001printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014002case $ac_cv_sys_large_files in #(
14003 no | unknown) ;;
14004 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020014005printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014006;;
14007esac
14008rm -rf conftest*
14009 fi
14010fi
14011
14012
Illia Bobyra96d5442023-08-30 16:30:15 +020014013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
14014printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014015# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014016if test ${enable_canberra+y}
14017then :
Bram Moolenaar21606672019-06-14 20:40:58 +020014018 enableval=$enable_canberra;
Illia Bobyra96d5442023-08-30 16:30:15 +020014019else $as_nop
Bram Moolenaar21606672019-06-14 20:40:58 +020014020 enable_canberra="maybe"
14021fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014022
Bram Moolenaar21606672019-06-14 20:40:58 +020014023
14024if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014025 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14027printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014028 enable_canberra="yes"
14029 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14031printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014032 enable_canberra="no"
14033 fi
14034else
Bram Moolenaar12471262022-01-18 11:11:25 +000014035 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
14037printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014038 enable_canberra="no"
14039 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14041printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014042 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014043fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014044if test "$enable_canberra" = "yes"; then
14045 if test "x$PKG_CONFIG" != "xno"; then
14046 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14047 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14048 fi
14049 if test "x$canberra_lib" = "x"; then
14050 canberra_lib=-lcanberra
14051 canberra_cflags=-D_REENTRANT
14052 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14054printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014055 ac_save_CFLAGS="$CFLAGS"
14056 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014057 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014058 CFLAGS="$CFLAGS $canberra_cflags"
14059 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014060 LIBS="$LIBS $canberra_lib"
14061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014062/* end confdefs.h. */
14063
Bram Moolenaar21606672019-06-14 20:40:58 +020014064 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014065
14066int
Illia Bobyra96d5442023-08-30 16:30:15 +020014067main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014068{
14069
Bram Moolenaar21606672019-06-14 20:40:58 +020014070 ca_context *hello;
14071 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014072 ;
14073 return 0;
14074}
14075_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014076if ac_fn_c_try_link "$LINENO"
14077then :
14078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14079printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014080
Illia Bobyra96d5442023-08-30 16:30:15 +020014081else $as_nop
14082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14083printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014084fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014085rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014086 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014087fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014088
Illia Bobyra96d5442023-08-30 16:30:15 +020014089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14090printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014091# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014092if test ${enable_libsodium+y}
14093then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014094 enableval=$enable_libsodium;
Illia Bobyra96d5442023-08-30 16:30:15 +020014095else $as_nop
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014096 enable_libsodium="maybe"
14097fi
14098
14099
14100if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014101 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14103printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014104 enable_libsodium="yes"
14105 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14107printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014108 enable_libsodium="no"
14109 fi
14110else
Illia Bobyra96d5442023-08-30 16:30:15 +020014111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14112printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014113fi
14114if test "$enable_libsodium" = "yes"; then
14115 if test "x$PKG_CONFIG" != "xno"; then
14116 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14117 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14118 fi
14119 if test "x$libsodium_lib" = "x"; then
14120 libsodium_lib=-lsodium
14121 libsodium_cflags=
14122 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14124printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014125 ac_save_CFLAGS="$CFLAGS"
14126 ac_save_LIBS="$LIBS"
14127 CFLAGS="$CFLAGS $libsodium_cflags"
14128 LIBS="$LIBS $libsodium_lib"
14129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14130/* end confdefs.h. */
14131
14132 # include <sodium.h>
14133
14134int
Illia Bobyra96d5442023-08-30 16:30:15 +020014135main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014136{
14137
14138 printf("%d", sodium_init());
14139 ;
14140 return 0;
14141}
14142_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014143if ac_fn_c_try_link "$LINENO"
14144then :
14145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14146printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014147
Illia Bobyra96d5442023-08-30 16:30:15 +020014148else $as_nop
14149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14150printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014151fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014152rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014153 conftest$ac_exeext conftest.$ac_ext
14154fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014155
Illia Bobyra96d5442023-08-30 16:30:15 +020014156{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14157printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014159/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014160#include <sys/types.h>
14161#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014162int
Illia Bobyra96d5442023-08-30 16:30:15 +020014163main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014164{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014165 struct stat st;
14166 int n;
14167
14168 stat("/", &st);
14169 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014170 ;
14171 return 0;
14172}
14173_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014174if ac_fn_c_try_compile "$LINENO"
14175then :
14176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14177printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014178
Illia Bobyra96d5442023-08-30 16:30:15 +020014179else $as_nop
14180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14181printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014182fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014183rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014184
Illia Bobyra96d5442023-08-30 16:30:15 +020014185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14186printf %s "checking for timer_create without -lrt... " >&6; }
14187if test ${vim_cv_timer_create+y}
14188then :
14189 printf %s "(cached) " >&6
14190else $as_nop
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014191
Illia Bobyra96d5442023-08-30 16:30:15 +020014192if test "$cross_compiling" = yes
14193then :
14194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
14195printf "%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 +010014196
Illia Bobyra96d5442023-08-30 16:30:15 +020014197else $as_nop
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014199/* end confdefs.h. */
14200
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014201#if STDC_HEADERS
14202# include <stdlib.h>
14203# include <stddef.h>
14204#endif
14205#include <signal.h>
14206#include <time.h>
Bram Moolenaare5303952022-06-19 17:05:47 +010014207static void set_flag(union sigval sv) {}
Paul Ollis65745772022-06-05 16:55:54 +010014208
14209int
Illia Bobyra96d5442023-08-30 16:30:15 +020014210main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014211{
14212
14213 struct timespec ts;
14214 struct sigevent action = {0};
14215 timer_t timer_id;
14216
14217 action.sigev_notify = SIGEV_THREAD;
14218 action.sigev_notify_function = set_flag;
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014219 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14220 exit(1); // cannot create a monotonic timer
Paul Ollis65745772022-06-05 16:55:54 +010014221
14222 ;
14223 return 0;
14224}
14225_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014226if ac_fn_c_try_run "$LINENO"
14227then :
Richard Purdie509695c2022-07-24 20:48:00 +010014228 vim_cv_timer_create=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014229else $as_nop
Richard Purdie509695c2022-07-24 20:48:00 +010014230 vim_cv_timer_create=no
Paul Ollis65745772022-06-05 16:55:54 +010014231fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14233 conftest.$ac_objext conftest.beam conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014234fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014235
14236fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14238printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014239
14240if test "x$vim_cv_timer_create" = "xno" ; then
14241 save_LIBS="$LIBS"
14242 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14244printf %s "checking for timer_create with -lrt... " >&6; }
14245if test ${vim_cv_timer_create_with_lrt+y}
14246then :
14247 printf %s "(cached) " >&6
14248else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014249
Illia Bobyra96d5442023-08-30 16:30:15 +020014250 if test "$cross_compiling" = yes
14251then :
14252 { 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
14253printf "%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 +010014254
Illia Bobyra96d5442023-08-30 16:30:15 +020014255else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14257/* end confdefs.h. */
14258
14259 #if STDC_HEADERS
14260 # include <stdlib.h>
14261 # include <stddef.h>
14262 #endif
14263 #include <signal.h>
14264 #include <time.h>
14265 static void set_flag(union sigval sv) {}
14266
14267int
Illia Bobyra96d5442023-08-30 16:30:15 +020014268main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014269{
14270
14271 struct timespec ts;
14272 struct sigevent action = {0};
14273 timer_t timer_id;
14274
14275 action.sigev_notify = SIGEV_THREAD;
14276 action.sigev_notify_function = set_flag;
14277 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14278 exit(1); // cannot create a monotonic timer
14279
14280 ;
14281 return 0;
14282}
14283_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014284if ac_fn_c_try_run "$LINENO"
14285then :
Bram Moolenaarefffa532022-07-28 22:39:54 +010014286 vim_cv_timer_create_with_lrt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014287else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014288 vim_cv_timer_create_with_lrt=no
14289fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14291 conftest.$ac_objext conftest.beam conftest.$ac_ext
14292fi
14293
Richard Purdie509695c2022-07-24 20:48:00 +010014294fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14296printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014297 LIBS="$save_LIBS"
14298else
14299 vim_cv_timer_create_with_lrt=no
14300fi
Richard Purdie509695c2022-07-24 20:48:00 +010014301
14302if test "x$vim_cv_timer_create" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014303 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014304
14305fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014306if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014307 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014308
Bram Moolenaarefffa532022-07-28 22:39:54 +010014309 LIBS="$LIBS -lrt"
14310fi
Richard Purdie509695c2022-07-24 20:48:00 +010014311
Illia Bobyra96d5442023-08-30 16:30:15 +020014312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14313printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14314if test ${vim_cv_stat_ignores_slash+y}
14315then :
14316 printf %s "(cached) " >&6
14317else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014318
Illia Bobyra96d5442023-08-30 16:30:15 +020014319 if test "$cross_compiling" = yes
14320then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014321
Bram Moolenaar7db77842014-03-27 17:40:59 +010014322 as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000014323
Illia Bobyra96d5442023-08-30 16:30:15 +020014324else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14326/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014327
14328#include "confdefs.h"
14329#if STDC_HEADERS
14330# include <stdlib.h>
14331# include <stddef.h>
14332#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014333#include <sys/types.h>
14334#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014335int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014336
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014337_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014338if ac_fn_c_try_run "$LINENO"
14339then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014340
14341 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014342
Illia Bobyra96d5442023-08-30 16:30:15 +020014343else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014344
14345 vim_cv_stat_ignores_slash=no
14346
Bram Moolenaar071d4272004-06-13 20:20:40 +000014347fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14349 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014350fi
14351
Bram Moolenaar446cb832008-06-24 21:56:24 +000014352
Bram Moolenaar446cb832008-06-24 21:56:24 +000014353fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14355printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014356
14357if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014358 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014359
14360fi
14361
Illia Bobyra96d5442023-08-30 16:30:15 +020014362{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14363printf %s "checking for nanoseconds field of struct stat... " >&6; }
14364if test ${ac_cv_struct_st_mtim_nsec+y}
14365then :
14366 printf %s "(cached) " >&6
14367else $as_nop
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014368 ac_save_CPPFLAGS="$CPPFLAGS"
14369 ac_cv_struct_st_mtim_nsec=no
14370 # st_mtim.tv_nsec -- the usual case
14371 # st_mtim._tv_nsec -- Solaris 2.6, if
14372 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14373 # && !defined __EXTENSIONS__)
14374 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14375 # st_mtime_n -- AIX 5.2 and above
14376 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14377 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
14378 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14380/* end confdefs.h. */
14381#include <sys/types.h>
14382#include <sys/stat.h>
14383int
Illia Bobyra96d5442023-08-30 16:30:15 +020014384main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014385{
14386struct stat s; s.ST_MTIM_NSEC;
14387 ;
14388 return 0;
14389}
14390_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014391if ac_fn_c_try_compile "$LINENO"
14392then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014393 ac_cv_struct_st_mtim_nsec=$ac_val; break
14394fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014395rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014396 done
14397 CPPFLAGS="$ac_save_CPPFLAGS"
14398
14399fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14401printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014402if test $ac_cv_struct_st_mtim_nsec != no; then
14403
Illia Bobyra96d5442023-08-30 16:30:15 +020014404printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014405
14406fi
14407
Illia Bobyra96d5442023-08-30 16:30:15 +020014408{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14409printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014410save_LIBS="$LIBS"
14411LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014413/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014414
14415#ifdef HAVE_ICONV_H
14416# include <iconv.h>
14417#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014418
14419int
Illia Bobyra96d5442023-08-30 16:30:15 +020014420main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014421{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014422iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014423 ;
14424 return 0;
14425}
14426_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014427if ac_fn_c_try_link "$LINENO"
14428then :
14429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14430printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014431
Illia Bobyra96d5442023-08-30 16:30:15 +020014432else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014433 LIBS="$save_LIBS"
14434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014435/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014436
14437#ifdef HAVE_ICONV_H
14438# include <iconv.h>
14439#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014440
14441int
Illia Bobyra96d5442023-08-30 16:30:15 +020014442main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014443{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014444iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014445 ;
14446 return 0;
14447}
14448_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014449if ac_fn_c_try_link "$LINENO"
14450then :
14451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14452printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014453
Illia Bobyra96d5442023-08-30 16:30:15 +020014454else $as_nop
14455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14456printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014457fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014458rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014459 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014460fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014461rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014462 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014463
14464
Illia Bobyra96d5442023-08-30 16:30:15 +020014465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
14466printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014468/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014469
14470#ifdef HAVE_LANGINFO_H
14471# include <langinfo.h>
14472#endif
14473
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014474int
Illia Bobyra96d5442023-08-30 16:30:15 +020014475main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014476{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014477char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014478 ;
14479 return 0;
14480}
14481_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014482if ac_fn_c_try_link "$LINENO"
14483then :
14484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14485printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014486
Illia Bobyra96d5442023-08-30 16:30:15 +020014487else $as_nop
14488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14489printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014490fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014491rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014492 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014493
Illia Bobyra96d5442023-08-30 16:30:15 +020014494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
14495printf %s "checking for strtod in -lm... " >&6; }
14496if test ${ac_cv_lib_m_strtod+y}
14497then :
14498 printf %s "(cached) " >&6
14499else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014500 ac_check_lib_save_LIBS=$LIBS
14501LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014503/* end confdefs.h. */
14504
14505/* Override any GCC internal prototype to avoid an error.
14506 Use char because int might match the return type of a GCC
14507 builtin and then its argument prototype would still apply. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014508char strtod ();
14509int
Illia Bobyra96d5442023-08-30 16:30:15 +020014510main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014511{
14512return strtod ();
14513 ;
14514 return 0;
14515}
14516_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014517if ac_fn_c_try_link "$LINENO"
14518then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014519 ac_cv_lib_m_strtod=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014520else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014521 ac_cv_lib_m_strtod=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014522fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014523rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014524 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014525LIBS=$ac_check_lib_save_LIBS
14526fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
14528printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
14529if test "x$ac_cv_lib_m_strtod" = xyes
14530then :
14531 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014532
14533 LIBS="-lm $LIBS"
14534
14535fi
14536
Bram Moolenaar446cb832008-06-24 21:56:24 +000014537
Illia Bobyra96d5442023-08-30 16:30:15 +020014538{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
14539printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14541/* end confdefs.h. */
14542
14543#ifdef HAVE_MATH_H
14544# include <math.h>
14545#endif
14546#if STDC_HEADERS
14547# include <stdlib.h>
14548# include <stddef.h>
14549#endif
14550
14551int
Illia Bobyra96d5442023-08-30 16:30:15 +020014552main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014553{
14554int r = isinf(1.11);
14555 ;
14556 return 0;
14557}
14558_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014559if ac_fn_c_try_link "$LINENO"
14560then :
14561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14562printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014563
Illia Bobyra96d5442023-08-30 16:30:15 +020014564else $as_nop
14565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14566printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014567fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014568rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014569 conftest$ac_exeext conftest.$ac_ext
14570
Illia Bobyra96d5442023-08-30 16:30:15 +020014571{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
14572printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14574/* end confdefs.h. */
14575
14576#ifdef HAVE_MATH_H
14577# include <math.h>
14578#endif
14579#if STDC_HEADERS
14580# include <stdlib.h>
14581# include <stddef.h>
14582#endif
14583
14584int
Illia Bobyra96d5442023-08-30 16:30:15 +020014585main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014586{
14587int r = isnan(1.11);
14588 ;
14589 return 0;
14590}
14591_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014592if ac_fn_c_try_link "$LINENO"
14593then :
14594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14595printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014596
Illia Bobyra96d5442023-08-30 16:30:15 +020014597else $as_nop
14598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14599printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014600fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014601rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014602 conftest$ac_exeext conftest.$ac_ext
14603
Illia Bobyra96d5442023-08-30 16:30:15 +020014604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
14605printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014606# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014607if test ${enable_acl+y}
14608then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014609 enableval=$enable_acl;
Illia Bobyra96d5442023-08-30 16:30:15 +020014610else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014611 enable_acl="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014612fi
14613
Bram Moolenaar071d4272004-06-13 20:20:40 +000014614if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14616printf "%s\n" "no" >&6; }
14617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
14618printf %s "checking for acl_get_file in -lposix1e... " >&6; }
14619if test ${ac_cv_lib_posix1e_acl_get_file+y}
14620then :
14621 printf %s "(cached) " >&6
14622else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014623 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014624LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014626/* end confdefs.h. */
14627
Bram Moolenaar446cb832008-06-24 21:56:24 +000014628/* Override any GCC internal prototype to avoid an error.
14629 Use char because int might match the return type of a GCC
14630 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014631char acl_get_file ();
14632int
Illia Bobyra96d5442023-08-30 16:30:15 +020014633main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014634{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014635return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014636 ;
14637 return 0;
14638}
14639_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014640if ac_fn_c_try_link "$LINENO"
14641then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014642 ac_cv_lib_posix1e_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014643else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014644 ac_cv_lib_posix1e_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014645fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014646rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014647 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014648LIBS=$ac_check_lib_save_LIBS
14649fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
14651printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
14652if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
14653then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014654 LIBS="$LIBS -lposix1e"
Illia Bobyra96d5442023-08-30 16:30:15 +020014655else $as_nop
14656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
14657printf %s "checking for acl_get_file in -lacl... " >&6; }
14658if test ${ac_cv_lib_acl_acl_get_file+y}
14659then :
14660 printf %s "(cached) " >&6
14661else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014662 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014663LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014665/* end confdefs.h. */
14666
Bram Moolenaar446cb832008-06-24 21:56:24 +000014667/* Override any GCC internal prototype to avoid an error.
14668 Use char because int might match the return type of a GCC
14669 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014670char acl_get_file ();
14671int
Illia Bobyra96d5442023-08-30 16:30:15 +020014672main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014673{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014674return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014675 ;
14676 return 0;
14677}
14678_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014679if ac_fn_c_try_link "$LINENO"
14680then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014681 ac_cv_lib_acl_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014682else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014683 ac_cv_lib_acl_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014684fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014685rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014686 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014687LIBS=$ac_check_lib_save_LIBS
14688fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
14690printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
14691if test "x$ac_cv_lib_acl_acl_get_file" = xyes
14692then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014693 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020014694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
14695printf %s "checking for fgetxattr in -lattr... " >&6; }
14696if test ${ac_cv_lib_attr_fgetxattr+y}
14697then :
14698 printf %s "(cached) " >&6
14699else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014700 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014701LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014703/* end confdefs.h. */
14704
Bram Moolenaar446cb832008-06-24 21:56:24 +000014705/* Override any GCC internal prototype to avoid an error.
14706 Use char because int might match the return type of a GCC
14707 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014708char fgetxattr ();
14709int
Illia Bobyra96d5442023-08-30 16:30:15 +020014710main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014711{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014712return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014713 ;
14714 return 0;
14715}
14716_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014717if ac_fn_c_try_link "$LINENO"
14718then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014719 ac_cv_lib_attr_fgetxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014720else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014721 ac_cv_lib_attr_fgetxattr=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014722fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014723rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014724 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014725LIBS=$ac_check_lib_save_LIBS
14726fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
14728printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
14729if test "x$ac_cv_lib_attr_fgetxattr" = xyes
14730then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014731 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014732fi
14733
Bram Moolenaar071d4272004-06-13 20:20:40 +000014734fi
14735
14736fi
14737
14738
Illia Bobyra96d5442023-08-30 16:30:15 +020014739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
14740printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014742/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014743
14744#include <sys/types.h>
14745#ifdef HAVE_SYS_ACL_H
14746# include <sys/acl.h>
14747#endif
14748acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014749int
Illia Bobyra96d5442023-08-30 16:30:15 +020014750main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014751{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014752acl = acl_get_file("foo", ACL_TYPE_ACCESS);
14753 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
14754 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014755 ;
14756 return 0;
14757}
14758_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014759if ac_fn_c_try_link "$LINENO"
14760then :
14761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14762printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014763
Illia Bobyra96d5442023-08-30 16:30:15 +020014764else $as_nop
14765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14766printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014767fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014768rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014769 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014770
Illia Bobyra96d5442023-08-30 16:30:15 +020014771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
14772printf %s "checking for acl_get in -lsec... " >&6; }
14773if test ${ac_cv_lib_sec_acl_get+y}
14774then :
14775 printf %s "(cached) " >&6
14776else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014777 ac_check_lib_save_LIBS=$LIBS
14778LIBS="-lsec $LIBS"
14779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780/* end confdefs.h. */
14781
14782/* Override any GCC internal prototype to avoid an error.
14783 Use char because int might match the return type of a GCC
14784 builtin and then its argument prototype would still apply. */
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014785char acl_get ();
14786int
Illia Bobyra96d5442023-08-30 16:30:15 +020014787main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014788{
14789return acl_get ();
14790 ;
14791 return 0;
14792}
14793_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014794if ac_fn_c_try_link "$LINENO"
14795then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014796 ac_cv_lib_sec_acl_get=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014797else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014798 ac_cv_lib_sec_acl_get=no
14799fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014800rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014801 conftest$ac_exeext conftest.$ac_ext
14802LIBS=$ac_check_lib_save_LIBS
14803fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014804{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
14805printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
14806if test "x$ac_cv_lib_sec_acl_get" = xyes
14807then :
14808 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014809
Illia Bobyra96d5442023-08-30 16:30:15 +020014810else $as_nop
14811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
14812printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014814/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014815
14816#ifdef HAVE_SYS_ACL_H
14817# include <sys/acl.h>
14818#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014819int
Illia Bobyra96d5442023-08-30 16:30:15 +020014820main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014821{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014822acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014823
14824 ;
14825 return 0;
14826}
14827_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014828if ac_fn_c_try_link "$LINENO"
14829then :
14830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14831printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014832
Illia Bobyra96d5442023-08-30 16:30:15 +020014833else $as_nop
14834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14835printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014836fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014837rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014838 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014839fi
14840
Bram Moolenaar446cb832008-06-24 21:56:24 +000014841
Illia Bobyra96d5442023-08-30 16:30:15 +020014842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
14843printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014845/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014846
Bram Moolenaar446cb832008-06-24 21:56:24 +000014847#if STDC_HEADERS
14848# include <stdlib.h>
14849# include <stddef.h>
14850#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014851#ifdef HAVE_SYS_ACL_H
14852# include <sys/acl.h>
14853#endif
14854#ifdef HAVE_SYS_ACCESS_H
14855# include <sys/access.h>
14856#endif
14857#define _ALL_SOURCE
14858
14859#include <sys/stat.h>
14860
14861int aclsize;
14862struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014863int
Illia Bobyra96d5442023-08-30 16:30:15 +020014864main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014865{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014866aclsize = sizeof(struct acl);
14867 aclent = (void *)malloc(aclsize);
14868 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014869
14870 ;
14871 return 0;
14872}
14873_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014874if ac_fn_c_try_link "$LINENO"
14875then :
14876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14877printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014878
Illia Bobyra96d5442023-08-30 16:30:15 +020014879else $as_nop
14880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14881printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014882fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014883rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014884 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014885else
Illia Bobyra96d5442023-08-30 16:30:15 +020014886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14887printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014888fi
14889
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014890if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
14892printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014893 ac_save_CFLAGS="$CFLAGS"
14894 ac_save_LIBS="$LIBS"
14895 CFLAGS="$CFLAGS $GTK_CFLAGS"
14896 LIBS="$LIBS $GTK_LIBS"
14897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14898/* end confdefs.h. */
14899#include <gtk/gtk.h>
14900int
Illia Bobyra96d5442023-08-30 16:30:15 +020014901main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014902{
14903 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
14904 ;
14905 return 0;
14906}
14907_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014908if ac_fn_c_try_link "$LINENO"
14909then :
14910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14911printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014912
Illia Bobyra96d5442023-08-30 16:30:15 +020014913else $as_nop
14914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14915printf "%s\n" "no" >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014916fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014917rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020014918 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014919 CFLAGS="$ac_save_CFLAGS"
14920 LIBS="$ac_save_LIBS"
14921fi
14922
Illia Bobyra96d5442023-08-30 16:30:15 +020014923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
14924printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014925# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014926if test ${enable_gpm+y}
14927then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014928 enableval=$enable_gpm;
Illia Bobyra96d5442023-08-30 16:30:15 +020014929else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014930 enable_gpm="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014931fi
14932
Bram Moolenaar071d4272004-06-13 20:20:40 +000014933
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014934if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
14936printf "%s\n" "$enable_gpm" >&6; }
14937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
14938printf %s "checking for gpm... " >&6; }
14939if test ${vi_cv_have_gpm+y}
14940then :
14941 printf %s "(cached) " >&6
14942else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014943 olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014945/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014946#include <gpm.h>
14947 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014948int
Illia Bobyra96d5442023-08-30 16:30:15 +020014949main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014950{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014951Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014952 ;
14953 return 0;
14954}
14955_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014956if ac_fn_c_try_link "$LINENO"
14957then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014958 vi_cv_have_gpm=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014959else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014960 vi_cv_have_gpm=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014961fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014962rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014963 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014964 LIBS="$olibs"
14965
14966fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
14968printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014969 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014970 if test "$enable_gpm" = "yes"; then
14971 LIBS="$LIBS -lgpm"
14972 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014973 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014974
14975 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014976 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014977
14978 fi
14979else
Illia Bobyra96d5442023-08-30 16:30:15 +020014980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14981printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014982fi
14983
Illia Bobyra96d5442023-08-30 16:30:15 +020014984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
14985printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014986# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014987if test ${enable_sysmouse+y}
14988then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014989 enableval=$enable_sysmouse;
Illia Bobyra96d5442023-08-30 16:30:15 +020014990else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014991 enable_sysmouse="yes"
14992fi
14993
14994
14995if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14997printf "%s\n" "no" >&6; }
14998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
14999printf %s "checking for sysmouse... " >&6; }
15000if test ${vi_cv_have_sysmouse+y}
15001then :
15002 printf %s "(cached) " >&6
15003else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015005/* end confdefs.h. */
15006#include <sys/consio.h>
15007 #include <signal.h>
15008 #include <sys/fbio.h>
15009int
Illia Bobyra96d5442023-08-30 16:30:15 +020015010main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015011{
15012struct mouse_info mouse;
15013 mouse.operation = MOUSE_MODE;
15014 mouse.operation = MOUSE_SHOW;
15015 mouse.u.mode.mode = 0;
15016 mouse.u.mode.signal = SIGUSR2;
15017 ;
15018 return 0;
15019}
15020_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015021if ac_fn_c_try_link "$LINENO"
15022then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015023 vi_cv_have_sysmouse=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015024else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015025 vi_cv_have_sysmouse=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000015026fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015027rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015028 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015029
15030fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015031{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
15032printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015033 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015034 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015035
15036 fi
15037else
Illia Bobyra96d5442023-08-30 16:30:15 +020015038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15039printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015040fi
15041
Illia Bobyra96d5442023-08-30 16:30:15 +020015042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15043printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015045/* end confdefs.h. */
15046#if HAVE_FCNTL_H
15047# include <fcntl.h>
15048#endif
15049int
Illia Bobyra96d5442023-08-30 16:30:15 +020015050main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015051{
15052 int flag = FD_CLOEXEC;
15053 ;
15054 return 0;
15055}
15056_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015057if ac_fn_c_try_compile "$LINENO"
15058then :
15059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15060printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015061
Illia Bobyra96d5442023-08-30 16:30:15 +020015062else $as_nop
15063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15064printf "%s\n" "not usable" >&6; }
Bram Moolenaarf05da212009-11-17 16:13:15 +000015065fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015067
Illia Bobyra96d5442023-08-30 16:30:15 +020015068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15069printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015071/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015072#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015073int
Illia Bobyra96d5442023-08-30 16:30:15 +020015074main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015075{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015076rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015077 ;
15078 return 0;
15079}
15080_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015081if ac_fn_c_try_link "$LINENO"
15082then :
15083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15084printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015085
Illia Bobyra96d5442023-08-30 16:30:15 +020015086else $as_nop
15087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15088printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015089fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015090rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015091 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015092
Illia Bobyra96d5442023-08-30 16:30:15 +020015093{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15094printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15096/* end confdefs.h. */
15097#include <sys/types.h>
15098#include <dirent.h>
15099int
Illia Bobyra96d5442023-08-30 16:30:15 +020015100main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015101{
15102DIR * dir=opendir("dirname"); dirfd(dir);
15103 ;
15104 return 0;
15105}
15106_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015107if ac_fn_c_try_link "$LINENO"
15108then :
15109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15110printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015111
Illia Bobyra96d5442023-08-30 16:30:15 +020015112else $as_nop
15113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15114printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015115fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015116rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015117 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015118
Illia Bobyra96d5442023-08-30 16:30:15 +020015119{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15120printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15122/* end confdefs.h. */
15123#include <sys/file.h>
15124int
Illia Bobyra96d5442023-08-30 16:30:15 +020015125main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015126{
15127flock(10, LOCK_SH);
15128 ;
15129 return 0;
15130}
15131_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015132if ac_fn_c_try_link "$LINENO"
15133then :
15134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15135printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015136
Illia Bobyra96d5442023-08-30 16:30:15 +020015137else $as_nop
15138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15139printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015140fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015141rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015142 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015143
Illia Bobyra96d5442023-08-30 16:30:15 +020015144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15145printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015147/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015148#include <sys/types.h>
15149#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015150int
Illia Bobyra96d5442023-08-30 16:30:15 +020015151main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015152{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015153 int mib[2], r;
15154 size_t len;
15155
15156 mib[0] = CTL_HW;
15157 mib[1] = HW_USERMEM;
15158 len = sizeof(r);
15159 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015160
15161 ;
15162 return 0;
15163}
15164_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015165if ac_fn_c_try_compile "$LINENO"
15166then :
15167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15168printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015169
Illia Bobyra96d5442023-08-30 16:30:15 +020015170else $as_nop
15171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15172printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015173fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015174rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015175
Illia Bobyra96d5442023-08-30 16:30:15 +020015176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15177printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015179/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015180#include <sys/types.h>
15181#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015182int
Illia Bobyra96d5442023-08-30 16:30:15 +020015183main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015184{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015185 struct sysinfo sinfo;
15186 int t;
15187
15188 (void)sysinfo(&sinfo);
15189 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015190
15191 ;
15192 return 0;
15193}
15194_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015195if ac_fn_c_try_link "$LINENO"
15196then :
15197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15198printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015199
Illia Bobyra96d5442023-08-30 16:30:15 +020015200else $as_nop
15201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15202printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015203fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015204rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015205 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015206
Illia Bobyra96d5442023-08-30 16:30:15 +020015207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15208printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015210/* end confdefs.h. */
15211#include <sys/types.h>
15212#include <sys/sysinfo.h>
15213int
Illia Bobyra96d5442023-08-30 16:30:15 +020015214main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015215{
15216 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015217 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015218
15219 ;
15220 return 0;
15221}
15222_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015223if ac_fn_c_try_compile "$LINENO"
15224then :
15225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15226printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015227
Illia Bobyra96d5442023-08-30 16:30:15 +020015228else $as_nop
15229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15230printf "%s\n" "no" >&6; }
Bram Moolenaar914572a2007-05-01 11:37:47 +000015231fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015232rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015233
Illia Bobyra96d5442023-08-30 16:30:15 +020015234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15235printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15237/* end confdefs.h. */
15238#include <sys/types.h>
15239#include <sys/sysinfo.h>
15240int
Illia Bobyra96d5442023-08-30 16:30:15 +020015241main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015242{
15243 struct sysinfo sinfo;
15244 long ut;
15245
15246 (void)sysinfo(&sinfo);
15247 ut = sinfo.uptime;
15248
15249 ;
15250 return 0;
15251}
15252_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015253if ac_fn_c_try_compile "$LINENO"
15254then :
15255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15256printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015257
Illia Bobyra96d5442023-08-30 16:30:15 +020015258else $as_nop
15259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15260printf "%s\n" "no" >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015261fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015262rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015263
Illia Bobyra96d5442023-08-30 16:30:15 +020015264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15265printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015267/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015268#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015269int
Illia Bobyra96d5442023-08-30 16:30:15 +020015270main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015271{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015272 (void)sysconf(_SC_PAGESIZE);
15273 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015274
15275 ;
15276 return 0;
15277}
15278_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015279if ac_fn_c_try_compile "$LINENO"
15280then :
15281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15282printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015283
Illia Bobyra96d5442023-08-30 16:30:15 +020015284else $as_nop
15285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15286printf "%s\n" "not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015287fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015288rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015289
Illia Bobyra96d5442023-08-30 16:30:15 +020015290{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15291printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293/* end confdefs.h. */
15294#include <unistd.h>
15295int
Illia Bobyra96d5442023-08-30 16:30:15 +020015296main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015297{
15298 (void)sysconf(_SC_SIGSTKSZ);
15299
15300 ;
15301 return 0;
15302}
15303_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015304if ac_fn_c_try_compile "$LINENO"
15305then :
15306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15307printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015308
Illia Bobyra96d5442023-08-30 16:30:15 +020015309else $as_nop
15310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15311printf "%s\n" "not usable" >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015312fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015313rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015314
Bram Moolenaar914703b2010-05-31 21:59:46 +020015315# The cast to long int works around a bug in the HP C Compiler
15316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15318# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15320printf %s "checking size of int... " >&6; }
15321if test ${ac_cv_sizeof_int+y}
15322then :
15323 printf %s "(cached) " >&6
15324else $as_nop
15325 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
15326then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015327
Illia Bobyra96d5442023-08-30 16:30:15 +020015328else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015329 if test "$ac_cv_type_int" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015330 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15331printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015332as_fn_error 77 "cannot compute sizeof (int)
15333See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015334 else
15335 ac_cv_sizeof_int=0
15336 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015337fi
15338
Bram Moolenaar446cb832008-06-24 21:56:24 +000015339fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015340{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15341printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015342
15343
15344
Illia Bobyra96d5442023-08-30 16:30:15 +020015345printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015346
15347
Bram Moolenaar914703b2010-05-31 21:59:46 +020015348# The cast to long int works around a bug in the HP C Compiler
15349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15351# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15353printf %s "checking size of long... " >&6; }
15354if test ${ac_cv_sizeof_long+y}
15355then :
15356 printf %s "(cached) " >&6
15357else $as_nop
15358 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
15359then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015360
Illia Bobyra96d5442023-08-30 16:30:15 +020015361else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015362 if test "$ac_cv_type_long" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015363 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15364printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015365as_fn_error 77 "cannot compute sizeof (long)
15366See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015367 else
15368 ac_cv_sizeof_long=0
15369 fi
15370fi
15371
15372fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015373{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15374printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015375
15376
15377
Illia Bobyra96d5442023-08-30 16:30:15 +020015378printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015379
15380
15381# The cast to long int works around a bug in the HP C Compiler
15382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15384# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015385{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15386printf %s "checking size of time_t... " >&6; }
15387if test ${ac_cv_sizeof_time_t+y}
15388then :
15389 printf %s "(cached) " >&6
15390else $as_nop
15391 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
15392then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015393
Illia Bobyra96d5442023-08-30 16:30:15 +020015394else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015395 if test "$ac_cv_type_time_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015396 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15397printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015398as_fn_error 77 "cannot compute sizeof (time_t)
15399See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015400 else
15401 ac_cv_sizeof_time_t=0
15402 fi
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015403fi
15404
15405fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15407printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015408
15409
15410
Illia Bobyra96d5442023-08-30 16:30:15 +020015411printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015412
15413
Bram Moolenaar914703b2010-05-31 21:59:46 +020015414# The cast to long int works around a bug in the HP C Compiler
15415# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15416# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15417# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15419printf %s "checking size of off_t... " >&6; }
15420if test ${ac_cv_sizeof_off_t+y}
15421then :
15422 printf %s "(cached) " >&6
15423else $as_nop
15424 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
15425then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015426
Illia Bobyra96d5442023-08-30 16:30:15 +020015427else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015428 if test "$ac_cv_type_off_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015429 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15430printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015431as_fn_error 77 "cannot compute sizeof (off_t)
15432See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015433 else
15434 ac_cv_sizeof_off_t=0
15435 fi
15436fi
15437
15438fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015439{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15440printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015441
15442
15443
Illia Bobyra96d5442023-08-30 16:30:15 +020015444printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015445
15446
15447
Illia Bobyra96d5442023-08-30 16:30:15 +020015448printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015449
Illia Bobyra96d5442023-08-30 16:30:15 +020015450printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015451
15452
Illia Bobyra96d5442023-08-30 16:30:15 +020015453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
15454printf %s "checking uint32_t is 32 bits... " >&6; }
15455if test "$cross_compiling" = yes
15456then :
15457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
15458printf "%s\n" "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
15459else $as_nop
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15461/* end confdefs.h. */
15462
15463#ifdef HAVE_STDINT_H
15464# include <stdint.h>
15465#endif
15466#ifdef HAVE_INTTYPES_H
15467# include <inttypes.h>
15468#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015469int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015470 uint32_t nr1 = (uint32_t)-1;
15471 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020015472 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
15473 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015474}
15475_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015476if ac_fn_c_try_run "$LINENO"
15477then :
15478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15479printf "%s\n" "ok" >&6; }
15480else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010015481 as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015482fi
15483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15484 conftest.$ac_objext conftest.beam conftest.$ac_ext
15485fi
15486
15487
Bram Moolenaar446cb832008-06-24 21:56:24 +000015488
Bram Moolenaar071d4272004-06-13 20:20:40 +000015489bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000015490#include "confdefs.h"
15491#ifdef HAVE_STRING_H
15492# include <string.h>
15493#endif
15494#if STDC_HEADERS
15495# include <stdlib.h>
15496# include <stddef.h>
15497#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015498int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000015499 char buf[10];
15500 strcpy(buf, "abcdefghi");
15501 mch_memmove(buf, buf + 2, 3);
15502 if (strncmp(buf, "ababcf", 6))
15503 exit(1);
15504 strcpy(buf, "abcdefghi");
15505 mch_memmove(buf + 2, buf, 3);
15506 if (strncmp(buf, "cdedef", 6))
15507 exit(1);
15508 exit(0); /* libc version works properly. */
15509}'
15510
Illia Bobyra96d5442023-08-30 16:30:15 +020015511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
15512printf %s "checking whether memmove handles overlaps... " >&6; }
15513if test ${vim_cv_memmove_handles_overlap+y}
15514then :
15515 printf %s "(cached) " >&6
15516else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +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_memmove_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 Moolenaar071d4272004-06-13 20:20:40 +000015526#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015527_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_memmove_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_memmove_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_memmove_handles_overlap" >&5
15545printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015546
15547if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015548 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015549
Bram Moolenaar071d4272004-06-13 20:20:40 +000015550else
Illia Bobyra96d5442023-08-30 16:30:15 +020015551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
15552printf %s "checking whether bcopy handles overlaps... " >&6; }
15553if test ${vim_cv_bcopy_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_bcopy_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_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
15567_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_bcopy_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_bcopy_handles_overlap=no
15576
15577fi
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 Moolenaar446cb832008-06-24 21:56:24 +000015580fi
15581
15582
Bram Moolenaar446cb832008-06-24 21:56:24 +000015583fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
15585printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015586
15587 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015588 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015589
Bram Moolenaar446cb832008-06-24 21:56:24 +000015590 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
15592printf %s "checking whether memcpy handles overlaps... " >&6; }
15593if test ${vim_cv_memcpy_handles_overlap+y}
15594then :
15595 printf %s "(cached) " >&6
15596else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015597
Illia Bobyra96d5442023-08-30 16:30:15 +020015598 if test "$cross_compiling" = yes
15599then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015600
Bram Moolenaar7db77842014-03-27 17:40:59 +010015601 as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015602
Illia Bobyra96d5442023-08-30 16:30:15 +020015603else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15605/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015606#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015607_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015608if ac_fn_c_try_run "$LINENO"
15609then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015610
15611 vim_cv_memcpy_handles_overlap=yes
15612
Illia Bobyra96d5442023-08-30 16:30:15 +020015613else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015614
15615 vim_cv_memcpy_handles_overlap=no
15616
Bram Moolenaar071d4272004-06-13 20:20:40 +000015617fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015620fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015621
15622
Bram Moolenaar071d4272004-06-13 20:20:40 +000015623fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
15625printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015626
15627 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015628 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015629
15630 fi
15631 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015632fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015633
Bram Moolenaar071d4272004-06-13 20:20:40 +000015634
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015635if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000015636 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015637 libs_save=$LIBS
15638 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
15639 CFLAGS="$CFLAGS $X_CFLAGS"
15640
Illia Bobyra96d5442023-08-30 16:30:15 +020015641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
15642printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015644/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015645#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015646int
Illia Bobyra96d5442023-08-30 16:30:15 +020015647main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015648{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015649
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015650 ;
15651 return 0;
15652}
15653_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015654if ac_fn_c_try_compile "$LINENO"
15655then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015657/* end confdefs.h. */
15658
Bram Moolenaar446cb832008-06-24 21:56:24 +000015659/* Override any GCC internal prototype to avoid an error.
15660 Use char because int might match the return type of a GCC
15661 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015662char _Xsetlocale ();
15663int
Illia Bobyra96d5442023-08-30 16:30:15 +020015664main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015665{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015666return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015667 ;
15668 return 0;
15669}
15670_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015671if ac_fn_c_try_link "$LINENO"
15672then :
15673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15674printf "%s\n" "yes" >&6; }
15675 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015676
Illia Bobyra96d5442023-08-30 16:30:15 +020015677else $as_nop
15678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15679printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015680fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015681rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015682 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015683else $as_nop
15684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15685printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015686fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015687rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015688
Illia Bobyra96d5442023-08-30 16:30:15 +020015689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
15690printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15692/* end confdefs.h. */
15693
15694/* 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 Moolenaarcbc246a2014-10-11 14:47:26 +020015697char Xutf8SetWMProperties ();
15698int
Illia Bobyra96d5442023-08-30 16:30:15 +020015699main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015700{
15701return Xutf8SetWMProperties ();
15702 ;
15703 return 0;
15704}
15705_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015706if ac_fn_c_try_link "$LINENO"
15707then :
15708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15709printf "%s\n" "yes" >&6; }
15710 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015711
Illia Bobyra96d5442023-08-30 16:30:15 +020015712else $as_nop
15713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15714printf "%s\n" "no" >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015715fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015716rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015717 conftest$ac_exeext conftest.$ac_ext
15718
Bram Moolenaar071d4272004-06-13 20:20:40 +000015719 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015720 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000015721fi
15722
Illia Bobyra96d5442023-08-30 16:30:15 +020015723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
15724printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
15725if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
15726then :
15727 printf %s "(cached) " >&6
15728else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015729 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015730LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015732/* end confdefs.h. */
15733
Bram Moolenaar446cb832008-06-24 21:56:24 +000015734/* Override any GCC internal prototype to avoid an error.
15735 Use char because int might match the return type of a GCC
15736 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015737char _xpg4_setrunelocale ();
15738int
Illia Bobyra96d5442023-08-30 16:30:15 +020015739main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015740{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015741return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015742 ;
15743 return 0;
15744}
15745_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015746if ac_fn_c_try_link "$LINENO"
15747then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015748 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015749else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015750 ac_cv_lib_xpg4__xpg4_setrunelocale=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000015751fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015752rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015753 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015754LIBS=$ac_check_lib_save_LIBS
15755fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
15757printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
15758if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
15759then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015760 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015761fi
15762
15763
Illia Bobyra96d5442023-08-30 16:30:15 +020015764{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
15765printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015766test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015767if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015768 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015769elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015770 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015771elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015772 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015773else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000015774 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015775 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
15776 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
15777 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
15778 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
15779 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
15780 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
15781 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
15782fi
15783test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020015784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
15785printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015786
Illia Bobyra96d5442023-08-30 16:30:15 +020015787{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
15788printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015789MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000015790(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 +020015791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
15792printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015793if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015794 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015795
15796fi
15797
Illia Bobyra96d5442023-08-30 16:30:15 +020015798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
15799printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015800# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015801if test ${enable_nls+y}
15802then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015803 enableval=$enable_nls;
Illia Bobyra96d5442023-08-30 16:30:15 +020015804else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015805 enable_nls="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000015806fi
15807
Bram Moolenaar071d4272004-06-13 20:20:40 +000015808
15809if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15811printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000015812
15813 INSTALL_LANGS=install-languages
15814
15815 INSTALL_TOOL_LANGS=install-tool-languages
15816
15817
Bram Moolenaar071d4272004-06-13 20:20:40 +000015818 # Extract the first word of "msgfmt", so it can be a program name with args.
15819set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020015820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15821printf %s "checking for $ac_word... " >&6; }
15822if test ${ac_cv_prog_MSGFMT+y}
15823then :
15824 printf %s "(cached) " >&6
15825else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015826 if test -n "$MSGFMT"; then
15827 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15828else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15830for as_dir in $PATH
15831do
15832 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020015833 case $as_dir in #(((
15834 '') as_dir=./ ;;
15835 */) ;;
15836 *) as_dir=$as_dir/ ;;
15837 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015838 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020015839 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015840 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020015841 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015842 break 2
15843 fi
15844done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015845 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000015846IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015847
Bram Moolenaar071d4272004-06-13 20:20:40 +000015848fi
15849fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015850MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000015851if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15853printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015854else
Illia Bobyra96d5442023-08-30 16:30:15 +020015855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15856printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015857fi
15858
Bram Moolenaar446cb832008-06-24 21:56:24 +000015859
Illia Bobyra96d5442023-08-30 16:30:15 +020015860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
15861printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015862 if test -f po/Makefile; then
15863 have_gettext="no"
15864 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015865 olibs=$LIBS
15866 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015868/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015869#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015870int
Illia Bobyra96d5442023-08-30 16:30:15 +020015871main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015872{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015873gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015874 ;
15875 return 0;
15876}
15877_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015878if ac_fn_c_try_link "$LINENO"
15879then :
15880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
15881printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
15882else $as_nop
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015883 LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015885/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015886#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015887int
Illia Bobyra96d5442023-08-30 16:30:15 +020015888main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015889{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015890gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015891 ;
15892 return 0;
15893}
15894_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015895if ac_fn_c_try_link "$LINENO"
15896then :
15897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
15898printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015899 LIBS="$olibs -lintl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015900else $as_nop
15901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
15902printf "%s\n" "gettext() doesn't work" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015903 LIBS=$olibs
15904fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015905rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015906 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015907fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015908rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015909 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015910 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
15912printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015913 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010015914 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015915 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015916
15917 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015918
Illia Bobyra96d5442023-08-30 16:30:15 +020015919 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
15920if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
15921then :
15922 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015923
Bram Moolenaar071d4272004-06-13 20:20:40 +000015924fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015925
Illia Bobyra96d5442023-08-30 16:30:15 +020015926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
15927printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015929/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015930#include <libintl.h>
15931 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015932int
Illia Bobyra96d5442023-08-30 16:30:15 +020015933main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015934{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015935++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015936 ;
15937 return 0;
15938}
15939_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015940if ac_fn_c_try_link "$LINENO"
15941then :
15942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15943printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015944
Illia Bobyra96d5442023-08-30 16:30:15 +020015945else $as_nop
15946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15947printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015948fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015949rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015950 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
15952printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015953 MSGFMT_DESKTOP=
15954 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015955 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
15957printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015958 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15960printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015961 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
15962 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015963 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15965printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015966 fi
15967
RestorerZe498caf2024-03-12 22:11:36 +010015968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --no-convert" >&5
15969printf %s "checking if msgfmt supports --no-convert... " >&6; }
15970 if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
15971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15972printf "%s\n" "yes" >&6; }
15973 MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt --no-convert -v"
15974 else
15975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15976printf "%s\n" "no" >&6; }
15977 MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt -v"
15978 fi
15979
Bram Moolenaar071d4272004-06-13 20:20:40 +000015980 fi
15981 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
15983printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015984 fi
15985else
Illia Bobyra96d5442023-08-30 16:30:15 +020015986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15987printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015988fi
15989
Illia Bobyra96d5442023-08-30 16:30:15 +020015990ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15991if test "x$ac_cv_header_dlfcn_h" = xyes
15992then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015993 DLL=dlfcn.h
Illia Bobyra96d5442023-08-30 16:30:15 +020015994else $as_nop
15995 ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
15996if test "x$ac_cv_header_dl_h" = xyes
15997then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015998 DLL=dl.h
15999fi
16000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016001fi
16002
Bram Moolenaar071d4272004-06-13 20:20:40 +000016003if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016004
Illia Bobyra96d5442023-08-30 16:30:15 +020016005printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016006
Illia Bobyra96d5442023-08-30 16:30:15 +020016007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
16008printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016010/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016011
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016012int
Illia Bobyra96d5442023-08-30 16:30:15 +020016013main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016014{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016015
16016 extern void* dlopen();
16017 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016018
16019 ;
16020 return 0;
16021}
16022_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016023if ac_fn_c_try_link "$LINENO"
16024then :
16025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16026printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016027
Illia Bobyra96d5442023-08-30 16:30:15 +020016028printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016029
Illia Bobyra96d5442023-08-30 16:30:15 +020016030else $as_nop
16031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16032printf "%s\n" "no" >&6; };
16033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16034printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016035 olibs=$LIBS
16036 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016038/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016039
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016040int
Illia Bobyra96d5442023-08-30 16:30:15 +020016041main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016042{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016043
16044 extern void* dlopen();
16045 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016046
16047 ;
16048 return 0;
16049}
16050_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016051if ac_fn_c_try_link "$LINENO"
16052then :
16053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16054printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016055
Illia Bobyra96d5442023-08-30 16:30:15 +020016056printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016057
Illia Bobyra96d5442023-08-30 16:30:15 +020016058else $as_nop
16059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16060printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016061 LIBS=$olibs
16062fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016063rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016064 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016065fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016066rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016067 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016068 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16069printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016071/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016072
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016073int
Illia Bobyra96d5442023-08-30 16:30:15 +020016074main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016075{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016076
16077 extern void* dlsym();
16078 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016079
16080 ;
16081 return 0;
16082}
16083_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016084if ac_fn_c_try_link "$LINENO"
16085then :
16086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16087printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016088
Illia Bobyra96d5442023-08-30 16:30:15 +020016089printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016090
Illia Bobyra96d5442023-08-30 16:30:15 +020016091else $as_nop
16092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16093printf "%s\n" "no" >&6; };
16094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16095printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016096 olibs=$LIBS
16097 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016099/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016100
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016101int
Illia Bobyra96d5442023-08-30 16:30:15 +020016102main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016103{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016104
16105 extern void* dlsym();
16106 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016107
16108 ;
16109 return 0;
16110}
16111_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016112if ac_fn_c_try_link "$LINENO"
16113then :
16114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16115printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016116
Illia Bobyra96d5442023-08-30 16:30:15 +020016117printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016118
Illia Bobyra96d5442023-08-30 16:30:15 +020016119else $as_nop
16120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16121printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016122 LIBS=$olibs
16123fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016124rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016125 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016126fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016127rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016128 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016129elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016130
Illia Bobyra96d5442023-08-30 16:30:15 +020016131printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016132
Illia Bobyra96d5442023-08-30 16:30:15 +020016133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16134printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016136/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016137
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016138int
Illia Bobyra96d5442023-08-30 16:30:15 +020016139main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016140{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016141
16142 extern void* shl_load();
16143 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016144
16145 ;
16146 return 0;
16147}
16148_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016149if ac_fn_c_try_link "$LINENO"
16150then :
16151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16152printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016153
Illia Bobyra96d5442023-08-30 16:30:15 +020016154printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016155
Illia Bobyra96d5442023-08-30 16:30:15 +020016156else $as_nop
16157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16158printf "%s\n" "no" >&6; };
16159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16160printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016161 olibs=$LIBS
16162 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016164/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016165
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016166int
Illia Bobyra96d5442023-08-30 16:30:15 +020016167main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016168{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016169
16170 extern void* shl_load();
16171 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016172
16173 ;
16174 return 0;
16175}
16176_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016177if ac_fn_c_try_link "$LINENO"
16178then :
16179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16180printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016181
Illia Bobyra96d5442023-08-30 16:30:15 +020016182printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016183
Illia Bobyra96d5442023-08-30 16:30:15 +020016184else $as_nop
16185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16186printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016187 LIBS=$olibs
16188fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016189rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016190 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016191fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016192rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016193 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016194fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016195ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16196if test "x$ac_cv_header_setjmp_h" = xyes
16197then :
16198 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016199
16200fi
16201
Bram Moolenaar071d4272004-06-13 20:20:40 +000016202
Bram Moolenaard0573012017-10-28 21:11:06 +020016203if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016204 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16205 LIBS=`echo $LIBS | sed s/-ldl//`
16206 PERL_LIBS="$PERL_LIBS -ldl"
16207 fi
16208fi
16209
Bram Moolenaard0573012017-10-28 21:11:06 +020016210if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16212printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016213 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016214 if test "$features" = "tiny"; then
16215 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16216 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16218printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016219 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016220 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16222printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016223 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016224 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016225 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16227printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016228 fi
16229fi
16230
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016231if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016232 CFLAGS="$CFLAGS -D_REENTRANT"
16233fi
16234
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016235DEPEND_CFLAGS_FILTER=
16236if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16238printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016239 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016240 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016241 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16243printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016244 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16246printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016247 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16249printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016250 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016251 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/'`
16252 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 +020016253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16254printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016255 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16257printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016258 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016259fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016260
Bram Moolenaar071d4272004-06-13 20:20:40 +000016261
Illia Bobyra96d5442023-08-30 16:30:15 +020016262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16263printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016264if 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 +020016265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16266printf "%s\n" "yes" >&6; }
16267 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016268
16269else
Illia Bobyra96d5442023-08-30 16:30:15 +020016270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016272fi
16273
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010016274LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
16275
Illia Bobyra96d5442023-08-30 16:30:15 +020016276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
16277printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016278LINK_AS_NEEDED=
16279# Check if linker supports --as-needed and --no-as-needed options
16280if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020016281 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
16282 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16283 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016284 LINK_AS_NEEDED=yes
16285fi
16286if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16288printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016289else
Illia Bobyra96d5442023-08-30 16:30:15 +020016290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16291printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016292fi
16293
16294
Bram Moolenaar77c19352012-06-13 19:19:41 +020016295# IBM z/OS reset CFLAGS for config.mk
16296if test "$zOSUnix" = "yes"; then
16297 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
16298fi
16299
Bram Moolenaar446cb832008-06-24 21:56:24 +000016300ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
16301
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016302cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016303# This file is a shell script that caches the results of configure
16304# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016305# scripts and configure runs, see configure's option --config-cache.
16306# It is not useful on other systems. If it contains results you don't
16307# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016308#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016309# config.status only pays attention to the cache file if you give it
16310# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016311#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016312# `ac_cv_env_foo' variables (set or unset) will be overridden when
16313# loading this file, other *unset* `ac_cv_foo' will be assigned the
16314# following values.
16315
16316_ACEOF
16317
Bram Moolenaar071d4272004-06-13 20:20:40 +000016318# The following way of writing the cache mishandles newlines in values,
16319# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016320# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016321# Ultrix sh set writes to stderr and can't be redirected directly,
16322# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016323(
16324 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16325 eval ac_val=\$$ac_var
16326 case $ac_val in #(
16327 *${as_nl}*)
16328 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016329 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16330printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016331 esac
16332 case $ac_var in #(
16333 _ | IFS | as_nl) ;; #(
16334 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016335 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016336 esac ;;
16337 esac
16338 done
16339
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016340 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016341 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16342 *${as_nl}ac_space=\ *)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016343 # `set' does not quote correctly, so add quotes: double-quote
16344 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016345 sed -n \
16346 "s/'/'\\\\''/g;
16347 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016348 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016349 *)
16350 # `set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016351 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016352 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016353 esac |
16354 sort
16355) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016356 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000016357 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016358 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000016359 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020016360 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016361 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000016362 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16363 :end' >>confcache
16364if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16365 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016366 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16368printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016369 if test ! -f "$cache_file" || test -h "$cache_file"; then
16370 cat confcache >"$cache_file"
16371 else
16372 case $cache_file in #(
16373 */* | ?:*)
16374 mv -f confcache "$cache_file"$$ &&
16375 mv -f "$cache_file"$$ "$cache_file" ;; #(
16376 *)
16377 mv -f confcache "$cache_file" ;;
16378 esac
16379 fi
16380 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016381 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16383printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000016384 fi
16385fi
16386rm -f confcache
16387
Bram Moolenaar071d4272004-06-13 20:20:40 +000016388test "x$prefix" = xNONE && prefix=$ac_default_prefix
16389# Let make expand exec_prefix.
16390test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16391
Bram Moolenaar071d4272004-06-13 20:20:40 +000016392DEFS=-DHAVE_CONFIG_H
16393
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016394ac_libobjs=
16395ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010016396U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016397for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16398 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016399 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020016400 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016401 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16402 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016403 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16404 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016405done
16406LIBOBJS=$ac_libobjs
16407
16408LTLIBOBJS=$ac_ltlibobjs
16409
16410
16411
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020016412
Bram Moolenaar7db77842014-03-27 17:40:59 +010016413: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016414ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016415ac_clean_files_save=$ac_clean_files
16416ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020016417{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16418printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016419as_write_fail=0
16420cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016421#! $SHELL
16422# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016423# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016424# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016425# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016426
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016427debug=false
16428ac_cs_recheck=false
16429ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000016430
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016431SHELL=\${CONFIG_SHELL-$SHELL}
16432export SHELL
16433_ASEOF
16434cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16435## -------------------- ##
16436## M4sh Initialization. ##
16437## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000016438
Bram Moolenaar446cb832008-06-24 21:56:24 +000016439# Be more Bourne compatible
16440DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020016441as_nop=:
16442if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16443then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016444 emulate sh
16445 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000016446 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016447 # is contrary to our usage. Disable this feature.
16448 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016449 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020016450else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016451 case `(set -o) 2>/dev/null` in #(
16452 *posix*) :
16453 set -o posix ;; #(
16454 *) :
16455 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016456esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016457fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016458
16459
Illia Bobyra96d5442023-08-30 16:30:15 +020016460
16461# Reset variables that may have inherited troublesome values from
16462# the environment.
16463
16464# IFS needs to be set, to space, tab, and newline, in precisely that order.
16465# (If _AS_PATH_WALK were called with IFS unset, it would have the
16466# side effect of setting IFS to empty, thus disabling word splitting.)
16467# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016468as_nl='
16469'
16470export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020016471IFS=" "" $as_nl"
16472
16473PS1='$ '
16474PS2='> '
16475PS4='+ '
16476
16477# Ensure predictable behavior from utilities with locale-dependent output.
16478LC_ALL=C
16479export LC_ALL
16480LANGUAGE=C
16481export LANGUAGE
16482
16483# We cannot yet rely on "unset" to work, but we need these variables
16484# to be unset--not just set to an empty or harmless value--now, to
16485# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
16486# also avoids known problems related to "unset" and subshell syntax
16487# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
16488for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
16489do eval test \${$as_var+y} \
16490 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16491done
16492
16493# Ensure that fds 0, 1, and 2 are open.
16494if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
16495if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
16496if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016497
16498# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020016499if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016500 PATH_SEPARATOR=:
16501 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16502 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16503 PATH_SEPARATOR=';'
16504 }
16505fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016506
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016507
Bram Moolenaar446cb832008-06-24 21:56:24 +000016508# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016509as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016510case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016511 *[\\/]* ) as_myself=$0 ;;
16512 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16513for as_dir in $PATH
16514do
16515 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016516 case $as_dir in #(((
16517 '') as_dir=./ ;;
16518 */) ;;
16519 *) as_dir=$as_dir/ ;;
16520 esac
16521 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016522 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016523IFS=$as_save_IFS
16524
16525 ;;
16526esac
16527# We did not find ourselves, most probably we were run as `sh COMMAND'
16528# in which case we are not to be found in the path.
16529if test "x$as_myself" = x; then
16530 as_myself=$0
16531fi
16532if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016533 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016534 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000016535fi
16536
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016537
16538
Bram Moolenaar7db77842014-03-27 17:40:59 +010016539# as_fn_error STATUS ERROR [LINENO LOG_FD]
16540# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016541# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16542# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010016543# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016544as_fn_error ()
16545{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016546 as_status=$1; test $as_status -eq 0 && as_status=1
16547 if test "$4"; then
16548 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020016549 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016550 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016551 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016552 as_fn_exit $as_status
16553} # as_fn_error
16554
16555
Illia Bobyra96d5442023-08-30 16:30:15 +020016556
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016557# as_fn_set_status STATUS
16558# -----------------------
16559# Set $? to STATUS, without forking.
16560as_fn_set_status ()
16561{
16562 return $1
16563} # as_fn_set_status
16564
16565# as_fn_exit STATUS
16566# -----------------
16567# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16568as_fn_exit ()
16569{
16570 set +e
16571 as_fn_set_status $1
16572 exit $1
16573} # as_fn_exit
16574
16575# as_fn_unset VAR
16576# ---------------
16577# Portably unset VAR.
16578as_fn_unset ()
16579{
16580 { eval $1=; unset $1;}
16581}
16582as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020016583
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016584# as_fn_append VAR VALUE
16585# ----------------------
16586# Append the text in VALUE to the end of the definition contained in VAR. Take
16587# advantage of any shell optimizations that allow amortized linear growth over
16588# repeated appends, instead of the typical quadratic growth present in naive
16589# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020016590if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
16591then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016592 eval 'as_fn_append ()
16593 {
16594 eval $1+=\$2
16595 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016596else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016597 as_fn_append ()
16598 {
16599 eval $1=\$$1\$2
16600 }
16601fi # as_fn_append
16602
16603# as_fn_arith ARG...
16604# ------------------
16605# Perform arithmetic evaluation on the ARGs, and store the result in the
16606# global $as_val. Take advantage of shells that can avoid forks. The arguments
16607# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020016608if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
16609then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016610 eval 'as_fn_arith ()
16611 {
16612 as_val=$(( $* ))
16613 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016614else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016615 as_fn_arith ()
16616 {
16617 as_val=`expr "$@" || test $? -eq 1`
16618 }
16619fi # as_fn_arith
16620
16621
Bram Moolenaar446cb832008-06-24 21:56:24 +000016622if expr a : '\(a\)' >/dev/null 2>&1 &&
16623 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016624 as_expr=expr
16625else
16626 as_expr=false
16627fi
16628
Bram Moolenaar446cb832008-06-24 21:56:24 +000016629if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016630 as_basename=basename
16631else
16632 as_basename=false
16633fi
16634
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016635if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16636 as_dirname=dirname
16637else
16638 as_dirname=false
16639fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016640
Bram Moolenaar446cb832008-06-24 21:56:24 +000016641as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016642$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16643 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000016644 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016645printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016646 sed '/^.*\/\([^/][^/]*\)\/*$/{
16647 s//\1/
16648 q
16649 }
16650 /^X\/\(\/\/\)$/{
16651 s//\1/
16652 q
16653 }
16654 /^X\/\(\/\).*/{
16655 s//\1/
16656 q
16657 }
16658 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016659
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016660# Avoid depending upon Character Ranges.
16661as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16662as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16663as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16664as_cr_digits='0123456789'
16665as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016666
Illia Bobyra96d5442023-08-30 16:30:15 +020016667
16668# Determine whether it's possible to make 'echo' print without a newline.
16669# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
16670# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016671ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016672case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016673-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016674 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000016675 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016676 xy) ECHO_C='\c';;
16677 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16678 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016679 esac;;
16680*)
16681 ECHO_N='-n';;
16682esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016683
Illia Bobyra96d5442023-08-30 16:30:15 +020016684# For backward compatibility with old third-party macros, we provide
16685# the shell variables $as_echo and $as_echo_n. New code should use
16686# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
16687as_echo='printf %s\n'
16688as_echo_n='printf %s'
16689
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016690rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000016691if test -d conf$$.dir; then
16692 rm -f conf$$.dir/conf$$.file
16693else
16694 rm -f conf$$.dir
16695 mkdir conf$$.dir 2>/dev/null
16696fi
16697if (echo >conf$$.file) 2>/dev/null; then
16698 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016699 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016700 # ... but there are two gotchas:
16701 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16702 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016703 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016704 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016705 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016706 elif ln conf$$.file conf$$ 2>/dev/null; then
16707 as_ln_s=ln
16708 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016709 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016710 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016711else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016712 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016713fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016714rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16715rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016716
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016717
16718# as_fn_mkdir_p
16719# -------------
16720# Create "$as_dir" as a directory, including parents if necessary.
16721as_fn_mkdir_p ()
16722{
16723
16724 case $as_dir in #(
16725 -*) as_dir=./$as_dir;;
16726 esac
16727 test -d "$as_dir" || eval $as_mkdir_p || {
16728 as_dirs=
16729 while :; do
16730 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016731 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016732 *) as_qdir=$as_dir;;
16733 esac
16734 as_dirs="'$as_qdir' $as_dirs"
16735 as_dir=`$as_dirname -- "$as_dir" ||
16736$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16737 X"$as_dir" : 'X\(//\)[^/]' \| \
16738 X"$as_dir" : 'X\(//\)$' \| \
16739 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016740printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016741 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16742 s//\1/
16743 q
16744 }
16745 /^X\(\/\/\)[^/].*/{
16746 s//\1/
16747 q
16748 }
16749 /^X\(\/\/\)$/{
16750 s//\1/
16751 q
16752 }
16753 /^X\(\/\).*/{
16754 s//\1/
16755 q
16756 }
16757 s/.*/./; q'`
16758 test -d "$as_dir" && break
16759 done
16760 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010016761 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016762
16763
16764} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016765if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016766 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016767else
16768 test -d ./-p && rmdir ./-p
16769 as_mkdir_p=false
16770fi
16771
Bram Moolenaar7db77842014-03-27 17:40:59 +010016772
16773# as_fn_executable_p FILE
16774# -----------------------
16775# Test if FILE is an executable regular file.
16776as_fn_executable_p ()
16777{
16778 test -f "$1" && test -x "$1"
16779} # as_fn_executable_p
16780as_test_x='test -x'
16781as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016782
16783# Sed expression to map a string onto a valid CPP name.
16784as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16785
16786# Sed expression to map a string onto a valid variable name.
16787as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16788
16789
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016790exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016791## ----------------------------------- ##
16792## Main body of $CONFIG_STATUS script. ##
16793## ----------------------------------- ##
16794_ASEOF
16795test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016796
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016797cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16798# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016799# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000016800# values after options handling.
16801ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016802This file was extended by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +020016803generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016804
16805 CONFIG_FILES = $CONFIG_FILES
16806 CONFIG_HEADERS = $CONFIG_HEADERS
16807 CONFIG_LINKS = $CONFIG_LINKS
16808 CONFIG_COMMANDS = $CONFIG_COMMANDS
16809 $ $0 $@
16810
Bram Moolenaar446cb832008-06-24 21:56:24 +000016811on `(hostname || uname -n) 2>/dev/null | sed 1q`
16812"
16813
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016814_ACEOF
16815
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016816case $ac_config_files in *"
16817"*) set x $ac_config_files; shift; ac_config_files=$*;;
16818esac
16819
16820case $ac_config_headers in *"
16821"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16822esac
16823
16824
Bram Moolenaar446cb832008-06-24 21:56:24 +000016825cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016826# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016827config_files="$ac_config_files"
16828config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016829
Bram Moolenaar446cb832008-06-24 21:56:24 +000016830_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016831
Bram Moolenaar446cb832008-06-24 21:56:24 +000016832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016833ac_cs_usage="\
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016834\`$as_me' instantiates files and other configuration actions
16835from templates according to the current configuration. Unless the files
16836and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016837
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016838Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016839
16840 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000016841 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016842 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016843 -q, --quiet, --silent
16844 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016845 -d, --debug don't remove temporary files
16846 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016847 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016848 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016849 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016850 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016851
16852Configuration files:
16853$config_files
16854
16855Configuration headers:
16856$config_headers
16857
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016858Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016859
Bram Moolenaar446cb832008-06-24 21:56:24 +000016860_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016861ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
16862ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020016864ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016865ac_cs_version="\\
16866config.status
Illia Bobyra96d5442023-08-30 16:30:15 +020016867configured by $0, generated by GNU Autoconf 2.71,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016868 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016869
Illia Bobyra96d5442023-08-30 16:30:15 +020016870Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016871This config.status script is free software; the Free Software Foundation
16872gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000016873
16874ac_pwd='$ac_pwd'
16875srcdir='$srcdir'
16876AWK='$AWK'
16877test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016878_ACEOF
16879
Bram Moolenaar446cb832008-06-24 21:56:24 +000016880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16881# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016882ac_need_defaults=:
16883while test $# != 0
16884do
16885 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010016886 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016887 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16888 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016889 ac_shift=:
16890 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016891 --*=)
16892 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16893 ac_optarg=
16894 ac_shift=:
16895 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016896 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016897 ac_option=$1
16898 ac_optarg=$2
16899 ac_shift=shift
16900 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016901 esac
16902
16903 case $ac_option in
16904 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016905 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16906 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016907 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020016908 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016909 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020016910 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016911 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016912 debug=: ;;
16913 --file | --fil | --fi | --f )
16914 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016915 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016916 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016917 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016918 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016919 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016920 ac_need_defaults=false;;
16921 --header | --heade | --head | --hea )
16922 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016923 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016924 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016925 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016926 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016927 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016928 --he | --h)
16929 # Conflict between --help and --header
Bram Moolenaar7db77842014-03-27 17:40:59 +010016930 as_fn_error $? "ambiguous option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016931Try \`$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016932 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020016933 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016934 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16935 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16936 ac_cs_silent=: ;;
16937
16938 # This is an error.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016939 -*) as_fn_error $? "unrecognized option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016940Try \`$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016941
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016942 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016943 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016944
16945 esac
16946 shift
16947done
16948
16949ac_configure_extra_args=
16950
16951if $ac_cs_silent; then
16952 exec 6>/dev/null
16953 ac_configure_extra_args="$ac_configure_extra_args --silent"
16954fi
16955
16956_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016958if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016959 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000016960 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020016961 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000016962 CONFIG_SHELL='$SHELL'
16963 export CONFIG_SHELL
16964 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016965fi
16966
16967_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016968cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16969exec 5>>auto/config.log
16970{
16971 echo
16972 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16973## Running $as_me. ##
16974_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020016975 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016976} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016977
Bram Moolenaar446cb832008-06-24 21:56:24 +000016978_ACEOF
16979cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16980_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016981
Bram Moolenaar446cb832008-06-24 21:56:24 +000016982cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016983
Bram Moolenaar446cb832008-06-24 21:56:24 +000016984# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016985for ac_config_target in $ac_config_targets
16986do
Bram Moolenaar446cb832008-06-24 21:56:24 +000016987 case $ac_config_target in
16988 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
16989 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
16990
Bram Moolenaar7db77842014-03-27 17:40:59 +010016991 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016992 esac
16993done
16994
Bram Moolenaar446cb832008-06-24 21:56:24 +000016995
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016996# If the user did not use the arguments to specify the items to instantiate,
16997# then the envvar interface is used. Set only those that are not.
16998# We use the long form for the default assignment because of an extremely
16999# bizarre bug on SunOS 4.1.3.
17000if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017001 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
17002 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017003fi
17004
17005# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000017006# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017007# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017008# Hook for its removal unless debugging.
17009# Note that there is a small window in which the directory will not be cleaned:
17010# after its creation but before its name has been assigned to `$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017011$debug ||
17012{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017013 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017014 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010017015 : "${ac_tmp:=$tmp}"
17016 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017017' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017018 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017019}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017020# Create a (secure) tmp directory for tmp files.
17021
17022{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017023 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017024 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017025} ||
17026{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017027 tmp=./conf$$-$RANDOM
17028 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017029} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17030ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017031
Bram Moolenaar446cb832008-06-24 21:56:24 +000017032# Set up the scripts for CONFIG_FILES section.
17033# No need to generate them if there are no CONFIG_FILES.
17034# This happens for instance with `./config.status config.h'.
17035if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017036
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017037
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017038ac_cr=`echo X | tr X '\015'`
17039# On cygwin, bash can eat \r inside `` if the user requested igncr.
17040# But we know of no other shell where ac_cr would be empty at this
17041# point, so we can use a bashism as a fallback.
17042if test "x$ac_cr" = x; then
17043 eval ac_cr=\$\'\\r\'
17044fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017045ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17046if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017047 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017048else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017049 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017050fi
17051
Bram Moolenaar7db77842014-03-27 17:40:59 +010017052echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017053_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017054
Bram Moolenaar446cb832008-06-24 21:56:24 +000017055
17056{
17057 echo "cat >conf$$subs.awk <<_ACEOF" &&
17058 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17059 echo "_ACEOF"
17060} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017061 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17062ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017063ac_delim='%!_!# '
17064for ac_last_try in false false false false false :; do
17065 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017066 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017067
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017068 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17069 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017070 break
17071 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017072 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017073 else
17074 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17075 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017076done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017077rm -f conf$$subs.sh
17078
17079cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017080cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017081_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017082sed -n '
17083h
17084s/^/S["/; s/!.*/"]=/
17085p
17086g
17087s/^[^!]*!//
17088:repl
17089t repl
17090s/'"$ac_delim"'$//
17091t delim
17092:nl
17093h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017094s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017095t more1
17096s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17097p
17098n
17099b repl
17100:more1
17101s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17102p
17103g
17104s/.\{148\}//
17105t nl
17106:delim
17107h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017108s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017109t more2
17110s/["\\]/\\&/g; s/^/"/; s/$/"/
17111p
17112b
17113:more2
17114s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17115p
17116g
17117s/.\{148\}//
17118t delim
17119' <conf$$subs.awk | sed '
17120/^[^""]/{
17121 N
17122 s/\n//
17123}
17124' >>$CONFIG_STATUS || ac_write_fail=1
17125rm -f conf$$subs.awk
17126cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17127_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017128cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017129 for (key in S) S_is_set[key] = 1
17130 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017131
Bram Moolenaar446cb832008-06-24 21:56:24 +000017132}
17133{
17134 line = $ 0
17135 nfields = split(line, field, "@")
17136 substed = 0
17137 len = length(field[1])
17138 for (i = 2; i < nfields; i++) {
17139 key = field[i]
17140 keylen = length(key)
17141 if (S_is_set[key]) {
17142 value = S[key]
17143 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17144 len += length(value) + length(field[++i])
17145 substed = 1
17146 } else
17147 len += 1 + keylen
17148 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017149
Bram Moolenaar446cb832008-06-24 21:56:24 +000017150 print line
17151}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017152
Bram Moolenaar446cb832008-06-24 21:56:24 +000017153_ACAWK
17154_ACEOF
17155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17156if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17157 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17158else
17159 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017160fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17161 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017162_ACEOF
17163
Bram Moolenaar7db77842014-03-27 17:40:59 +010017164# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17165# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017166# trailing colons and then remove the whole line if VPATH becomes empty
17167# (actually we leave an empty line to preserve line numbers).
17168if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017169 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17170h
17171s///
17172s/^/:/
17173s/[ ]*$/:/
17174s/:\$(srcdir):/:/g
17175s/:\${srcdir}:/:/g
17176s/:@srcdir@:/:/g
17177s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017178s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017179x
17180s/\(=[ ]*\).*/\1/
17181G
17182s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017183s/^[^=]*=[ ]*$//
17184}'
17185fi
17186
17187cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17188fi # test -n "$CONFIG_FILES"
17189
17190# Set up the scripts for CONFIG_HEADERS section.
17191# No need to generate them if there are no CONFIG_HEADERS.
17192# This happens for instance with `./config.status Makefile'.
17193if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017194cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017195BEGIN {
17196_ACEOF
17197
17198# Transform confdefs.h into an awk script `defines.awk', embedded as
17199# here-document in config.status, that substitutes the proper values into
17200# config.h.in to produce config.h.
17201
17202# Create a delimiter string that does not exist in confdefs.h, to ease
17203# handling of long lines.
17204ac_delim='%!_!# '
17205for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017206 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17207 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017208 break
17209 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017210 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017211 else
17212 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17213 fi
17214done
17215
17216# For the awk script, D is an array of macro values keyed by name,
17217# likewise P contains macro parameters if any. Preserve backslash
17218# newline sequences.
17219
17220ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17221sed -n '
17222s/.\{148\}/&'"$ac_delim"'/g
17223t rset
17224:rset
17225s/^[ ]*#[ ]*define[ ][ ]*/ /
17226t def
17227d
17228:def
17229s/\\$//
17230t bsnl
17231s/["\\]/\\&/g
17232s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17233D["\1"]=" \3"/p
17234s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17235d
17236:bsnl
17237s/["\\]/\\&/g
17238s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17239D["\1"]=" \3\\\\\\n"\\/p
17240t cont
17241s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17242t cont
17243d
17244:cont
17245n
17246s/.\{148\}/&'"$ac_delim"'/g
17247t clear
17248:clear
17249s/\\$//
17250t bsnlc
17251s/["\\]/\\&/g; s/^/"/; s/$/"/p
17252d
17253:bsnlc
17254s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17255b cont
17256' <confdefs.h | sed '
17257s/'"$ac_delim"'/"\\\
17258"/g' >>$CONFIG_STATUS || ac_write_fail=1
17259
17260cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17261 for (key in D) D_is_set[key] = 1
17262 FS = ""
17263}
17264/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17265 line = \$ 0
17266 split(line, arg, " ")
17267 if (arg[1] == "#") {
17268 defundef = arg[2]
17269 mac1 = arg[3]
17270 } else {
17271 defundef = substr(arg[1], 2)
17272 mac1 = arg[2]
17273 }
17274 split(mac1, mac2, "(") #)
17275 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017276 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017277 if (D_is_set[macro]) {
17278 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000017279 print prefix "define", macro P[macro] D[macro]
17280 next
17281 } else {
17282 # Replace #undef with comments. This is necessary, for example,
17283 # in the case of _POSIX_SOURCE, which is predefined and required
17284 # on some systems where configure will not decide to define it.
17285 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017286 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017287 next
17288 }
17289 }
17290}
17291{ print }
17292_ACAWK
17293_ACEOF
17294cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017295 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017296fi # test -n "$CONFIG_HEADERS"
17297
17298
17299eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17300shift
17301for ac_tag
17302do
17303 case $ac_tag in
17304 :[FHLC]) ac_mode=$ac_tag; continue;;
17305 esac
17306 case $ac_mode$ac_tag in
17307 :[FHL]*:*);;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017308 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017309 :[FH]-) ac_tag=-:-;;
17310 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17311 esac
17312 ac_save_IFS=$IFS
17313 IFS=:
17314 set x $ac_tag
17315 IFS=$ac_save_IFS
17316 shift
17317 ac_file=$1
17318 shift
17319
17320 case $ac_mode in
17321 :L) ac_source=$1;;
17322 :[FH])
17323 ac_file_inputs=
17324 for ac_f
17325 do
17326 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017327 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017328 *) # Look for the file first in the build tree, then in the source tree
17329 # (if the path is not absolute). The absolute path cannot be DOS-style,
17330 # because $ac_f cannot contain `:'.
17331 test -f "$ac_f" ||
17332 case $ac_f in
17333 [\\/$]*) false;;
17334 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17335 esac ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017336 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017337 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020017338 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017339 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017340 done
17341
17342 # Let's still pretend it is `configure' which instantiates (i.e., don't
17343 # use $as_me), people would be surprised to read:
17344 # /* config.h. Generated by config.status. */
17345 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020017346 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017347 `' by configure.'
17348 if test x"$ac_file" != x-; then
17349 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020017350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17351printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017352 fi
17353 # Neutralize special characters interpreted by sed in replacement strings.
17354 case $configure_input in #(
17355 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020017356 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017357 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17358 *) ac_sed_conf_input=$configure_input;;
17359 esac
17360
17361 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017362 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17363 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017364 esac
17365 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000017366 esac
17367
Bram Moolenaar446cb832008-06-24 21:56:24 +000017368 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017369$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17370 X"$ac_file" : 'X\(//\)[^/]' \| \
17371 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017372 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017373printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017374 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17375 s//\1/
17376 q
17377 }
17378 /^X\(\/\/\)[^/].*/{
17379 s//\1/
17380 q
17381 }
17382 /^X\(\/\/\)$/{
17383 s//\1/
17384 q
17385 }
17386 /^X\(\/\).*/{
17387 s//\1/
17388 q
17389 }
17390 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017391 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000017392 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017393
Bram Moolenaar446cb832008-06-24 21:56:24 +000017394case "$ac_dir" in
17395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17396*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017397 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017398 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020017399 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017400 case $ac_top_builddir_sub in
17401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17403 esac ;;
17404esac
17405ac_abs_top_builddir=$ac_pwd
17406ac_abs_builddir=$ac_pwd$ac_dir_suffix
17407# for backward compatibility:
17408ac_top_builddir=$ac_top_build_prefix
17409
17410case $srcdir in
17411 .) # We are building in place.
17412 ac_srcdir=.
17413 ac_top_srcdir=$ac_top_builddir_sub
17414 ac_abs_top_srcdir=$ac_pwd ;;
17415 [\\/]* | ?:[\\/]* ) # Absolute name.
17416 ac_srcdir=$srcdir$ac_dir_suffix;
17417 ac_top_srcdir=$srcdir
17418 ac_abs_top_srcdir=$srcdir ;;
17419 *) # Relative name.
17420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17421 ac_top_srcdir=$ac_top_build_prefix$srcdir
17422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17423esac
17424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17425
17426
17427 case $ac_mode in
17428 :F)
17429 #
17430 # CONFIG_FILE
17431 #
17432
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017433_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017434
Bram Moolenaar446cb832008-06-24 21:56:24 +000017435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17436# If the template does not know about datarootdir, expand it.
17437# FIXME: This hack should be removed a few years after 2.60.
17438ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017439ac_sed_dataroot='
17440/datarootdir/ {
17441 p
17442 q
17443}
17444/@datadir@/p
17445/@docdir@/p
17446/@infodir@/p
17447/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017448/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017449case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17450*datarootdir*) ac_datarootdir_seen=yes;;
17451*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17453printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017454_ACEOF
17455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17456 ac_datarootdir_hack='
17457 s&@datadir@&$datadir&g
17458 s&@docdir@&$docdir&g
17459 s&@infodir@&$infodir&g
17460 s&@localedir@&$localedir&g
17461 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017462 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017463esac
17464_ACEOF
17465
17466# Neutralize VPATH when `$srcdir' = `.'.
17467# Shell code in configure.ac might set extrasub.
17468# FIXME: do we really want to maintain this feature?
17469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17470ac_sed_extra="$ac_vpsub
17471$extrasub
17472_ACEOF
17473cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17474:t
17475/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17476s|@configure_input@|$ac_sed_conf_input|;t t
17477s&@top_builddir@&$ac_top_builddir_sub&;t t
17478s&@top_build_prefix@&$ac_top_build_prefix&;t t
17479s&@srcdir@&$ac_srcdir&;t t
17480s&@abs_srcdir@&$ac_abs_srcdir&;t t
17481s&@top_srcdir@&$ac_top_srcdir&;t t
17482s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17483s&@builddir@&$ac_builddir&;t t
17484s&@abs_builddir@&$ac_abs_builddir&;t t
17485s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17486$ac_datarootdir_hack
17487"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017488eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17489 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017490
17491test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017492 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17493 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17494 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +020017495 { 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 +010017496which seems to be undefined. Please make sure it is defined" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017497printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017498which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017499
Bram Moolenaar7db77842014-03-27 17:40:59 +010017500 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017501 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017502 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17503 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017504 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017505 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017506 ;;
17507 :H)
17508 #
17509 # CONFIG_HEADER
17510 #
17511 if test x"$ac_file" != x-; then
17512 {
Illia Bobyra96d5442023-08-30 16:30:15 +020017513 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017514 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17515 } >"$ac_tmp/config.h" \
17516 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17517 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17519printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017520 else
17521 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017522 mv "$ac_tmp/config.h" "$ac_file" \
17523 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017524 fi
17525 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017526 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017527 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17528 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017529 fi
17530 ;;
17531
17532
17533 esac
17534
17535done # for ac_tag
17536
Bram Moolenaar071d4272004-06-13 20:20:40 +000017537
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017538as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017539_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017540ac_clean_files=$ac_clean_files_save
17541
Bram Moolenaar446cb832008-06-24 21:56:24 +000017542test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017543 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017544
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017545
17546# configure is writing to config.log, and then calls config.status.
17547# config.status does its own redirection, appending to config.log.
17548# Unfortunately, on DOS this fails, as config.log is still kept open
17549# by configure, so config.status won't be able to write to it; its
17550# output is simply discarded. So we exec the FD to /dev/null,
17551# effectively closing config.log, so it can be properly (re)opened and
17552# appended to by config.status. When coming back to configure, we
17553# need to make the FD available again.
17554if test "$no_create" != yes; then
17555 ac_cs_success=:
17556 ac_config_status_args=
17557 test "$silent" = yes &&
17558 ac_config_status_args="$ac_config_status_args --quiet"
17559 exec 5>/dev/null
17560 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000017561 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017562 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17563 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017564 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017565fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017566if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17568printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017569fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017570
17571
Illia Bobyra96d5442023-08-30 16:30:15 +020017572