blob: 5c1464835300eeda7134188f4695dca64a6c8987 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#! /bin/sh
Bram Moolenaar071d4272004-06-13 20:20:40 +00002# Guess values for system-dependent variables and create Makefiles.
Illia Bobyra96d5442023-08-30 16:30:15 +02003# Generated by GNU Autoconf 2.71.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004#
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Illia Bobyra96d5442023-08-30 16:30:15 +02006# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
7# Inc.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008#
9#
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012## -------------------- ##
13## M4sh Initialization. ##
14## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
Bram Moolenaar446cb832008-06-24 21:56:24 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020018as_nop=:
19if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000021 emulate sh
22 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000026 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020027else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000033esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000034fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000035
36
Illia Bobyra96d5442023-08-30 16:30:15 +020037
38# Reset variables that may have inherited troublesome values from
39# the environment.
40
41# IFS needs to be set, to space, tab, and newline, in precisely that order.
42# (If _AS_PATH_WALK were called with IFS unset, it would have the
43# side effect of setting IFS to empty, thus disabling word splitting.)
44# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000045as_nl='
46'
47export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020048IFS=" "" $as_nl"
49
50PS1='$ '
51PS2='> '
52PS4='+ '
53
54# Ensure predictable behavior from utilities with locale-dependent output.
55LC_ALL=C
56export LC_ALL
57LANGUAGE=C
58export LANGUAGE
59
60# We cannot yet rely on "unset" to work, but we need these variables
61# to be unset--not just set to an empty or harmless value--now, to
62# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
63# also avoids known problems related to "unset" and subshell syntax
64# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
65for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
66do eval test \${$as_var+y} \
67 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68done
69
70# Ensure that fds 0, 1, and 2 are open.
71if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
72if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
73if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000074
75# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020076if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000083
Bram Moolenaar495de9c2005-01-25 22:03:25 +000084
Bram Moolenaar446cb832008-06-24 21:56:24 +000085# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010086as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020087case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000088 *[\\/]* ) as_myself=$0 ;;
89 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
90for as_dir in $PATH
91do
92 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020093 case $as_dir in #(((
94 '') as_dir=./ ;;
95 */) ;;
96 *) as_dir=$as_dir/ ;;
97 esac
98 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020099 done
Bram Moolenaar446cb832008-06-24 21:56:24 +0000100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200110 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200111 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000112fi
113
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200114
Bram Moolenaar7db77842014-03-27 17:40:59 +0100115# Use a proper internal environment variable to ensure we don't fall
116 # into an infinite loop, continuously re-executing ourselves.
117 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
118 _as_can_reexec=no; export _as_can_reexec;
119 # We cannot yet assume a decent shell, so we have to provide a
120# neutralization value for shells without unset; and this also
121# works around shells that cannot unset nonexistent variables.
122# Preserve -v and -x to the replacement shell.
123BASH_ENV=/dev/null
124ENV=/dev/null
125(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
126case $- in # ((((
127 *v*x* | *x*v* ) as_opts=-vx ;;
128 *v* ) as_opts=-v ;;
129 *x* ) as_opts=-x ;;
130 * ) as_opts= ;;
131esac
132exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
133# Admittedly, this is quite paranoid, since all the known shells bail
134# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200135printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
136exit 255
Bram Moolenaar7db77842014-03-27 17:40:59 +0100137 fi
138 # We don't want this to propagate to other subprocesses.
139 { _as_can_reexec=; unset _as_can_reexec;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200140if test "x$CONFIG_SHELL" = x; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200141 as_bourne_compatible="as_nop=:
142if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
143then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200144 emulate sh
145 NULLCMD=:
146 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
147 # is contrary to our usage. Disable this feature.
148 alias -g '\${1+\"\$@\"}'='\"\$@\"'
149 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +0200150else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200151 case \`(set -o) 2>/dev/null\` in #(
152 *posix*) :
153 set -o posix ;; #(
154 *) :
155 ;;
156esac
157fi
158"
159 as_required="as_fn_return () { (exit \$1); }
160as_fn_success () { as_fn_return 0; }
161as_fn_failure () { as_fn_return 1; }
162as_fn_ret_success () { return 0; }
163as_fn_ret_failure () { return 1; }
164
165exitcode=0
166as_fn_success || { exitcode=1; echo as_fn_success failed.; }
167as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
168as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
169as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Illia Bobyra96d5442023-08-30 16:30:15 +0200170if ( set x; as_fn_ret_success y && test x = \"\$1\" )
171then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200172
Illia Bobyra96d5442023-08-30 16:30:15 +0200173else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200174 exitcode=1; echo positional parameters were not saved.
175fi
Bram Moolenaar7db77842014-03-27 17:40:59 +0100176test x\$exitcode = x0 || exit 1
Illia Bobyra96d5442023-08-30 16:30:15 +0200177blah=\$(echo \$(echo blah))
178test x\"\$blah\" = xblah || exit 1
Bram Moolenaar7db77842014-03-27 17:40:59 +0100179test -x / || exit 1"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
184test \$(( 1 + 1 )) = 2 || exit 1"
Illia Bobyra96d5442023-08-30 16:30:15 +0200185 if (eval "$as_required") 2>/dev/null
186then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200187 as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200188else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200189 as_have_required=no
190fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200191 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
192then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200193
Illia Bobyra96d5442023-08-30 16:30:15 +0200194else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196as_found=false
197for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
198do
199 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200200 case $as_dir in #(((
201 '') as_dir=./ ;;
202 */) ;;
203 *) as_dir=$as_dir/ ;;
204 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200205 as_found=:
206 case $as_dir in #(
207 /*)
208 for as_base in sh bash ksh sh5; do
209 # Try only shells that exist, to save several forks.
Illia Bobyra96d5442023-08-30 16:30:15 +0200210 as_shell=$as_dir$as_base
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200211 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +0200212 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
213then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200214 CONFIG_SHELL=$as_shell as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200215 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
216then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200217 break 2
218fi
219fi
220 done;;
221 esac
222 as_found=false
223done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200224IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200225if $as_found
226then :
227
228else $as_nop
229 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
230 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
231then :
232 CONFIG_SHELL=$SHELL as_have_required=yes
233fi
234fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200235
236
Illia Bobyra96d5442023-08-30 16:30:15 +0200237 if test "x$CONFIG_SHELL" != x
238then :
Bram Moolenaar7db77842014-03-27 17:40:59 +0100239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200256printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +0100257exit 255
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200258fi
259
Illia Bobyra96d5442023-08-30 16:30:15 +0200260 if test x$as_have_required = xno
261then :
262 printf "%s\n" "$0: This script requires a shell more modern than all"
263 printf "%s\n" "$0: the shells that I found on your system."
264 if test ${ZSH_VERSION+y} ; then
265 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200267 else
Illia Bobyra96d5442023-08-30 16:30:15 +0200268 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200269$0: including any error possibly output before this
270$0: message. Then install a modern shell, or manually run
271$0: the script under such a shell if you do have one."
272 fi
273 exit 1
274fi
275fi
276fi
277SHELL=${CONFIG_SHELL-/bin/sh}
278export SHELL
279# Unset more variables known to interfere with behavior of common tools.
280CLICOLOR_FORCE= GREP_OPTIONS=
281unset CLICOLOR_FORCE GREP_OPTIONS
282
283## --------------------- ##
284## M4sh Shell Functions. ##
285## --------------------- ##
286# as_fn_unset VAR
287# ---------------
288# Portably unset VAR.
289as_fn_unset ()
290{
291 { eval $1=; unset $1;}
292}
293as_unset=as_fn_unset
294
Illia Bobyra96d5442023-08-30 16:30:15 +0200295
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200296# as_fn_set_status STATUS
297# -----------------------
298# Set $? to STATUS, without forking.
299as_fn_set_status ()
300{
301 return $1
302} # as_fn_set_status
303
304# as_fn_exit STATUS
305# -----------------
306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307as_fn_exit ()
308{
309 set +e
310 as_fn_set_status $1
311 exit $1
312} # as_fn_exit
Illia Bobyra96d5442023-08-30 16:30:15 +0200313# as_fn_nop
314# ---------
315# Do nothing but, unlike ":", preserve the value of $?.
316as_fn_nop ()
317{
318 return $?
319}
320as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200321
322# as_fn_mkdir_p
323# -------------
324# Create "$as_dir" as a directory, including parents if necessary.
325as_fn_mkdir_p ()
326{
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +0200335 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200344printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +0100365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200366
367
368} # as_fn_mkdir_p
Bram Moolenaar7db77842014-03-27 17:40:59 +0100369
370# as_fn_executable_p FILE
371# -----------------------
372# Test if FILE is an executable regular file.
373as_fn_executable_p ()
374{
375 test -f "$1" && test -x "$1"
376} # as_fn_executable_p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200377# as_fn_append VAR VALUE
378# ----------------------
379# Append the text in VALUE to the end of the definition contained in VAR. Take
380# advantage of any shell optimizations that allow amortized linear growth over
381# repeated appends, instead of the typical quadratic growth present in naive
382# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +0200383if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
384then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200385 eval 'as_fn_append ()
386 {
387 eval $1+=\$2
388 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200389else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200390 as_fn_append ()
391 {
392 eval $1=\$$1\$2
393 }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +0200401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200403 eval 'as_fn_arith ()
404 {
405 as_val=$(( $* ))
406 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200407else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200408 as_fn_arith ()
409 {
410 as_val=`expr "$@" || test $? -eq 1`
411 }
412fi # as_fn_arith
413
Illia Bobyra96d5442023-08-30 16:30:15 +0200414# as_fn_nop
415# ---------
416# Do nothing but, unlike ":", preserve the value of $?.
417as_fn_nop ()
418{
419 return $?
420}
421as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200422
Bram Moolenaar7db77842014-03-27 17:40:59 +0100423# as_fn_error STATUS ERROR [LINENO LOG_FD]
424# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200425# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
426# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +0100427# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200428as_fn_error ()
429{
Bram Moolenaar7db77842014-03-27 17:40:59 +0100430 as_status=$1; test $as_status -eq 0 && as_status=1
431 if test "$4"; then
432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +0200433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200434 fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200435 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200436 as_fn_exit $as_status
437} # as_fn_error
438
Bram Moolenaar446cb832008-06-24 21:56:24 +0000439if expr a : '\(a\)' >/dev/null 2>&1 &&
440 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000441 as_expr=expr
442else
443 as_expr=false
444fi
445
Bram Moolenaar446cb832008-06-24 21:56:24 +0000446if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000447 as_basename=basename
448else
449 as_basename=false
450fi
451
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200452if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
453 as_dirname=dirname
454else
455 as_dirname=false
456fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000457
Bram Moolenaar446cb832008-06-24 21:56:24 +0000458as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000459$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
460 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +0000461 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200462printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +0000463 sed '/^.*\/\([^/][^/]*\)\/*$/{
464 s//\1/
465 q
466 }
467 /^X\/\(\/\/\)$/{
468 s//\1/
469 q
470 }
471 /^X\/\(\/\).*/{
472 s//\1/
473 q
474 }
475 s/.*/./; q'`
476
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200477# Avoid depending upon Character Ranges.
478as_cr_letters='abcdefghijklmnopqrstuvwxyz'
479as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
480as_cr_Letters=$as_cr_letters$as_cr_LETTERS
481as_cr_digits='0123456789'
482as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000483
484
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200485 as_lineno_1=$LINENO as_lineno_1a=$LINENO
486 as_lineno_2=$LINENO as_lineno_2a=$LINENO
487 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
488 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
489 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000490 sed -n '
491 p
492 /[$]LINENO/=
493 ' <$as_myself |
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000494 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +0000495 s/[$]LINENO.*/&-/
496 t lineno
497 b
498 :lineno
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000499 N
Bram Moolenaar446cb832008-06-24 21:56:24 +0000500 :loop
501 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000502 t loop
Bram Moolenaar446cb832008-06-24 21:56:24 +0000503 s/-\n.*//
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000504 ' >$as_me.lineno &&
Bram Moolenaar446cb832008-06-24 21:56:24 +0000505 chmod +x "$as_me.lineno" ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200506 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000507
Bram Moolenaar7db77842014-03-27 17:40:59 +0100508 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
509 # already done that, so ensure we don't try to do so again and fall
510 # in an infinite loop. This has already happened in practice.
511 _as_can_reexec=no; export _as_can_reexec
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000512 # Don't try to exec as it changes $[0], causing all sort of problems
513 # (the dirname of $[0] is not the place where we might find the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000514 # original and so on. Autoconf is especially sensitive to this).
515 . "./$as_me.lineno"
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000516 # Exit status is that of the last command.
517 exit
518}
519
Illia Bobyra96d5442023-08-30 16:30:15 +0200520
521# Determine whether it's possible to make 'echo' print without a newline.
522# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
523# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000524ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200525case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +0000526-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200527 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +0000528 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200529 xy) ECHO_C='\c';;
530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
531 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000532 esac;;
533*)
534 ECHO_N='-n';;
535esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000536
Illia Bobyra96d5442023-08-30 16:30:15 +0200537# For backward compatibility with old third-party macros, we provide
538# the shell variables $as_echo and $as_echo_n. New code should use
539# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
540as_echo='printf %s\n'
541as_echo_n='printf %s'
542
543
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000544rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +0000545if test -d conf$$.dir; then
546 rm -f conf$$.dir/conf$$.file
547else
548 rm -f conf$$.dir
549 mkdir conf$$.dir 2>/dev/null
550fi
551if (echo >conf$$.file) 2>/dev/null; then
552 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000553 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000554 # ... but there are two gotchas:
555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100557 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +0100559 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000560 elif ln conf$$.file conf$$ 2>/dev/null; then
561 as_ln_s=ln
562 else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100563 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000564 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000565else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100566 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000567fi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000568rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
569rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000570
571if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200572 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000573else
574 test -d ./-p && rmdir ./-p
575 as_mkdir_p=false
576fi
577
Bram Moolenaar7db77842014-03-27 17:40:59 +0100578as_test_x='test -x'
579as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000580
581# Sed expression to map a string onto a valid CPP name.
582as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
583
584# Sed expression to map a string onto a valid variable name.
585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
586
587
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200588test -n "$DJDIR" || exec 7<&0 </dev/null
589exec 6>&1
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000590
591# Name of the host.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100592# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000593# so uname gets run too.
594ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000596#
597# Initializations.
598#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599ac_default_prefix=/usr/local
Bram Moolenaar446cb832008-06-24 21:56:24 +0000600ac_clean_files=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000601ac_config_libobj_dir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000602LIBOBJS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000603cross_compiling=no
604subdirs=
605MFLAGS=
606MAKEFLAGS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000607
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000608# Identity of this package.
Illia Bobyra96d5442023-08-30 16:30:15 +0200609PACKAGE_NAME=''
610PACKAGE_TARNAME=''
611PACKAGE_VERSION=''
612PACKAGE_STRING=''
613PACKAGE_BUGREPORT=''
614PACKAGE_URL=''
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000615
616ac_unique_file="vim.h"
617# Factoring default headers for most tests.
618ac_includes_default="\
Illia Bobyra96d5442023-08-30 16:30:15 +0200619#include <stddef.h>
620#ifdef HAVE_STDIO_H
621# include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000622#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200623#ifdef HAVE_STDLIB_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000624# include <stdlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000625#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000626#ifdef HAVE_STRING_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000627# include <string.h>
628#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000629#ifdef HAVE_INTTYPES_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000630# include <inttypes.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000631#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000632#ifdef HAVE_STDINT_H
633# include <stdint.h>
634#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200635#ifdef HAVE_STRINGS_H
636# include <strings.h>
637#endif
638#ifdef HAVE_SYS_TYPES_H
639# include <sys/types.h>
640#endif
641#ifdef HAVE_SYS_STAT_H
642# include <sys/stat.h>
643#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000644#ifdef HAVE_UNISTD_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000645# include <unistd.h>
646#endif"
647
Illia Bobyra96d5442023-08-30 16:30:15 +0200648ac_header_c_list=
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000649ac_subst_vars='LTLIBOBJS
Bram Moolenaar446cb832008-06-24 21:56:24 +0000650LIBOBJS
Bram Moolenaar22e193d2010-11-03 22:32:24 +0100651LINK_AS_NEEDED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000652DEPEND_CFLAGS_FILTER
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200653MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000654MAKEMO
655MSGFMT
656INSTALL_TOOL_LANGS
657INSTALL_LANGS
658TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000659GUI_X_LIBS
660GUITYPE
661GUI_LIB_LOC
662GUI_INC_LOC
663NARROW_PROTO
664MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100665GRESOURCE_OBJ
666GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200667UPDATE_DESKTOP_DATABASE
668GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100669GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000670GNOME_INCLUDEDIR
671GNOME_LIBDIR
672GNOME_LIBS
673GTK_LIBNAME
674GTK_LIBS
675GTK_CFLAGS
676PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000677X_LIB
678X_EXTRA_LIBS
679X_LIBS
680X_PRE_LIBS
681X_CFLAGS
682XMKMF
683xmkmfpath
Bram Moolenaar823edd12019-10-23 22:35:36 +0200684TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200685TERM_OBJ
686TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100687CHANNEL_OBJ
688CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000689NETBEANS_OBJ
690NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000691RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000692RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000693RUBY_CFLAGS
694RUBY_PRO
695RUBY_OBJ
696RUBY_SRC
697vi_cv_path_ruby
698TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000699TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000700TCL_CFLAGS
701TCL_PRO
702TCL_OBJ
703TCL_SRC
704vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200705PYTHON3_OBJ
706PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000707PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200708PYTHON3_CFLAGS
709PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200710vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200711vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000712PYTHON_OBJ
713PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000714PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000715PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000716PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000717vi_cv_path_python
718PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000719PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000720PERL_CFLAGS
721PERL_PRO
722PERL_OBJ
723PERL_SRC
724shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200725vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000726vi_cv_perllib
727vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000728MZSCHEME_MZC
729MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000730MZSCHEME_CFLAGS
731MZSCHEME_LIBS
732MZSCHEME_PRO
733MZSCHEME_OBJ
734MZSCHEME_SRC
735vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000736LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200737LUA_CFLAGS
738LUA_LIBS
739LUA_PRO
740LUA_OBJ
741LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200742vi_cv_path_plain_lua
743vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200744vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000745XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000746compiledby
747dogvimdiff
748dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200749QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000750line_break
751VIEWNAME
752EXNAME
753VIMNAME
754OS_EXTRA_OBJ
755OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100756XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000757CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200758CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200759BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000760STRIP
761AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100762FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000763EGREP
764GREP
765CPP
766OBJEXT
767EXEEXT
768ac_ct_CC
769CPPFLAGS
770LDFLAGS
771CFLAGS
772CC
773SET_MAKE
774target_alias
775host_alias
776build_alias
777LIBS
778ECHO_T
779ECHO_N
780ECHO_C
781DEFS
782mandir
783localedir
784libdir
785psdir
786pdfdir
787dvidir
788htmldir
789infodir
790docdir
791oldincludedir
792includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200793runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000794localstatedir
795sharedstatedir
796sysconfdir
797datadir
798datarootdir
799libexecdir
800sbindir
801bindir
802program_transform_name
803prefix
804exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200805PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000806PACKAGE_BUGREPORT
807PACKAGE_STRING
808PACKAGE_VERSION
809PACKAGE_TARNAME
810PACKAGE_NAME
811PATH_SEPARATOR
812SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000813ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000814ac_user_opts='
815enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100816enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000817enable_darwin
818with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100819with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000820with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000821with_vim_name
822with_ex_name
823with_view_name
824with_global_runtime
825with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200826enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000827enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200828enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000829with_features
830with_compiledby
831enable_xsmp
832enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200833enable_luainterp
834with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200835with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000836enable_mzschemeinterp
837with_plthome
838enable_perlinterp
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +0100839with_xsubpp
Bram Moolenaar446cb832008-06-24 21:56:24 +0000840enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200841with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000842with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200843enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200844with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200845with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200846with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000847enable_tclinterp
848with_tclsh
849enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100850with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000851enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000852enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100853enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200854enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100855enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000856enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100857enable_rightleft
858enable_arabic
859enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000860enable_xim
861enable_fontset
862with_x
863enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000864enable_gtk2_check
865enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100866enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000867enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000868enable_gtktest
869with_gnome_includes
870with_gnome_libs
871with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200872enable_icon_cache_update
873enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000874with_motif_lib
875with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200876enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200877enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200878enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000879enable_acl
880enable_gpm
881enable_sysmouse
882enable_nls
883'
884 ac_precious_vars='build_alias
885host_alias
886target_alias
887CC
888CFLAGS
889LDFLAGS
890LIBS
891CPPFLAGS
892CPP
893XMKMF'
894
Bram Moolenaar071d4272004-06-13 20:20:40 +0000895
896# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000897ac_init_help=
898ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000899ac_unrecognized_opts=
900ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000901# The variables have the same names as the options, with
902# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000903cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906no_recursion=
907prefix=NONE
908program_prefix=NONE
909program_suffix=NONE
910program_transform_name=s,x,x,
911silent=
912site=
913srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914verbose=
915x_includes=NONE
916x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000917
918# Installation directory options.
919# These are left unexpanded so users can "make install exec_prefix=/foo"
920# and all the variables that are supposed to be based on exec_prefix
921# by default will actually change.
922# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000923# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000924bindir='${exec_prefix}/bin'
925sbindir='${exec_prefix}/sbin'
926libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000927datarootdir='${prefix}/share'
928datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000929sysconfdir='${prefix}/etc'
930sharedstatedir='${prefix}/com'
931localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200932runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000933includedir='${prefix}/include'
934oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000935docdir='${datarootdir}/doc/${PACKAGE}'
936infodir='${datarootdir}/info'
937htmldir='${docdir}'
938dvidir='${docdir}'
939pdfdir='${docdir}'
940psdir='${docdir}'
941libdir='${exec_prefix}/lib'
942localedir='${datarootdir}/locale'
943mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000944
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000946ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000947for ac_option
948do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000949 # If the previous option needs an argument, assign it.
950 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000951 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000952 ac_prev=
953 continue
954 fi
955
Bram Moolenaar446cb832008-06-24 21:56:24 +0000956 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100957 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
958 *=) ac_optarg= ;;
959 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000960 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000961
Bram Moolenaar446cb832008-06-24 21:56:24 +0000962 case $ac_dashdash$ac_option in
963 --)
964 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000965
966 -bindir | --bindir | --bindi | --bind | --bin | --bi)
967 ac_prev=bindir ;;
968 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000969 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000970
971 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000972 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000973 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000974 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000975
976 -cache-file | --cache-file | --cache-fil | --cache-fi \
977 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
978 ac_prev=cache_file ;;
979 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
980 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000981 cache_file=$ac_optarg ;;
982
983 --config-cache | -C)
984 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000985
Bram Moolenaar446cb832008-06-24 21:56:24 +0000986 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000987 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000988 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000989 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000990
Bram Moolenaar446cb832008-06-24 21:56:24 +0000991 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
992 | --dataroo | --dataro | --datar)
993 ac_prev=datarootdir ;;
994 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
995 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
996 datarootdir=$ac_optarg ;;
997
Bram Moolenaar071d4272004-06-13 20:20:40 +0000998 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000999 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001000 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001001 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001002 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001003 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001004 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001005 case $ac_user_opts in
1006 *"
1007"enable_$ac_useropt"
1008"*) ;;
1009 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1010 ac_unrecognized_sep=', ';;
1011 esac
1012 eval enable_$ac_useropt=no ;;
1013
1014 -docdir | --docdir | --docdi | --doc | --do)
1015 ac_prev=docdir ;;
1016 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1017 docdir=$ac_optarg ;;
1018
1019 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1020 ac_prev=dvidir ;;
1021 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1022 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001023
1024 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001025 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001026 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001027 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001028 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001029 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001030 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001031 case $ac_user_opts in
1032 *"
1033"enable_$ac_useropt"
1034"*) ;;
1035 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1036 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001037 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001038 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001039
1040 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1041 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1042 | --exec | --exe | --ex)
1043 ac_prev=exec_prefix ;;
1044 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1045 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1046 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001047 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001048
1049 -gas | --gas | --ga | --g)
1050 # Obsolete; use --with-gas.
1051 with_gas=yes ;;
1052
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001053 -help | --help | --hel | --he | -h)
1054 ac_init_help=long ;;
1055 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1056 ac_init_help=recursive ;;
1057 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1058 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001059
1060 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001061 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001062 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001063 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001064
Bram Moolenaar446cb832008-06-24 21:56:24 +00001065 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1066 ac_prev=htmldir ;;
1067 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1068 | --ht=*)
1069 htmldir=$ac_optarg ;;
1070
Bram Moolenaar071d4272004-06-13 20:20:40 +00001071 -includedir | --includedir | --includedi | --included | --include \
1072 | --includ | --inclu | --incl | --inc)
1073 ac_prev=includedir ;;
1074 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1075 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001076 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001077
1078 -infodir | --infodir | --infodi | --infod | --info | --inf)
1079 ac_prev=infodir ;;
1080 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001081 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001082
1083 -libdir | --libdir | --libdi | --libd)
1084 ac_prev=libdir ;;
1085 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001086 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001087
1088 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1089 | --libexe | --libex | --libe)
1090 ac_prev=libexecdir ;;
1091 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1092 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001093 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001094
Bram Moolenaar446cb832008-06-24 21:56:24 +00001095 -localedir | --localedir | --localedi | --localed | --locale)
1096 ac_prev=localedir ;;
1097 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1098 localedir=$ac_optarg ;;
1099
Bram Moolenaar071d4272004-06-13 20:20:40 +00001100 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001101 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102 ac_prev=localstatedir ;;
1103 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001104 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001105 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001106
1107 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1108 ac_prev=mandir ;;
1109 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001110 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001111
1112 -nfp | --nfp | --nf)
1113 # Obsolete; use --without-fp.
1114 with_fp=no ;;
1115
1116 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001117 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001118 no_create=yes ;;
1119
1120 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1121 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1122 no_recursion=yes ;;
1123
1124 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1125 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1126 | --oldin | --oldi | --old | --ol | --o)
1127 ac_prev=oldincludedir ;;
1128 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1129 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1130 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001131 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001132
1133 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1134 ac_prev=prefix ;;
1135 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001136 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001137
1138 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1139 | --program-pre | --program-pr | --program-p)
1140 ac_prev=program_prefix ;;
1141 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1142 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001143 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001144
1145 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1146 | --program-suf | --program-su | --program-s)
1147 ac_prev=program_suffix ;;
1148 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1149 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001150 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001151
1152 -program-transform-name | --program-transform-name \
1153 | --program-transform-nam | --program-transform-na \
1154 | --program-transform-n | --program-transform- \
1155 | --program-transform | --program-transfor \
1156 | --program-transfo | --program-transf \
1157 | --program-trans | --program-tran \
1158 | --progr-tra | --program-tr | --program-t)
1159 ac_prev=program_transform_name ;;
1160 -program-transform-name=* | --program-transform-name=* \
1161 | --program-transform-nam=* | --program-transform-na=* \
1162 | --program-transform-n=* | --program-transform-=* \
1163 | --program-transform=* | --program-transfor=* \
1164 | --program-transfo=* | --program-transf=* \
1165 | --program-trans=* | --program-tran=* \
1166 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001167 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001168
Bram Moolenaar446cb832008-06-24 21:56:24 +00001169 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1170 ac_prev=pdfdir ;;
1171 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1172 pdfdir=$ac_optarg ;;
1173
1174 -psdir | --psdir | --psdi | --psd | --ps)
1175 ac_prev=psdir ;;
1176 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1177 psdir=$ac_optarg ;;
1178
Bram Moolenaar071d4272004-06-13 20:20:40 +00001179 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1180 | -silent | --silent | --silen | --sile | --sil)
1181 silent=yes ;;
1182
Illia Bobyrf39842f2023-08-27 18:21:23 +02001183 -runstatedir | --runstatedir | --runstatedi | --runstated \
1184 | --runstate | --runstat | --runsta | --runst | --runs \
1185 | --run | --ru | --r)
1186 ac_prev=runstatedir ;;
1187 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1188 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1189 | --run=* | --ru=* | --r=*)
1190 runstatedir=$ac_optarg ;;
1191
Bram Moolenaar071d4272004-06-13 20:20:40 +00001192 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1193 ac_prev=sbindir ;;
1194 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1195 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001196 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001197
1198 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1199 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1200 | --sharedst | --shareds | --shared | --share | --shar \
1201 | --sha | --sh)
1202 ac_prev=sharedstatedir ;;
1203 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1204 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1205 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1206 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001207 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001208
1209 -site | --site | --sit)
1210 ac_prev=site ;;
1211 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001212 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001213
1214 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1215 ac_prev=srcdir ;;
1216 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001217 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001218
1219 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1220 | --syscon | --sysco | --sysc | --sys | --sy)
1221 ac_prev=sysconfdir ;;
1222 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1223 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001224 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001225
1226 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001227 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001228 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001229 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001230
1231 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1232 verbose=yes ;;
1233
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001234 -version | --version | --versio | --versi | --vers | -V)
1235 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001236
1237 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001238 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001239 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001240 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001241 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001242 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001243 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001244 case $ac_user_opts in
1245 *"
1246"with_$ac_useropt"
1247"*) ;;
1248 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1249 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001250 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001251 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001252
1253 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001254 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001255 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001256 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001257 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001258 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001259 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001260 case $ac_user_opts in
1261 *"
1262"with_$ac_useropt"
1263"*) ;;
1264 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1265 ac_unrecognized_sep=', ';;
1266 esac
1267 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001268
1269 --x)
1270 # Obsolete; use --with-x.
1271 with_x=yes ;;
1272
1273 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1274 | --x-incl | --x-inc | --x-in | --x-i)
1275 ac_prev=x_includes ;;
1276 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1277 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001278 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001279
1280 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1281 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1282 ac_prev=x_libraries ;;
1283 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1284 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001285 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001286
Bram Moolenaar7db77842014-03-27 17:40:59 +01001287 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1288Try \`$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001289 ;;
1290
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001291 *=*)
1292 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1293 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001294 case $ac_envvar in #(
1295 '' | [0-9]* | *[!_$as_cr_alnum]* )
Bram Moolenaar7db77842014-03-27 17:40:59 +01001296 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001297 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001298 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001299 export $ac_envvar ;;
1300
Bram Moolenaar071d4272004-06-13 20:20:40 +00001301 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001302 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001303 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001304 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001305 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001306 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001307 ;;
1308
1309 esac
1310done
1311
1312if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001313 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001314 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001315fi
1316
Bram Moolenaar446cb832008-06-24 21:56:24 +00001317if test -n "$ac_unrecognized_opts"; then
1318 case $enable_option_checking in
1319 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001320 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001321 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001322 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001323fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001324
Bram Moolenaar446cb832008-06-24 21:56:24 +00001325# Check all directory arguments for consistency.
1326for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1327 datadir sysconfdir sharedstatedir localstatedir includedir \
1328 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001329 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001330do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001331 eval ac_val=\$$ac_var
1332 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001333 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001334 */ )
1335 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1336 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001337 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001338 # Be sure to have absolute directory names.
1339 case $ac_val in
1340 [\\/$]* | ?:[\\/]* ) continue;;
1341 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1342 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001343 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001344done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001345
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001346# There might be people who depend on the old broken behavior: `$host'
1347# used to hold the argument of --host etc.
1348# FIXME: To remove some day.
1349build=$build_alias
1350host=$host_alias
1351target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001352
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001353# FIXME: To remove some day.
1354if test "x$host_alias" != x; then
1355 if test "x$build_alias" = x; then
1356 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001357 elif test "x$build_alias" != "x$host_alias"; then
1358 cross_compiling=yes
1359 fi
1360fi
1361
1362ac_tool_prefix=
1363test -n "$host_alias" && ac_tool_prefix=$host_alias-
1364
1365test "$silent" = yes && exec 6>/dev/null
1366
Bram Moolenaar071d4272004-06-13 20:20:40 +00001367
Bram Moolenaar446cb832008-06-24 21:56:24 +00001368ac_pwd=`pwd` && test -n "$ac_pwd" &&
1369ac_ls_di=`ls -di .` &&
1370ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001371 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001372test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001373 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001374
1375
Bram Moolenaar071d4272004-06-13 20:20:40 +00001376# Find the source files, if location was not specified.
1377if test -z "$srcdir"; then
1378 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001379 # Try the directory containing this script, then the parent directory.
1380 ac_confdir=`$as_dirname -- "$as_myself" ||
1381$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1382 X"$as_myself" : 'X\(//\)[^/]' \| \
1383 X"$as_myself" : 'X\(//\)$' \| \
1384 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001385printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001386 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1387 s//\1/
1388 q
1389 }
1390 /^X\(\/\/\)[^/].*/{
1391 s//\1/
1392 q
1393 }
1394 /^X\(\/\/\)$/{
1395 s//\1/
1396 q
1397 }
1398 /^X\(\/\).*/{
1399 s//\1/
1400 q
1401 }
1402 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001403 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001404 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001405 srcdir=..
1406 fi
1407else
1408 ac_srcdir_defaulted=no
1409fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001410if test ! -r "$srcdir/$ac_unique_file"; then
1411 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001412 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001413fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001414ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1415ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001416 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001417 pwd)`
1418# When building in place, set srcdir=.
1419if test "$ac_abs_confdir" = "$ac_pwd"; then
1420 srcdir=.
1421fi
1422# Remove unnecessary trailing slashes from srcdir.
1423# Double slashes in file names in object file debugging info
1424# mess up M-x gdb in Emacs.
1425case $srcdir in
1426*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1427esac
1428for ac_var in $ac_precious_vars; do
1429 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1430 eval ac_env_${ac_var}_value=\$${ac_var}
1431 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1432 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1433done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001434
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001435#
1436# Report the --help message.
1437#
1438if test "$ac_init_help" = "long"; then
1439 # Omit some internal or obsolete options to make the list less imposing.
1440 # This message is too long to be a string in the A/UX 3.1 sh.
1441 cat <<_ACEOF
1442\`configure' configures this package to adapt to many kinds of systems.
1443
1444Usage: $0 [OPTION]... [VAR=VALUE]...
1445
1446To assign environment variables (e.g., CC, CFLAGS...), specify them as
1447VAR=VALUE. See below for descriptions of some of the useful variables.
1448
1449Defaults for the options are specified in brackets.
1450
1451Configuration:
1452 -h, --help display this help and exit
1453 --help=short display options specific to this package
1454 --help=recursive display the short help of all the included packages
1455 -V, --version display version information and exit
Bram Moolenaar7db77842014-03-27 17:40:59 +01001456 -q, --quiet, --silent do not print \`checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001457 --cache-file=FILE cache test results in FILE [disabled]
1458 -C, --config-cache alias for \`--cache-file=config.cache'
1459 -n, --no-create do not create output files
1460 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1461
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001462Installation directories:
1463 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001464 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001465 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001466 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001467
1468By default, \`make install' will install all the files in
1469\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1470an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1471for instance \`--prefix=\$HOME'.
1472
1473For better control, use the options below.
1474
1475Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001476 --bindir=DIR user executables [EPREFIX/bin]
1477 --sbindir=DIR system admin executables [EPREFIX/sbin]
1478 --libexecdir=DIR program executables [EPREFIX/libexec]
1479 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1480 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1481 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001482 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001483 --libdir=DIR object code libraries [EPREFIX/lib]
1484 --includedir=DIR C header files [PREFIX/include]
1485 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1486 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1487 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1488 --infodir=DIR info documentation [DATAROOTDIR/info]
1489 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1490 --mandir=DIR man documentation [DATAROOTDIR/man]
1491 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1492 --htmldir=DIR html documentation [DOCDIR]
1493 --dvidir=DIR dvi documentation [DOCDIR]
1494 --pdfdir=DIR pdf documentation [DOCDIR]
1495 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001496_ACEOF
1497
1498 cat <<\_ACEOF
1499
1500X features:
1501 --x-includes=DIR X include files are in DIR
1502 --x-libraries=DIR X library files are in DIR
1503_ACEOF
1504fi
1505
1506if test -n "$ac_init_help"; then
1507
1508 cat <<\_ACEOF
1509
1510Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001511 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001512 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1513 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001514 --enable-fail-if-missing Fail if dependencies on additional features
1515 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001516 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001517 --disable-smack Do not check for Smack support.
1518 --disable-selinux Do not check for SELinux support.
Christian Brabandte085dfd2023-09-30 12:49:18 +02001519 --disable-xattr Do not check for XATTR support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001520 --disable-xsmp Disable XSMP session management
1521 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001522 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1523 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001524 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001525 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001526 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001527 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001528 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001529 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001530 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001531 --disable-channel Disable process communication support.
1532 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001533 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001534 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001535 --disable-rightleft Do not include Right-to-Left language support.
1536 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001537 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001538 --enable-xim Include XIM input support.
1539 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001540 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001541 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001542 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001543 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001544 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001545 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001546 --disable-icon-cache-update update disabled
1547 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001548 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001549 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001550 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001551 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001552 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001553 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001554 --disable-nls Don't support NLS (gettext()).
1555
1556Optional Packages:
1557 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1558 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001559 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001560 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001561 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1562 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001563 --with-vim-name=NAME what to call the Vim executable
1564 --with-ex-name=NAME what to call the Ex executable
1565 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001566 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001567 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001568 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001569 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001570 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001571 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001572 --with-plthome=PLTHOME Use PLTHOME.
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01001573 --with-xsubpp=PATH path to the xsubpp command
Bram Moolenaare1a32312018-04-15 16:03:25 +02001574 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1575 --with-python-config-dir=PATH Python's config directory (deprecated)
1576 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02001577 --with-python3-stable-abi=VERSION stable ABI version to target (e.g. 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001578 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001579 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001580 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001581 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001582 --with-gnome-includes=DIR Specify location of GNOME headers
1583 --with-gnome-libs=DIR Specify location of GNOME libs
1584 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001585 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001586 --with-tlib=library terminal library to be used
1587
1588Some influential environment variables:
1589 CC C compiler command
1590 CFLAGS C compiler flags
1591 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1592 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001593 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001594 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001595 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001596 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001597 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001598
1599Use these variables to override the choices made by `configure' or to help
1600it to find libraries and programs with nonstandard names/locations.
1601
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001602Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001603_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001604ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001605fi
1606
1607if test "$ac_init_help" = "recursive"; then
1608 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001609 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001610 test -d "$ac_dir" ||
1611 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1612 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001613 ac_builddir=.
1614
Bram Moolenaar446cb832008-06-24 21:56:24 +00001615case "$ac_dir" in
1616.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1617*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001618 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001619 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001620 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001621 case $ac_top_builddir_sub in
1622 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1624 esac ;;
1625esac
1626ac_abs_top_builddir=$ac_pwd
1627ac_abs_builddir=$ac_pwd$ac_dir_suffix
1628# for backward compatibility:
1629ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001630
1631case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001632 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001633 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001634 ac_top_srcdir=$ac_top_builddir_sub
1635 ac_abs_top_srcdir=$ac_pwd ;;
1636 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001637 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001638 ac_top_srcdir=$srcdir
1639 ac_abs_top_srcdir=$srcdir ;;
1640 *) # Relative name.
1641 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1642 ac_top_srcdir=$ac_top_build_prefix$srcdir
1643 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001644esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001645ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001646
Bram Moolenaar446cb832008-06-24 21:56:24 +00001647 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001648 # Check for configure.gnu first; this name is used for a wrapper for
1649 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001650 if test -f "$ac_srcdir/configure.gnu"; then
1651 echo &&
1652 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1653 elif test -f "$ac_srcdir/configure"; then
1654 echo &&
1655 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001656 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001657 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001658 fi || ac_status=$?
1659 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001660 done
1661fi
1662
Bram Moolenaar446cb832008-06-24 21:56:24 +00001663test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001664if $ac_init_version; then
1665 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001666configure
Illia Bobyra96d5442023-08-30 16:30:15 +02001667generated by GNU Autoconf 2.71
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001668
Illia Bobyra96d5442023-08-30 16:30:15 +02001669Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001670This configure script is free software; the Free Software Foundation
1671gives unlimited permission to copy, distribute and modify it.
1672_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001673 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001674fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001675
1676## ------------------------ ##
1677## Autoconf initialization. ##
1678## ------------------------ ##
1679
1680# ac_fn_c_try_compile LINENO
1681# --------------------------
1682# Try to compile conftest.$ac_ext, and return whether this succeeded.
1683ac_fn_c_try_compile ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001686 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001687 if { { ac_try="$ac_compile"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001693printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001694 (eval "$ac_compile") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001701 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001702 test $ac_status = 0; } && {
1703 test -z "$ac_c_werror_flag" ||
1704 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001705 } && test -s conftest.$ac_objext
1706then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001707 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001708else $as_nop
1709 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_compile
1718
1719# ac_fn_c_try_cpp LINENO
1720# ----------------------
1721# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_cpp ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 if { { ac_try="$ac_cpp conftest.$ac_ext"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001731printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001739 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001740 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001741 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1742 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001743 }
1744then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001745 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001746else $as_nop
1747 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750 ac_retval=1
1751fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001753 as_fn_set_status $ac_retval
1754
1755} # ac_fn_c_try_cpp
1756
1757# ac_fn_c_try_link LINENO
1758# -----------------------
1759# Try to link conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_link ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001763 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001764 if { { ac_try="$ac_link"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001770printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001771 (eval "$ac_link") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001778 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
1782 } && test -s conftest$ac_exeext && {
1783 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001784 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001785 }
1786then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001787 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001788else $as_nop
1789 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
Illia Bobyr0e82b592023-08-29 21:16:29 +02001804# ac_fn_c_try_run LINENO
1805# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001806# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1807# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001808ac_fn_c_try_run ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 if { { ac_try="$ac_link"
1812case "(($ac_try" in
1813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1814 *) ac_try_echo=$ac_try;;
1815esac
1816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001817printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001818 (eval "$ac_link") 2>&5
1819 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001820 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001821 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1822 { { case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001827printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001828 (eval "$ac_try") 2>&5
1829 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001830 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; }; }
1832then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001833 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001834else $as_nop
1835 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1836 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001837sed 's/^/| /' conftest.$ac_ext >&5
1838
1839 ac_retval=$ac_status
1840fi
1841 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1842 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1843 as_fn_set_status $ac_retval
1844
1845} # ac_fn_c_try_run
1846
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001847# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1848# -------------------------------------------------------
1849# Tests whether HEADER exists and can be compiled using the include files in
1850# INCLUDES, setting the cache variable VAR accordingly.
1851ac_fn_c_check_header_compile ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855printf %s "checking for $2... " >&6; }
1856if eval test \${$3+y}
1857then :
1858 printf %s "(cached) " >&6
1859else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1861/* end confdefs.h. */
1862$4
1863#include <$2>
1864_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001865if ac_fn_c_try_compile "$LINENO"
1866then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001867 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001868else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001869 eval "$3=no"
1870fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001871rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001872fi
1873eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1875printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001877
1878} # ac_fn_c_check_header_compile
1879
1880# ac_fn_c_check_func LINENO FUNC VAR
1881# ----------------------------------
1882# Tests whether FUNC exists, setting the cache variable VAR accordingly
1883ac_fn_c_check_func ()
1884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887printf %s "checking for $2... " >&6; }
1888if eval test \${$3+y}
1889then :
1890 printf %s "(cached) " >&6
1891else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1895 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1896#define $2 innocuous_$2
1897
1898/* System header to define __stub macros and hopefully few prototypes,
Illia Bobyra96d5442023-08-30 16:30:15 +02001899 which can conflict with char $2 (); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001900
Illia Bobyra96d5442023-08-30 16:30:15 +02001901#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001902#undef $2
1903
1904/* Override any GCC internal prototype to avoid an error.
1905 Use char because int might match the return type of a GCC
1906 builtin and then its argument prototype would still apply. */
1907#ifdef __cplusplus
1908extern "C"
1909#endif
1910char $2 ();
1911/* The GNU C library defines this for functions which it implements
1912 to always fail with ENOSYS. Some functions are actually named
1913 something starting with __ and the normal name is an alias. */
1914#if defined __stub_$2 || defined __stub___$2
1915choke me
1916#endif
1917
1918int
Illia Bobyra96d5442023-08-30 16:30:15 +02001919main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001920{
1921return $2 ();
1922 ;
1923 return 0;
1924}
1925_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001926if ac_fn_c_try_link "$LINENO"
1927then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001928 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001929else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001930 eval "$3=no"
1931fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001932rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001933 conftest$ac_exeext conftest.$ac_ext
1934fi
1935eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1937printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001939
1940} # ac_fn_c_check_func
1941
Bram Moolenaar914703b2010-05-31 21:59:46 +02001942# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1943# --------------------------------------------
1944# Tries to find the compile-time value of EXPR in a program that includes
1945# INCLUDES, setting VAR accordingly. Returns whether the value could be
1946# computed
1947ac_fn_c_compute_int ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 if test "$cross_compiling" = yes; then
1951 # Depending upon the size, compute the lo and hi bounds.
1952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
Illia Bobyra96d5442023-08-30 16:30:15 +02001956main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001957{
1958static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001959test_array [0] = 0;
1960return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001961
1962 ;
1963 return 0;
1964}
1965_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001966if ac_fn_c_try_compile "$LINENO"
1967then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001968 ac_lo=0 ac_mid=0
1969 while :; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$4
1973int
Illia Bobyra96d5442023-08-30 16:30:15 +02001974main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001975{
1976static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001977test_array [0] = 0;
1978return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001979
1980 ;
1981 return 0;
1982}
1983_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001984if ac_fn_c_try_compile "$LINENO"
1985then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001986 ac_hi=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02001987else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001988 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1989 if test $ac_lo -le $ac_mid; then
1990 ac_lo= ac_hi=
1991 break
1992 fi
1993 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1994fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001995rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02001996 done
Illia Bobyra96d5442023-08-30 16:30:15 +02001997else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
Illia Bobyra96d5442023-08-30 16:30:15 +02002002main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002003{
2004static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002005test_array [0] = 0;
2006return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002012if ac_fn_c_try_compile "$LINENO"
2013then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002014 ac_hi=-1 ac_mid=-1
2015 while :; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
Illia Bobyra96d5442023-08-30 16:30:15 +02002020main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002021{
2022static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002023test_array [0] = 0;
2024return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002025
2026 ;
2027 return 0;
2028}
2029_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002030if ac_fn_c_try_compile "$LINENO"
2031then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002032 ac_lo=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02002033else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002034 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2035 if test $ac_mid -le $ac_hi; then
2036 ac_lo= ac_hi=
2037 break
2038 fi
2039 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2040fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002041rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002042 done
Illia Bobyra96d5442023-08-30 16:30:15 +02002043else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002044 ac_lo= ac_hi=
2045fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002046rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002047fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002049# Binary search between lo and hi bounds.
2050while test "x$ac_lo" != "x$ac_hi"; do
2051 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
Illia Bobyra96d5442023-08-30 16:30:15 +02002056main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002057{
2058static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002059test_array [0] = 0;
2060return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002061
2062 ;
2063 return 0;
2064}
2065_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002066if ac_fn_c_try_compile "$LINENO"
2067then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002068 ac_hi=$ac_mid
Illia Bobyra96d5442023-08-30 16:30:15 +02002069else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002070 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2071fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002072rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002073done
2074case $ac_lo in #((
2075?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2076'') ac_retval=1 ;;
2077esac
2078 else
2079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002082static long int longval (void) { return $2; }
2083static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002084#include <stdio.h>
2085#include <stdlib.h>
2086int
Illia Bobyra96d5442023-08-30 16:30:15 +02002087main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002088{
2089
2090 FILE *f = fopen ("conftest.val", "w");
2091 if (! f)
2092 return 1;
2093 if (($2) < 0)
2094 {
2095 long int i = longval ();
2096 if (i != ($2))
2097 return 1;
2098 fprintf (f, "%ld", i);
2099 }
2100 else
2101 {
2102 unsigned long int i = ulongval ();
2103 if (i != ($2))
2104 return 1;
2105 fprintf (f, "%lu", i);
2106 }
2107 /* Do not output a trailing newline, as this causes \r\n confusion
2108 on some platforms. */
2109 return ferror (f) || fclose (f) != 0;
2110
2111 ;
2112 return 0;
2113}
2114_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002115if ac_fn_c_try_run "$LINENO"
2116then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002117 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02002118else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002119 ac_retval=1
2120fi
2121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2122 conftest.$ac_objext conftest.beam conftest.$ac_ext
2123rm -f conftest.val
2124
2125 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002126 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002127 as_fn_set_status $ac_retval
2128
2129} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002130
2131# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2132# -------------------------------------------
2133# Tests whether TYPE exists after having included INCLUDES, setting cache
2134# variable VAR accordingly.
2135ac_fn_c_check_type ()
2136{
2137 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139printf %s "checking for $2... " >&6; }
2140if eval test \${$3+y}
2141then :
2142 printf %s "(cached) " >&6
2143else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002144 eval "$3=no"
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148int
Illia Bobyra96d5442023-08-30 16:30:15 +02002149main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002150{
2151if (sizeof ($2))
2152 return 0;
2153 ;
2154 return 0;
2155}
2156_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002157if ac_fn_c_try_compile "$LINENO"
2158then :
Mike Gilberta055b442023-08-20 19:01:41 +02002159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161$4
2162int
Illia Bobyra96d5442023-08-30 16:30:15 +02002163main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002164{
2165if (sizeof (($2)))
2166 return 0;
2167 ;
2168 return 0;
2169}
2170_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002171if ac_fn_c_try_compile "$LINENO"
2172then :
Mike Gilberta055b442023-08-20 19:01:41 +02002173
Illia Bobyra96d5442023-08-30 16:30:15 +02002174else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002175 eval "$3=yes"
2176fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002177rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002178fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002179rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002180fi
2181eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2183printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002184 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2185
2186} # ac_fn_c_check_type
2187
2188# ac_fn_c_find_uintX_t LINENO BITS VAR
2189# ------------------------------------
2190# Finds an unsigned integer type with width BITS, setting cache variable VAR
2191# accordingly.
2192ac_fn_c_find_uintX_t ()
2193{
2194 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2196printf %s "checking for uint$2_t... " >&6; }
2197if eval test \${$3+y}
2198then :
2199 printf %s "(cached) " >&6
2200else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002201 eval "$3=no"
2202 # Order is important - never check a type that is potentially smaller
2203 # than half of the expected target width.
2204 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2205 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2207/* end confdefs.h. */
2208$ac_includes_default
2209int
Illia Bobyra96d5442023-08-30 16:30:15 +02002210main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002211{
2212static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2213test_array [0] = 0;
2214return test_array [0];
2215
2216 ;
2217 return 0;
2218}
2219_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002220if ac_fn_c_try_compile "$LINENO"
2221then :
Mike Gilberta055b442023-08-20 19:01:41 +02002222 case $ac_type in #(
2223 uint$2_t) :
2224 eval "$3=yes" ;; #(
2225 *) :
2226 eval "$3=\$ac_type" ;;
2227esac
2228fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002229rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2230 if eval test \"x\$"$3"\" = x"no"
2231then :
Mike Gilberta055b442023-08-20 19:01:41 +02002232
Illia Bobyra96d5442023-08-30 16:30:15 +02002233else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002234 break
2235fi
2236 done
2237fi
2238eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2240printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002241 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242
2243} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002244ac_configure_args_raw=
2245for ac_arg
2246do
2247 case $ac_arg in
2248 *\'*)
2249 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2250 esac
2251 as_fn_append ac_configure_args_raw " '$ac_arg'"
2252done
2253
2254case $ac_configure_args_raw in
2255 *$as_nl*)
2256 ac_safe_unquote= ;;
2257 *)
2258 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2259 ac_unsafe_a="$ac_unsafe_z#~"
2260 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2261 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2262esac
2263
Bram Moolenaar446cb832008-06-24 21:56:24 +00002264cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002265This file contains any messages produced by compilers while
2266running configure, to aid debugging if configure makes a mistake.
2267
2268It was created by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +02002269generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002270
Illia Bobyra96d5442023-08-30 16:30:15 +02002271 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002272
2273_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002274exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002275{
2276cat <<_ASUNAME
2277## --------- ##
2278## Platform. ##
2279## --------- ##
2280
2281hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2282uname -m = `(uname -m) 2>/dev/null || echo unknown`
2283uname -r = `(uname -r) 2>/dev/null || echo unknown`
2284uname -s = `(uname -s) 2>/dev/null || echo unknown`
2285uname -v = `(uname -v) 2>/dev/null || echo unknown`
2286
2287/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2288/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2289
2290/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2291/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2292/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002293/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002294/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2295/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2296/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2297
2298_ASUNAME
2299
2300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2301for as_dir in $PATH
2302do
2303 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002304 case $as_dir in #(((
2305 '') as_dir=./ ;;
2306 */) ;;
2307 *) as_dir=$as_dir/ ;;
2308 esac
2309 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002310 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002311IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002312
2313} >&5
2314
2315cat >&5 <<_ACEOF
2316
2317
2318## ----------- ##
2319## Core tests. ##
2320## ----------- ##
2321
2322_ACEOF
2323
2324
2325# Keep a trace of the command line.
2326# Strip out --no-create and --no-recursion so they do not pile up.
2327# Strip out --silent because we don't want to record it for future runs.
2328# Also quote any args containing shell meta-characters.
2329# Make two passes to allow for proper duplicate-argument suppression.
2330ac_configure_args=
2331ac_configure_args0=
2332ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002333ac_must_keep_next=false
2334for ac_pass in 1 2
2335do
2336 for ac_arg
2337 do
2338 case $ac_arg in
2339 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2341 | -silent | --silent | --silen | --sile | --sil)
2342 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002343 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002344 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002345 esac
2346 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002347 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002348 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002349 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002350 if test $ac_must_keep_next = true; then
2351 ac_must_keep_next=false # Got value, back to normal.
2352 else
2353 case $ac_arg in
2354 *=* | --config-cache | -C | -disable-* | --disable-* \
2355 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2356 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2357 | -with-* | --with-* | -without-* | --without-* | --x)
2358 case "$ac_configure_args0 " in
2359 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2360 esac
2361 ;;
2362 -* ) ac_must_keep_next=true ;;
2363 esac
2364 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002365 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002366 ;;
2367 esac
2368 done
2369done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002370{ ac_configure_args0=; unset ac_configure_args0;}
2371{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002372
2373# When interrupted or exit'd, cleanup temporary files, and complete
2374# config.log. We remove comments because anyway the quotes in there
2375# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002376# WARNING: Use '\'' to represent an apostrophe within the trap.
2377# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002378trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002379 # Sanitize IFS.
2380 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002381 # Save into config.log some information that might help in debugging.
2382 {
2383 echo
2384
Illia Bobyra96d5442023-08-30 16:30:15 +02002385 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002386## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002387## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002388 echo
2389 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002390(
2391 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2392 eval ac_val=\$$ac_var
2393 case $ac_val in #(
2394 *${as_nl}*)
2395 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002396 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2397printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002398 esac
2399 case $ac_var in #(
2400 _ | IFS | as_nl) ;; #(
2401 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002402 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002403 esac ;;
2404 esac
2405 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002406 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002407 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2408 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002409 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002410 "s/'\''/'\''\\\\'\'''\''/g;
2411 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2412 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002413 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002414 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002415 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002416 esac |
2417 sort
2418)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002419 echo
2420
Illia Bobyra96d5442023-08-30 16:30:15 +02002421 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002422## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002423## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002424 echo
2425 for ac_var in $ac_subst_vars
2426 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002427 eval ac_val=\$$ac_var
2428 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002429 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002430 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002431 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002432 done | sort
2433 echo
2434
2435 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002436 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002437## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002438## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002439 echo
2440 for ac_var in $ac_subst_files
2441 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002442 eval ac_val=\$$ac_var
2443 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002444 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002445 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002446 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002447 done | sort
2448 echo
2449 fi
2450
2451 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002452 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002453## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002454## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002455 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002456 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002457 echo
2458 fi
2459 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002460 printf "%s\n" "$as_me: caught signal $ac_signal"
2461 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002462 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002463 rm -f core *.core core.conftest.* &&
2464 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002465 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002466' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002467for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002468 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002469done
2470ac_signal=0
2471
2472# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002473rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002474
Illia Bobyra96d5442023-08-30 16:30:15 +02002475printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002476
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002477# Predefined preprocessor variables.
2478
Illia Bobyra96d5442023-08-30 16:30:15 +02002479printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002480
Illia Bobyra96d5442023-08-30 16:30:15 +02002481printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002482
Illia Bobyra96d5442023-08-30 16:30:15 +02002483printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002484
Illia Bobyra96d5442023-08-30 16:30:15 +02002485printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002486
Illia Bobyra96d5442023-08-30 16:30:15 +02002487printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002488
Illia Bobyra96d5442023-08-30 16:30:15 +02002489printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002490
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002491
2492# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002493# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002494if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002495 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002496elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002497 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002498else
Illia Bobyra96d5442023-08-30 16:30:15 +02002499 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002500fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002501
2502for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002503do
Illia Bobyra96d5442023-08-30 16:30:15 +02002504 case $ac_site_file in #(
2505 */*) :
2506 ;; #(
2507 *) :
2508 ac_site_file=./$ac_site_file ;;
2509esac
2510 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2512printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002513 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002514 . "$ac_site_file" \
Illia Bobyra96d5442023-08-30 16:30:15 +02002515 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2516printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002517as_fn_error $? "failed to load site script $ac_site_file
2518See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002519 fi
2520done
2521
2522if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002523 # Some versions of bash will fail to source /dev/null (special files
2524 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2525 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2527printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002528 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002529 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2530 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002531 esac
2532 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002533else
Illia Bobyra96d5442023-08-30 16:30:15 +02002534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2535printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002536 >$cache_file
2537fi
2538
Illia Bobyra96d5442023-08-30 16:30:15 +02002539# Test code for whether the C compiler supports C89 (global declarations)
2540ac_c_conftest_c89_globals='
2541/* Does the compiler advertise C89 conformance?
2542 Do not test the value of __STDC__, because some compilers set it to 0
2543 while being otherwise adequately conformant. */
2544#if !defined __STDC__
2545# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002546#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002547
Illia Bobyra96d5442023-08-30 16:30:15 +02002548#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002549#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002550struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002551/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002552struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002553struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002554static char *e (p, i)
2555 char **p;
2556 int i;
2557{
2558 return p[i];
2559}
2560static char *f (char * (*g) (char **, int), char **p, ...)
2561{
2562 char *s;
2563 va_list v;
2564 va_start (v,p);
2565 s = g (p, va_arg (v,int));
2566 va_end (v);
2567 return s;
2568}
2569
2570/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002571 function prototypes and stuff, but not \xHH hex character constants.
2572 These do not provoke an error unfortunately, instead are silently treated
2573 as an "x". The following induces an error, until -std is added to get
2574 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2575 array size at least. It is necessary to write \x00 == 0 to get something
2576 that is true only with -std. */
2577int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002578
Bram Moolenaar446cb832008-06-24 21:56:24 +00002579/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2580 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002581#define FOO(x) '\''x'\''
2582int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002583
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002584int test (int i, double x);
2585struct s1 {int (*f) (int a);};
2586struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002587int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2588 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002589
Illia Bobyra96d5442023-08-30 16:30:15 +02002590# Test code for whether the C compiler supports C89 (body of main).
2591ac_c_conftest_c89_main='
2592ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2593'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002594
Illia Bobyra96d5442023-08-30 16:30:15 +02002595# Test code for whether the C compiler supports C99 (global declarations)
2596ac_c_conftest_c99_globals='
2597// Does the compiler advertise C99 conformance?
2598#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2599# error "Compiler does not advertise C99 conformance"
2600#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002601
Bram Moolenaar22640082018-04-19 20:39:41 +02002602#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002603extern int puts (const char *);
2604extern int printf (const char *, ...);
2605extern int dprintf (int, const char *, ...);
2606extern void *malloc (size_t);
Bram Moolenaar22640082018-04-19 20:39:41 +02002607
2608// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002609// dprintf is used instead of fprintf to avoid needing to declare
2610// FILE and stderr.
2611#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002612#define showlist(...) puts (#__VA_ARGS__)
2613#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2614static void
2615test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002616{
Bram Moolenaar22640082018-04-19 20:39:41 +02002617 int x = 1234;
2618 int y = 5678;
2619 debug ("Flag");
2620 debug ("X = %d\n", x);
2621 showlist (The first, second, and third items.);
2622 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002623}
2624
Bram Moolenaar22640082018-04-19 20:39:41 +02002625// Check long long types.
2626#define BIG64 18446744073709551615ull
2627#define BIG32 4294967295ul
2628#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2629#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002630 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002631#endif
2632#if BIG_OK
2633#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002634 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002635#endif
2636static long long int bignum = -9223372036854775807LL;
2637static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002638
Bram Moolenaar22640082018-04-19 20:39:41 +02002639struct incomplete_array
2640{
2641 int datasize;
2642 double data[];
2643};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002644
Bram Moolenaar22640082018-04-19 20:39:41 +02002645struct named_init {
2646 int number;
2647 const wchar_t *name;
2648 double average;
2649};
2650
2651typedef const char *ccp;
2652
2653static inline int
2654test_restrict (ccp restrict text)
2655{
2656 // See if C++-style comments work.
2657 // Iterate through items via the restricted pointer.
2658 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002659 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002660 continue;
2661 return 0;
2662}
2663
2664// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002665static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002666test_varargs (const char *format, ...)
2667{
2668 va_list args;
2669 va_start (args, format);
2670 va_list args_copy;
2671 va_copy (args_copy, args);
2672
Illia Bobyra96d5442023-08-30 16:30:15 +02002673 const char *str = "";
2674 int number = 0;
2675 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002676
2677 while (*format)
2678 {
2679 switch (*format++)
2680 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002681 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002682 str = va_arg (args_copy, const char *);
2683 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002684 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002685 number = va_arg (args_copy, int);
2686 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002687 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002688 fnumber = va_arg (args_copy, double);
2689 break;
2690 default:
2691 break;
2692 }
2693 }
2694 va_end (args_copy);
2695 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002696
2697 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002698}
Illia Bobyra96d5442023-08-30 16:30:15 +02002699'
Bram Moolenaar22640082018-04-19 20:39:41 +02002700
Illia Bobyra96d5442023-08-30 16:30:15 +02002701# Test code for whether the C compiler supports C99 (body of main).
2702ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002703 // Check bool.
2704 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002705 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002706
2707 // Check restrict.
2708 if (test_restrict ("String literal") == 0)
2709 success = true;
2710 char *restrict newvar = "Another string";
2711
2712 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002713 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002714 test_varargs_macros ();
2715
2716 // Check flexible array members.
2717 struct incomplete_array *ia =
2718 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2719 ia->datasize = 10;
2720 for (int i = 0; i < ia->datasize; ++i)
2721 ia->data[i] = i * 1.234;
2722
2723 // Check named initializers.
2724 struct named_init ni = {
2725 .number = 34,
2726 .name = L"Test wide string",
2727 .average = 543.34343,
2728 };
2729
2730 ni.number = 58;
2731
2732 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002733 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002734 dynamic_array[ni.number - 1] = 543;
2735
2736 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002737 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2738 || dynamic_array[ni.number - 1] != 543);
2739'
2740
2741# Test code for whether the C compiler supports C11 (global declarations)
2742ac_c_conftest_c11_globals='
2743// Does the compiler advertise C11 conformance?
2744#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2745# error "Compiler does not advertise C11 conformance"
2746#endif
2747
2748// Check _Alignas.
2749char _Alignas (double) aligned_as_double;
2750char _Alignas (0) no_special_alignment;
2751extern char aligned_as_int;
2752char _Alignas (0) _Alignas (int) aligned_as_int;
2753
2754// Check _Alignof.
2755enum
2756{
2757 int_alignment = _Alignof (int),
2758 int_array_alignment = _Alignof (int[100]),
2759 char_alignment = _Alignof (char)
2760};
2761_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2762
2763// Check _Noreturn.
2764int _Noreturn does_not_return (void) { for (;;) continue; }
2765
2766// Check _Static_assert.
2767struct test_static_assert
2768{
2769 int x;
2770 _Static_assert (sizeof (int) <= sizeof (long int),
2771 "_Static_assert does not work in struct");
2772 long int y;
2773};
2774
2775// Check UTF-8 literals.
2776#define u8 syntax error!
2777char const utf8_literal[] = u8"happens to be ASCII" "another string";
2778
2779// Check duplicate typedefs.
2780typedef long *long_ptr;
2781typedef long int *long_ptr;
2782typedef long_ptr long_ptr;
2783
2784// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2785struct anonymous
2786{
2787 union {
2788 struct { int i; int j; };
2789 struct { int k; long int l; } w;
2790 };
2791 int m;
2792} v1;
2793'
2794
2795# Test code for whether the C compiler supports C11 (body of main).
2796ac_c_conftest_c11_main='
2797 _Static_assert ((offsetof (struct anonymous, i)
2798 == offsetof (struct anonymous, w.k)),
2799 "Anonymous union alignment botch");
2800 v1.i = 2;
2801 v1.w.k = 5;
2802 ok |= v1.i != 5;
2803'
2804
2805# Test code for whether the C compiler supports C11 (complete).
2806ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2807${ac_c_conftest_c99_globals}
2808${ac_c_conftest_c11_globals}
2809
2810int
2811main (int argc, char **argv)
2812{
2813 int ok = 0;
2814 ${ac_c_conftest_c89_main}
2815 ${ac_c_conftest_c99_main}
2816 ${ac_c_conftest_c11_main}
2817 return ok;
2818}
2819"
2820
2821# Test code for whether the C compiler supports C99 (complete).
2822ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2823${ac_c_conftest_c99_globals}
2824
2825int
2826main (int argc, char **argv)
2827{
2828 int ok = 0;
2829 ${ac_c_conftest_c89_main}
2830 ${ac_c_conftest_c99_main}
2831 return ok;
2832}
2833"
2834
2835# Test code for whether the C compiler supports C89 (complete).
2836ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2837
2838int
2839main (int argc, char **argv)
2840{
2841 int ok = 0;
2842 ${ac_c_conftest_c89_main}
2843 return ok;
2844}
2845"
2846
2847as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2848as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2849as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2850as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2851as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2852as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2853as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2854as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2855as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2856as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2857as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2858as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2859# Check that the precious variables saved in the cache have kept the same
2860# value.
2861ac_cache_corrupted=false
2862for ac_var in $ac_precious_vars; do
2863 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2864 eval ac_new_set=\$ac_env_${ac_var}_set
2865 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2866 eval ac_new_val=\$ac_env_${ac_var}_value
2867 case $ac_old_set,$ac_new_set in
2868 set,)
2869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2870printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2871 ac_cache_corrupted=: ;;
2872 ,set)
2873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2874printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2875 ac_cache_corrupted=: ;;
2876 ,);;
2877 *)
2878 if test "x$ac_old_val" != "x$ac_new_val"; then
2879 # differences in whitespace do not lead to failure.
2880 ac_old_val_w=`echo x $ac_old_val`
2881 ac_new_val_w=`echo x $ac_new_val`
2882 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2884printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2885 ac_cache_corrupted=:
2886 else
2887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2888printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2889 eval $ac_var=\$ac_old_val
2890 fi
2891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2892printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2894printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2895 fi;;
2896 esac
2897 # Pass precious variables to config.status.
2898 if test "$ac_new_set" = set; then
2899 case $ac_new_val in
2900 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2901 *) ac_arg=$ac_var=$ac_new_val ;;
2902 esac
2903 case " $ac_configure_args " in
2904 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2905 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2906 esac
2907 fi
2908done
2909if $ac_cache_corrupted; then
2910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2911printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2913printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2914 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2915 and start over" "$LINENO" 5
2916fi
2917## -------------------- ##
2918## Main body of script. ##
2919## -------------------- ##
2920
2921ac_ext=c
2922ac_cpp='$CPP $CPPFLAGS'
2923ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2924ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2925ac_compiler_gnu=$ac_cv_c_compiler_gnu
2926
2927
2928
2929ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2930
2931
2932printf "%s\n" "#define UNIX 1" >>confdefs.h
2933
2934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2935printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2936set x ${MAKE-make}
2937ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2938if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2939then :
2940 printf %s "(cached) " >&6
2941else $as_nop
2942 cat >conftest.make <<\_ACEOF
2943SHELL = /bin/sh
2944all:
2945 @echo '@@@%%%=$(MAKE)=@@@%%%'
2946_ACEOF
2947# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2948case `${MAKE-make} -f conftest.make 2>/dev/null` in
2949 *@@@%%%=?*=@@@%%%*)
2950 eval ac_cv_prog_make_${ac_make}_set=yes;;
2951 *)
2952 eval ac_cv_prog_make_${ac_make}_set=no;;
2953esac
2954rm -f conftest.make
2955fi
2956if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2958printf "%s\n" "yes" >&6; }
2959 SET_MAKE=
2960else
2961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2962printf "%s\n" "no" >&6; }
2963 SET_MAKE="MAKE=${MAKE-make}"
2964fi
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976ac_ext=c
2977ac_cpp='$CPP $CPPFLAGS'
2978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2980ac_compiler_gnu=$ac_cv_c_compiler_gnu
2981if test -n "$ac_tool_prefix"; then
2982 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2983set dummy ${ac_tool_prefix}gcc; ac_word=$2
2984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2985printf %s "checking for $ac_word... " >&6; }
2986if test ${ac_cv_prog_CC+y}
2987then :
2988 printf %s "(cached) " >&6
2989else $as_nop
2990 if test -n "$CC"; then
2991 ac_cv_prog_CC="$CC" # Let the user override the test.
2992else
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 case $as_dir in #(((
2998 '') as_dir=./ ;;
2999 */) ;;
3000 *) as_dir=$as_dir/ ;;
3001 esac
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3004 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3005 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3006 break 2
3007 fi
3008done
3009 done
3010IFS=$as_save_IFS
3011
3012fi
3013fi
3014CC=$ac_cv_prog_CC
3015if test -n "$CC"; then
3016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017printf "%s\n" "$CC" >&6; }
3018else
3019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020printf "%s\n" "no" >&6; }
3021fi
3022
3023
3024fi
3025if test -z "$ac_cv_prog_CC"; then
3026 ac_ct_CC=$CC
3027 # Extract the first word of "gcc", so it can be a program name with args.
3028set dummy gcc; ac_word=$2
3029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3030printf %s "checking for $ac_word... " >&6; }
3031if test ${ac_cv_prog_ac_ct_CC+y}
3032then :
3033 printf %s "(cached) " >&6
3034else $as_nop
3035 if test -n "$ac_ct_CC"; then
3036 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3037else
3038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3039for as_dir in $PATH
3040do
3041 IFS=$as_save_IFS
3042 case $as_dir in #(((
3043 '') as_dir=./ ;;
3044 */) ;;
3045 *) as_dir=$as_dir/ ;;
3046 esac
3047 for ac_exec_ext in '' $ac_executable_extensions; do
3048 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3049 ac_cv_prog_ac_ct_CC="gcc"
3050 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3051 break 2
3052 fi
3053done
3054 done
3055IFS=$as_save_IFS
3056
3057fi
3058fi
3059ac_ct_CC=$ac_cv_prog_ac_ct_CC
3060if test -n "$ac_ct_CC"; then
3061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3062printf "%s\n" "$ac_ct_CC" >&6; }
3063else
3064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065printf "%s\n" "no" >&6; }
3066fi
3067
3068 if test "x$ac_ct_CC" = x; then
3069 CC=""
3070 else
3071 case $cross_compiling:$ac_tool_warned in
3072yes:)
3073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3074printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3075ac_tool_warned=yes ;;
3076esac
3077 CC=$ac_ct_CC
3078 fi
3079else
3080 CC="$ac_cv_prog_CC"
3081fi
3082
3083if test -z "$CC"; then
3084 if test -n "$ac_tool_prefix"; then
3085 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3086set dummy ${ac_tool_prefix}cc; ac_word=$2
3087{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3088printf %s "checking for $ac_word... " >&6; }
3089if test ${ac_cv_prog_CC+y}
3090then :
3091 printf %s "(cached) " >&6
3092else $as_nop
3093 if test -n "$CC"; then
3094 ac_cv_prog_CC="$CC" # Let the user override the test.
3095else
3096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3097for as_dir in $PATH
3098do
3099 IFS=$as_save_IFS
3100 case $as_dir in #(((
3101 '') as_dir=./ ;;
3102 */) ;;
3103 *) as_dir=$as_dir/ ;;
3104 esac
3105 for ac_exec_ext in '' $ac_executable_extensions; do
3106 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3107 ac_cv_prog_CC="${ac_tool_prefix}cc"
3108 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3109 break 2
3110 fi
3111done
3112 done
3113IFS=$as_save_IFS
3114
3115fi
3116fi
3117CC=$ac_cv_prog_CC
3118if test -n "$CC"; then
3119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3120printf "%s\n" "$CC" >&6; }
3121else
3122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3123printf "%s\n" "no" >&6; }
3124fi
3125
3126
3127 fi
3128fi
3129if test -z "$CC"; then
3130 # Extract the first word of "cc", so it can be a program name with args.
3131set dummy cc; ac_word=$2
3132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3133printf %s "checking for $ac_word... " >&6; }
3134if test ${ac_cv_prog_CC+y}
3135then :
3136 printf %s "(cached) " >&6
3137else $as_nop
3138 if test -n "$CC"; then
3139 ac_cv_prog_CC="$CC" # Let the user override the test.
3140else
3141 ac_prog_rejected=no
3142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3143for as_dir in $PATH
3144do
3145 IFS=$as_save_IFS
3146 case $as_dir in #(((
3147 '') as_dir=./ ;;
3148 */) ;;
3149 *) as_dir=$as_dir/ ;;
3150 esac
3151 for ac_exec_ext in '' $ac_executable_extensions; do
3152 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3153 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3154 ac_prog_rejected=yes
3155 continue
3156 fi
3157 ac_cv_prog_CC="cc"
3158 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3159 break 2
3160 fi
3161done
3162 done
3163IFS=$as_save_IFS
3164
3165if test $ac_prog_rejected = yes; then
3166 # We found a bogon in the path, so make sure we never use it.
3167 set dummy $ac_cv_prog_CC
3168 shift
3169 if test $# != 0; then
3170 # We chose a different compiler from the bogus one.
3171 # However, it has the same basename, so the bogon will be chosen
3172 # first if we set CC to just the basename; use the full file name.
3173 shift
3174 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3175 fi
3176fi
3177fi
3178fi
3179CC=$ac_cv_prog_CC
3180if test -n "$CC"; then
3181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3182printf "%s\n" "$CC" >&6; }
3183else
3184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185printf "%s\n" "no" >&6; }
3186fi
3187
3188
3189fi
3190if test -z "$CC"; then
3191 if test -n "$ac_tool_prefix"; then
3192 for ac_prog in cl.exe
3193 do
3194 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197printf %s "checking for $ac_word... " >&6; }
3198if test ${ac_cv_prog_CC+y}
3199then :
3200 printf %s "(cached) " >&6
3201else $as_nop
3202 if test -n "$CC"; then
3203 ac_cv_prog_CC="$CC" # Let the user override the test.
3204else
3205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3206for as_dir in $PATH
3207do
3208 IFS=$as_save_IFS
3209 case $as_dir in #(((
3210 '') as_dir=./ ;;
3211 */) ;;
3212 *) as_dir=$as_dir/ ;;
3213 esac
3214 for ac_exec_ext in '' $ac_executable_extensions; do
3215 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3216 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3217 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3218 break 2
3219 fi
3220done
3221 done
3222IFS=$as_save_IFS
3223
3224fi
3225fi
3226CC=$ac_cv_prog_CC
3227if test -n "$CC"; then
3228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3229printf "%s\n" "$CC" >&6; }
3230else
3231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3232printf "%s\n" "no" >&6; }
3233fi
3234
3235
3236 test -n "$CC" && break
3237 done
3238fi
3239if test -z "$CC"; then
3240 ac_ct_CC=$CC
3241 for ac_prog in cl.exe
3242do
3243 # Extract the first word of "$ac_prog", so it can be a program name with args.
3244set dummy $ac_prog; ac_word=$2
3245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3246printf %s "checking for $ac_word... " >&6; }
3247if test ${ac_cv_prog_ac_ct_CC+y}
3248then :
3249 printf %s "(cached) " >&6
3250else $as_nop
3251 if test -n "$ac_ct_CC"; then
3252 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3253else
3254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3255for as_dir in $PATH
3256do
3257 IFS=$as_save_IFS
3258 case $as_dir in #(((
3259 '') as_dir=./ ;;
3260 */) ;;
3261 *) as_dir=$as_dir/ ;;
3262 esac
3263 for ac_exec_ext in '' $ac_executable_extensions; do
3264 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3265 ac_cv_prog_ac_ct_CC="$ac_prog"
3266 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3267 break 2
3268 fi
3269done
3270 done
3271IFS=$as_save_IFS
3272
3273fi
3274fi
3275ac_ct_CC=$ac_cv_prog_ac_ct_CC
3276if test -n "$ac_ct_CC"; then
3277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3278printf "%s\n" "$ac_ct_CC" >&6; }
3279else
3280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281printf "%s\n" "no" >&6; }
3282fi
3283
3284
3285 test -n "$ac_ct_CC" && break
3286done
3287
3288 if test "x$ac_ct_CC" = x; then
3289 CC=""
3290 else
3291 case $cross_compiling:$ac_tool_warned in
3292yes:)
3293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3294printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3295ac_tool_warned=yes ;;
3296esac
3297 CC=$ac_ct_CC
3298 fi
3299fi
3300
3301fi
3302if test -z "$CC"; then
3303 if test -n "$ac_tool_prefix"; then
3304 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3305set dummy ${ac_tool_prefix}clang; ac_word=$2
3306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3307printf %s "checking for $ac_word... " >&6; }
3308if test ${ac_cv_prog_CC+y}
3309then :
3310 printf %s "(cached) " >&6
3311else $as_nop
3312 if test -n "$CC"; then
3313 ac_cv_prog_CC="$CC" # Let the user override the test.
3314else
3315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH
3317do
3318 IFS=$as_save_IFS
3319 case $as_dir in #(((
3320 '') as_dir=./ ;;
3321 */) ;;
3322 *) as_dir=$as_dir/ ;;
3323 esac
3324 for ac_exec_ext in '' $ac_executable_extensions; do
3325 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3326 ac_cv_prog_CC="${ac_tool_prefix}clang"
3327 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3328 break 2
3329 fi
3330done
3331 done
3332IFS=$as_save_IFS
3333
3334fi
3335fi
3336CC=$ac_cv_prog_CC
3337if test -n "$CC"; then
3338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3339printf "%s\n" "$CC" >&6; }
3340else
3341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3342printf "%s\n" "no" >&6; }
3343fi
3344
3345
3346fi
3347if test -z "$ac_cv_prog_CC"; then
3348 ac_ct_CC=$CC
3349 # Extract the first word of "clang", so it can be a program name with args.
3350set dummy clang; ac_word=$2
3351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352printf %s "checking for $ac_word... " >&6; }
3353if test ${ac_cv_prog_ac_ct_CC+y}
3354then :
3355 printf %s "(cached) " >&6
3356else $as_nop
3357 if test -n "$ac_ct_CC"; then
3358 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3359else
3360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 case $as_dir in #(((
3365 '') as_dir=./ ;;
3366 */) ;;
3367 *) as_dir=$as_dir/ ;;
3368 esac
3369 for ac_exec_ext in '' $ac_executable_extensions; do
3370 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3371 ac_cv_prog_ac_ct_CC="clang"
3372 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3373 break 2
3374 fi
3375done
3376 done
3377IFS=$as_save_IFS
3378
3379fi
3380fi
3381ac_ct_CC=$ac_cv_prog_ac_ct_CC
3382if test -n "$ac_ct_CC"; then
3383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3384printf "%s\n" "$ac_ct_CC" >&6; }
3385else
3386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3387printf "%s\n" "no" >&6; }
3388fi
3389
3390 if test "x$ac_ct_CC" = x; then
3391 CC=""
3392 else
3393 case $cross_compiling:$ac_tool_warned in
3394yes:)
3395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3396printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3397ac_tool_warned=yes ;;
3398esac
3399 CC=$ac_ct_CC
3400 fi
3401else
3402 CC="$ac_cv_prog_CC"
3403fi
3404
3405fi
3406
3407
3408test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3410as_fn_error $? "no acceptable C compiler found in \$PATH
3411See \`config.log' for more details" "$LINENO" 5; }
3412
3413# Provide some information about the compiler.
3414printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3415set X $ac_compile
3416ac_compiler=$2
3417for ac_option in --version -v -V -qversion -version; do
3418 { { ac_try="$ac_compiler $ac_option >&5"
3419case "(($ac_try" in
3420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3421 *) ac_try_echo=$ac_try;;
3422esac
3423eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3424printf "%s\n" "$ac_try_echo"; } >&5
3425 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3426 ac_status=$?
3427 if test -s conftest.err; then
3428 sed '10a\
3429... rest of stderr output deleted ...
3430 10q' conftest.err >conftest.er1
3431 cat conftest.er1 >&5
3432 fi
3433 rm -f conftest.er1 conftest.err
3434 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3435 test $ac_status = 0; }
3436done
3437
3438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3439/* end confdefs.h. */
3440
3441int
3442main (void)
3443{
Bram Moolenaar22640082018-04-19 20:39:41 +02003444
Bram Moolenaar2e324952018-04-14 14:37:07 +02003445 ;
3446 return 0;
3447}
3448_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003449ac_clean_files_save=$ac_clean_files
3450ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3451# Try to create an executable without -o first, disregard a.out.
3452# It will help us diagnose broken compilers, and finding out an intuition
3453# of exeext.
3454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3455printf %s "checking whether the C compiler works... " >&6; }
3456ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3457
3458# The possible output files:
3459ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3460
3461ac_rmfiles=
3462for ac_file in $ac_files
3463do
3464 case $ac_file in
3465 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3466 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3467 esac
3468done
3469rm -f $ac_rmfiles
3470
3471if { { ac_try="$ac_link_default"
3472case "(($ac_try" in
3473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3474 *) ac_try_echo=$ac_try;;
3475esac
3476eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3477printf "%s\n" "$ac_try_echo"; } >&5
3478 (eval "$ac_link_default") 2>&5
3479 ac_status=$?
3480 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3481 test $ac_status = 0; }
3482then :
3483 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3484# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3485# in a Makefile. We should not override ac_cv_exeext if it was cached,
3486# so that the user can short-circuit this test for compilers unknown to
3487# Autoconf.
3488for ac_file in $ac_files ''
3489do
3490 test -f "$ac_file" || continue
3491 case $ac_file in
3492 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3493 ;;
3494 [ab].out )
3495 # We found the default executable, but exeext='' is most
3496 # certainly right.
3497 break;;
3498 *.* )
3499 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3500 then :; else
3501 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3502 fi
3503 # We set ac_cv_exeext here because the later test for it is not
3504 # safe: cross compilers may not add the suffix if given an `-o'
3505 # argument, so we may need to know it at that point already.
3506 # Even if this section looks crufty: it has the advantage of
3507 # actually working.
3508 break;;
3509 * )
3510 break;;
3511 esac
3512done
3513test "$ac_cv_exeext" = no && ac_cv_exeext=
3514
3515else $as_nop
3516 ac_file=''
3517fi
3518if test -z "$ac_file"
3519then :
3520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3521printf "%s\n" "no" >&6; }
3522printf "%s\n" "$as_me: failed program was:" >&5
3523sed 's/^/| /' conftest.$ac_ext >&5
3524
3525{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3526printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3527as_fn_error 77 "C compiler cannot create executables
3528See \`config.log' for more details" "$LINENO" 5; }
3529else $as_nop
3530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3531printf "%s\n" "yes" >&6; }
3532fi
3533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3534printf %s "checking for C compiler default output file name... " >&6; }
3535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3536printf "%s\n" "$ac_file" >&6; }
3537ac_exeext=$ac_cv_exeext
3538
3539rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3540ac_clean_files=$ac_clean_files_save
3541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3542printf %s "checking for suffix of executables... " >&6; }
3543if { { ac_try="$ac_link"
3544case "(($ac_try" in
3545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3546 *) ac_try_echo=$ac_try;;
3547esac
3548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3549printf "%s\n" "$ac_try_echo"; } >&5
3550 (eval "$ac_link") 2>&5
3551 ac_status=$?
3552 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3553 test $ac_status = 0; }
3554then :
3555 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3556# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3557# work properly (i.e., refer to `conftest.exe'), while it won't with
3558# `rm'.
3559for ac_file in conftest.exe conftest conftest.*; do
3560 test -f "$ac_file" || continue
3561 case $ac_file in
3562 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3563 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3564 break;;
3565 * ) break;;
3566 esac
3567done
3568else $as_nop
3569 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3570printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3571as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3572See \`config.log' for more details" "$LINENO" 5; }
3573fi
3574rm -f conftest conftest$ac_cv_exeext
3575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3576printf "%s\n" "$ac_cv_exeext" >&6; }
3577
3578rm -f conftest.$ac_ext
3579EXEEXT=$ac_cv_exeext
3580ac_exeext=$EXEEXT
3581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3582/* end confdefs.h. */
3583#include <stdio.h>
3584int
3585main (void)
3586{
3587FILE *f = fopen ("conftest.out", "w");
3588 return ferror (f) || fclose (f) != 0;
3589
3590 ;
3591 return 0;
3592}
3593_ACEOF
3594ac_clean_files="$ac_clean_files conftest.out"
3595# Check that the compiler produces executables we can run. If not, either
3596# the compiler is broken, or we cross compile.
3597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3598printf %s "checking whether we are cross compiling... " >&6; }
3599if test "$cross_compiling" != yes; then
3600 { { ac_try="$ac_link"
3601case "(($ac_try" in
3602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3603 *) ac_try_echo=$ac_try;;
3604esac
3605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3606printf "%s\n" "$ac_try_echo"; } >&5
3607 (eval "$ac_link") 2>&5
3608 ac_status=$?
3609 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3610 test $ac_status = 0; }
3611 if { ac_try='./conftest$ac_cv_exeext'
3612 { { case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
3616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617printf "%s\n" "$ac_try_echo"; } >&5
3618 (eval "$ac_try") 2>&5
3619 ac_status=$?
3620 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; }; then
3622 cross_compiling=no
3623 else
3624 if test "$cross_compiling" = maybe; then
3625 cross_compiling=yes
3626 else
3627 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3628printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3629as_fn_error 77 "cannot run C compiled programs.
3630If you meant to cross compile, use \`--host'.
3631See \`config.log' for more details" "$LINENO" 5; }
3632 fi
3633 fi
3634fi
3635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3636printf "%s\n" "$cross_compiling" >&6; }
3637
3638rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3639ac_clean_files=$ac_clean_files_save
3640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3641printf %s "checking for suffix of object files... " >&6; }
3642if test ${ac_cv_objext+y}
3643then :
3644 printf %s "(cached) " >&6
3645else $as_nop
3646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3647/* end confdefs.h. */
3648
3649int
3650main (void)
3651{
3652
3653 ;
3654 return 0;
3655}
3656_ACEOF
3657rm -f conftest.o conftest.obj
3658if { { ac_try="$ac_compile"
3659case "(($ac_try" in
3660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3661 *) ac_try_echo=$ac_try;;
3662esac
3663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3664printf "%s\n" "$ac_try_echo"; } >&5
3665 (eval "$ac_compile") 2>&5
3666 ac_status=$?
3667 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3668 test $ac_status = 0; }
3669then :
3670 for ac_file in conftest.o conftest.obj conftest.*; do
3671 test -f "$ac_file" || continue;
3672 case $ac_file in
3673 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3674 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3675 break;;
3676 esac
3677done
3678else $as_nop
3679 printf "%s\n" "$as_me: failed program was:" >&5
3680sed 's/^/| /' conftest.$ac_ext >&5
3681
3682{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3683printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3684as_fn_error $? "cannot compute suffix of object files: cannot compile
3685See \`config.log' for more details" "$LINENO" 5; }
3686fi
3687rm -f conftest.$ac_cv_objext conftest.$ac_ext
3688fi
3689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3690printf "%s\n" "$ac_cv_objext" >&6; }
3691OBJEXT=$ac_cv_objext
3692ac_objext=$OBJEXT
3693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3694printf %s "checking whether the compiler supports GNU C... " >&6; }
3695if test ${ac_cv_c_compiler_gnu+y}
3696then :
3697 printf %s "(cached) " >&6
3698else $as_nop
3699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3700/* end confdefs.h. */
3701
3702int
3703main (void)
3704{
3705#ifndef __GNUC__
3706 choke me
3707#endif
3708
3709 ;
3710 return 0;
3711}
3712_ACEOF
3713if ac_fn_c_try_compile "$LINENO"
3714then :
3715 ac_compiler_gnu=yes
3716else $as_nop
3717 ac_compiler_gnu=no
3718fi
3719rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3720ac_cv_c_compiler_gnu=$ac_compiler_gnu
3721
3722fi
3723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3724printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3725ac_compiler_gnu=$ac_cv_c_compiler_gnu
3726
3727if test $ac_compiler_gnu = yes; then
3728 GCC=yes
3729else
3730 GCC=
3731fi
3732ac_test_CFLAGS=${CFLAGS+y}
3733ac_save_CFLAGS=$CFLAGS
3734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3735printf %s "checking whether $CC accepts -g... " >&6; }
3736if test ${ac_cv_prog_cc_g+y}
3737then :
3738 printf %s "(cached) " >&6
3739else $as_nop
3740 ac_save_c_werror_flag=$ac_c_werror_flag
3741 ac_c_werror_flag=yes
3742 ac_cv_prog_cc_g=no
3743 CFLAGS="-g"
3744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745/* end confdefs.h. */
3746
3747int
3748main (void)
3749{
3750
3751 ;
3752 return 0;
3753}
3754_ACEOF
3755if ac_fn_c_try_compile "$LINENO"
3756then :
3757 ac_cv_prog_cc_g=yes
3758else $as_nop
3759 CFLAGS=""
3760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761/* end confdefs.h. */
3762
3763int
3764main (void)
3765{
3766
3767 ;
3768 return 0;
3769}
3770_ACEOF
3771if ac_fn_c_try_compile "$LINENO"
3772then :
3773
3774else $as_nop
3775 ac_c_werror_flag=$ac_save_c_werror_flag
3776 CFLAGS="-g"
3777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3778/* end confdefs.h. */
3779
3780int
3781main (void)
3782{
3783
3784 ;
3785 return 0;
3786}
3787_ACEOF
3788if ac_fn_c_try_compile "$LINENO"
3789then :
3790 ac_cv_prog_cc_g=yes
3791fi
3792rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3793fi
3794rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3795fi
3796rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3797 ac_c_werror_flag=$ac_save_c_werror_flag
3798fi
3799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3800printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3801if test $ac_test_CFLAGS; then
3802 CFLAGS=$ac_save_CFLAGS
3803elif test $ac_cv_prog_cc_g = yes; then
3804 if test "$GCC" = yes; then
3805 CFLAGS="-g -O2"
3806 else
3807 CFLAGS="-g"
3808 fi
3809else
3810 if test "$GCC" = yes; then
3811 CFLAGS="-O2"
3812 else
3813 CFLAGS=
3814 fi
3815fi
3816ac_prog_cc_stdc=no
3817if test x$ac_prog_cc_stdc = xno
3818then :
3819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3820printf %s "checking for $CC option to enable C11 features... " >&6; }
3821if test ${ac_cv_prog_cc_c11+y}
3822then :
3823 printf %s "(cached) " >&6
3824else $as_nop
3825 ac_cv_prog_cc_c11=no
3826ac_save_CC=$CC
3827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828/* end confdefs.h. */
3829$ac_c_conftest_c11_program
3830_ACEOF
3831for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003832do
3833 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003834 if ac_fn_c_try_compile "$LINENO"
3835then :
3836 ac_cv_prog_cc_c11=$ac_arg
3837fi
3838rm -f core conftest.err conftest.$ac_objext conftest.beam
3839 test "x$ac_cv_prog_cc_c11" != "xno" && break
3840done
3841rm -f conftest.$ac_ext
3842CC=$ac_save_CC
3843fi
3844
3845if test "x$ac_cv_prog_cc_c11" = xno
3846then :
3847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3848printf "%s\n" "unsupported" >&6; }
3849else $as_nop
3850 if test "x$ac_cv_prog_cc_c11" = x
3851then :
3852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3853printf "%s\n" "none needed" >&6; }
3854else $as_nop
3855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3856printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3857 CC="$CC $ac_cv_prog_cc_c11"
3858fi
3859 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3860 ac_prog_cc_stdc=c11
3861fi
3862fi
3863if test x$ac_prog_cc_stdc = xno
3864then :
3865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3866printf %s "checking for $CC option to enable C99 features... " >&6; }
3867if test ${ac_cv_prog_cc_c99+y}
3868then :
3869 printf %s "(cached) " >&6
3870else $as_nop
3871 ac_cv_prog_cc_c99=no
3872ac_save_CC=$CC
3873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3874/* end confdefs.h. */
3875$ac_c_conftest_c99_program
3876_ACEOF
3877for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3878do
3879 CC="$ac_save_CC $ac_arg"
3880 if ac_fn_c_try_compile "$LINENO"
3881then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003882 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003883fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003884rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003885 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003886done
3887rm -f conftest.$ac_ext
3888CC=$ac_save_CC
Bram Moolenaar2e324952018-04-14 14:37:07 +02003889fi
3890
Illia Bobyra96d5442023-08-30 16:30:15 +02003891if test "x$ac_cv_prog_cc_c99" = xno
3892then :
3893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3894printf "%s\n" "unsupported" >&6; }
3895else $as_nop
3896 if test "x$ac_cv_prog_cc_c99" = x
3897then :
3898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3899printf "%s\n" "none needed" >&6; }
3900else $as_nop
3901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3902printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3903 CC="$CC $ac_cv_prog_cc_c99"
3904fi
3905 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3906 ac_prog_cc_stdc=c99
3907fi
3908fi
3909if test x$ac_prog_cc_stdc = xno
3910then :
3911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3912printf %s "checking for $CC option to enable C89 features... " >&6; }
3913if test ${ac_cv_prog_cc_c89+y}
3914then :
3915 printf %s "(cached) " >&6
3916else $as_nop
3917 ac_cv_prog_cc_c89=no
3918ac_save_CC=$CC
3919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3920/* end confdefs.h. */
3921$ac_c_conftest_c89_program
3922_ACEOF
3923for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3924do
3925 CC="$ac_save_CC $ac_arg"
3926 if ac_fn_c_try_compile "$LINENO"
3927then :
3928 ac_cv_prog_cc_c89=$ac_arg
3929fi
3930rm -f core conftest.err conftest.$ac_objext conftest.beam
3931 test "x$ac_cv_prog_cc_c89" != "xno" && break
3932done
3933rm -f conftest.$ac_ext
3934CC=$ac_save_CC
3935fi
3936
3937if test "x$ac_cv_prog_cc_c89" = xno
3938then :
3939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3940printf "%s\n" "unsupported" >&6; }
3941else $as_nop
3942 if test "x$ac_cv_prog_cc_c89" = x
3943then :
3944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3945printf "%s\n" "none needed" >&6; }
3946else $as_nop
3947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3948printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3949 CC="$CC $ac_cv_prog_cc_c89"
3950fi
3951 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3952 ac_prog_cc_stdc=c89
3953fi
3954fi
3955
3956ac_ext=c
3957ac_cpp='$CPP $CPPFLAGS'
3958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3960ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02003961 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003962ac_cpp='$CPP $CPPFLAGS'
3963ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3964ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3965ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02003966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3967printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00003968# On Suns, sometimes $CPP names a directory.
3969if test -n "$CPP" && test -d "$CPP"; then
3970 CPP=
3971fi
3972if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003973 if test ${ac_cv_prog_CPP+y}
3974then :
3975 printf %s "(cached) " >&6
3976else $as_nop
3977 # Double quotes because $CC needs to be expanded
3978 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003979 do
3980 ac_preproc_ok=false
3981for ac_c_preproc_warn_flag in '' yes
3982do
3983 # Use a header file that comes with gcc, so configuring glibc
3984 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003985 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003986 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003988/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02003989#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003990 Syntax error
3991_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003992if ac_fn_c_try_cpp "$LINENO"
3993then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003994
Illia Bobyra96d5442023-08-30 16:30:15 +02003995else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003996 # Broken: fails on valid input.
3997continue
3998fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01003999rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004000
Bram Moolenaar446cb832008-06-24 21:56:24 +00004001 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004002 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004004/* end confdefs.h. */
4005#include <ac_nonexistent.h>
4006_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004007if ac_fn_c_try_cpp "$LINENO"
4008then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004009 # Broken: success on invalid input.
4010continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004011else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004012 # Passes both tests.
4013ac_preproc_ok=:
4014break
4015fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004016rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004017
4018done
4019# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004020rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004021if $ac_preproc_ok
4022then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004023 break
4024fi
4025
4026 done
4027 ac_cv_prog_CPP=$CPP
4028
4029fi
4030 CPP=$ac_cv_prog_CPP
4031else
4032 ac_cv_prog_CPP=$CPP
4033fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4035printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004036ac_preproc_ok=false
4037for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004038do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004039 # Use a header file that comes with gcc, so configuring glibc
4040 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004041 # On the NeXT, cc -E runs the code through the compiler's parser,
4042 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004044/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004045#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004046 Syntax error
4047_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004048if ac_fn_c_try_cpp "$LINENO"
4049then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004050
Illia Bobyra96d5442023-08-30 16:30:15 +02004051else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004052 # Broken: fails on valid input.
4053continue
4054fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004055rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004056
Bram Moolenaar446cb832008-06-24 21:56:24 +00004057 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004058 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004060/* end confdefs.h. */
4061#include <ac_nonexistent.h>
4062_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004063if ac_fn_c_try_cpp "$LINENO"
4064then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004065 # Broken: success on invalid input.
4066continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004067else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004068 # Passes both tests.
4069ac_preproc_ok=:
4070break
4071fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004072rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004073
4074done
4075# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004076rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004077if $ac_preproc_ok
4078then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004079
Illia Bobyra96d5442023-08-30 16:30:15 +02004080else $as_nop
4081 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004083as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4084See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004085fi
4086
4087ac_ext=c
4088ac_cpp='$CPP $CPPFLAGS'
4089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4091ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4093printf %s "checking for grep that handles long lines and -e... " >&6; }
4094if test ${ac_cv_path_GREP+y}
4095then :
4096 printf %s "(cached) " >&6
4097else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004098 if test -z "$GREP"; then
4099 ac_path_GREP_found=false
4100 # Loop through the user's path and test for each of PROGNAME-LIST
4101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4102for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4103do
4104 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004105 case $as_dir in #(((
4106 '') as_dir=./ ;;
4107 */) ;;
4108 *) as_dir=$as_dir/ ;;
4109 esac
4110 for ac_prog in grep ggrep
4111 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004112 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004113 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004114 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004115# Check for GNU ac_path_GREP and select it if it is found.
4116 # Check for GNU $ac_path_GREP
4117case `"$ac_path_GREP" --version 2>&1` in
4118*GNU*)
4119 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4120*)
4121 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004122 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004123 while :
4124 do
4125 cat "conftest.in" "conftest.in" >"conftest.tmp"
4126 mv "conftest.tmp" "conftest.in"
4127 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004128 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004129 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4130 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004131 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004132 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4133 # Best one so far, save it but keep looking for a better one
4134 ac_cv_path_GREP="$ac_path_GREP"
4135 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004136 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004137 # 10*(2^10) chars as input seems more than enough
4138 test $ac_count -gt 10 && break
4139 done
4140 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4141esac
4142
4143 $ac_path_GREP_found && break 3
4144 done
4145 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004146 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004147IFS=$as_save_IFS
4148 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004149 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 +00004150 fi
4151else
4152 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004153fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004154
4155fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004156{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4157printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004158 GREP="$ac_cv_path_GREP"
4159
4160
Illia Bobyra96d5442023-08-30 16:30:15 +02004161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4162printf %s "checking for egrep... " >&6; }
4163if test ${ac_cv_path_EGREP+y}
4164then :
4165 printf %s "(cached) " >&6
4166else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004167 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4168 then ac_cv_path_EGREP="$GREP -E"
4169 else
4170 if test -z "$EGREP"; then
4171 ac_path_EGREP_found=false
4172 # Loop through the user's path and test for each of PROGNAME-LIST
4173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4175do
4176 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004177 case $as_dir in #(((
4178 '') as_dir=./ ;;
4179 */) ;;
4180 *) as_dir=$as_dir/ ;;
4181 esac
4182 for ac_prog in egrep
4183 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004184 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004185 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004186 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004187# Check for GNU ac_path_EGREP and select it if it is found.
4188 # Check for GNU $ac_path_EGREP
4189case `"$ac_path_EGREP" --version 2>&1` in
4190*GNU*)
4191 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4192*)
4193 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004194 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004195 while :
4196 do
4197 cat "conftest.in" "conftest.in" >"conftest.tmp"
4198 mv "conftest.tmp" "conftest.in"
4199 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004200 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004201 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4202 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004203 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004204 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4205 # Best one so far, save it but keep looking for a better one
4206 ac_cv_path_EGREP="$ac_path_EGREP"
4207 ac_path_EGREP_max=$ac_count
4208 fi
4209 # 10*(2^10) chars as input seems more than enough
4210 test $ac_count -gt 10 && break
4211 done
4212 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4213esac
4214
4215 $ac_path_EGREP_found && break 3
4216 done
4217 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004218 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004219IFS=$as_save_IFS
4220 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004221 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 +00004222 fi
4223else
4224 ac_cv_path_EGREP=$EGREP
4225fi
4226
4227 fi
4228fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4230printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004231 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004232
Illia Bobyra96d5442023-08-30 16:30:15 +02004233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4234printf %s "checking for fgrep... " >&6; }
4235if test ${ac_cv_path_FGREP+y}
4236then :
4237 printf %s "(cached) " >&6
4238else $as_nop
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004239 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4240 then ac_cv_path_FGREP="$GREP -F"
4241 else
4242 if test -z "$FGREP"; then
4243 ac_path_FGREP_found=false
4244 # Loop through the user's path and test for each of PROGNAME-LIST
4245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4247do
4248 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004249 case $as_dir in #(((
4250 '') as_dir=./ ;;
4251 */) ;;
4252 *) as_dir=$as_dir/ ;;
4253 esac
4254 for ac_prog in fgrep
4255 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004256 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004257 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004258 as_fn_executable_p "$ac_path_FGREP" || continue
4259# Check for GNU ac_path_FGREP and select it if it is found.
4260 # Check for GNU $ac_path_FGREP
4261case `"$ac_path_FGREP" --version 2>&1` in
4262*GNU*)
4263 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4264*)
4265 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004266 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004267 while :
4268 do
4269 cat "conftest.in" "conftest.in" >"conftest.tmp"
4270 mv "conftest.tmp" "conftest.in"
4271 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004272 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004273 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4274 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4275 as_fn_arith $ac_count + 1 && ac_count=$as_val
4276 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4277 # Best one so far, save it but keep looking for a better one
4278 ac_cv_path_FGREP="$ac_path_FGREP"
4279 ac_path_FGREP_max=$ac_count
4280 fi
4281 # 10*(2^10) chars as input seems more than enough
4282 test $ac_count -gt 10 && break
4283 done
4284 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4285esac
4286
4287 $ac_path_FGREP_found && break 3
4288 done
4289 done
4290 done
4291IFS=$as_save_IFS
4292 if test -z "$ac_cv_path_FGREP"; then
4293 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4294 fi
4295else
4296 ac_cv_path_FGREP=$FGREP
4297fi
4298
4299 fi
4300fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4302printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004303 FGREP="$ac_cv_path_FGREP"
4304
Bram Moolenaarc0394412017-04-20 20:20:23 +02004305 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004306do
4307 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004308set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4310printf %s "checking for $ac_word... " >&6; }
4311if test ${ac_cv_prog_AWK+y}
4312then :
4313 printf %s "(cached) " >&6
4314else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004315 if test -n "$AWK"; then
4316 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4317else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319for as_dir in $PATH
4320do
4321 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004322 case $as_dir in #(((
4323 '') as_dir=./ ;;
4324 */) ;;
4325 *) as_dir=$as_dir/ ;;
4326 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004327 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004328 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004329 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004330 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004331 break 2
4332 fi
4333done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004334 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004335IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004336
Bram Moolenaar071d4272004-06-13 20:20:40 +00004337fi
4338fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004339AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004340if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4342printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004343else
Illia Bobyra96d5442023-08-30 16:30:15 +02004344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4345printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004346fi
4347
Bram Moolenaar446cb832008-06-24 21:56:24 +00004348
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004349 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004350done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004351
Bram Moolenaar071d4272004-06-13 20:20:40 +00004352# Extract the first word of "strip", so it can be a program name with args.
4353set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4355printf %s "checking for $ac_word... " >&6; }
4356if test ${ac_cv_prog_STRIP+y}
4357then :
4358 printf %s "(cached) " >&6
4359else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004360 if test -n "$STRIP"; then
4361 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4362else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004367 case $as_dir in #(((
4368 '') as_dir=./ ;;
4369 */) ;;
4370 *) as_dir=$as_dir/ ;;
4371 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004372 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004373 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004374 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004375 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004376 break 2
4377 fi
4378done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004379 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004380IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004381
Bram Moolenaar071d4272004-06-13 20:20:40 +00004382 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4383fi
4384fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004385STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004386if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4388printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004389else
Illia Bobyra96d5442023-08-30 16:30:15 +02004390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4391printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004392fi
4393
4394
Bram Moolenaar071d4272004-06-13 20:20:40 +00004395
4396
Bram Moolenaar071d4272004-06-13 20:20:40 +00004397
Illia Bobyrf39842f2023-08-27 18:21:23 +02004398
Illia Bobyra96d5442023-08-30 16:30:15 +02004399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4400printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4401if test ${ac_cv_header_sys_wait_h+y}
4402then :
4403 printf %s "(cached) " >&6
4404else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004406/* end confdefs.h. */
4407#include <sys/types.h>
4408#include <sys/wait.h>
4409#ifndef WEXITSTATUS
4410# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4411#endif
4412#ifndef WIFEXITED
4413# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4414#endif
4415
4416int
Illia Bobyra96d5442023-08-30 16:30:15 +02004417main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004418{
4419 int s;
4420 wait (&s);
4421 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4422 ;
4423 return 0;
4424}
4425_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004426if ac_fn_c_try_compile "$LINENO"
4427then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004428 ac_cv_header_sys_wait_h=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004429else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004430 ac_cv_header_sys_wait_h=no
Bram Moolenaar446cb832008-06-24 21:56:24 +00004431fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004432rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004433fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004434{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4435printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004436if test $ac_cv_header_sys_wait_h = yes; then
4437
Illia Bobyra96d5442023-08-30 16:30:15 +02004438printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004439
4440fi
4441
4442
Bram Moolenaar22640082018-04-19 20:39:41 +02004443if test x"$ac_cv_prog_cc_c99" != xno; then
4444
4445
Illia Bobyra96d5442023-08-30 16:30:15 +02004446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4447printf %s "checking for unsigned long long int... " >&6; }
4448if test ${ac_cv_type_unsigned_long_long_int+y}
4449then :
4450 printf %s "(cached) " >&6
4451else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004452 ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004453 case $ac_prog_cc_stdc in
4454 no | c89) ;;
4455 *)
4456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004457/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004458
4459 /* For now, do not test the preprocessor; as of 2007 there are too many
4460 implementations with broken preprocessors. Perhaps this can
4461 be revisited in 2012. In the meantime, code should not expect
4462 #if to work with literals wider than 32 bits. */
4463 /* Test literals. */
4464 long long int ll = 9223372036854775807ll;
4465 long long int nll = -9223372036854775807LL;
4466 unsigned long long int ull = 18446744073709551615ULL;
4467 /* Test constant expressions. */
4468 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4469 ? 1 : -1)];
4470 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4471 ? 1 : -1)];
4472 int i = 63;
4473int
Illia Bobyra96d5442023-08-30 16:30:15 +02004474main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004475{
4476/* Test availability of runtime routines for shift and division. */
4477 long long int llmax = 9223372036854775807ll;
4478 unsigned long long int ullmax = 18446744073709551615ull;
4479 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4480 | (llmax / ll) | (llmax % ll)
4481 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4482 | (ullmax / ull) | (ullmax % ull));
4483 ;
4484 return 0;
4485}
4486
4487_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004488if ac_fn_c_try_link "$LINENO"
4489then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004490
Illia Bobyra96d5442023-08-30 16:30:15 +02004491else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004492 ac_cv_type_unsigned_long_long_int=no
4493fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004494rm -f core conftest.err conftest.$ac_objext conftest.beam \
4495 conftest$ac_exeext conftest.$ac_ext;;
4496 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004497fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4499printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004500 if test $ac_cv_type_unsigned_long_long_int = yes; then
4501
Illia Bobyra96d5442023-08-30 16:30:15 +02004502printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004503
4504 fi
4505
4506
4507
Illia Bobyra96d5442023-08-30 16:30:15 +02004508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4509printf %s "checking for long long int... " >&6; }
4510if test ${ac_cv_type_long_long_int+y}
4511then :
4512 printf %s "(cached) " >&6
4513else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004514 ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004515 case $ac_prog_cc_stdc in
4516 no | c89) ;;
4517 *)
4518 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4519 if test $ac_cv_type_long_long_int = yes; then
4520 if test "$cross_compiling" = yes
4521then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004522 :
Illia Bobyra96d5442023-08-30 16:30:15 +02004523else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004527 #ifndef LLONG_MAX
4528 # define HALF \
4529 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4530 # define LLONG_MAX (HALF - 1 + HALF)
4531 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004532int
Illia Bobyra96d5442023-08-30 16:30:15 +02004533main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004534{
4535long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004536 int i;
4537 for (i = 0; ; i++)
4538 {
4539 long long int m = n << i;
4540 if (m >> i != n)
4541 return 1;
4542 if (LLONG_MAX / 2 < m)
4543 break;
4544 }
4545 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004546 ;
4547 return 0;
4548}
4549_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004550if ac_fn_c_try_run "$LINENO"
4551then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004552
Illia Bobyra96d5442023-08-30 16:30:15 +02004553else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004554 ac_cv_type_long_long_int=no
4555fi
4556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4557 conftest.$ac_objext conftest.beam conftest.$ac_ext
4558fi
4559
Illia Bobyra96d5442023-08-30 16:30:15 +02004560 fi;;
4561 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004562fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4564printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004565 if test $ac_cv_type_long_long_int = yes; then
4566
Illia Bobyra96d5442023-08-30 16:30:15 +02004567printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004568
4569 fi
4570
4571 if test "$ac_cv_type_long_long_int" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004572 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4573printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004574as_fn_error $? "Compiler does not support long long int
4575See \`config.log' for more details" "$LINENO" 5; }
4576 fi
4577
Illia Bobyra96d5442023-08-30 16:30:15 +02004578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4579printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004580 trailing_commas=no
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004584int
Illia Bobyra96d5442023-08-30 16:30:15 +02004585main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004586{
4587
Bram Moolenaar22640082018-04-19 20:39:41 +02004588 enum {
4589 one,
4590 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004591 ;
4592 return 0;
4593}
4594_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004595if ac_fn_c_try_compile "$LINENO"
4596then :
4597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4598printf "%s\n" "yes" >&6; }; trailing_commas=yes
4599else $as_nop
4600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4601printf "%s\n" "no" >&6; }
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004602fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004603rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004604 if test "$trailing_commas" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004605 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4606printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004607as_fn_error $? "Compiler does not support trailing comma in enum
4608See \`config.log' for more details" "$LINENO" 5; }
4609 fi
4610
Illia Bobyra96d5442023-08-30 16:30:15 +02004611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4612printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004613 slash_comments=no
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616
4617int
Illia Bobyra96d5442023-08-30 16:30:15 +02004618main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004619{
4620// C++ comments?
4621 ;
4622 return 0;
4623}
4624_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004625if ac_fn_c_try_compile "$LINENO"
4626then :
4627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4628printf "%s\n" "yes" >&6; }; slash_comments=yes
4629else $as_nop
4630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4631printf "%s\n" "no" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004632fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004633rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004634 if test "$slash_comments" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004635 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4636printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004637as_fn_error $? "Compiler does not support C++ comments
4638See \`config.log' for more details" "$LINENO" 5; }
4639 fi
4640fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004641
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004642if test -n "$SOURCE_DATE_EPOCH"; then
4643 DATE_FMT="%b %d %Y %H:%M:%S"
4644 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 +02004645 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004646
4647 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4648
4649fi
4650
Bram Moolenaarf788a062011-12-14 20:51:25 +01004651
Illia Bobyra96d5442023-08-30 16:30:15 +02004652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4653printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004654# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004655if test ${enable_fail_if_missing+y}
4656then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004657 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02004658else $as_nop
Bram Moolenaarf788a062011-12-14 20:51:25 +01004659 fail_if_missing="no"
4660fi
4661
Illia Bobyra96d5442023-08-30 16:30:15 +02004662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4663printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004664
Bram Moolenaard2a05492018-07-27 22:35:15 +02004665with_x_arg="$with_x"
4666
Bram Moolenaar446cb832008-06-24 21:56:24 +00004667if test -z "$CFLAGS"; then
4668 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004669 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004670fi
Rose00d07e72023-05-06 18:07:14 +01004671
Bram Moolenaar446cb832008-06-24 21:56:24 +00004672if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004673 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004674 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004675 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 +00004676 fi
Rose00d07e72023-05-06 18:07:14 +01004677
4678 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004679 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4680 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4681 else
4682 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4683 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4684 CFLAGS="$CFLAGS -fno-strength-reduce"
4685 fi
4686 fi
4687fi
4688
Illia Bobyra96d5442023-08-30 16:30:15 +02004689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4690printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004691CLANG_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 +02004692if test x"$CLANG_VERSION_STRING" != x"" ; then
4693 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4694 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4695 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4696 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4698printf "%s\n" "$CLANG_VERSION" >&6; }
4699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4700printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004701 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004704 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4705 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4707printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004708 fi
4709else
Illia Bobyra96d5442023-08-30 16:30:15 +02004710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4711printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004712fi
4713
Bram Moolenaar839e9542016-04-14 16:46:02 +02004714CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004715if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4717printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004718 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004719fi
4720
Bram Moolenaar839e9542016-04-14 16:46:02 +02004721
Bram Moolenaar446cb832008-06-24 21:56:24 +00004722test "$GCC" = yes && CPP_MM=M;
4723
4724if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4726printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004727 sh ./toolcheck 1>&6
4728fi
4729
4730OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4731
Illia Bobyra96d5442023-08-30 16:30:15 +02004732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4733printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004734if test "x$vim_cv_uname_output" = "x" ; then
4735 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4737printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004738else
Illia Bobyra96d5442023-08-30 16:30:15 +02004739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4740printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004741fi
4742
Illia Bobyra96d5442023-08-30 16:30:15 +02004743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4744printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004745if test "x$vim_cv_uname_r_output" = "x" ; then
4746 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4748printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004749else
Illia Bobyra96d5442023-08-30 16:30:15 +02004750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4751printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004752fi
4753
Illia Bobyra96d5442023-08-30 16:30:15 +02004754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4755printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004756if test "x$vim_cv_uname_m_output" = "x" ; then
4757 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4759printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004760else
Illia Bobyra96d5442023-08-30 16:30:15 +02004761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4762printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004763fi
4764
Illia Bobyra96d5442023-08-30 16:30:15 +02004765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4766printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004767case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004768 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4769printf "%s\n" "yes" >&6; };;
4770 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004772esac
4773
Illia Bobyra96d5442023-08-30 16:30:15 +02004774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4775printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004776case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004777 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4778 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004779 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4780printf "%s\n" "yes" >&6; };;
4781 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004783esac
4784
Illia Bobyra96d5442023-08-30 16:30:15 +02004785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4786printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004787if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4789printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004790 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004791 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004792
Illia Bobyra96d5442023-08-30 16:30:15 +02004793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4794printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004795 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004796if test ${enable_darwin+y}
4797then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004798 enableval=$enable_darwin;
Illia Bobyra96d5442023-08-30 16:30:15 +02004799else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004800 enable_darwin="yes"
4801fi
4802
4803 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4805printf "%s\n" "no" >&6; }
4806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4807printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004808 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4810printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004811 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4813printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004814 enable_darwin=no
4815 fi
4816 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4818printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004819 fi
4820
Illia Bobyra96d5442023-08-30 16:30:15 +02004821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4822printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004823
4824# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004825if test ${with_mac_arch+y}
4826then :
4827 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4828printf "%s\n" "$MACARCH" >&6; }
4829else $as_nop
4830 MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4831printf "%s\n" "defaulting to $MACARCH" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004832fi
4833
4834
Illia Bobyra96d5442023-08-30 16:30:15 +02004835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4836printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004837
4838# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004839if test ${with_developer_dir+y}
4840then :
4841 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4842printf "%s\n" "$DEVELOPER_DIR" >&6; }
4843else $as_nop
4844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4845printf "%s\n" "not present" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004846fi
4847
4848
4849 if test "x$DEVELOPER_DIR" = "x"; then
4850 # Extract the first word of "xcode-select", so it can be a program name with args.
4851set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4853printf %s "checking for $ac_word... " >&6; }
4854if test ${ac_cv_path_XCODE_SELECT+y}
4855then :
4856 printf %s "(cached) " >&6
4857else $as_nop
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004858 case $XCODE_SELECT in
4859 [\\/]* | ?:[\\/]*)
4860 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4861 ;;
4862 *)
4863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864for as_dir in $PATH
4865do
4866 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004867 case $as_dir in #(((
4868 '') as_dir=./ ;;
4869 */) ;;
4870 *) as_dir=$as_dir/ ;;
4871 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004872 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004873 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4874 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4875 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004876 break 2
4877 fi
4878done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004879 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004880IFS=$as_save_IFS
4881
4882 ;;
4883esac
4884fi
4885XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4886if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4888printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004889else
Illia Bobyra96d5442023-08-30 16:30:15 +02004890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004892fi
4893
4894
4895 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4897printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004898 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4900printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004901 else
4902 DEVELOPER_DIR=/Developer
4903 fi
4904 fi
4905
Bram Moolenaar446cb832008-06-24 21:56:24 +00004906 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4908printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004909 save_cppflags="$CPPFLAGS"
4910 save_cflags="$CFLAGS"
4911 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004912 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004914/* end confdefs.h. */
4915
4916int
Illia Bobyra96d5442023-08-30 16:30:15 +02004917main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004918{
4919
4920 ;
4921 return 0;
4922}
4923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004924if ac_fn_c_try_link "$LINENO"
4925then :
4926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
4927printf "%s\n" "found" >&6; }
4928else $as_nop
4929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4930printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004931 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02004932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4933printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004934 CPPFLAGS="$CPPFLAGS -arch i386"
4935 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004937/* end confdefs.h. */
4938
4939int
Illia Bobyra96d5442023-08-30 16:30:15 +02004940main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004941{
4942
4943 ;
4944 return 0;
4945}
4946_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004947if ac_fn_c_try_link "$LINENO"
4948then :
4949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4950printf "%s\n" "yes" >&6; }; MACARCH="intel"
4951else $as_nop
4952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004954 MACARCH="ppc"
4955 CPPFLAGS="$save_cppflags -arch ppc"
4956 LDFLAGS="$save_ldflags -arch ppc"
4957fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004958rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004959 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004960fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004961rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004962 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004963 elif test "x$MACARCH" = "xintel"; then
4964 CPPFLAGS="$CPPFLAGS -arch intel"
4965 LDFLAGS="$LDFLAGS -arch intel"
4966 elif test "x$MACARCH" = "xppc"; then
4967 CPPFLAGS="$CPPFLAGS -arch ppc"
4968 LDFLAGS="$LDFLAGS -arch ppc"
4969 fi
4970
4971 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02004972 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02004973 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00004974 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02004975 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01004976
Bram Moolenaard0573012017-10-28 21:11:06 +02004977 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02004978
Bram Moolenaar0b40d082022-03-08 13:32:37 +00004979 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 +02004980 with_x=no
4981 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004982 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004983else
Illia Bobyra96d5442023-08-30 16:30:15 +02004984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4985printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02004986fi
4987
Illia Bobyra96d5442023-08-30 16:30:15 +02004988ac_header= ac_cache=
4989for ac_item in $ac_header_c_list
4990do
4991 if test $ac_cache; then
4992 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4993 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4994 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4995 fi
4996 ac_header= ac_cache=
4997 elif test $ac_header; then
4998 ac_cache=$ac_item
4999 else
5000 ac_header=$ac_item
5001 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005002done
5003
5004
Illia Bobyra96d5442023-08-30 16:30:15 +02005005
5006
5007
5008
5009
5010
5011if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5012then :
5013
5014printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005015
Bram Moolenaar39766a72013-11-03 00:41:00 +01005016fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005017ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5018if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5019then :
5020 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005021
Illia Bobyra96d5442023-08-30 16:30:15 +02005022fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005023
Evan Miller25448072022-12-30 10:42:23 +00005024# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005025ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5026if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5027then :
5028 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005029
5030fi
5031
Bram Moolenaar39766a72013-11-03 00:41:00 +01005032
Bram Moolenaar071d4272004-06-13 20:20:40 +00005033
5034
5035
Bram Moolenaar446cb832008-06-24 21:56:24 +00005036if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5038printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005039 have_local_include=''
5040 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005041
5042# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005043if test ${with_local_dir+y}
5044then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005045 withval=$with_local_dir;
5046 local_dir="$withval"
5047 case "$withval" in
5048 */*) ;;
5049 no)
5050 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005051 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005052 have_local_lib=yes
5053 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005054 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005055 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5057printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005058
Illia Bobyra96d5442023-08-30 16:30:15 +02005059else $as_nop
Bram Moolenaarc236c162008-07-13 17:41:49 +00005060
5061 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5063printf "%s\n" "Defaulting to $local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005064
5065fi
5066
5067 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005068 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005069 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005070 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005071 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005072 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005073 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5074 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 +00005075 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005076 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005077 fi
5078 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005079 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5080 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 +00005081 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005082 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005083 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005084 fi
5085fi
5086
Illia Bobyra96d5442023-08-30 16:30:15 +02005087{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5088printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005089
Bram Moolenaar446cb832008-06-24 21:56:24 +00005090# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005091if test ${with_vim_name+y}
5092then :
5093 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5094printf "%s\n" "$VIMNAME" >&6; }
5095else $as_nop
5096 VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5097printf "%s\n" "Defaulting to $VIMNAME" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005098fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005099
5100
Illia Bobyra96d5442023-08-30 16:30:15 +02005101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5102printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005103
5104# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005105if test ${with_ex_name+y}
5106then :
5107 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5108printf "%s\n" "$EXNAME" >&6; }
5109else $as_nop
5110 EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5111printf "%s\n" "Defaulting to ex" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005112fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005113
5114
Illia Bobyra96d5442023-08-30 16:30:15 +02005115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5116printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005117
5118# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005119if test ${with_view_name+y}
5120then :
5121 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5122printf "%s\n" "$VIEWNAME" >&6; }
5123else $as_nop
5124 VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5125printf "%s\n" "Defaulting to view" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005126fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005127
5128
5129
Illia Bobyra96d5442023-08-30 16:30:15 +02005130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5131printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005132
5133# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005134if test ${with_global_runtime+y}
5135then :
5136 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5137printf "%s\n" "$withval" >&6; }
5138else $as_nop
5139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005141fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005142
5143
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005144if test "X$RUNTIME_GLOBAL" != "X"; then
5145 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 +02005146 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005147
Illia Bobyra96d5442023-08-30 16:30:15 +02005148 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005149
5150fi
5151
Illia Bobyra96d5442023-08-30 16:30:15 +02005152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5153printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005154
5155# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005156if test ${with_modified_by+y}
5157then :
5158 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5159printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005160
Illia Bobyra96d5442023-08-30 16:30:15 +02005161else $as_nop
5162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005164fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005165
Bram Moolenaar446cb832008-06-24 21:56:24 +00005166
Illia Bobyra96d5442023-08-30 16:30:15 +02005167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5168printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005170/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005171
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005172int
Illia Bobyra96d5442023-08-30 16:30:15 +02005173main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005174{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005175 /* TryCompile function for CharSet.
5176 Treat any failure as ASCII for compatibility with existing art.
5177 Use compile-time rather than run-time tests for cross-compiler
5178 tolerance. */
5179#if '0'!=240
5180make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005181#endif
5182 ;
5183 return 0;
5184}
5185_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005186if ac_fn_c_try_compile "$LINENO"
5187then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005188 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005189cf_cv_ebcdic=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005190else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005191 # TryCompile action if false
Bram Moolenaar071d4272004-06-13 20:20:40 +00005192cf_cv_ebcdic=no
5193fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005194rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005195# end of TryCompile ])
5196# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5198printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005199case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005200 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005201
5202 line_break='"\\n"'
5203 ;;
5204 *) line_break='"\\012"';;
5205esac
5206
5207
5208if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5210printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005211case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005212 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005213 if test "$CC" = "cc"; then
5214 ccm="$_CC_CCMODE"
5215 ccn="CC"
5216 else
5217 if test "$CC" = "c89"; then
5218 ccm="$_CC_C89MODE"
5219 ccn="C89"
5220 else
5221 ccm=1
5222 fi
5223 fi
5224 if test "$ccm" != "1"; then
5225 echo ""
5226 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005227 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005228 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005229 echo " Do:"
5230 echo " export _CC_${ccn}MODE=1"
5231 echo " and then call configure again."
5232 echo "------------------------------------------"
5233 exit 1
5234 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005235 # Set CFLAGS for configure process.
5236 # This will be reset later for config.mk.
5237 # Use haltonmsg to force error for missing H files.
5238 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5239 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5241printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005242 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005243 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005246 ;;
5247esac
5248fi
5249
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005250if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005251 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005252else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005253 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005254fi
5255
5256
5257
Illia Bobyra96d5442023-08-30 16:30:15 +02005258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5259printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005260# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005261if test ${enable_smack+y}
5262then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005263 enableval=$enable_smack;
Illia Bobyra96d5442023-08-30 16:30:15 +02005264else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005265 enable_smack="yes"
5266fi
5267
5268if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5270printf "%s\n" "no" >&6; }
5271 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5272if test "x$ac_cv_header_linux_xattr_h" = xyes
5273then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005274 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005275else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005276 enable_smack="no"
5277fi
5278
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005279else
Illia Bobyra96d5442023-08-30 16:30:15 +02005280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5281printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005282fi
5283if test "$enable_smack" = "yes"; then
Illia Bobyr8c358e02023-09-30 22:57:19 +02005284 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5285if test "x$ac_cv_header_sys_xattr_h" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +02005286then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005287 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005288else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005289 enable_smack="no"
5290fi
5291
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005292fi
5293if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5295printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5296
5297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005298/* end confdefs.h. */
5299#include <linux/xattr.h>
5300_ACEOF
5301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +02005302 $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
5303then :
5304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5305printf "%s\n" "yes" >&6; }
5306else $as_nop
5307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308printf "%s\n" "no" >&6; }; enable_smack="no"
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005309fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005310rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005311
5312fi
5313if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5315printf %s "checking for setxattr in -lattr... " >&6; }
5316if test ${ac_cv_lib_attr_setxattr+y}
5317then :
5318 printf %s "(cached) " >&6
5319else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005320 ac_check_lib_save_LIBS=$LIBS
5321LIBS="-lattr $LIBS"
5322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323/* end confdefs.h. */
5324
5325/* Override any GCC internal prototype to avoid an error.
5326 Use char because int might match the return type of a GCC
5327 builtin and then its argument prototype would still apply. */
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005328char setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005329int
Illia Bobyra96d5442023-08-30 16:30:15 +02005330main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005331{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005332return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005333 ;
5334 return 0;
5335}
5336_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005337if ac_fn_c_try_link "$LINENO"
5338then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005339 ac_cv_lib_attr_setxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005340else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005341 ac_cv_lib_attr_setxattr=no
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005342fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005343rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005344 conftest$ac_exeext conftest.$ac_ext
5345LIBS=$ac_check_lib_save_LIBS
5346fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5348printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5349if test "x$ac_cv_lib_attr_setxattr" = xyes
5350then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005351 LIBS="$LIBS -lattr"
5352 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005353 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005354
5355fi
5356
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005357fi
5358
5359if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5361printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005362 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005363if test ${enable_selinux+y}
5364then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005365 enableval=$enable_selinux;
Illia Bobyra96d5442023-08-30 16:30:15 +02005366else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005367 enable_selinux="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005368fi
5369
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005370 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5372printf "%s\n" "no" >&6; }
5373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5374printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5375if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5376then :
5377 printf %s "(cached) " >&6
5378else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005379 ac_check_lib_save_LIBS=$LIBS
5380LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005382/* end confdefs.h. */
5383
Bram Moolenaar446cb832008-06-24 21:56:24 +00005384/* Override any GCC internal prototype to avoid an error.
5385 Use char because int might match the return type of a GCC
5386 builtin and then its argument prototype would still apply. */
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005387char is_selinux_enabled ();
5388int
Illia Bobyra96d5442023-08-30 16:30:15 +02005389main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005390{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005391return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005392 ;
5393 return 0;
5394}
5395_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005396if ac_fn_c_try_link "$LINENO"
5397then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005398 ac_cv_lib_selinux_is_selinux_enabled=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005399else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005400 ac_cv_lib_selinux_is_selinux_enabled=no
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005401fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005402rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005403 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005404LIBS=$ac_check_lib_save_LIBS
5405fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5407printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5408if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5409then :
5410 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5411if test "x$ac_cv_header_selinux_selinux_h" = xyes
5412then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005413 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005414 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005415
5416fi
5417
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005418fi
5419
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005420 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5422printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005423 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005424fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005425
Christian Brabandte085dfd2023-09-30 12:49:18 +02005426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5427printf %s "checking --enable-xattr argument... " >&6; }
5428# Check whether --enable-xattr was given.
5429if test ${enable_xattr+y}
5430then :
5431 enableval=$enable_xattr;
5432else $as_nop
5433 enable_xattr="yes"
5434fi
5435
5436if test "$enable_xattr" = "yes"; then
5437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5438printf "%s\n" "yes" >&6; }
Illia Bobyr8c358e02023-09-30 22:57:19 +02005439 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5440if test "x$ac_cv_header_sys_xattr_h" = xyes
Christian Brabandte085dfd2023-09-30 12:49:18 +02005441then :
5442 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5443
5444fi
5445
5446else
5447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448printf "%s\n" "no" >&6; }
5449fi
5450
5451
Illia Bobyra96d5442023-08-30 16:30:15 +02005452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5453printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005454
Bram Moolenaar446cb832008-06-24 21:56:24 +00005455# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005456if test ${with_features+y}
5457then :
5458 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5459printf "%s\n" "$features" >&6; }
5460else $as_nop
5461 features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5462printf "%s\n" "Defaulting to huge" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005463fi
5464
Bram Moolenaar071d4272004-06-13 20:20:40 +00005465
Martin Tournoij7904fa42022-10-04 16:28:45 +01005466case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005467 small) features="tiny" ;;
5468 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005469esac
5470
Bram Moolenaar071d4272004-06-13 20:20:40 +00005471dovimdiff=""
5472dogvimdiff=""
5473case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005474 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005475 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005476 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005477 dovimdiff="installvimdiff";
5478 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005479 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005480 dovimdiff="installvimdiff";
5481 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005482 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5483printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005484esac
5485
5486
5487
5488
Martin Tournoij7904fa42022-10-04 16:28:45 +01005489if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005490 has_eval=no
5491else
5492 has_eval=yes
5493fi
5494
Illia Bobyra96d5442023-08-30 16:30:15 +02005495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5496printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005497
Bram Moolenaar446cb832008-06-24 21:56:24 +00005498# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005499if test ${with_compiledby+y}
5500then :
5501 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5502printf "%s\n" "$withval" >&6; }
5503else $as_nop
5504 compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005506fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005507
5508
Bram Moolenaar446cb832008-06-24 21:56:24 +00005509
Illia Bobyra96d5442023-08-30 16:30:15 +02005510{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5511printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005512# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005513if test ${enable_xsmp+y}
5514then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005515 enableval=$enable_xsmp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005516else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005517 enable_xsmp="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005518fi
5519
Bram Moolenaar071d4272004-06-13 20:20:40 +00005520
5521if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5523printf "%s\n" "no" >&6; }
5524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5525printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005526 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005527if test ${enable_xsmp_interact+y}
5528then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005529 enableval=$enable_xsmp_interact;
Illia Bobyra96d5442023-08-30 16:30:15 +02005530else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005531 enable_xsmp_interact="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005532fi
5533
Bram Moolenaar071d4272004-06-13 20:20:40 +00005534 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536printf "%s\n" "no" >&6; }
5537 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005538
5539 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5541printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005542 fi
5543else
Illia Bobyra96d5442023-08-30 16:30:15 +02005544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5545printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005546fi
5547
Illia Bobyra96d5442023-08-30 16:30:15 +02005548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5549printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005550if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5552printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005553else
Illia Bobyra96d5442023-08-30 16:30:15 +02005554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5555printf "%s\n" "enabled" >&6; }
5556 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005557
5558 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5559
5560fi
5561
Illia Bobyra96d5442023-08-30 16:30:15 +02005562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5563printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005564# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005565if test ${enable_luainterp+y}
5566then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005567 enableval=$enable_luainterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005568else $as_nop
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005569 enable_luainterp="no"
5570fi
5571
Illia Bobyra96d5442023-08-30 16:30:15 +02005572{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5573printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005574
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005575if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005576 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005577 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005578 fi
5579
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005580
5581
Illia Bobyra96d5442023-08-30 16:30:15 +02005582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5583printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005584
5585# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005586if test ${with_lua_prefix+y}
5587then :
5588 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5589printf "%s\n" "$with_lua_prefix" >&6; }
5590else $as_nop
5591 with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5592printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005593fi
5594
5595
5596 if test "X$with_lua_prefix" != "X"; then
5597 vi_cv_path_lua_pfx="$with_lua_prefix"
5598 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5600printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005601 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5603printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005604 vi_cv_path_lua_pfx="$LUA_PREFIX"
5605 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5607printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005608 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005609 fi
5610 fi
5611
Illia Bobyra96d5442023-08-30 16:30:15 +02005612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5613printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005614
5615# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005616if test ${with_luajit+y}
5617then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005618 withval=$with_luajit; vi_cv_with_luajit="$withval"
Illia Bobyra96d5442023-08-30 16:30:15 +02005619else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005620 vi_cv_with_luajit="no"
5621fi
5622
Illia Bobyra96d5442023-08-30 16:30:15 +02005623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5624printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005625
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005626 LUA_INC=
5627 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005628 if test "x$vi_cv_with_luajit" != "xno"; then
5629 # Extract the first word of "luajit", so it can be a program name with args.
5630set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5632printf %s "checking for $ac_word... " >&6; }
5633if test ${ac_cv_path_vi_cv_path_luajit+y}
5634then :
5635 printf %s "(cached) " >&6
5636else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005637 case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005638 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005639 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 +02005640 ;;
5641 *)
5642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005646 case $as_dir in #(((
5647 '') as_dir=./ ;;
5648 */) ;;
5649 *) as_dir=$as_dir/ ;;
5650 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005651 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005652 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5653 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5654 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005655 break 2
5656 fi
5657done
5658 done
5659IFS=$as_save_IFS
5660
5661 ;;
5662esac
5663fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005664vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5665if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5667printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005668else
Illia Bobyra96d5442023-08-30 16:30:15 +02005669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005671fi
5672
5673
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005674 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5676printf %s "checking LuaJIT version... " >&6; }
5677if test ${vi_cv_version_luajit+y}
5678then :
5679 printf %s "(cached) " >&6
5680else $as_nop
ichizokbddc6ad2023-08-29 20:54:32 +02005681 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 +02005682fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5684printf "%s\n" "$vi_cv_version_luajit" >&6; }
5685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5686printf %s "checking Lua version of LuaJIT... " >&6; }
5687if test ${vi_cv_version_lua_luajit+y}
5688then :
5689 printf %s "(cached) " >&6
5690else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005691 vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5692fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5694printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005695 vi_cv_path_lua="$vi_cv_path_luajit"
5696 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5697 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005698 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005699 # Extract the first word of "lua", so it can be a program name with args.
5700set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702printf %s "checking for $ac_word... " >&6; }
5703if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5704then :
5705 printf %s "(cached) " >&6
5706else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005707 case $vi_cv_path_plain_lua in
5708 [\\/]* | ?:[\\/]*)
5709 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5710 ;;
5711 *)
5712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713for as_dir in $PATH
5714do
5715 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005716 case $as_dir in #(((
5717 '') as_dir=./ ;;
5718 */) ;;
5719 *) as_dir=$as_dir/ ;;
5720 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005721 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005722 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5723 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5724 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005725 break 2
5726 fi
5727done
5728 done
5729IFS=$as_save_IFS
5730
5731 ;;
5732esac
5733fi
5734vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5735if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5737printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005738else
Illia Bobyra96d5442023-08-30 16:30:15 +02005739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005741fi
5742
5743
5744 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5746printf %s "checking Lua version... " >&6; }
5747if test ${vi_cv_version_plain_lua+y}
5748then :
5749 printf %s "(cached) " >&6
5750else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005751 vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5752fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5754printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005755 fi
5756 vi_cv_path_lua="$vi_cv_path_plain_lua"
5757 vi_cv_version_lua="$vi_cv_version_plain_lua"
5758 fi
5759 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005760 { 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
5761printf %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 +01005762 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5764printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005765 LUA_INC=/luajit-$vi_cv_version_luajit
5766 fi
5767 fi
5768 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5770printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005771 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5773printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005774 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776printf "%s\n" "no" >&6; }
5777 { 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
5778printf %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 +01005779 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5781printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005782 LUA_INC=/lua$vi_cv_version_lua
5783 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005786
5787 # Detect moonjit:
5788 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5789 lua_suf=/moonjit-2.3
5790 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02005791 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005792 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01005793 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005794 lua_suf="/$lua_suf"
5795 break
5796 fi
5797 done
Illia Bobyra96d5442023-08-30 16:30:15 +02005798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5799printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005800 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5802printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005803 LUA_INC=$lua_suf
5804 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5806printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005807 vi_cv_path_lua_pfx=
5808 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005809 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005810 fi
5811 fi
5812 fi
5813
5814 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005815 if test "x$vi_cv_with_luajit" != "xno"; then
5816 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5817 if test "X$multiarch" != "X"; then
5818 lib_multiarch="lib/${multiarch}"
5819 else
5820 lib_multiarch="lib"
5821 fi
5822 if test "X$vi_cv_version_lua" = "X"; then
5823 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5824 else
5825 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5826 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005827 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005828 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5829 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005830 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005831 LUALIBDIR=lib
5832 fi
5833 if test "X$LUA_INC" != "X"; then
5834 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
5835 else
5836 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005837 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005838 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005839 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005840 lua_ok="yes"
5841 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5843printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005844 libs_save=$LIBS
5845 LIBS="$LIBS $LUA_LIBS"
5846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5847/* end confdefs.h. */
5848
5849int
Illia Bobyra96d5442023-08-30 16:30:15 +02005850main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005851{
5852
5853 ;
5854 return 0;
5855}
5856_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005857if ac_fn_c_try_link "$LINENO"
5858then :
5859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5860printf "%s\n" "yes" >&6; }; lua_ok="yes"
5861else $as_nop
5862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS=""
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005864fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005866 conftest$ac_exeext conftest.$ac_ext
5867 LIBS=$libs_save
5868 fi
5869 if test "x$lua_ok" = "xyes"; then
5870 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5871 LUA_SRC="if_lua.c"
5872 LUA_OBJ="objects/if_lua.o"
5873 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02005874 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005875
5876 fi
5877 if test "$enable_luainterp" = "dynamic"; then
5878 if test "x$vi_cv_with_luajit" != "xno"; then
5879 luajit="jit"
5880 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005881 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5882 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5883 else
Bram Moolenaard0573012017-10-28 21:11:06 +02005884 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005885 ext="dylib"
5886 indexes=""
5887 else
5888 ext="so"
5889 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5890 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5891 if test "X$multiarch" != "X"; then
5892 lib_multiarch="lib/${multiarch}"
5893 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02005894 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5896printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005897 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02005898 if test -z "$subdir"; then
5899 continue
5900 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005901 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5902 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5903 for i in $indexes ""; do
5904 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02005905 sover2="$i"
5906 break 3
5907 fi
5908 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01005909 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005910 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005911 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005912 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5914printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005915 lua_ok="no"
5916 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5917 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5919printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005920 lua_ok="yes"
5921 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5922 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005923 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005924 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005925
5926 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005927 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005928 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005929 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02005930 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005931 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005932 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5933 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005934 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005935 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01005936 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01005937 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005938
5939
5940
5941
5942
ichizok8bb3fe42021-12-28 15:51:45 +00005943
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005944fi
5945
5946
Illia Bobyra96d5442023-08-30 16:30:15 +02005947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5948printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005949# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005950if test ${enable_mzschemeinterp+y}
5951then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005952 enableval=$enable_mzschemeinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005953else $as_nop
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005954 enable_mzschemeinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005955fi
5956
Illia Bobyra96d5442023-08-30 16:30:15 +02005957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5958printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005959
5960if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005961
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005962
Illia Bobyra96d5442023-08-30 16:30:15 +02005963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5964printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005965
Bram Moolenaar446cb832008-06-24 21:56:24 +00005966# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005967if test ${with_plthome+y}
5968then :
5969 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5970printf "%s\n" "$with_plthome" >&6; }
5971else $as_nop
5972 with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5973printf "%s\n" "\"no\"" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005974fi
5975
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005976
5977 if test "X$with_plthome" != "X"; then
5978 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005979 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005980 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5982printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005983 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5985printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005986 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005987 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005988 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5990printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005991 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005992set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994printf %s "checking for $ac_word... " >&6; }
5995if test ${ac_cv_path_vi_cv_path_mzscheme+y}
5996then :
5997 printf %s "(cached) " >&6
5998else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005999 case $vi_cv_path_mzscheme in
6000 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006001 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6002 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006003 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006008 case $as_dir in #(((
6009 '') as_dir=./ ;;
6010 */) ;;
6011 *) as_dir=$as_dir/ ;;
6012 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006013 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006014 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6015 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6016 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006017 break 2
6018 fi
6019done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006020 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006021IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006022
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006023 ;;
6024esac
6025fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006026vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006027if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6029printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006030else
Illia Bobyra96d5442023-08-30 16:30:15 +02006031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006033fi
6034
6035
Bram Moolenaar446cb832008-06-24 21:56:24 +00006036
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006037 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006038 lsout=`ls -l $vi_cv_path_mzscheme`
6039 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6040 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6041 fi
6042 fi
6043
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006044 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6046printf %s "checking MzScheme install prefix... " >&6; }
6047if test ${vi_cv_path_mzscheme_pfx+y}
6048then :
6049 printf %s "(cached) " >&6
6050else $as_nop
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006051 echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006052 (build-path (call-with-values \
6053 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006054 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6055 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
6056 sed -e 's+/$++'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006057fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6059printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006060 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006061 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006062 fi
6063 fi
6064
6065 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6067printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006068 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6069 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6071printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006072 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6074printf "%s\n" "not found" >&6; }
6075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6076printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006077 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6078 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6080printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006081 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083printf "%s\n" "no" >&6; }
6084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6085printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006086 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6088printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006089 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006090 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6092printf "%s\n" "no" >&6; }
6093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6094printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006095 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6097printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006098 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006099 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101printf "%s\n" "no" >&6; }
6102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6103printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006104 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6106printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006107 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006108 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6110printf "%s\n" "no" >&6; }
6111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6112printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006113 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6115printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006116 SCHEME_INC=/usr/include/racket
6117 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006120 vi_cv_path_mzscheme_pfx=
6121 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006122 fi
6123 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006124 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006125 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006126 fi
6127 fi
6128
6129 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006130
Illia Bobyra96d5442023-08-30 16:30:15 +02006131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6132printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006133 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6134 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6136printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006137 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6139printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006140 fi
6141
6142 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6143 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006144 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006145 MZSCHEME_LIBS="-framework Racket"
6146 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6147 elif test -f "${path}/libmzscheme3m.a"; then
6148 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6149 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6150 elif test -f "${path}/libracket3m.a"; then
6151 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006152 if test -f "${path}/librktio.a"; then
6153 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6154 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006155 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6156 elif test -f "${path}/libracket.a"; then
6157 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6158 elif test -f "${path}/libmzscheme.a"; then
6159 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6160 else
6161 if test -f "${path}/libmzscheme3m.so"; then
6162 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6163 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6164 elif test -f "${path}/libracket3m.so"; then
6165 MZSCHEME_LIBS="-L${path} -lracket3m"
6166 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6167 elif test -f "${path}/libracket.so"; then
6168 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6169 else
6170 if test "$path" != "$SCHEME_LIB"; then
6171 continue
6172 fi
6173 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6174 fi
6175 if test "$GCC" = yes; then
6176 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006177 elif test "$vim_cv_uname_output" = SunOS &&
6178 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006179 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6180 fi
6181 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006182 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006183 if test "X$MZSCHEME_LIBS" != "X"; then
6184 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006185 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006186 done
6187
Illia Bobyra96d5442023-08-30 16:30:15 +02006188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6189printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006190 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6192printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006193 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6194 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6195 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6197printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006198 fi
6199
Illia Bobyra96d5442023-08-30 16:30:15 +02006200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6201printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006202 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6203 if test "X$SCHEME_CONFIGDIR" != "X"; then
6204 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6206printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006207 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6209printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006210 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006211
Illia Bobyra96d5442023-08-30 16:30:15 +02006212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6213printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006214 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))))'`
6215 if test "X$SCHEME_COLLECTS" = "X"; then
6216 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6217 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006218 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006219 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6220 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006221 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006222 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6223 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6224 else
6225 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6226 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6227 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006228 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006229 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006230 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006231 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006232 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6234printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006235 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6237printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006238 fi
6239
Illia Bobyra96d5442023-08-30 16:30:15 +02006240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6241printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006242 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006243 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006244 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6245 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006246 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006247 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006248 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006249 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6250 MZSCHEME_MOD="++lib scheme/base"
6251 else
6252 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6253 MZSCHEME_EXTRA="mzscheme_base.c"
6254 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6255 MZSCHEME_MOD=""
6256 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006257 fi
6258 fi
6259 if test "X$MZSCHEME_EXTRA" != "X" ; then
6260 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6262printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006263 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6265printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006266 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006267
Illia Bobyra96d5442023-08-30 16:30:15 +02006268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6269printf %s "checking for ffi_type_void in -lffi... " >&6; }
6270if test ${ac_cv_lib_ffi_ffi_type_void+y}
6271then :
6272 printf %s "(cached) " >&6
6273else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006274 ac_check_lib_save_LIBS=$LIBS
6275LIBS="-lffi $LIBS"
6276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6277/* end confdefs.h. */
6278
6279/* Override any GCC internal prototype to avoid an error.
6280 Use char because int might match the return type of a GCC
6281 builtin and then its argument prototype would still apply. */
Bram Moolenaar9e902192013-07-17 18:58:11 +02006282char ffi_type_void ();
6283int
Illia Bobyra96d5442023-08-30 16:30:15 +02006284main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006285{
6286return ffi_type_void ();
6287 ;
6288 return 0;
6289}
6290_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006291if ac_fn_c_try_link "$LINENO"
6292then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006293 ac_cv_lib_ffi_ffi_type_void=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006294else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006295 ac_cv_lib_ffi_ffi_type_void=no
6296fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006297rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006298 conftest$ac_exeext conftest.$ac_ext
6299LIBS=$ac_check_lib_save_LIBS
6300fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6302printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6303if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6304then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006305 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6306fi
6307
6308
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006309 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006310 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006311
Illia Bobyra96d5442023-08-30 16:30:15 +02006312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6313printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006314 cflags_save=$CFLAGS
6315 libs_save=$LIBS
6316 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6317 LIBS="$LIBS $MZSCHEME_LIBS"
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319/* end confdefs.h. */
6320
6321int
Illia Bobyra96d5442023-08-30 16:30:15 +02006322main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006323{
6324
6325 ;
6326 return 0;
6327}
6328_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006329if ac_fn_c_try_link "$LINENO"
6330then :
6331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6332printf "%s\n" "yes" >&6; }; mzs_ok=yes
6333else $as_nop
6334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6335printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
Bram Moolenaar9e902192013-07-17 18:58:11 +02006336fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006337rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006338 conftest$ac_exeext conftest.$ac_ext
6339 CFLAGS=$cflags_save
6340 LIBS=$libs_save
6341 if test $mzs_ok = yes; then
6342 MZSCHEME_SRC="if_mzsch.c"
6343 MZSCHEME_OBJ="objects/if_mzsch.o"
6344 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006345 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006346
6347 else
6348 MZSCHEME_CFLAGS=
6349 MZSCHEME_LIBS=
6350 MZSCHEME_EXTRA=
6351 MZSCHEME_MZC=
6352 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006353 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006354
6355
6356
6357
6358
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006359
6360
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006361fi
6362
6363
Illia Bobyra96d5442023-08-30 16:30:15 +02006364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6365printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006366# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006367if test ${enable_perlinterp+y}
6368then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006369 enableval=$enable_perlinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006370else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006371 enable_perlinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006372fi
6373
Illia Bobyra96d5442023-08-30 16:30:15 +02006374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6375printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006376if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006377 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006378 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006379 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006380
Bram Moolenaar071d4272004-06-13 20:20:40 +00006381 # Extract the first word of "perl", so it can be a program name with args.
6382set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384printf %s "checking for $ac_word... " >&6; }
6385if test ${ac_cv_path_vi_cv_path_perl+y}
6386then :
6387 printf %s "(cached) " >&6
6388else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006389 case $vi_cv_path_perl in
6390 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006391 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6392 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006393 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006398 case $as_dir in #(((
6399 '') as_dir=./ ;;
6400 */) ;;
6401 *) as_dir=$as_dir/ ;;
6402 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006403 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006404 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6405 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6406 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006407 break 2
6408 fi
6409done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006410 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006411IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006412
Bram Moolenaar071d4272004-06-13 20:20:40 +00006413 ;;
6414esac
6415fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006416vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006417if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6419printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006420else
Illia Bobyra96d5442023-08-30 16:30:15 +02006421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006423fi
6424
Bram Moolenaar446cb832008-06-24 21:56:24 +00006425
Bram Moolenaar071d4272004-06-13 20:20:40 +00006426 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6428printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006429 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6430 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006431 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006432 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6433 badthreads=no
6434 else
6435 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6436 eval `$vi_cv_path_perl -V:use5005threads`
6437 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6438 badthreads=no
6439 else
6440 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6442printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006443 fi
6444 else
6445 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6447printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006448 fi
6449 fi
6450 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6452printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006453 eval `$vi_cv_path_perl -V:shrpenv`
6454 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6455 shrpenv=""
6456 fi
6457 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006458
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006459 vi_cv_perl_extutils=unknown_perl_extutils_path
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01006460
6461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
6462printf %s "checking --with-xsubpp path... " >&6; }
6463 vi_cv_perl_xsubpp=
6464
6465# Check whether --with-xsubpp was given.
6466if test ${with_xsubpp+y}
6467then :
6468 withval=$with_xsubpp;
6469 if test -f "$withval"
6470 then
6471 vi_cv_perl_xsubpp="$withval"
6472 fi
6473
6474fi
6475
6476
6477 if test "x$vi_cv_perl_xsubpp" = "x"
6478 then
6479 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6480 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6481 if test -f "$xsubpp_path"; then
6482 vi_cv_perl_xsubpp="$xsubpp_path"
6483 fi
6484 done
6485 fi
6486
6487 if test "x$vi_cv_perl_xsubpp" = "x"
6488 then
6489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
6490printf "%s\n" "empty" >&6; }
6491 else
6492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
6493printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
6494 fi
6495
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006496
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006497 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006498 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6499 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006500 -e 's/-pipe //' \
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006501 -e 's/-flto\(=auto\)\? //' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006502 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006503 -e 's/-D_FORTIFY_SOURCE=.//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006504 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6505 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6506 -e 's/-bE:perl.exp//' -e 's/-lc //'`
6507 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6508 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6509
Illia Bobyra96d5442023-08-30 16:30:15 +02006510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6511printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006512 cflags_save=$CFLAGS
6513 libs_save=$LIBS
6514 ldflags_save=$LDFLAGS
6515 CFLAGS="$CFLAGS $perlcppflags"
6516 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006517 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006518 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006520/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006521
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006522int
Illia Bobyra96d5442023-08-30 16:30:15 +02006523main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006524{
6525
6526 ;
6527 return 0;
6528}
6529_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006530if ac_fn_c_try_link "$LINENO"
6531then :
6532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6533printf "%s\n" "yes" >&6; }; perl_ok=yes
6534else $as_nop
6535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6536printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006537fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006538rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006539 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006540 CFLAGS=$cflags_save
6541 LIBS=$libs_save
6542 LDFLAGS=$ldflags_save
6543 if test $perl_ok = yes; then
6544 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006545 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006546 fi
6547 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006548 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006549 LDFLAGS="$perlldflags $LDFLAGS"
6550 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006551 fi
6552 PERL_LIBS=$perllibs
6553 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6554 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6555 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006556 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006557
6558 fi
6559 fi
6560 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6562printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006563 fi
6564 fi
6565
Bram Moolenaard0573012017-10-28 21:11:06 +02006566 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006567 dir=/System/Library/Perl
6568 darwindir=$dir/darwin
6569 if test -d $darwindir; then
6570 PERL=/usr/bin/perl
6571 else
6572 dir=/System/Library/Perl/5.8.1
6573 darwindir=$dir/darwin-thread-multi-2level
6574 if test -d $darwindir; then
6575 PERL=/usr/bin/perl
6576 fi
6577 fi
6578 if test -n "$PERL"; then
6579 PERL_DIR="$dir"
6580 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6581 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6582 PERL_LIBS="-L$darwindir/CORE -lperl"
6583 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006584 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6585 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 +00006586 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006587 if test "$enable_perlinterp" = "dynamic"; then
6588 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006589 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006590
6591 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006592 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006593 fi
6594 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006595
6596 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006597 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006598 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006599fi
6600
6601
6602
6603
6604
6605
6606
ichizok8bb3fe42021-12-28 15:51:45 +00006607
Illia Bobyra96d5442023-08-30 16:30:15 +02006608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6609printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006610# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006611if test ${enable_pythoninterp+y}
6612then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006613 enableval=$enable_pythoninterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006614else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006615 enable_pythoninterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006616fi
6617
Illia Bobyra96d5442023-08-30 16:30:15 +02006618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6619printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006620if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006621 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006622 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006623 fi
6624
Illia Bobyra96d5442023-08-30 16:30:15 +02006625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6626printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006627
6628
6629# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006630if test ${with_python_command+y}
6631then :
6632 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6633printf "%s\n" "$vi_cv_path_python" >&6; }
6634else $as_nop
6635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6636printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006637fi
6638
6639
6640 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006641 for ac_prog in python2 python
6642do
6643 # Extract the first word of "$ac_prog", so it can be a program name with args.
6644set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6646printf %s "checking for $ac_word... " >&6; }
6647if test ${ac_cv_path_vi_cv_path_python+y}
6648then :
6649 printf %s "(cached) " >&6
6650else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006651 case $vi_cv_path_python in
6652 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006653 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6654 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006655 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6657for as_dir in $PATH
6658do
6659 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006660 case $as_dir in #(((
6661 '') as_dir=./ ;;
6662 */) ;;
6663 *) as_dir=$as_dir/ ;;
6664 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006665 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006666 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6667 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6668 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006669 break 2
6670 fi
6671done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006672 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006673IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006674
Bram Moolenaar071d4272004-06-13 20:20:40 +00006675 ;;
6676esac
6677fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006678vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006679if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6681printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006682else
Illia Bobyra96d5442023-08-30 16:30:15 +02006683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6684printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006685fi
6686
Bram Moolenaar446cb832008-06-24 21:56:24 +00006687
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006688 test -n "$vi_cv_path_python" && break
6689done
6690
Bram Moolenaare1a32312018-04-15 16:03:25 +02006691 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006692 if test "X$vi_cv_path_python" != "X"; then
6693
Illia Bobyra96d5442023-08-30 16:30:15 +02006694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6695printf %s "checking Python version... " >&6; }
6696if test ${vi_cv_var_python_version+y}
6697then :
6698 printf %s "(cached) " >&6
6699else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006700 vi_cv_var_python_version=`
6701 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006702
Bram Moolenaar071d4272004-06-13 20:20:40 +00006703fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6705printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006706
Illia Bobyra96d5442023-08-30 16:30:15 +02006707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6708printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006709 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02006710 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006711 then
Illia Bobyra96d5442023-08-30 16:30:15 +02006712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6713printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006714
Illia Bobyra96d5442023-08-30 16:30:15 +02006715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6716printf %s "checking Python's install prefix... " >&6; }
6717if test ${vi_cv_path_python_pfx+y}
6718then :
6719 printf %s "(cached) " >&6
6720else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006721 vi_cv_path_python_pfx=`
6722 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006723 "import sys; print sys.prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006724fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6726printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006727
Illia Bobyra96d5442023-08-30 16:30:15 +02006728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6729printf %s "checking Python's execution prefix... " >&6; }
6730if test ${vi_cv_path_python_epfx+y}
6731then :
6732 printf %s "(cached) " >&6
6733else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006734 vi_cv_path_python_epfx=`
6735 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006736 "import sys; print sys.exec_prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006737fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6739printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006740
Bram Moolenaar071d4272004-06-13 20:20:40 +00006741
Illia Bobyra96d5442023-08-30 16:30:15 +02006742 if test ${vi_cv_path_pythonpath+y}
6743then :
6744 printf %s "(cached) " >&6
6745else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006746 vi_cv_path_pythonpath=`
6747 unset PYTHONPATH;
6748 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006749 "import sys, string; print string.join(sys.path,':')"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006750fi
6751
6752
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006753
6754
Bram Moolenaar446cb832008-06-24 21:56:24 +00006755# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006756if test ${with_python_config_dir+y}
6757then :
Bram Moolenaard0882402018-04-10 18:13:05 +02006758 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00006759fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006760
Bram Moolenaar446cb832008-06-24 21:56:24 +00006761
Illia Bobyra96d5442023-08-30 16:30:15 +02006762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6763printf %s "checking Python's configuration directory... " >&6; }
6764if test ${vi_cv_path_python_conf+y}
6765then :
6766 printf %s "(cached) " >&6
6767else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006768
Bram Moolenaar071d4272004-06-13 20:20:40 +00006769 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02006770 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6771 if test -d "$d" && test -f "$d/config.c"; then
6772 vi_cv_path_python_conf="$d"
6773 else
6774 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6775 for subdir in lib64 lib share; do
6776 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6777 if test -d "$d" && test -f "$d/config.c"; then
6778 vi_cv_path_python_conf="$d"
6779 fi
6780 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00006781 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02006782 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006783
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006784fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6786printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006787
6788 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6789
6790 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6792printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006793 else
6794
Illia Bobyra96d5442023-08-30 16:30:15 +02006795 if test ${vi_cv_path_python_plibs+y}
6796then :
6797 printf %s "(cached) " >&6
6798else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006799
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006800 pwd=`pwd`
6801 tmp_mkf="$pwd/config-PyMake$$"
6802 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006803__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02006804 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006805 @echo "python_LIBS='$(LIBS)'"
6806 @echo "python_SYSLIBS='$(SYSLIBS)'"
6807 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02006808 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02006809 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006810 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6811 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6812 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006813eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006814 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6815 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02006816 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006817 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6818 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006819 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6820 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6821 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006822 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02006823 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01006824 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01006825 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6826 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6827 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6828 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6829 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6830 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6831 fi
6832 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6833 fi
6834 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02006835 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 +00006836 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6837 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006838
Bram Moolenaar071d4272004-06-13 20:20:40 +00006839fi
6840
Illia Bobyra96d5442023-08-30 16:30:15 +02006841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6842printf %s "checking Python's dll name... " >&6; }
6843if test ${vi_cv_dll_name_python+y}
6844then :
6845 printf %s "(cached) " >&6
6846else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006847
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006848 if test "X$python_DLLLIBRARY" != "X"; then
6849 vi_cv_dll_name_python="$python_DLLLIBRARY"
6850 else
6851 vi_cv_dll_name_python="$python_INSTSONAME"
6852 fi
6853
6854fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006855{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6856printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006857
Bram Moolenaar071d4272004-06-13 20:20:40 +00006858 PYTHON_LIBS="${vi_cv_path_python_plibs}"
6859 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02006860 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006861 else
Bram Moolenaar04249582018-04-10 13:29:34 +02006862 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 +00006863 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02006864 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02006865 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6866
6867 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006868 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02006869 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006870
Illia Bobyra96d5442023-08-30 16:30:15 +02006871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6872printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006873 threadsafe_flag=
6874 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006875 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006876 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006877 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006878 threadsafe_flag="-D_THREAD_SAFE"
6879 thread_lib="-pthread"
6880 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006881 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02006882 threadsafe_flag="-pthreads"
6883 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006884 fi
6885 libs_save_old=$LIBS
6886 if test -n "$threadsafe_flag"; then
6887 cflags_save=$CFLAGS
6888 CFLAGS="$CFLAGS $threadsafe_flag"
6889 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006891/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006892
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006893int
Illia Bobyra96d5442023-08-30 16:30:15 +02006894main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006895{
6896
6897 ;
6898 return 0;
6899}
6900_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006901if ac_fn_c_try_link "$LINENO"
6902then :
6903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6904printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6905else $as_nop
6906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6907printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006908
Bram Moolenaar071d4272004-06-13 20:20:40 +00006909fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006910rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006911 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006912 CFLAGS=$cflags_save
6913 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6915printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006916 fi
6917
Illia Bobyra96d5442023-08-30 16:30:15 +02006918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6919printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006920 cflags_save=$CFLAGS
6921 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02006922 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006923 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006925/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006926
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006927int
Illia Bobyra96d5442023-08-30 16:30:15 +02006928main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006929{
6930
6931 ;
6932 return 0;
6933}
6934_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006935if ac_fn_c_try_link "$LINENO"
6936then :
6937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6938printf "%s\n" "yes" >&6; }; python_ok=yes
6939else $as_nop
6940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6941printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006942fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006943rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006944 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006945 CFLAGS=$cflags_save
6946 LIBS=$libs_save
6947 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006948 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006949
6950 else
6951 LIBS=$libs_save_old
6952 PYTHON_SRC=
6953 PYTHON_OBJ=
6954 PYTHON_LIBS=
6955 PYTHON_CFLAGS=
6956 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006957 fi
6958 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6960printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006961 fi
6962 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006963
6964 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006965 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006966 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006967fi
6968
6969
6970
6971
6972
6973
6974
ichizok8bb3fe42021-12-28 15:51:45 +00006975
Illia Bobyra96d5442023-08-30 16:30:15 +02006976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6977printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006978# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006979if test ${enable_python3interp+y}
6980then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006981 enableval=$enable_python3interp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006982else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006983 enable_python3interp="no"
6984fi
6985
Illia Bobyra96d5442023-08-30 16:30:15 +02006986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6987printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006988if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006989 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006990 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006991 fi
6992
Illia Bobyra96d5442023-08-30 16:30:15 +02006993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6994printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006995
6996
6997# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006998if test ${with_python3_command+y}
6999then :
7000 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7001printf "%s\n" "$vi_cv_path_python3" >&6; }
7002else $as_nop
7003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7004printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02007005fi
7006
7007
7008 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007009 for ac_prog in python3 python
7010do
7011 # Extract the first word of "$ac_prog", so it can be a program name with args.
7012set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7014printf %s "checking for $ac_word... " >&6; }
7015if test ${ac_cv_path_vi_cv_path_python3+y}
7016then :
7017 printf %s "(cached) " >&6
7018else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007019 case $vi_cv_path_python3 in
7020 [\\/]* | ?:[\\/]*)
7021 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
7022 ;;
7023 *)
7024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7025for as_dir in $PATH
7026do
7027 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007028 case $as_dir in #(((
7029 '') as_dir=./ ;;
7030 */) ;;
7031 *) as_dir=$as_dir/ ;;
7032 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007033 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007034 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7035 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7036 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007037 break 2
7038 fi
7039done
7040 done
7041IFS=$as_save_IFS
7042
7043 ;;
7044esac
7045fi
7046vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7047if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7049printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007050else
Illia Bobyra96d5442023-08-30 16:30:15 +02007051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7052printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007053fi
7054
7055
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007056 test -n "$vi_cv_path_python3" && break
7057done
7058
Bram Moolenaare1a32312018-04-15 16:03:25 +02007059 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007060 if test "X$vi_cv_path_python3" != "X"; then
7061
Illia Bobyra96d5442023-08-30 16:30:15 +02007062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7063printf %s "checking Python version... " >&6; }
7064if test ${vi_cv_var_python3_version+y}
7065then :
7066 printf %s "(cached) " >&6
7067else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007068 vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007069 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007070
7071fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7073printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007074
Illia Bobyra96d5442023-08-30 16:30:15 +02007075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7076printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007077 if ${vi_cv_path_python3} -c \
7078 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7079 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7081printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007082
Illia Bobyra96d5442023-08-30 16:30:15 +02007083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
7084printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007085
7086
7087# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007088if test ${with_python3_stable_abi+y}
7089then :
7090 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
7091printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
7092else $as_nop
7093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094printf "%s\n" "no" >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007095fi
7096
7097 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007098 if test ${vi_cv_var_python3_stable_abi_hex+y}
7099then :
7100 printf %s "(cached) " >&6
7101else $as_nop
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007102
7103 vi_cv_var_python3_stable_abi_hex=`
7104 ${vi_cv_path_python3} -c \
7105 "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) ))"`
7106fi
7107
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007108 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007109 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7110 fi
7111 fi
7112
Illia Bobyra96d5442023-08-30 16:30:15 +02007113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7114printf %s "checking Python's abiflags... " >&6; }
7115if test ${vi_cv_var_python3_abiflags+y}
7116then :
7117 printf %s "(cached) " >&6
7118else $as_nop
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007119
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007120 vi_cv_var_python3_abiflags=
7121 if ${vi_cv_path_python3} -c \
7122 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7123 then
7124 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7125 "import sys; print(sys.abiflags)"`
7126 fi
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007127fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7129printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007130
Illia Bobyra96d5442023-08-30 16:30:15 +02007131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7132printf %s "checking Python's install prefix... " >&6; }
7133if test ${vi_cv_path_python3_pfx+y}
7134then :
7135 printf %s "(cached) " >&6
7136else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007137 vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007138 ${vi_cv_path_python3} -c \
7139 "import sys; print(sys.prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007140fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7142printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007143
Illia Bobyra96d5442023-08-30 16:30:15 +02007144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7145printf %s "checking Python's execution prefix... " >&6; }
7146if test ${vi_cv_path_python3_epfx+y}
7147then :
7148 printf %s "(cached) " >&6
7149else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007150 vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007151 ${vi_cv_path_python3} -c \
7152 "import sys; print(sys.exec_prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007153fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7155printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007156
Illia Bobyra96d5442023-08-30 16:30:15 +02007157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7158printf %s "checking Python's include path... " >&6; }
7159if test ${vi_cv_path_python3_include+y}
7160then :
7161 printf %s "(cached) " >&6
7162else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007163 vi_cv_path_python3_include=`
7164 ${vi_cv_path_python3} -c \
7165 "import sysconfig; print(sysconfig.get_path(\"include\"))"`
7166fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7168printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007169
Illia Bobyra96d5442023-08-30 16:30:15 +02007170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7171printf %s "checking Python's include path... " >&6; }
7172if test ${vi_cv_path_python3_platinclude+y}
7173then :
7174 printf %s "(cached) " >&6
7175else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007176 vi_cv_path_python3_platinclude=`
7177 ${vi_cv_path_python3} -c \
7178 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"`
7179fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7181printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007182
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007183
Illia Bobyra96d5442023-08-30 16:30:15 +02007184 if test ${vi_cv_path_python3path+y}
7185then :
7186 printf %s "(cached) " >&6
7187else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007188 vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007189 unset PYTHONPATH;
7190 ${vi_cv_path_python3} -c \
7191 "import sys, string; print(':'.join(sys.path))"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007192fi
7193
7194
7195
7196
7197# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007198if test ${with_python3_config_dir+y}
7199then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007200 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007201fi
7202
7203
Illia Bobyra96d5442023-08-30 16:30:15 +02007204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7205printf %s "checking Python's configuration directory... " >&6; }
7206if test ${vi_cv_path_python3_conf+y}
7207then :
7208 printf %s "(cached) " >&6
7209else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007210
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007211 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007212 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007213 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7214 if test "x$d" = "x"; then
7215 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7216 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007217 if test -d "$d" && test -f "$d/config.c"; then
7218 vi_cv_path_python3_conf="$d"
7219 else
7220 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7221 for subdir in lib64 lib share; do
7222 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7223 if test -d "$d" && test -f "$d/config.c"; then
7224 vi_cv_path_python3_conf="$d"
7225 fi
7226 done
7227 done
7228 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007229
7230fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007231{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7232printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007233
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007234 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007235
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007236 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7238printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007239 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007240
Illia Bobyra96d5442023-08-30 16:30:15 +02007241 if test ${vi_cv_path_python3_plibs+y}
7242then :
7243 printf %s "(cached) " >&6
7244else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007245
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007246 pwd=`pwd`
7247 tmp_mkf="$pwd/config-PyMake$$"
7248 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007249__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007250 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007251 @echo "python3_LIBS='$(LIBS)'"
7252 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007253 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007254 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007255 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007256eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007257 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7258 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007259 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 +02007260 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7261 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7262 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
7263
7264fi
7265
Illia Bobyra96d5442023-08-30 16:30:15 +02007266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7267printf %s "checking Python3's dll name... " >&6; }
7268if test ${vi_cv_dll_name_python3+y}
7269then :
7270 printf %s "(cached) " >&6
7271else $as_nop
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007272
7273 if test "X$python3_DLLLIBRARY" != "X"; then
7274 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007275 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7276 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007277 else
7278 vi_cv_dll_name_python3="$python3_INSTSONAME"
7279 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007280
7281fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7283printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007284
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007285 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007286 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7287 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007288 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007289 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007290 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007291 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7292 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7293 fi
7294 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7295 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7296 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007297 PYTHON3_SRC="if_python3.c"
7298 PYTHON3_OBJ="objects/if_python3.o"
7299
Illia Bobyra96d5442023-08-30 16:30:15 +02007300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7301printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007302 threadsafe_flag=
7303 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007304 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007305 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007306 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007307 threadsafe_flag="-D_THREAD_SAFE"
7308 thread_lib="-pthread"
7309 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007310 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007311 threadsafe_flag="-pthreads"
7312 fi
7313 fi
7314 libs_save_old=$LIBS
7315 if test -n "$threadsafe_flag"; then
7316 cflags_save=$CFLAGS
7317 CFLAGS="$CFLAGS $threadsafe_flag"
7318 LIBS="$LIBS $thread_lib"
7319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007320/* end confdefs.h. */
7321
7322int
Illia Bobyra96d5442023-08-30 16:30:15 +02007323main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007324{
7325
7326 ;
7327 return 0;
7328}
7329_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007330if ac_fn_c_try_link "$LINENO"
7331then :
7332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7333printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
7334else $as_nop
7335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7336printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007337
7338fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007339rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007340 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007341 CFLAGS=$cflags_save
7342 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7344printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007345 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007346
Illia Bobyra96d5442023-08-30 16:30:15 +02007347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7348printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007349 cflags_save=$CFLAGS
7350 libs_save=$LIBS
7351 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7352 LIBS="$LIBS $PYTHON3_LIBS"
7353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007354/* end confdefs.h. */
7355
7356int
Illia Bobyra96d5442023-08-30 16:30:15 +02007357main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007358{
7359
7360 ;
7361 return 0;
7362}
7363_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007364if ac_fn_c_try_link "$LINENO"
7365then :
7366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7367printf "%s\n" "yes" >&6; }; python3_ok=yes
7368else $as_nop
7369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7370printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007371fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007372rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007373 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007374 CFLAGS=$cflags_save
7375 LIBS=$libs_save
7376 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007377 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007378
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007379 else
7380 LIBS=$libs_save_old
7381 PYTHON3_SRC=
7382 PYTHON3_OBJ=
7383 PYTHON3_LIBS=
7384 PYTHON3_CFLAGS=
7385 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007386 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007387 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7389printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007390 fi
7391 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007392 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007393 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007394 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007395fi
7396
7397
7398
7399
7400
7401
ichizok8bb3fe42021-12-28 15:51:45 +00007402
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007403if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007404 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007405
Illia Bobyra96d5442023-08-30 16:30:15 +02007406 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007407
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007408 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007409 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007410
7411 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7413printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007414 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007415 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007416 libs_save=$LIBS
7417 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007418 if test "$cross_compiling" = yes
7419then :
7420 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7421printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007422as_fn_error $? "cannot run test program while cross compiling
7423See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007424else $as_nop
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7426/* end confdefs.h. */
7427
7428 #include <dlfcn.h>
7429 /* If this program fails, then RTLD_GLOBAL is needed.
7430 * RTLD_GLOBAL will be used and then it is not possible to
7431 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007432 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007433 */
7434
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007435 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007436 {
7437 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007438 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007439 if (pylib != 0)
7440 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007441 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007442 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7443 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7444 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007445 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007446 (*init)();
7447 needed = (*simple)("import termios") == -1;
7448 (*final)();
7449 dlclose(pylib);
7450 }
7451 return !needed;
7452 }
7453
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007454 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007455 {
7456 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007457 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007458 not_needed = 1;
7459 return !not_needed;
7460 }
7461_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007462if ac_fn_c_try_run "$LINENO"
7463then :
7464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7465printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007466
Illia Bobyra96d5442023-08-30 16:30:15 +02007467else $as_nop
7468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469printf "%s\n" "no" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007470fi
7471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7472 conftest.$ac_objext conftest.beam conftest.$ac_ext
7473fi
7474
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007475
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007476 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007477 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007478
Illia Bobyra96d5442023-08-30 16:30:15 +02007479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7480printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007481 cflags_save=$CFLAGS
7482 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007483 libs_save=$LIBS
7484 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007485 if test "$cross_compiling" = yes
7486then :
7487 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7488printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007489as_fn_error $? "cannot run test program while cross compiling
7490See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007491else $as_nop
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7493/* end confdefs.h. */
7494
7495 #include <dlfcn.h>
7496 #include <wchar.h>
7497 /* If this program fails, then RTLD_GLOBAL is needed.
7498 * RTLD_GLOBAL will be used and then it is not possible to
7499 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007500 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007501 */
7502
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007503 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007504 {
7505 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007506 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007507 if (pylib != 0)
7508 {
7509 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7510 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7511 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7512 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7513 (*pfx)(prefix);
7514 (*init)();
7515 needed = (*simple)("import termios") == -1;
7516 (*final)();
7517 dlclose(pylib);
7518 }
7519 return !needed;
7520 }
7521
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007522 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007523 {
7524 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007525 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007526 not_needed = 1;
7527 return !not_needed;
7528 }
7529_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007530if ac_fn_c_try_run "$LINENO"
7531then :
7532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7533printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007534
Illia Bobyra96d5442023-08-30 16:30:15 +02007535else $as_nop
7536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537printf "%s\n" "no" >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007538fi
7539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7540 conftest.$ac_objext conftest.beam conftest.$ac_ext
7541fi
7542
7543
7544 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007545 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007546
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007547 PYTHON_SRC="if_python.c"
7548 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007549 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007550 PYTHON_LIBS=
7551 PYTHON3_SRC="if_python3.c"
7552 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007553 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007554 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007555elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007556 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007557
7558 PYTHON_SRC="if_python.c"
7559 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007560 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007561 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007562elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7564printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007565 cflags_save=$CFLAGS
7566 libs_save=$LIBS
7567 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7568 LIBS="$LIBS $PYTHON_LIBS"
7569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7570/* end confdefs.h. */
7571
7572int
Illia Bobyra96d5442023-08-30 16:30:15 +02007573main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007574{
7575
7576 ;
7577 return 0;
7578}
7579_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007580if ac_fn_c_try_link "$LINENO"
7581then :
7582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7583printf "%s\n" "yes" >&6; }; fpie_ok=yes
7584else $as_nop
7585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7586printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007587fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007588rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007589 conftest$ac_exeext conftest.$ac_ext
7590 CFLAGS=$cflags_save
7591 LIBS=$libs_save
7592 if test $fpie_ok = yes; then
7593 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7594 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007595elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007596 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007597
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007598 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007599 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007600
7601 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007602 PYTHON3_SRC="if_python3.c"
7603 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007604 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007605 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007606elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7608printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007609 cflags_save=$CFLAGS
7610 libs_save=$LIBS
7611 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7612 LIBS="$LIBS $PYTHON3_LIBS"
7613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7614/* end confdefs.h. */
7615
7616int
Illia Bobyra96d5442023-08-30 16:30:15 +02007617main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007618{
7619
7620 ;
7621 return 0;
7622}
7623_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007624if ac_fn_c_try_link "$LINENO"
7625then :
7626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7627printf "%s\n" "yes" >&6; }; fpie_ok=yes
7628else $as_nop
7629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007631fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007632rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007633 conftest$ac_exeext conftest.$ac_ext
7634 CFLAGS=$cflags_save
7635 LIBS=$libs_save
7636 if test $fpie_ok = yes; then
7637 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7638 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007639fi
7640
Illia Bobyra96d5442023-08-30 16:30:15 +02007641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7642printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007643# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007644if test ${enable_tclinterp+y}
7645then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007646 enableval=$enable_tclinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007647else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007648 enable_tclinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007649fi
7650
Illia Bobyra96d5442023-08-30 16:30:15 +02007651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7652printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007653
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007654if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007655
Illia Bobyra96d5442023-08-30 16:30:15 +02007656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7657printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007658
Bram Moolenaar446cb832008-06-24 21:56:24 +00007659# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007660if test ${with_tclsh+y}
7661then :
7662 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7663printf "%s\n" "$tclsh_name" >&6; }
7664else $as_nop
7665 tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7666printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007667fi
7668
Bram Moolenaar071d4272004-06-13 20:20:40 +00007669 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7670set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7672printf %s "checking for $ac_word... " >&6; }
7673if test ${ac_cv_path_vi_cv_path_tcl+y}
7674then :
7675 printf %s "(cached) " >&6
7676else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007677 case $vi_cv_path_tcl in
7678 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007679 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7680 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007681 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007686 case $as_dir in #(((
7687 '') as_dir=./ ;;
7688 */) ;;
7689 *) as_dir=$as_dir/ ;;
7690 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007691 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007692 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7693 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7694 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007695 break 2
7696 fi
7697done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007698 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007699IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007700
Bram Moolenaar071d4272004-06-13 20:20:40 +00007701 ;;
7702esac
7703fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007704vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007705if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7707printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007708else
Illia Bobyra96d5442023-08-30 16:30:15 +02007709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7710printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007711fi
7712
Bram Moolenaar071d4272004-06-13 20:20:40 +00007713
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007714
Bram Moolenaar446cb832008-06-24 21:56:24 +00007715
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007716 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7717 tclsh_name="tclsh8.4"
7718 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7719set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7721printf %s "checking for $ac_word... " >&6; }
7722if test ${ac_cv_path_vi_cv_path_tcl+y}
7723then :
7724 printf %s "(cached) " >&6
7725else $as_nop
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007726 case $vi_cv_path_tcl in
7727 [\\/]* | ?:[\\/]*)
7728 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7729 ;;
7730 *)
7731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7732for as_dir in $PATH
7733do
7734 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007735 case $as_dir in #(((
7736 '') as_dir=./ ;;
7737 */) ;;
7738 *) as_dir=$as_dir/ ;;
7739 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007740 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007741 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7742 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7743 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007744 break 2
7745 fi
7746done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007747 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007748IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007749
7750 ;;
7751esac
7752fi
7753vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007754if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7756printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007757else
Illia Bobyra96d5442023-08-30 16:30:15 +02007758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7759printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007760fi
7761
Bram Moolenaar446cb832008-06-24 21:56:24 +00007762
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007763 fi
7764 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007765 tclsh_name="tclsh8.2"
7766 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7767set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007768{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769printf %s "checking for $ac_word... " >&6; }
7770if test ${ac_cv_path_vi_cv_path_tcl+y}
7771then :
7772 printf %s "(cached) " >&6
7773else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007774 case $vi_cv_path_tcl in
7775 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007776 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7777 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007778 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780for as_dir in $PATH
7781do
7782 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007783 case $as_dir in #(((
7784 '') as_dir=./ ;;
7785 */) ;;
7786 *) as_dir=$as_dir/ ;;
7787 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007788 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007789 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7790 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7791 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007792 break 2
7793 fi
7794done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007795 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007796IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007797
Bram Moolenaar071d4272004-06-13 20:20:40 +00007798 ;;
7799esac
7800fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007801vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007802if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7804printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007805else
Illia Bobyra96d5442023-08-30 16:30:15 +02007806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7807printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007808fi
7809
Bram Moolenaar446cb832008-06-24 21:56:24 +00007810
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007811 fi
7812 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7813 tclsh_name="tclsh8.0"
7814 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7815set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007816{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817printf %s "checking for $ac_word... " >&6; }
7818if test ${ac_cv_path_vi_cv_path_tcl+y}
7819then :
7820 printf %s "(cached) " >&6
7821else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007822 case $vi_cv_path_tcl in
7823 [\\/]* | ?:[\\/]*)
7824 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7825 ;;
7826 *)
7827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7828for as_dir in $PATH
7829do
7830 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007831 case $as_dir in #(((
7832 '') as_dir=./ ;;
7833 */) ;;
7834 *) as_dir=$as_dir/ ;;
7835 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007836 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007837 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7838 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7839 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007840 break 2
7841 fi
7842done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007843 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007844IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007845
7846 ;;
7847esac
7848fi
7849vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007850if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7852printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007853else
Illia Bobyra96d5442023-08-30 16:30:15 +02007854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7855printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007856fi
7857
Bram Moolenaar446cb832008-06-24 21:56:24 +00007858
Bram Moolenaar071d4272004-06-13 20:20:40 +00007859 fi
7860 if test "X$vi_cv_path_tcl" = "X"; then
7861 tclsh_name="tclsh"
7862 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7863set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007864{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7865printf %s "checking for $ac_word... " >&6; }
7866if test ${ac_cv_path_vi_cv_path_tcl+y}
7867then :
7868 printf %s "(cached) " >&6
7869else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007870 case $vi_cv_path_tcl in
7871 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007872 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7873 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007874 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7876for as_dir in $PATH
7877do
7878 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007879 case $as_dir in #(((
7880 '') as_dir=./ ;;
7881 */) ;;
7882 *) as_dir=$as_dir/ ;;
7883 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007884 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007885 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7886 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7887 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007888 break 2
7889 fi
7890done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007891 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007892IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007893
Bram Moolenaar071d4272004-06-13 20:20:40 +00007894 ;;
7895esac
7896fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007897vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007898if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7900printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007901else
Illia Bobyra96d5442023-08-30 16:30:15 +02007902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7903printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007904fi
7905
Bram Moolenaar446cb832008-06-24 21:56:24 +00007906
Bram Moolenaar071d4272004-06-13 20:20:40 +00007907 fi
7908 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7910printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007911 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007912 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02007913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7914printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00007915 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 +01007916 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007917
Illia Bobyra96d5442023-08-30 16:30:15 +02007918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7919printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007920 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00007921 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 +00007922 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007923 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 +00007924 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00007925 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00007926 for try in $tclinc; do
7927 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7929printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007930 TCL_INC=$try
7931 break
7932 fi
7933 done
7934 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7936printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007937 SKIP_TCL=YES
7938 fi
7939 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7941printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007942 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007943 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007944 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007945 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007946 tclcnf=`echo $tclinc | sed s/include/lib/g`
7947 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007948 fi
7949 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01007950 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7952printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007953 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007954 if test "$enable_tclinterp" = "dynamic"; then
7955 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7956 else
7957 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7958 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00007959 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 +00007960 break
7961 fi
7962 done
7963 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007964 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7965printf "%s\n" "<not found>" >&6; }
7966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7967printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007968 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007969 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007970 for ext in .so .a ; do
7971 for ver in "" $tclver ; do
7972 for try in $tcllib ; do
7973 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01007974 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7976printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007977 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007978 if test "$vim_cv_uname_output" = SunOS &&
7979 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007980 TCL_LIBS="$TCL_LIBS -R $try"
7981 fi
7982 break 3
7983 fi
7984 done
7985 done
7986 done
7987 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7989printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007990 SKIP_TCL=YES
7991 fi
7992 fi
7993 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007994 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007995
7996 TCL_SRC=if_tcl.c
7997 TCL_OBJ=objects/if_tcl.o
7998 TCL_PRO=if_tcl.pro
7999 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
8000 fi
8001 fi
8002 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
8004printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008005 fi
8006 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008007 if test "$enable_tclinterp" = "dynamic"; then
8008 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008009 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008010
8011 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
8012 fi
8013 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008014 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008015 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008016 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008017fi
8018
8019
8020
8021
8022
8023
ichizok8bb3fe42021-12-28 15:51:45 +00008024
Illia Bobyra96d5442023-08-30 16:30:15 +02008025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
8026printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008027# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008028if test ${enable_rubyinterp+y}
8029then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008030 enableval=$enable_rubyinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02008031else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008032 enable_rubyinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008033fi
8034
Illia Bobyra96d5442023-08-30 16:30:15 +02008035{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8036printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008037if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008038 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008039 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008040 fi
8041
Illia Bobyra96d5442023-08-30 16:30:15 +02008042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8043printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008044
Bram Moolenaar948733a2011-05-05 18:10:16 +02008045
Bram Moolenaar165641d2010-02-17 16:23:09 +01008046# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008047if test ${with_ruby_command+y}
8048then :
8049 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8050printf "%s\n" "$RUBY_CMD" >&6; }
8051else $as_nop
8052 RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8053printf "%s\n" "defaulting to $RUBY_CMD" >&6; }
Bram Moolenaar165641d2010-02-17 16:23:09 +01008054fi
8055
Bram Moolenaar165641d2010-02-17 16:23:09 +01008056 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8057set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8059printf %s "checking for $ac_word... " >&6; }
8060if test ${ac_cv_path_vi_cv_path_ruby+y}
8061then :
8062 printf %s "(cached) " >&6
8063else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008064 case $vi_cv_path_ruby in
8065 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008066 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8067 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008068 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8070for as_dir in $PATH
8071do
8072 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008073 case $as_dir in #(((
8074 '') as_dir=./ ;;
8075 */) ;;
8076 *) as_dir=$as_dir/ ;;
8077 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008078 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008079 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8080 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8081 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008082 break 2
8083 fi
8084done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008085 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008086IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008087
Bram Moolenaar071d4272004-06-13 20:20:40 +00008088 ;;
8089esac
8090fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008091vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008092if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8094printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008095else
Illia Bobyra96d5442023-08-30 16:30:15 +02008096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008098fi
8099
Bram Moolenaar446cb832008-06-24 21:56:24 +00008100
Bram Moolenaar071d4272004-06-13 20:20:40 +00008101 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8103printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008104 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 +02008105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8106printf "%s\n" "OK" >&6; }
8107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8108printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008109 ruby_rbconfig="RbConfig"
8110 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8111 ruby_rbconfig="Config"
8112 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8114printf "%s\n" "$ruby_rbconfig" >&6; }
8115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8116printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008117 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 +00008118 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8120printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008121 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008122 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8123 if test -d "$rubyarchdir"; then
8124 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008125 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008126 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008127 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008128 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008129 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008130 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008131 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008132 if test "X$rubylibs" != "X"; then
8133 RUBY_LIBS="$rubylibs"
8134 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008135 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8136 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008137 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Illia Bobyre379e212023-09-30 22:59:27 +02008138 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby" >/dev/null; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008139 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8140 elif test "$librubyarg" = "libruby.a"; then
8141 librubyarg="-lruby"
8142 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008143 fi
8144
8145 if test "X$librubyarg" != "X"; then
8146 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8147 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008148
8149
Bram Moolenaar071d4272004-06-13 20:20:40 +00008150 RUBY_SRC="if_ruby.c"
8151 RUBY_OBJ="objects/if_ruby.o"
8152 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008153 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008154
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008155 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008156 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008157 if test -z "$libruby_soname"; then
8158 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8159 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008160 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008161
Bram Moolenaar41a41412020-01-07 21:32:19 +01008162 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008163 RUBY_LIBS=
8164 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008165 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8166 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8167 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008168 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8170printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008171 fi
8172 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8174printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008175 fi
8176 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008177
8178 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008179 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008180 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008181fi
8182
8183
8184
8185
8186
8187
ichizok8bb3fe42021-12-28 15:51:45 +00008188
Illia Bobyra96d5442023-08-30 16:30:15 +02008189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8190printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008191# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008192if test ${enable_cscope+y}
8193then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008194 enableval=$enable_cscope;
Illia Bobyra96d5442023-08-30 16:30:15 +02008195else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008196 enable_cscope="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008197fi
8198
Illia Bobyra96d5442023-08-30 16:30:15 +02008199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8200printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008201if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008202 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008203
8204fi
8205
Illia Bobyra96d5442023-08-30 16:30:15 +02008206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8207printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008208# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008209if test ${enable_netbeans+y}
8210then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008211 enableval=$enable_netbeans;
Illia Bobyra96d5442023-08-30 16:30:15 +02008212else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008213 enable_netbeans="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008214fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008215
Bram Moolenaar446cb832008-06-24 21:56:24 +00008216if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008217 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8219printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008220 enable_netbeans="no"
8221 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008224 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008225else
Illia Bobyra96d5442023-08-30 16:30:15 +02008226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8227printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008228fi
8229
Illia Bobyra96d5442023-08-30 16:30:15 +02008230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8231printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008232# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008233if test ${enable_channel+y}
8234then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008235 enableval=$enable_channel;
Illia Bobyra96d5442023-08-30 16:30:15 +02008236else $as_nop
Bram Moolenaare0874f82016-01-24 20:36:41 +01008237 enable_channel="yes"
8238fi
8239
8240if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008241 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8243printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008244 enable_channel="no"
8245 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008248 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008249else
Bram Moolenaar16435482016-01-24 21:31:54 +01008250 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8252printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008253 enable_netbeans="no"
8254 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8256printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008257 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008258fi
8259
Bram Moolenaar16435482016-01-24 21:31:54 +01008260if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008261 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8263printf %s "checking for socket in -lnetwork... " >&6; }
8264if test ${ac_cv_lib_network_socket+y}
8265then :
8266 printf %s "(cached) " >&6
8267else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008268 ac_check_lib_save_LIBS=$LIBS
8269LIBS="-lnetwork $LIBS"
8270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8271/* end confdefs.h. */
8272
8273/* Override any GCC internal prototype to avoid an error.
8274 Use char because int might match the return type of a GCC
8275 builtin and then its argument prototype would still apply. */
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008276char socket ();
8277int
Illia Bobyra96d5442023-08-30 16:30:15 +02008278main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008279{
8280return socket ();
8281 ;
8282 return 0;
8283}
8284_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008285if ac_fn_c_try_link "$LINENO"
8286then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008287 ac_cv_lib_network_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008288else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008289 ac_cv_lib_network_socket=no
8290fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008291rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008292 conftest$ac_exeext conftest.$ac_ext
8293LIBS=$ac_check_lib_save_LIBS
8294fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8296printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8297if test "x$ac_cv_lib_network_socket" = xyes
8298then :
8299 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008300
8301 LIBS="-lnetwork $LIBS"
8302
8303fi
8304
8305 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8307printf %s "checking for socket in -lsocket... " >&6; }
8308if test ${ac_cv_lib_socket_socket+y}
8309then :
8310 printf %s "(cached) " >&6
8311else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008312 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008313LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008315/* end confdefs.h. */
8316
Bram Moolenaar446cb832008-06-24 21:56:24 +00008317/* Override any GCC internal prototype to avoid an error.
8318 Use char because int might match the return type of a GCC
8319 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008320char socket ();
8321int
Illia Bobyra96d5442023-08-30 16:30:15 +02008322main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008323{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008324return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008325 ;
8326 return 0;
8327}
8328_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008329if ac_fn_c_try_link "$LINENO"
8330then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008331 ac_cv_lib_socket_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008332else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008333 ac_cv_lib_socket_socket=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008334fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008335rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008336 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008337LIBS=$ac_check_lib_save_LIBS
8338fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8340printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8341if test "x$ac_cv_lib_socket_socket" = xyes
8342then :
8343 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008344
8345 LIBS="-lsocket $LIBS"
8346
Bram Moolenaar071d4272004-06-13 20:20:40 +00008347fi
8348
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008349 fi
8350
Illia Bobyra96d5442023-08-30 16:30:15 +02008351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8352printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8353if test ${vim_cv_ipv6_networking+y}
8354then :
8355 printf %s "(cached) " >&6
8356else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8358/* end confdefs.h. */
8359
8360#include <stdio.h>
8361#include <stdlib.h>
8362#include <stdarg.h>
8363#include <fcntl.h>
8364#include <netdb.h>
8365#include <netinet/in.h>
8366#include <errno.h>
8367#include <sys/types.h>
8368#include <sys/socket.h>
8369 /* Check bitfields */
8370 struct nbbuf {
8371 unsigned int initDone:1;
8372 unsigned short signmaplen;
8373 };
8374
8375int
Illia Bobyra96d5442023-08-30 16:30:15 +02008376main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008377{
8378
8379 /* Check creating a socket. */
8380 struct sockaddr_in server;
8381 struct addrinfo *res;
8382 (void)socket(AF_INET, SOCK_STREAM, 0);
8383 (void)htons(100);
8384 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8385 if (errno == ECONNREFUSED)
8386 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8387 (void)freeaddrinfo(res);
8388
8389 ;
8390 return 0;
8391}
8392_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008393if ac_fn_c_try_link "$LINENO"
8394then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008395 vim_cv_ipv6_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008396else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008397 vim_cv_ipv6_networking="no"
8398fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008399rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008400 conftest$ac_exeext conftest.$ac_ext
8401fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008402{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8403printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008404
8405 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008406 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008407
Illia Bobyra96d5442023-08-30 16:30:15 +02008408 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8409if test "x$ac_cv_func_inet_ntop" = xyes
8410then :
8411 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008412
8413fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008414
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008415 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8417printf %s "checking for gethostbyname in -lnsl... " >&6; }
8418if test ${ac_cv_lib_nsl_gethostbyname+y}
8419then :
8420 printf %s "(cached) " >&6
8421else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008422 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008423LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008425/* end confdefs.h. */
8426
Bram Moolenaar446cb832008-06-24 21:56:24 +00008427/* Override any GCC internal prototype to avoid an error.
8428 Use char because int might match the return type of a GCC
8429 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008430char gethostbyname ();
8431int
Illia Bobyra96d5442023-08-30 16:30:15 +02008432main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008433{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008434return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008435 ;
8436 return 0;
8437}
8438_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008439if ac_fn_c_try_link "$LINENO"
8440then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008441 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008442else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008443 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008444fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008445rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008446 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008447LIBS=$ac_check_lib_save_LIBS
8448fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8450printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8451if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8452then :
8453 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008454
8455 LIBS="-lnsl $LIBS"
8456
Bram Moolenaar071d4272004-06-13 20:20:40 +00008457fi
8458
Illia Bobyra96d5442023-08-30 16:30:15 +02008459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8460printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8461if test ${vim_cv_ipv4_networking+y}
8462then :
8463 printf %s "(cached) " >&6
8464else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008466/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008467
8468#include <stdio.h>
8469#include <stdlib.h>
8470#include <stdarg.h>
8471#include <fcntl.h>
8472#include <netdb.h>
8473#include <netinet/in.h>
8474#include <errno.h>
8475#include <sys/types.h>
8476#include <sys/socket.h>
8477 /* Check bitfields */
8478 struct nbbuf {
8479 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008480 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008481 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008482
8483int
Illia Bobyra96d5442023-08-30 16:30:15 +02008484main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008485{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008486
8487 /* Check creating a socket. */
8488 struct sockaddr_in server;
8489 (void)socket(AF_INET, SOCK_STREAM, 0);
8490 (void)htons(100);
8491 (void)gethostbyname("microsoft.com");
8492 if (errno == ECONNREFUSED)
8493 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008494
8495 ;
8496 return 0;
8497}
8498_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008499if ac_fn_c_try_link "$LINENO"
8500then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008501 vim_cv_ipv4_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008502else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008503 vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008504fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008505rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008506 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00008507fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8509printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008510 fi
8511fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008512if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008513 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008514
8515 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008516
Bram Moolenaar071d4272004-06-13 20:20:40 +00008517 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008518
Bram Moolenaar071d4272004-06-13 20:20:40 +00008519fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008520if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008521 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008522
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008523 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008524
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008525 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008526
8527fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008528
Illia Bobyra96d5442023-08-30 16:30:15 +02008529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8530printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008531# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008532if test ${enable_terminal+y}
8533then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008534 enableval=$enable_terminal;
Illia Bobyra96d5442023-08-30 16:30:15 +02008535else $as_nop
Bram Moolenaar595a4022017-09-03 19:15:57 +02008536 enable_terminal="auto"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008537fi
8538
Bram Moolenaar595a4022017-09-03 19:15:57 +02008539if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008540 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8542printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008543 enable_terminal="no"
8544 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008545 if test "$enable_terminal" = "auto"; then
8546 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8548printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008549 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8551printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008552 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008553 fi
8554else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008555 if test "$enable_terminal" = "auto"; then
8556 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8558printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008559 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8561printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008562 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008563fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008564if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008565 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008566
Bram Moolenaar93268052019-10-10 13:22:54 +02008567 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 +02008568
Bram Moolenaar93268052019-10-10 13:22:54 +02008569 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 +02008570
Bram Moolenaar823edd12019-10-23 22:35:36 +02008571 TERM_TEST="test_libvterm"
8572
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008573fi
8574
Illia Bobyra96d5442023-08-30 16:30:15 +02008575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8576printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008577# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008578if test ${enable_autoservername+y}
8579then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008580 enableval=$enable_autoservername;
Illia Bobyra96d5442023-08-30 16:30:15 +02008581else $as_nop
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008582 enable_autoservername="no"
8583fi
8584
Illia Bobyra96d5442023-08-30 16:30:15 +02008585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8586printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008587if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008588 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008589
8590fi
8591
Illia Bobyra96d5442023-08-30 16:30:15 +02008592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8593printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008594# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008595if test ${enable_multibyte+y}
8596then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008597 enableval=$enable_multibyte;
Illia Bobyra96d5442023-08-30 16:30:15 +02008598else $as_nop
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008599 enable_multibyte="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008600fi
8601
Illia Bobyra96d5442023-08-30 16:30:15 +02008602{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8603printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008604if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008605 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8606 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008607fi
8608
Illia Bobyra96d5442023-08-30 16:30:15 +02008609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8610printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008611# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008612if test ${enable_rightleft+y}
8613then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008614 enableval=$enable_rightleft;
Illia Bobyra96d5442023-08-30 16:30:15 +02008615else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008616 enable_rightleft="yes"
8617fi
8618
8619if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8621printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008622else
Illia Bobyra96d5442023-08-30 16:30:15 +02008623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8624printf "%s\n" "yes" >&6; }
8625 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008626
8627fi
8628
Illia Bobyra96d5442023-08-30 16:30:15 +02008629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8630printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008631# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008632if test ${enable_arabic+y}
8633then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008634 enableval=$enable_arabic;
Illia Bobyra96d5442023-08-30 16:30:15 +02008635else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008636 enable_arabic="yes"
8637fi
8638
8639if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8641printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008642else
Illia Bobyra96d5442023-08-30 16:30:15 +02008643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8644printf "%s\n" "yes" >&6; }
8645 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008646
8647fi
8648
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008649# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008650if test ${enable_farsi+y}
8651then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008652 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008653fi
8654
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008655
Illia Bobyra96d5442023-08-30 16:30:15 +02008656{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8657printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008658# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008659if test ${enable_xim+y}
8660then :
8661 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8662printf "%s\n" "$enable_xim" >&6; }
8663else $as_nop
8664 enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8665printf "%s\n" "defaulting to auto" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008666fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008667
Bram Moolenaar446cb832008-06-24 21:56:24 +00008668
Illia Bobyra96d5442023-08-30 16:30:15 +02008669{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8670printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008671# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008672if test ${enable_fontset+y}
8673then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008674 enableval=$enable_fontset;
Illia Bobyra96d5442023-08-30 16:30:15 +02008675else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008676 enable_fontset="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008677fi
8678
Illia Bobyra96d5442023-08-30 16:30:15 +02008679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8680printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008681
8682test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02008683test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00008684if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8686printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008687else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008688
Bram Moolenaar071d4272004-06-13 20:20:40 +00008689 # Extract the first word of "xmkmf", so it can be a program name with args.
8690set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8692printf %s "checking for $ac_word... " >&6; }
8693if test ${ac_cv_path_xmkmfpath+y}
8694then :
8695 printf %s "(cached) " >&6
8696else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008697 case $xmkmfpath in
8698 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008699 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8700 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008701 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008706 case $as_dir in #(((
8707 '') as_dir=./ ;;
8708 */) ;;
8709 *) as_dir=$as_dir/ ;;
8710 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008711 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008712 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8713 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
8714 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008715 break 2
8716 fi
8717done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008718 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008719IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008720
Bram Moolenaar071d4272004-06-13 20:20:40 +00008721 ;;
8722esac
8723fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008724xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00008725if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8727printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008728else
Illia Bobyra96d5442023-08-30 16:30:15 +02008729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008731fi
8732
8733
Bram Moolenaar446cb832008-06-24 21:56:24 +00008734
Illia Bobyra96d5442023-08-30 16:30:15 +02008735 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8736printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008737
Bram Moolenaar071d4272004-06-13 20:20:40 +00008738
Bram Moolenaar446cb832008-06-24 21:56:24 +00008739# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008740if test ${with_x+y}
8741then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008742 withval=$with_x;
8743fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008744
8745# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8746if test "x$with_x" = xno; then
8747 # The user explicitly disabled X.
8748 have_x=disabled
8749else
Bram Moolenaar446cb832008-06-24 21:56:24 +00008750 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01008751 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008752 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8753then :
8754 printf %s "(cached) " >&6
8755else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008756 # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02008757ac_x_includes=no
8758ac_x_libraries=no
8759# Do we need to do anything special at all?
8760ac_save_LIBS=$LIBS
8761LIBS="-lX11 $LIBS"
8762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8763/* end confdefs.h. */
8764#include <X11/Xlib.h>
8765int
8766main (void)
8767{
8768XrmInitialize ()
8769 ;
8770 return 0;
8771}
8772_ACEOF
8773if ac_fn_c_try_link "$LINENO"
8774then :
8775 # We can compile and link X programs with no special options.
8776 ac_x_includes=
8777 ac_x_libraries=
8778fi
8779rm -f core conftest.err conftest.$ac_objext conftest.beam \
8780 conftest$ac_exeext conftest.$ac_ext
8781LIBS="$ac_save_LIBS"
8782# If that didn't work, only try xmkmf and file system searches
8783# for native compilation.
8784if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8785then :
8786 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008787if mkdir conftest.dir; then
8788 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008789 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00008790incroot:
8791 @echo incroot='${INCROOT}'
8792usrlibdir:
8793 @echo usrlibdir='${USRLIBDIR}'
8794libdir:
8795 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008796_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00008797 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008798 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008799 for ac_var in incroot usrlibdir libdir; do
8800 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8801 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008802 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008803 for ac_extension in a so sl dylib la dll; do
8804 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8805 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008806 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00008807 fi
8808 done
8809 # Screen out bogus values from the imake configuration. They are
8810 # bogus both because they are the default anyway, and because
8811 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008812 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00008813 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008814 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008815 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008816 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00008817 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008818 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008819 esac
8820 fi
8821 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00008822 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00008823fi
8824
Illia Bobyra96d5442023-08-30 16:30:15 +02008825 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008826# Check X11 before X11Rn because it is often a symlink to the current release.
8827ac_x_header_dirs='
8828/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008829/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008830/usr/X11R6/include
8831/usr/X11R5/include
8832/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00008833
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008834/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008835/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008836/usr/include/X11R6
8837/usr/include/X11R5
8838/usr/include/X11R4
8839
8840/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008841/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008842/usr/local/X11R6/include
8843/usr/local/X11R5/include
8844/usr/local/X11R4/include
8845
8846/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008847/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008848/usr/local/include/X11R6
8849/usr/local/include/X11R5
8850/usr/local/include/X11R4
8851
Illia Bobyra96d5442023-08-30 16:30:15 +02008852/opt/X11/include
8853
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008854/usr/X386/include
8855/usr/x386/include
8856/usr/XFree86/include/X11
8857
8858/usr/include
8859/usr/local/include
8860/usr/unsupported/include
8861/usr/athena/include
8862/usr/local/x11r5/include
8863/usr/lpp/Xamples/include
8864
8865/usr/openwin/include
8866/usr/openwin/share/include'
8867
8868if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008869 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008870 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008872/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008873#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008874_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008875if ac_fn_c_try_cpp "$LINENO"
8876then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00008877 # We can compile using X headers with no special include directory.
8878ac_x_includes=
Illia Bobyra96d5442023-08-30 16:30:15 +02008879else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008880 for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00008881 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008882 ac_x_includes=$ac_dir
8883 break
8884 fi
8885done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008886fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01008887rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008888fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008889
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008890if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008891 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008892 # See if we find them without any special options.
8893 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008894 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00008895 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008897/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008898#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008899int
Illia Bobyra96d5442023-08-30 16:30:15 +02008900main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008901{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008902XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008903 ;
8904 return 0;
8905}
8906_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008907if ac_fn_c_try_link "$LINENO"
8908then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008909 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008910# We can link X programs with no special library path.
8911ac_x_libraries=
Illia Bobyra96d5442023-08-30 16:30:15 +02008912else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008913 LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02008914for 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 +00008915do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008916 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00008917 for ac_extension in a so sl dylib la dll; do
8918 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008919 ac_x_libraries=$ac_dir
8920 break 2
8921 fi
8922 done
8923done
8924fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008925rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008926 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008927fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008928
Illia Bobyra96d5442023-08-30 16:30:15 +02008929fi
8930# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008931case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008932 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008933 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02008934 ac_cv_have_x="have_x=no" ;; #(
8935 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008936 # Record where we found X for the cache.
8937 ac_cv_have_x="have_x=yes\
8938 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02008939 ac_x_libraries='$ac_x_libraries'" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00008940esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008941fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00008942;; #(
8943 *) have_x=yes;;
8944 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008945 eval "$ac_cv_have_x"
8946fi # $with_x != no
8947
8948if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8950printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008951 no_x=yes
8952else
8953 # If each of the values was on the command line, it overrides each guess.
8954 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8955 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8956 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008957 ac_cv_have_x="have_x=yes\
8958 ac_x_includes='$x_includes'\
8959 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02008960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8961printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008962fi
8963
8964if test "$no_x" = yes; then
8965 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008966
Illia Bobyra96d5442023-08-30 16:30:15 +02008967printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008968
8969 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8970else
8971 if test -n "$x_includes"; then
8972 X_CFLAGS="$X_CFLAGS -I$x_includes"
8973 fi
8974
8975 # It would also be nice to do this for all -L options, not just this one.
8976 if test -n "$x_libraries"; then
8977 X_LIBS="$X_LIBS -L$x_libraries"
8978 # For Solaris; some versions of Sun CC require a space after -R and
8979 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02008980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8981printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008982 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8983 ac_xsave_c_werror_flag=$ac_c_werror_flag
8984 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008986/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008987
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008988int
Illia Bobyra96d5442023-08-30 16:30:15 +02008989main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008990{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008991
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008992 ;
8993 return 0;
8994}
8995_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008996if ac_fn_c_try_link "$LINENO"
8997then :
8998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009000 X_LIBS="$X_LIBS -R$x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009001else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009002 LIBS="$ac_xsave_LIBS -R $x_libraries"
9003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009004/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009005
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009006int
Illia Bobyra96d5442023-08-30 16:30:15 +02009007main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009008{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009009
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009010 ;
9011 return 0;
9012}
9013_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009014if ac_fn_c_try_link "$LINENO"
9015then :
9016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9017printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009018 X_LIBS="$X_LIBS -R $x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009019else $as_nop
9020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
9021printf "%s\n" "neither works" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009022fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009023rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009024 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009025fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009026rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009027 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009028 ac_c_werror_flag=$ac_xsave_c_werror_flag
9029 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009030 fi
9031
9032 # Check for system-dependent libraries X programs must link with.
9033 # Do this before checking for the system-independent R6 libraries
9034 # (-lICE), since we may need -lsocket or whatever for X linking.
9035
9036 if test "$ISC" = yes; then
9037 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9038 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009039 # Martyn Johnson says this is needed for Ultrix, if the X
9040 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009041 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009042 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009044/* end confdefs.h. */
9045
Bram Moolenaar446cb832008-06-24 21:56:24 +00009046/* Override any GCC internal prototype to avoid an error.
9047 Use char because int might match the return type of a GCC
9048 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009049char XOpenDisplay ();
9050int
Illia Bobyra96d5442023-08-30 16:30:15 +02009051main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009052{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009053return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009054 ;
9055 return 0;
9056}
9057_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009058if ac_fn_c_try_link "$LINENO"
9059then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009060
Illia Bobyra96d5442023-08-30 16:30:15 +02009061else $as_nop
9062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9063printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9064if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9065then :
9066 printf %s "(cached) " >&6
9067else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009068 ac_check_lib_save_LIBS=$LIBS
9069LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009071/* end confdefs.h. */
9072
Bram Moolenaar446cb832008-06-24 21:56:24 +00009073/* Override any GCC internal prototype to avoid an error.
9074 Use char because int might match the return type of a GCC
9075 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009076char dnet_ntoa ();
9077int
Illia Bobyra96d5442023-08-30 16:30:15 +02009078main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009079{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009080return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009081 ;
9082 return 0;
9083}
9084_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009085if ac_fn_c_try_link "$LINENO"
9086then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009087 ac_cv_lib_dnet_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009088else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009089 ac_cv_lib_dnet_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009090fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009091rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009092 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009093LIBS=$ac_check_lib_save_LIBS
9094fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9096printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9097if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9098then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009099 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009100fi
9101
9102 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9104printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9105if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9106then :
9107 printf %s "(cached) " >&6
9108else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009109 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009110LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009112/* end confdefs.h. */
9113
Bram Moolenaar446cb832008-06-24 21:56:24 +00009114/* Override any GCC internal prototype to avoid an error.
9115 Use char because int might match the return type of a GCC
9116 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009117char dnet_ntoa ();
9118int
Illia Bobyra96d5442023-08-30 16:30:15 +02009119main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009120{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009121return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009122 ;
9123 return 0;
9124}
9125_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009126if ac_fn_c_try_link "$LINENO"
9127then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009128 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009129else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009130 ac_cv_lib_dnet_stub_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009131fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009132rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009133 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009134LIBS=$ac_check_lib_save_LIBS
9135fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9137printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9138if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9139then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009140 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009141fi
9142
9143 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009144fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009145rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009146 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009147 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009148
9149 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9150 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009151 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009152 # needs -lnsl.
9153 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009154 # on Irix 5.2, according to T.E. Dickey.
9155 # The functions gethostbyname, getservbyname, and inet_addr are
9156 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009157 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009158if test "x$ac_cv_func_gethostbyname" = xyes
9159then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009160
Bram Moolenaar071d4272004-06-13 20:20:40 +00009161fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009162
Bram Moolenaar071d4272004-06-13 20:20:40 +00009163 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9165printf %s "checking for gethostbyname in -lnsl... " >&6; }
9166if test ${ac_cv_lib_nsl_gethostbyname+y}
9167then :
9168 printf %s "(cached) " >&6
9169else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009170 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009171LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009173/* end confdefs.h. */
9174
Bram Moolenaar446cb832008-06-24 21:56:24 +00009175/* Override any GCC internal prototype to avoid an error.
9176 Use char because int might match the return type of a GCC
9177 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009178char gethostbyname ();
9179int
Illia Bobyra96d5442023-08-30 16:30:15 +02009180main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009181{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009182return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009183 ;
9184 return 0;
9185}
9186_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009187if ac_fn_c_try_link "$LINENO"
9188then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009189 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009190else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009191 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009192fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009193rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009194 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009195LIBS=$ac_check_lib_save_LIBS
9196fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9198printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9199if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9200then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009201 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009202fi
9203
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009204 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9206printf %s "checking for gethostbyname in -lbsd... " >&6; }
9207if test ${ac_cv_lib_bsd_gethostbyname+y}
9208then :
9209 printf %s "(cached) " >&6
9210else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009211 ac_check_lib_save_LIBS=$LIBS
9212LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009214/* end confdefs.h. */
9215
Bram Moolenaar446cb832008-06-24 21:56:24 +00009216/* Override any GCC internal prototype to avoid an error.
9217 Use char because int might match the return type of a GCC
9218 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009219char gethostbyname ();
9220int
Illia Bobyra96d5442023-08-30 16:30:15 +02009221main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009222{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009223return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009224 ;
9225 return 0;
9226}
9227_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009228if ac_fn_c_try_link "$LINENO"
9229then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009230 ac_cv_lib_bsd_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009231else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009232 ac_cv_lib_bsd_gethostbyname=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009233fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009234rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009235 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009236LIBS=$ac_check_lib_save_LIBS
9237fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9239printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9240if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9241then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009242 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9243fi
9244
9245 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009246 fi
9247
9248 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9249 # socket/setsockopt and other routines are undefined under SCO ODT
9250 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009251 # on later versions), says Simon Leinen: it contains gethostby*
9252 # variants that don't use the name server (or something). -lsocket
9253 # must be given before -lnsl if both are needed. We assume that
9254 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009255 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009256if test "x$ac_cv_func_connect" = xyes
9257then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009258
Bram Moolenaar071d4272004-06-13 20:20:40 +00009259fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009260
Bram Moolenaar071d4272004-06-13 20:20:40 +00009261 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9263printf %s "checking for connect in -lsocket... " >&6; }
9264if test ${ac_cv_lib_socket_connect+y}
9265then :
9266 printf %s "(cached) " >&6
9267else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009268 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009269LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009271/* end confdefs.h. */
9272
Bram Moolenaar446cb832008-06-24 21:56:24 +00009273/* Override any GCC internal prototype to avoid an error.
9274 Use char because int might match the return type of a GCC
9275 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009276char connect ();
9277int
Illia Bobyra96d5442023-08-30 16:30:15 +02009278main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009279{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009280return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009281 ;
9282 return 0;
9283}
9284_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009285if ac_fn_c_try_link "$LINENO"
9286then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009287 ac_cv_lib_socket_connect=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009288else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009289 ac_cv_lib_socket_connect=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009290fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009291rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009292 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009293LIBS=$ac_check_lib_save_LIBS
9294fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009295{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9296printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9297if test "x$ac_cv_lib_socket_connect" = xyes
9298then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009299 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009300fi
9301
9302 fi
9303
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009304 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009305 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009306if test "x$ac_cv_func_remove" = xyes
9307then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009308
Bram Moolenaar071d4272004-06-13 20:20:40 +00009309fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009310
Bram Moolenaar071d4272004-06-13 20:20:40 +00009311 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9313printf %s "checking for remove in -lposix... " >&6; }
9314if test ${ac_cv_lib_posix_remove+y}
9315then :
9316 printf %s "(cached) " >&6
9317else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009318 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009319LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009321/* end confdefs.h. */
9322
Bram Moolenaar446cb832008-06-24 21:56:24 +00009323/* Override any GCC internal prototype to avoid an error.
9324 Use char because int might match the return type of a GCC
9325 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009326char remove ();
9327int
Illia Bobyra96d5442023-08-30 16:30:15 +02009328main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009329{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009330return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009331 ;
9332 return 0;
9333}
9334_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009335if ac_fn_c_try_link "$LINENO"
9336then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009337 ac_cv_lib_posix_remove=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009338else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009339 ac_cv_lib_posix_remove=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009340fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009341rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009342 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009343LIBS=$ac_check_lib_save_LIBS
9344fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9346printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9347if test "x$ac_cv_lib_posix_remove" = xyes
9348then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009349 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009350fi
9351
9352 fi
9353
9354 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009355 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009356if test "x$ac_cv_func_shmat" = xyes
9357then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009358
Bram Moolenaar071d4272004-06-13 20:20:40 +00009359fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009360
Bram Moolenaar071d4272004-06-13 20:20:40 +00009361 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9363printf %s "checking for shmat in -lipc... " >&6; }
9364if test ${ac_cv_lib_ipc_shmat+y}
9365then :
9366 printf %s "(cached) " >&6
9367else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009368 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009369LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009371/* end confdefs.h. */
9372
Bram Moolenaar446cb832008-06-24 21:56:24 +00009373/* Override any GCC internal prototype to avoid an error.
9374 Use char because int might match the return type of a GCC
9375 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009376char shmat ();
9377int
Illia Bobyra96d5442023-08-30 16:30:15 +02009378main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009379{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009380return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009381 ;
9382 return 0;
9383}
9384_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009385if ac_fn_c_try_link "$LINENO"
9386then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009387 ac_cv_lib_ipc_shmat=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009388else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009389 ac_cv_lib_ipc_shmat=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009390fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009391rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009392 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009393LIBS=$ac_check_lib_save_LIBS
9394fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9396printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9397if test "x$ac_cv_lib_ipc_shmat" = xyes
9398then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009399 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009400fi
9401
9402 fi
9403 fi
9404
9405 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009406 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009407 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9408 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9409 # check for ICE first), but we must link in the order -lSM -lICE or
9410 # we get undefined symbols. So assume we have SM if we have ICE.
9411 # These have to be linked with before -lX11, unlike the other
9412 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009413 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9415printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9416if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9417then :
9418 printf %s "(cached) " >&6
9419else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009420 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009421LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009423/* end confdefs.h. */
9424
Bram Moolenaar446cb832008-06-24 21:56:24 +00009425/* Override any GCC internal prototype to avoid an error.
9426 Use char because int might match the return type of a GCC
9427 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009428char IceConnectionNumber ();
9429int
Illia Bobyra96d5442023-08-30 16:30:15 +02009430main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009431{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009432return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009433 ;
9434 return 0;
9435}
9436_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009437if ac_fn_c_try_link "$LINENO"
9438then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009439 ac_cv_lib_ICE_IceConnectionNumber=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009440else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009441 ac_cv_lib_ICE_IceConnectionNumber=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009442fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009443rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009444 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009445LIBS=$ac_check_lib_save_LIBS
9446fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9448printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9449if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9450then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009451 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009452fi
9453
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009454 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009455
9456fi
9457
9458
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009459 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009460 CFLAGS="$CFLAGS -W c,dll"
9461 LDFLAGS="$LDFLAGS -W l,dll"
9462 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9463 fi
9464
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009465
Bram Moolenaar071d4272004-06-13 20:20:40 +00009466 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9467 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9469printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009470 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009471 if test "$vim_cv_uname_output" = SunOS &&
9472 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009473 X_LIBS="$X_LIBS -R $x_libraries"
9474 fi
9475 fi
9476
9477 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9478 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9480printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009481 X_CFLAGS="$X_CFLAGS -I$x_includes"
9482 fi
9483
9484 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9485 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9486 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9487
9488
Illia Bobyra96d5442023-08-30 16:30:15 +02009489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9490printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009491 cflags_save=$CFLAGS
9492 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009494/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009495#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009496#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009497int
Illia Bobyra96d5442023-08-30 16:30:15 +02009498main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009499{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009500
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009501 ;
9502 return 0;
9503}
9504_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009505if ac_fn_c_try_compile "$LINENO"
9506then :
9507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9508printf "%s\n" "yes" >&6; }
9509else $as_nop
9510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511printf "%s\n" "no" >&6; }; no_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009512fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009513rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009514 CFLAGS=$cflags_save
9515
9516 if test "${no_x-no}" = yes; then
9517 with_x=no
9518 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009519 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009520
9521 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009522
Bram Moolenaar071d4272004-06-13 20:20:40 +00009523
9524 ac_save_LDFLAGS="$LDFLAGS"
9525 LDFLAGS="-L$x_libraries $LDFLAGS"
9526
Illia Bobyra96d5442023-08-30 16:30:15 +02009527 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9528printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9529if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9530then :
9531 printf %s "(cached) " >&6
9532else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009533 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009534LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009536/* end confdefs.h. */
9537
Bram Moolenaar446cb832008-06-24 21:56:24 +00009538/* Override any GCC internal prototype to avoid an error.
9539 Use char because int might match the return type of a GCC
9540 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009541char _XdmcpAuthDoIt ();
9542int
Illia Bobyra96d5442023-08-30 16:30:15 +02009543main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009544{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009545return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009546 ;
9547 return 0;
9548}
9549_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009550if ac_fn_c_try_link "$LINENO"
9551then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009552 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009553else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009554 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009555fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009556rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009557 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009558LIBS=$ac_check_lib_save_LIBS
9559fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9561printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9562if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
9563then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009564 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009565fi
9566
9567
Illia Bobyra96d5442023-08-30 16:30:15 +02009568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9569printf %s "checking for IceOpenConnection in -lICE... " >&6; }
9570if test ${ac_cv_lib_ICE_IceOpenConnection+y}
9571then :
9572 printf %s "(cached) " >&6
9573else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009574 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009575LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009577/* end confdefs.h. */
9578
Bram Moolenaar446cb832008-06-24 21:56:24 +00009579/* Override any GCC internal prototype to avoid an error.
9580 Use char because int might match the return type of a GCC
9581 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009582char IceOpenConnection ();
9583int
Illia Bobyra96d5442023-08-30 16:30:15 +02009584main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009585{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009586return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009587 ;
9588 return 0;
9589}
9590_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009591if ac_fn_c_try_link "$LINENO"
9592then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009593 ac_cv_lib_ICE_IceOpenConnection=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009594else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009595 ac_cv_lib_ICE_IceOpenConnection=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009596fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009597rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009598 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009599LIBS=$ac_check_lib_save_LIBS
9600fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
9602printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9603if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
9604then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009605 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009606fi
9607
9608
9609 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +02009610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9611printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9612if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
9613then :
9614 printf %s "(cached) " >&6
9615else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009616 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009617LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009619/* end confdefs.h. */
9620
Bram Moolenaar446cb832008-06-24 21:56:24 +00009621/* Override any GCC internal prototype to avoid an error.
9622 Use char because int might match the return type of a GCC
9623 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009624char XpmCreatePixmapFromData ();
9625int
Illia Bobyra96d5442023-08-30 16:30:15 +02009626main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009627{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009628return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009629 ;
9630 return 0;
9631}
9632_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009633if ac_fn_c_try_link "$LINENO"
9634then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009635 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009636else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009637 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009638fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009639rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009640 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009641LIBS=$ac_check_lib_save_LIBS
9642fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9644printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9645if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
9646then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009647 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009648fi
9649
9650
Illia Bobyra96d5442023-08-30 16:30:15 +02009651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9652printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009653 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +02009654 if test "$GCC" = yes; then
9655 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9656 else
9657 CFLAGS="$CFLAGS $X_CFLAGS"
9658 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009660/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009661#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009662int
Illia Bobyra96d5442023-08-30 16:30:15 +02009663main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009664{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009665
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009666 ;
9667 return 0;
9668}
9669_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009670if ac_fn_c_try_compile "$LINENO"
9671then :
9672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673printf "%s\n" "no" >&6; }
9674else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009675 CFLAGS="$CFLAGS -Wno-implicit-int"
9676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009677/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009678#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009679int
Illia Bobyra96d5442023-08-30 16:30:15 +02009680main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009681{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009682
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009683 ;
9684 return 0;
9685}
9686_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009687if ac_fn_c_try_compile "$LINENO"
9688then :
9689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9690printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9691else $as_nop
9692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9693printf "%s\n" "test failed" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009694
Bram Moolenaar071d4272004-06-13 20:20:40 +00009695fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009696rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009697
Bram Moolenaar071d4272004-06-13 20:20:40 +00009698fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009699rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009700 CFLAGS=$cflags_save
9701
9702 LDFLAGS="$ac_save_LDFLAGS"
9703
Mike Gilberta055b442023-08-20 19:01:41 +02009704 # The cast to long int works around a bug in the HP C Compiler
9705# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9706# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9707# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +02009708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
9709printf %s "checking size of wchar_t... " >&6; }
9710if test ${ac_cv_sizeof_wchar_t+y}
9711then :
9712 printf %s "(cached) " >&6
9713else $as_nop
9714 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
9715then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009716
Illia Bobyra96d5442023-08-30 16:30:15 +02009717else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02009718 if test "$ac_cv_type_wchar_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009719 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9720printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +02009721as_fn_error 77 "cannot compute sizeof (wchar_t)
9722See \`config.log' for more details" "$LINENO" 5; }
9723 else
9724 ac_cv_sizeof_wchar_t=0
9725 fi
9726fi
9727
9728fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
9730printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02009731
9732
9733
Illia Bobyra96d5442023-08-30 16:30:15 +02009734printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009735
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009736
Mike Gilberta055b442023-08-20 19:01:41 +02009737 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009738 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009739
9740 fi
9741
Bram Moolenaar071d4272004-06-13 20:20:40 +00009742 fi
9743fi
9744
Bram Moolenaard2a05492018-07-27 22:35:15 +02009745if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9746 as_fn_error $? "could not configure X" "$LINENO" 5
9747fi
9748
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009749test "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 +00009750
Illia Bobyra96d5442023-08-30 16:30:15 +02009751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9752printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009753# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009754if test ${enable_gui+y}
9755then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009756 enableval=$enable_gui;
Illia Bobyra96d5442023-08-30 16:30:15 +02009757else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009758 enable_gui="auto"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009759fi
9760
Bram Moolenaar071d4272004-06-13 20:20:40 +00009761
9762enable_gui_canon=`echo "_$enable_gui" | \
9763 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9764
Bram Moolenaar071d4272004-06-13 20:20:40 +00009765SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +01009766SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009767SKIP_GNOME=YES
9768SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009769SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009770SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009771GUITYPE=NONE
9772
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009773if test "x$HAIKU" = "xyes"; then
9774 SKIP_HAIKU=
9775 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009776 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9777printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009778 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009779 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9780printf "%s\n" "yes - automatic GUI support" >&6; } ;;
9781 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9782printf "%s\n" "auto - automatic GUI support" >&6; } ;;
9783 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9784printf "%s\n" "Haiku GUI support" >&6; } ;;
9785 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9786printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009787 SKIP_HAIKU=YES ;;
9788 esac
9789elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009790 SKIP_PHOTON=
9791 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009792 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9793printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009794 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009795 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9796printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009797 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009798 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9799printf "%s\n" "Photon GUI support" >&6; } ;;
9800 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9801printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009802 SKIP_PHOTON=YES ;;
9803 esac
9804
Bram Moolenaar040f9752020-08-11 23:08:48 +02009805elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9806 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009807 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9808printf "%s\n" "no GUI support" >&6; } ;;
9809 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9810printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +02009811 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009812 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9813printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
9814 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9815printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +02009816 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009817else
9818
Bram Moolenaar071d4272004-06-13 20:20:40 +00009819 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009820 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9821printf "%s\n" "no GUI support" >&6; } ;;
9822 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9823printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009824 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009825 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +01009826 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009827 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +00009828 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009829 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9830printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009831 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009832 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9833printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009834 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009835 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009836 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9837printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009838 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009839 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9840printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009841 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009842 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9843printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009844 esac
9845
9846fi
9847
Bram Moolenaar071d4272004-06-13 20:20:40 +00009848if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9849 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9851printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009852 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009853if test ${enable_gtk2_check+y}
9854then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009855 enableval=$enable_gtk2_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009856else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009857 enable_gtk2_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009858fi
9859
Illia Bobyra96d5442023-08-30 16:30:15 +02009860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9861printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009862 if test "x$enable_gtk2_check" = "xno"; then
9863 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009864 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009865 fi
9866fi
9867
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009868if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9870printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009871 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009872if test ${enable_gnome_check+y}
9873then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009874 enableval=$enable_gnome_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009875else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009876 enable_gnome_check="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009877fi
9878
Illia Bobyra96d5442023-08-30 16:30:15 +02009879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9880printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009881 if test "x$enable_gnome_check" = "xno"; then
9882 SKIP_GNOME=YES
9883 fi
9884fi
9885
Bram Moolenaar98921892016-02-23 17:14:37 +01009886if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9888printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009889 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009890if test ${enable_gtk3_check+y}
9891then :
Bram Moolenaar98921892016-02-23 17:14:37 +01009892 enableval=$enable_gtk3_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009893else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +01009894 enable_gtk3_check="yes"
9895fi
9896
Illia Bobyra96d5442023-08-30 16:30:15 +02009897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9898printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009899 if test "x$enable_gtk3_check" = "xno"; then
9900 SKIP_GTK3=YES
9901 fi
9902fi
9903
Bram Moolenaar071d4272004-06-13 20:20:40 +00009904if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9906printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009907 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009908if test ${enable_motif_check+y}
9909then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009910 enableval=$enable_motif_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009911else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009912 enable_motif_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009913fi
9914
Illia Bobyra96d5442023-08-30 16:30:15 +02009915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9916printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009917 if test "x$enable_motif_check" = "xno"; then
9918 SKIP_MOTIF=YES
9919 fi
9920fi
9921
Bram Moolenaar071d4272004-06-13 20:20:40 +00009922
9923
9924
9925
9926
9927
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009928if test "X$PKG_CONFIG" = "X"; then
9929 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +01009930 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9931set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933printf %s "checking for $ac_word... " >&6; }
9934if test ${ac_cv_path_PKG_CONFIG+y}
9935then :
9936 printf %s "(cached) " >&6
9937else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009938 case $PKG_CONFIG in
9939 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009940 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9941 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009942 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9944for as_dir in $PATH
9945do
9946 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009947 case $as_dir in #(((
9948 '') as_dir=./ ;;
9949 */) ;;
9950 *) as_dir=$as_dir/ ;;
9951 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009952 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009953 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9954 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9955 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009956 break 2
9957 fi
9958done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009959 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009960IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009961
Bram Moolenaar071d4272004-06-13 20:20:40 +00009962 ;;
9963esac
9964fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009965PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +00009966if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9968printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009969else
Illia Bobyra96d5442023-08-30 16:30:15 +02009970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009972fi
9973
Bram Moolenaar446cb832008-06-24 21:56:24 +00009974
Bram Moolenaard6d30422018-01-28 22:48:55 +01009975fi
9976if test -z "$ac_cv_path_PKG_CONFIG"; then
9977 ac_pt_PKG_CONFIG=$PKG_CONFIG
9978 # Extract the first word of "pkg-config", so it can be a program name with args.
9979set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981printf %s "checking for $ac_word... " >&6; }
9982if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
9983then :
9984 printf %s "(cached) " >&6
9985else $as_nop
Bram Moolenaard6d30422018-01-28 22:48:55 +01009986 case $ac_pt_PKG_CONFIG in
9987 [\\/]* | ?:[\\/]*)
9988 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9989 ;;
9990 *)
9991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9992for as_dir in $PATH
9993do
9994 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009995 case $as_dir in #(((
9996 '') as_dir=./ ;;
9997 */) ;;
9998 *) as_dir=$as_dir/ ;;
9999 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +010010000 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010001 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10002 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10003 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +010010004 break 2
10005 fi
10006done
10007 done
10008IFS=$as_save_IFS
10009
10010 ;;
10011esac
10012fi
10013ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10014if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10016printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010017else
Illia Bobyra96d5442023-08-30 16:30:15 +020010018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010020fi
10021
10022 if test "x$ac_pt_PKG_CONFIG" = x; then
10023 PKG_CONFIG="no"
10024 else
10025 case $cross_compiling:$ac_tool_warned in
10026yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +020010027{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10028printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +010010029ac_tool_warned=yes ;;
10030esac
10031 PKG_CONFIG=$ac_pt_PKG_CONFIG
10032 fi
10033else
10034 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10035fi
10036
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010037fi
10038
10039
10040if test -z "$SKIP_GTK2"; then
10041
Illia Bobyra96d5442023-08-30 16:30:15 +020010042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10043printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010044 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010045if test ${enable_gtktest+y}
10046then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010047 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010048else $as_nop
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010049 enable_gtktest=yes
10050fi
10051
10052 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10054printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010055 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10057printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010058 fi
10059
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010060 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010061 save_skip_gtk3=$SKIP_GTK3
10062 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010063
Bram Moolenaar071d4272004-06-13 20:20:40 +000010064 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10065 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010066 no_gtk=""
10067 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10068 && $PKG_CONFIG --exists gtk+-2.0; then
10069 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010070 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10072printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010073 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010074 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010075 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10076 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10077 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10078 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10079 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10080 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10081 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10082 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010083 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10084 && $PKG_CONFIG --exists gtk+-3.0; then
10085 {
10086 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10088printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010089
10090 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10091 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10092 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10093 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10094 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10095 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10096 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10097 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10098 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10099 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010100 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10102printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010103 no_gtk=yes
10104 fi
10105
10106 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10107 {
10108 ac_save_CFLAGS="$CFLAGS"
10109 ac_save_LIBS="$LIBS"
10110 CFLAGS="$CFLAGS $GTK_CFLAGS"
10111 LIBS="$LIBS $GTK_LIBS"
10112
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010113 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010114 if test "$cross_compiling" = yes
10115then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010116 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010117else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010119/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010120
10121#include <gtk/gtk.h>
10122#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010123#if STDC_HEADERS
10124# include <stdlib.h>
10125# include <stddef.h>
10126#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010127
10128int
10129main ()
10130{
10131int major, minor, micro;
10132char *tmp_version;
10133
10134system ("touch conf.gtktest");
10135
10136/* HP/UX 9 (%@#!) writes to sscanf strings */
10137tmp_version = g_strdup("$min_gtk_version");
10138if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10139 printf("%s, bad version string\n", "$min_gtk_version");
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010140 g_free(tmp_version);
Bram Moolenaar071d4272004-06-13 20:20:40 +000010141 exit(1);
10142 }
10143
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010144g_free(tmp_version);
10145
Bram Moolenaar071d4272004-06-13 20:20:40 +000010146if ((gtk_major_version > major) ||
10147 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10148 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10149 (gtk_micro_version >= micro)))
10150{
10151 return 0;
10152}
10153return 1;
10154}
10155
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010156_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010157if ac_fn_c_try_run "$LINENO"
10158then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010159
Illia Bobyra96d5442023-08-30 16:30:15 +020010160else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010161 no_gtk=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010162fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10164 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010165fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010166
Bram Moolenaar071d4272004-06-13 20:20:40 +000010167 CFLAGS="$ac_save_CFLAGS"
10168 LIBS="$ac_save_LIBS"
10169 }
10170 fi
10171 if test "x$no_gtk" = x ; then
10172 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10174printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010175 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10177printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010178 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010179 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010180 GTK_LIBNAME="$GTK_LIBS"
10181 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010182 else
10183 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010186 GTK_CFLAGS=""
10187 GTK_LIBS=""
10188 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010189 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10190 as_fn_error $? "could not configure GTK" "$LINENO" 5
10191 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010192 }
10193 fi
10194 }
10195 else
10196 GTK_CFLAGS=""
10197 GTK_LIBS=""
10198 :
10199 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010200
10201
Bram Moolenaar071d4272004-06-13 20:20:40 +000010202 rm -f conf.gtktest
10203
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010204 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010205 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010206 SKIP_MOTIF=YES
10207 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010208
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010209 else
10210 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010211 fi
10212 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010213 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010214 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010215 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010216
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010217
10218
10219
10220
10221
Bram Moolenaar446cb832008-06-24 21:56:24 +000010222# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010223if test ${with_gnome_includes+y}
10224then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010225 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010226
Bram Moolenaar446cb832008-06-24 21:56:24 +000010227fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010228
10229
Bram Moolenaar446cb832008-06-24 21:56:24 +000010230
10231# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010232if test ${with_gnome_libs+y}
10233then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010234 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010235
Bram Moolenaar446cb832008-06-24 21:56:24 +000010236fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010237
10238
Bram Moolenaar446cb832008-06-24 21:56:24 +000010239
10240# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010241if test ${with_gnome+y}
10242then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010243 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010244 want_gnome=yes
10245 have_gnome=yes
10246 else
10247 if test "x$withval" = xno; then
10248 want_gnome=no
10249 else
10250 want_gnome=yes
10251 LDFLAGS="$LDFLAGS -L$withval/lib"
10252 CFLAGS="$CFLAGS -I$withval/include"
10253 gnome_prefix=$withval/lib
10254 fi
10255 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010256else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000010257 want_gnome=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000010258fi
10259
Bram Moolenaar071d4272004-06-13 20:20:40 +000010260
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010261 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010262 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10264printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010265 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10267printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010268 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10269 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10270 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010271
Illia Bobyra96d5442023-08-30 16:30:15 +020010272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10273printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010274 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10276printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010277 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010278 GNOME_LIBS="$GNOME_LIBS -pthread"
10279 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10281printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010282 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010283 have_gnome=yes
10284 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10286printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010287 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010288 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010289 fi
10290 fi
10291 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010292 fi
10293
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010294 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010295 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010296
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010297 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10298 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010299 fi
10300 }
10301 fi
10302 fi
10303fi
10304
Bram Moolenaar98921892016-02-23 17:14:37 +010010305
10306if test -z "$SKIP_GTK3"; then
10307
Illia Bobyra96d5442023-08-30 16:30:15 +020010308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10309printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010310 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010311if test ${enable_gtktest+y}
10312then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010313 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010314else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010315 enable_gtktest=yes
10316fi
10317
10318 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10320printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010321 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10323printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010324 fi
10325
Bram Moolenaar98921892016-02-23 17:14:37 +010010326 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010327 save_skip_gtk2=$SKIP_GTK2
10328 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010329
10330 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10331 {
10332 no_gtk=""
10333 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10334 && $PKG_CONFIG --exists gtk+-2.0; then
10335 {
10336 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10338printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010339 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10340 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10341 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10342 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10343 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10344 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10345 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10346 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10347 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10348 }
10349 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10350 && $PKG_CONFIG --exists gtk+-3.0; then
10351 {
10352 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10354printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010355
10356 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10357 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10358 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10359 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10360 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10361 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10362 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10363 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10364 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10365 }
10366 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10368printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010369 no_gtk=yes
10370 fi
10371
10372 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10373 {
10374 ac_save_CFLAGS="$CFLAGS"
10375 ac_save_LIBS="$LIBS"
10376 CFLAGS="$CFLAGS $GTK_CFLAGS"
10377 LIBS="$LIBS $GTK_LIBS"
10378
10379 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010380 if test "$cross_compiling" = yes
10381then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010382 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010383else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10385/* end confdefs.h. */
10386
10387#include <gtk/gtk.h>
10388#include <stdio.h>
10389#if STDC_HEADERS
10390# include <stdlib.h>
10391# include <stddef.h>
10392#endif
10393
10394int
10395main ()
10396{
10397int major, minor, micro;
10398char *tmp_version;
10399
10400system ("touch conf.gtktest");
10401
10402/* HP/UX 9 (%@#!) writes to sscanf strings */
10403tmp_version = g_strdup("$min_gtk_version");
10404if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10405 printf("%s, bad version string\n", "$min_gtk_version");
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010406 g_free(tmp_version);
Bram Moolenaar98921892016-02-23 17:14:37 +010010407 exit(1);
10408 }
10409
Christian Brabandt2f9aef42024-02-12 23:12:26 +010010410g_free(tmp_version);
10411
Bram Moolenaar98921892016-02-23 17:14:37 +010010412if ((gtk_major_version > major) ||
10413 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10414 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10415 (gtk_micro_version >= micro)))
10416{
10417 return 0;
10418}
10419return 1;
10420}
10421
10422_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010423if ac_fn_c_try_run "$LINENO"
10424then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010425
Illia Bobyra96d5442023-08-30 16:30:15 +020010426else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010427 no_gtk=yes
10428fi
10429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10430 conftest.$ac_objext conftest.beam conftest.$ac_ext
10431fi
10432
10433 CFLAGS="$ac_save_CFLAGS"
10434 LIBS="$ac_save_LIBS"
10435 }
10436 fi
10437 if test "x$no_gtk" = x ; then
10438 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10440printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010441 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10443printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010444 fi
10445 GUI_LIB_LOC="$GTK_LIBDIR"
10446 GTK_LIBNAME="$GTK_LIBS"
10447 GUI_INC_LOC="$GTK_CFLAGS"
10448 else
10449 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010452 GTK_CFLAGS=""
10453 GTK_LIBS=""
10454 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010455 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10456 as_fn_error $? "could not configure GTK" "$LINENO" 5
10457 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010458 }
10459 fi
10460 }
10461 else
10462 GTK_CFLAGS=""
10463 GTK_LIBS=""
10464 :
10465 fi
10466
10467
10468 rm -f conf.gtktest
10469
10470 if test "x$GTK_CFLAGS" != "x"; then
10471 SKIP_GTK2=YES
10472 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010473 SKIP_MOTIF=YES
10474 GUITYPE=GTK
10475
Illia Bobyra96d5442023-08-30 16:30:15 +020010476 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010477
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010478 else
10479 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010480 fi
10481 fi
10482fi
10483
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010484if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10486printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010487 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10488 if test "x$gdk_pixbuf_version" != x ; then
10489 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10490 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10491 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010492 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10494printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010495 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10496set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010497{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10498printf %s "checking for $ac_word... " >&6; }
10499if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10500then :
10501 printf %s "(cached) " >&6
10502else $as_nop
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010503 case $GLIB_COMPILE_RESOURCES in
10504 [\\/]* | ?:[\\/]*)
10505 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10506 ;;
10507 *)
10508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10509for as_dir in $PATH
10510do
10511 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010512 case $as_dir in #(((
10513 '') as_dir=./ ;;
10514 */) ;;
10515 *) as_dir=$as_dir/ ;;
10516 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010517 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010518 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10519 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
10520 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010521 break 2
10522 fi
10523done
10524 done
10525IFS=$as_save_IFS
10526
10527 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
10528 ;;
10529esac
10530fi
10531GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
10532if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
10534printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010535else
Illia Bobyra96d5442023-08-30 16:30:15 +020010536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10537printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010538fi
10539
10540
Illia Bobyra96d5442023-08-30 16:30:15 +020010541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
10542printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010543 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010544 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020010545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10546printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010547 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10549printf "%s\n" "usable." >&6; }
10550 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010551
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010552 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10553 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010554 fi
10555 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10557printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010558 fi
10559 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10561printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010562 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010563
Illia Bobyra96d5442023-08-30 16:30:15 +020010564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10565printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010566 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010567if test ${enable_icon_cache_update+y}
10568then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010569 enableval=$enable_icon_cache_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010570else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010571 enable_icon_cache_update="yes"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010572fi
10573
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010574 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10576printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010577 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10578set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10580printf %s "checking for $ac_word... " >&6; }
10581if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
10582then :
10583 printf %s "(cached) " >&6
10584else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010585 case $GTK_UPDATE_ICON_CACHE in
10586 [\\/]* | ?:[\\/]*)
10587 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10588 ;;
10589 *)
10590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10591for as_dir in $PATH
10592do
10593 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010594 case $as_dir in #(((
10595 '') as_dir=./ ;;
10596 */) ;;
10597 *) as_dir=$as_dir/ ;;
10598 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010599 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010600 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10601 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
10602 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010603 break 2
10604 fi
10605done
10606 done
10607IFS=$as_save_IFS
10608
10609 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10610 ;;
10611esac
10612fi
10613GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10614if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10616printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010617else
Illia Bobyra96d5442023-08-30 16:30:15 +020010618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10619printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010620fi
10621
10622
10623 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10625printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010626 fi
10627 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10629printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010630 fi
10631
Illia Bobyra96d5442023-08-30 16:30:15 +020010632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10633printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010634 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010635if test ${enable_desktop_database_update+y}
10636then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010637 enableval=$enable_desktop_database_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010638else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010639 enable_desktop_database_update="yes"
10640fi
10641
10642 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10644printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010645 # Extract the first word of "update-desktop-database", so it can be a program name with args.
10646set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010647{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10648printf %s "checking for $ac_word... " >&6; }
10649if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
10650then :
10651 printf %s "(cached) " >&6
10652else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010653 case $UPDATE_DESKTOP_DATABASE in
10654 [\\/]* | ?:[\\/]*)
10655 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10656 ;;
10657 *)
10658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10659for as_dir in $PATH
10660do
10661 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010662 case $as_dir in #(((
10663 '') as_dir=./ ;;
10664 */) ;;
10665 *) as_dir=$as_dir/ ;;
10666 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010667 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010668 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10669 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
10670 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010671 break 2
10672 fi
10673done
10674 done
10675IFS=$as_save_IFS
10676
10677 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10678 ;;
10679esac
10680fi
10681UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10682if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10684printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010685else
Illia Bobyra96d5442023-08-30 16:30:15 +020010686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010688fi
10689
10690
10691 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10693printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010694 fi
10695 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10697printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010698 fi
10699fi
10700
10701
10702
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010703
10704
10705
10706
Bram Moolenaar071d4272004-06-13 20:20:40 +000010707if test -z "$SKIP_MOTIF"; then
10708 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"
10709 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10710
Illia Bobyra96d5442023-08-30 16:30:15 +020010711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10712printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010713 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10714 GUI_INC_LOC=
10715 for try in $gui_includes; do
10716 if test -f "$try/Xm/Xm.h"; then
10717 GUI_INC_LOC=$try
10718 fi
10719 done
10720 if test -n "$GUI_INC_LOC"; then
10721 if test "$GUI_INC_LOC" = /usr/include; then
10722 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10724printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010725 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10727printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010728 fi
10729 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10731printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010732 SKIP_MOTIF=YES
10733 fi
10734fi
10735
10736
10737if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10739printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010740
Bram Moolenaar446cb832008-06-24 21:56:24 +000010741# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010742if test ${with_motif_lib+y}
10743then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010744 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
10745fi
10746
Bram Moolenaar071d4272004-06-13 20:20:40 +000010747
10748 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10750printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010751 GUI_LIB_LOC=
10752 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010755
10756 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10757
Illia Bobyra96d5442023-08-30 16:30:15 +020010758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10759printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010010760 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 +000010761 GUI_LIB_LOC=
10762 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010010763 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 +000010764 if test -f "$libtry"; then
10765 GUI_LIB_LOC=$try
10766 fi
10767 done
10768 done
10769 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010010770 if test "$GUI_LIB_LOC" = /usr/lib \
10771 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020010772 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10773 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010774 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10776printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010777 else
10778 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10780printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010781 if test "$vim_cv_uname_output" = SunOS &&
10782 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010783 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10784 fi
10785 fi
10786 fi
10787 MOTIF_LIBNAME=-lXm
10788 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10790printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010791 SKIP_MOTIF=YES
10792 fi
10793 fi
10794fi
10795
10796if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010797 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010798
Bram Moolenaar071d4272004-06-13 20:20:40 +000010799fi
10800
Bram Moolenaare2adcf32022-03-12 11:57:25 +000010801if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010802 if test -n "$GUI_INC_LOC"; then
10803 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10804 fi
10805 if test -n "$GUI_LIB_LOC"; then
10806 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10807 fi
10808
10809 ldflags_save=$LDFLAGS
10810 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10812printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
10813if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
10814then :
10815 printf %s "(cached) " >&6
10816else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010817 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010818LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010820/* end confdefs.h. */
10821
Bram Moolenaar446cb832008-06-24 21:56:24 +000010822/* Override any GCC internal prototype to avoid an error.
10823 Use char because int might match the return type of a GCC
10824 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010825char XShapeQueryExtension ();
10826int
Illia Bobyra96d5442023-08-30 16:30:15 +020010827main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010828{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010829return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010830 ;
10831 return 0;
10832}
10833_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010834if ac_fn_c_try_link "$LINENO"
10835then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010836 ac_cv_lib_Xext_XShapeQueryExtension=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010837else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010838 ac_cv_lib_Xext_XShapeQueryExtension=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010839fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010840rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010841 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010842LIBS=$ac_check_lib_save_LIBS
10843fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10845printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10846if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
10847then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010848 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010849fi
10850
Illia Bobyra96d5442023-08-30 16:30:15 +020010851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10852printf %s "checking for wslen in -lw... " >&6; }
10853if test ${ac_cv_lib_w_wslen+y}
10854then :
10855 printf %s "(cached) " >&6
10856else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010857 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010858LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010860/* end confdefs.h. */
10861
Bram Moolenaar446cb832008-06-24 21:56:24 +000010862/* Override any GCC internal prototype to avoid an error.
10863 Use char because int might match the return type of a GCC
10864 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010865char wslen ();
10866int
Illia Bobyra96d5442023-08-30 16:30:15 +020010867main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010868{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010869return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010870 ;
10871 return 0;
10872}
10873_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010874if ac_fn_c_try_link "$LINENO"
10875then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010876 ac_cv_lib_w_wslen=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010877else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010878 ac_cv_lib_w_wslen=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010879fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010880rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010881 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010882LIBS=$ac_check_lib_save_LIBS
10883fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10885printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
10886if test "x$ac_cv_lib_w_wslen" = xyes
10887then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010888 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010889fi
10890
Illia Bobyra96d5442023-08-30 16:30:15 +020010891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10892printf %s "checking for dlsym in -ldl... " >&6; }
10893if test ${ac_cv_lib_dl_dlsym+y}
10894then :
10895 printf %s "(cached) " >&6
10896else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010897 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010898LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010900/* end confdefs.h. */
10901
Bram Moolenaar446cb832008-06-24 21:56:24 +000010902/* Override any GCC internal prototype to avoid an error.
10903 Use char because int might match the return type of a GCC
10904 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010905char dlsym ();
10906int
Illia Bobyra96d5442023-08-30 16:30:15 +020010907main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010908{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010909return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010910 ;
10911 return 0;
10912}
10913_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010914if ac_fn_c_try_link "$LINENO"
10915then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010916 ac_cv_lib_dl_dlsym=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010917else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010918 ac_cv_lib_dl_dlsym=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010919fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010920rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010921 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010922LIBS=$ac_check_lib_save_LIBS
10923fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010924{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10925printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
10926if test "x$ac_cv_lib_dl_dlsym" = xyes
10927then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010928 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010929fi
10930
Illia Bobyra96d5442023-08-30 16:30:15 +020010931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10932printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10933if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
10934then :
10935 printf %s "(cached) " >&6
10936else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010937 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010938LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010940/* end confdefs.h. */
10941
Bram Moolenaar446cb832008-06-24 21:56:24 +000010942/* Override any GCC internal prototype to avoid an error.
10943 Use char because int might match the return type of a GCC
10944 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010945char XmuCreateStippledPixmap ();
10946int
Illia Bobyra96d5442023-08-30 16:30:15 +020010947main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010948{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010949return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010950 ;
10951 return 0;
10952}
10953_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010954if ac_fn_c_try_link "$LINENO"
10955then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010956 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010957else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010958 ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010959fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010960rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010961 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010962LIBS=$ac_check_lib_save_LIBS
10963fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10965printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10966if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
10967then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010968 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010969fi
10970
10971 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10973printf %s "checking for XpEndJob in -lXp... " >&6; }
10974if test ${ac_cv_lib_Xp_XpEndJob+y}
10975then :
10976 printf %s "(cached) " >&6
10977else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010978 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010979LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010981/* end confdefs.h. */
10982
Bram Moolenaar446cb832008-06-24 21:56:24 +000010983/* Override any GCC internal prototype to avoid an error.
10984 Use char because int might match the return type of a GCC
10985 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010986char XpEndJob ();
10987int
Illia Bobyra96d5442023-08-30 16:30:15 +020010988main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010989{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010990return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010991 ;
10992 return 0;
10993}
10994_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010995if ac_fn_c_try_link "$LINENO"
10996then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010997 ac_cv_lib_Xp_XpEndJob=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010998else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010999 ac_cv_lib_Xp_XpEndJob=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011000fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011001rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011002 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011003LIBS=$ac_check_lib_save_LIBS
11004fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11006printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11007if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11008then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011009 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011010fi
11011
11012 fi
11013 LDFLAGS=$ldflags_save
11014
Illia Bobyra96d5442023-08-30 16:30:15 +020011015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11016printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011017 NARROW_PROTO=
11018 rm -fr conftestdir
11019 if mkdir conftestdir; then
11020 cd conftestdir
11021 cat > Imakefile <<'EOF'
11022acfindx:
11023 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11024EOF
11025 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11026 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11027 fi
11028 cd ..
11029 rm -fr conftestdir
11030 fi
11031 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011032 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11033printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011034 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11036printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011037 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011038
Bram Moolenaar071d4272004-06-13 20:20:40 +000011039fi
11040
11041if test "$enable_xsmp" = "yes"; then
11042 cppflags_save=$CPPFLAGS
11043 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011044 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11045if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11046then :
11047 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011048
11049fi
11050
Bram Moolenaar071d4272004-06-13 20:20:40 +000011051 CPPFLAGS=$cppflags_save
11052fi
11053
11054
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011055if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011056 cppflags_save=$CPPFLAGS
11057 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011058 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11059if test "x$ac_cv_header_X11_xpm_h" = xyes
11060then :
11061 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11062
11063fi
11064ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11065if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11066then :
11067 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011068
11069fi
11070
Bram Moolenaar071d4272004-06-13 20:20:40 +000011071
11072 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11074printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011076/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011077#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011078_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011080 $EGREP "XIMText" >/dev/null 2>&1
11081then :
11082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11083printf "%s\n" "yes" >&6; }
11084else $as_nop
11085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11086printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011087fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011088rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011089
11090 fi
11091 CPPFLAGS=$cppflags_save
11092
Bram Moolenaar54612582019-11-21 17:13:31 +010011093 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11095printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011096 enable_xim="yes"
11097 fi
11098fi
11099
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011100if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011101 cppflags_save=$CPPFLAGS
11102 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11104printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011106/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011107
11108#include <X11/Intrinsic.h>
11109#include <X11/Xmu/Editres.h>
11110int
Illia Bobyra96d5442023-08-30 16:30:15 +020011111main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011112{
11113int i; i = 0;
11114 ;
11115 return 0;
11116}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011117_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011118if ac_fn_c_try_compile "$LINENO"
11119then :
11120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11121printf "%s\n" "yes" >&6; }
11122 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011123
Illia Bobyra96d5442023-08-30 16:30:15 +020011124else $as_nop
11125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11126printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011127fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011128rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011129 CPPFLAGS=$cppflags_save
11130fi
11131
11132if test -z "$SKIP_MOTIF"; then
11133 cppflags_save=$CPPFLAGS
11134 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011135 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011136 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11137if test "x$ac_cv_header_Xm_Xm_h" = xyes
11138then :
11139 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011140
11141fi
11142
Bram Moolenaar77c19352012-06-13 19:19:41 +020011143 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011144 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11145if test "x$ac_cv_header_Xm_Xm_h" = xyes
11146then :
11147 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011148
11149fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011150ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11151if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11152then :
11153 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011154
Illia Bobyra96d5442023-08-30 16:30:15 +020011155fi
11156ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11157if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11158then :
11159 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11160
11161fi
11162ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11163if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11164then :
11165 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11166
11167fi
11168ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11169if test "x$ac_cv_header_Xm_Manager_h" = xyes
11170then :
11171 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11172
11173fi
11174ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11175if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11176then :
11177 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11178
11179fi
11180ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11181if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11182then :
11183 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11184
11185fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011186
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011187 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011188
Bram Moolenaar77c19352012-06-13 19:19:41 +020011189 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11191printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011193/* end confdefs.h. */
11194#include <Xm/XpmP.h>
11195int
Illia Bobyra96d5442023-08-30 16:30:15 +020011196main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011197{
11198XpmAttributes_21 attr;
11199 ;
11200 return 0;
11201}
11202_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011203if ac_fn_c_try_compile "$LINENO"
11204then :
11205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11206printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011207
Illia Bobyra96d5442023-08-30 16:30:15 +020011208else $as_nop
11209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11210printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011211
11212
11213fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011214rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011215 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011216 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011217
11218 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011219 CPPFLAGS=$cppflags_save
11220fi
11221
11222if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11224printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011225 enable_xim="no"
11226fi
11227if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11229printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011230 enable_fontset="no"
11231fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011232if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11234printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011235 enable_fontset="no"
11236fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011237
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011238if test -z "$SKIP_HAIKU"; then
11239 GUITYPE=HAIKUGUI
11240fi
11241
Bram Moolenaar071d4272004-06-13 20:20:40 +000011242if test -z "$SKIP_PHOTON"; then
11243 GUITYPE=PHOTONGUI
11244fi
11245
11246
11247
11248
11249
11250
11251if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011252 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011253fi
11254
11255if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011256 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011257
11258fi
11259if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011260 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011261
11262fi
11263
11264
11265
Illia Bobyra96d5442023-08-30 16:30:15 +020011266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11267printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011268if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11270printf "%s\n" "/proc/self/exe" >&6; }
11271 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011272
11273elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11275printf "%s\n" "/proc/self/path/a.out" >&6; }
11276 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011277
11278elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11280printf "%s\n" "/proc/curproc/file" >&6; }
11281 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011282
11283else
Illia Bobyra96d5442023-08-30 16:30:15 +020011284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11285printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011286fi
11287
Illia Bobyra96d5442023-08-30 16:30:15 +020011288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11289printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011290case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011291 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11292printf "%s\n" "yes" >&6; }
11293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11294printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011295 if test "x$with_x" = "xno" ; then
11296 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11298printf "%s\n" "yes" >&6; }
11299 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011300
11301 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11303printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011304 fi ;;
11305
Illia Bobyra96d5442023-08-30 16:30:15 +020011306 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11307printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011308esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011309
Bram Moolenaar071d4272004-06-13 20:20:40 +000011310
Illia Bobyra96d5442023-08-30 16:30:15 +020011311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11312printf %s "checking whether toupper is broken... " >&6; }
11313if test ${vim_cv_toupper_broken+y}
11314then :
11315 printf %s "(cached) " >&6
11316else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011317
Illia Bobyra96d5442023-08-30 16:30:15 +020011318 if test "$cross_compiling" = yes
11319then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011320
Bram Moolenaar7db77842014-03-27 17:40:59 +010011321 as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000011322
Illia Bobyra96d5442023-08-30 16:30:15 +020011323else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011326
11327#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011328#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011329#if STDC_HEADERS
11330# include <stdlib.h>
11331# include <stddef.h>
11332#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011333int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011334
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011335_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011336if ac_fn_c_try_run "$LINENO"
11337then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011338
11339 vim_cv_toupper_broken=yes
11340
Illia Bobyra96d5442023-08-30 16:30:15 +020011341else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011342
11343 vim_cv_toupper_broken=no
11344
Bram Moolenaar071d4272004-06-13 20:20:40 +000011345fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11347 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011348fi
11349
Bram Moolenaar446cb832008-06-24 21:56:24 +000011350fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11352printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011353
11354if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011355 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011356
11357fi
11358
Illia Bobyra96d5442023-08-30 16:30:15 +020011359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11360printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011362/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011363#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011364int
Illia Bobyra96d5442023-08-30 16:30:15 +020011365main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011366{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011367printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011368 ;
11369 return 0;
11370}
11371_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011372if ac_fn_c_try_compile "$LINENO"
11373then :
11374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11375printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011376
Illia Bobyra96d5442023-08-30 16:30:15 +020011377else $as_nop
11378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011380fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011381rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011382
Illia Bobyra96d5442023-08-30 16:30:15 +020011383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11384printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011386/* end confdefs.h. */
11387#include <stdio.h>
11388int
Illia Bobyra96d5442023-08-30 16:30:15 +020011389main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011390{
11391int x __attribute__((unused));
11392 ;
11393 return 0;
11394}
11395_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011396if ac_fn_c_try_compile "$LINENO"
11397then :
11398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11399printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011400
Illia Bobyra96d5442023-08-30 16:30:15 +020011401else $as_nop
11402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403printf "%s\n" "no" >&6; }
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011404fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011405rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011406
Illia Bobyra96d5442023-08-30 16:30:15 +020011407ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
11408if test "x$ac_cv_header_elf_h" = xyes
11409then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011410 HAS_ELF=1
Bram Moolenaar071d4272004-06-13 20:20:40 +000011411fi
11412
11413if test "$HAS_ELF" = 1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
11415printf %s "checking for main in -lelf... " >&6; }
11416if test ${ac_cv_lib_elf_main+y}
11417then :
11418 printf %s "(cached) " >&6
11419else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011420 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011421LIBS="-lelf $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011423/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011424
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011425
11426int
Illia Bobyra96d5442023-08-30 16:30:15 +020011427main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011428{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011429return main ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011430 ;
11431 return 0;
11432}
11433_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011434if ac_fn_c_try_link "$LINENO"
11435then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011436 ac_cv_lib_elf_main=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011437else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011438 ac_cv_lib_elf_main=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011439fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011440rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011441 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011442LIBS=$ac_check_lib_save_LIBS
11443fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
11445printf "%s\n" "$ac_cv_lib_elf_main" >&6; }
11446if test "x$ac_cv_lib_elf_main" = xyes
11447then :
11448 printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011449
11450 LIBS="-lelf $LIBS"
11451
Bram Moolenaar071d4272004-06-13 20:20:40 +000011452fi
11453
11454fi
11455
11456ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011457for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011458 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11460printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11461if eval test \${$as_ac_Header+y}
11462then :
11463 printf %s "(cached) " >&6
11464else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011466/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011467#include <sys/types.h>
11468#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011469
11470int
Illia Bobyra96d5442023-08-30 16:30:15 +020011471main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011472{
11473if ((DIR *) 0)
11474return 0;
11475 ;
11476 return 0;
11477}
11478_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011479if ac_fn_c_try_compile "$LINENO"
11480then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011481 eval "$as_ac_Header=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020011482else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011483 eval "$as_ac_Header=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011484fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011485rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011486fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011487eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11489printf "%s\n" "$ac_res" >&6; }
11490if eval test \"x\$"$as_ac_Header"\" = x"yes"
11491then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011492 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011493#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011494_ACEOF
11495
11496ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011497fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011498
Bram Moolenaar071d4272004-06-13 20:20:40 +000011499done
11500# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11501if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11503printf %s "checking for library containing opendir... " >&6; }
11504if test ${ac_cv_search_opendir+y}
11505then :
11506 printf %s "(cached) " >&6
11507else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011508 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011510/* end confdefs.h. */
11511
Bram Moolenaar446cb832008-06-24 21:56:24 +000011512/* Override any GCC internal prototype to avoid an error.
11513 Use char because int might match the return type of a GCC
11514 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011515char opendir ();
11516int
Illia Bobyra96d5442023-08-30 16:30:15 +020011517main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011518{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011519return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011520 ;
11521 return 0;
11522}
11523_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011524for ac_lib in '' dir
11525do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011526 if test -z "$ac_lib"; then
11527 ac_res="none required"
11528 else
11529 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011530 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011531 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011532 if ac_fn_c_try_link "$LINENO"
11533then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011534 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000011535fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011536rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011537 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011538 if test ${ac_cv_search_opendir+y}
11539then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011540 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011541fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011542done
Illia Bobyra96d5442023-08-30 16:30:15 +020011543if test ${ac_cv_search_opendir+y}
11544then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011545
Illia Bobyra96d5442023-08-30 16:30:15 +020011546else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011547 ac_cv_search_opendir=no
11548fi
11549rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011550LIBS=$ac_func_search_save_LIBS
11551fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11553printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011554ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011555if test "$ac_res" != no
11556then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011557 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011558
11559fi
11560
Bram Moolenaar071d4272004-06-13 20:20:40 +000011561else
Illia Bobyra96d5442023-08-30 16:30:15 +020011562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11563printf %s "checking for library containing opendir... " >&6; }
11564if test ${ac_cv_search_opendir+y}
11565then :
11566 printf %s "(cached) " >&6
11567else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011568 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011570/* end confdefs.h. */
11571
Bram Moolenaar446cb832008-06-24 21:56:24 +000011572/* Override any GCC internal prototype to avoid an error.
11573 Use char because int might match the return type of a GCC
11574 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011575char opendir ();
11576int
Illia Bobyra96d5442023-08-30 16:30:15 +020011577main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011578{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011579return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011580 ;
11581 return 0;
11582}
11583_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011584for ac_lib in '' x
11585do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011586 if test -z "$ac_lib"; then
11587 ac_res="none required"
11588 else
11589 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011590 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011591 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011592 if ac_fn_c_try_link "$LINENO"
11593then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011594 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011595fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011596rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011597 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011598 if test ${ac_cv_search_opendir+y}
11599then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011600 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011601fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011602done
Illia Bobyra96d5442023-08-30 16:30:15 +020011603if test ${ac_cv_search_opendir+y}
11604then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011605
Illia Bobyra96d5442023-08-30 16:30:15 +020011606else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011607 ac_cv_search_opendir=no
11608fi
11609rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011610LIBS=$ac_func_search_save_LIBS
11611fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11613printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011614ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011615if test "$ac_res" != no
11616then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011617 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011618
11619fi
11620
11621fi
11622
11623
Bram Moolenaar071d4272004-06-13 20:20:40 +000011624if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11626printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011628/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011629#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011630int
Illia Bobyra96d5442023-08-30 16:30:15 +020011631main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011632{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011633union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011634 ;
11635 return 0;
11636}
11637_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011638if ac_fn_c_try_compile "$LINENO"
11639then :
11640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11641printf "%s\n" "yes" >&6; }
11642 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011643
Illia Bobyra96d5442023-08-30 16:30:15 +020011644 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011645
Illia Bobyra96d5442023-08-30 16:30:15 +020011646else $as_nop
11647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11648printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011649fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011650rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011651fi
11652
Illia Bobyra96d5442023-08-30 16:30:15 +020011653ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11654if test "x$ac_cv_header_stdint_h" = xyes
11655then :
11656 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
11657
11658fi
11659ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
11660if test "x$ac_cv_header_stdlib_h" = xyes
11661then :
11662 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
11663
11664fi
11665ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
11666if test "x$ac_cv_header_string_h" = xyes
11667then :
11668 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
11669
11670fi
11671ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
11672if test "x$ac_cv_header_sys_select_h" = xyes
11673then :
11674 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
11675
11676fi
11677ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
11678if test "x$ac_cv_header_sys_utsname_h" = xyes
11679then :
11680 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
11681
11682fi
11683ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
11684if test "x$ac_cv_header_termcap_h" = xyes
11685then :
11686 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
11687
11688fi
11689ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
11690if test "x$ac_cv_header_fcntl_h" = xyes
11691then :
11692 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
11693
11694fi
11695ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
11696if test "x$ac_cv_header_sgtty_h" = xyes
11697then :
11698 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
11699
11700fi
11701ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
11702if test "x$ac_cv_header_sys_ioctl_h" = xyes
11703then :
11704 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
11705
11706fi
11707ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
11708if test "x$ac_cv_header_sys_time_h" = xyes
11709then :
11710 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
11711
11712fi
11713ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
11714if test "x$ac_cv_header_sys_types_h" = xyes
11715then :
11716 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
11717
11718fi
11719ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
11720if test "x$ac_cv_header_termio_h" = xyes
11721then :
11722 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
11723
11724fi
11725ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
11726if test "x$ac_cv_header_iconv_h" = xyes
11727then :
11728 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
11729
11730fi
11731ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11732if test "x$ac_cv_header_inttypes_h" = xyes
11733then :
11734 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11735
11736fi
11737ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11738if test "x$ac_cv_header_langinfo_h" = xyes
11739then :
11740 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
11741
11742fi
11743ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
11744if test "x$ac_cv_header_math_h" = xyes
11745then :
11746 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
11747
11748fi
11749ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11750if test "x$ac_cv_header_unistd_h" = xyes
11751then :
11752 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11753
11754fi
11755ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
11756if test "x$ac_cv_header_stropts_h" = xyes
11757then :
11758 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
11759
11760fi
11761ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
11762if test "x$ac_cv_header_errno_h" = xyes
11763then :
11764 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
11765
11766fi
11767ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
11768if test "x$ac_cv_header_sys_resource_h" = xyes
11769then :
11770 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
11771
11772fi
11773ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
11774if test "x$ac_cv_header_sys_systeminfo_h" = xyes
11775then :
11776 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
11777
11778fi
11779ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11780if test "x$ac_cv_header_locale_h" = xyes
11781then :
11782 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
11783
11784fi
11785ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
11786if test "x$ac_cv_header_sys_stream_h" = xyes
11787then :
11788 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
11789
11790fi
11791ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
11792if test "x$ac_cv_header_termios_h" = xyes
11793then :
11794 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
11795
11796fi
11797ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
11798if test "x$ac_cv_header_libc_h" = xyes
11799then :
11800 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
11801
11802fi
11803ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
11804if test "x$ac_cv_header_sys_statfs_h" = xyes
11805then :
11806 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
11807
11808fi
11809ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
11810if test "x$ac_cv_header_poll_h" = xyes
11811then :
11812 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
11813
11814fi
11815ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
11816if test "x$ac_cv_header_sys_poll_h" = xyes
11817then :
11818 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
11819
11820fi
11821ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
11822if test "x$ac_cv_header_pwd_h" = xyes
11823then :
11824 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
11825
11826fi
11827ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
11828if test "x$ac_cv_header_utime_h" = xyes
11829then :
11830 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
11831
11832fi
11833ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11834if test "x$ac_cv_header_sys_param_h" = xyes
11835then :
11836 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11837
11838fi
11839ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
11840if test "x$ac_cv_header_sys_ptms_h" = xyes
11841then :
11842 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
11843
11844fi
11845ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
11846if test "x$ac_cv_header_libintl_h" = xyes
11847then :
11848 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
11849
11850fi
11851ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
11852if test "x$ac_cv_header_libgen_h" = xyes
11853then :
11854 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
11855
11856fi
11857ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
11858if test "x$ac_cv_header_util_debug_h" = xyes
11859then :
11860 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
11861
11862fi
11863ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
11864if test "x$ac_cv_header_util_msg18n_h" = xyes
11865then :
11866 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
11867
11868fi
11869ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
11870if test "x$ac_cv_header_frame_h" = xyes
11871then :
11872 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
11873
11874fi
11875ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
11876if test "x$ac_cv_header_sys_acl_h" = xyes
11877then :
11878 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
11879
11880fi
11881ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
11882if test "x$ac_cv_header_sys_access_h" = xyes
11883then :
11884 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
11885
11886fi
11887ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
11888if test "x$ac_cv_header_sys_sysinfo_h" = xyes
11889then :
11890 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
11891
11892fi
11893ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11894if test "x$ac_cv_header_wchar_h" = xyes
11895then :
11896 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
11897
11898fi
11899ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11900if test "x$ac_cv_header_wctype_h" = xyes
11901then :
11902 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011903
11904fi
11905
Bram Moolenaar071d4272004-06-13 20:20:40 +000011906
Illia Bobyra96d5442023-08-30 16:30:15 +020011907ac_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 +000011908# include <sys/stream.h>
11909#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011910"
Illia Bobyra96d5442023-08-30 16:30:15 +020011911if test "x$ac_cv_header_sys_ptem_h" = xyes
11912then :
11913 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011914
11915fi
11916
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011917
Illia Bobyra96d5442023-08-30 16:30:15 +020011918ac_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 +000011919# include <sys/param.h>
11920#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011921"
Illia Bobyra96d5442023-08-30 16:30:15 +020011922if test "x$ac_cv_header_sys_sysctl_h" = xyes
11923then :
11924 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011925
11926fi
11927
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011928
11929
Illia Bobyra96d5442023-08-30 16:30:15 +020011930{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11931printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011933/* end confdefs.h. */
11934
11935#include <pthread.h>
11936#include <pthread_np.h>
11937int
Illia Bobyra96d5442023-08-30 16:30:15 +020011938main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011939{
11940int i; i = 0;
11941 ;
11942 return 0;
11943}
11944_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011945if ac_fn_c_try_compile "$LINENO"
11946then :
11947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11948printf "%s\n" "yes" >&6; }
11949 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011950
Illia Bobyra96d5442023-08-30 16:30:15 +020011951else $as_nop
11952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11953printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011954fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011955rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011956
Illia Bobyra96d5442023-08-30 16:30:15 +020011957ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11958if test "x$ac_cv_header_strings_h" = xyes
11959then :
11960 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011961
11962fi
11963
Bram Moolenaard0573012017-10-28 21:11:06 +020011964if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011965 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000011966
11967else
Bram Moolenaar071d4272004-06-13 20:20:40 +000011968
Illia Bobyra96d5442023-08-30 16:30:15 +020011969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11970printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011971cppflags_save=$CPPFLAGS
11972CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011974/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011975
11976#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11977# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
11978 /* but don't do it on AIX 5.1 (Uribarri) */
11979#endif
11980#ifdef HAVE_XM_XM_H
11981# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
11982#endif
11983#ifdef HAVE_STRING_H
11984# include <string.h>
11985#endif
11986#if defined(HAVE_STRINGS_H)
11987# include <strings.h>
11988#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000011989
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011990int
Illia Bobyra96d5442023-08-30 16:30:15 +020011991main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011992{
11993int i; i = 0;
11994 ;
11995 return 0;
11996}
11997_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011998if ac_fn_c_try_compile "$LINENO"
11999then :
12000 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12001printf "%s\n" "yes" >&6; }
12002else $as_nop
12003 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012004
Illia Bobyra96d5442023-08-30 16:30:15 +020012005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012007fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012008rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012009CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000012010fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012011
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012012if test $ac_cv_c_compiler_gnu = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
12014printf %s "checking whether $CC needs -traditional... " >&6; }
12015if test ${ac_cv_prog_gcc_traditional+y}
12016then :
12017 printf %s "(cached) " >&6
12018else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012019 ac_pattern="Autoconf.*'x'"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012021/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012022#include <sgtty.h>
12023Autoconf TIOCGETP
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012024_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012025if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012026 $EGREP "$ac_pattern" >/dev/null 2>&1
12027then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012028 ac_cv_prog_gcc_traditional=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012029else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012030 ac_cv_prog_gcc_traditional=no
12031fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012032rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012033
12034
12035 if test $ac_cv_prog_gcc_traditional = no; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012037/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012038#include <termio.h>
12039Autoconf TCGETA
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012040_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012042 $EGREP "$ac_pattern" >/dev/null 2>&1
12043then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012044 ac_cv_prog_gcc_traditional=yes
12045fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012046rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012047
12048 fi
12049fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
12051printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012052 if test $ac_cv_prog_gcc_traditional = yes; then
12053 CC="$CC -traditional"
12054 fi
12055fi
12056
Illia Bobyra96d5442023-08-30 16:30:15 +020012057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12058printf %s "checking for an ANSI C-conforming const... " >&6; }
12059if test ${ac_cv_c_const+y}
12060then :
12061 printf %s "(cached) " >&6
12062else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012064/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012065
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012066int
Illia Bobyra96d5442023-08-30 16:30:15 +020012067main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012068{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012069
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012070#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012071 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012072 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012073 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012074 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012075 char const *const *pcpcc;
12076 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012077 /* NEC SVR4.0.2 mips cc rejects this. */
12078 struct point {int x, y;};
12079 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012080 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012081 It does not let you subtract one const X* pointer from another in
12082 an arm of an if-expression whose if-part is not a constant
12083 expression */
12084 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012085 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012086 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012087 ++pcpcc;
12088 ppc = (char**) pcpcc;
12089 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012090 { /* SCO 3.2v4 cc rejects this sort of thing. */
12091 char tx;
12092 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012093 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012094
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012095 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012096 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012097 }
12098 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12099 int x[] = {25, 17};
12100 const int *foo = &x[0];
12101 ++foo;
12102 }
12103 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12104 typedef const int *iptr;
12105 iptr p = 0;
12106 ++p;
12107 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012108 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012109 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012110 struct s { int j; const int *ap[3]; } bx;
12111 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012112 }
12113 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12114 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012115 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012116 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012117 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012118#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012119
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012120 ;
12121 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012122}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012123_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012124if ac_fn_c_try_compile "$LINENO"
12125then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012126 ac_cv_c_const=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012127else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012128 ac_cv_c_const=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012129fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012130rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012131fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12133printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012134if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012135
Illia Bobyra96d5442023-08-30 16:30:15 +020012136printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012137
12138fi
12139
Illia Bobyra96d5442023-08-30 16:30:15 +020012140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12141printf %s "checking for working volatile... " >&6; }
12142if test ${ac_cv_c_volatile+y}
12143then :
12144 printf %s "(cached) " >&6
12145else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012147/* end confdefs.h. */
12148
12149int
Illia Bobyra96d5442023-08-30 16:30:15 +020012150main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012151{
12152
12153volatile int x;
12154int * volatile y = (int *) 0;
12155return !x && !y;
12156 ;
12157 return 0;
12158}
12159_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012160if ac_fn_c_try_compile "$LINENO"
12161then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012162 ac_cv_c_volatile=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012163else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012164 ac_cv_c_volatile=no
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012165fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012166rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012167fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12169printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012170if test $ac_cv_c_volatile = no; then
12171
Illia Bobyra96d5442023-08-30 16:30:15 +020012172printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012173
12174fi
12175
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012176ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012177if test "x$ac_cv_type_mode_t" = xyes
12178then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012179
Illia Bobyra96d5442023-08-30 16:30:15 +020012180else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012181
Illia Bobyra96d5442023-08-30 16:30:15 +020012182printf "%s\n" "#define mode_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012183
12184fi
12185
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012186ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012187if test "x$ac_cv_type_off_t" = xyes
12188then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012189
Illia Bobyra96d5442023-08-30 16:30:15 +020012190else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012191
Illia Bobyra96d5442023-08-30 16:30:15 +020012192printf "%s\n" "#define off_t long int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012193
12194fi
12195
Bram Moolenaar071d4272004-06-13 20:20:40 +000012196
Illia Bobyra96d5442023-08-30 16:30:15 +020012197 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12198"
12199if test "x$ac_cv_type_pid_t" = xyes
12200then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012201
Illia Bobyra96d5442023-08-30 16:30:15 +020012202else $as_nop
12203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12204/* end confdefs.h. */
12205
12206 #if defined _WIN64 && !defined __CYGWIN__
12207 LLP64
12208 #endif
12209
12210int
12211main (void)
12212{
12213
12214 ;
12215 return 0;
12216}
12217
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012218_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012219if ac_fn_c_try_compile "$LINENO"
12220then :
12221 ac_pid_type='int'
12222else $as_nop
12223 ac_pid_type='__int64'
12224fi
12225rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12226
12227printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12228
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012229
12230fi
12231
Illia Bobyra96d5442023-08-30 16:30:15 +020012232
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012233ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012234if test "x$ac_cv_type_size_t" = xyes
12235then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012236
Illia Bobyra96d5442023-08-30 16:30:15 +020012237else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012238
Illia Bobyra96d5442023-08-30 16:30:15 +020012239printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012240
12241fi
12242
Illia Bobyra96d5442023-08-30 16:30:15 +020012243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12244printf %s "checking for uid_t in sys/types.h... " >&6; }
12245if test ${ac_cv_type_uid_t+y}
12246then :
12247 printf %s "(cached) " >&6
12248else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012250/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012251#include <sys/types.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012252
12253_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012255 $EGREP "uid_t" >/dev/null 2>&1
12256then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012257 ac_cv_type_uid_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012258else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012259 ac_cv_type_uid_t=no
12260fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012261rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012262
12263fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12265printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012266if test $ac_cv_type_uid_t = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000012267
Illia Bobyra96d5442023-08-30 16:30:15 +020012268printf "%s\n" "#define uid_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012269
12270
Illia Bobyra96d5442023-08-30 16:30:15 +020012271printf "%s\n" "#define gid_t int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012272
12273fi
12274
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012275ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12276case $ac_cv_c_uint32_t in #(
12277 no|yes) ;; #(
12278 *)
12279
Illia Bobyra96d5442023-08-30 16:30:15 +020012280printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012281
12282
Illia Bobyra96d5442023-08-30 16:30:15 +020012283printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012284;;
12285 esac
12286
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012287
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012288
Illia Bobyrf39842f2023-08-27 18:21:23 +020012289
12290
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012291ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012292if test "x$ac_cv_type_ino_t" = xyes
12293then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012294
Illia Bobyra96d5442023-08-30 16:30:15 +020012295else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012296
Illia Bobyra96d5442023-08-30 16:30:15 +020012297printf "%s\n" "#define ino_t long" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012298
12299fi
12300
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012301ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012302if test "x$ac_cv_type_dev_t" = xyes
12303then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012304
Illia Bobyra96d5442023-08-30 16:30:15 +020012305else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012306
Illia Bobyra96d5442023-08-30 16:30:15 +020012307printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012308
12309fi
12310
Illia Bobyra96d5442023-08-30 16:30:15 +020012311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12312printf %s "checking whether byte ordering is bigendian... " >&6; }
12313if test ${ac_cv_c_bigendian+y}
12314then :
12315 printf %s "(cached) " >&6
12316else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012317 ac_cv_c_bigendian=unknown
12318 # See if we're dealing with a universal compiler.
12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12320/* end confdefs.h. */
12321#ifndef __APPLE_CC__
12322 not a universal capable compiler
12323 #endif
12324 typedef int dummy;
12325
12326_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012327if ac_fn_c_try_compile "$LINENO"
12328then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012329
12330 # Check for potential -arch flags. It is not universal unless
12331 # there are at least two -arch flags with different values.
12332 ac_arch=
12333 ac_prev=
12334 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12335 if test -n "$ac_prev"; then
12336 case $ac_word in
12337 i?86 | x86_64 | ppc | ppc64)
12338 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12339 ac_arch=$ac_word
12340 else
12341 ac_cv_c_bigendian=universal
12342 break
12343 fi
12344 ;;
12345 esac
12346 ac_prev=
12347 elif test "x$ac_word" = "x-arch"; then
12348 ac_prev=arch
12349 fi
12350 done
12351fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012352rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012353 if test $ac_cv_c_bigendian = unknown; then
12354 # See if sys/param.h defines the BYTE_ORDER macro.
12355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12356/* end confdefs.h. */
12357#include <sys/types.h>
12358 #include <sys/param.h>
12359
12360int
Illia Bobyra96d5442023-08-30 16:30:15 +020012361main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012362{
12363#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12364 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12365 && LITTLE_ENDIAN)
12366 bogus endian macros
12367 #endif
12368
12369 ;
12370 return 0;
12371}
12372_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012373if ac_fn_c_try_compile "$LINENO"
12374then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012375 # It does; now see whether it defined to BIG_ENDIAN or not.
12376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12377/* end confdefs.h. */
12378#include <sys/types.h>
12379 #include <sys/param.h>
12380
12381int
Illia Bobyra96d5442023-08-30 16:30:15 +020012382main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012383{
12384#if BYTE_ORDER != BIG_ENDIAN
12385 not big endian
12386 #endif
12387
12388 ;
12389 return 0;
12390}
12391_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012392if ac_fn_c_try_compile "$LINENO"
12393then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012394 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012395else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012396 ac_cv_c_bigendian=no
12397fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012398rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012399fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012400rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012401 fi
12402 if test $ac_cv_c_bigendian = unknown; then
12403 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12405/* end confdefs.h. */
12406#include <limits.h>
12407
12408int
Illia Bobyra96d5442023-08-30 16:30:15 +020012409main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012410{
12411#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12412 bogus endian macros
12413 #endif
12414
12415 ;
12416 return 0;
12417}
12418_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012419if ac_fn_c_try_compile "$LINENO"
12420then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012421 # It does; now see whether it defined to _BIG_ENDIAN or not.
12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12423/* end confdefs.h. */
12424#include <limits.h>
12425
12426int
Illia Bobyra96d5442023-08-30 16:30:15 +020012427main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012428{
12429#ifndef _BIG_ENDIAN
12430 not big endian
12431 #endif
12432
12433 ;
12434 return 0;
12435}
12436_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012437if ac_fn_c_try_compile "$LINENO"
12438then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012439 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012440else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012441 ac_cv_c_bigendian=no
12442fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012443rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012444fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012445rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012446 fi
12447 if test $ac_cv_c_bigendian = unknown; then
12448 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012449 if test "$cross_compiling" = yes
12450then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012451 # Try to guess by grepping values from an object file.
12452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12453/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012454unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012455 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012456 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012457 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12458 int use_ascii (int i) {
12459 return ascii_mm[i] + ascii_ii[i];
12460 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012461 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012462 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012463 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012464 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12465 int use_ebcdic (int i) {
12466 return ebcdic_mm[i] + ebcdic_ii[i];
12467 }
12468 extern int foo;
12469
12470int
Illia Bobyra96d5442023-08-30 16:30:15 +020012471main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012472{
12473return use_ascii (foo) == use_ebcdic (foo);
12474 ;
12475 return 0;
12476}
12477_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012478if ac_fn_c_try_compile "$LINENO"
12479then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012480 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12481 ac_cv_c_bigendian=yes
12482 fi
12483 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12484 if test "$ac_cv_c_bigendian" = unknown; then
12485 ac_cv_c_bigendian=no
12486 else
12487 # finding both strings is unlikely to happen, but who knows?
12488 ac_cv_c_bigendian=unknown
12489 fi
12490 fi
12491fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012492rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12493else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12495/* end confdefs.h. */
12496$ac_includes_default
12497int
Illia Bobyra96d5442023-08-30 16:30:15 +020012498main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012499{
12500
12501 /* Are we little or big endian? From Harbison&Steele. */
12502 union
12503 {
12504 long int l;
12505 char c[sizeof (long int)];
12506 } u;
12507 u.l = 1;
12508 return u.c[sizeof (long int) - 1] == 1;
12509
12510 ;
12511 return 0;
12512}
12513_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012514if ac_fn_c_try_run "$LINENO"
12515then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012516 ac_cv_c_bigendian=no
Illia Bobyra96d5442023-08-30 16:30:15 +020012517else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012518 ac_cv_c_bigendian=yes
12519fi
12520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12521 conftest.$ac_objext conftest.beam conftest.$ac_ext
12522fi
12523
12524 fi
12525fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12527printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012528 case $ac_cv_c_bigendian in #(
12529 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020012530 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012531;; #(
12532 no)
12533 ;; #(
12534 universal)
12535
Illia Bobyra96d5442023-08-30 16:30:15 +020012536printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012537
12538 ;; #(
12539 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010012540 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012541 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12542 esac
12543
Illia Bobyra96d5442023-08-30 16:30:15 +020012544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12545printf %s "checking for inline... " >&6; }
12546if test ${ac_cv_c_inline+y}
12547then :
12548 printf %s "(cached) " >&6
12549else $as_nop
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012550 ac_cv_c_inline=no
12551for ac_kw in inline __inline__ __inline; do
12552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12553/* end confdefs.h. */
12554#ifndef __cplusplus
12555typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020012556static $ac_kw foo_t static_foo (void) {return 0; }
12557$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012558#endif
12559
12560_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012561if ac_fn_c_try_compile "$LINENO"
12562then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012563 ac_cv_c_inline=$ac_kw
12564fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012565rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012566 test "$ac_cv_c_inline" != no && break
12567done
12568
12569fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12571printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012572
12573case $ac_cv_c_inline in
12574 inline | yes) ;;
12575 *)
12576 case $ac_cv_c_inline in
12577 no) ac_val=;;
12578 *) ac_val=$ac_cv_c_inline;;
12579 esac
12580 cat >>confdefs.h <<_ACEOF
12581#ifndef __cplusplus
12582#define inline $ac_val
12583#endif
12584_ACEOF
12585 ;;
12586esac
12587
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012588
Illia Bobyra96d5442023-08-30 16:30:15 +020012589{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
12590printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012591if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
12593printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012594else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012596/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012597
12598#include <sys/types.h>
12599#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012600# include <stdlib.h>
12601# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012602#endif
12603#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000012604# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012605#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012606
12607_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012608if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012609 $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
12610then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012611 ac_cv_type_rlim_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012612else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012613 ac_cv_type_rlim_t=no
12614fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012615rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012616
Illia Bobyra96d5442023-08-30 16:30:15 +020012617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
12618printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012619fi
12620if test $ac_cv_type_rlim_t = no; then
12621 cat >> confdefs.h <<\EOF
12622#define rlim_t unsigned long
12623EOF
12624fi
12625
Illia Bobyra96d5442023-08-30 16:30:15 +020012626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
12627printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012628if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012629 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
12630printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012631else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012633/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012634
12635#include <sys/types.h>
12636#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012637# include <stdlib.h>
12638# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012639#endif
12640#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012641
12642_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012643if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012644 $EGREP "stack_t" >/dev/null 2>&1
12645then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012646 ac_cv_type_stack_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012647else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012648 ac_cv_type_stack_t=no
12649fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012650rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012651
Illia Bobyra96d5442023-08-30 16:30:15 +020012652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
12653printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012654fi
12655if test $ac_cv_type_stack_t = no; then
12656 cat >> confdefs.h <<\EOF
12657#define stack_t struct sigaltstack
12658EOF
12659fi
12660
Illia Bobyra96d5442023-08-30 16:30:15 +020012661{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
12662printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012664/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012665
12666#include <sys/types.h>
12667#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012668# include <stdlib.h>
12669# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012670#endif
12671#include <signal.h>
12672#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012673
12674int
Illia Bobyra96d5442023-08-30 16:30:15 +020012675main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012676{
12677stack_t sigstk; sigstk.ss_base = 0;
12678 ;
12679 return 0;
12680}
12681_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012682if ac_fn_c_try_compile "$LINENO"
12683then :
12684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12685printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012686
Illia Bobyra96d5442023-08-30 16:30:15 +020012687else $as_nop
12688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012690fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012691rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012692
12693olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020012694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
12695printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012696
Bram Moolenaar446cb832008-06-24 21:56:24 +000012697# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020012698if test ${with_tlib+y}
12699then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012700 withval=$with_tlib;
12701fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012702
12703if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
12705printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012706 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020012707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
12708printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012710/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012711
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012712int
Illia Bobyra96d5442023-08-30 16:30:15 +020012713main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012714{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012715
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012716 ;
12717 return 0;
12718}
12719_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012720if ac_fn_c_try_link "$LINENO"
12721then :
12722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
12723printf "%s\n" "OK" >&6; }
12724else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012725 as_fn_error $? "FAILED" "$LINENO" 5
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012726fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012727rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012728 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012729 olibs="$LIBS"
12730else
Illia Bobyra96d5442023-08-30 16:30:15 +020012731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
12732printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000012733 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010012734 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
12735 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012736 esac
12737 for libname in $tlibs; do
Illia Bobyra96d5442023-08-30 16:30:15 +020012738 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | $as_tr_sh`
12739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
12740printf %s "checking for tgetent in -l${libname}... " >&6; }
12741if eval test \${$as_ac_Lib+y}
12742then :
12743 printf %s "(cached) " >&6
12744else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012745 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000012746LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012748/* end confdefs.h. */
12749
Bram Moolenaar446cb832008-06-24 21:56:24 +000012750/* Override any GCC internal prototype to avoid an error.
12751 Use char because int might match the return type of a GCC
12752 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012753char tgetent ();
12754int
Illia Bobyra96d5442023-08-30 16:30:15 +020012755main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012756{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012757return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012758 ;
12759 return 0;
12760}
12761_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012762if ac_fn_c_try_link "$LINENO"
12763then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012764 eval "$as_ac_Lib=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020012765else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012766 eval "$as_ac_Lib=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012767fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012768rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012769 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012770LIBS=$ac_check_lib_save_LIBS
12771fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012772eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020012773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12774printf "%s\n" "$ac_res" >&6; }
12775if eval test \"x\$"$as_ac_Lib"\" = x"yes"
12776then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012777 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012778#define `printf "%s\n" "HAVE_LIB${libname}" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012779_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012780
12781 LIBS="-l${libname} $LIBS"
12782
Bram Moolenaar071d4272004-06-13 20:20:40 +000012783fi
12784
12785 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012786 if test "$cross_compiling" = yes
12787then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012788 res="FAIL"
Illia Bobyra96d5442023-08-30 16:30:15 +020012789else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012791/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012792
12793#ifdef HAVE_TERMCAP_H
12794# include <termcap.h>
12795#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012796#if STDC_HEADERS
12797# include <stdlib.h>
12798# include <stddef.h>
12799#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012800int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012801_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012802if ac_fn_c_try_run "$LINENO"
12803then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012804 res="OK"
Illia Bobyra96d5442023-08-30 16:30:15 +020012805else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012806 res="FAIL"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012807fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012810fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012811
Bram Moolenaar071d4272004-06-13 20:20:40 +000012812 if test "$res" = "OK"; then
12813 break
12814 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12816printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012817 LIBS="$olibs"
12818 fi
12819 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012820 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12822printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012823 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012824fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012825
12826if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12828printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012830/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020012831int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012832int
Illia Bobyra96d5442023-08-30 16:30:15 +020012833main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012834{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012835char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012836 ;
12837 return 0;
12838}
12839_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012840if ac_fn_c_try_link "$LINENO"
12841then :
12842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12843printf "%s\n" "yes" >&6; }
12844else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012845 as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012846 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020012847 On Linux that would be the libncurses-dev package.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012848 Or specify the name of the library with --with-tlib." "$LINENO" 5
12849fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012850rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012851 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012852fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012853
Illia Bobyra96d5442023-08-30 16:30:15 +020012854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12855printf %s "checking whether we talk terminfo... " >&6; }
12856if test ${vim_cv_terminfo+y}
12857then :
12858 printf %s "(cached) " >&6
12859else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012860
Illia Bobyra96d5442023-08-30 16:30:15 +020012861 if test "$cross_compiling" = yes
12862then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012863
Bram Moolenaar7db77842014-03-27 17:40:59 +010012864 as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012865
Illia Bobyra96d5442023-08-30 16:30:15 +020012866else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12868/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012869
Bram Moolenaar446cb832008-06-24 21:56:24 +000012870#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012871#ifdef HAVE_TERMCAP_H
12872# include <termcap.h>
12873#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012874#ifdef HAVE_STRING_H
12875# include <string.h>
12876#endif
12877#if STDC_HEADERS
12878# include <stdlib.h>
12879# include <stddef.h>
12880#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012881int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012882{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012883
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012884_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012885if ac_fn_c_try_run "$LINENO"
12886then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012887
12888 vim_cv_terminfo=no
12889
Illia Bobyra96d5442023-08-30 16:30:15 +020012890else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012891
12892 vim_cv_terminfo=yes
12893
12894fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012897fi
12898
12899
Bram Moolenaar446cb832008-06-24 21:56:24 +000012900fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12902printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012903
12904if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012905 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012906
12907fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012908
Illia Bobyra96d5442023-08-30 16:30:15 +020012909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12910printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
12911if test ${vim_cv_tgetent+y}
12912then :
12913 printf %s "(cached) " >&6
12914else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012915
Illia Bobyra96d5442023-08-30 16:30:15 +020012916 if test "$cross_compiling" = yes
12917then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012918
Bram Moolenaar696cbd22017-04-28 15:45:46 +020012919 as_fn_error $? "failed to compile test program." "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012920
Illia Bobyra96d5442023-08-30 16:30:15 +020012921else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012924
Bram Moolenaar446cb832008-06-24 21:56:24 +000012925#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012926#ifdef HAVE_TERMCAP_H
12927# include <termcap.h>
12928#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012929#if STDC_HEADERS
12930# include <stdlib.h>
12931# include <stddef.h>
12932#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012933int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012934{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012935
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012936_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012937if ac_fn_c_try_run "$LINENO"
12938then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012939
Bram Moolenaara88254f2017-11-02 23:04:14 +010012940 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000012941
Illia Bobyra96d5442023-08-30 16:30:15 +020012942else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012943
Bram Moolenaara88254f2017-11-02 23:04:14 +010012944 vim_cv_tgetent=non-zero
Bram Moolenaar446cb832008-06-24 21:56:24 +000012945
Bram Moolenaar071d4272004-06-13 20:20:40 +000012946fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012949fi
12950
Bram Moolenaar446cb832008-06-24 21:56:24 +000012951
Bram Moolenaar446cb832008-06-24 21:56:24 +000012952fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12954printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012955
Bram Moolenaara88254f2017-11-02 23:04:14 +010012956if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012957 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012958
Bram Moolenaar446cb832008-06-24 21:56:24 +000012959fi
12960
Illia Bobyra96d5442023-08-30 16:30:15 +020012961{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12962printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012964/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012965
12966#ifdef HAVE_TERMCAP_H
12967# include <termcap.h>
12968#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012969
12970int
Illia Bobyra96d5442023-08-30 16:30:15 +020012971main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012972{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012973ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012974 ;
12975 return 0;
12976}
12977_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012978if ac_fn_c_try_link "$LINENO"
12979then :
12980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12981printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012982
Illia Bobyra96d5442023-08-30 16:30:15 +020012983else $as_nop
12984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12985printf "%s\n" "no" >&6; }
12986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12987printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012989/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012990
12991#ifdef HAVE_TERMCAP_H
12992# include <termcap.h>
12993#endif
12994extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012995
12996int
Illia Bobyra96d5442023-08-30 16:30:15 +020012997main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012998{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012999ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013000 ;
13001 return 0;
13002}
13003_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013004if ac_fn_c_try_link "$LINENO"
13005then :
13006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13007printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013008
Illia Bobyra96d5442023-08-30 16:30:15 +020013009else $as_nop
13010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13011printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013012fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013013rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013014 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013015
13016fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013017rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013018 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013019
Illia Bobyra96d5442023-08-30 16:30:15 +020013020{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
13021printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013023/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013024
13025#ifdef HAVE_TERMCAP_H
13026# include <termcap.h>
13027#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013028
13029int
Illia Bobyra96d5442023-08-30 16:30:15 +020013030main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013031{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013032if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013033 ;
13034 return 0;
13035}
13036_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013037if ac_fn_c_try_link "$LINENO"
13038then :
13039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13040printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013041
Illia Bobyra96d5442023-08-30 16:30:15 +020013042else $as_nop
13043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13044printf "%s\n" "no" >&6; }
13045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13046printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013048/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013049
13050#ifdef HAVE_TERMCAP_H
13051# include <termcap.h>
13052#endif
13053extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013054
13055int
Illia Bobyra96d5442023-08-30 16:30:15 +020013056main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013057{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013058if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013059 ;
13060 return 0;
13061}
13062_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013063if ac_fn_c_try_link "$LINENO"
13064then :
13065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13066printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013067
Illia Bobyra96d5442023-08-30 16:30:15 +020013068else $as_nop
13069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13070printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013071fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013072rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013073 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013074
13075fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013076rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013077 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013078
Illia Bobyra96d5442023-08-30 16:30:15 +020013079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13080printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013082/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013083
13084#ifdef HAVE_TERMCAP_H
13085# include <termcap.h>
13086#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013087
13088int
Illia Bobyra96d5442023-08-30 16:30:15 +020013089main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013090{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013091extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013092 ;
13093 return 0;
13094}
13095_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013096if ac_fn_c_try_compile "$LINENO"
13097then :
13098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13099printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013100
Illia Bobyra96d5442023-08-30 16:30:15 +020013101else $as_nop
13102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13103printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013104fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013105rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013106
Illia Bobyra96d5442023-08-30 16:30:15 +020013107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13108printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13110/* end confdefs.h. */
13111
13112#ifdef HAVE_TERMCAP_H
13113# include <termcap.h>
13114#endif
13115#include <term.h>
13116
13117int
Illia Bobyra96d5442023-08-30 16:30:15 +020013118main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013119{
13120if (cur_term) del_curterm(cur_term);
13121 ;
13122 return 0;
13123}
13124_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013125if ac_fn_c_try_link "$LINENO"
13126then :
13127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13128printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013129
Illia Bobyra96d5442023-08-30 16:30:15 +020013130else $as_nop
13131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13132printf "%s\n" "no" >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013133fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013134rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013135 conftest$ac_exeext conftest.$ac_ext
13136
Illia Bobyra96d5442023-08-30 16:30:15 +020013137{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13138printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013140/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013141
13142#include <sys/types.h>
13143#include <sys/time.h>
13144#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013145int
Illia Bobyra96d5442023-08-30 16:30:15 +020013146main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013147{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013148
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013149 ;
13150 return 0;
13151}
13152_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013153if ac_fn_c_try_compile "$LINENO"
13154then :
13155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13156printf "%s\n" "yes" >&6; }
13157 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013158
Illia Bobyra96d5442023-08-30 16:30:15 +020013159else $as_nop
13160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13161printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013162fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013163rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013164
Illia Bobyra96d5442023-08-30 16:30:15 +020013165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13166printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013167if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013168 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013169
Illia Bobyra96d5442023-08-30 16:30:15 +020013170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13171printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013172else
Illia Bobyra96d5442023-08-30 16:30:15 +020013173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13174printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013175fi
13176
Illia Bobyra96d5442023-08-30 16:30:15 +020013177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13178printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013179if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013181/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013182
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013183// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13184char *ptsname(int);
13185int unlockpt(int);
13186int grantpt(int);
13187
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013188int
Illia Bobyra96d5442023-08-30 16:30:15 +020013189main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013190{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013191
13192 ptsname(0);
13193 grantpt(0);
13194 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013195 ;
13196 return 0;
13197}
13198_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013199if ac_fn_c_try_link "$LINENO"
13200then :
13201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13202printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013203
Illia Bobyra96d5442023-08-30 16:30:15 +020013204else $as_nop
13205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13206printf "%s\n" "no" >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013207fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013208rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013209 conftest$ac_exeext conftest.$ac_ext
13210else
Illia Bobyra96d5442023-08-30 16:30:15 +020013211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013213fi
13214
Illia Bobyra96d5442023-08-30 16:30:15 +020013215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13216printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013217if test -d /dev/ptym ; then
13218 pdir='/dev/ptym'
13219else
13220 pdir='/dev'
13221fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013223/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013224#ifdef M_UNIX
13225 yes;
13226#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013227
13228_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020013230 $EGREP "yes" >/dev/null 2>&1
13231then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013232 ptys=`echo /dev/ptyp??`
Illia Bobyra96d5442023-08-30 16:30:15 +020013233else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000013234 ptys=`echo $pdir/pty??`
13235fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013236rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013237
13238if test "$ptys" != "$pdir/pty??" ; then
13239 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13240 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013241 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013242
Illia Bobyra96d5442023-08-30 16:30:15 +020013243 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013244
Illia Bobyra96d5442023-08-30 16:30:15 +020013245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13246printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013247else
Illia Bobyra96d5442023-08-30 16:30:15 +020013248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13249printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013250fi
13251
Bram Moolenaar446cb832008-06-24 21:56:24 +000013252
Illia Bobyra96d5442023-08-30 16:30:15 +020013253{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13254printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013256/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013257
13258#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013259int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013260{
13261 struct sigcontext *scont;
13262 scont = (struct sigcontext *)0;
13263 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013264}
13265int
Illia Bobyra96d5442023-08-30 16:30:15 +020013266main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013267{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013268
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013269 ;
13270 return 0;
13271}
13272_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013273if ac_fn_c_try_compile "$LINENO"
13274then :
13275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13276printf "%s\n" "yes" >&6; }
13277 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013278
Illia Bobyra96d5442023-08-30 16:30:15 +020013279else $as_nop
13280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13281printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013282fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013283rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013284
Illia Bobyra96d5442023-08-30 16:30:15 +020013285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13286printf %s "checking getcwd implementation is broken... " >&6; }
13287if test ${vim_cv_getcwd_broken+y}
13288then :
13289 printf %s "(cached) " >&6
13290else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013291
Illia Bobyra96d5442023-08-30 16:30:15 +020013292 if test "$cross_compiling" = yes
13293then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013294
Bram Moolenaar7db77842014-03-27 17:40:59 +010013295 as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000013296
Illia Bobyra96d5442023-08-30 16:30:15 +020013297else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13299/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013300
Bram Moolenaar446cb832008-06-24 21:56:24 +000013301#include "confdefs.h"
13302#ifdef HAVE_UNISTD_H
13303#include <unistd.h>
13304#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013305char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013306int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013307{
13308 char buffer[500];
13309 extern char **environ;
13310 environ = dagger;
13311 return getcwd(buffer, 500) ? 0 : 1;
13312}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013313
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013314_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013315if ac_fn_c_try_run "$LINENO"
13316then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013317
13318 vim_cv_getcwd_broken=no
13319
Illia Bobyra96d5442023-08-30 16:30:15 +020013320else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013321
13322 vim_cv_getcwd_broken=yes
13323
13324fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013327fi
13328
13329
Bram Moolenaar446cb832008-06-24 21:56:24 +000013330fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13332printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013333
13334if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013335 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013336
Bram Moolenaar63d25552019-05-10 21:28:38 +020013337 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013338if test "x$ac_cv_func_getwd" = xyes
13339then :
13340 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013341
Bram Moolenaar071d4272004-06-13 20:20:40 +000013342fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013343
Illia Bobyra96d5442023-08-30 16:30:15 +020013344fi
13345
13346ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13347if test "x$ac_cv_func_fchdir" = xyes
13348then :
13349 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013350
Bram Moolenaar071d4272004-06-13 20:20:40 +000013351fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013352ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13353if test "x$ac_cv_func_fchown" = xyes
13354then :
13355 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013356
Illia Bobyra96d5442023-08-30 16:30:15 +020013357fi
13358ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13359if test "x$ac_cv_func_fchmod" = xyes
13360then :
13361 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13362
13363fi
13364ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13365if test "x$ac_cv_func_fsync" = xyes
13366then :
13367 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13368
13369fi
13370ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13371if test "x$ac_cv_func_getcwd" = xyes
13372then :
13373 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13374
13375fi
13376ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13377if test "x$ac_cv_func_getpseudotty" = xyes
13378then :
13379 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13380
13381fi
13382ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13383if test "x$ac_cv_func_getpwent" = xyes
13384then :
13385 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13386
13387fi
13388ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13389if test "x$ac_cv_func_getpwnam" = xyes
13390then :
13391 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13392
13393fi
13394ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13395if test "x$ac_cv_func_getpwuid" = xyes
13396then :
13397 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13398
13399fi
13400ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13401if test "x$ac_cv_func_getrlimit" = xyes
13402then :
13403 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13404
13405fi
13406ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13407if test "x$ac_cv_func_gettimeofday" = xyes
13408then :
13409 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13410
13411fi
13412ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13413if test "x$ac_cv_func_localtime_r" = xyes
13414then :
13415 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13416
13417fi
13418ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13419if test "x$ac_cv_func_lstat" = xyes
13420then :
13421 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13422
13423fi
13424ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13425if test "x$ac_cv_func_memset" = xyes
13426then :
13427 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13428
13429fi
13430ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13431if test "x$ac_cv_func_mkdtemp" = xyes
13432then :
13433 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13434
13435fi
13436ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13437if test "x$ac_cv_func_nanosleep" = xyes
13438then :
13439 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13440
13441fi
13442ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13443if test "x$ac_cv_func_opendir" = xyes
13444then :
13445 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13446
13447fi
13448ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13449if test "x$ac_cv_func_putenv" = xyes
13450then :
13451 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13452
13453fi
13454ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13455if test "x$ac_cv_func_qsort" = xyes
13456then :
13457 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13458
13459fi
13460ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13461if test "x$ac_cv_func_readlink" = xyes
13462then :
13463 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13464
13465fi
13466ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13467if test "x$ac_cv_func_select" = xyes
13468then :
13469 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13470
13471fi
13472ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13473if test "x$ac_cv_func_setenv" = xyes
13474then :
13475 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13476
13477fi
13478ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13479if test "x$ac_cv_func_getpgid" = xyes
13480then :
13481 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13482
13483fi
13484ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13485if test "x$ac_cv_func_setpgid" = xyes
13486then :
13487 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13488
13489fi
13490ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13491if test "x$ac_cv_func_setsid" = xyes
13492then :
13493 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13494
13495fi
13496ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13497if test "x$ac_cv_func_sigaltstack" = xyes
13498then :
13499 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13500
13501fi
13502ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
13503if test "x$ac_cv_func_sigstack" = xyes
13504then :
13505 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
13506
13507fi
13508ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
13509if test "x$ac_cv_func_sigset" = xyes
13510then :
13511 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
13512
13513fi
13514ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
13515if test "x$ac_cv_func_sigsetjmp" = xyes
13516then :
13517 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
13518
13519fi
13520ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13521if test "x$ac_cv_func_sigaction" = xyes
13522then :
13523 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13524
13525fi
13526ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
13527if test "x$ac_cv_func_sigprocmask" = xyes
13528then :
13529 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
13530
13531fi
13532ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
13533if test "x$ac_cv_func_sigvec" = xyes
13534then :
13535 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
13536
13537fi
13538ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
13539if test "x$ac_cv_func_strcasecmp" = xyes
13540then :
13541 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
13542
13543fi
13544ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
13545if test "x$ac_cv_func_strcoll" = xyes
13546then :
13547 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
13548
13549fi
13550ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13551if test "x$ac_cv_func_strerror" = xyes
13552then :
13553 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
13554
13555fi
13556ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13557if test "x$ac_cv_func_strftime" = xyes
13558then :
13559 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13560
13561fi
13562ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
13563if test "x$ac_cv_func_stricmp" = xyes
13564then :
13565 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
13566
13567fi
13568ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13569if test "x$ac_cv_func_strncasecmp" = xyes
13570then :
13571 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
13572
13573fi
13574ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
13575if test "x$ac_cv_func_strnicmp" = xyes
13576then :
13577 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
13578
13579fi
13580ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
13581if test "x$ac_cv_func_strpbrk" = xyes
13582then :
13583 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
13584
13585fi
13586ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
13587if test "x$ac_cv_func_strptime" = xyes
13588then :
13589 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
13590
13591fi
13592ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13593if test "x$ac_cv_func_strtol" = xyes
13594then :
13595 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
13596
13597fi
13598ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
13599if test "x$ac_cv_func_tgetent" = xyes
13600then :
13601 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
13602
13603fi
13604ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13605if test "x$ac_cv_func_towlower" = xyes
13606then :
13607 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
13608
13609fi
13610ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
13611if test "x$ac_cv_func_towupper" = xyes
13612then :
13613 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
13614
13615fi
13616ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
13617if test "x$ac_cv_func_iswupper" = xyes
13618then :
13619 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
13620
13621fi
13622ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
13623if test "x$ac_cv_func_tzset" = xyes
13624then :
13625 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
13626
13627fi
13628ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
13629if test "x$ac_cv_func_usleep" = xyes
13630then :
13631 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
13632
13633fi
13634ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
13635if test "x$ac_cv_func_utime" = xyes
13636then :
13637 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
13638
13639fi
13640ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13641if test "x$ac_cv_func_utimes" = xyes
13642then :
13643 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13644
13645fi
13646ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
13647if test "x$ac_cv_func_mblen" = xyes
13648then :
13649 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
13650
13651fi
13652ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13653if test "x$ac_cv_func_ftruncate" = xyes
13654then :
13655 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13656
13657fi
13658ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13659if test "x$ac_cv_func_unsetenv" = xyes
13660then :
13661 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
13662
13663fi
13664ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
13665if test "x$ac_cv_func_posix_openpt" = xyes
13666then :
13667 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
13668
13669fi
13670ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13671if test "x$ac_cv_func_clock_gettime" = xyes
13672then :
13673 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013674
13675fi
13676
Bram Moolenaar643b6142018-09-12 20:29:09 +020013677
Illia Bobyra96d5442023-08-30 16:30:15 +020013678
13679
13680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
13681printf %s "checking types of arguments for select... " >&6; }
13682if test ${ac_cv_func_select_args+y}
13683then :
13684 printf %s "(cached) " >&6
13685else $as_nop
13686 ac_cv_func_select_args='int,int *,struct timeval *'
13687for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020013688 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
13689 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
13690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13691/* end confdefs.h. */
13692$ac_includes_default
13693#ifdef HAVE_SYS_SELECT_H
13694# include <sys/select.h>
13695#endif
13696#ifdef HAVE_SYS_SOCKET_H
13697# include <sys/socket.h>
13698#endif
13699
13700int
Illia Bobyra96d5442023-08-30 16:30:15 +020013701main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020013702{
13703extern int select ($ac_arg1,
13704 $ac_arg234, $ac_arg234, $ac_arg234,
13705 $ac_arg5);
13706 ;
13707 return 0;
13708}
13709_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013710if ac_fn_c_try_compile "$LINENO"
13711then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020013712 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
13713fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013714rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020013715 done
13716 done
13717done
Bram Moolenaar643b6142018-09-12 20:29:09 +020013718
13719fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
13721printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020013722ac_save_IFS=$IFS; IFS=','
13723set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
13724IFS=$ac_save_IFS
13725shift
13726
Illia Bobyra96d5442023-08-30 16:30:15 +020013727printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013728
13729
Illia Bobyra96d5442023-08-30 16:30:15 +020013730printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013731
13732
Illia Bobyra96d5442023-08-30 16:30:15 +020013733printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013734
Illia Bobyra96d5442023-08-30 16:30:15 +020013735rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020013736
Illia Bobyra96d5442023-08-30 16:30:15 +020013737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13738printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13739if test ${ac_cv_sys_largefile_source+y}
13740then :
13741 printf %s "(cached) " >&6
13742else $as_nop
Bram Moolenaar25153e12010-02-24 14:47:08 +010013743 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013745/* end confdefs.h. */
13746#include <sys/types.h> /* for off_t */
13747 #include <stdio.h>
13748int
Illia Bobyra96d5442023-08-30 16:30:15 +020013749main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013750{
13751int (*fp) (FILE *, off_t, int) = fseeko;
13752 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13753 ;
13754 return 0;
13755}
13756_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013757if ac_fn_c_try_link "$LINENO"
13758then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013759 ac_cv_sys_largefile_source=no; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013760fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013761rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013762 conftest$ac_exeext conftest.$ac_ext
13763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013764/* end confdefs.h. */
13765#define _LARGEFILE_SOURCE 1
13766#include <sys/types.h> /* for off_t */
13767 #include <stdio.h>
13768int
Illia Bobyra96d5442023-08-30 16:30:15 +020013769main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013770{
13771int (*fp) (FILE *, off_t, int) = fseeko;
13772 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13773 ;
13774 return 0;
13775}
13776_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013777if ac_fn_c_try_link "$LINENO"
13778then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013779 ac_cv_sys_largefile_source=1; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013780fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013781rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013782 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013783 ac_cv_sys_largefile_source=unknown
13784 break
13785done
13786fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013787{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13788printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
Bram Moolenaar25153e12010-02-24 14:47:08 +010013789case $ac_cv_sys_largefile_source in #(
13790 no | unknown) ;;
13791 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013792printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013793;;
13794esac
13795rm -rf conftest*
13796
13797# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13798# in glibc 2.1.3, but that breaks too many other things.
13799# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13800if test $ac_cv_sys_largefile_source != unknown; then
13801
Illia Bobyra96d5442023-08-30 16:30:15 +020013802printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013803
13804fi
13805
Bram Moolenaar071d4272004-06-13 20:20:40 +000013806
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013807# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013808if test ${enable_largefile+y}
13809then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013810 enableval=$enable_largefile;
13811fi
13812
13813if test "$enable_largefile" != no; then
13814
Illia Bobyra96d5442023-08-30 16:30:15 +020013815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13816printf %s "checking for special C compiler options needed for large files... " >&6; }
13817if test ${ac_cv_sys_largefile_CC+y}
13818then :
13819 printf %s "(cached) " >&6
13820else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013821 ac_cv_sys_largefile_CC=no
13822 if test "$GCC" != yes; then
13823 ac_save_CC=$CC
13824 while :; do
13825 # IRIX 6.2 and later do not support large files by default,
13826 # so use the C compiler's -n32 option if that helps.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013828/* end confdefs.h. */
13829#include <sys/types.h>
13830 /* Check that off_t can represent 2**63 - 1 correctly.
13831 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13832 since some C++ compilers masquerading as C compilers
13833 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013834#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013835 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13836 && LARGE_OFF_T % 2147483647 == 1)
13837 ? 1 : -1];
13838int
Illia Bobyra96d5442023-08-30 16:30:15 +020013839main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013840{
13841
13842 ;
13843 return 0;
13844}
13845_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013846 if ac_fn_c_try_compile "$LINENO"
13847then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013848 break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013849fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013850rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013851 CC="$CC -n32"
Illia Bobyra96d5442023-08-30 16:30:15 +020013852 if ac_fn_c_try_compile "$LINENO"
13853then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013854 ac_cv_sys_largefile_CC=' -n32'; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013855fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013856rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013857 break
13858 done
13859 CC=$ac_save_CC
13860 rm -f conftest.$ac_ext
13861 fi
13862fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13864printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013865 if test "$ac_cv_sys_largefile_CC" != no; then
13866 CC=$CC$ac_cv_sys_largefile_CC
13867 fi
13868
Illia Bobyra96d5442023-08-30 16:30:15 +020013869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13870printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13871if test ${ac_cv_sys_file_offset_bits+y}
13872then :
13873 printf %s "(cached) " >&6
13874else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013875 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013877/* end confdefs.h. */
13878#include <sys/types.h>
13879 /* Check that off_t can represent 2**63 - 1 correctly.
13880 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13881 since some C++ compilers masquerading as C compilers
13882 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013883#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013884 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13885 && LARGE_OFF_T % 2147483647 == 1)
13886 ? 1 : -1];
13887int
Illia Bobyra96d5442023-08-30 16:30:15 +020013888main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013889{
13890
13891 ;
13892 return 0;
13893}
13894_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013895if ac_fn_c_try_compile "$LINENO"
13896then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013897 ac_cv_sys_file_offset_bits=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013898fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013899rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013901/* end confdefs.h. */
13902#define _FILE_OFFSET_BITS 64
13903#include <sys/types.h>
13904 /* Check that off_t can represent 2**63 - 1 correctly.
13905 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13906 since some C++ compilers masquerading as C compilers
13907 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013908#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013909 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13910 && LARGE_OFF_T % 2147483647 == 1)
13911 ? 1 : -1];
13912int
Illia Bobyra96d5442023-08-30 16:30:15 +020013913main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013914{
13915
13916 ;
13917 return 0;
13918}
13919_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013920if ac_fn_c_try_compile "$LINENO"
13921then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013922 ac_cv_sys_file_offset_bits=64; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013923fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013924rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013925 ac_cv_sys_file_offset_bits=unknown
13926 break
13927done
13928fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013929{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13930printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013931case $ac_cv_sys_file_offset_bits in #(
13932 no | unknown) ;;
13933 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013934printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013935;;
13936esac
13937rm -rf conftest*
13938 if test $ac_cv_sys_file_offset_bits = unknown; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13940printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13941if test ${ac_cv_sys_large_files+y}
13942then :
13943 printf %s "(cached) " >&6
13944else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013945 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013947/* end confdefs.h. */
13948#include <sys/types.h>
13949 /* Check that off_t can represent 2**63 - 1 correctly.
13950 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13951 since some C++ compilers masquerading as C compilers
13952 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013953#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013954 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13955 && LARGE_OFF_T % 2147483647 == 1)
13956 ? 1 : -1];
13957int
Illia Bobyra96d5442023-08-30 16:30:15 +020013958main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013959{
13960
13961 ;
13962 return 0;
13963}
13964_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013965if ac_fn_c_try_compile "$LINENO"
13966then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013967 ac_cv_sys_large_files=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013968fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013969rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013971/* end confdefs.h. */
13972#define _LARGE_FILES 1
13973#include <sys/types.h>
13974 /* Check that off_t can represent 2**63 - 1 correctly.
13975 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13976 since some C++ compilers masquerading as C compilers
13977 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013978#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013979 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13980 && LARGE_OFF_T % 2147483647 == 1)
13981 ? 1 : -1];
13982int
Illia Bobyra96d5442023-08-30 16:30:15 +020013983main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013984{
13985
13986 ;
13987 return 0;
13988}
13989_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013990if ac_fn_c_try_compile "$LINENO"
13991then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013992 ac_cv_sys_large_files=1; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013993fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013994rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013995 ac_cv_sys_large_files=unknown
13996 break
13997done
13998fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
14000printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014001case $ac_cv_sys_large_files in #(
14002 no | unknown) ;;
14003 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020014004printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014005;;
14006esac
14007rm -rf conftest*
14008 fi
14009fi
14010
14011
Illia Bobyra96d5442023-08-30 16:30:15 +020014012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
14013printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014014# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014015if test ${enable_canberra+y}
14016then :
Bram Moolenaar21606672019-06-14 20:40:58 +020014017 enableval=$enable_canberra;
Illia Bobyra96d5442023-08-30 16:30:15 +020014018else $as_nop
Bram Moolenaar21606672019-06-14 20:40:58 +020014019 enable_canberra="maybe"
14020fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014021
Bram Moolenaar21606672019-06-14 20:40:58 +020014022
14023if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014024 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14026printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014027 enable_canberra="yes"
14028 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14030printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014031 enable_canberra="no"
14032 fi
14033else
Bram Moolenaar12471262022-01-18 11:11:25 +000014034 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
14036printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014037 enable_canberra="no"
14038 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14040printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014041 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014042fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014043if test "$enable_canberra" = "yes"; then
14044 if test "x$PKG_CONFIG" != "xno"; then
14045 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14046 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14047 fi
14048 if test "x$canberra_lib" = "x"; then
14049 canberra_lib=-lcanberra
14050 canberra_cflags=-D_REENTRANT
14051 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14053printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014054 ac_save_CFLAGS="$CFLAGS"
14055 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014056 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014057 CFLAGS="$CFLAGS $canberra_cflags"
14058 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014059 LIBS="$LIBS $canberra_lib"
14060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014061/* end confdefs.h. */
14062
Bram Moolenaar21606672019-06-14 20:40:58 +020014063 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014064
14065int
Illia Bobyra96d5442023-08-30 16:30:15 +020014066main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014067{
14068
Bram Moolenaar21606672019-06-14 20:40:58 +020014069 ca_context *hello;
14070 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014071 ;
14072 return 0;
14073}
14074_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014075if ac_fn_c_try_link "$LINENO"
14076then :
14077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14078printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014079
Illia Bobyra96d5442023-08-30 16:30:15 +020014080else $as_nop
14081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14082printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014083fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014084rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014085 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014086fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014087
Illia Bobyra96d5442023-08-30 16:30:15 +020014088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14089printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014090# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014091if test ${enable_libsodium+y}
14092then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014093 enableval=$enable_libsodium;
Illia Bobyra96d5442023-08-30 16:30:15 +020014094else $as_nop
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014095 enable_libsodium="maybe"
14096fi
14097
14098
14099if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014100 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14102printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014103 enable_libsodium="yes"
14104 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14106printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014107 enable_libsodium="no"
14108 fi
14109else
Illia Bobyra96d5442023-08-30 16:30:15 +020014110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14111printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014112fi
14113if test "$enable_libsodium" = "yes"; then
14114 if test "x$PKG_CONFIG" != "xno"; then
14115 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14116 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14117 fi
14118 if test "x$libsodium_lib" = "x"; then
14119 libsodium_lib=-lsodium
14120 libsodium_cflags=
14121 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14123printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014124 ac_save_CFLAGS="$CFLAGS"
14125 ac_save_LIBS="$LIBS"
14126 CFLAGS="$CFLAGS $libsodium_cflags"
14127 LIBS="$LIBS $libsodium_lib"
14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14129/* end confdefs.h. */
14130
14131 # include <sodium.h>
14132
14133int
Illia Bobyra96d5442023-08-30 16:30:15 +020014134main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014135{
14136
14137 printf("%d", sodium_init());
14138 ;
14139 return 0;
14140}
14141_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014142if ac_fn_c_try_link "$LINENO"
14143then :
14144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14145printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014146
Illia Bobyra96d5442023-08-30 16:30:15 +020014147else $as_nop
14148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14149printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014150fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014151rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014152 conftest$ac_exeext conftest.$ac_ext
14153fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014154
Illia Bobyra96d5442023-08-30 16:30:15 +020014155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14156printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014158/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014159#include <sys/types.h>
14160#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014161int
Illia Bobyra96d5442023-08-30 16:30:15 +020014162main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014163{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014164 struct stat st;
14165 int n;
14166
14167 stat("/", &st);
14168 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014169 ;
14170 return 0;
14171}
14172_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014173if ac_fn_c_try_compile "$LINENO"
14174then :
14175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14176printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014177
Illia Bobyra96d5442023-08-30 16:30:15 +020014178else $as_nop
14179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14180printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014181fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014182rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014183
Illia Bobyra96d5442023-08-30 16:30:15 +020014184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14185printf %s "checking for timer_create without -lrt... " >&6; }
14186if test ${vim_cv_timer_create+y}
14187then :
14188 printf %s "(cached) " >&6
14189else $as_nop
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014190
Illia Bobyra96d5442023-08-30 16:30:15 +020014191if test "$cross_compiling" = yes
14192then :
14193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
14194printf "%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 +010014195
Illia Bobyra96d5442023-08-30 16:30:15 +020014196else $as_nop
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014198/* end confdefs.h. */
14199
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014200#if STDC_HEADERS
14201# include <stdlib.h>
14202# include <stddef.h>
14203#endif
14204#include <signal.h>
14205#include <time.h>
Bram Moolenaare5303952022-06-19 17:05:47 +010014206static void set_flag(union sigval sv) {}
Paul Ollis65745772022-06-05 16:55:54 +010014207
14208int
Illia Bobyra96d5442023-08-30 16:30:15 +020014209main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014210{
14211
14212 struct timespec ts;
14213 struct sigevent action = {0};
14214 timer_t timer_id;
14215
14216 action.sigev_notify = SIGEV_THREAD;
14217 action.sigev_notify_function = set_flag;
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014218 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14219 exit(1); // cannot create a monotonic timer
Paul Ollis65745772022-06-05 16:55:54 +010014220
14221 ;
14222 return 0;
14223}
14224_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014225if ac_fn_c_try_run "$LINENO"
14226then :
Richard Purdie509695c2022-07-24 20:48:00 +010014227 vim_cv_timer_create=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014228else $as_nop
Richard Purdie509695c2022-07-24 20:48:00 +010014229 vim_cv_timer_create=no
Paul Ollis65745772022-06-05 16:55:54 +010014230fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014233fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014234
14235fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14237printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014238
14239if test "x$vim_cv_timer_create" = "xno" ; then
14240 save_LIBS="$LIBS"
14241 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14243printf %s "checking for timer_create with -lrt... " >&6; }
14244if test ${vim_cv_timer_create_with_lrt+y}
14245then :
14246 printf %s "(cached) " >&6
14247else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014248
Illia Bobyra96d5442023-08-30 16:30:15 +020014249 if test "$cross_compiling" = yes
14250then :
14251 { 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
14252printf "%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 +010014253
Illia Bobyra96d5442023-08-30 16:30:15 +020014254else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14256/* end confdefs.h. */
14257
14258 #if STDC_HEADERS
14259 # include <stdlib.h>
14260 # include <stddef.h>
14261 #endif
14262 #include <signal.h>
14263 #include <time.h>
14264 static void set_flag(union sigval sv) {}
14265
14266int
Illia Bobyra96d5442023-08-30 16:30:15 +020014267main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014268{
14269
14270 struct timespec ts;
14271 struct sigevent action = {0};
14272 timer_t timer_id;
14273
14274 action.sigev_notify = SIGEV_THREAD;
14275 action.sigev_notify_function = set_flag;
14276 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14277 exit(1); // cannot create a monotonic timer
14278
14279 ;
14280 return 0;
14281}
14282_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014283if ac_fn_c_try_run "$LINENO"
14284then :
Bram Moolenaarefffa532022-07-28 22:39:54 +010014285 vim_cv_timer_create_with_lrt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014286else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014287 vim_cv_timer_create_with_lrt=no
14288fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14290 conftest.$ac_objext conftest.beam conftest.$ac_ext
14291fi
14292
Richard Purdie509695c2022-07-24 20:48:00 +010014293fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14295printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014296 LIBS="$save_LIBS"
14297else
14298 vim_cv_timer_create_with_lrt=no
14299fi
Richard Purdie509695c2022-07-24 20:48:00 +010014300
14301if test "x$vim_cv_timer_create" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014302 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014303
14304fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014305if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014306 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014307
Bram Moolenaarefffa532022-07-28 22:39:54 +010014308 LIBS="$LIBS -lrt"
14309fi
Richard Purdie509695c2022-07-24 20:48:00 +010014310
Illia Bobyra96d5442023-08-30 16:30:15 +020014311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14312printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14313if test ${vim_cv_stat_ignores_slash+y}
14314then :
14315 printf %s "(cached) " >&6
14316else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014317
Illia Bobyra96d5442023-08-30 16:30:15 +020014318 if test "$cross_compiling" = yes
14319then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014320
Bram Moolenaar7db77842014-03-27 17:40:59 +010014321 as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000014322
Illia Bobyra96d5442023-08-30 16:30:15 +020014323else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14325/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014326
14327#include "confdefs.h"
14328#if STDC_HEADERS
14329# include <stdlib.h>
14330# include <stddef.h>
14331#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014332#include <sys/types.h>
14333#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014334int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014335
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014336_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014337if ac_fn_c_try_run "$LINENO"
14338then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014339
14340 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014341
Illia Bobyra96d5442023-08-30 16:30:15 +020014342else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014343
14344 vim_cv_stat_ignores_slash=no
14345
Bram Moolenaar071d4272004-06-13 20:20:40 +000014346fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14348 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014349fi
14350
Bram Moolenaar446cb832008-06-24 21:56:24 +000014351
Bram Moolenaar446cb832008-06-24 21:56:24 +000014352fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14354printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014355
14356if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014357 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014358
14359fi
14360
Illia Bobyra96d5442023-08-30 16:30:15 +020014361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14362printf %s "checking for nanoseconds field of struct stat... " >&6; }
14363if test ${ac_cv_struct_st_mtim_nsec+y}
14364then :
14365 printf %s "(cached) " >&6
14366else $as_nop
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014367 ac_save_CPPFLAGS="$CPPFLAGS"
14368 ac_cv_struct_st_mtim_nsec=no
14369 # st_mtim.tv_nsec -- the usual case
14370 # st_mtim._tv_nsec -- Solaris 2.6, if
14371 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14372 # && !defined __EXTENSIONS__)
14373 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14374 # st_mtime_n -- AIX 5.2 and above
14375 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14376 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
14377 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14379/* end confdefs.h. */
14380#include <sys/types.h>
14381#include <sys/stat.h>
14382int
Illia Bobyra96d5442023-08-30 16:30:15 +020014383main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014384{
14385struct stat s; s.ST_MTIM_NSEC;
14386 ;
14387 return 0;
14388}
14389_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014390if ac_fn_c_try_compile "$LINENO"
14391then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014392 ac_cv_struct_st_mtim_nsec=$ac_val; break
14393fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014394rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014395 done
14396 CPPFLAGS="$ac_save_CPPFLAGS"
14397
14398fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14400printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014401if test $ac_cv_struct_st_mtim_nsec != no; then
14402
Illia Bobyra96d5442023-08-30 16:30:15 +020014403printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014404
14405fi
14406
Illia Bobyra96d5442023-08-30 16:30:15 +020014407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14408printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014409save_LIBS="$LIBS"
14410LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014412/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014413
14414#ifdef HAVE_ICONV_H
14415# include <iconv.h>
14416#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014417
14418int
Illia Bobyra96d5442023-08-30 16:30:15 +020014419main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014420{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014421iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014422 ;
14423 return 0;
14424}
14425_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014426if ac_fn_c_try_link "$LINENO"
14427then :
14428 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14429printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014430
Illia Bobyra96d5442023-08-30 16:30:15 +020014431else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014432 LIBS="$save_LIBS"
14433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014434/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014435
14436#ifdef HAVE_ICONV_H
14437# include <iconv.h>
14438#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014439
14440int
Illia Bobyra96d5442023-08-30 16:30:15 +020014441main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014442{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014443iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014444 ;
14445 return 0;
14446}
14447_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014448if ac_fn_c_try_link "$LINENO"
14449then :
14450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14451printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014452
Illia Bobyra96d5442023-08-30 16:30:15 +020014453else $as_nop
14454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14455printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014456fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014457rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014458 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014459fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014460rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014461 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014462
14463
Illia Bobyra96d5442023-08-30 16:30:15 +020014464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
14465printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014467/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014468
14469#ifdef HAVE_LANGINFO_H
14470# include <langinfo.h>
14471#endif
14472
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014473int
Illia Bobyra96d5442023-08-30 16:30:15 +020014474main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014475{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014476char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014477 ;
14478 return 0;
14479}
14480_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014481if ac_fn_c_try_link "$LINENO"
14482then :
14483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14484printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014485
Illia Bobyra96d5442023-08-30 16:30:15 +020014486else $as_nop
14487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14488printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014489fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014490rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014491 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014492
Illia Bobyra96d5442023-08-30 16:30:15 +020014493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
14494printf %s "checking for strtod in -lm... " >&6; }
14495if test ${ac_cv_lib_m_strtod+y}
14496then :
14497 printf %s "(cached) " >&6
14498else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014499 ac_check_lib_save_LIBS=$LIBS
14500LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014502/* end confdefs.h. */
14503
14504/* Override any GCC internal prototype to avoid an error.
14505 Use char because int might match the return type of a GCC
14506 builtin and then its argument prototype would still apply. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014507char strtod ();
14508int
Illia Bobyra96d5442023-08-30 16:30:15 +020014509main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014510{
14511return strtod ();
14512 ;
14513 return 0;
14514}
14515_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014516if ac_fn_c_try_link "$LINENO"
14517then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014518 ac_cv_lib_m_strtod=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014519else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014520 ac_cv_lib_m_strtod=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014521fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014522rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014523 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014524LIBS=$ac_check_lib_save_LIBS
14525fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
14527printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
14528if test "x$ac_cv_lib_m_strtod" = xyes
14529then :
14530 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014531
14532 LIBS="-lm $LIBS"
14533
14534fi
14535
Bram Moolenaar446cb832008-06-24 21:56:24 +000014536
Illia Bobyra96d5442023-08-30 16:30:15 +020014537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
14538printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540/* end confdefs.h. */
14541
14542#ifdef HAVE_MATH_H
14543# include <math.h>
14544#endif
14545#if STDC_HEADERS
14546# include <stdlib.h>
14547# include <stddef.h>
14548#endif
14549
14550int
Illia Bobyra96d5442023-08-30 16:30:15 +020014551main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014552{
14553int r = isinf(1.11);
14554 ;
14555 return 0;
14556}
14557_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014558if ac_fn_c_try_link "$LINENO"
14559then :
14560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14561printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014562
Illia Bobyra96d5442023-08-30 16:30:15 +020014563else $as_nop
14564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14565printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014566fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014567rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014568 conftest$ac_exeext conftest.$ac_ext
14569
Illia Bobyra96d5442023-08-30 16:30:15 +020014570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
14571printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14573/* end confdefs.h. */
14574
14575#ifdef HAVE_MATH_H
14576# include <math.h>
14577#endif
14578#if STDC_HEADERS
14579# include <stdlib.h>
14580# include <stddef.h>
14581#endif
14582
14583int
Illia Bobyra96d5442023-08-30 16:30:15 +020014584main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014585{
14586int r = isnan(1.11);
14587 ;
14588 return 0;
14589}
14590_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014591if ac_fn_c_try_link "$LINENO"
14592then :
14593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14594printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014595
Illia Bobyra96d5442023-08-30 16:30:15 +020014596else $as_nop
14597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14598printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014599fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014600rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014601 conftest$ac_exeext conftest.$ac_ext
14602
Illia Bobyra96d5442023-08-30 16:30:15 +020014603{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
14604printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014605# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014606if test ${enable_acl+y}
14607then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014608 enableval=$enable_acl;
Illia Bobyra96d5442023-08-30 16:30:15 +020014609else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014610 enable_acl="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014611fi
14612
Bram Moolenaar071d4272004-06-13 20:20:40 +000014613if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14615printf "%s\n" "no" >&6; }
14616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
14617printf %s "checking for acl_get_file in -lposix1e... " >&6; }
14618if test ${ac_cv_lib_posix1e_acl_get_file+y}
14619then :
14620 printf %s "(cached) " >&6
14621else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014622 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014623LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014625/* end confdefs.h. */
14626
Bram Moolenaar446cb832008-06-24 21:56:24 +000014627/* Override any GCC internal prototype to avoid an error.
14628 Use char because int might match the return type of a GCC
14629 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014630char acl_get_file ();
14631int
Illia Bobyra96d5442023-08-30 16:30:15 +020014632main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014633{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014634return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014635 ;
14636 return 0;
14637}
14638_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014639if ac_fn_c_try_link "$LINENO"
14640then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014641 ac_cv_lib_posix1e_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014642else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014643 ac_cv_lib_posix1e_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014644fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014645rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014646 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014647LIBS=$ac_check_lib_save_LIBS
14648fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
14650printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
14651if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
14652then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014653 LIBS="$LIBS -lposix1e"
Illia Bobyra96d5442023-08-30 16:30:15 +020014654else $as_nop
14655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
14656printf %s "checking for acl_get_file in -lacl... " >&6; }
14657if test ${ac_cv_lib_acl_acl_get_file+y}
14658then :
14659 printf %s "(cached) " >&6
14660else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014661 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014662LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014664/* end confdefs.h. */
14665
Bram Moolenaar446cb832008-06-24 21:56:24 +000014666/* Override any GCC internal prototype to avoid an error.
14667 Use char because int might match the return type of a GCC
14668 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014669char acl_get_file ();
14670int
Illia Bobyra96d5442023-08-30 16:30:15 +020014671main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014672{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014673return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014674 ;
14675 return 0;
14676}
14677_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014678if ac_fn_c_try_link "$LINENO"
14679then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014680 ac_cv_lib_acl_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014681else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014682 ac_cv_lib_acl_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014683fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014684rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014685 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014686LIBS=$ac_check_lib_save_LIBS
14687fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
14689printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
14690if test "x$ac_cv_lib_acl_acl_get_file" = xyes
14691then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014692 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020014693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
14694printf %s "checking for fgetxattr in -lattr... " >&6; }
14695if test ${ac_cv_lib_attr_fgetxattr+y}
14696then :
14697 printf %s "(cached) " >&6
14698else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014699 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014700LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014702/* end confdefs.h. */
14703
Bram Moolenaar446cb832008-06-24 21:56:24 +000014704/* Override any GCC internal prototype to avoid an error.
14705 Use char because int might match the return type of a GCC
14706 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014707char fgetxattr ();
14708int
Illia Bobyra96d5442023-08-30 16:30:15 +020014709main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014710{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014711return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014712 ;
14713 return 0;
14714}
14715_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014716if ac_fn_c_try_link "$LINENO"
14717then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014718 ac_cv_lib_attr_fgetxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014719else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014720 ac_cv_lib_attr_fgetxattr=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014721fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014722rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014723 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014724LIBS=$ac_check_lib_save_LIBS
14725fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
14727printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
14728if test "x$ac_cv_lib_attr_fgetxattr" = xyes
14729then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014730 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014731fi
14732
Bram Moolenaar071d4272004-06-13 20:20:40 +000014733fi
14734
14735fi
14736
14737
Illia Bobyra96d5442023-08-30 16:30:15 +020014738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
14739printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014741/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014742
14743#include <sys/types.h>
14744#ifdef HAVE_SYS_ACL_H
14745# include <sys/acl.h>
14746#endif
14747acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014748int
Illia Bobyra96d5442023-08-30 16:30:15 +020014749main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014750{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014751acl = acl_get_file("foo", ACL_TYPE_ACCESS);
14752 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
14753 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014754 ;
14755 return 0;
14756}
14757_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014758if ac_fn_c_try_link "$LINENO"
14759then :
14760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14761printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014762
Illia Bobyra96d5442023-08-30 16:30:15 +020014763else $as_nop
14764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14765printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014766fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014767rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014768 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014769
Illia Bobyra96d5442023-08-30 16:30:15 +020014770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
14771printf %s "checking for acl_get in -lsec... " >&6; }
14772if test ${ac_cv_lib_sec_acl_get+y}
14773then :
14774 printf %s "(cached) " >&6
14775else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014776 ac_check_lib_save_LIBS=$LIBS
14777LIBS="-lsec $LIBS"
14778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14779/* end confdefs.h. */
14780
14781/* Override any GCC internal prototype to avoid an error.
14782 Use char because int might match the return type of a GCC
14783 builtin and then its argument prototype would still apply. */
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014784char acl_get ();
14785int
Illia Bobyra96d5442023-08-30 16:30:15 +020014786main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014787{
14788return acl_get ();
14789 ;
14790 return 0;
14791}
14792_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014793if ac_fn_c_try_link "$LINENO"
14794then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014795 ac_cv_lib_sec_acl_get=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014796else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014797 ac_cv_lib_sec_acl_get=no
14798fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014799rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014800 conftest$ac_exeext conftest.$ac_ext
14801LIBS=$ac_check_lib_save_LIBS
14802fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
14804printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
14805if test "x$ac_cv_lib_sec_acl_get" = xyes
14806then :
14807 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014808
Illia Bobyra96d5442023-08-30 16:30:15 +020014809else $as_nop
14810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
14811printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014813/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014814
14815#ifdef HAVE_SYS_ACL_H
14816# include <sys/acl.h>
14817#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014818int
Illia Bobyra96d5442023-08-30 16:30:15 +020014819main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014820{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014821acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014822
14823 ;
14824 return 0;
14825}
14826_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014827if ac_fn_c_try_link "$LINENO"
14828then :
14829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14830printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014831
Illia Bobyra96d5442023-08-30 16:30:15 +020014832else $as_nop
14833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14834printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014835fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014836rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014837 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014838fi
14839
Bram Moolenaar446cb832008-06-24 21:56:24 +000014840
Illia Bobyra96d5442023-08-30 16:30:15 +020014841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
14842printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014844/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014845
Bram Moolenaar446cb832008-06-24 21:56:24 +000014846#if STDC_HEADERS
14847# include <stdlib.h>
14848# include <stddef.h>
14849#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014850#ifdef HAVE_SYS_ACL_H
14851# include <sys/acl.h>
14852#endif
14853#ifdef HAVE_SYS_ACCESS_H
14854# include <sys/access.h>
14855#endif
14856#define _ALL_SOURCE
14857
14858#include <sys/stat.h>
14859
14860int aclsize;
14861struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014862int
Illia Bobyra96d5442023-08-30 16:30:15 +020014863main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014864{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014865aclsize = sizeof(struct acl);
14866 aclent = (void *)malloc(aclsize);
14867 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014868
14869 ;
14870 return 0;
14871}
14872_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014873if ac_fn_c_try_link "$LINENO"
14874then :
14875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14876printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014877
Illia Bobyra96d5442023-08-30 16:30:15 +020014878else $as_nop
14879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14880printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014881fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014882rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014883 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014884else
Illia Bobyra96d5442023-08-30 16:30:15 +020014885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14886printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014887fi
14888
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014889if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
14891printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014892 ac_save_CFLAGS="$CFLAGS"
14893 ac_save_LIBS="$LIBS"
14894 CFLAGS="$CFLAGS $GTK_CFLAGS"
14895 LIBS="$LIBS $GTK_LIBS"
14896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14897/* end confdefs.h. */
14898#include <gtk/gtk.h>
14899int
Illia Bobyra96d5442023-08-30 16:30:15 +020014900main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014901{
14902 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
14903 ;
14904 return 0;
14905}
14906_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014907if ac_fn_c_try_link "$LINENO"
14908then :
14909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14910printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014911
Illia Bobyra96d5442023-08-30 16:30:15 +020014912else $as_nop
14913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14914printf "%s\n" "no" >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014915fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014916rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020014917 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014918 CFLAGS="$ac_save_CFLAGS"
14919 LIBS="$ac_save_LIBS"
14920fi
14921
Illia Bobyra96d5442023-08-30 16:30:15 +020014922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
14923printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014924# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014925if test ${enable_gpm+y}
14926then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014927 enableval=$enable_gpm;
Illia Bobyra96d5442023-08-30 16:30:15 +020014928else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014929 enable_gpm="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014930fi
14931
Bram Moolenaar071d4272004-06-13 20:20:40 +000014932
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014933if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
14935printf "%s\n" "$enable_gpm" >&6; }
14936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
14937printf %s "checking for gpm... " >&6; }
14938if test ${vi_cv_have_gpm+y}
14939then :
14940 printf %s "(cached) " >&6
14941else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014942 olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014944/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014945#include <gpm.h>
14946 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014947int
Illia Bobyra96d5442023-08-30 16:30:15 +020014948main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014949{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014950Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014951 ;
14952 return 0;
14953}
14954_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014955if ac_fn_c_try_link "$LINENO"
14956then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014957 vi_cv_have_gpm=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014958else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014959 vi_cv_have_gpm=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014960fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014961rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014962 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014963 LIBS="$olibs"
14964
14965fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
14967printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014968 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014969 if test "$enable_gpm" = "yes"; then
14970 LIBS="$LIBS -lgpm"
14971 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014972 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014973
14974 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014975 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014976
14977 fi
14978else
Illia Bobyra96d5442023-08-30 16:30:15 +020014979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14980printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014981fi
14982
Illia Bobyra96d5442023-08-30 16:30:15 +020014983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
14984printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014985# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014986if test ${enable_sysmouse+y}
14987then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014988 enableval=$enable_sysmouse;
Illia Bobyra96d5442023-08-30 16:30:15 +020014989else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014990 enable_sysmouse="yes"
14991fi
14992
14993
14994if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14996printf "%s\n" "no" >&6; }
14997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
14998printf %s "checking for sysmouse... " >&6; }
14999if test ${vi_cv_have_sysmouse+y}
15000then :
15001 printf %s "(cached) " >&6
15002else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015004/* end confdefs.h. */
15005#include <sys/consio.h>
15006 #include <signal.h>
15007 #include <sys/fbio.h>
15008int
Illia Bobyra96d5442023-08-30 16:30:15 +020015009main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015010{
15011struct mouse_info mouse;
15012 mouse.operation = MOUSE_MODE;
15013 mouse.operation = MOUSE_SHOW;
15014 mouse.u.mode.mode = 0;
15015 mouse.u.mode.signal = SIGUSR2;
15016 ;
15017 return 0;
15018}
15019_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015020if ac_fn_c_try_link "$LINENO"
15021then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015022 vi_cv_have_sysmouse=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015023else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015024 vi_cv_have_sysmouse=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000015025fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015026rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015027 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015028
15029fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
15031printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015032 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015033 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015034
15035 fi
15036else
Illia Bobyra96d5442023-08-30 16:30:15 +020015037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15038printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015039fi
15040
Illia Bobyra96d5442023-08-30 16:30:15 +020015041{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15042printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015044/* end confdefs.h. */
15045#if HAVE_FCNTL_H
15046# include <fcntl.h>
15047#endif
15048int
Illia Bobyra96d5442023-08-30 16:30:15 +020015049main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015050{
15051 int flag = FD_CLOEXEC;
15052 ;
15053 return 0;
15054}
15055_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015056if ac_fn_c_try_compile "$LINENO"
15057then :
15058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15059printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015060
Illia Bobyra96d5442023-08-30 16:30:15 +020015061else $as_nop
15062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15063printf "%s\n" "not usable" >&6; }
Bram Moolenaarf05da212009-11-17 16:13:15 +000015064fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015065rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015066
Illia Bobyra96d5442023-08-30 16:30:15 +020015067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15068printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015070/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015071#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015072int
Illia Bobyra96d5442023-08-30 16:30:15 +020015073main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015074{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015075rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015076 ;
15077 return 0;
15078}
15079_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015080if ac_fn_c_try_link "$LINENO"
15081then :
15082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15083printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015084
Illia Bobyra96d5442023-08-30 16:30:15 +020015085else $as_nop
15086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15087printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015088fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015089rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015090 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015091
Illia Bobyra96d5442023-08-30 16:30:15 +020015092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15093printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15095/* end confdefs.h. */
15096#include <sys/types.h>
15097#include <dirent.h>
15098int
Illia Bobyra96d5442023-08-30 16:30:15 +020015099main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015100{
15101DIR * dir=opendir("dirname"); dirfd(dir);
15102 ;
15103 return 0;
15104}
15105_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015106if ac_fn_c_try_link "$LINENO"
15107then :
15108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15109printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015110
Illia Bobyra96d5442023-08-30 16:30:15 +020015111else $as_nop
15112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15113printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015114fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015115rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015116 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015117
Illia Bobyra96d5442023-08-30 16:30:15 +020015118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15119printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15121/* end confdefs.h. */
15122#include <sys/file.h>
15123int
Illia Bobyra96d5442023-08-30 16:30:15 +020015124main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015125{
15126flock(10, LOCK_SH);
15127 ;
15128 return 0;
15129}
15130_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015131if ac_fn_c_try_link "$LINENO"
15132then :
15133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15134printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015135
Illia Bobyra96d5442023-08-30 16:30:15 +020015136else $as_nop
15137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15138printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015139fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015140rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015141 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015142
Illia Bobyra96d5442023-08-30 16:30:15 +020015143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15144printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015146/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015147#include <sys/types.h>
15148#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015149int
Illia Bobyra96d5442023-08-30 16:30:15 +020015150main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015151{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015152 int mib[2], r;
15153 size_t len;
15154
15155 mib[0] = CTL_HW;
15156 mib[1] = HW_USERMEM;
15157 len = sizeof(r);
15158 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015159
15160 ;
15161 return 0;
15162}
15163_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015164if ac_fn_c_try_compile "$LINENO"
15165then :
15166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15167printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015168
Illia Bobyra96d5442023-08-30 16:30:15 +020015169else $as_nop
15170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15171printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015172fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015173rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015174
Illia Bobyra96d5442023-08-30 16:30:15 +020015175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15176printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015178/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015179#include <sys/types.h>
15180#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015181int
Illia Bobyra96d5442023-08-30 16:30:15 +020015182main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015183{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015184 struct sysinfo sinfo;
15185 int t;
15186
15187 (void)sysinfo(&sinfo);
15188 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015189
15190 ;
15191 return 0;
15192}
15193_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015194if ac_fn_c_try_link "$LINENO"
15195then :
15196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15197printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015198
Illia Bobyra96d5442023-08-30 16:30:15 +020015199else $as_nop
15200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15201printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015202fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015203rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015204 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015205
Illia Bobyra96d5442023-08-30 16:30:15 +020015206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15207printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015209/* end confdefs.h. */
15210#include <sys/types.h>
15211#include <sys/sysinfo.h>
15212int
Illia Bobyra96d5442023-08-30 16:30:15 +020015213main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015214{
15215 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015216 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015217
15218 ;
15219 return 0;
15220}
15221_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015222if ac_fn_c_try_compile "$LINENO"
15223then :
15224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15225printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015226
Illia Bobyra96d5442023-08-30 16:30:15 +020015227else $as_nop
15228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15229printf "%s\n" "no" >&6; }
Bram Moolenaar914572a2007-05-01 11:37:47 +000015230fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015231rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015232
Illia Bobyra96d5442023-08-30 16:30:15 +020015233{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15234printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15236/* end confdefs.h. */
15237#include <sys/types.h>
15238#include <sys/sysinfo.h>
15239int
Illia Bobyra96d5442023-08-30 16:30:15 +020015240main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015241{
15242 struct sysinfo sinfo;
15243 long ut;
15244
15245 (void)sysinfo(&sinfo);
15246 ut = sinfo.uptime;
15247
15248 ;
15249 return 0;
15250}
15251_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015252if ac_fn_c_try_compile "$LINENO"
15253then :
15254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15255printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015256
Illia Bobyra96d5442023-08-30 16:30:15 +020015257else $as_nop
15258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15259printf "%s\n" "no" >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015260fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015261rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015262
Illia Bobyra96d5442023-08-30 16:30:15 +020015263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15264printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015266/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015267#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015268int
Illia Bobyra96d5442023-08-30 16:30:15 +020015269main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015270{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015271 (void)sysconf(_SC_PAGESIZE);
15272 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015273
15274 ;
15275 return 0;
15276}
15277_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015278if ac_fn_c_try_compile "$LINENO"
15279then :
15280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15281printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015282
Illia Bobyra96d5442023-08-30 16:30:15 +020015283else $as_nop
15284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15285printf "%s\n" "not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015286fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015287rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015288
Illia Bobyra96d5442023-08-30 16:30:15 +020015289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15290printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15292/* end confdefs.h. */
15293#include <unistd.h>
15294int
Illia Bobyra96d5442023-08-30 16:30:15 +020015295main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015296{
15297 (void)sysconf(_SC_SIGSTKSZ);
15298
15299 ;
15300 return 0;
15301}
15302_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015303if ac_fn_c_try_compile "$LINENO"
15304then :
15305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15306printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015307
Illia Bobyra96d5442023-08-30 16:30:15 +020015308else $as_nop
15309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15310printf "%s\n" "not usable" >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015311fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015312rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015313
Bram Moolenaar914703b2010-05-31 21:59:46 +020015314# The cast to long int works around a bug in the HP C Compiler
15315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15317# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015318{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15319printf %s "checking size of int... " >&6; }
15320if test ${ac_cv_sizeof_int+y}
15321then :
15322 printf %s "(cached) " >&6
15323else $as_nop
15324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
15325then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015326
Illia Bobyra96d5442023-08-30 16:30:15 +020015327else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015328 if test "$ac_cv_type_int" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015329 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15330printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015331as_fn_error 77 "cannot compute sizeof (int)
15332See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015333 else
15334 ac_cv_sizeof_int=0
15335 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015336fi
15337
Bram Moolenaar446cb832008-06-24 21:56:24 +000015338fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15340printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015341
15342
15343
Illia Bobyra96d5442023-08-30 16:30:15 +020015344printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015345
15346
Bram Moolenaar914703b2010-05-31 21:59:46 +020015347# The cast to long int works around a bug in the HP C Compiler
15348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15350# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15352printf %s "checking size of long... " >&6; }
15353if test ${ac_cv_sizeof_long+y}
15354then :
15355 printf %s "(cached) " >&6
15356else $as_nop
15357 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
15358then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015359
Illia Bobyra96d5442023-08-30 16:30:15 +020015360else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015361 if test "$ac_cv_type_long" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015362 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15363printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015364as_fn_error 77 "cannot compute sizeof (long)
15365See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015366 else
15367 ac_cv_sizeof_long=0
15368 fi
15369fi
15370
15371fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15373printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015374
15375
15376
Illia Bobyra96d5442023-08-30 16:30:15 +020015377printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015378
15379
15380# The cast to long int works around a bug in the HP C Compiler
15381# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15382# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15383# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015384{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15385printf %s "checking size of time_t... " >&6; }
15386if test ${ac_cv_sizeof_time_t+y}
15387then :
15388 printf %s "(cached) " >&6
15389else $as_nop
15390 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
15391then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015392
Illia Bobyra96d5442023-08-30 16:30:15 +020015393else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015394 if test "$ac_cv_type_time_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015395 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15396printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015397as_fn_error 77 "cannot compute sizeof (time_t)
15398See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015399 else
15400 ac_cv_sizeof_time_t=0
15401 fi
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015402fi
15403
15404fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15406printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015407
15408
15409
Illia Bobyra96d5442023-08-30 16:30:15 +020015410printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015411
15412
Bram Moolenaar914703b2010-05-31 21:59:46 +020015413# The cast to long int works around a bug in the HP C Compiler
15414# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15415# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15416# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015417{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15418printf %s "checking size of off_t... " >&6; }
15419if test ${ac_cv_sizeof_off_t+y}
15420then :
15421 printf %s "(cached) " >&6
15422else $as_nop
15423 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
15424then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015425
Illia Bobyra96d5442023-08-30 16:30:15 +020015426else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015427 if test "$ac_cv_type_off_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015428 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15429printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015430as_fn_error 77 "cannot compute sizeof (off_t)
15431See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015432 else
15433 ac_cv_sizeof_off_t=0
15434 fi
15435fi
15436
15437fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015438{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15439printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015440
15441
15442
Illia Bobyra96d5442023-08-30 16:30:15 +020015443printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015444
15445
15446
Illia Bobyra96d5442023-08-30 16:30:15 +020015447printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015448
Illia Bobyra96d5442023-08-30 16:30:15 +020015449printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015450
15451
Illia Bobyra96d5442023-08-30 16:30:15 +020015452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
15453printf %s "checking uint32_t is 32 bits... " >&6; }
15454if test "$cross_compiling" = yes
15455then :
15456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
15457printf "%s\n" "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
15458else $as_nop
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15460/* end confdefs.h. */
15461
15462#ifdef HAVE_STDINT_H
15463# include <stdint.h>
15464#endif
15465#ifdef HAVE_INTTYPES_H
15466# include <inttypes.h>
15467#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015468int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015469 uint32_t nr1 = (uint32_t)-1;
15470 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020015471 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
15472 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015473}
15474_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015475if ac_fn_c_try_run "$LINENO"
15476then :
15477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15478printf "%s\n" "ok" >&6; }
15479else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010015480 as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015481fi
15482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15483 conftest.$ac_objext conftest.beam conftest.$ac_ext
15484fi
15485
15486
Bram Moolenaar446cb832008-06-24 21:56:24 +000015487
Bram Moolenaar071d4272004-06-13 20:20:40 +000015488bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000015489#include "confdefs.h"
15490#ifdef HAVE_STRING_H
15491# include <string.h>
15492#endif
15493#if STDC_HEADERS
15494# include <stdlib.h>
15495# include <stddef.h>
15496#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015497int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000015498 char buf[10];
15499 strcpy(buf, "abcdefghi");
15500 mch_memmove(buf, buf + 2, 3);
15501 if (strncmp(buf, "ababcf", 6))
15502 exit(1);
15503 strcpy(buf, "abcdefghi");
15504 mch_memmove(buf + 2, buf, 3);
15505 if (strncmp(buf, "cdedef", 6))
15506 exit(1);
15507 exit(0); /* libc version works properly. */
15508}'
15509
Illia Bobyra96d5442023-08-30 16:30:15 +020015510{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
15511printf %s "checking whether memmove handles overlaps... " >&6; }
15512if test ${vim_cv_memmove_handles_overlap+y}
15513then :
15514 printf %s "(cached) " >&6
15515else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015516
Illia Bobyra96d5442023-08-30 16:30:15 +020015517 if test "$cross_compiling" = yes
15518then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015519
Bram Moolenaar7db77842014-03-27 17:40:59 +010015520 as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015521
Illia Bobyra96d5442023-08-30 16:30:15 +020015522else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15524/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015525#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015526_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015527if ac_fn_c_try_run "$LINENO"
15528then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015529
15530 vim_cv_memmove_handles_overlap=yes
15531
Illia Bobyra96d5442023-08-30 16:30:15 +020015532else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015533
15534 vim_cv_memmove_handles_overlap=no
15535
15536fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15538 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015539fi
15540
15541
Bram Moolenaar446cb832008-06-24 21:56:24 +000015542fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
15544printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015545
15546if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015547 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015548
Bram Moolenaar071d4272004-06-13 20:20:40 +000015549else
Illia Bobyra96d5442023-08-30 16:30:15 +020015550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
15551printf %s "checking whether bcopy handles overlaps... " >&6; }
15552if test ${vim_cv_bcopy_handles_overlap+y}
15553then :
15554 printf %s "(cached) " >&6
15555else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015556
Illia Bobyra96d5442023-08-30 16:30:15 +020015557 if test "$cross_compiling" = yes
15558then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015559
Bram Moolenaar7db77842014-03-27 17:40:59 +010015560 as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015561
Illia Bobyra96d5442023-08-30 16:30:15 +020015562else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15564/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015565#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
15566_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015567if ac_fn_c_try_run "$LINENO"
15568then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015569
15570 vim_cv_bcopy_handles_overlap=yes
15571
Illia Bobyra96d5442023-08-30 16:30:15 +020015572else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015573
15574 vim_cv_bcopy_handles_overlap=no
15575
15576fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015577rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15578 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015579fi
15580
15581
Bram Moolenaar446cb832008-06-24 21:56:24 +000015582fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
15584printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015585
15586 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015587 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015588
Bram Moolenaar446cb832008-06-24 21:56:24 +000015589 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
15591printf %s "checking whether memcpy handles overlaps... " >&6; }
15592if test ${vim_cv_memcpy_handles_overlap+y}
15593then :
15594 printf %s "(cached) " >&6
15595else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015596
Illia Bobyra96d5442023-08-30 16:30:15 +020015597 if test "$cross_compiling" = yes
15598then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015599
Bram Moolenaar7db77842014-03-27 17:40:59 +010015600 as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015601
Illia Bobyra96d5442023-08-30 16:30:15 +020015602else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15604/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015605#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015606_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015607if ac_fn_c_try_run "$LINENO"
15608then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015609
15610 vim_cv_memcpy_handles_overlap=yes
15611
Illia Bobyra96d5442023-08-30 16:30:15 +020015612else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015613
15614 vim_cv_memcpy_handles_overlap=no
15615
Bram Moolenaar071d4272004-06-13 20:20:40 +000015616fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015619fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015620
15621
Bram Moolenaar071d4272004-06-13 20:20:40 +000015622fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
15624printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015625
15626 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015627 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015628
15629 fi
15630 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015631fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015632
Bram Moolenaar071d4272004-06-13 20:20:40 +000015633
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015634if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000015635 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015636 libs_save=$LIBS
15637 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
15638 CFLAGS="$CFLAGS $X_CFLAGS"
15639
Illia Bobyra96d5442023-08-30 16:30:15 +020015640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
15641printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015643/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015644#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015645int
Illia Bobyra96d5442023-08-30 16:30:15 +020015646main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015647{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015648
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015649 ;
15650 return 0;
15651}
15652_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015653if ac_fn_c_try_compile "$LINENO"
15654then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015656/* end confdefs.h. */
15657
Bram Moolenaar446cb832008-06-24 21:56:24 +000015658/* Override any GCC internal prototype to avoid an error.
15659 Use char because int might match the return type of a GCC
15660 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015661char _Xsetlocale ();
15662int
Illia Bobyra96d5442023-08-30 16:30:15 +020015663main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015664{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015665return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015666 ;
15667 return 0;
15668}
15669_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015670if ac_fn_c_try_link "$LINENO"
15671then :
15672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15673printf "%s\n" "yes" >&6; }
15674 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015675
Illia Bobyra96d5442023-08-30 16:30:15 +020015676else $as_nop
15677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15678printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015679fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015680rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015681 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015682else $as_nop
15683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15684printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015685fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015686rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015687
Illia Bobyra96d5442023-08-30 16:30:15 +020015688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
15689printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15691/* end confdefs.h. */
15692
15693/* Override any GCC internal prototype to avoid an error.
15694 Use char because int might match the return type of a GCC
15695 builtin and then its argument prototype would still apply. */
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015696char Xutf8SetWMProperties ();
15697int
Illia Bobyra96d5442023-08-30 16:30:15 +020015698main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015699{
15700return Xutf8SetWMProperties ();
15701 ;
15702 return 0;
15703}
15704_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015705if ac_fn_c_try_link "$LINENO"
15706then :
15707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15708printf "%s\n" "yes" >&6; }
15709 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015710
Illia Bobyra96d5442023-08-30 16:30:15 +020015711else $as_nop
15712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15713printf "%s\n" "no" >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015714fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015715rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015716 conftest$ac_exeext conftest.$ac_ext
15717
Bram Moolenaar071d4272004-06-13 20:20:40 +000015718 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015719 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000015720fi
15721
Illia Bobyra96d5442023-08-30 16:30:15 +020015722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
15723printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
15724if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
15725then :
15726 printf %s "(cached) " >&6
15727else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015728 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015729LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015731/* end confdefs.h. */
15732
Bram Moolenaar446cb832008-06-24 21:56:24 +000015733/* Override any GCC internal prototype to avoid an error.
15734 Use char because int might match the return type of a GCC
15735 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015736char _xpg4_setrunelocale ();
15737int
Illia Bobyra96d5442023-08-30 16:30:15 +020015738main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015739{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015740return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015741 ;
15742 return 0;
15743}
15744_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015745if ac_fn_c_try_link "$LINENO"
15746then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015747 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015748else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015749 ac_cv_lib_xpg4__xpg4_setrunelocale=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000015750fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015751rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015752 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015753LIBS=$ac_check_lib_save_LIBS
15754fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015755{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
15756printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
15757if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
15758then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015759 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015760fi
15761
15762
Illia Bobyra96d5442023-08-30 16:30:15 +020015763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
15764printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015765test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015766if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015767 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015768elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015769 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015770elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015771 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015772else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000015773 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015774 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
15775 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
15776 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
15777 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
15778 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
15779 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
15780 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
15781fi
15782test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020015783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
15784printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015785
Illia Bobyra96d5442023-08-30 16:30:15 +020015786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
15787printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015788MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000015789(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 +020015790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
15791printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015792if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015793 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015794
15795fi
15796
Illia Bobyra96d5442023-08-30 16:30:15 +020015797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
15798printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015799# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015800if test ${enable_nls+y}
15801then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015802 enableval=$enable_nls;
Illia Bobyra96d5442023-08-30 16:30:15 +020015803else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015804 enable_nls="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000015805fi
15806
Bram Moolenaar071d4272004-06-13 20:20:40 +000015807
15808if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15810printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000015811
15812 INSTALL_LANGS=install-languages
15813
15814 INSTALL_TOOL_LANGS=install-tool-languages
15815
15816
Bram Moolenaar071d4272004-06-13 20:20:40 +000015817 # Extract the first word of "msgfmt", so it can be a program name with args.
15818set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020015819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15820printf %s "checking for $ac_word... " >&6; }
15821if test ${ac_cv_prog_MSGFMT+y}
15822then :
15823 printf %s "(cached) " >&6
15824else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015825 if test -n "$MSGFMT"; then
15826 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15827else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15829for as_dir in $PATH
15830do
15831 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020015832 case $as_dir in #(((
15833 '') as_dir=./ ;;
15834 */) ;;
15835 *) as_dir=$as_dir/ ;;
15836 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015837 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020015838 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015839 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020015840 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015841 break 2
15842 fi
15843done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015844 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000015845IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015846
Bram Moolenaar071d4272004-06-13 20:20:40 +000015847fi
15848fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015849MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000015850if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15852printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015853else
Illia Bobyra96d5442023-08-30 16:30:15 +020015854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15855printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015856fi
15857
Bram Moolenaar446cb832008-06-24 21:56:24 +000015858
Illia Bobyra96d5442023-08-30 16:30:15 +020015859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
15860printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015861 if test -f po/Makefile; then
15862 have_gettext="no"
15863 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015864 olibs=$LIBS
15865 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015867/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015868#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015869int
Illia Bobyra96d5442023-08-30 16:30:15 +020015870main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015871{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015872gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015873 ;
15874 return 0;
15875}
15876_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015877if ac_fn_c_try_link "$LINENO"
15878then :
15879 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
15880printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
15881else $as_nop
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015882 LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015884/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015885#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015886int
Illia Bobyra96d5442023-08-30 16:30:15 +020015887main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015888{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015889gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015890 ;
15891 return 0;
15892}
15893_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015894if ac_fn_c_try_link "$LINENO"
15895then :
15896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
15897printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015898 LIBS="$olibs -lintl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015899else $as_nop
15900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
15901printf "%s\n" "gettext() doesn't work" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015902 LIBS=$olibs
15903fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015904rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015905 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015906fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015907rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015908 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015909 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
15911printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015912 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010015913 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015914 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015915
15916 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015917
Illia Bobyra96d5442023-08-30 16:30:15 +020015918 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
15919if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
15920then :
15921 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015922
Bram Moolenaar071d4272004-06-13 20:20:40 +000015923fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015924
Illia Bobyra96d5442023-08-30 16:30:15 +020015925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
15926printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015928/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015929#include <libintl.h>
15930 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015931int
Illia Bobyra96d5442023-08-30 16:30:15 +020015932main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015933{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015934++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015935 ;
15936 return 0;
15937}
15938_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015939if ac_fn_c_try_link "$LINENO"
15940then :
15941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15942printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015943
Illia Bobyra96d5442023-08-30 16:30:15 +020015944else $as_nop
15945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15946printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015947fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015948rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015949 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
15951printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015952 MSGFMT_DESKTOP=
15953 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015954 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
15956printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015957 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15959printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015960 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
15961 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015962 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15964printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015965 fi
15966
Bram Moolenaar071d4272004-06-13 20:20:40 +000015967 fi
15968 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
15970printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015971 fi
15972else
Illia Bobyra96d5442023-08-30 16:30:15 +020015973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15974printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015975fi
15976
Illia Bobyra96d5442023-08-30 16:30:15 +020015977ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15978if test "x$ac_cv_header_dlfcn_h" = xyes
15979then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015980 DLL=dlfcn.h
Illia Bobyra96d5442023-08-30 16:30:15 +020015981else $as_nop
15982 ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
15983if test "x$ac_cv_header_dl_h" = xyes
15984then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015985 DLL=dl.h
15986fi
15987
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015988fi
15989
Bram Moolenaar071d4272004-06-13 20:20:40 +000015990if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015991
Illia Bobyra96d5442023-08-30 16:30:15 +020015992printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015993
Illia Bobyra96d5442023-08-30 16:30:15 +020015994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
15995printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015997/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015998
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015999int
Illia Bobyra96d5442023-08-30 16:30:15 +020016000main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016001{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016002
16003 extern void* dlopen();
16004 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016005
16006 ;
16007 return 0;
16008}
16009_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016010if ac_fn_c_try_link "$LINENO"
16011then :
16012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16013printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016014
Illia Bobyra96d5442023-08-30 16:30:15 +020016015printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016016
Illia Bobyra96d5442023-08-30 16:30:15 +020016017else $as_nop
16018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16019printf "%s\n" "no" >&6; };
16020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16021printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016022 olibs=$LIBS
16023 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016025/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016026
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016027int
Illia Bobyra96d5442023-08-30 16:30:15 +020016028main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016029{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016030
16031 extern void* dlopen();
16032 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016033
16034 ;
16035 return 0;
16036}
16037_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016038if ac_fn_c_try_link "$LINENO"
16039then :
16040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16041printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016042
Illia Bobyra96d5442023-08-30 16:30:15 +020016043printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016044
Illia Bobyra96d5442023-08-30 16:30:15 +020016045else $as_nop
16046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16047printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016048 LIBS=$olibs
16049fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016050rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016051 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016052fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016053rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016054 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16056printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016058/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016059
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016060int
Illia Bobyra96d5442023-08-30 16:30:15 +020016061main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016062{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016063
16064 extern void* dlsym();
16065 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016066
16067 ;
16068 return 0;
16069}
16070_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016071if ac_fn_c_try_link "$LINENO"
16072then :
16073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16074printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016075
Illia Bobyra96d5442023-08-30 16:30:15 +020016076printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016077
Illia Bobyra96d5442023-08-30 16:30:15 +020016078else $as_nop
16079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16080printf "%s\n" "no" >&6; };
16081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16082printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016083 olibs=$LIBS
16084 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016086/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016087
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016088int
Illia Bobyra96d5442023-08-30 16:30:15 +020016089main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016090{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016091
16092 extern void* dlsym();
16093 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016094
16095 ;
16096 return 0;
16097}
16098_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016099if ac_fn_c_try_link "$LINENO"
16100then :
16101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16102printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016103
Illia Bobyra96d5442023-08-30 16:30:15 +020016104printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016105
Illia Bobyra96d5442023-08-30 16:30:15 +020016106else $as_nop
16107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16108printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016109 LIBS=$olibs
16110fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016111rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016112 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016113fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016114rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016115 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016116elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016117
Illia Bobyra96d5442023-08-30 16:30:15 +020016118printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016119
Illia Bobyra96d5442023-08-30 16:30:15 +020016120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16121printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016123/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016124
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016125int
Illia Bobyra96d5442023-08-30 16:30:15 +020016126main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016127{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016128
16129 extern void* shl_load();
16130 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016131
16132 ;
16133 return 0;
16134}
16135_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016136if ac_fn_c_try_link "$LINENO"
16137then :
16138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16139printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016140
Illia Bobyra96d5442023-08-30 16:30:15 +020016141printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016142
Illia Bobyra96d5442023-08-30 16:30:15 +020016143else $as_nop
16144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16145printf "%s\n" "no" >&6; };
16146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16147printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016148 olibs=$LIBS
16149 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016151/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016152
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016153int
Illia Bobyra96d5442023-08-30 16:30:15 +020016154main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016155{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016156
16157 extern void* shl_load();
16158 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016159
16160 ;
16161 return 0;
16162}
16163_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016164if ac_fn_c_try_link "$LINENO"
16165then :
16166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16167printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016168
Illia Bobyra96d5442023-08-30 16:30:15 +020016169printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016170
Illia Bobyra96d5442023-08-30 16:30:15 +020016171else $as_nop
16172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16173printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016174 LIBS=$olibs
16175fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016176rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016177 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016178fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016179rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016180 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016181fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016182ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16183if test "x$ac_cv_header_setjmp_h" = xyes
16184then :
16185 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016186
16187fi
16188
Bram Moolenaar071d4272004-06-13 20:20:40 +000016189
Bram Moolenaard0573012017-10-28 21:11:06 +020016190if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016191 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16192 LIBS=`echo $LIBS | sed s/-ldl//`
16193 PERL_LIBS="$PERL_LIBS -ldl"
16194 fi
16195fi
16196
Bram Moolenaard0573012017-10-28 21:11:06 +020016197if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16199printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016200 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016201 if test "$features" = "tiny"; then
16202 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16203 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16205printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016206 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016207 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16209printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016210 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016211 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016212 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16214printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016215 fi
16216fi
16217
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016218if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016219 CFLAGS="$CFLAGS -D_REENTRANT"
16220fi
16221
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016222DEPEND_CFLAGS_FILTER=
16223if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16225printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016226 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016227 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016228 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16230printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016231 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16233printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016234 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16236printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016237 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016238 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/'`
16239 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 +020016240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16241printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016242 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16244printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016245 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016246fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016247
Bram Moolenaar071d4272004-06-13 20:20:40 +000016248
Illia Bobyra96d5442023-08-30 16:30:15 +020016249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16250printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016251if 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 +020016252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16253printf "%s\n" "yes" >&6; }
16254 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016255
16256else
Illia Bobyra96d5442023-08-30 16:30:15 +020016257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16258printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016259fi
16260
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010016261LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
16262
Illia Bobyra96d5442023-08-30 16:30:15 +020016263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
16264printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016265LINK_AS_NEEDED=
16266# Check if linker supports --as-needed and --no-as-needed options
16267if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020016268 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
16269 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16270 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016271 LINK_AS_NEEDED=yes
16272fi
16273if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16275printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016276else
Illia Bobyra96d5442023-08-30 16:30:15 +020016277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16278printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016279fi
16280
16281
Bram Moolenaar77c19352012-06-13 19:19:41 +020016282# IBM z/OS reset CFLAGS for config.mk
16283if test "$zOSUnix" = "yes"; then
16284 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
16285fi
16286
Bram Moolenaar446cb832008-06-24 21:56:24 +000016287ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
16288
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016289cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016290# This file is a shell script that caches the results of configure
16291# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016292# scripts and configure runs, see configure's option --config-cache.
16293# It is not useful on other systems. If it contains results you don't
16294# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016295#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016296# config.status only pays attention to the cache file if you give it
16297# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016298#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016299# `ac_cv_env_foo' variables (set or unset) will be overridden when
16300# loading this file, other *unset* `ac_cv_foo' will be assigned the
16301# following values.
16302
16303_ACEOF
16304
Bram Moolenaar071d4272004-06-13 20:20:40 +000016305# The following way of writing the cache mishandles newlines in values,
16306# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016307# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016308# Ultrix sh set writes to stderr and can't be redirected directly,
16309# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016310(
16311 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16312 eval ac_val=\$$ac_var
16313 case $ac_val in #(
16314 *${as_nl}*)
16315 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016316 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16317printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016318 esac
16319 case $ac_var in #(
16320 _ | IFS | as_nl) ;; #(
16321 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016322 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016323 esac ;;
16324 esac
16325 done
16326
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016327 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016328 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16329 *${as_nl}ac_space=\ *)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016330 # `set' does not quote correctly, so add quotes: double-quote
16331 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016332 sed -n \
16333 "s/'/'\\\\''/g;
16334 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016335 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016336 *)
16337 # `set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016338 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016339 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016340 esac |
16341 sort
16342) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016343 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000016344 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016345 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000016346 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020016347 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016348 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000016349 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16350 :end' >>confcache
16351if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16352 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016353 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16355printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016356 if test ! -f "$cache_file" || test -h "$cache_file"; then
16357 cat confcache >"$cache_file"
16358 else
16359 case $cache_file in #(
16360 */* | ?:*)
16361 mv -f confcache "$cache_file"$$ &&
16362 mv -f "$cache_file"$$ "$cache_file" ;; #(
16363 *)
16364 mv -f confcache "$cache_file" ;;
16365 esac
16366 fi
16367 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016368 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16370printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000016371 fi
16372fi
16373rm -f confcache
16374
Bram Moolenaar071d4272004-06-13 20:20:40 +000016375test "x$prefix" = xNONE && prefix=$ac_default_prefix
16376# Let make expand exec_prefix.
16377test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16378
Bram Moolenaar071d4272004-06-13 20:20:40 +000016379DEFS=-DHAVE_CONFIG_H
16380
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016381ac_libobjs=
16382ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010016383U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016384for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16385 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016386 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020016387 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016388 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16389 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016390 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16391 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016392done
16393LIBOBJS=$ac_libobjs
16394
16395LTLIBOBJS=$ac_ltlibobjs
16396
16397
16398
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020016399
Bram Moolenaar7db77842014-03-27 17:40:59 +010016400: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016401ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016402ac_clean_files_save=$ac_clean_files
16403ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020016404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16405printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016406as_write_fail=0
16407cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016408#! $SHELL
16409# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016410# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016411# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016412# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016413
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016414debug=false
16415ac_cs_recheck=false
16416ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000016417
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016418SHELL=\${CONFIG_SHELL-$SHELL}
16419export SHELL
16420_ASEOF
16421cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16422## -------------------- ##
16423## M4sh Initialization. ##
16424## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000016425
Bram Moolenaar446cb832008-06-24 21:56:24 +000016426# Be more Bourne compatible
16427DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020016428as_nop=:
16429if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16430then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016431 emulate sh
16432 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000016433 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016434 # is contrary to our usage. Disable this feature.
16435 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016436 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020016437else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016438 case `(set -o) 2>/dev/null` in #(
16439 *posix*) :
16440 set -o posix ;; #(
16441 *) :
16442 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016443esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016444fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016445
16446
Illia Bobyra96d5442023-08-30 16:30:15 +020016447
16448# Reset variables that may have inherited troublesome values from
16449# the environment.
16450
16451# IFS needs to be set, to space, tab, and newline, in precisely that order.
16452# (If _AS_PATH_WALK were called with IFS unset, it would have the
16453# side effect of setting IFS to empty, thus disabling word splitting.)
16454# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016455as_nl='
16456'
16457export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020016458IFS=" "" $as_nl"
16459
16460PS1='$ '
16461PS2='> '
16462PS4='+ '
16463
16464# Ensure predictable behavior from utilities with locale-dependent output.
16465LC_ALL=C
16466export LC_ALL
16467LANGUAGE=C
16468export LANGUAGE
16469
16470# We cannot yet rely on "unset" to work, but we need these variables
16471# to be unset--not just set to an empty or harmless value--now, to
16472# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
16473# also avoids known problems related to "unset" and subshell syntax
16474# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
16475for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
16476do eval test \${$as_var+y} \
16477 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16478done
16479
16480# Ensure that fds 0, 1, and 2 are open.
16481if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
16482if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
16483if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016484
16485# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020016486if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016487 PATH_SEPARATOR=:
16488 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16489 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16490 PATH_SEPARATOR=';'
16491 }
16492fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016493
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016494
Bram Moolenaar446cb832008-06-24 21:56:24 +000016495# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016496as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016497case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016498 *[\\/]* ) as_myself=$0 ;;
16499 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16500for as_dir in $PATH
16501do
16502 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016503 case $as_dir in #(((
16504 '') as_dir=./ ;;
16505 */) ;;
16506 *) as_dir=$as_dir/ ;;
16507 esac
16508 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016509 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016510IFS=$as_save_IFS
16511
16512 ;;
16513esac
16514# We did not find ourselves, most probably we were run as `sh COMMAND'
16515# in which case we are not to be found in the path.
16516if test "x$as_myself" = x; then
16517 as_myself=$0
16518fi
16519if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016520 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016521 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000016522fi
16523
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016524
16525
Bram Moolenaar7db77842014-03-27 17:40:59 +010016526# as_fn_error STATUS ERROR [LINENO LOG_FD]
16527# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016528# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16529# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010016530# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016531as_fn_error ()
16532{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016533 as_status=$1; test $as_status -eq 0 && as_status=1
16534 if test "$4"; then
16535 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020016536 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016537 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016538 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016539 as_fn_exit $as_status
16540} # as_fn_error
16541
16542
Illia Bobyra96d5442023-08-30 16:30:15 +020016543
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016544# as_fn_set_status STATUS
16545# -----------------------
16546# Set $? to STATUS, without forking.
16547as_fn_set_status ()
16548{
16549 return $1
16550} # as_fn_set_status
16551
16552# as_fn_exit STATUS
16553# -----------------
16554# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16555as_fn_exit ()
16556{
16557 set +e
16558 as_fn_set_status $1
16559 exit $1
16560} # as_fn_exit
16561
16562# as_fn_unset VAR
16563# ---------------
16564# Portably unset VAR.
16565as_fn_unset ()
16566{
16567 { eval $1=; unset $1;}
16568}
16569as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020016570
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016571# as_fn_append VAR VALUE
16572# ----------------------
16573# Append the text in VALUE to the end of the definition contained in VAR. Take
16574# advantage of any shell optimizations that allow amortized linear growth over
16575# repeated appends, instead of the typical quadratic growth present in naive
16576# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020016577if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
16578then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016579 eval 'as_fn_append ()
16580 {
16581 eval $1+=\$2
16582 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016583else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016584 as_fn_append ()
16585 {
16586 eval $1=\$$1\$2
16587 }
16588fi # as_fn_append
16589
16590# as_fn_arith ARG...
16591# ------------------
16592# Perform arithmetic evaluation on the ARGs, and store the result in the
16593# global $as_val. Take advantage of shells that can avoid forks. The arguments
16594# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020016595if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
16596then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016597 eval 'as_fn_arith ()
16598 {
16599 as_val=$(( $* ))
16600 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016601else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016602 as_fn_arith ()
16603 {
16604 as_val=`expr "$@" || test $? -eq 1`
16605 }
16606fi # as_fn_arith
16607
16608
Bram Moolenaar446cb832008-06-24 21:56:24 +000016609if expr a : '\(a\)' >/dev/null 2>&1 &&
16610 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016611 as_expr=expr
16612else
16613 as_expr=false
16614fi
16615
Bram Moolenaar446cb832008-06-24 21:56:24 +000016616if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016617 as_basename=basename
16618else
16619 as_basename=false
16620fi
16621
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016622if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16623 as_dirname=dirname
16624else
16625 as_dirname=false
16626fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016627
Bram Moolenaar446cb832008-06-24 21:56:24 +000016628as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016629$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16630 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000016631 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016632printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016633 sed '/^.*\/\([^/][^/]*\)\/*$/{
16634 s//\1/
16635 q
16636 }
16637 /^X\/\(\/\/\)$/{
16638 s//\1/
16639 q
16640 }
16641 /^X\/\(\/\).*/{
16642 s//\1/
16643 q
16644 }
16645 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016646
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016647# Avoid depending upon Character Ranges.
16648as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16649as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16650as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16651as_cr_digits='0123456789'
16652as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016653
Illia Bobyra96d5442023-08-30 16:30:15 +020016654
16655# Determine whether it's possible to make 'echo' print without a newline.
16656# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
16657# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016658ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016659case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016660-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016661 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000016662 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016663 xy) ECHO_C='\c';;
16664 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16665 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016666 esac;;
16667*)
16668 ECHO_N='-n';;
16669esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016670
Illia Bobyra96d5442023-08-30 16:30:15 +020016671# For backward compatibility with old third-party macros, we provide
16672# the shell variables $as_echo and $as_echo_n. New code should use
16673# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
16674as_echo='printf %s\n'
16675as_echo_n='printf %s'
16676
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016677rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000016678if test -d conf$$.dir; then
16679 rm -f conf$$.dir/conf$$.file
16680else
16681 rm -f conf$$.dir
16682 mkdir conf$$.dir 2>/dev/null
16683fi
16684if (echo >conf$$.file) 2>/dev/null; then
16685 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016686 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016687 # ... but there are two gotchas:
16688 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16689 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016690 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016691 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016692 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016693 elif ln conf$$.file conf$$ 2>/dev/null; then
16694 as_ln_s=ln
16695 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016696 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016697 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016698else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016699 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016700fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016701rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16702rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016703
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016704
16705# as_fn_mkdir_p
16706# -------------
16707# Create "$as_dir" as a directory, including parents if necessary.
16708as_fn_mkdir_p ()
16709{
16710
16711 case $as_dir in #(
16712 -*) as_dir=./$as_dir;;
16713 esac
16714 test -d "$as_dir" || eval $as_mkdir_p || {
16715 as_dirs=
16716 while :; do
16717 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016718 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016719 *) as_qdir=$as_dir;;
16720 esac
16721 as_dirs="'$as_qdir' $as_dirs"
16722 as_dir=`$as_dirname -- "$as_dir" ||
16723$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16724 X"$as_dir" : 'X\(//\)[^/]' \| \
16725 X"$as_dir" : 'X\(//\)$' \| \
16726 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016727printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016728 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16729 s//\1/
16730 q
16731 }
16732 /^X\(\/\/\)[^/].*/{
16733 s//\1/
16734 q
16735 }
16736 /^X\(\/\/\)$/{
16737 s//\1/
16738 q
16739 }
16740 /^X\(\/\).*/{
16741 s//\1/
16742 q
16743 }
16744 s/.*/./; q'`
16745 test -d "$as_dir" && break
16746 done
16747 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010016748 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016749
16750
16751} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016752if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016753 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016754else
16755 test -d ./-p && rmdir ./-p
16756 as_mkdir_p=false
16757fi
16758
Bram Moolenaar7db77842014-03-27 17:40:59 +010016759
16760# as_fn_executable_p FILE
16761# -----------------------
16762# Test if FILE is an executable regular file.
16763as_fn_executable_p ()
16764{
16765 test -f "$1" && test -x "$1"
16766} # as_fn_executable_p
16767as_test_x='test -x'
16768as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016769
16770# Sed expression to map a string onto a valid CPP name.
16771as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16772
16773# Sed expression to map a string onto a valid variable name.
16774as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16775
16776
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016777exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016778## ----------------------------------- ##
16779## Main body of $CONFIG_STATUS script. ##
16780## ----------------------------------- ##
16781_ASEOF
16782test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016783
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016784cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16785# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016786# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000016787# values after options handling.
16788ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016789This file was extended by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +020016790generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016791
16792 CONFIG_FILES = $CONFIG_FILES
16793 CONFIG_HEADERS = $CONFIG_HEADERS
16794 CONFIG_LINKS = $CONFIG_LINKS
16795 CONFIG_COMMANDS = $CONFIG_COMMANDS
16796 $ $0 $@
16797
Bram Moolenaar446cb832008-06-24 21:56:24 +000016798on `(hostname || uname -n) 2>/dev/null | sed 1q`
16799"
16800
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016801_ACEOF
16802
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016803case $ac_config_files in *"
16804"*) set x $ac_config_files; shift; ac_config_files=$*;;
16805esac
16806
16807case $ac_config_headers in *"
16808"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16809esac
16810
16811
Bram Moolenaar446cb832008-06-24 21:56:24 +000016812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016813# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016814config_files="$ac_config_files"
16815config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016816
Bram Moolenaar446cb832008-06-24 21:56:24 +000016817_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016818
Bram Moolenaar446cb832008-06-24 21:56:24 +000016819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016820ac_cs_usage="\
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016821\`$as_me' instantiates files and other configuration actions
16822from templates according to the current configuration. Unless the files
16823and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016824
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016825Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016826
16827 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000016828 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016829 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016830 -q, --quiet, --silent
16831 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016832 -d, --debug don't remove temporary files
16833 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016834 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016835 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016836 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016837 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016838
16839Configuration files:
16840$config_files
16841
16842Configuration headers:
16843$config_headers
16844
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016845Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016846
Bram Moolenaar446cb832008-06-24 21:56:24 +000016847_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016848ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
16849ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020016851ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016852ac_cs_version="\\
16853config.status
Illia Bobyra96d5442023-08-30 16:30:15 +020016854configured by $0, generated by GNU Autoconf 2.71,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016855 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016856
Illia Bobyra96d5442023-08-30 16:30:15 +020016857Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016858This config.status script is free software; the Free Software Foundation
16859gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000016860
16861ac_pwd='$ac_pwd'
16862srcdir='$srcdir'
16863AWK='$AWK'
16864test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016865_ACEOF
16866
Bram Moolenaar446cb832008-06-24 21:56:24 +000016867cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16868# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016869ac_need_defaults=:
16870while test $# != 0
16871do
16872 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010016873 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016874 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16875 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016876 ac_shift=:
16877 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016878 --*=)
16879 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16880 ac_optarg=
16881 ac_shift=:
16882 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016883 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016884 ac_option=$1
16885 ac_optarg=$2
16886 ac_shift=shift
16887 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016888 esac
16889
16890 case $ac_option in
16891 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016892 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16893 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016894 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020016895 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016896 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020016897 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016898 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016899 debug=: ;;
16900 --file | --fil | --fi | --f )
16901 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016902 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016903 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016904 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016905 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016906 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016907 ac_need_defaults=false;;
16908 --header | --heade | --head | --hea )
16909 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016910 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016911 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016912 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016913 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016914 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016915 --he | --h)
16916 # Conflict between --help and --header
Bram Moolenaar7db77842014-03-27 17:40:59 +010016917 as_fn_error $? "ambiguous option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016918Try \`$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016919 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020016920 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016921 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16922 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16923 ac_cs_silent=: ;;
16924
16925 # This is an error.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016926 -*) as_fn_error $? "unrecognized option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016927Try \`$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016928
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016929 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016930 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016931
16932 esac
16933 shift
16934done
16935
16936ac_configure_extra_args=
16937
16938if $ac_cs_silent; then
16939 exec 6>/dev/null
16940 ac_configure_extra_args="$ac_configure_extra_args --silent"
16941fi
16942
16943_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016944cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016945if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016946 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000016947 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020016948 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000016949 CONFIG_SHELL='$SHELL'
16950 export CONFIG_SHELL
16951 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016952fi
16953
16954_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016955cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16956exec 5>>auto/config.log
16957{
16958 echo
16959 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16960## Running $as_me. ##
16961_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020016962 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016963} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016964
Bram Moolenaar446cb832008-06-24 21:56:24 +000016965_ACEOF
16966cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16967_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016968
Bram Moolenaar446cb832008-06-24 21:56:24 +000016969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016970
Bram Moolenaar446cb832008-06-24 21:56:24 +000016971# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016972for ac_config_target in $ac_config_targets
16973do
Bram Moolenaar446cb832008-06-24 21:56:24 +000016974 case $ac_config_target in
16975 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
16976 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
16977
Bram Moolenaar7db77842014-03-27 17:40:59 +010016978 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016979 esac
16980done
16981
Bram Moolenaar446cb832008-06-24 21:56:24 +000016982
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016983# If the user did not use the arguments to specify the items to instantiate,
16984# then the envvar interface is used. Set only those that are not.
16985# We use the long form for the default assignment because of an extremely
16986# bizarre bug on SunOS 4.1.3.
16987if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016988 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
16989 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016990fi
16991
16992# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000016993# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016994# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016995# Hook for its removal unless debugging.
16996# Note that there is a small window in which the directory will not be cleaned:
16997# after its creation but before its name has been assigned to `$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016998$debug ||
16999{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017000 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017001 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010017002 : "${ac_tmp:=$tmp}"
17003 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017004' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017005 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017006}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017007# Create a (secure) tmp directory for tmp files.
17008
17009{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017010 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017011 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017012} ||
17013{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017014 tmp=./conf$$-$RANDOM
17015 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017016} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17017ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017018
Bram Moolenaar446cb832008-06-24 21:56:24 +000017019# Set up the scripts for CONFIG_FILES section.
17020# No need to generate them if there are no CONFIG_FILES.
17021# This happens for instance with `./config.status config.h'.
17022if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017023
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017024
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017025ac_cr=`echo X | tr X '\015'`
17026# On cygwin, bash can eat \r inside `` if the user requested igncr.
17027# But we know of no other shell where ac_cr would be empty at this
17028# point, so we can use a bashism as a fallback.
17029if test "x$ac_cr" = x; then
17030 eval ac_cr=\$\'\\r\'
17031fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017032ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17033if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017034 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017035else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017036 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017037fi
17038
Bram Moolenaar7db77842014-03-27 17:40:59 +010017039echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017040_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017041
Bram Moolenaar446cb832008-06-24 21:56:24 +000017042
17043{
17044 echo "cat >conf$$subs.awk <<_ACEOF" &&
17045 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17046 echo "_ACEOF"
17047} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017048 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17049ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017050ac_delim='%!_!# '
17051for ac_last_try in false false false false false :; do
17052 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017053 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017054
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017055 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17056 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017057 break
17058 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017059 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017060 else
17061 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17062 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017063done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017064rm -f conf$$subs.sh
17065
17066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017067cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017068_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017069sed -n '
17070h
17071s/^/S["/; s/!.*/"]=/
17072p
17073g
17074s/^[^!]*!//
17075:repl
17076t repl
17077s/'"$ac_delim"'$//
17078t delim
17079:nl
17080h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017081s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017082t more1
17083s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17084p
17085n
17086b repl
17087:more1
17088s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17089p
17090g
17091s/.\{148\}//
17092t nl
17093:delim
17094h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017095s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017096t more2
17097s/["\\]/\\&/g; s/^/"/; s/$/"/
17098p
17099b
17100:more2
17101s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17102p
17103g
17104s/.\{148\}//
17105t delim
17106' <conf$$subs.awk | sed '
17107/^[^""]/{
17108 N
17109 s/\n//
17110}
17111' >>$CONFIG_STATUS || ac_write_fail=1
17112rm -f conf$$subs.awk
17113cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17114_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017115cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017116 for (key in S) S_is_set[key] = 1
17117 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017118
Bram Moolenaar446cb832008-06-24 21:56:24 +000017119}
17120{
17121 line = $ 0
17122 nfields = split(line, field, "@")
17123 substed = 0
17124 len = length(field[1])
17125 for (i = 2; i < nfields; i++) {
17126 key = field[i]
17127 keylen = length(key)
17128 if (S_is_set[key]) {
17129 value = S[key]
17130 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17131 len += length(value) + length(field[++i])
17132 substed = 1
17133 } else
17134 len += 1 + keylen
17135 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017136
Bram Moolenaar446cb832008-06-24 21:56:24 +000017137 print line
17138}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017139
Bram Moolenaar446cb832008-06-24 21:56:24 +000017140_ACAWK
17141_ACEOF
17142cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17143if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17144 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17145else
17146 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017147fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17148 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017149_ACEOF
17150
Bram Moolenaar7db77842014-03-27 17:40:59 +010017151# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17152# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017153# trailing colons and then remove the whole line if VPATH becomes empty
17154# (actually we leave an empty line to preserve line numbers).
17155if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017156 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17157h
17158s///
17159s/^/:/
17160s/[ ]*$/:/
17161s/:\$(srcdir):/:/g
17162s/:\${srcdir}:/:/g
17163s/:@srcdir@:/:/g
17164s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017165s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017166x
17167s/\(=[ ]*\).*/\1/
17168G
17169s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017170s/^[^=]*=[ ]*$//
17171}'
17172fi
17173
17174cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17175fi # test -n "$CONFIG_FILES"
17176
17177# Set up the scripts for CONFIG_HEADERS section.
17178# No need to generate them if there are no CONFIG_HEADERS.
17179# This happens for instance with `./config.status Makefile'.
17180if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017181cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017182BEGIN {
17183_ACEOF
17184
17185# Transform confdefs.h into an awk script `defines.awk', embedded as
17186# here-document in config.status, that substitutes the proper values into
17187# config.h.in to produce config.h.
17188
17189# Create a delimiter string that does not exist in confdefs.h, to ease
17190# handling of long lines.
17191ac_delim='%!_!# '
17192for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017193 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17194 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017195 break
17196 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017197 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017198 else
17199 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17200 fi
17201done
17202
17203# For the awk script, D is an array of macro values keyed by name,
17204# likewise P contains macro parameters if any. Preserve backslash
17205# newline sequences.
17206
17207ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17208sed -n '
17209s/.\{148\}/&'"$ac_delim"'/g
17210t rset
17211:rset
17212s/^[ ]*#[ ]*define[ ][ ]*/ /
17213t def
17214d
17215:def
17216s/\\$//
17217t bsnl
17218s/["\\]/\\&/g
17219s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17220D["\1"]=" \3"/p
17221s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17222d
17223:bsnl
17224s/["\\]/\\&/g
17225s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17226D["\1"]=" \3\\\\\\n"\\/p
17227t cont
17228s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17229t cont
17230d
17231:cont
17232n
17233s/.\{148\}/&'"$ac_delim"'/g
17234t clear
17235:clear
17236s/\\$//
17237t bsnlc
17238s/["\\]/\\&/g; s/^/"/; s/$/"/p
17239d
17240:bsnlc
17241s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17242b cont
17243' <confdefs.h | sed '
17244s/'"$ac_delim"'/"\\\
17245"/g' >>$CONFIG_STATUS || ac_write_fail=1
17246
17247cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17248 for (key in D) D_is_set[key] = 1
17249 FS = ""
17250}
17251/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17252 line = \$ 0
17253 split(line, arg, " ")
17254 if (arg[1] == "#") {
17255 defundef = arg[2]
17256 mac1 = arg[3]
17257 } else {
17258 defundef = substr(arg[1], 2)
17259 mac1 = arg[2]
17260 }
17261 split(mac1, mac2, "(") #)
17262 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017263 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017264 if (D_is_set[macro]) {
17265 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000017266 print prefix "define", macro P[macro] D[macro]
17267 next
17268 } else {
17269 # Replace #undef with comments. This is necessary, for example,
17270 # in the case of _POSIX_SOURCE, which is predefined and required
17271 # on some systems where configure will not decide to define it.
17272 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017273 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017274 next
17275 }
17276 }
17277}
17278{ print }
17279_ACAWK
17280_ACEOF
17281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017282 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017283fi # test -n "$CONFIG_HEADERS"
17284
17285
17286eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17287shift
17288for ac_tag
17289do
17290 case $ac_tag in
17291 :[FHLC]) ac_mode=$ac_tag; continue;;
17292 esac
17293 case $ac_mode$ac_tag in
17294 :[FHL]*:*);;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017295 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017296 :[FH]-) ac_tag=-:-;;
17297 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17298 esac
17299 ac_save_IFS=$IFS
17300 IFS=:
17301 set x $ac_tag
17302 IFS=$ac_save_IFS
17303 shift
17304 ac_file=$1
17305 shift
17306
17307 case $ac_mode in
17308 :L) ac_source=$1;;
17309 :[FH])
17310 ac_file_inputs=
17311 for ac_f
17312 do
17313 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017314 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017315 *) # Look for the file first in the build tree, then in the source tree
17316 # (if the path is not absolute). The absolute path cannot be DOS-style,
17317 # because $ac_f cannot contain `:'.
17318 test -f "$ac_f" ||
17319 case $ac_f in
17320 [\\/$]*) false;;
17321 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17322 esac ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017323 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017324 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020017325 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017326 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017327 done
17328
17329 # Let's still pretend it is `configure' which instantiates (i.e., don't
17330 # use $as_me), people would be surprised to read:
17331 # /* config.h. Generated by config.status. */
17332 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020017333 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017334 `' by configure.'
17335 if test x"$ac_file" != x-; then
17336 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020017337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17338printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017339 fi
17340 # Neutralize special characters interpreted by sed in replacement strings.
17341 case $configure_input in #(
17342 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020017343 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017344 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17345 *) ac_sed_conf_input=$configure_input;;
17346 esac
17347
17348 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017349 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17350 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017351 esac
17352 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000017353 esac
17354
Bram Moolenaar446cb832008-06-24 21:56:24 +000017355 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017356$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17357 X"$ac_file" : 'X\(//\)[^/]' \| \
17358 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017359 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017360printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017361 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17362 s//\1/
17363 q
17364 }
17365 /^X\(\/\/\)[^/].*/{
17366 s//\1/
17367 q
17368 }
17369 /^X\(\/\/\)$/{
17370 s//\1/
17371 q
17372 }
17373 /^X\(\/\).*/{
17374 s//\1/
17375 q
17376 }
17377 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017378 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000017379 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017380
Bram Moolenaar446cb832008-06-24 21:56:24 +000017381case "$ac_dir" in
17382.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17383*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017384 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017385 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020017386 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017387 case $ac_top_builddir_sub in
17388 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17389 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17390 esac ;;
17391esac
17392ac_abs_top_builddir=$ac_pwd
17393ac_abs_builddir=$ac_pwd$ac_dir_suffix
17394# for backward compatibility:
17395ac_top_builddir=$ac_top_build_prefix
17396
17397case $srcdir in
17398 .) # We are building in place.
17399 ac_srcdir=.
17400 ac_top_srcdir=$ac_top_builddir_sub
17401 ac_abs_top_srcdir=$ac_pwd ;;
17402 [\\/]* | ?:[\\/]* ) # Absolute name.
17403 ac_srcdir=$srcdir$ac_dir_suffix;
17404 ac_top_srcdir=$srcdir
17405 ac_abs_top_srcdir=$srcdir ;;
17406 *) # Relative name.
17407 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17408 ac_top_srcdir=$ac_top_build_prefix$srcdir
17409 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17410esac
17411ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17412
17413
17414 case $ac_mode in
17415 :F)
17416 #
17417 # CONFIG_FILE
17418 #
17419
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017420_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017421
Bram Moolenaar446cb832008-06-24 21:56:24 +000017422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17423# If the template does not know about datarootdir, expand it.
17424# FIXME: This hack should be removed a few years after 2.60.
17425ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017426ac_sed_dataroot='
17427/datarootdir/ {
17428 p
17429 q
17430}
17431/@datadir@/p
17432/@docdir@/p
17433/@infodir@/p
17434/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017435/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017436case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17437*datarootdir*) ac_datarootdir_seen=yes;;
17438*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17440printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017441_ACEOF
17442cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17443 ac_datarootdir_hack='
17444 s&@datadir@&$datadir&g
17445 s&@docdir@&$docdir&g
17446 s&@infodir@&$infodir&g
17447 s&@localedir@&$localedir&g
17448 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017449 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017450esac
17451_ACEOF
17452
17453# Neutralize VPATH when `$srcdir' = `.'.
17454# Shell code in configure.ac might set extrasub.
17455# FIXME: do we really want to maintain this feature?
17456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17457ac_sed_extra="$ac_vpsub
17458$extrasub
17459_ACEOF
17460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17461:t
17462/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17463s|@configure_input@|$ac_sed_conf_input|;t t
17464s&@top_builddir@&$ac_top_builddir_sub&;t t
17465s&@top_build_prefix@&$ac_top_build_prefix&;t t
17466s&@srcdir@&$ac_srcdir&;t t
17467s&@abs_srcdir@&$ac_abs_srcdir&;t t
17468s&@top_srcdir@&$ac_top_srcdir&;t t
17469s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17470s&@builddir@&$ac_builddir&;t t
17471s&@abs_builddir@&$ac_abs_builddir&;t t
17472s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17473$ac_datarootdir_hack
17474"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017475eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17476 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017477
17478test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017479 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17480 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17481 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +020017482 { 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 +010017483which seems to be undefined. Please make sure it is defined" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017484printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017485which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017486
Bram Moolenaar7db77842014-03-27 17:40:59 +010017487 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017488 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017489 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17490 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017491 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017492 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017493 ;;
17494 :H)
17495 #
17496 # CONFIG_HEADER
17497 #
17498 if test x"$ac_file" != x-; then
17499 {
Illia Bobyra96d5442023-08-30 16:30:15 +020017500 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017501 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17502 } >"$ac_tmp/config.h" \
17503 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17504 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17506printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017507 else
17508 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017509 mv "$ac_tmp/config.h" "$ac_file" \
17510 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017511 fi
17512 else
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 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017516 fi
17517 ;;
17518
17519
17520 esac
17521
17522done # for ac_tag
17523
Bram Moolenaar071d4272004-06-13 20:20:40 +000017524
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017525as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017526_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017527ac_clean_files=$ac_clean_files_save
17528
Bram Moolenaar446cb832008-06-24 21:56:24 +000017529test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017530 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017531
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017532
17533# configure is writing to config.log, and then calls config.status.
17534# config.status does its own redirection, appending to config.log.
17535# Unfortunately, on DOS this fails, as config.log is still kept open
17536# by configure, so config.status won't be able to write to it; its
17537# output is simply discarded. So we exec the FD to /dev/null,
17538# effectively closing config.log, so it can be properly (re)opened and
17539# appended to by config.status. When coming back to configure, we
17540# need to make the FD available again.
17541if test "$no_create" != yes; then
17542 ac_cs_success=:
17543 ac_config_status_args=
17544 test "$silent" = yes &&
17545 ac_config_status_args="$ac_config_status_args --quiet"
17546 exec 5>/dev/null
17547 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000017548 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017549 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17550 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017551 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017552fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017553if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17555printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017556fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017557
17558
Illia Bobyra96d5442023-08-30 16:30:15 +020017559