xref: /vim-8.2.3635/src/auto/configure (revision f3caeb63)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in #(
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$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
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  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'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell [email protected] about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
583PACKAGE_URL=
584
585ac_unique_file="vim.h"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600#  include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605#  include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
622ac_subst_vars='LTLIBOBJS
623LIBOBJS
624LINK_AS_NEEDED
625DEPEND_CFLAGS_FILTER
626MSGFMT_DESKTOP
627MAKEMO
628MSGFMT
629INSTALL_TOOL_LANGS
630INSTALL_LANGS
631TAGPRG
632GUI_X_LIBS
633GUITYPE
634GUI_LIB_LOC
635GUI_INC_LOC
636NARROW_PROTO
637MOTIF_LIBNAME
638GRESOURCE_OBJ
639GRESOURCE_SRC
640UPDATE_DESKTOP_DATABASE
641GTK_UPDATE_ICON_CACHE
642GLIB_COMPILE_RESOURCES
643GNOME_INCLUDEDIR
644GNOME_LIBDIR
645GNOME_LIBS
646GTK_LIBNAME
647GTK_LIBS
648GTK_CFLAGS
649PKG_CONFIG
650X_LIB
651X_EXTRA_LIBS
652X_LIBS
653X_PRE_LIBS
654X_CFLAGS
655XMKMF
656xmkmfpath
657TERM_TEST
658TERM_OBJ
659TERM_SRC
660CHANNEL_OBJ
661CHANNEL_SRC
662NETBEANS_OBJ
663NETBEANS_SRC
664RUBY_LIBS
665RUBY_CFLAGS
666RUBY_PRO
667RUBY_OBJ
668RUBY_SRC
669vi_cv_path_ruby
670TCL_LIBS
671TCL_CFLAGS
672TCL_PRO
673TCL_OBJ
674TCL_SRC
675vi_cv_path_tcl
676PYTHON3_OBJ
677PYTHON3_SRC
678PYTHON3_CFLAGS
679PYTHON3_LIBS
680vi_cv_path_python3
681PYTHON_OBJ
682PYTHON_SRC
683PYTHON_CFLAGS
684PYTHON_LIBS
685vi_cv_path_python
686PERL_LIBS
687PERL_CFLAGS
688PERL_PRO
689PERL_OBJ
690PERL_SRC
691shrpenv
692vi_cv_perl_xsubpp
693vi_cv_perllib
694vi_cv_path_perl
695MZSCHEME_MZC
696MZSCHEME_EXTRA
697MZSCHEME_CFLAGS
698MZSCHEME_LIBS
699MZSCHEME_PRO
700MZSCHEME_OBJ
701MZSCHEME_SRC
702vi_cv_path_mzscheme
703LUA_CFLAGS
704LUA_LIBS
705LUA_PRO
706LUA_OBJ
707LUA_SRC
708vi_cv_path_plain_lua
709vi_cv_path_luajit
710vi_cv_path_lua
711compiledby
712dogvimdiff
713dovimdiff
714QUOTESED
715line_break
716VIEWNAME
717EXNAME
718VIMNAME
719OS_EXTRA_OBJ
720OS_EXTRA_SRC
721XCODE_SELECT
722CPP_MM
723CROSS_COMPILING
724BUILD_DATE_MSG
725STRIP
726AWK
727FGREP
728EGREP
729GREP
730CPP
731OBJEXT
732EXEEXT
733ac_ct_CC
734CPPFLAGS
735LDFLAGS
736CFLAGS
737CC
738SET_MAKE
739target_alias
740host_alias
741build_alias
742LIBS
743ECHO_T
744ECHO_N
745ECHO_C
746DEFS
747mandir
748localedir
749libdir
750psdir
751pdfdir
752dvidir
753htmldir
754infodir
755docdir
756oldincludedir
757includedir
758runstatedir
759localstatedir
760sharedstatedir
761sysconfdir
762datadir
763datarootdir
764libexecdir
765sbindir
766bindir
767program_transform_name
768prefix
769exec_prefix
770PACKAGE_URL
771PACKAGE_BUGREPORT
772PACKAGE_STRING
773PACKAGE_VERSION
774PACKAGE_TARNAME
775PACKAGE_NAME
776PATH_SEPARATOR
777SHELL'
778ac_subst_files=''
779ac_user_opts='
780enable_option_checking
781enable_fail_if_missing
782enable_darwin
783with_mac_arch
784with_developer_dir
785with_local_dir
786with_vim_name
787with_ex_name
788with_view_name
789with_global_runtime
790with_modified_by
791enable_smack
792enable_selinux
793with_features
794with_compiledby
795enable_xsmp
796enable_xsmp_interact
797enable_luainterp
798with_lua_prefix
799with_luajit
800enable_mzschemeinterp
801with_plthome
802enable_perlinterp
803enable_pythoninterp
804with_python_command
805with_python_config_dir
806enable_python3interp
807with_python3_command
808with_python3_config_dir
809enable_tclinterp
810with_tclsh
811enable_rubyinterp
812with_ruby_command
813enable_cscope
814enable_netbeans
815enable_channel
816enable_terminal
817enable_autoservername
818enable_multibyte
819enable_rightleft
820enable_arabic
821enable_farsi
822enable_xim
823enable_fontset
824with_x
825enable_gui
826enable_gtk2_check
827enable_gnome_check
828enable_gtk3_check
829enable_motif_check
830enable_athena_check
831enable_nextaw_check
832enable_gtktest
833with_gnome_includes
834with_gnome_libs
835with_gnome
836enable_icon_cache_update
837enable_desktop_database_update
838with_motif_lib
839with_tlib
840enable_largefile
841enable_canberra
842enable_libsodium
843enable_acl
844enable_gpm
845enable_sysmouse
846enable_nls
847'
848      ac_precious_vars='build_alias
849host_alias
850target_alias
851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
856CPP
857XMKMF'
858
859
860# Initialize some variables set by options.
861ac_init_help=
862ac_init_version=false
863ac_unrecognized_opts=
864ac_unrecognized_sep=
865# The variables have the same names as the options, with
866# dashes changed to underlines.
867cache_file=/dev/null
868exec_prefix=NONE
869no_create=
870no_recursion=
871prefix=NONE
872program_prefix=NONE
873program_suffix=NONE
874program_transform_name=s,x,x,
875silent=
876site=
877srcdir=
878verbose=
879x_includes=NONE
880x_libraries=NONE
881
882# Installation directory options.
883# These are left unexpanded so users can "make install exec_prefix=/foo"
884# and all the variables that are supposed to be based on exec_prefix
885# by default will actually change.
886# Use braces instead of parens because sh, perl, etc. also accept them.
887# (The list follows the same order as the GNU Coding Standards.)
888bindir='${exec_prefix}/bin'
889sbindir='${exec_prefix}/sbin'
890libexecdir='${exec_prefix}/libexec'
891datarootdir='${prefix}/share'
892datadir='${datarootdir}'
893sysconfdir='${prefix}/etc'
894sharedstatedir='${prefix}/com'
895localstatedir='${prefix}/var'
896runstatedir='${localstatedir}/run'
897includedir='${prefix}/include'
898oldincludedir='/usr/include'
899docdir='${datarootdir}/doc/${PACKAGE}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
908
909ac_prev=
910ac_dashdash=
911for ac_option
912do
913  # If the previous option needs an argument, assign it.
914  if test -n "$ac_prev"; then
915    eval $ac_prev=\$ac_option
916    ac_prev=
917    continue
918  fi
919
920  case $ac_option in
921  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922  *=)   ac_optarg= ;;
923  *)    ac_optarg=yes ;;
924  esac
925
926  # Accept the important Cygnus configure options, so we can diagnose typos.
927
928  case $ac_dashdash$ac_option in
929  --)
930    ac_dashdash=yes ;;
931
932  -bindir | --bindir | --bindi | --bind | --bin | --bi)
933    ac_prev=bindir ;;
934  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
935    bindir=$ac_optarg ;;
936
937  -build | --build | --buil | --bui | --bu)
938    ac_prev=build_alias ;;
939  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
940    build_alias=$ac_optarg ;;
941
942  -cache-file | --cache-file | --cache-fil | --cache-fi \
943  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944    ac_prev=cache_file ;;
945  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
947    cache_file=$ac_optarg ;;
948
949  --config-cache | -C)
950    cache_file=config.cache ;;
951
952  -datadir | --datadir | --datadi | --datad)
953    ac_prev=datadir ;;
954  -datadir=* | --datadir=* | --datadi=* | --datad=*)
955    datadir=$ac_optarg ;;
956
957  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958  | --dataroo | --dataro | --datar)
959    ac_prev=datarootdir ;;
960  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962    datarootdir=$ac_optarg ;;
963
964  -disable-* | --disable-*)
965    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
966    # Reject names that are not valid shell variable names.
967    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
968      as_fn_error $? "invalid feature name: $ac_useropt"
969    ac_useropt_orig=$ac_useropt
970    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971    case $ac_user_opts in
972      *"
973"enable_$ac_useropt"
974"*) ;;
975      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976	 ac_unrecognized_sep=', ';;
977    esac
978    eval enable_$ac_useropt=no ;;
979
980  -docdir | --docdir | --docdi | --doc | --do)
981    ac_prev=docdir ;;
982  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983    docdir=$ac_optarg ;;
984
985  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986    ac_prev=dvidir ;;
987  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988    dvidir=$ac_optarg ;;
989
990  -enable-* | --enable-*)
991    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
992    # Reject names that are not valid shell variable names.
993    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
994      as_fn_error $? "invalid feature name: $ac_useropt"
995    ac_useropt_orig=$ac_useropt
996    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997    case $ac_user_opts in
998      *"
999"enable_$ac_useropt"
1000"*) ;;
1001      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002	 ac_unrecognized_sep=', ';;
1003    esac
1004    eval enable_$ac_useropt=\$ac_optarg ;;
1005
1006  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008  | --exec | --exe | --ex)
1009    ac_prev=exec_prefix ;;
1010  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012  | --exec=* | --exe=* | --ex=*)
1013    exec_prefix=$ac_optarg ;;
1014
1015  -gas | --gas | --ga | --g)
1016    # Obsolete; use --with-gas.
1017    with_gas=yes ;;
1018
1019  -help | --help | --hel | --he | -h)
1020    ac_init_help=long ;;
1021  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022    ac_init_help=recursive ;;
1023  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024    ac_init_help=short ;;
1025
1026  -host | --host | --hos | --ho)
1027    ac_prev=host_alias ;;
1028  -host=* | --host=* | --hos=* | --ho=*)
1029    host_alias=$ac_optarg ;;
1030
1031  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032    ac_prev=htmldir ;;
1033  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034  | --ht=*)
1035    htmldir=$ac_optarg ;;
1036
1037  -includedir | --includedir | --includedi | --included | --include \
1038  | --includ | --inclu | --incl | --inc)
1039    ac_prev=includedir ;;
1040  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041  | --includ=* | --inclu=* | --incl=* | --inc=*)
1042    includedir=$ac_optarg ;;
1043
1044  -infodir | --infodir | --infodi | --infod | --info | --inf)
1045    ac_prev=infodir ;;
1046  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1047    infodir=$ac_optarg ;;
1048
1049  -libdir | --libdir | --libdi | --libd)
1050    ac_prev=libdir ;;
1051  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1052    libdir=$ac_optarg ;;
1053
1054  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055  | --libexe | --libex | --libe)
1056    ac_prev=libexecdir ;;
1057  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058  | --libexe=* | --libex=* | --libe=*)
1059    libexecdir=$ac_optarg ;;
1060
1061  -localedir | --localedir | --localedi | --localed | --locale)
1062    ac_prev=localedir ;;
1063  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064    localedir=$ac_optarg ;;
1065
1066  -localstatedir | --localstatedir | --localstatedi | --localstated \
1067  | --localstate | --localstat | --localsta | --localst | --locals)
1068    ac_prev=localstatedir ;;
1069  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1070  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1071    localstatedir=$ac_optarg ;;
1072
1073  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074    ac_prev=mandir ;;
1075  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1076    mandir=$ac_optarg ;;
1077
1078  -nfp | --nfp | --nf)
1079    # Obsolete; use --without-fp.
1080    with_fp=no ;;
1081
1082  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1083  | --no-cr | --no-c | -n)
1084    no_create=yes ;;
1085
1086  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088    no_recursion=yes ;;
1089
1090  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092  | --oldin | --oldi | --old | --ol | --o)
1093    ac_prev=oldincludedir ;;
1094  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1097    oldincludedir=$ac_optarg ;;
1098
1099  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100    ac_prev=prefix ;;
1101  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1102    prefix=$ac_optarg ;;
1103
1104  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105  | --program-pre | --program-pr | --program-p)
1106    ac_prev=program_prefix ;;
1107  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1109    program_prefix=$ac_optarg ;;
1110
1111  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112  | --program-suf | --program-su | --program-s)
1113    ac_prev=program_suffix ;;
1114  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1116    program_suffix=$ac_optarg ;;
1117
1118  -program-transform-name | --program-transform-name \
1119  | --program-transform-nam | --program-transform-na \
1120  | --program-transform-n | --program-transform- \
1121  | --program-transform | --program-transfor \
1122  | --program-transfo | --program-transf \
1123  | --program-trans | --program-tran \
1124  | --progr-tra | --program-tr | --program-t)
1125    ac_prev=program_transform_name ;;
1126  -program-transform-name=* | --program-transform-name=* \
1127  | --program-transform-nam=* | --program-transform-na=* \
1128  | --program-transform-n=* | --program-transform-=* \
1129  | --program-transform=* | --program-transfor=* \
1130  | --program-transfo=* | --program-transf=* \
1131  | --program-trans=* | --program-tran=* \
1132  | --progr-tra=* | --program-tr=* | --program-t=*)
1133    program_transform_name=$ac_optarg ;;
1134
1135  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136    ac_prev=pdfdir ;;
1137  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138    pdfdir=$ac_optarg ;;
1139
1140  -psdir | --psdir | --psdi | --psd | --ps)
1141    ac_prev=psdir ;;
1142  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143    psdir=$ac_optarg ;;
1144
1145  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146  | -silent | --silent | --silen | --sile | --sil)
1147    silent=yes ;;
1148
1149  -runstatedir | --runstatedir | --runstatedi | --runstated \
1150  | --runstate | --runstat | --runsta | --runst | --runs \
1151  | --run | --ru | --r)
1152    ac_prev=runstatedir ;;
1153  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1154  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1155  | --run=* | --ru=* | --r=*)
1156    runstatedir=$ac_optarg ;;
1157
1158  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1159    ac_prev=sbindir ;;
1160  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1161  | --sbi=* | --sb=*)
1162    sbindir=$ac_optarg ;;
1163
1164  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1165  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1166  | --sharedst | --shareds | --shared | --share | --shar \
1167  | --sha | --sh)
1168    ac_prev=sharedstatedir ;;
1169  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1170  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1171  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1172  | --sha=* | --sh=*)
1173    sharedstatedir=$ac_optarg ;;
1174
1175  -site | --site | --sit)
1176    ac_prev=site ;;
1177  -site=* | --site=* | --sit=*)
1178    site=$ac_optarg ;;
1179
1180  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1181    ac_prev=srcdir ;;
1182  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1183    srcdir=$ac_optarg ;;
1184
1185  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1186  | --syscon | --sysco | --sysc | --sys | --sy)
1187    ac_prev=sysconfdir ;;
1188  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1189  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1190    sysconfdir=$ac_optarg ;;
1191
1192  -target | --target | --targe | --targ | --tar | --ta | --t)
1193    ac_prev=target_alias ;;
1194  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1195    target_alias=$ac_optarg ;;
1196
1197  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1198    verbose=yes ;;
1199
1200  -version | --version | --versio | --versi | --vers | -V)
1201    ac_init_version=: ;;
1202
1203  -with-* | --with-*)
1204    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1205    # Reject names that are not valid shell variable names.
1206    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1207      as_fn_error $? "invalid package name: $ac_useropt"
1208    ac_useropt_orig=$ac_useropt
1209    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1210    case $ac_user_opts in
1211      *"
1212"with_$ac_useropt"
1213"*) ;;
1214      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1215	 ac_unrecognized_sep=', ';;
1216    esac
1217    eval with_$ac_useropt=\$ac_optarg ;;
1218
1219  -without-* | --without-*)
1220    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1221    # Reject names that are not valid shell variable names.
1222    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1223      as_fn_error $? "invalid package name: $ac_useropt"
1224    ac_useropt_orig=$ac_useropt
1225    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1226    case $ac_user_opts in
1227      *"
1228"with_$ac_useropt"
1229"*) ;;
1230      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1231	 ac_unrecognized_sep=', ';;
1232    esac
1233    eval with_$ac_useropt=no ;;
1234
1235  --x)
1236    # Obsolete; use --with-x.
1237    with_x=yes ;;
1238
1239  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1240  | --x-incl | --x-inc | --x-in | --x-i)
1241    ac_prev=x_includes ;;
1242  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1243  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1244    x_includes=$ac_optarg ;;
1245
1246  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1247  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1248    ac_prev=x_libraries ;;
1249  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1250  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1251    x_libraries=$ac_optarg ;;
1252
1253  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1254Try \`$0 --help' for more information"
1255    ;;
1256
1257  *=*)
1258    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1259    # Reject names that are not valid shell variable names.
1260    case $ac_envvar in #(
1261      '' | [0-9]* | *[!_$as_cr_alnum]* )
1262      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1263    esac
1264    eval $ac_envvar=\$ac_optarg
1265    export $ac_envvar ;;
1266
1267  *)
1268    # FIXME: should be removed in autoconf 3.0.
1269    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1270    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1271      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1272    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1273    ;;
1274
1275  esac
1276done
1277
1278if test -n "$ac_prev"; then
1279  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1280  as_fn_error $? "missing argument to $ac_option"
1281fi
1282
1283if test -n "$ac_unrecognized_opts"; then
1284  case $enable_option_checking in
1285    no) ;;
1286    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1287    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1288  esac
1289fi
1290
1291# Check all directory arguments for consistency.
1292for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1293		datadir sysconfdir sharedstatedir localstatedir includedir \
1294		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1295		libdir localedir mandir runstatedir
1296do
1297  eval ac_val=\$$ac_var
1298  # Remove trailing slashes.
1299  case $ac_val in
1300    */ )
1301      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1302      eval $ac_var=\$ac_val;;
1303  esac
1304  # Be sure to have absolute directory names.
1305  case $ac_val in
1306    [\\/$]* | ?:[\\/]* )  continue;;
1307    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1308  esac
1309  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1310done
1311
1312# There might be people who depend on the old broken behavior: `$host'
1313# used to hold the argument of --host etc.
1314# FIXME: To remove some day.
1315build=$build_alias
1316host=$host_alias
1317target=$target_alias
1318
1319# FIXME: To remove some day.
1320if test "x$host_alias" != x; then
1321  if test "x$build_alias" = x; then
1322    cross_compiling=maybe
1323  elif test "x$build_alias" != "x$host_alias"; then
1324    cross_compiling=yes
1325  fi
1326fi
1327
1328ac_tool_prefix=
1329test -n "$host_alias" && ac_tool_prefix=$host_alias-
1330
1331test "$silent" = yes && exec 6>/dev/null
1332
1333
1334ac_pwd=`pwd` && test -n "$ac_pwd" &&
1335ac_ls_di=`ls -di .` &&
1336ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1337  as_fn_error $? "working directory cannot be determined"
1338test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1339  as_fn_error $? "pwd does not report name of working directory"
1340
1341
1342# Find the source files, if location was not specified.
1343if test -z "$srcdir"; then
1344  ac_srcdir_defaulted=yes
1345  # Try the directory containing this script, then the parent directory.
1346  ac_confdir=`$as_dirname -- "$as_myself" ||
1347$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1348	 X"$as_myself" : 'X\(//\)[^/]' \| \
1349	 X"$as_myself" : 'X\(//\)$' \| \
1350	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1351$as_echo X"$as_myself" |
1352    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1353	    s//\1/
1354	    q
1355	  }
1356	  /^X\(\/\/\)[^/].*/{
1357	    s//\1/
1358	    q
1359	  }
1360	  /^X\(\/\/\)$/{
1361	    s//\1/
1362	    q
1363	  }
1364	  /^X\(\/\).*/{
1365	    s//\1/
1366	    q
1367	  }
1368	  s/.*/./; q'`
1369  srcdir=$ac_confdir
1370  if test ! -r "$srcdir/$ac_unique_file"; then
1371    srcdir=..
1372  fi
1373else
1374  ac_srcdir_defaulted=no
1375fi
1376if test ! -r "$srcdir/$ac_unique_file"; then
1377  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1378  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1379fi
1380ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1381ac_abs_confdir=`(
1382	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1383	pwd)`
1384# When building in place, set srcdir=.
1385if test "$ac_abs_confdir" = "$ac_pwd"; then
1386  srcdir=.
1387fi
1388# Remove unnecessary trailing slashes from srcdir.
1389# Double slashes in file names in object file debugging info
1390# mess up M-x gdb in Emacs.
1391case $srcdir in
1392*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1393esac
1394for ac_var in $ac_precious_vars; do
1395  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1396  eval ac_env_${ac_var}_value=\$${ac_var}
1397  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1398  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1399done
1400
1401#
1402# Report the --help message.
1403#
1404if test "$ac_init_help" = "long"; then
1405  # Omit some internal or obsolete options to make the list less imposing.
1406  # This message is too long to be a string in the A/UX 3.1 sh.
1407  cat <<_ACEOF
1408\`configure' configures this package to adapt to many kinds of systems.
1409
1410Usage: $0 [OPTION]... [VAR=VALUE]...
1411
1412To assign environment variables (e.g., CC, CFLAGS...), specify them as
1413VAR=VALUE.  See below for descriptions of some of the useful variables.
1414
1415Defaults for the options are specified in brackets.
1416
1417Configuration:
1418  -h, --help              display this help and exit
1419      --help=short        display options specific to this package
1420      --help=recursive    display the short help of all the included packages
1421  -V, --version           display version information and exit
1422  -q, --quiet, --silent   do not print \`checking ...' messages
1423      --cache-file=FILE   cache test results in FILE [disabled]
1424  -C, --config-cache      alias for \`--cache-file=config.cache'
1425  -n, --no-create         do not create output files
1426      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1427
1428Installation directories:
1429  --prefix=PREFIX         install architecture-independent files in PREFIX
1430                          [$ac_default_prefix]
1431  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1432                          [PREFIX]
1433
1434By default, \`make install' will install all the files in
1435\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1436an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1437for instance \`--prefix=\$HOME'.
1438
1439For better control, use the options below.
1440
1441Fine tuning of the installation directories:
1442  --bindir=DIR            user executables [EPREFIX/bin]
1443  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1444  --libexecdir=DIR        program executables [EPREFIX/libexec]
1445  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1446  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1447  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1448  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1449  --libdir=DIR            object code libraries [EPREFIX/lib]
1450  --includedir=DIR        C header files [PREFIX/include]
1451  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1452  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1453  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1454  --infodir=DIR           info documentation [DATAROOTDIR/info]
1455  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1456  --mandir=DIR            man documentation [DATAROOTDIR/man]
1457  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1458  --htmldir=DIR           html documentation [DOCDIR]
1459  --dvidir=DIR            dvi documentation [DOCDIR]
1460  --pdfdir=DIR            pdf documentation [DOCDIR]
1461  --psdir=DIR             ps documentation [DOCDIR]
1462_ACEOF
1463
1464  cat <<\_ACEOF
1465
1466X features:
1467  --x-includes=DIR    X include files are in DIR
1468  --x-libraries=DIR   X library files are in DIR
1469_ACEOF
1470fi
1471
1472if test -n "$ac_init_help"; then
1473
1474  cat <<\_ACEOF
1475
1476Optional Features:
1477  --disable-option-checking  ignore unrecognized --enable/--with options
1478  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1479  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1480  --enable-fail-if-missing    Fail if dependencies on additional features
1481     specified on the command line are missing.
1482  --disable-darwin        Disable Darwin (Mac OS X) support.
1483  --disable-smack	  Do not check for Smack support.
1484  --disable-selinux	  Do not check for SELinux support.
1485  --disable-xsmp          Disable XSMP session management
1486  --disable-xsmp-interact Disable XSMP interaction
1487  --enable-luainterp=OPTS      Include Lua interpreter.  default=no OPTS=no/yes/dynamic
1488  --enable-mzschemeinterp      Include MzScheme interpreter.
1489  --enable-perlinterp=OPTS     Include Perl interpreter.  default=no OPTS=no/yes/dynamic
1490  --enable-pythoninterp=OPTS   Include Python interpreter. default=no OPTS=no/yes/dynamic
1491  --enable-python3interp=OPTS  Include Python3 interpreter. default=no OPTS=no/yes/dynamic
1492  --enable-tclinterp=OPTS      Include Tcl interpreter. default=no OPTS=no/yes/dynamic
1493  --enable-rubyinterp=OPTS     Include Ruby interpreter.  default=no OPTS=no/yes/dynamic
1494  --enable-cscope         Include cscope interface.
1495  --disable-netbeans      Disable NetBeans integration support.
1496  --disable-channel       Disable process communication support.
1497  --enable-terminal       Enable terminal emulation support.
1498  --enable-autoservername Automatically define servername at vim startup.
1499  --enable-multibyte      Include multibyte editing support.
1500  --disable-rightleft     Do not include Right-to-Left language support.
1501  --disable-arabic        Do not include Arabic language support.
1502  --disable-farsi         Deprecated.
1503  --enable-xim            Include XIM input support.
1504  --enable-fontset        Include X fontset output support.
1505  --enable-gui=OPTS       X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon
1506  --enable-gtk2-check     If auto-select GUI, check for GTK+ 2 default=yes
1507  --enable-gnome-check    If GTK GUI, check for GNOME default=no
1508  --enable-gtk3-check     If auto-select GUI, check for GTK+ 3 default=yes
1509  --enable-motif-check    If auto-select GUI, check for Motif default=yes
1510  --enable-athena-check   If auto-select GUI, check for Athena default=yes
1511  --enable-nextaw-check   If auto-select GUI, check for neXtaw default=yes
1512  --disable-gtktest       Do not try to compile and run a test GTK program
1513  --disable-icon-cache-update        update disabled
1514  --disable-desktop-database-update  update disabled
1515  --disable-largefile     omit support for large files
1516  --disable-canberra      Do not use libcanberra.
1517  --disable-libsodium      Do not use libsodium.
1518  --disable-acl           No check for ACL support.
1519  --disable-gpm           Don't use gpm (Linux mouse daemon).
1520  --disable-sysmouse      Don't use sysmouse (mouse in *BSD console).
1521  --disable-nls           Don't support NLS (gettext()).
1522
1523Optional Packages:
1524  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1525  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1526  --with-mac-arch=ARCH    current, intel, ppc or both
1527  --with-developer-dir=PATH    use PATH as location for Xcode developer tools
1528  --with-local-dir=PATH   search PATH instead of /usr/local for local libraries.
1529  --without-local-dir     do not search /usr/local for local libraries.
1530  --with-vim-name=NAME    what to call the Vim executable
1531  --with-ex-name=NAME     what to call the Ex executable
1532  --with-view-name=NAME   what to call the View executable
1533  --with-global-runtime=DIR    global runtime directory in 'runtimepath', comma-separated for multiple directories
1534  --with-modified-by=NAME       name of who modified a release version
1535  --with-features=TYPE    tiny, small, normal, big or huge (default: huge)
1536  --with-compiledby=NAME  name to show in :version message
1537  --with-lua-prefix=PFX   Prefix where Lua is installed.
1538  --with-luajit           Link with LuaJIT instead of Lua.
1539  --with-plthome=PLTHOME   Use PLTHOME.
1540  --with-python-command=NAME  name of the Python 2 command (default: python2 or python)
1541  --with-python-config-dir=PATH  Python's config directory (deprecated)
1542  --with-python3-command=NAME  name of the Python 3 command (default: python3 or python)
1543  --with-python3-config-dir=PATH  Python's config directory (deprecated)
1544  --with-tclsh=PATH       which tclsh to use (default: tclsh8.0)
1545  --with-ruby-command=RUBY  name of the Ruby command (default: ruby)
1546  --with-x                use the X Window System
1547  --with-gnome-includes=DIR Specify location of GNOME headers
1548  --with-gnome-libs=DIR   Specify location of GNOME libs
1549  --with-gnome            Specify prefix for GNOME files
1550  --with-motif-lib=STRING Library for Motif
1551  --with-tlib=library     terminal library to be used
1552
1553Some influential environment variables:
1554  CC          C compiler command
1555  CFLAGS      C compiler flags
1556  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1557              nonstandard directory <lib dir>
1558  LIBS        libraries to pass to the linker, e.g. -l<library>
1559  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1560              you have headers in a nonstandard directory <include dir>
1561  CPP         C preprocessor
1562  XMKMF       Path to xmkmf, Makefile generator for X Window System
1563
1564Use these variables to override the choices made by `configure' or to help
1565it to find libraries and programs with nonstandard names/locations.
1566
1567Report bugs to the package provider.
1568_ACEOF
1569ac_status=$?
1570fi
1571
1572if test "$ac_init_help" = "recursive"; then
1573  # If there are subdirs, report their specific --help.
1574  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1575    test -d "$ac_dir" ||
1576      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1577      continue
1578    ac_builddir=.
1579
1580case "$ac_dir" in
1581.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582*)
1583  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1584  # A ".." for each directory in $ac_dir_suffix.
1585  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1586  case $ac_top_builddir_sub in
1587  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1589  esac ;;
1590esac
1591ac_abs_top_builddir=$ac_pwd
1592ac_abs_builddir=$ac_pwd$ac_dir_suffix
1593# for backward compatibility:
1594ac_top_builddir=$ac_top_build_prefix
1595
1596case $srcdir in
1597  .)  # We are building in place.
1598    ac_srcdir=.
1599    ac_top_srcdir=$ac_top_builddir_sub
1600    ac_abs_top_srcdir=$ac_pwd ;;
1601  [\\/]* | ?:[\\/]* )  # Absolute name.
1602    ac_srcdir=$srcdir$ac_dir_suffix;
1603    ac_top_srcdir=$srcdir
1604    ac_abs_top_srcdir=$srcdir ;;
1605  *) # Relative name.
1606    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1607    ac_top_srcdir=$ac_top_build_prefix$srcdir
1608    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1609esac
1610ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1611
1612    cd "$ac_dir" || { ac_status=$?; continue; }
1613    # Check for guested configure.
1614    if test -f "$ac_srcdir/configure.gnu"; then
1615      echo &&
1616      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1617    elif test -f "$ac_srcdir/configure"; then
1618      echo &&
1619      $SHELL "$ac_srcdir/configure" --help=recursive
1620    else
1621      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1622    fi || ac_status=$?
1623    cd "$ac_pwd" || { ac_status=$?; break; }
1624  done
1625fi
1626
1627test -n "$ac_init_help" && exit $ac_status
1628if $ac_init_version; then
1629  cat <<\_ACEOF
1630configure
1631generated by GNU Autoconf 2.69
1632
1633Copyright (C) 2012 Free Software Foundation, Inc.
1634This configure script is free software; the Free Software Foundation
1635gives unlimited permission to copy, distribute and modify it.
1636_ACEOF
1637  exit
1638fi
1639
1640## ------------------------ ##
1641## Autoconf initialization. ##
1642## ------------------------ ##
1643
1644# ac_fn_c_try_compile LINENO
1645# --------------------------
1646# Try to compile conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_compile ()
1648{
1649  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650  rm -f conftest.$ac_objext
1651  if { { ac_try="$ac_compile"
1652case "(($ac_try" in
1653  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654  *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658  (eval "$ac_compile") 2>conftest.err
1659  ac_status=$?
1660  if test -s conftest.err; then
1661    grep -v '^ *+' conftest.err >conftest.er1
1662    cat conftest.er1 >&5
1663    mv -f conftest.er1 conftest.err
1664  fi
1665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666  test $ac_status = 0; } && {
1667	 test -z "$ac_c_werror_flag" ||
1668	 test ! -s conftest.err
1669       } && test -s conftest.$ac_objext; then :
1670  ac_retval=0
1671else
1672  $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675	ac_retval=1
1676fi
1677  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1678  as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_compile
1681
1682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688  if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691  *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696  ac_status=$?
1697  if test -s conftest.err; then
1698    grep -v '^ *+' conftest.err >conftest.er1
1699    cat conftest.er1 >&5
1700    mv -f conftest.er1 conftest.err
1701  fi
1702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703  test $ac_status = 0; } > conftest.i && {
1704	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705	 test ! -s conftest.err
1706       }; then :
1707  ac_retval=0
1708else
1709  $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712    ac_retval=1
1713fi
1714  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1715  as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
1719# ac_fn_c_try_link LINENO
1720# -----------------------
1721# Try to link conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_link ()
1723{
1724  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725  rm -f conftest.$ac_objext conftest$ac_exeext
1726  if { { ac_try="$ac_link"
1727case "(($ac_try" in
1728  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729  *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732$as_echo "$ac_try_echo"; } >&5
1733  (eval "$ac_link") 2>conftest.err
1734  ac_status=$?
1735  if test -s conftest.err; then
1736    grep -v '^ *+' conftest.err >conftest.er1
1737    cat conftest.er1 >&5
1738    mv -f conftest.er1 conftest.err
1739  fi
1740  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1741  test $ac_status = 0; } && {
1742	 test -z "$ac_c_werror_flag" ||
1743	 test ! -s conftest.err
1744       } && test -s conftest$ac_exeext && {
1745	 test "$cross_compiling" = yes ||
1746	 test -x conftest$ac_exeext
1747       }; then :
1748  ac_retval=0
1749else
1750  $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753	ac_retval=1
1754fi
1755  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1756  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1757  # interfere with the next link command; also delete a directory that is
1758  # left behind by Apple's compiler.  We do this before executing the actions.
1759  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1760  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1761  as_fn_set_status $ac_retval
1762
1763} # ac_fn_c_try_link
1764
1765# ac_fn_c_try_run LINENO
1766# ----------------------
1767# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1768# that executables *can* be run.
1769ac_fn_c_try_run ()
1770{
1771  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772  if { { ac_try="$ac_link"
1773case "(($ac_try" in
1774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775  *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779  (eval "$ac_link") 2>&5
1780  ac_status=$?
1781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1783  { { case "(($ac_try" in
1784  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1785  *) ac_try_echo=$ac_try;;
1786esac
1787eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1788$as_echo "$ac_try_echo"; } >&5
1789  (eval "$ac_try") 2>&5
1790  ac_status=$?
1791  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792  test $ac_status = 0; }; }; then :
1793  ac_retval=0
1794else
1795  $as_echo "$as_me: program exited with status $ac_status" >&5
1796       $as_echo "$as_me: failed program was:" >&5
1797sed 's/^/| /' conftest.$ac_ext >&5
1798
1799       ac_retval=$ac_status
1800fi
1801  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1802  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803  as_fn_set_status $ac_retval
1804
1805} # ac_fn_c_try_run
1806
1807# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1808# -------------------------------------------------------
1809# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1810# the include files in INCLUDES and setting the cache variable VAR
1811# accordingly.
1812ac_fn_c_check_header_mongrel ()
1813{
1814  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1815  if eval \${$3+:} false; then :
1816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1817$as_echo_n "checking for $2... " >&6; }
1818if eval \${$3+:} false; then :
1819  $as_echo_n "(cached) " >&6
1820fi
1821eval ac_res=\$$3
1822	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1823$as_echo "$ac_res" >&6; }
1824else
1825  # Is the header compilable?
1826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1827$as_echo_n "checking $2 usability... " >&6; }
1828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1829/* end confdefs.h.  */
1830$4
1831#include <$2>
1832_ACEOF
1833if ac_fn_c_try_compile "$LINENO"; then :
1834  ac_header_compiler=yes
1835else
1836  ac_header_compiler=no
1837fi
1838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1840$as_echo "$ac_header_compiler" >&6; }
1841
1842# Is the header present?
1843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1844$as_echo_n "checking $2 presence... " >&6; }
1845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846/* end confdefs.h.  */
1847#include <$2>
1848_ACEOF
1849if ac_fn_c_try_cpp "$LINENO"; then :
1850  ac_header_preproc=yes
1851else
1852  ac_header_preproc=no
1853fi
1854rm -f conftest.err conftest.i conftest.$ac_ext
1855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1856$as_echo "$ac_header_preproc" >&6; }
1857
1858# So?  What about this header?
1859case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1860  yes:no: )
1861    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1862$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1863    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1864$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1865    ;;
1866  no:yes:* )
1867    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1868$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1869    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1870$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1871    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1872$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1873    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1874$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1875    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1876$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1877    ;;
1878esac
1879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1880$as_echo_n "checking for $2... " >&6; }
1881if eval \${$3+:} false; then :
1882  $as_echo_n "(cached) " >&6
1883else
1884  eval "$3=\$ac_header_compiler"
1885fi
1886eval ac_res=\$$3
1887	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1888$as_echo "$ac_res" >&6; }
1889fi
1890  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1891
1892} # ac_fn_c_check_header_mongrel
1893
1894# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1895# -------------------------------------------------------
1896# Tests whether HEADER exists and can be compiled using the include files in
1897# INCLUDES, setting the cache variable VAR accordingly.
1898ac_fn_c_check_header_compile ()
1899{
1900  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1902$as_echo_n "checking for $2... " >&6; }
1903if eval \${$3+:} false; then :
1904  $as_echo_n "(cached) " >&6
1905else
1906  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1907/* end confdefs.h.  */
1908$4
1909#include <$2>
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912  eval "$3=yes"
1913else
1914  eval "$3=no"
1915fi
1916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1917fi
1918eval ac_res=\$$3
1919	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1920$as_echo "$ac_res" >&6; }
1921  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1922
1923} # ac_fn_c_check_header_compile
1924
1925# ac_fn_c_check_func LINENO FUNC VAR
1926# ----------------------------------
1927# Tests whether FUNC exists, setting the cache variable VAR accordingly
1928ac_fn_c_check_func ()
1929{
1930  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1932$as_echo_n "checking for $2... " >&6; }
1933if eval \${$3+:} false; then :
1934  $as_echo_n "(cached) " >&6
1935else
1936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h.  */
1938/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1939   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1940#define $2 innocuous_$2
1941
1942/* System header to define __stub macros and hopefully few prototypes,
1943    which can conflict with char $2 (); below.
1944    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1945    <limits.h> exists even on freestanding compilers.  */
1946
1947#ifdef __STDC__
1948# include <limits.h>
1949#else
1950# include <assert.h>
1951#endif
1952
1953#undef $2
1954
1955/* Override any GCC internal prototype to avoid an error.
1956   Use char because int might match the return type of a GCC
1957   builtin and then its argument prototype would still apply.  */
1958#ifdef __cplusplus
1959extern "C"
1960#endif
1961char $2 ();
1962/* The GNU C library defines this for functions which it implements
1963    to always fail with ENOSYS.  Some functions are actually named
1964    something starting with __ and the normal name is an alias.  */
1965#if defined __stub_$2 || defined __stub___$2
1966choke me
1967#endif
1968
1969int
1970main ()
1971{
1972return $2 ();
1973  ;
1974  return 0;
1975}
1976_ACEOF
1977if ac_fn_c_try_link "$LINENO"; then :
1978  eval "$3=yes"
1979else
1980  eval "$3=no"
1981fi
1982rm -f core conftest.err conftest.$ac_objext \
1983    conftest$ac_exeext conftest.$ac_ext
1984fi
1985eval ac_res=\$$3
1986	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987$as_echo "$ac_res" >&6; }
1988  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1989
1990} # ac_fn_c_check_func
1991
1992# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1993# -------------------------------------------
1994# Tests whether TYPE exists after having included INCLUDES, setting cache
1995# variable VAR accordingly.
1996ac_fn_c_check_type ()
1997{
1998  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2000$as_echo_n "checking for $2... " >&6; }
2001if eval \${$3+:} false; then :
2002  $as_echo_n "(cached) " >&6
2003else
2004  eval "$3=no"
2005  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h.  */
2007$4
2008int
2009main ()
2010{
2011if (sizeof ($2))
2012	 return 0;
2013  ;
2014  return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019/* end confdefs.h.  */
2020$4
2021int
2022main ()
2023{
2024if (sizeof (($2)))
2025	    return 0;
2026  ;
2027  return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031
2032else
2033  eval "$3=yes"
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038fi
2039eval ac_res=\$$3
2040	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2041$as_echo "$ac_res" >&6; }
2042  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2043
2044} # ac_fn_c_check_type
2045
2046# ac_fn_c_find_uintX_t LINENO BITS VAR
2047# ------------------------------------
2048# Finds an unsigned integer type with width BITS, setting cache variable VAR
2049# accordingly.
2050ac_fn_c_find_uintX_t ()
2051{
2052  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2054$as_echo_n "checking for uint$2_t... " >&6; }
2055if eval \${$3+:} false; then :
2056  $as_echo_n "(cached) " >&6
2057else
2058  eval "$3=no"
2059     # Order is important - never check a type that is potentially smaller
2060     # than half of the expected target width.
2061     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2062	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2063       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064/* end confdefs.h.  */
2065$ac_includes_default
2066int
2067main ()
2068{
2069static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2070test_array [0] = 0;
2071return test_array [0];
2072
2073  ;
2074  return 0;
2075}
2076_ACEOF
2077if ac_fn_c_try_compile "$LINENO"; then :
2078  case $ac_type in #(
2079  uint$2_t) :
2080    eval "$3=yes" ;; #(
2081  *) :
2082    eval "$3=\$ac_type" ;;
2083esac
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086       if eval test \"x\$"$3"\" = x"no"; then :
2087
2088else
2089  break
2090fi
2091     done
2092fi
2093eval ac_res=\$$3
2094	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2095$as_echo "$ac_res" >&6; }
2096  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2097
2098} # ac_fn_c_find_uintX_t
2099
2100# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2101# --------------------------------------------
2102# Tries to find the compile-time value of EXPR in a program that includes
2103# INCLUDES, setting VAR accordingly. Returns whether the value could be
2104# computed
2105ac_fn_c_compute_int ()
2106{
2107  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108  if test "$cross_compiling" = yes; then
2109    # Depending upon the size, compute the lo and hi bounds.
2110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h.  */
2112$4
2113int
2114main ()
2115{
2116static int test_array [1 - 2 * !(($2) >= 0)];
2117test_array [0] = 0;
2118return test_array [0];
2119
2120  ;
2121  return 0;
2122}
2123_ACEOF
2124if ac_fn_c_try_compile "$LINENO"; then :
2125  ac_lo=0 ac_mid=0
2126  while :; do
2127    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h.  */
2129$4
2130int
2131main ()
2132{
2133static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2134test_array [0] = 0;
2135return test_array [0];
2136
2137  ;
2138  return 0;
2139}
2140_ACEOF
2141if ac_fn_c_try_compile "$LINENO"; then :
2142  ac_hi=$ac_mid; break
2143else
2144  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2145			if test $ac_lo -le $ac_mid; then
2146			  ac_lo= ac_hi=
2147			  break
2148			fi
2149			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152  done
2153else
2154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h.  */
2156$4
2157int
2158main ()
2159{
2160static int test_array [1 - 2 * !(($2) < 0)];
2161test_array [0] = 0;
2162return test_array [0];
2163
2164  ;
2165  return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169  ac_hi=-1 ac_mid=-1
2170  while :; do
2171    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* end confdefs.h.  */
2173$4
2174int
2175main ()
2176{
2177static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2178test_array [0] = 0;
2179return test_array [0];
2180
2181  ;
2182  return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_compile "$LINENO"; then :
2186  ac_lo=$ac_mid; break
2187else
2188  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2189			if test $ac_mid -le $ac_hi; then
2190			  ac_lo= ac_hi=
2191			  break
2192			fi
2193			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196  done
2197else
2198  ac_lo= ac_hi=
2199fi
2200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203# Binary search between lo and hi bounds.
2204while test "x$ac_lo" != "x$ac_hi"; do
2205  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2207/* end confdefs.h.  */
2208$4
2209int
2210main ()
2211{
2212static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2213test_array [0] = 0;
2214return test_array [0];
2215
2216  ;
2217  return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_compile "$LINENO"; then :
2221  ac_hi=$ac_mid
2222else
2223  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2224fi
2225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2226done
2227case $ac_lo in #((
2228?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2229'') ac_retval=1 ;;
2230esac
2231  else
2232    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2233/* end confdefs.h.  */
2234$4
2235static long int longval () { return $2; }
2236static unsigned long int ulongval () { return $2; }
2237#include <stdio.h>
2238#include <stdlib.h>
2239int
2240main ()
2241{
2242
2243  FILE *f = fopen ("conftest.val", "w");
2244  if (! f)
2245    return 1;
2246  if (($2) < 0)
2247    {
2248      long int i = longval ();
2249      if (i != ($2))
2250	return 1;
2251      fprintf (f, "%ld", i);
2252    }
2253  else
2254    {
2255      unsigned long int i = ulongval ();
2256      if (i != ($2))
2257	return 1;
2258      fprintf (f, "%lu", i);
2259    }
2260  /* Do not output a trailing newline, as this causes \r\n confusion
2261     on some platforms.  */
2262  return ferror (f) || fclose (f) != 0;
2263
2264  ;
2265  return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_run "$LINENO"; then :
2269  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2270else
2271  ac_retval=1
2272fi
2273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2274  conftest.$ac_objext conftest.beam conftest.$ac_ext
2275rm -f conftest.val
2276
2277  fi
2278  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279  as_fn_set_status $ac_retval
2280
2281} # ac_fn_c_compute_int
2282cat >auto/config.log <<_ACEOF
2283This file contains any messages produced by compilers while
2284running configure, to aid debugging if configure makes a mistake.
2285
2286It was created by $as_me, which was
2287generated by GNU Autoconf 2.69.  Invocation command line was
2288
2289  $ $0 $@
2290
2291_ACEOF
2292exec 5>>auto/config.log
2293{
2294cat <<_ASUNAME
2295## --------- ##
2296## Platform. ##
2297## --------- ##
2298
2299hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2300uname -m = `(uname -m) 2>/dev/null || echo unknown`
2301uname -r = `(uname -r) 2>/dev/null || echo unknown`
2302uname -s = `(uname -s) 2>/dev/null || echo unknown`
2303uname -v = `(uname -v) 2>/dev/null || echo unknown`
2304
2305/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2306/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2307
2308/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2309/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2310/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2311/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2312/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2313/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2314/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2315
2316_ASUNAME
2317
2318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2319for as_dir in $PATH
2320do
2321  IFS=$as_save_IFS
2322  test -z "$as_dir" && as_dir=.
2323    $as_echo "PATH: $as_dir"
2324  done
2325IFS=$as_save_IFS
2326
2327} >&5
2328
2329cat >&5 <<_ACEOF
2330
2331
2332## ----------- ##
2333## Core tests. ##
2334## ----------- ##
2335
2336_ACEOF
2337
2338
2339# Keep a trace of the command line.
2340# Strip out --no-create and --no-recursion so they do not pile up.
2341# Strip out --silent because we don't want to record it for future runs.
2342# Also quote any args containing shell meta-characters.
2343# Make two passes to allow for proper duplicate-argument suppression.
2344ac_configure_args=
2345ac_configure_args0=
2346ac_configure_args1=
2347ac_must_keep_next=false
2348for ac_pass in 1 2
2349do
2350  for ac_arg
2351  do
2352    case $ac_arg in
2353    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2354    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2355    | -silent | --silent | --silen | --sile | --sil)
2356      continue ;;
2357    *\'*)
2358      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2359    esac
2360    case $ac_pass in
2361    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2362    2)
2363      as_fn_append ac_configure_args1 " '$ac_arg'"
2364      if test $ac_must_keep_next = true; then
2365	ac_must_keep_next=false # Got value, back to normal.
2366      else
2367	case $ac_arg in
2368	  *=* | --config-cache | -C | -disable-* | --disable-* \
2369	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2370	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2371	  | -with-* | --with-* | -without-* | --without-* | --x)
2372	    case "$ac_configure_args0 " in
2373	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2374	    esac
2375	    ;;
2376	  -* ) ac_must_keep_next=true ;;
2377	esac
2378      fi
2379      as_fn_append ac_configure_args " '$ac_arg'"
2380      ;;
2381    esac
2382  done
2383done
2384{ ac_configure_args0=; unset ac_configure_args0;}
2385{ ac_configure_args1=; unset ac_configure_args1;}
2386
2387# When interrupted or exit'd, cleanup temporary files, and complete
2388# config.log.  We remove comments because anyway the quotes in there
2389# would cause problems or look ugly.
2390# WARNING: Use '\'' to represent an apostrophe within the trap.
2391# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2392trap 'exit_status=$?
2393  # Save into config.log some information that might help in debugging.
2394  {
2395    echo
2396
2397    $as_echo "## ---------------- ##
2398## Cache variables. ##
2399## ---------------- ##"
2400    echo
2401    # The following way of writing the cache mishandles newlines in values,
2402(
2403  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2404    eval ac_val=\$$ac_var
2405    case $ac_val in #(
2406    *${as_nl}*)
2407      case $ac_var in #(
2408      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2409$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2410      esac
2411      case $ac_var in #(
2412      _ | IFS | as_nl) ;; #(
2413      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2414      *) { eval $ac_var=; unset $ac_var;} ;;
2415      esac ;;
2416    esac
2417  done
2418  (set) 2>&1 |
2419    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2420    *${as_nl}ac_space=\ *)
2421      sed -n \
2422	"s/'\''/'\''\\\\'\'''\''/g;
2423	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2424      ;; #(
2425    *)
2426      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2427      ;;
2428    esac |
2429    sort
2430)
2431    echo
2432
2433    $as_echo "## ----------------- ##
2434## Output variables. ##
2435## ----------------- ##"
2436    echo
2437    for ac_var in $ac_subst_vars
2438    do
2439      eval ac_val=\$$ac_var
2440      case $ac_val in
2441      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2442      esac
2443      $as_echo "$ac_var='\''$ac_val'\''"
2444    done | sort
2445    echo
2446
2447    if test -n "$ac_subst_files"; then
2448      $as_echo "## ------------------- ##
2449## File substitutions. ##
2450## ------------------- ##"
2451      echo
2452      for ac_var in $ac_subst_files
2453      do
2454	eval ac_val=\$$ac_var
2455	case $ac_val in
2456	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2457	esac
2458	$as_echo "$ac_var='\''$ac_val'\''"
2459      done | sort
2460      echo
2461    fi
2462
2463    if test -s confdefs.h; then
2464      $as_echo "## ----------- ##
2465## confdefs.h. ##
2466## ----------- ##"
2467      echo
2468      cat confdefs.h
2469      echo
2470    fi
2471    test "$ac_signal" != 0 &&
2472      $as_echo "$as_me: caught signal $ac_signal"
2473    $as_echo "$as_me: exit $exit_status"
2474  } >&5
2475  rm -f core *.core core.conftest.* &&
2476    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2477    exit $exit_status
2478' 0
2479for ac_signal in 1 2 13 15; do
2480  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2481done
2482ac_signal=0
2483
2484# confdefs.h avoids OS command line length limits that DEFS can exceed.
2485rm -f -r conftest* confdefs.h
2486
2487$as_echo "/* confdefs.h */" > confdefs.h
2488
2489# Predefined preprocessor variables.
2490
2491cat >>confdefs.h <<_ACEOF
2492#define PACKAGE_NAME "$PACKAGE_NAME"
2493_ACEOF
2494
2495cat >>confdefs.h <<_ACEOF
2496#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2497_ACEOF
2498
2499cat >>confdefs.h <<_ACEOF
2500#define PACKAGE_VERSION "$PACKAGE_VERSION"
2501_ACEOF
2502
2503cat >>confdefs.h <<_ACEOF
2504#define PACKAGE_STRING "$PACKAGE_STRING"
2505_ACEOF
2506
2507cat >>confdefs.h <<_ACEOF
2508#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2509_ACEOF
2510
2511cat >>confdefs.h <<_ACEOF
2512#define PACKAGE_URL "$PACKAGE_URL"
2513_ACEOF
2514
2515
2516# Let the site file select an alternate cache file if it wants to.
2517# Prefer an explicitly selected file to automatically selected ones.
2518ac_site_file1=NONE
2519ac_site_file2=NONE
2520if test -n "$CONFIG_SITE"; then
2521  # We do not want a PATH search for config.site.
2522  case $CONFIG_SITE in #((
2523    -*)  ac_site_file1=./$CONFIG_SITE;;
2524    */*) ac_site_file1=$CONFIG_SITE;;
2525    *)   ac_site_file1=./$CONFIG_SITE;;
2526  esac
2527elif test "x$prefix" != xNONE; then
2528  ac_site_file1=$prefix/share/config.site
2529  ac_site_file2=$prefix/etc/config.site
2530else
2531  ac_site_file1=$ac_default_prefix/share/config.site
2532  ac_site_file2=$ac_default_prefix/etc/config.site
2533fi
2534for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2535do
2536  test "x$ac_site_file" = xNONE && continue
2537  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2538    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2539$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2540    sed 's/^/| /' "$ac_site_file" >&5
2541    . "$ac_site_file" \
2542      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2544as_fn_error $? "failed to load site script $ac_site_file
2545See \`config.log' for more details" "$LINENO" 5; }
2546  fi
2547done
2548
2549if test -r "$cache_file"; then
2550  # Some versions of bash will fail to source /dev/null (special files
2551  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2552  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2553    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2554$as_echo "$as_me: loading cache $cache_file" >&6;}
2555    case $cache_file in
2556      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2557      *)                      . "./$cache_file";;
2558    esac
2559  fi
2560else
2561  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2562$as_echo "$as_me: creating cache $cache_file" >&6;}
2563  >$cache_file
2564fi
2565
2566# Check that the precious variables saved in the cache have kept the same
2567# value.
2568ac_cache_corrupted=false
2569for ac_var in $ac_precious_vars; do
2570  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2571  eval ac_new_set=\$ac_env_${ac_var}_set
2572  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2573  eval ac_new_val=\$ac_env_${ac_var}_value
2574  case $ac_old_set,$ac_new_set in
2575    set,)
2576      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2577$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2578      ac_cache_corrupted=: ;;
2579    ,set)
2580      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2581$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2582      ac_cache_corrupted=: ;;
2583    ,);;
2584    *)
2585      if test "x$ac_old_val" != "x$ac_new_val"; then
2586	# differences in whitespace do not lead to failure.
2587	ac_old_val_w=`echo x $ac_old_val`
2588	ac_new_val_w=`echo x $ac_new_val`
2589	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2590	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2591$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2592	  ac_cache_corrupted=:
2593	else
2594	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2595$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2596	  eval $ac_var=\$ac_old_val
2597	fi
2598	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2599$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2600	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2601$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2602      fi;;
2603  esac
2604  # Pass precious variables to config.status.
2605  if test "$ac_new_set" = set; then
2606    case $ac_new_val in
2607    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2608    *) ac_arg=$ac_var=$ac_new_val ;;
2609    esac
2610    case " $ac_configure_args " in
2611      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2612      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2613    esac
2614  fi
2615done
2616if $ac_cache_corrupted; then
2617  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2619  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2620$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2621  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2622fi
2623## -------------------- ##
2624## Main body of script. ##
2625## -------------------- ##
2626
2627ac_ext=c
2628ac_cpp='$CPP $CPPFLAGS'
2629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2631ac_compiler_gnu=$ac_cv_c_compiler_gnu
2632
2633
2634ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2635
2636
2637$as_echo "#define UNIX 1" >>confdefs.h
2638
2639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2640$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2641set x ${MAKE-make}
2642ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2643if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2644  $as_echo_n "(cached) " >&6
2645else
2646  cat >conftest.make <<\_ACEOF
2647SHELL = /bin/sh
2648all:
2649	@echo '@@@%%%=$(MAKE)=@@@%%%'
2650_ACEOF
2651# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2652case `${MAKE-make} -f conftest.make 2>/dev/null` in
2653  *@@@%%%=?*=@@@%%%*)
2654    eval ac_cv_prog_make_${ac_make}_set=yes;;
2655  *)
2656    eval ac_cv_prog_make_${ac_make}_set=no;;
2657esac
2658rm -f conftest.make
2659fi
2660if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2662$as_echo "yes" >&6; }
2663  SET_MAKE=
2664else
2665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2666$as_echo "no" >&6; }
2667  SET_MAKE="MAKE=${MAKE-make}"
2668fi
2669
2670
2671ac_ext=c
2672ac_cpp='$CPP $CPPFLAGS'
2673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2675ac_compiler_gnu=$ac_cv_c_compiler_gnu
2676if test -n "$ac_tool_prefix"; then
2677  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2678set dummy ${ac_tool_prefix}gcc; ac_word=$2
2679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2680$as_echo_n "checking for $ac_word... " >&6; }
2681if ${ac_cv_prog_CC+:} false; then :
2682  $as_echo_n "(cached) " >&6
2683else
2684  if test -n "$CC"; then
2685  ac_cv_prog_CC="$CC" # Let the user override the test.
2686else
2687as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2688for as_dir in $PATH
2689do
2690  IFS=$as_save_IFS
2691  test -z "$as_dir" && as_dir=.
2692    for ac_exec_ext in '' $ac_executable_extensions; do
2693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2694    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2696    break 2
2697  fi
2698done
2699  done
2700IFS=$as_save_IFS
2701
2702fi
2703fi
2704CC=$ac_cv_prog_CC
2705if test -n "$CC"; then
2706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2707$as_echo "$CC" >&6; }
2708else
2709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2710$as_echo "no" >&6; }
2711fi
2712
2713
2714fi
2715if test -z "$ac_cv_prog_CC"; then
2716  ac_ct_CC=$CC
2717  # Extract the first word of "gcc", so it can be a program name with args.
2718set dummy gcc; ac_word=$2
2719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2720$as_echo_n "checking for $ac_word... " >&6; }
2721if ${ac_cv_prog_ac_ct_CC+:} false; then :
2722  $as_echo_n "(cached) " >&6
2723else
2724  if test -n "$ac_ct_CC"; then
2725  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2726else
2727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2728for as_dir in $PATH
2729do
2730  IFS=$as_save_IFS
2731  test -z "$as_dir" && as_dir=.
2732    for ac_exec_ext in '' $ac_executable_extensions; do
2733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2734    ac_cv_prog_ac_ct_CC="gcc"
2735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2736    break 2
2737  fi
2738done
2739  done
2740IFS=$as_save_IFS
2741
2742fi
2743fi
2744ac_ct_CC=$ac_cv_prog_ac_ct_CC
2745if test -n "$ac_ct_CC"; then
2746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2747$as_echo "$ac_ct_CC" >&6; }
2748else
2749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2750$as_echo "no" >&6; }
2751fi
2752
2753  if test "x$ac_ct_CC" = x; then
2754    CC=""
2755  else
2756    case $cross_compiling:$ac_tool_warned in
2757yes:)
2758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2760ac_tool_warned=yes ;;
2761esac
2762    CC=$ac_ct_CC
2763  fi
2764else
2765  CC="$ac_cv_prog_CC"
2766fi
2767
2768if test -z "$CC"; then
2769          if test -n "$ac_tool_prefix"; then
2770    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2771set dummy ${ac_tool_prefix}cc; ac_word=$2
2772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2773$as_echo_n "checking for $ac_word... " >&6; }
2774if ${ac_cv_prog_CC+:} false; then :
2775  $as_echo_n "(cached) " >&6
2776else
2777  if test -n "$CC"; then
2778  ac_cv_prog_CC="$CC" # Let the user override the test.
2779else
2780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2781for as_dir in $PATH
2782do
2783  IFS=$as_save_IFS
2784  test -z "$as_dir" && as_dir=.
2785    for ac_exec_ext in '' $ac_executable_extensions; do
2786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2787    ac_cv_prog_CC="${ac_tool_prefix}cc"
2788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2789    break 2
2790  fi
2791done
2792  done
2793IFS=$as_save_IFS
2794
2795fi
2796fi
2797CC=$ac_cv_prog_CC
2798if test -n "$CC"; then
2799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2800$as_echo "$CC" >&6; }
2801else
2802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2803$as_echo "no" >&6; }
2804fi
2805
2806
2807  fi
2808fi
2809if test -z "$CC"; then
2810  # Extract the first word of "cc", so it can be a program name with args.
2811set dummy cc; ac_word=$2
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2813$as_echo_n "checking for $ac_word... " >&6; }
2814if ${ac_cv_prog_CC+:} false; then :
2815  $as_echo_n "(cached) " >&6
2816else
2817  if test -n "$CC"; then
2818  ac_cv_prog_CC="$CC" # Let the user override the test.
2819else
2820  ac_prog_rejected=no
2821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2822for as_dir in $PATH
2823do
2824  IFS=$as_save_IFS
2825  test -z "$as_dir" && as_dir=.
2826    for ac_exec_ext in '' $ac_executable_extensions; do
2827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2828    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2829       ac_prog_rejected=yes
2830       continue
2831     fi
2832    ac_cv_prog_CC="cc"
2833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2834    break 2
2835  fi
2836done
2837  done
2838IFS=$as_save_IFS
2839
2840if test $ac_prog_rejected = yes; then
2841  # We found a bogon in the path, so make sure we never use it.
2842  set dummy $ac_cv_prog_CC
2843  shift
2844  if test $# != 0; then
2845    # We chose a different compiler from the bogus one.
2846    # However, it has the same basename, so the bogon will be chosen
2847    # first if we set CC to just the basename; use the full file name.
2848    shift
2849    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2850  fi
2851fi
2852fi
2853fi
2854CC=$ac_cv_prog_CC
2855if test -n "$CC"; then
2856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2857$as_echo "$CC" >&6; }
2858else
2859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2860$as_echo "no" >&6; }
2861fi
2862
2863
2864fi
2865if test -z "$CC"; then
2866  if test -n "$ac_tool_prefix"; then
2867  for ac_prog in cl.exe
2868  do
2869    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2870set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2872$as_echo_n "checking for $ac_word... " >&6; }
2873if ${ac_cv_prog_CC+:} false; then :
2874  $as_echo_n "(cached) " >&6
2875else
2876  if test -n "$CC"; then
2877  ac_cv_prog_CC="$CC" # Let the user override the test.
2878else
2879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2880for as_dir in $PATH
2881do
2882  IFS=$as_save_IFS
2883  test -z "$as_dir" && as_dir=.
2884    for ac_exec_ext in '' $ac_executable_extensions; do
2885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2886    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2888    break 2
2889  fi
2890done
2891  done
2892IFS=$as_save_IFS
2893
2894fi
2895fi
2896CC=$ac_cv_prog_CC
2897if test -n "$CC"; then
2898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2899$as_echo "$CC" >&6; }
2900else
2901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2902$as_echo "no" >&6; }
2903fi
2904
2905
2906    test -n "$CC" && break
2907  done
2908fi
2909if test -z "$CC"; then
2910  ac_ct_CC=$CC
2911  for ac_prog in cl.exe
2912do
2913  # Extract the first word of "$ac_prog", so it can be a program name with args.
2914set dummy $ac_prog; ac_word=$2
2915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2916$as_echo_n "checking for $ac_word... " >&6; }
2917if ${ac_cv_prog_ac_ct_CC+:} false; then :
2918  $as_echo_n "(cached) " >&6
2919else
2920  if test -n "$ac_ct_CC"; then
2921  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2922else
2923as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2924for as_dir in $PATH
2925do
2926  IFS=$as_save_IFS
2927  test -z "$as_dir" && as_dir=.
2928    for ac_exec_ext in '' $ac_executable_extensions; do
2929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2930    ac_cv_prog_ac_ct_CC="$ac_prog"
2931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2932    break 2
2933  fi
2934done
2935  done
2936IFS=$as_save_IFS
2937
2938fi
2939fi
2940ac_ct_CC=$ac_cv_prog_ac_ct_CC
2941if test -n "$ac_ct_CC"; then
2942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2943$as_echo "$ac_ct_CC" >&6; }
2944else
2945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2946$as_echo "no" >&6; }
2947fi
2948
2949
2950  test -n "$ac_ct_CC" && break
2951done
2952
2953  if test "x$ac_ct_CC" = x; then
2954    CC=""
2955  else
2956    case $cross_compiling:$ac_tool_warned in
2957yes:)
2958{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2959$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2960ac_tool_warned=yes ;;
2961esac
2962    CC=$ac_ct_CC
2963  fi
2964fi
2965
2966fi
2967
2968
2969test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2971as_fn_error $? "no acceptable C compiler found in \$PATH
2972See \`config.log' for more details" "$LINENO" 5; }
2973
2974# Provide some information about the compiler.
2975$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2976set X $ac_compile
2977ac_compiler=$2
2978for ac_option in --version -v -V -qversion; do
2979  { { ac_try="$ac_compiler $ac_option >&5"
2980case "(($ac_try" in
2981  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2982  *) ac_try_echo=$ac_try;;
2983esac
2984eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2985$as_echo "$ac_try_echo"; } >&5
2986  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2987  ac_status=$?
2988  if test -s conftest.err; then
2989    sed '10a\
2990... rest of stderr output deleted ...
2991         10q' conftest.err >conftest.er1
2992    cat conftest.er1 >&5
2993  fi
2994  rm -f conftest.er1 conftest.err
2995  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2996  test $ac_status = 0; }
2997done
2998
2999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000/* end confdefs.h.  */
3001
3002int
3003main ()
3004{
3005
3006  ;
3007  return 0;
3008}
3009_ACEOF
3010ac_clean_files_save=$ac_clean_files
3011ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3012# Try to create an executable without -o first, disregard a.out.
3013# It will help us diagnose broken compilers, and finding out an intuition
3014# of exeext.
3015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3016$as_echo_n "checking whether the C compiler works... " >&6; }
3017ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3018
3019# The possible output files:
3020ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3021
3022ac_rmfiles=
3023for ac_file in $ac_files
3024do
3025  case $ac_file in
3026    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3027    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3028  esac
3029done
3030rm -f $ac_rmfiles
3031
3032if { { ac_try="$ac_link_default"
3033case "(($ac_try" in
3034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3035  *) ac_try_echo=$ac_try;;
3036esac
3037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3038$as_echo "$ac_try_echo"; } >&5
3039  (eval "$ac_link_default") 2>&5
3040  ac_status=$?
3041  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3042  test $ac_status = 0; }; then :
3043  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3044# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3045# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3046# so that the user can short-circuit this test for compilers unknown to
3047# Autoconf.
3048for ac_file in $ac_files ''
3049do
3050  test -f "$ac_file" || continue
3051  case $ac_file in
3052    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3053	;;
3054    [ab].out )
3055	# We found the default executable, but exeext='' is most
3056	# certainly right.
3057	break;;
3058    *.* )
3059	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3060	then :; else
3061	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3062	fi
3063	# We set ac_cv_exeext here because the later test for it is not
3064	# safe: cross compilers may not add the suffix if given an `-o'
3065	# argument, so we may need to know it at that point already.
3066	# Even if this section looks crufty: it has the advantage of
3067	# actually working.
3068	break;;
3069    * )
3070	break;;
3071  esac
3072done
3073test "$ac_cv_exeext" = no && ac_cv_exeext=
3074
3075else
3076  ac_file=''
3077fi
3078if test -z "$ac_file"; then :
3079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3080$as_echo "no" >&6; }
3081$as_echo "$as_me: failed program was:" >&5
3082sed 's/^/| /' conftest.$ac_ext >&5
3083
3084{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086as_fn_error 77 "C compiler cannot create executables
3087See \`config.log' for more details" "$LINENO" 5; }
3088else
3089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3090$as_echo "yes" >&6; }
3091fi
3092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3093$as_echo_n "checking for C compiler default output file name... " >&6; }
3094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3095$as_echo "$ac_file" >&6; }
3096ac_exeext=$ac_cv_exeext
3097
3098rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3099ac_clean_files=$ac_clean_files_save
3100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3101$as_echo_n "checking for suffix of executables... " >&6; }
3102if { { ac_try="$ac_link"
3103case "(($ac_try" in
3104  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3105  *) ac_try_echo=$ac_try;;
3106esac
3107eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3108$as_echo "$ac_try_echo"; } >&5
3109  (eval "$ac_link") 2>&5
3110  ac_status=$?
3111  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3112  test $ac_status = 0; }; then :
3113  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3114# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3115# work properly (i.e., refer to `conftest.exe'), while it won't with
3116# `rm'.
3117for ac_file in conftest.exe conftest conftest.*; do
3118  test -f "$ac_file" || continue
3119  case $ac_file in
3120    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3121    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3122	  break;;
3123    * ) break;;
3124  esac
3125done
3126else
3127  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3128$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3129as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3130See \`config.log' for more details" "$LINENO" 5; }
3131fi
3132rm -f conftest conftest$ac_cv_exeext
3133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3134$as_echo "$ac_cv_exeext" >&6; }
3135
3136rm -f conftest.$ac_ext
3137EXEEXT=$ac_cv_exeext
3138ac_exeext=$EXEEXT
3139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3140/* end confdefs.h.  */
3141#include <stdio.h>
3142int
3143main ()
3144{
3145FILE *f = fopen ("conftest.out", "w");
3146 return ferror (f) || fclose (f) != 0;
3147
3148  ;
3149  return 0;
3150}
3151_ACEOF
3152ac_clean_files="$ac_clean_files conftest.out"
3153# Check that the compiler produces executables we can run.  If not, either
3154# the compiler is broken, or we cross compile.
3155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3156$as_echo_n "checking whether we are cross compiling... " >&6; }
3157if test "$cross_compiling" != yes; then
3158  { { ac_try="$ac_link"
3159case "(($ac_try" in
3160  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161  *) ac_try_echo=$ac_try;;
3162esac
3163eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3164$as_echo "$ac_try_echo"; } >&5
3165  (eval "$ac_link") 2>&5
3166  ac_status=$?
3167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3168  test $ac_status = 0; }
3169  if { ac_try='./conftest$ac_cv_exeext'
3170  { { case "(($ac_try" in
3171  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3172  *) ac_try_echo=$ac_try;;
3173esac
3174eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3175$as_echo "$ac_try_echo"; } >&5
3176  (eval "$ac_try") 2>&5
3177  ac_status=$?
3178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3179  test $ac_status = 0; }; }; then
3180    cross_compiling=no
3181  else
3182    if test "$cross_compiling" = maybe; then
3183	cross_compiling=yes
3184    else
3185	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3186$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3187as_fn_error $? "cannot run C compiled programs.
3188If you meant to cross compile, use \`--host'.
3189See \`config.log' for more details" "$LINENO" 5; }
3190    fi
3191  fi
3192fi
3193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3194$as_echo "$cross_compiling" >&6; }
3195
3196rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3197ac_clean_files=$ac_clean_files_save
3198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3199$as_echo_n "checking for suffix of object files... " >&6; }
3200if ${ac_cv_objext+:} false; then :
3201  $as_echo_n "(cached) " >&6
3202else
3203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3204/* end confdefs.h.  */
3205
3206int
3207main ()
3208{
3209
3210  ;
3211  return 0;
3212}
3213_ACEOF
3214rm -f conftest.o conftest.obj
3215if { { ac_try="$ac_compile"
3216case "(($ac_try" in
3217  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3218  *) ac_try_echo=$ac_try;;
3219esac
3220eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3221$as_echo "$ac_try_echo"; } >&5
3222  (eval "$ac_compile") 2>&5
3223  ac_status=$?
3224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3225  test $ac_status = 0; }; then :
3226  for ac_file in conftest.o conftest.obj conftest.*; do
3227  test -f "$ac_file" || continue;
3228  case $ac_file in
3229    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3230    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3231       break;;
3232  esac
3233done
3234else
3235  $as_echo "$as_me: failed program was:" >&5
3236sed 's/^/| /' conftest.$ac_ext >&5
3237
3238{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3240as_fn_error $? "cannot compute suffix of object files: cannot compile
3241See \`config.log' for more details" "$LINENO" 5; }
3242fi
3243rm -f conftest.$ac_cv_objext conftest.$ac_ext
3244fi
3245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3246$as_echo "$ac_cv_objext" >&6; }
3247OBJEXT=$ac_cv_objext
3248ac_objext=$OBJEXT
3249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3250$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3251if ${ac_cv_c_compiler_gnu+:} false; then :
3252  $as_echo_n "(cached) " >&6
3253else
3254  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3255/* end confdefs.h.  */
3256
3257int
3258main ()
3259{
3260#ifndef __GNUC__
3261       choke me
3262#endif
3263
3264  ;
3265  return 0;
3266}
3267_ACEOF
3268if ac_fn_c_try_compile "$LINENO"; then :
3269  ac_compiler_gnu=yes
3270else
3271  ac_compiler_gnu=no
3272fi
3273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3274ac_cv_c_compiler_gnu=$ac_compiler_gnu
3275
3276fi
3277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3278$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3279if test $ac_compiler_gnu = yes; then
3280  GCC=yes
3281else
3282  GCC=
3283fi
3284ac_test_CFLAGS=${CFLAGS+set}
3285ac_save_CFLAGS=$CFLAGS
3286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3287$as_echo_n "checking whether $CC accepts -g... " >&6; }
3288if ${ac_cv_prog_cc_g+:} false; then :
3289  $as_echo_n "(cached) " >&6
3290else
3291  ac_save_c_werror_flag=$ac_c_werror_flag
3292   ac_c_werror_flag=yes
3293   ac_cv_prog_cc_g=no
3294   CFLAGS="-g"
3295   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3296/* end confdefs.h.  */
3297
3298int
3299main ()
3300{
3301
3302  ;
3303  return 0;
3304}
3305_ACEOF
3306if ac_fn_c_try_compile "$LINENO"; then :
3307  ac_cv_prog_cc_g=yes
3308else
3309  CFLAGS=""
3310      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3311/* end confdefs.h.  */
3312
3313int
3314main ()
3315{
3316
3317  ;
3318  return 0;
3319}
3320_ACEOF
3321if ac_fn_c_try_compile "$LINENO"; then :
3322
3323else
3324  ac_c_werror_flag=$ac_save_c_werror_flag
3325	 CFLAGS="-g"
3326	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3327/* end confdefs.h.  */
3328
3329int
3330main ()
3331{
3332
3333  ;
3334  return 0;
3335}
3336_ACEOF
3337if ac_fn_c_try_compile "$LINENO"; then :
3338  ac_cv_prog_cc_g=yes
3339fi
3340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3341fi
3342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3343fi
3344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3345   ac_c_werror_flag=$ac_save_c_werror_flag
3346fi
3347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3348$as_echo "$ac_cv_prog_cc_g" >&6; }
3349if test "$ac_test_CFLAGS" = set; then
3350  CFLAGS=$ac_save_CFLAGS
3351elif test $ac_cv_prog_cc_g = yes; then
3352  if test "$GCC" = yes; then
3353    CFLAGS="-g -O2"
3354  else
3355    CFLAGS="-g"
3356  fi
3357else
3358  if test "$GCC" = yes; then
3359    CFLAGS="-O2"
3360  else
3361    CFLAGS=
3362  fi
3363fi
3364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3365$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3366if ${ac_cv_prog_cc_c89+:} false; then :
3367  $as_echo_n "(cached) " >&6
3368else
3369  ac_cv_prog_cc_c89=no
3370ac_save_CC=$CC
3371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3372/* end confdefs.h.  */
3373#include <stdarg.h>
3374#include <stdio.h>
3375struct stat;
3376/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3377struct buf { int x; };
3378FILE * (*rcsopen) (struct buf *, struct stat *, int);
3379static char *e (p, i)
3380     char **p;
3381     int i;
3382{
3383  return p[i];
3384}
3385static char *f (char * (*g) (char **, int), char **p, ...)
3386{
3387  char *s;
3388  va_list v;
3389  va_start (v,p);
3390  s = g (p, va_arg (v,int));
3391  va_end (v);
3392  return s;
3393}
3394
3395/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3396   function prototypes and stuff, but not '\xHH' hex character constants.
3397   These don't provoke an error unfortunately, instead are silently treated
3398   as 'x'.  The following induces an error, until -std is added to get
3399   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3400   array size at least.  It's necessary to write '\x00'==0 to get something
3401   that's true only with -std.  */
3402int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3403
3404/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3405   inside strings and character constants.  */
3406#define FOO(x) 'x'
3407int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3408
3409int test (int i, double x);
3410struct s1 {int (*f) (int a);};
3411struct s2 {int (*f) (double a);};
3412int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3413int argc;
3414char **argv;
3415int
3416main ()
3417{
3418return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3419  ;
3420  return 0;
3421}
3422_ACEOF
3423for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3424	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3425do
3426  CC="$ac_save_CC $ac_arg"
3427  if ac_fn_c_try_compile "$LINENO"; then :
3428  ac_cv_prog_cc_c89=$ac_arg
3429fi
3430rm -f core conftest.err conftest.$ac_objext
3431  test "x$ac_cv_prog_cc_c89" != "xno" && break
3432done
3433rm -f conftest.$ac_ext
3434CC=$ac_save_CC
3435
3436fi
3437# AC_CACHE_VAL
3438case "x$ac_cv_prog_cc_c89" in
3439  x)
3440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3441$as_echo "none needed" >&6; } ;;
3442  xno)
3443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3444$as_echo "unsupported" >&6; } ;;
3445  *)
3446    CC="$CC $ac_cv_prog_cc_c89"
3447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3448$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3449esac
3450if test "x$ac_cv_prog_cc_c89" != xno; then :
3451
3452fi
3453
3454ac_ext=c
3455ac_cpp='$CPP $CPPFLAGS'
3456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3458ac_compiler_gnu=$ac_cv_c_compiler_gnu
3459
3460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3461$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3462if ${ac_cv_prog_cc_c99+:} false; then :
3463  $as_echo_n "(cached) " >&6
3464else
3465  ac_cv_prog_cc_c99=no
3466ac_save_CC=$CC
3467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3468/* end confdefs.h.  */
3469#include <stdarg.h>
3470#include <stdbool.h>
3471#include <stdlib.h>
3472#include <wchar.h>
3473#include <stdio.h>
3474
3475// Check varargs macros.  These examples are taken from C99 6.10.3.5.
3476#define debug(...) fprintf (stderr, __VA_ARGS__)
3477#define showlist(...) puts (#__VA_ARGS__)
3478#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3479static void
3480test_varargs_macros (void)
3481{
3482  int x = 1234;
3483  int y = 5678;
3484  debug ("Flag");
3485  debug ("X = %d\n", x);
3486  showlist (The first, second, and third items.);
3487  report (x>y, "x is %d but y is %d", x, y);
3488}
3489
3490// Check long long types.
3491#define BIG64 18446744073709551615ull
3492#define BIG32 4294967295ul
3493#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3494#if !BIG_OK
3495  your preprocessor is broken;
3496#endif
3497#if BIG_OK
3498#else
3499  your preprocessor is broken;
3500#endif
3501static long long int bignum = -9223372036854775807LL;
3502static unsigned long long int ubignum = BIG64;
3503
3504struct incomplete_array
3505{
3506  int datasize;
3507  double data[];
3508};
3509
3510struct named_init {
3511  int number;
3512  const wchar_t *name;
3513  double average;
3514};
3515
3516typedef const char *ccp;
3517
3518static inline int
3519test_restrict (ccp restrict text)
3520{
3521  // See if C++-style comments work.
3522  // Iterate through items via the restricted pointer.
3523  // Also check for declarations in for loops.
3524  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3525    continue;
3526  return 0;
3527}
3528
3529// Check varargs and va_copy.
3530static void
3531test_varargs (const char *format, ...)
3532{
3533  va_list args;
3534  va_start (args, format);
3535  va_list args_copy;
3536  va_copy (args_copy, args);
3537
3538  const char *str;
3539  int number;
3540  float fnumber;
3541
3542  while (*format)
3543    {
3544      switch (*format++)
3545	{
3546	case 's': // string
3547	  str = va_arg (args_copy, const char *);
3548	  break;
3549	case 'd': // int
3550	  number = va_arg (args_copy, int);
3551	  break;
3552	case 'f': // float
3553	  fnumber = va_arg (args_copy, double);
3554	  break;
3555	default:
3556	  break;
3557	}
3558    }
3559  va_end (args_copy);
3560  va_end (args);
3561}
3562
3563int
3564main ()
3565{
3566
3567  // Check bool.
3568  _Bool success = false;
3569
3570  // Check restrict.
3571  if (test_restrict ("String literal") == 0)
3572    success = true;
3573  char *restrict newvar = "Another string";
3574
3575  // Check varargs.
3576  test_varargs ("s, d' f .", "string", 65, 34.234);
3577  test_varargs_macros ();
3578
3579  // Check flexible array members.
3580  struct incomplete_array *ia =
3581    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3582  ia->datasize = 10;
3583  for (int i = 0; i < ia->datasize; ++i)
3584    ia->data[i] = i * 1.234;
3585
3586  // Check named initializers.
3587  struct named_init ni = {
3588    .number = 34,
3589    .name = L"Test wide string",
3590    .average = 543.34343,
3591  };
3592
3593  ni.number = 58;
3594
3595  int dynamic_array[ni.number];
3596  dynamic_array[ni.number - 1] = 543;
3597
3598  // work around unused variable warnings
3599  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3600	  || dynamic_array[ni.number - 1] != 543);
3601
3602  ;
3603  return 0;
3604}
3605_ACEOF
3606for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3607do
3608  CC="$ac_save_CC $ac_arg"
3609  if ac_fn_c_try_compile "$LINENO"; then :
3610  ac_cv_prog_cc_c99=$ac_arg
3611fi
3612rm -f core conftest.err conftest.$ac_objext
3613  test "x$ac_cv_prog_cc_c99" != "xno" && break
3614done
3615rm -f conftest.$ac_ext
3616CC=$ac_save_CC
3617
3618fi
3619# AC_CACHE_VAL
3620case "x$ac_cv_prog_cc_c99" in
3621  x)
3622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3623$as_echo "none needed" >&6; } ;;
3624  xno)
3625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3626$as_echo "unsupported" >&6; } ;;
3627  *)
3628    CC="$CC $ac_cv_prog_cc_c99"
3629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3630$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3631esac
3632if test "x$ac_cv_prog_cc_c99" != xno; then :
3633
3634fi
3635
3636		ac_ext=c
3637ac_cpp='$CPP $CPPFLAGS'
3638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3640ac_compiler_gnu=$ac_cv_c_compiler_gnu
3641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3642$as_echo_n "checking how to run the C preprocessor... " >&6; }
3643# On Suns, sometimes $CPP names a directory.
3644if test -n "$CPP" && test -d "$CPP"; then
3645  CPP=
3646fi
3647if test -z "$CPP"; then
3648  if ${ac_cv_prog_CPP+:} false; then :
3649  $as_echo_n "(cached) " >&6
3650else
3651      # Double quotes because CPP needs to be expanded
3652    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3653    do
3654      ac_preproc_ok=false
3655for ac_c_preproc_warn_flag in '' yes
3656do
3657  # Use a header file that comes with gcc, so configuring glibc
3658  # with a fresh cross-compiler works.
3659  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3660  # <limits.h> exists even on freestanding compilers.
3661  # On the NeXT, cc -E runs the code through the compiler's parser,
3662  # not just through cpp. "Syntax error" is here to catch this case.
3663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3664/* end confdefs.h.  */
3665#ifdef __STDC__
3666# include <limits.h>
3667#else
3668# include <assert.h>
3669#endif
3670		     Syntax error
3671_ACEOF
3672if ac_fn_c_try_cpp "$LINENO"; then :
3673
3674else
3675  # Broken: fails on valid input.
3676continue
3677fi
3678rm -f conftest.err conftest.i conftest.$ac_ext
3679
3680  # OK, works on sane cases.  Now check whether nonexistent headers
3681  # can be detected and how.
3682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3683/* end confdefs.h.  */
3684#include <ac_nonexistent.h>
3685_ACEOF
3686if ac_fn_c_try_cpp "$LINENO"; then :
3687  # Broken: success on invalid input.
3688continue
3689else
3690  # Passes both tests.
3691ac_preproc_ok=:
3692break
3693fi
3694rm -f conftest.err conftest.i conftest.$ac_ext
3695
3696done
3697# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3698rm -f conftest.i conftest.err conftest.$ac_ext
3699if $ac_preproc_ok; then :
3700  break
3701fi
3702
3703    done
3704    ac_cv_prog_CPP=$CPP
3705
3706fi
3707  CPP=$ac_cv_prog_CPP
3708else
3709  ac_cv_prog_CPP=$CPP
3710fi
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3712$as_echo "$CPP" >&6; }
3713ac_preproc_ok=false
3714for ac_c_preproc_warn_flag in '' yes
3715do
3716  # Use a header file that comes with gcc, so configuring glibc
3717  # with a fresh cross-compiler works.
3718  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3719  # <limits.h> exists even on freestanding compilers.
3720  # On the NeXT, cc -E runs the code through the compiler's parser,
3721  # not just through cpp. "Syntax error" is here to catch this case.
3722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3723/* end confdefs.h.  */
3724#ifdef __STDC__
3725# include <limits.h>
3726#else
3727# include <assert.h>
3728#endif
3729		     Syntax error
3730_ACEOF
3731if ac_fn_c_try_cpp "$LINENO"; then :
3732
3733else
3734  # Broken: fails on valid input.
3735continue
3736fi
3737rm -f conftest.err conftest.i conftest.$ac_ext
3738
3739  # OK, works on sane cases.  Now check whether nonexistent headers
3740  # can be detected and how.
3741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3742/* end confdefs.h.  */
3743#include <ac_nonexistent.h>
3744_ACEOF
3745if ac_fn_c_try_cpp "$LINENO"; then :
3746  # Broken: success on invalid input.
3747continue
3748else
3749  # Passes both tests.
3750ac_preproc_ok=:
3751break
3752fi
3753rm -f conftest.err conftest.i conftest.$ac_ext
3754
3755done
3756# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3757rm -f conftest.i conftest.err conftest.$ac_ext
3758if $ac_preproc_ok; then :
3759
3760else
3761  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3763as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3764See \`config.log' for more details" "$LINENO" 5; }
3765fi
3766
3767ac_ext=c
3768ac_cpp='$CPP $CPPFLAGS'
3769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3771ac_compiler_gnu=$ac_cv_c_compiler_gnu
3772
3773
3774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3775$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3776if ${ac_cv_path_GREP+:} false; then :
3777  $as_echo_n "(cached) " >&6
3778else
3779  if test -z "$GREP"; then
3780  ac_path_GREP_found=false
3781  # Loop through the user's path and test for each of PROGNAME-LIST
3782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3783for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3784do
3785  IFS=$as_save_IFS
3786  test -z "$as_dir" && as_dir=.
3787    for ac_prog in grep ggrep; do
3788    for ac_exec_ext in '' $ac_executable_extensions; do
3789      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3790      as_fn_executable_p "$ac_path_GREP" || continue
3791# Check for GNU ac_path_GREP and select it if it is found.
3792  # Check for GNU $ac_path_GREP
3793case `"$ac_path_GREP" --version 2>&1` in
3794*GNU*)
3795  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3796*)
3797  ac_count=0
3798  $as_echo_n 0123456789 >"conftest.in"
3799  while :
3800  do
3801    cat "conftest.in" "conftest.in" >"conftest.tmp"
3802    mv "conftest.tmp" "conftest.in"
3803    cp "conftest.in" "conftest.nl"
3804    $as_echo 'GREP' >> "conftest.nl"
3805    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3806    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3807    as_fn_arith $ac_count + 1 && ac_count=$as_val
3808    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3809      # Best one so far, save it but keep looking for a better one
3810      ac_cv_path_GREP="$ac_path_GREP"
3811      ac_path_GREP_max=$ac_count
3812    fi
3813    # 10*(2^10) chars as input seems more than enough
3814    test $ac_count -gt 10 && break
3815  done
3816  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3817esac
3818
3819      $ac_path_GREP_found && break 3
3820    done
3821  done
3822  done
3823IFS=$as_save_IFS
3824  if test -z "$ac_cv_path_GREP"; then
3825    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3826  fi
3827else
3828  ac_cv_path_GREP=$GREP
3829fi
3830
3831fi
3832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3833$as_echo "$ac_cv_path_GREP" >&6; }
3834 GREP="$ac_cv_path_GREP"
3835
3836
3837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3838$as_echo_n "checking for egrep... " >&6; }
3839if ${ac_cv_path_EGREP+:} false; then :
3840  $as_echo_n "(cached) " >&6
3841else
3842  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3843   then ac_cv_path_EGREP="$GREP -E"
3844   else
3845     if test -z "$EGREP"; then
3846  ac_path_EGREP_found=false
3847  # Loop through the user's path and test for each of PROGNAME-LIST
3848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3849for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3850do
3851  IFS=$as_save_IFS
3852  test -z "$as_dir" && as_dir=.
3853    for ac_prog in egrep; do
3854    for ac_exec_ext in '' $ac_executable_extensions; do
3855      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3856      as_fn_executable_p "$ac_path_EGREP" || continue
3857# Check for GNU ac_path_EGREP and select it if it is found.
3858  # Check for GNU $ac_path_EGREP
3859case `"$ac_path_EGREP" --version 2>&1` in
3860*GNU*)
3861  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3862*)
3863  ac_count=0
3864  $as_echo_n 0123456789 >"conftest.in"
3865  while :
3866  do
3867    cat "conftest.in" "conftest.in" >"conftest.tmp"
3868    mv "conftest.tmp" "conftest.in"
3869    cp "conftest.in" "conftest.nl"
3870    $as_echo 'EGREP' >> "conftest.nl"
3871    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3872    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3873    as_fn_arith $ac_count + 1 && ac_count=$as_val
3874    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3875      # Best one so far, save it but keep looking for a better one
3876      ac_cv_path_EGREP="$ac_path_EGREP"
3877      ac_path_EGREP_max=$ac_count
3878    fi
3879    # 10*(2^10) chars as input seems more than enough
3880    test $ac_count -gt 10 && break
3881  done
3882  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3883esac
3884
3885      $ac_path_EGREP_found && break 3
3886    done
3887  done
3888  done
3889IFS=$as_save_IFS
3890  if test -z "$ac_cv_path_EGREP"; then
3891    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3892  fi
3893else
3894  ac_cv_path_EGREP=$EGREP
3895fi
3896
3897   fi
3898fi
3899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3900$as_echo "$ac_cv_path_EGREP" >&6; }
3901 EGREP="$ac_cv_path_EGREP"
3902
3903
3904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3905/* end confdefs.h.  */
3906
3907_ACEOF
3908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3909  $EGREP "" >/dev/null 2>&1; then :
3910
3911fi
3912rm -f conftest*
3913	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
3914$as_echo_n "checking for fgrep... " >&6; }
3915if ${ac_cv_path_FGREP+:} false; then :
3916  $as_echo_n "(cached) " >&6
3917else
3918  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3919   then ac_cv_path_FGREP="$GREP -F"
3920   else
3921     if test -z "$FGREP"; then
3922  ac_path_FGREP_found=false
3923  # Loop through the user's path and test for each of PROGNAME-LIST
3924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3925for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3926do
3927  IFS=$as_save_IFS
3928  test -z "$as_dir" && as_dir=.
3929    for ac_prog in fgrep; do
3930    for ac_exec_ext in '' $ac_executable_extensions; do
3931      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
3932      as_fn_executable_p "$ac_path_FGREP" || continue
3933# Check for GNU ac_path_FGREP and select it if it is found.
3934  # Check for GNU $ac_path_FGREP
3935case `"$ac_path_FGREP" --version 2>&1` in
3936*GNU*)
3937  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
3938*)
3939  ac_count=0
3940  $as_echo_n 0123456789 >"conftest.in"
3941  while :
3942  do
3943    cat "conftest.in" "conftest.in" >"conftest.tmp"
3944    mv "conftest.tmp" "conftest.in"
3945    cp "conftest.in" "conftest.nl"
3946    $as_echo 'FGREP' >> "conftest.nl"
3947    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
3948    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3949    as_fn_arith $ac_count + 1 && ac_count=$as_val
3950    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
3951      # Best one so far, save it but keep looking for a better one
3952      ac_cv_path_FGREP="$ac_path_FGREP"
3953      ac_path_FGREP_max=$ac_count
3954    fi
3955    # 10*(2^10) chars as input seems more than enough
3956    test $ac_count -gt 10 && break
3957  done
3958  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3959esac
3960
3961      $ac_path_FGREP_found && break 3
3962    done
3963  done
3964  done
3965IFS=$as_save_IFS
3966  if test -z "$ac_cv_path_FGREP"; then
3967    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3968  fi
3969else
3970  ac_cv_path_FGREP=$FGREP
3971fi
3972
3973   fi
3974fi
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
3976$as_echo "$ac_cv_path_FGREP" >&6; }
3977 FGREP="$ac_cv_path_FGREP"
3978
3979		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
3980$as_echo_n "checking for library containing strerror... " >&6; }
3981if ${ac_cv_search_strerror+:} false; then :
3982  $as_echo_n "(cached) " >&6
3983else
3984  ac_func_search_save_LIBS=$LIBS
3985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3986/* end confdefs.h.  */
3987
3988/* Override any GCC internal prototype to avoid an error.
3989   Use char because int might match the return type of a GCC
3990   builtin and then its argument prototype would still apply.  */
3991#ifdef __cplusplus
3992extern "C"
3993#endif
3994char strerror ();
3995int
3996main ()
3997{
3998return strerror ();
3999  ;
4000  return 0;
4001}
4002_ACEOF
4003for ac_lib in '' cposix; do
4004  if test -z "$ac_lib"; then
4005    ac_res="none required"
4006  else
4007    ac_res=-l$ac_lib
4008    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4009  fi
4010  if ac_fn_c_try_link "$LINENO"; then :
4011  ac_cv_search_strerror=$ac_res
4012fi
4013rm -f core conftest.err conftest.$ac_objext \
4014    conftest$ac_exeext
4015  if ${ac_cv_search_strerror+:} false; then :
4016  break
4017fi
4018done
4019if ${ac_cv_search_strerror+:} false; then :
4020
4021else
4022  ac_cv_search_strerror=no
4023fi
4024rm conftest.$ac_ext
4025LIBS=$ac_func_search_save_LIBS
4026fi
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
4028$as_echo "$ac_cv_search_strerror" >&6; }
4029ac_res=$ac_cv_search_strerror
4030if test "$ac_res" != no; then :
4031  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4032
4033fi
4034		for ac_prog in gawk mawk nawk awk
4035do
4036  # Extract the first word of "$ac_prog", so it can be a program name with args.
4037set dummy $ac_prog; ac_word=$2
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4039$as_echo_n "checking for $ac_word... " >&6; }
4040if ${ac_cv_prog_AWK+:} false; then :
4041  $as_echo_n "(cached) " >&6
4042else
4043  if test -n "$AWK"; then
4044  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4045else
4046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4047for as_dir in $PATH
4048do
4049  IFS=$as_save_IFS
4050  test -z "$as_dir" && as_dir=.
4051    for ac_exec_ext in '' $ac_executable_extensions; do
4052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4053    ac_cv_prog_AWK="$ac_prog"
4054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4055    break 2
4056  fi
4057done
4058  done
4059IFS=$as_save_IFS
4060
4061fi
4062fi
4063AWK=$ac_cv_prog_AWK
4064if test -n "$AWK"; then
4065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4066$as_echo "$AWK" >&6; }
4067else
4068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4069$as_echo "no" >&6; }
4070fi
4071
4072
4073  test -n "$AWK" && break
4074done
4075
4076# Extract the first word of "strip", so it can be a program name with args.
4077set dummy strip; ac_word=$2
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4079$as_echo_n "checking for $ac_word... " >&6; }
4080if ${ac_cv_prog_STRIP+:} false; then :
4081  $as_echo_n "(cached) " >&6
4082else
4083  if test -n "$STRIP"; then
4084  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4085else
4086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4087for as_dir in $PATH
4088do
4089  IFS=$as_save_IFS
4090  test -z "$as_dir" && as_dir=.
4091    for ac_exec_ext in '' $ac_executable_extensions; do
4092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4093    ac_cv_prog_STRIP="strip"
4094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4095    break 2
4096  fi
4097done
4098  done
4099IFS=$as_save_IFS
4100
4101  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4102fi
4103fi
4104STRIP=$ac_cv_prog_STRIP
4105if test -n "$STRIP"; then
4106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4107$as_echo "$STRIP" >&6; }
4108else
4109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4110$as_echo "no" >&6; }
4111fi
4112
4113
4114
4115
4116
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4118$as_echo_n "checking for ANSI C header files... " >&6; }
4119if ${ac_cv_header_stdc+:} false; then :
4120  $as_echo_n "(cached) " >&6
4121else
4122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4123/* end confdefs.h.  */
4124#include <stdlib.h>
4125#include <stdarg.h>
4126#include <string.h>
4127#include <float.h>
4128
4129int
4130main ()
4131{
4132
4133  ;
4134  return 0;
4135}
4136_ACEOF
4137if ac_fn_c_try_compile "$LINENO"; then :
4138  ac_cv_header_stdc=yes
4139else
4140  ac_cv_header_stdc=no
4141fi
4142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4143
4144if test $ac_cv_header_stdc = yes; then
4145  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4147/* end confdefs.h.  */
4148#include <string.h>
4149
4150_ACEOF
4151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4152  $EGREP "memchr" >/dev/null 2>&1; then :
4153
4154else
4155  ac_cv_header_stdc=no
4156fi
4157rm -f conftest*
4158
4159fi
4160
4161if test $ac_cv_header_stdc = yes; then
4162  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4164/* end confdefs.h.  */
4165#include <stdlib.h>
4166
4167_ACEOF
4168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4169  $EGREP "free" >/dev/null 2>&1; then :
4170
4171else
4172  ac_cv_header_stdc=no
4173fi
4174rm -f conftest*
4175
4176fi
4177
4178if test $ac_cv_header_stdc = yes; then
4179  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4180  if test "$cross_compiling" = yes; then :
4181  :
4182else
4183  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184/* end confdefs.h.  */
4185#include <ctype.h>
4186#include <stdlib.h>
4187#if ((' ' & 0x0FF) == 0x020)
4188# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4189# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4190#else
4191# define ISLOWER(c) \
4192		   (('a' <= (c) && (c) <= 'i') \
4193		     || ('j' <= (c) && (c) <= 'r') \
4194		     || ('s' <= (c) && (c) <= 'z'))
4195# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4196#endif
4197
4198#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4199int
4200main ()
4201{
4202  int i;
4203  for (i = 0; i < 256; i++)
4204    if (XOR (islower (i), ISLOWER (i))
4205	|| toupper (i) != TOUPPER (i))
4206      return 2;
4207  return 0;
4208}
4209_ACEOF
4210if ac_fn_c_try_run "$LINENO"; then :
4211
4212else
4213  ac_cv_header_stdc=no
4214fi
4215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4216  conftest.$ac_objext conftest.beam conftest.$ac_ext
4217fi
4218
4219fi
4220fi
4221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4222$as_echo "$ac_cv_header_stdc" >&6; }
4223if test $ac_cv_header_stdc = yes; then
4224
4225$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4226
4227fi
4228
4229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4230$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4231if ${ac_cv_header_sys_wait_h+:} false; then :
4232  $as_echo_n "(cached) " >&6
4233else
4234  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235/* end confdefs.h.  */
4236#include <sys/types.h>
4237#include <sys/wait.h>
4238#ifndef WEXITSTATUS
4239# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4240#endif
4241#ifndef WIFEXITED
4242# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4243#endif
4244
4245int
4246main ()
4247{
4248  int s;
4249  wait (&s);
4250  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4251  ;
4252  return 0;
4253}
4254_ACEOF
4255if ac_fn_c_try_compile "$LINENO"; then :
4256  ac_cv_header_sys_wait_h=yes
4257else
4258  ac_cv_header_sys_wait_h=no
4259fi
4260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4261fi
4262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4263$as_echo "$ac_cv_header_sys_wait_h" >&6; }
4264if test $ac_cv_header_sys_wait_h = yes; then
4265
4266$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
4267
4268fi
4269
4270
4271if test x"$ac_cv_prog_cc_c99" != xno; then
4272
4273
4274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4275$as_echo_n "checking for unsigned long long int... " >&6; }
4276if ${ac_cv_type_unsigned_long_long_int+:} false; then :
4277  $as_echo_n "(cached) " >&6
4278else
4279  ac_cv_type_unsigned_long_long_int=yes
4280     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
4281       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4282/* end confdefs.h.  */
4283
4284  /* For now, do not test the preprocessor; as of 2007 there are too many
4285	 implementations with broken preprocessors.  Perhaps this can
4286	 be revisited in 2012.  In the meantime, code should not expect
4287	 #if to work with literals wider than 32 bits.  */
4288      /* Test literals.  */
4289      long long int ll = 9223372036854775807ll;
4290      long long int nll = -9223372036854775807LL;
4291      unsigned long long int ull = 18446744073709551615ULL;
4292      /* Test constant expressions.   */
4293      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4294		     ? 1 : -1)];
4295      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4296		     ? 1 : -1)];
4297      int i = 63;
4298int
4299main ()
4300{
4301/* Test availability of runtime routines for shift and division.  */
4302      long long int llmax = 9223372036854775807ll;
4303      unsigned long long int ullmax = 18446744073709551615ull;
4304      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4305	      | (llmax / ll) | (llmax % ll)
4306	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4307	      | (ullmax / ull) | (ullmax % ull));
4308  ;
4309  return 0;
4310}
4311
4312_ACEOF
4313if ac_fn_c_try_link "$LINENO"; then :
4314
4315else
4316  ac_cv_type_unsigned_long_long_int=no
4317fi
4318rm -f core conftest.err conftest.$ac_objext \
4319    conftest$ac_exeext conftest.$ac_ext
4320     fi
4321fi
4322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4323$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
4324  if test $ac_cv_type_unsigned_long_long_int = yes; then
4325
4326$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
4327
4328  fi
4329
4330
4331
4332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4333$as_echo_n "checking for long long int... " >&6; }
4334if ${ac_cv_type_long_long_int+:} false; then :
4335  $as_echo_n "(cached) " >&6
4336else
4337  ac_cv_type_long_long_int=yes
4338      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
4339	ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4340	if test $ac_cv_type_long_long_int = yes; then
4341	  	  	  	  if test "$cross_compiling" = yes; then :
4342  :
4343else
4344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345/* end confdefs.h.  */
4346#include <limits.h>
4347		 #ifndef LLONG_MAX
4348		 # define HALF \
4349			  (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4350		 # define LLONG_MAX (HALF - 1 + HALF)
4351		 #endif
4352int
4353main ()
4354{
4355long long int n = 1;
4356		 int i;
4357		 for (i = 0; ; i++)
4358		   {
4359		     long long int m = n << i;
4360		     if (m >> i != n)
4361		       return 1;
4362		     if (LLONG_MAX / 2 < m)
4363		       break;
4364		   }
4365		 return 0;
4366  ;
4367  return 0;
4368}
4369_ACEOF
4370if ac_fn_c_try_run "$LINENO"; then :
4371
4372else
4373  ac_cv_type_long_long_int=no
4374fi
4375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4376  conftest.$ac_objext conftest.beam conftest.$ac_ext
4377fi
4378
4379	fi
4380      fi
4381fi
4382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4383$as_echo "$ac_cv_type_long_long_int" >&6; }
4384  if test $ac_cv_type_long_long_int = yes; then
4385
4386$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
4387
4388  fi
4389
4390  if test "$ac_cv_type_long_long_int" = no; then
4391    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4393as_fn_error $? "Compiler does not support long long int
4394See \`config.log' for more details" "$LINENO" 5; }
4395  fi
4396
4397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4398$as_echo_n "checking if the compiler supports trailing commas... " >&6; }
4399  trailing_commas=no
4400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401/* end confdefs.h.  */
4402
4403int
4404main ()
4405{
4406
4407    enum {
4408      one,
4409    };
4410  ;
4411  return 0;
4412}
4413_ACEOF
4414if ac_fn_c_try_compile "$LINENO"; then :
4415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4416$as_echo "yes" >&6; }; trailing_commas=yes
4417else
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4419$as_echo "no" >&6; }
4420fi
4421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4422  if test "$trailing_commas" = no; then
4423    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4424$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4425as_fn_error $? "Compiler does not support trailing comma in enum
4426See \`config.log' for more details" "$LINENO" 5; }
4427  fi
4428
4429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4430$as_echo_n "checking if the compiler supports C++ comments... " >&6; }
4431  slash_comments=no
4432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4433/* end confdefs.h.  */
4434
4435int
4436main ()
4437{
4438// C++ comments?
4439  ;
4440  return 0;
4441}
4442_ACEOF
4443if ac_fn_c_try_compile "$LINENO"; then :
4444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4445$as_echo "yes" >&6; }; slash_comments=yes
4446else
4447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4448$as_echo "no" >&6; }
4449fi
4450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4451  if test "$slash_comments" = no; then
4452    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4454as_fn_error $? "Compiler does not support C++ comments
4455See \`config.log' for more details" "$LINENO" 5; }
4456  fi
4457fi
4458
4459if test -n "$SOURCE_DATE_EPOCH"; then
4460  DATE_FMT="%b %d %Y %H:%M:%S"
4461  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")
4462  cat >>confdefs.h <<_ACEOF
4463#define BUILD_DATE "$BUILD_DATE"
4464_ACEOF
4465
4466  BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4467
4468fi
4469
4470
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4472$as_echo_n "checking --enable-fail-if-missing argument... " >&6; }
4473# Check whether --enable-fail_if_missing was given.
4474if test "${enable_fail_if_missing+set}" = set; then :
4475  enableval=$enable_fail_if_missing; fail_if_missing="yes"
4476else
4477  fail_if_missing="no"
4478fi
4479
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4481$as_echo "$fail_if_missing" >&6; }
4482
4483with_x_arg="$with_x"
4484
4485if test -z "$CFLAGS"; then
4486  CFLAGS="-O"
4487  test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
4488fi
4489if test "$GCC" = yes; then
4490    gccversion=`$CC -dumpversion`
4491  if test "x$gccversion" = "x"; then
4492        gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
4493  fi
4494    if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
4495    echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4496    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4497  else
4498    if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4499      echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4500      CFLAGS="$CFLAGS -fno-strength-reduce"
4501    fi
4502  fi
4503fi
4504
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4506$as_echo_n "checking for clang version... " >&6; }
4507CLANG_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'`
4508if test x"$CLANG_VERSION_STRING" != x"" ; then
4509  CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4510  CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4511  CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4512  CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
4513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4514$as_echo "$CLANG_VERSION" >&6; }
4515            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4516$as_echo_n "checking if clang supports -fno-strength-reduce... " >&6; }
4517  if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
4518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519$as_echo "no" >&6; }
4520    CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4521  else
4522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4523$as_echo "yes" >&6; }
4524  fi
4525else
4526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4527$as_echo "N/A" >&6; }
4528fi
4529
4530CROSS_COMPILING=
4531if test "$cross_compiling" = yes; then
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4533$as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
4534  CROSS_COMPILING=1
4535fi
4536
4537
4538test "$GCC" = yes && CPP_MM=M;
4539
4540if test -f ./toolcheck; then
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy tools..." >&5
4542$as_echo "$as_me: checking for buggy tools..." >&6;}
4543  sh ./toolcheck 1>&6
4544fi
4545
4546OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4547
4548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4549$as_echo_n "checking for Haiku... " >&6; }
4550case `uname` in
4551    Haiku) HAIKU=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4552$as_echo "yes" >&6; };;
4553    *)     HAIKU=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4554$as_echo "no" >&6; };;
4555esac
4556
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4558$as_echo_n "checking for QNX... " >&6; }
4559case `uname` in
4560    QNX)	OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4561		test -z "$with_x" && with_x=no
4562		QNX=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4563$as_echo "yes" >&6; };;
4564    *)		QNX=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565$as_echo "no" >&6; };;
4566esac
4567
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4569$as_echo_n "checking for Darwin (Mac OS X)... " >&6; }
4570if test "`(uname) 2>/dev/null`" = Darwin; then
4571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4572$as_echo "yes" >&6; }
4573  MACOS_X=yes
4574  CPPFLAGS="$CPPFLAGS -DMACOS_X"
4575
4576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4577$as_echo_n "checking --disable-darwin argument... " >&6; }
4578  # Check whether --enable-darwin was given.
4579if test "${enable_darwin+set}" = set; then :
4580  enableval=$enable_darwin;
4581else
4582  enable_darwin="yes"
4583fi
4584
4585  if test "$enable_darwin" = "yes"; then
4586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587$as_echo "no" >&6; }
4588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4589$as_echo_n "checking if Darwin files are there... " >&6; }
4590    if test -f os_macosx.m; then
4591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4592$as_echo "yes" >&6; }
4593    else
4594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4595$as_echo "no, Darwin support disabled" >&6; }
4596      enable_darwin=no
4597    fi
4598  else
4599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4600$as_echo "yes, Darwin support excluded" >&6; }
4601  fi
4602
4603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4604$as_echo_n "checking --with-mac-arch argument... " >&6; }
4605
4606# Check whether --with-mac-arch was given.
4607if test "${with_mac_arch+set}" = set; then :
4608  withval=$with_mac_arch; MACARCH="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4609$as_echo "$MACARCH" >&6; }
4610else
4611  MACARCH="current"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4612$as_echo "defaulting to $MACARCH" >&6; }
4613fi
4614
4615
4616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4617$as_echo_n "checking --with-developer-dir argument... " >&6; }
4618
4619# Check whether --with-developer-dir was given.
4620if test "${with_developer_dir+set}" = set; then :
4621  withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4622$as_echo "$DEVELOPER_DIR" >&6; }
4623else
4624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4625$as_echo "not present" >&6; }
4626fi
4627
4628
4629  if test "x$DEVELOPER_DIR" = "x"; then
4630    # Extract the first word of "xcode-select", so it can be a program name with args.
4631set dummy xcode-select; ac_word=$2
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4633$as_echo_n "checking for $ac_word... " >&6; }
4634if ${ac_cv_path_XCODE_SELECT+:} false; then :
4635  $as_echo_n "(cached) " >&6
4636else
4637  case $XCODE_SELECT in
4638  [\\/]* | ?:[\\/]*)
4639  ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4640  ;;
4641  *)
4642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643for as_dir in $PATH
4644do
4645  IFS=$as_save_IFS
4646  test -z "$as_dir" && as_dir=.
4647    for ac_exec_ext in '' $ac_executable_extensions; do
4648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649    ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
4650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4651    break 2
4652  fi
4653done
4654  done
4655IFS=$as_save_IFS
4656
4657  ;;
4658esac
4659fi
4660XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4661if test -n "$XCODE_SELECT"; then
4662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4663$as_echo "$XCODE_SELECT" >&6; }
4664else
4665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4666$as_echo "no" >&6; }
4667fi
4668
4669
4670    if test "x$XCODE_SELECT" != "x"; then
4671      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4672$as_echo_n "checking for developer dir using xcode-select... " >&6; }
4673      DEVELOPER_DIR=`$XCODE_SELECT -print-path`
4674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4675$as_echo "$DEVELOPER_DIR" >&6; }
4676    else
4677      DEVELOPER_DIR=/Developer
4678    fi
4679  fi
4680
4681  if test "x$MACARCH" = "xboth"; then
4682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4683$as_echo_n "checking for 10.4 universal SDK... " >&6; }
4684                            save_cppflags="$CPPFLAGS"
4685    save_cflags="$CFLAGS"
4686    save_ldflags="$LDFLAGS"
4687    CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
4688    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4689/* end confdefs.h.  */
4690
4691int
4692main ()
4693{
4694
4695  ;
4696  return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_link "$LINENO"; then :
4700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
4701$as_echo "found" >&6; }
4702else
4703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4704$as_echo "not found" >&6; }
4705	CFLAGS="$save_cflags"
4706	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4707$as_echo_n "checking if Intel architecture is supported... " >&6; }
4708	CPPFLAGS="$CPPFLAGS -arch i386"
4709	LDFLAGS="$save_ldflags -arch i386"
4710	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4711/* end confdefs.h.  */
4712
4713int
4714main ()
4715{
4716
4717  ;
4718  return 0;
4719}
4720_ACEOF
4721if ac_fn_c_try_link "$LINENO"; then :
4722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4723$as_echo "yes" >&6; }; MACARCH="intel"
4724else
4725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4726$as_echo "no" >&6; }
4727		MACARCH="ppc"
4728		CPPFLAGS="$save_cppflags -arch ppc"
4729		LDFLAGS="$save_ldflags -arch ppc"
4730fi
4731rm -f core conftest.err conftest.$ac_objext \
4732    conftest$ac_exeext conftest.$ac_ext
4733fi
4734rm -f core conftest.err conftest.$ac_objext \
4735    conftest$ac_exeext conftest.$ac_ext
4736  elif test "x$MACARCH" = "xintel"; then
4737    CPPFLAGS="$CPPFLAGS -arch intel"
4738    LDFLAGS="$LDFLAGS -arch intel"
4739  elif test "x$MACARCH" = "xppc"; then
4740    CPPFLAGS="$CPPFLAGS -arch ppc"
4741    LDFLAGS="$LDFLAGS -arch ppc"
4742  fi
4743
4744  if test "$enable_darwin" = "yes"; then
4745    MACOS_X_DARWIN=yes
4746    OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
4747    OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
4748            CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
4749
4750               if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
4751      with_x=no
4752     fi
4753  fi
4754
4755        if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
4756    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
4757  fi
4758
4759else
4760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
4762fi
4763
4764# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4765for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4766		  inttypes.h stdint.h unistd.h
4767do :
4768  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4769ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4770"
4771if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4772  cat >>confdefs.h <<_ACEOF
4773#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4774_ACEOF
4775
4776fi
4777
4778done
4779
4780
4781for ac_header in AvailabilityMacros.h
4782do :
4783  ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
4784if test "x$ac_cv_header_AvailabilityMacros_h" = xyes; then :
4785  cat >>confdefs.h <<_ACEOF
4786#define HAVE_AVAILABILITYMACROS_H 1
4787_ACEOF
4788
4789fi
4790
4791done
4792
4793
4794
4795
4796
4797if test "$cross_compiling" = no; then
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
4799$as_echo_n "checking --with-local-dir argument... " >&6; }
4800  have_local_include=''
4801  have_local_lib=''
4802
4803# Check whether --with-local-dir was given.
4804if test "${with_local_dir+set}" = set; then :
4805  withval=$with_local_dir;
4806    local_dir="$withval"
4807    case "$withval" in
4808    */*) ;;
4809    no)
4810      # avoid adding local dir to LDFLAGS and CPPFLAGS
4811      have_local_include=yes
4812      have_local_lib=yes
4813      ;;
4814    *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
4815    esac
4816	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
4817$as_echo "$local_dir" >&6; }
4818
4819else
4820
4821    local_dir=/usr/local
4822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
4823$as_echo "Defaulting to $local_dir" >&6; }
4824
4825fi
4826
4827  if test "$GCC" = yes -a "$local_dir" != no; then
4828    echo 'void f(){}' > conftest.c
4829        have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
4830    have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
4831    rm -f conftest.c conftest.o
4832  fi
4833  if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
4834    tt=`echo "$LDFLAGS" | sed -e "s+-L${local_dir}/lib ++g" -e "s+-L${local_dir}/lib$++g"`
4835    if test "$tt" = "$LDFLAGS"; then
4836      LDFLAGS="$LDFLAGS -L${local_dir}/lib"
4837    fi
4838  fi
4839  if test -z "$have_local_include" -a -d "${local_dir}/include"; then
4840    tt=`echo "$CPPFLAGS" | sed -e "s+-I${local_dir}/include ++g" -e "s+-I${local_dir}/include$++g"`
4841    if test "$tt" = "$CPPFLAGS"; then
4842      CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
4843    fi
4844  fi
4845fi
4846
4847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
4848$as_echo_n "checking --with-vim-name argument... " >&6; }
4849
4850# Check whether --with-vim-name was given.
4851if test "${with_vim_name+set}" = set; then :
4852  withval=$with_vim_name; VIMNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
4853$as_echo "$VIMNAME" >&6; }
4854else
4855  VIMNAME="vim"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
4856$as_echo "Defaulting to $VIMNAME" >&6; }
4857fi
4858
4859
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
4861$as_echo_n "checking --with-ex-name argument... " >&6; }
4862
4863# Check whether --with-ex-name was given.
4864if test "${with_ex_name+set}" = set; then :
4865  withval=$with_ex_name; EXNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
4866$as_echo "$EXNAME" >&6; }
4867else
4868  EXNAME="ex"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
4869$as_echo "Defaulting to ex" >&6; }
4870fi
4871
4872
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
4874$as_echo_n "checking --with-view-name argument... " >&6; }
4875
4876# Check whether --with-view-name was given.
4877if test "${with_view_name+set}" = set; then :
4878  withval=$with_view_name; VIEWNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
4879$as_echo "$VIEWNAME" >&6; }
4880else
4881  VIEWNAME="view"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
4882$as_echo "Defaulting to view" >&6; }
4883fi
4884
4885
4886
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
4888$as_echo_n "checking --with-global-runtime argument... " >&6; }
4889
4890# Check whether --with-global-runtime was given.
4891if test "${with_global_runtime+set}" = set; then :
4892  withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4893$as_echo "$withval" >&6; }
4894else
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899
4900if test "X$RUNTIME_GLOBAL" != "X"; then
4901  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" }')
4902  cat >>confdefs.h <<_ACEOF
4903#define RUNTIME_GLOBAL "$RUNTIME_GLOBAL"
4904_ACEOF
4905
4906  cat >>confdefs.h <<_ACEOF
4907#define RUNTIME_GLOBAL_AFTER "$RUNTIME_GLOBAL_AFTER"
4908_ACEOF
4909
4910fi
4911
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
4913$as_echo_n "checking --with-modified-by argument... " >&6; }
4914
4915# Check whether --with-modified-by was given.
4916if test "${with_modified_by+set}" = set; then :
4917  withval=$with_modified_by; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4918$as_echo "$withval" >&6; }; cat >>confdefs.h <<_ACEOF
4919#define MODIFIED_BY "$withval"
4920_ACEOF
4921
4922else
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924$as_echo "no" >&6; }
4925fi
4926
4927
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
4929$as_echo_n "checking if character set is EBCDIC... " >&6; }
4930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4931/* end confdefs.h.  */
4932
4933int
4934main ()
4935{
4936 /* TryCompile function for CharSet.
4937   Treat any failure as ASCII for compatibility with existing art.
4938   Use compile-time rather than run-time tests for cross-compiler
4939   tolerance.  */
4940#if '0'!=240
4941make an error "Character set is not EBCDIC"
4942#endif
4943  ;
4944  return 0;
4945}
4946_ACEOF
4947if ac_fn_c_try_compile "$LINENO"; then :
4948   # TryCompile action if true
4949cf_cv_ebcdic=yes
4950else
4951   # TryCompile action if false
4952cf_cv_ebcdic=no
4953fi
4954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4955# end of TryCompile ])
4956# end of CacheVal CvEbcdic
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
4958$as_echo "$cf_cv_ebcdic" >&6; }
4959case "$cf_cv_ebcdic" in  #(vi
4960    yes)	$as_echo "#define EBCDIC 1" >>confdefs.h
4961
4962		line_break='"\\n"'
4963		;;
4964    *)		line_break='"\\012"';;
4965esac
4966
4967
4968if test "$cf_cv_ebcdic" = "yes"; then
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
4970$as_echo_n "checking for z/OS Unix... " >&6; }
4971case `uname` in
4972    OS/390)	zOSUnix="yes";
4973										if test "$CC" = "cc"; then
4974		  ccm="$_CC_CCMODE"
4975		  ccn="CC"
4976		else
4977		  if test "$CC" = "c89"; then
4978		    ccm="$_CC_C89MODE"
4979		    ccn="C89"
4980		  else
4981		    ccm=1
4982		  fi
4983		fi
4984		if test "$ccm" != "1"; then
4985		  echo ""
4986		  echo "------------------------------------------"
4987		  echo " On z/OS Unix, the environment variable"
4988		  echo " _CC_${ccn}MODE must be set to \"1\"!"
4989		  echo " Do:"
4990		  echo "    export _CC_${ccn}MODE=1"
4991		  echo " and then call configure again."
4992		  echo "------------------------------------------"
4993		  exit 1
4994		fi
4995		# Set CFLAGS for configure process.
4996		# This will be reset later for config.mk.
4997		# Use haltonmsg to force error for missing H files.
4998		CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
4999		LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
5000		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5001$as_echo "yes" >&6; }
5002		;;
5003    *)		zOSUnix="no";
5004		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006		;;
5007esac
5008fi
5009
5010if test "$zOSUnix" = "yes"; then
5011    QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/  */ /g'"
5012else
5013    QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/  */ /g'"
5014fi
5015
5016
5017
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5019$as_echo_n "checking --disable-smack argument... " >&6; }
5020# Check whether --enable-smack was given.
5021if test "${enable_smack+set}" = set; then :
5022  enableval=$enable_smack;
5023else
5024  enable_smack="yes"
5025fi
5026
5027if test "$enable_smack" = "yes"; then
5028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030  ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5031if test "x$ac_cv_header_linux_xattr_h" = xyes; then :
5032  true
5033else
5034  enable_smack="no"
5035fi
5036
5037
5038else
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5040$as_echo "yes" >&6; }
5041fi
5042if test "$enable_smack" = "yes"; then
5043  ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
5044if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
5045  true
5046else
5047  enable_smack="no"
5048fi
5049
5050
5051fi
5052if test "$enable_smack" = "yes"; then
5053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5054$as_echo_n "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056/* end confdefs.h.  */
5057#include <linux/xattr.h>
5058_ACEOF
5059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5060  $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1; then :
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5062$as_echo "yes" >&6; }
5063else
5064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065$as_echo "no" >&6; }; enable_smack="no"
5066fi
5067rm -f conftest*
5068
5069fi
5070if test "$enable_smack" = "yes"; then
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5072$as_echo_n "checking for setxattr in -lattr... " >&6; }
5073if ${ac_cv_lib_attr_setxattr+:} false; then :
5074  $as_echo_n "(cached) " >&6
5075else
5076  ac_check_lib_save_LIBS=$LIBS
5077LIBS="-lattr  $LIBS"
5078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5079/* end confdefs.h.  */
5080
5081/* Override any GCC internal prototype to avoid an error.
5082   Use char because int might match the return type of a GCC
5083   builtin and then its argument prototype would still apply.  */
5084#ifdef __cplusplus
5085extern "C"
5086#endif
5087char setxattr ();
5088int
5089main ()
5090{
5091return setxattr ();
5092  ;
5093  return 0;
5094}
5095_ACEOF
5096if ac_fn_c_try_link "$LINENO"; then :
5097  ac_cv_lib_attr_setxattr=yes
5098else
5099  ac_cv_lib_attr_setxattr=no
5100fi
5101rm -f core conftest.err conftest.$ac_objext \
5102    conftest$ac_exeext conftest.$ac_ext
5103LIBS=$ac_check_lib_save_LIBS
5104fi
5105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5106$as_echo "$ac_cv_lib_attr_setxattr" >&6; }
5107if test "x$ac_cv_lib_attr_setxattr" = xyes; then :
5108  LIBS="$LIBS -lattr"
5109	   found_smack="yes"
5110	   $as_echo "#define HAVE_SMACK 1" >>confdefs.h
5111
5112fi
5113
5114fi
5115
5116if test "x$found_smack" = "x"; then
5117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5118$as_echo_n "checking --disable-selinux argument... " >&6; }
5119  # Check whether --enable-selinux was given.
5120if test "${enable_selinux+set}" = set; then :
5121  enableval=$enable_selinux;
5122else
5123  enable_selinux="yes"
5124fi
5125
5126  if test "$enable_selinux" = "yes"; then
5127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5128$as_echo "no" >&6; }
5129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5130$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
5131if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  ac_check_lib_save_LIBS=$LIBS
5135LIBS="-lselinux  $LIBS"
5136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5137/* end confdefs.h.  */
5138
5139/* Override any GCC internal prototype to avoid an error.
5140   Use char because int might match the return type of a GCC
5141   builtin and then its argument prototype would still apply.  */
5142#ifdef __cplusplus
5143extern "C"
5144#endif
5145char is_selinux_enabled ();
5146int
5147main ()
5148{
5149return is_selinux_enabled ();
5150  ;
5151  return 0;
5152}
5153_ACEOF
5154if ac_fn_c_try_link "$LINENO"; then :
5155  ac_cv_lib_selinux_is_selinux_enabled=yes
5156else
5157  ac_cv_lib_selinux_is_selinux_enabled=no
5158fi
5159rm -f core conftest.err conftest.$ac_objext \
5160    conftest$ac_exeext conftest.$ac_ext
5161LIBS=$ac_check_lib_save_LIBS
5162fi
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5164$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5165if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then :
5166  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5167if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
5168  LIBS="$LIBS -lselinux"
5169	    $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
5170
5171fi
5172
5173
5174fi
5175
5176  else
5177     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5178$as_echo "yes" >&6; }
5179  fi
5180fi
5181
5182
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5184$as_echo_n "checking --with-features argument... " >&6; }
5185
5186# Check whether --with-features was given.
5187if test "${with_features+set}" = set; then :
5188  withval=$with_features; features="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5189$as_echo "$features" >&6; }
5190else
5191  features="huge"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5192$as_echo "Defaulting to huge" >&6; }
5193fi
5194
5195
5196dovimdiff=""
5197dogvimdiff=""
5198case "$features" in
5199  tiny)		$as_echo "#define FEAT_TINY 1" >>confdefs.h
5200 ;;
5201  small)	$as_echo "#define FEAT_SMALL 1" >>confdefs.h
5202 ;;
5203  normal)	$as_echo "#define FEAT_NORMAL 1" >>confdefs.h
5204 dovimdiff="installvimdiff";
5205			dogvimdiff="installgvimdiff" ;;
5206  big)		$as_echo "#define FEAT_BIG 1" >>confdefs.h
5207 dovimdiff="installvimdiff";
5208			dogvimdiff="installgvimdiff" ;;
5209  huge)		$as_echo "#define FEAT_HUGE 1" >>confdefs.h
5210 dovimdiff="installvimdiff";
5211			dogvimdiff="installgvimdiff" ;;
5212  *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5213$as_echo "Sorry, $features is not supported" >&6; } ;;
5214esac
5215
5216
5217
5218
5219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5220$as_echo_n "checking --with-compiledby argument... " >&6; }
5221
5222# Check whether --with-compiledby was given.
5223if test "${with_compiledby+set}" = set; then :
5224  withval=$with_compiledby; compiledby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5225$as_echo "$withval" >&6; }
5226else
5227  compiledby=""; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232
5233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5234$as_echo_n "checking --disable-xsmp argument... " >&6; }
5235# Check whether --enable-xsmp was given.
5236if test "${enable_xsmp+set}" = set; then :
5237  enableval=$enable_xsmp;
5238else
5239  enable_xsmp="yes"
5240fi
5241
5242
5243if test "$enable_xsmp" = "yes"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245$as_echo "no" >&6; }
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5247$as_echo_n "checking --disable-xsmp-interact argument... " >&6; }
5248  # Check whether --enable-xsmp-interact was given.
5249if test "${enable_xsmp_interact+set}" = set; then :
5250  enableval=$enable_xsmp_interact;
5251else
5252  enable_xsmp_interact="yes"
5253fi
5254
5255  if test "$enable_xsmp_interact" = "yes"; then
5256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5257$as_echo "no" >&6; }
5258    $as_echo "#define USE_XSMP_INTERACT 1" >>confdefs.h
5259
5260  else
5261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5262$as_echo "yes" >&6; }
5263  fi
5264else
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5266$as_echo "yes" >&6; }
5267fi
5268
5269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5270$as_echo_n "checking --enable-luainterp argument... " >&6; }
5271# Check whether --enable-luainterp was given.
5272if test "${enable_luainterp+set}" = set; then :
5273  enableval=$enable_luainterp;
5274else
5275  enable_luainterp="no"
5276fi
5277
5278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5279$as_echo "$enable_luainterp" >&6; }
5280
5281if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
5282  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
5283    as_fn_error $? "cannot use Lua with tiny or small features" "$LINENO" 5
5284  fi
5285
5286
5287
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5289$as_echo_n "checking --with-lua-prefix argument... " >&6; }
5290
5291# Check whether --with-lua_prefix was given.
5292if test "${with_lua_prefix+set}" = set; then :
5293  withval=$with_lua_prefix; with_lua_prefix="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5294$as_echo "$with_lua_prefix" >&6; }
5295else
5296  with_lua_prefix="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5297$as_echo "no" >&6; }
5298fi
5299
5300
5301  if test "X$with_lua_prefix" != "X"; then
5302       vi_cv_path_lua_pfx="$with_lua_prefix"
5303  else
5304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5305$as_echo_n "checking LUA_PREFIX environment var... " >&6; }
5306    if test "X$LUA_PREFIX" != "X"; then
5307	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5308$as_echo "\"$LUA_PREFIX\"" >&6; }
5309	vi_cv_path_lua_pfx="$LUA_PREFIX"
5310    else
5311	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5312$as_echo "not set, default to /usr" >&6; }
5313	vi_cv_path_lua_pfx="/usr"
5314    fi
5315  fi
5316
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5318$as_echo_n "checking --with-luajit... " >&6; }
5319
5320# Check whether --with-luajit was given.
5321if test "${with_luajit+set}" = set; then :
5322  withval=$with_luajit; vi_cv_with_luajit="$withval"
5323else
5324  vi_cv_with_luajit="no"
5325fi
5326
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5328$as_echo "$vi_cv_with_luajit" >&6; }
5329
5330  LUA_INC=
5331  if test "X$vi_cv_path_lua_pfx" != "X"; then
5332    if test "x$vi_cv_with_luajit" != "xno"; then
5333            # Extract the first word of "luajit", so it can be a program name with args.
5334set dummy luajit; ac_word=$2
5335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5336$as_echo_n "checking for $ac_word... " >&6; }
5337if ${ac_cv_path_vi_cv_path_luajit+:} false; then :
5338  $as_echo_n "(cached) " >&6
5339else
5340  case $vi_cv_path_luajit in
5341  [\\/]* | ?:[\\/]*)
5342  ac_cv_path_vi_cv_path_luajit="$vi_cv_path_luajit" # Let the user override the test with a path.
5343  ;;
5344  *)
5345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5346for as_dir in $PATH
5347do
5348  IFS=$as_save_IFS
5349  test -z "$as_dir" && as_dir=.
5350    for ac_exec_ext in '' $ac_executable_extensions; do
5351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5352    ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext"
5353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5354    break 2
5355  fi
5356done
5357  done
5358IFS=$as_save_IFS
5359
5360  ;;
5361esac
5362fi
5363vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5364if test -n "$vi_cv_path_luajit"; then
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5366$as_echo "$vi_cv_path_luajit" >&6; }
5367else
5368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5369$as_echo "no" >&6; }
5370fi
5371
5372
5373      if test "X$vi_cv_path_luajit" != "X"; then
5374		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5375$as_echo_n "checking LuaJIT version... " >&6; }
5376if ${vi_cv_version_luajit+:} false; then :
5377  $as_echo_n "(cached) " >&6
5378else
5379   vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'`
5380fi
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5382$as_echo "$vi_cv_version_luajit" >&6; }
5383	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5384$as_echo_n "checking Lua version of LuaJIT... " >&6; }
5385if ${vi_cv_version_lua_luajit+:} false; then :
5386  $as_echo_n "(cached) " >&6
5387else
5388   vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5389fi
5390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5391$as_echo "$vi_cv_version_lua_luajit" >&6; }
5392	vi_cv_path_lua="$vi_cv_path_luajit"
5393	vi_cv_version_lua="$vi_cv_version_lua_luajit"
5394      fi
5395    else
5396            # Extract the first word of "lua", so it can be a program name with args.
5397set dummy lua; ac_word=$2
5398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399$as_echo_n "checking for $ac_word... " >&6; }
5400if ${ac_cv_path_vi_cv_path_plain_lua+:} false; then :
5401  $as_echo_n "(cached) " >&6
5402else
5403  case $vi_cv_path_plain_lua in
5404  [\\/]* | ?:[\\/]*)
5405  ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5406  ;;
5407  *)
5408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5409for as_dir in $PATH
5410do
5411  IFS=$as_save_IFS
5412  test -z "$as_dir" && as_dir=.
5413    for ac_exec_ext in '' $ac_executable_extensions; do
5414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5415    ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext"
5416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5417    break 2
5418  fi
5419done
5420  done
5421IFS=$as_save_IFS
5422
5423  ;;
5424esac
5425fi
5426vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5427if test -n "$vi_cv_path_plain_lua"; then
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5429$as_echo "$vi_cv_path_plain_lua" >&6; }
5430else
5431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432$as_echo "no" >&6; }
5433fi
5434
5435
5436      if test "X$vi_cv_path_plain_lua" != "X"; then
5437		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5438$as_echo_n "checking Lua version... " >&6; }
5439if ${vi_cv_version_plain_lua+:} false; then :
5440  $as_echo_n "(cached) " >&6
5441else
5442   vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5443fi
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5445$as_echo "$vi_cv_version_plain_lua" >&6; }
5446      fi
5447      vi_cv_path_lua="$vi_cv_path_plain_lua"
5448      vi_cv_version_lua="$vi_cv_version_plain_lua"
5449    fi
5450    if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
5451      { $as_echo "$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
5452$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit... " >&6; }
5453      if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
5454	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5455$as_echo "yes" >&6; }
5456	LUA_INC=/luajit-$vi_cv_version_luajit
5457      fi
5458    fi
5459    if test "X$LUA_INC" = "X"; then
5460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5461$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
5462      if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
5463	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5464$as_echo "yes" >&6; }
5465      else
5466	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
5468	{ $as_echo "$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
5469$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
5470	if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
5471	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5472$as_echo "yes" >&6; }
5473	  LUA_INC=/lua$vi_cv_version_lua
5474	else
5475	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
5477
5478	  # Detect moonjit:
5479	  # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5480	  lua_suf=/moonjit-2.3
5481	  inc_path="$vi_cv_path_lua_pfx/include"
5482	  for dir in "$inc_path"/moonjit-[0-9]* ; do
5483	    if test -d "$dir" ; then
5484	      lua_suf=`basename "$dir"`
5485	      lua_suf="/$lua_suf"
5486	      break
5487	    fi
5488	  done
5489	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5490$as_echo_n "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
5491	  if test -f "$inc_path$lua_suf/lua.h"; then
5492	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5493$as_echo "yes" >&6; }
5494	    LUA_INC=$lua_suf
5495	  else
5496	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497$as_echo "no" >&6; }
5498	    vi_cv_path_lua_pfx=
5499	  fi
5500	fi
5501      fi
5502    fi
5503  fi
5504
5505  if test "X$vi_cv_path_lua_pfx" != "X"; then
5506    if test "x$vi_cv_with_luajit" != "xno"; then
5507      multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5508      if test "X$multiarch" != "X"; then
5509	lib_multiarch="lib/${multiarch}"
5510      else
5511	lib_multiarch="lib"
5512      fi
5513      if test "X$vi_cv_version_lua" = "X"; then
5514	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5515      else
5516	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5517      fi
5518    else
5519      if test "X$LUA_INC" != "X"; then
5520		LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
5521      else
5522	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
5523      fi
5524    fi
5525    if test "$enable_luainterp" = "dynamic"; then
5526      lua_ok="yes"
5527    else
5528      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5529$as_echo_n "checking if link with ${LUA_LIBS} is sane... " >&6; }
5530      libs_save=$LIBS
5531      LIBS="$LIBS $LUA_LIBS"
5532      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5533/* end confdefs.h.  */
5534
5535int
5536main ()
5537{
5538
5539  ;
5540  return 0;
5541}
5542_ACEOF
5543if ac_fn_c_try_link "$LINENO"; then :
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5545$as_echo "yes" >&6; }; lua_ok="yes"
5546else
5547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5548$as_echo "no" >&6; }; lua_ok="no"; LUA_LIBS=""
5549fi
5550rm -f core conftest.err conftest.$ac_objext \
5551    conftest$ac_exeext conftest.$ac_ext
5552      LIBS=$libs_save
5553    fi
5554    if test "x$lua_ok" = "xyes"; then
5555      LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5556      LUA_SRC="if_lua.c"
5557      LUA_OBJ="objects/if_lua.o"
5558      LUA_PRO="if_lua.pro"
5559      $as_echo "#define FEAT_LUA 1" >>confdefs.h
5560
5561    fi
5562    if test "$enable_luainterp" = "dynamic"; then
5563      if test "x$vi_cv_with_luajit" != "xno"; then
5564	luajit="jit"
5565      fi
5566      if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5567	vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5568      else
5569	if test "x$MACOS_X" = "xyes"; then
5570	  ext="dylib"
5571	  indexes=""
5572	else
5573	  ext="so"
5574	  indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5575	  multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5576	  if test "X$multiarch" != "X"; then
5577	    lib_multiarch="lib/${multiarch}"
5578	  fi
5579	fi
5580			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5581$as_echo_n "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
5582	for subdir in "${lib_multiarch}" lib64 lib; do
5583	  if test -z "$subdir"; then
5584	    continue
5585	  fi
5586	  for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5587	    ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5588	    for i in $indexes ""; do
5589	      if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
5590		sover2="$i"
5591		break 3
5592	      fi
5593	    done
5594	  done
5595	  sover=""
5596	done
5597	if test "X$sover" = "X"; then
5598	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5599$as_echo "no" >&6; }
5600	  lua_ok="no"
5601	  vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5602	else
5603	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5604$as_echo "yes" >&6; }
5605	  lua_ok="yes"
5606	  vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5607	fi
5608      fi
5609      $as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
5610
5611      LUA_LIBS=""
5612      LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
5613    fi
5614    if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
5615       test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
5616       test "`(uname -m) 2>/dev/null`" = "x86_64"; then
5617            LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5618    fi
5619  fi
5620  if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
5621    as_fn_error $? "could not configure lua" "$LINENO" 5
5622  fi
5623
5624
5625
5626
5627
5628fi
5629
5630
5631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5632$as_echo_n "checking --enable-mzschemeinterp argument... " >&6; }
5633# Check whether --enable-mzschemeinterp was given.
5634if test "${enable_mzschemeinterp+set}" = set; then :
5635  enableval=$enable_mzschemeinterp;
5636else
5637  enable_mzschemeinterp="no"
5638fi
5639
5640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5641$as_echo "$enable_mzschemeinterp" >&6; }
5642
5643if test "$enable_mzschemeinterp" = "yes"; then
5644
5645
5646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5647$as_echo_n "checking --with-plthome argument... " >&6; }
5648
5649# Check whether --with-plthome was given.
5650if test "${with_plthome+set}" = set; then :
5651  withval=$with_plthome; with_plthome="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5652$as_echo "$with_plthome" >&6; }
5653else
5654  with_plthome="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5655$as_echo "\"no\"" >&6; }
5656fi
5657
5658
5659  if test "X$with_plthome" != "X"; then
5660       vi_cv_path_mzscheme_pfx="$with_plthome"
5661       vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5662  else
5663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5664$as_echo_n "checking PLTHOME environment var... " >&6; }
5665    if test "X$PLTHOME" != "X"; then
5666	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5667$as_echo "\"$PLTHOME\"" >&6; }
5668	vi_cv_path_mzscheme_pfx="$PLTHOME"
5669	vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5670    else
5671	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5672$as_echo "not set" >&6; }
5673		# Extract the first word of "mzscheme", so it can be a program name with args.
5674set dummy mzscheme; ac_word=$2
5675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5676$as_echo_n "checking for $ac_word... " >&6; }
5677if ${ac_cv_path_vi_cv_path_mzscheme+:} false; then :
5678  $as_echo_n "(cached) " >&6
5679else
5680  case $vi_cv_path_mzscheme in
5681  [\\/]* | ?:[\\/]*)
5682  ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
5683  ;;
5684  *)
5685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5686for as_dir in $PATH
5687do
5688  IFS=$as_save_IFS
5689  test -z "$as_dir" && as_dir=.
5690    for ac_exec_ext in '' $ac_executable_extensions; do
5691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5692    ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext"
5693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5694    break 2
5695  fi
5696done
5697  done
5698IFS=$as_save_IFS
5699
5700  ;;
5701esac
5702fi
5703vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
5704if test -n "$vi_cv_path_mzscheme"; then
5705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
5706$as_echo "$vi_cv_path_mzscheme" >&6; }
5707else
5708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709$as_echo "no" >&6; }
5710fi
5711
5712
5713
5714			if test "X$vi_cv_path_mzscheme" != "X"; then
5715	  lsout=`ls -l $vi_cv_path_mzscheme`
5716	  if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
5717	    vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
5718	  fi
5719	fi
5720
5721	if test "X$vi_cv_path_mzscheme" != "X"; then
5722	    	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
5723$as_echo_n "checking MzScheme install prefix... " >&6; }
5724if ${vi_cv_path_mzscheme_pfx+:} false; then :
5725  $as_echo_n "(cached) " >&6
5726else
5727  	    	    echo "(display (simplify-path		\
5728	       (build-path (call-with-values	\
5729		(lambda () (split-path (find-system-path (quote exec-file)))) \
5730		(lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
5731	    	     vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
5732		sed -e 's+/$++'`
5733fi
5734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
5735$as_echo "$vi_cv_path_mzscheme_pfx" >&6; }
5736	    rm -f mzdirs.scm
5737	fi
5738    fi
5739  fi
5740
5741  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5742    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
5743$as_echo_n "checking for racket include directory... " >&6; }
5744    SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
5745    if test "X$SCHEME_INC" != "X"; then
5746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
5747$as_echo "${SCHEME_INC}" >&6; }
5748    else
5749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5750$as_echo "not found" >&6; }
5751      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
5752$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
5753      if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
5754	SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
5755	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5756$as_echo "yes" >&6; }
5757      else
5758	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759$as_echo "no" >&6; }
5760	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
5761$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
5762	if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
5763	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5764$as_echo "yes" >&6; }
5765	  SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
5766	else
5767	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768$as_echo "no" >&6; }
5769	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
5770$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
5771	  if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
5772	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5773$as_echo "yes" >&6; }
5774	    SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
5775	  else
5776	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
5778	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
5779$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
5780	    if test -f /usr/include/plt/scheme.h; then
5781	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5782$as_echo "yes" >&6; }
5783	      SCHEME_INC=/usr/include/plt
5784	    else
5785	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786$as_echo "no" >&6; }
5787	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
5788$as_echo_n "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
5789	      if test -f /usr/include/racket/scheme.h; then
5790		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5791$as_echo "yes" >&6; }
5792		SCHEME_INC=/usr/include/racket
5793	      else
5794		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796		vi_cv_path_mzscheme_pfx=
5797	      fi
5798	    fi
5799	  fi
5800	fi
5801      fi
5802    fi
5803  fi
5804
5805  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5806
5807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
5808$as_echo_n "checking for racket lib directory... " >&6; }
5809    SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
5810    if test "X$SCHEME_LIB" != "X"; then
5811      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
5812$as_echo "${SCHEME_LIB}" >&6; }
5813    else
5814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5815$as_echo "not found" >&6; }
5816    fi
5817
5818    for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
5819      if test "X$path" != "X"; then
5820	if test "x$MACOS_X" = "xyes"; then
5821	  MZSCHEME_LIBS="-framework Racket"
5822	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5823	elif test -f "${path}/libmzscheme3m.a"; then
5824	  MZSCHEME_LIBS="${path}/libmzscheme3m.a"
5825	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5826	elif test -f "${path}/libracket3m.a"; then
5827	  MZSCHEME_LIBS="${path}/libracket3m.a"
5828	  if test -f "${path}/librktio.a"; then
5829	    MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
5830	  fi
5831	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5832	elif test -f "${path}/libracket.a"; then
5833	  MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
5834	elif test -f "${path}/libmzscheme.a"; then
5835	  MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
5836	else
5837	  	  if test -f "${path}/libmzscheme3m.so"; then
5838	    MZSCHEME_LIBS="-L${path} -lmzscheme3m"
5839	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5840	  elif test -f "${path}/libracket3m.so"; then
5841	    MZSCHEME_LIBS="-L${path} -lracket3m"
5842	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5843	  elif test -f "${path}/libracket.so"; then
5844	    MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
5845	  else
5846	    	    if test "$path" != "$SCHEME_LIB"; then
5847	      continue
5848	    fi
5849	    MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
5850	  fi
5851	  if test "$GCC" = yes; then
5852	    	    	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
5853	  elif test "`(uname) 2>/dev/null`" = SunOS &&
5854				   uname -r | grep '^5' >/dev/null; then
5855	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
5856	  fi
5857	fi
5858      fi
5859      if test "X$MZSCHEME_LIBS" != "X"; then
5860	break
5861      fi
5862    done
5863
5864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
5865$as_echo_n "checking if racket requires -pthread... " >&6; }
5866    if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
5867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5868$as_echo "yes" >&6; }
5869      MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
5870      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
5871    else
5872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874    fi
5875
5876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
5877$as_echo_n "checking for racket config directory... " >&6; }
5878    SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
5879    if test "X$SCHEME_CONFIGDIR" != "X"; then
5880      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
5881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
5882$as_echo "${SCHEME_CONFIGDIR}" >&6; }
5883    else
5884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5885$as_echo "not found" >&6; }
5886    fi
5887
5888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
5889$as_echo_n "checking for racket collects directory... " >&6; }
5890    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))))'`
5891    if test "X$SCHEME_COLLECTS" = "X"; then
5892      if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
5893	SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
5894      else
5895	if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
5896	  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
5897	else
5898	  if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
5899	    SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
5900	  else
5901	    if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
5902	      SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
5903	    fi
5904	  fi
5905	fi
5906      fi
5907    fi
5908    if test "X$SCHEME_COLLECTS" != "X" ; then
5909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
5910$as_echo "${SCHEME_COLLECTS}" >&6; }
5911    else
5912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5913$as_echo "not found" >&6; }
5914    fi
5915
5916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
5917$as_echo_n "checking for mzscheme_base.c... " >&6; }
5918    if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
5919      MZSCHEME_EXTRA="mzscheme_base.c"
5920      MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5921      MZSCHEME_MOD="++lib scheme/base"
5922    else
5923      if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
5924	MZSCHEME_EXTRA="mzscheme_base.c"
5925	MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5926	MZSCHEME_MOD="++lib scheme/base"
5927      else
5928	if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
5929	  MZSCHEME_EXTRA="mzscheme_base.c"
5930	  MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
5931	  MZSCHEME_MOD=""
5932	fi
5933      fi
5934    fi
5935    if test "X$MZSCHEME_EXTRA" != "X" ; then
5936            MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
5937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: needed" >&5
5938$as_echo "needed" >&6; }
5939    else
5940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
5941$as_echo "not needed" >&6; }
5942    fi
5943
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
5945$as_echo_n "checking for ffi_type_void in -lffi... " >&6; }
5946if ${ac_cv_lib_ffi_ffi_type_void+:} false; then :
5947  $as_echo_n "(cached) " >&6
5948else
5949  ac_check_lib_save_LIBS=$LIBS
5950LIBS="-lffi  $LIBS"
5951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5952/* end confdefs.h.  */
5953
5954/* Override any GCC internal prototype to avoid an error.
5955   Use char because int might match the return type of a GCC
5956   builtin and then its argument prototype would still apply.  */
5957#ifdef __cplusplus
5958extern "C"
5959#endif
5960char ffi_type_void ();
5961int
5962main ()
5963{
5964return ffi_type_void ();
5965  ;
5966  return 0;
5967}
5968_ACEOF
5969if ac_fn_c_try_link "$LINENO"; then :
5970  ac_cv_lib_ffi_ffi_type_void=yes
5971else
5972  ac_cv_lib_ffi_ffi_type_void=no
5973fi
5974rm -f core conftest.err conftest.$ac_objext \
5975    conftest$ac_exeext conftest.$ac_ext
5976LIBS=$ac_check_lib_save_LIBS
5977fi
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
5979$as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; }
5980if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes; then :
5981  MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
5982fi
5983
5984
5985    MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
5986      -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
5987
5988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
5989$as_echo_n "checking if compile and link flags for MzScheme are sane... " >&6; }
5990    cflags_save=$CFLAGS
5991    libs_save=$LIBS
5992    CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
5993    LIBS="$LIBS $MZSCHEME_LIBS"
5994    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5995/* end confdefs.h.  */
5996
5997int
5998main ()
5999{
6000
6001  ;
6002  return 0;
6003}
6004_ACEOF
6005if ac_fn_c_try_link "$LINENO"; then :
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6007$as_echo "yes" >&6; }; mzs_ok=yes
6008else
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6010$as_echo "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
6011fi
6012rm -f core conftest.err conftest.$ac_objext \
6013    conftest$ac_exeext conftest.$ac_ext
6014    CFLAGS=$cflags_save
6015    LIBS=$libs_save
6016    if test $mzs_ok = yes; then
6017      MZSCHEME_SRC="if_mzsch.c"
6018      MZSCHEME_OBJ="objects/if_mzsch.o"
6019      MZSCHEME_PRO="if_mzsch.pro"
6020      $as_echo "#define FEAT_MZSCHEME 1" >>confdefs.h
6021
6022    else
6023      MZSCHEME_CFLAGS=
6024      MZSCHEME_LIBS=
6025      MZSCHEME_EXTRA=
6026      MZSCHEME_MZC=
6027    fi
6028  fi
6029
6030
6031
6032
6033
6034
6035
6036fi
6037
6038
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6040$as_echo_n "checking --enable-perlinterp argument... " >&6; }
6041# Check whether --enable-perlinterp was given.
6042if test "${enable_perlinterp+set}" = set; then :
6043  enableval=$enable_perlinterp;
6044else
6045  enable_perlinterp="no"
6046fi
6047
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6049$as_echo "$enable_perlinterp" >&6; }
6050if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
6051  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6052    as_fn_error $? "cannot use Perl with tiny or small features" "$LINENO" 5
6053  fi
6054
6055  # Extract the first word of "perl", so it can be a program name with args.
6056set dummy perl; ac_word=$2
6057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6058$as_echo_n "checking for $ac_word... " >&6; }
6059if ${ac_cv_path_vi_cv_path_perl+:} false; then :
6060  $as_echo_n "(cached) " >&6
6061else
6062  case $vi_cv_path_perl in
6063  [\\/]* | ?:[\\/]*)
6064  ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6065  ;;
6066  *)
6067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070  IFS=$as_save_IFS
6071  test -z "$as_dir" && as_dir=.
6072    for ac_exec_ext in '' $ac_executable_extensions; do
6073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6074    ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext"
6075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6076    break 2
6077  fi
6078done
6079  done
6080IFS=$as_save_IFS
6081
6082  ;;
6083esac
6084fi
6085vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
6086if test -n "$vi_cv_path_perl"; then
6087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6088$as_echo "$vi_cv_path_perl" >&6; }
6089else
6090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6091$as_echo "no" >&6; }
6092fi
6093
6094
6095  if test "X$vi_cv_path_perl" != "X"; then
6096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6097$as_echo_n "checking Perl version... " >&6; }
6098    if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6099     eval `$vi_cv_path_perl -V:usethreads`
6100     eval `$vi_cv_path_perl -V:libperl`
6101     if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6102       badthreads=no
6103     else
6104       if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6105	 eval `$vi_cv_path_perl -V:use5005threads`
6106	 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6107	   badthreads=no
6108	 else
6109	   badthreads=yes
6110	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6111$as_echo ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
6112	 fi
6113       else
6114	 badthreads=yes
6115	 { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6116$as_echo ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
6117       fi
6118     fi
6119     if test $badthreads = no; then
6120      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6121$as_echo "OK" >&6; }
6122      eval `$vi_cv_path_perl -V:shrpenv`
6123      if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6124	shrpenv=""
6125      fi
6126      vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
6127
6128      vi_cv_perl_extutils=unknown_perl_extutils_path
6129      for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6130	xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6131	if test -f "$xsubpp_path"; then
6132	  vi_cv_perl_xsubpp="$xsubpp_path"
6133	fi
6134      done
6135
6136                              perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
6137		-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6138		-e 's/-fdebug-prefix-map[^ ]*//g' \
6139		-e 's/-pipe //' \
6140		-e 's/-W[^ ]*//g' \
6141		-e 's/-D_FORTIFY_SOURCE=.//g'`
6142            perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6143		sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6144			-e 's/-bE:perl.exp//' -e 's/-lc //'`
6145                  perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6146		-e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6147
6148                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6149$as_echo_n "checking if compile and link flags for Perl are sane... " >&6; }
6150      cflags_save=$CFLAGS
6151      libs_save=$LIBS
6152      ldflags_save=$LDFLAGS
6153      CFLAGS="$CFLAGS $perlcppflags"
6154      LIBS="$LIBS $perllibs"
6155      perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
6156      LDFLAGS="$perlldflags $LDFLAGS"
6157      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6158/* end confdefs.h.  */
6159
6160int
6161main ()
6162{
6163
6164  ;
6165  return 0;
6166}
6167_ACEOF
6168if ac_fn_c_try_link "$LINENO"; then :
6169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6170$as_echo "yes" >&6; }; perl_ok=yes
6171else
6172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6173$as_echo "no: PERL DISABLED" >&6; }; perl_ok=no
6174fi
6175rm -f core conftest.err conftest.$ac_objext \
6176    conftest$ac_exeext conftest.$ac_ext
6177      CFLAGS=$cflags_save
6178      LIBS=$libs_save
6179      LDFLAGS=$ldflags_save
6180      if test $perl_ok = yes; then
6181	if test "X$perlcppflags" != "X"; then
6182	  PERL_CFLAGS=$perlcppflags
6183	fi
6184	if test "X$perlldflags" != "X"; then
6185	  if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
6186	    LDFLAGS="$perlldflags $LDFLAGS"
6187	  fi
6188	fi
6189	PERL_LIBS=$perllibs
6190	PERL_SRC="auto/if_perl.c if_perlsfio.c"
6191	PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6192	PERL_PRO="if_perl.pro if_perlsfio.pro"
6193	$as_echo "#define FEAT_PERL 1" >>confdefs.h
6194
6195      fi
6196     fi
6197    else
6198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6199$as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
6200    fi
6201  fi
6202
6203  if test "x$MACOS_X" = "xyes"; then
6204        dir=/System/Library/Perl
6205    darwindir=$dir/darwin
6206    if test -d $darwindir; then
6207      PERL=/usr/bin/perl
6208    else
6209            dir=/System/Library/Perl/5.8.1
6210      darwindir=$dir/darwin-thread-multi-2level
6211      if test -d $darwindir; then
6212	PERL=/usr/bin/perl
6213      fi
6214    fi
6215    if test -n "$PERL"; then
6216      PERL_DIR="$dir"
6217      PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6218      PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6219      PERL_LIBS="-L$darwindir/CORE -lperl"
6220    fi
6221                PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6222    PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6223  fi
6224  if test "$enable_perlinterp" = "dynamic"; then
6225    if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
6226      $as_echo "#define DYNAMIC_PERL 1" >>confdefs.h
6227
6228      PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
6229    fi
6230  fi
6231
6232  if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
6233    as_fn_error $? "could not configure perl" "$LINENO" 5
6234  fi
6235fi
6236
6237
6238
6239
6240
6241
6242
6243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6244$as_echo_n "checking --enable-pythoninterp argument... " >&6; }
6245# Check whether --enable-pythoninterp was given.
6246if test "${enable_pythoninterp+set}" = set; then :
6247  enableval=$enable_pythoninterp;
6248else
6249  enable_pythoninterp="no"
6250fi
6251
6252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6253$as_echo "$enable_pythoninterp" >&6; }
6254if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
6255  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6256    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
6257  fi
6258
6259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6260$as_echo_n "checking --with-python-command argument... " >&6; }
6261
6262
6263# Check whether --with-python-command was given.
6264if test "${with_python_command+set}" = set; then :
6265  withval=$with_python_command; vi_cv_path_python="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6266$as_echo "$vi_cv_path_python" >&6; }
6267else
6268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6269$as_echo "no" >&6; }
6270fi
6271
6272
6273  if test "X$vi_cv_path_python" = "X"; then
6274    for ac_prog in python2 python
6275do
6276  # Extract the first word of "$ac_prog", so it can be a program name with args.
6277set dummy $ac_prog; ac_word=$2
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6279$as_echo_n "checking for $ac_word... " >&6; }
6280if ${ac_cv_path_vi_cv_path_python+:} false; then :
6281  $as_echo_n "(cached) " >&6
6282else
6283  case $vi_cv_path_python in
6284  [\\/]* | ?:[\\/]*)
6285  ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6286  ;;
6287  *)
6288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6289for as_dir in $PATH
6290do
6291  IFS=$as_save_IFS
6292  test -z "$as_dir" && as_dir=.
6293    for ac_exec_ext in '' $ac_executable_extensions; do
6294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6295    ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext"
6296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6297    break 2
6298  fi
6299done
6300  done
6301IFS=$as_save_IFS
6302
6303  ;;
6304esac
6305fi
6306vi_cv_path_python=$ac_cv_path_vi_cv_path_python
6307if test -n "$vi_cv_path_python"; then
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6309$as_echo "$vi_cv_path_python" >&6; }
6310else
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312$as_echo "no" >&6; }
6313fi
6314
6315
6316  test -n "$vi_cv_path_python" && break
6317done
6318
6319  fi
6320  if test "X$vi_cv_path_python" != "X"; then
6321
6322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6323$as_echo_n "checking Python version... " >&6; }
6324if ${vi_cv_var_python_version+:} false; then :
6325  $as_echo_n "(cached) " >&6
6326else
6327  vi_cv_var_python_version=`
6328	    ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
6329
6330fi
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6332$as_echo "$vi_cv_var_python_version" >&6; }
6333
6334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6335$as_echo_n "checking Python is 2.3 or better... " >&6; }
6336    if ${vi_cv_path_python} -c \
6337	"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
6338    then
6339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6340$as_echo "yep" >&6; }
6341
6342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6343$as_echo_n "checking Python's install prefix... " >&6; }
6344if ${vi_cv_path_python_pfx+:} false; then :
6345  $as_echo_n "(cached) " >&6
6346else
6347   vi_cv_path_python_pfx=`
6348	    ${vi_cv_path_python} -c \
6349		"import sys; print sys.prefix"`
6350fi
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6352$as_echo "$vi_cv_path_python_pfx" >&6; }
6353
6354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6355$as_echo_n "checking Python's execution prefix... " >&6; }
6356if ${vi_cv_path_python_epfx+:} false; then :
6357  $as_echo_n "(cached) " >&6
6358else
6359   vi_cv_path_python_epfx=`
6360	    ${vi_cv_path_python} -c \
6361		"import sys; print sys.exec_prefix"`
6362fi
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6364$as_echo "$vi_cv_path_python_epfx" >&6; }
6365
6366
6367      if ${vi_cv_path_pythonpath+:} false; then :
6368  $as_echo_n "(cached) " >&6
6369else
6370   vi_cv_path_pythonpath=`
6371	    unset PYTHONPATH;
6372	    ${vi_cv_path_python} -c \
6373		"import sys, string; print string.join(sys.path,':')"`
6374fi
6375
6376
6377
6378
6379# Check whether --with-python-config-dir was given.
6380if test "${with_python_config_dir+set}" = set; then :
6381  withval=$with_python_config_dir;  vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
6382fi
6383
6384
6385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6386$as_echo_n "checking Python's configuration directory... " >&6; }
6387if ${vi_cv_path_python_conf+:} false; then :
6388  $as_echo_n "(cached) " >&6
6389else
6390
6391	vi_cv_path_python_conf=
6392	d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6393	if test -d "$d" && test -f "$d/config.c"; then
6394	  vi_cv_path_python_conf="$d"
6395	else
6396	  for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6397	    for subdir in lib64 lib share; do
6398	      d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6399	      if test -d "$d" && test -f "$d/config.c"; then
6400		vi_cv_path_python_conf="$d"
6401	      fi
6402	    done
6403	  done
6404	fi
6405
6406fi
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6408$as_echo "$vi_cv_path_python_conf" >&6; }
6409
6410      PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6411
6412      if test "X$PYTHON_CONFDIR" = "X"; then
6413	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6414$as_echo "can't find it!" >&6; }
6415      else
6416
6417			if ${vi_cv_path_python_plibs+:} false; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420
6421	    pwd=`pwd`
6422	    tmp_mkf="$pwd/config-PyMake$$"
6423	    cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
6424__:
6425	@echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
6426	@echo "python_LIBS='$(LIBS)'"
6427	@echo "python_SYSLIBS='$(SYSLIBS)'"
6428	@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
6429	@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
6430	@echo "python_INSTSONAME='$(INSTSONAME)'"
6431	@echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6432	@echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6433	@echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
6434eof
6435	    	    eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6436	    rm -f -- "${tmp_mkf}"
6437	    if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
6438		"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6439	      vi_cv_path_python_plibs="-framework Python"
6440	      if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6441		  vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6442	      fi
6443	    else
6444	      vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
6445	      	      	      	      if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6446	        python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6447		python_link_path=`echo ${python_LINKFORSHARED} |   sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6448	        if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6449	          		  	          python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6450		  if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6451		    		    python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6452	            	            		  fi
6453	          python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6454	        fi
6455	      fi
6456	      vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
6457	      	      vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6458	    fi
6459
6460fi
6461
6462	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6463$as_echo_n "checking Python's dll name... " >&6; }
6464if ${vi_cv_dll_name_python+:} false; then :
6465  $as_echo_n "(cached) " >&6
6466else
6467
6468	  if test "X$python_DLLLIBRARY" != "X"; then
6469	    vi_cv_dll_name_python="$python_DLLLIBRARY"
6470	  else
6471	    vi_cv_dll_name_python="$python_INSTSONAME"
6472	  fi
6473
6474fi
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6476$as_echo "$vi_cv_dll_name_python" >&6; }
6477
6478	PYTHON_LIBS="${vi_cv_path_python_plibs}"
6479	if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
6480	  PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
6481	else
6482	  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}"
6483	fi
6484	if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
6485	  	  PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6486
6487	fi
6488	PYTHON_SRC="if_python.c"
6489	PYTHON_OBJ="objects/if_python.o"
6490
6491								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6492$as_echo_n "checking if -pthread should be used... " >&6; }
6493	threadsafe_flag=
6494	thread_lib=
6495	        if test "`(uname) 2>/dev/null`" != Darwin; then
6496	  test "$GCC" = yes && threadsafe_flag="-pthread"
6497	  if test "`(uname) 2>/dev/null`" = FreeBSD; then
6498	    threadsafe_flag="-D_THREAD_SAFE"
6499	    thread_lib="-pthread"
6500	  fi
6501	  if test "`(uname) 2>/dev/null`" = SunOS; then
6502	    threadsafe_flag="-pthreads"
6503	  fi
6504	fi
6505	libs_save_old=$LIBS
6506	if test -n "$threadsafe_flag"; then
6507	  cflags_save=$CFLAGS
6508	  CFLAGS="$CFLAGS $threadsafe_flag"
6509	  LIBS="$LIBS $thread_lib"
6510	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6511/* end confdefs.h.  */
6512
6513int
6514main ()
6515{
6516
6517  ;
6518  return 0;
6519}
6520_ACEOF
6521if ac_fn_c_try_link "$LINENO"; then :
6522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6523$as_echo "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6524else
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }; LIBS=$libs_save_old
6527
6528fi
6529rm -f core conftest.err conftest.$ac_objext \
6530    conftest$ac_exeext conftest.$ac_ext
6531	  CFLAGS=$cflags_save
6532	else
6533	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6534$as_echo "no" >&6; }
6535	fi
6536
6537			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6538$as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
6539	cflags_save=$CFLAGS
6540	libs_save=$LIBS
6541	CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6542	LIBS="$LIBS $PYTHON_LIBS"
6543	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6544/* end confdefs.h.  */
6545
6546int
6547main ()
6548{
6549
6550  ;
6551  return 0;
6552}
6553_ACEOF
6554if ac_fn_c_try_link "$LINENO"; then :
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6556$as_echo "yes" >&6; }; python_ok=yes
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6559$as_echo "no: PYTHON DISABLED" >&6; }; python_ok=no
6560fi
6561rm -f core conftest.err conftest.$ac_objext \
6562    conftest$ac_exeext conftest.$ac_ext
6563	CFLAGS=$cflags_save
6564	LIBS=$libs_save
6565	if test $python_ok = yes; then
6566	  $as_echo "#define FEAT_PYTHON 1" >>confdefs.h
6567
6568	else
6569	  LIBS=$libs_save_old
6570	  PYTHON_SRC=
6571	  PYTHON_OBJ=
6572	  PYTHON_LIBS=
6573	  PYTHON_CFLAGS=
6574	fi
6575      fi
6576    else
6577      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6578$as_echo "too old" >&6; }
6579    fi
6580  fi
6581
6582  if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
6583    as_fn_error $? "could not configure python" "$LINENO" 5
6584  fi
6585fi
6586
6587
6588
6589
6590
6591
6592
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6594$as_echo_n "checking --enable-python3interp argument... " >&6; }
6595# Check whether --enable-python3interp was given.
6596if test "${enable_python3interp+set}" = set; then :
6597  enableval=$enable_python3interp;
6598else
6599  enable_python3interp="no"
6600fi
6601
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6603$as_echo "$enable_python3interp" >&6; }
6604if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
6605  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6606    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
6607  fi
6608
6609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6610$as_echo_n "checking --with-python3-command argument... " >&6; }
6611
6612
6613# Check whether --with-python3-command was given.
6614if test "${with_python3_command+set}" = set; then :
6615  withval=$with_python3_command; vi_cv_path_python3="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6616$as_echo "$vi_cv_path_python3" >&6; }
6617else
6618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6619$as_echo "no" >&6; }
6620fi
6621
6622
6623  if test "X$vi_cv_path_python3" = "X"; then
6624    for ac_prog in python3 python
6625do
6626  # Extract the first word of "$ac_prog", so it can be a program name with args.
6627set dummy $ac_prog; ac_word=$2
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6629$as_echo_n "checking for $ac_word... " >&6; }
6630if ${ac_cv_path_vi_cv_path_python3+:} false; then :
6631  $as_echo_n "(cached) " >&6
6632else
6633  case $vi_cv_path_python3 in
6634  [\\/]* | ?:[\\/]*)
6635  ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
6636  ;;
6637  *)
6638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6639for as_dir in $PATH
6640do
6641  IFS=$as_save_IFS
6642  test -z "$as_dir" && as_dir=.
6643    for ac_exec_ext in '' $ac_executable_extensions; do
6644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6645    ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext"
6646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6647    break 2
6648  fi
6649done
6650  done
6651IFS=$as_save_IFS
6652
6653  ;;
6654esac
6655fi
6656vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
6657if test -n "$vi_cv_path_python3"; then
6658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6659$as_echo "$vi_cv_path_python3" >&6; }
6660else
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6662$as_echo "no" >&6; }
6663fi
6664
6665
6666  test -n "$vi_cv_path_python3" && break
6667done
6668
6669  fi
6670  if test "X$vi_cv_path_python3" != "X"; then
6671
6672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6673$as_echo_n "checking Python version... " >&6; }
6674if ${vi_cv_var_python3_version+:} false; then :
6675  $as_echo_n "(cached) " >&6
6676else
6677  vi_cv_var_python3_version=`
6678          ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
6679
6680fi
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
6682$as_echo "$vi_cv_var_python3_version" >&6; }
6683
6684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
6685$as_echo_n "checking Python is 3.0 or better... " >&6; }
6686    if ${vi_cv_path_python3} -c \
6687      "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
6688    then
6689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6690$as_echo "yep" >&6; }
6691
6692            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
6693$as_echo_n "checking Python's abiflags... " >&6; }
6694if ${vi_cv_var_python3_abiflags+:} false; then :
6695  $as_echo_n "(cached) " >&6
6696else
6697
6698       vi_cv_var_python3_abiflags=
6699       if ${vi_cv_path_python3} -c \
6700           "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
6701       then
6702         vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
6703           "import sys; print(sys.abiflags)"`
6704       fi
6705fi
6706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
6707$as_echo "$vi_cv_var_python3_abiflags" >&6; }
6708
6709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6710$as_echo_n "checking Python's install prefix... " >&6; }
6711if ${vi_cv_path_python3_pfx+:} false; then :
6712  $as_echo_n "(cached) " >&6
6713else
6714   vi_cv_path_python3_pfx=`
6715       ${vi_cv_path_python3} -c \
6716       "import sys; print(sys.prefix)"`
6717fi
6718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
6719$as_echo "$vi_cv_path_python3_pfx" >&6; }
6720
6721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6722$as_echo_n "checking Python's execution prefix... " >&6; }
6723if ${vi_cv_path_python3_epfx+:} false; then :
6724  $as_echo_n "(cached) " >&6
6725else
6726   vi_cv_path_python3_epfx=`
6727       ${vi_cv_path_python3} -c \
6728       "import sys; print(sys.exec_prefix)"`
6729fi
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
6731$as_echo "$vi_cv_path_python3_epfx" >&6; }
6732
6733
6734      if ${vi_cv_path_python3path+:} false; then :
6735  $as_echo_n "(cached) " >&6
6736else
6737   vi_cv_path_python3path=`
6738       unset PYTHONPATH;
6739       ${vi_cv_path_python3} -c \
6740       "import sys, string; print(':'.join(sys.path))"`
6741fi
6742
6743
6744
6745
6746# Check whether --with-python3-config-dir was given.
6747if test "${with_python3_config_dir+set}" = set; then :
6748  withval=$with_python3_config_dir;  vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
6749fi
6750
6751
6752      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6753$as_echo_n "checking Python's configuration directory... " >&6; }
6754if ${vi_cv_path_python3_conf+:} false; then :
6755  $as_echo_n "(cached) " >&6
6756else
6757
6758       vi_cv_path_python3_conf=
6759       config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6760       d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
6761       if test "x$d" = "x"; then
6762         d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
6763       fi
6764       if test -d "$d" && test -f "$d/config.c"; then
6765         vi_cv_path_python3_conf="$d"
6766       else
6767         for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
6768	   for subdir in lib64 lib share; do
6769	     d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
6770	     if test -d "$d" && test -f "$d/config.c"; then
6771	       vi_cv_path_python3_conf="$d"
6772	     fi
6773	   done
6774         done
6775       fi
6776
6777fi
6778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
6779$as_echo "$vi_cv_path_python3_conf" >&6; }
6780
6781      PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
6782
6783      if test "X$PYTHON3_CONFDIR" = "X"; then
6784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6785$as_echo "can't find it!" >&6; }
6786      else
6787
6788                        if ${vi_cv_path_python3_plibs+:} false; then :
6789  $as_echo_n "(cached) " >&6
6790else
6791
6792            pwd=`pwd`
6793            tmp_mkf="$pwd/config-PyMake$$"
6794            cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
6795__:
6796	@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
6797	@echo "python3_LIBS='$(LIBS)'"
6798	@echo "python3_SYSLIBS='$(SYSLIBS)'"
6799	@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
6800	@echo "python3_INSTSONAME='$(INSTSONAME)'"
6801eof
6802	    	    eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6803	    rm -f -- "${tmp_mkf}"
6804	    vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6805	    vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
6806	    	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
6807	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
6808
6809fi
6810
6811	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
6812$as_echo_n "checking Python3's dll name... " >&6; }
6813if ${vi_cv_dll_name_python3+:} false; then :
6814  $as_echo_n "(cached) " >&6
6815else
6816
6817	  if test "X$python3_DLLLIBRARY" != "X"; then
6818	    vi_cv_dll_name_python3="$python3_DLLLIBRARY"
6819	  else
6820	    vi_cv_dll_name_python3="$python3_INSTSONAME"
6821	  fi
6822
6823fi
6824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
6825$as_echo "$vi_cv_dll_name_python3" >&6; }
6826
6827        PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
6828        if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
6829          PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6830        else
6831          PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -I${vi_cv_path_python3_epfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6832        fi
6833	if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
6834	  	  PYTHON3_CFLAGS="${PYTHON3_CFLAGS}  -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
6835	fi
6836        PYTHON3_SRC="if_python3.c"
6837        PYTHON3_OBJ="objects/if_python3.o"
6838
6839                                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6840$as_echo_n "checking if -pthread should be used... " >&6; }
6841        threadsafe_flag=
6842        thread_lib=
6843                if test "`(uname) 2>/dev/null`" != Darwin; then
6844          test "$GCC" = yes && threadsafe_flag="-pthread"
6845          if test "`(uname) 2>/dev/null`" = FreeBSD; then
6846            threadsafe_flag="-D_THREAD_SAFE"
6847            thread_lib="-pthread"
6848          fi
6849          if test "`(uname) 2>/dev/null`" = SunOS; then
6850            threadsafe_flag="-pthreads"
6851          fi
6852        fi
6853        libs_save_old=$LIBS
6854        if test -n "$threadsafe_flag"; then
6855          cflags_save=$CFLAGS
6856          CFLAGS="$CFLAGS $threadsafe_flag"
6857          LIBS="$LIBS $thread_lib"
6858          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6859/* end confdefs.h.  */
6860
6861int
6862main ()
6863{
6864
6865  ;
6866  return 0;
6867}
6868_ACEOF
6869if ac_fn_c_try_link "$LINENO"; then :
6870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6871$as_echo "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
6872else
6873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6874$as_echo "no" >&6; }; LIBS=$libs_save_old
6875
6876fi
6877rm -f core conftest.err conftest.$ac_objext \
6878    conftest$ac_exeext conftest.$ac_ext
6879          CFLAGS=$cflags_save
6880        else
6881          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6882$as_echo "no" >&6; }
6883        fi
6884
6885                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
6886$as_echo_n "checking if compile and link flags for Python 3 are sane... " >&6; }
6887        cflags_save=$CFLAGS
6888        libs_save=$LIBS
6889        CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
6890        LIBS="$LIBS $PYTHON3_LIBS"
6891        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892/* end confdefs.h.  */
6893
6894int
6895main ()
6896{
6897
6898  ;
6899  return 0;
6900}
6901_ACEOF
6902if ac_fn_c_try_link "$LINENO"; then :
6903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6904$as_echo "yes" >&6; }; python3_ok=yes
6905else
6906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
6907$as_echo "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
6908fi
6909rm -f core conftest.err conftest.$ac_objext \
6910    conftest$ac_exeext conftest.$ac_ext
6911        CFLAGS=$cflags_save
6912        LIBS=$libs_save
6913        if test "$python3_ok" = yes; then
6914          $as_echo "#define FEAT_PYTHON3 1" >>confdefs.h
6915
6916        else
6917          LIBS=$libs_save_old
6918          PYTHON3_SRC=
6919          PYTHON3_OBJ=
6920          PYTHON3_LIBS=
6921          PYTHON3_CFLAGS=
6922        fi
6923      fi
6924    else
6925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6926$as_echo "too old" >&6; }
6927    fi
6928  fi
6929  if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
6930    as_fn_error $? "could not configure python3" "$LINENO" 5
6931  fi
6932fi
6933
6934
6935
6936
6937
6938
6939if test "$python_ok" = yes && test "$python3_ok" = yes; then
6940  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
6941
6942  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
6943
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
6945$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
6946  cflags_save=$CFLAGS
6947  CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6948  libs_save=$LIBS
6949    LIBS="-ldl $LIBS"
6950  if test "$cross_compiling" = yes; then :
6951  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6953as_fn_error $? "cannot run test program while cross compiling
6954See \`config.log' for more details" "$LINENO" 5; }
6955else
6956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6957/* end confdefs.h.  */
6958
6959    #include <dlfcn.h>
6960    /* If this program fails, then RTLD_GLOBAL is needed.
6961     * RTLD_GLOBAL will be used and then it is not possible to
6962     * have both python versions enabled in the same vim instance.
6963     * Only the first python version used will be switched on.
6964     */
6965
6966    int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
6967    {
6968      int needed = 0;
6969      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
6970      if (pylib != 0)
6971      {
6972          void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
6973          void (*init)(void) = dlsym(pylib, "Py_Initialize");
6974          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
6975          void (*final)(void) = dlsym(pylib, "Py_Finalize");
6976          (*pfx)(prefix);
6977          (*init)();
6978          needed = (*simple)("import termios") == -1;
6979          (*final)();
6980          dlclose(pylib);
6981      }
6982      return !needed;
6983    }
6984
6985    int main(int argc, char** argv)
6986    {
6987      int not_needed = 0;
6988      if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
6989            not_needed = 1;
6990      return !not_needed;
6991    }
6992_ACEOF
6993if ac_fn_c_try_run "$LINENO"; then :
6994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6995$as_echo "yes" >&6; };$as_echo "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
6996
6997else
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6999$as_echo "no" >&6; }
7000fi
7001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7002  conftest.$ac_objext conftest.beam conftest.$ac_ext
7003fi
7004
7005
7006  CFLAGS=$cflags_save
7007  LIBS=$libs_save
7008
7009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7010$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
7011  cflags_save=$CFLAGS
7012  CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7013  libs_save=$LIBS
7014    LIBS="-ldl $LIBS"
7015  if test "$cross_compiling" = yes; then :
7016  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7018as_fn_error $? "cannot run test program while cross compiling
7019See \`config.log' for more details" "$LINENO" 5; }
7020else
7021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7022/* end confdefs.h.  */
7023
7024    #include <dlfcn.h>
7025    #include <wchar.h>
7026    /* If this program fails, then RTLD_GLOBAL is needed.
7027     * RTLD_GLOBAL will be used and then it is not possible to
7028     * have both python versions enabled in the same vim instance.
7029     * Only the first python version used will be switched on.
7030     */
7031
7032    int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
7033    {
7034      int needed = 0;
7035      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
7036      if (pylib != 0)
7037      {
7038          void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7039          void (*init)(void) = dlsym(pylib, "Py_Initialize");
7040          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7041          void (*final)(void) = dlsym(pylib, "Py_Finalize");
7042          (*pfx)(prefix);
7043          (*init)();
7044          needed = (*simple)("import termios") == -1;
7045          (*final)();
7046          dlclose(pylib);
7047      }
7048      return !needed;
7049    }
7050
7051    int main(int argc, char** argv)
7052    {
7053      int not_needed = 0;
7054      if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
7055            not_needed = 1;
7056      return !not_needed;
7057    }
7058_ACEOF
7059if ac_fn_c_try_run "$LINENO"; then :
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7061$as_echo "yes" >&6; };$as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
7062
7063else
7064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7065$as_echo "no" >&6; }
7066fi
7067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7068  conftest.$ac_objext conftest.beam conftest.$ac_ext
7069fi
7070
7071
7072  CFLAGS=$cflags_save
7073  LIBS=$libs_save
7074
7075  PYTHON_SRC="if_python.c"
7076  PYTHON_OBJ="objects/if_python.o"
7077  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
7078  PYTHON_LIBS=
7079  PYTHON3_SRC="if_python3.c"
7080  PYTHON3_OBJ="objects/if_python3.o"
7081  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
7082  PYTHON3_LIBS=
7083elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
7084  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
7085
7086  PYTHON_SRC="if_python.c"
7087  PYTHON_OBJ="objects/if_python.o"
7088  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
7089  PYTHON_LIBS=
7090elif test "$python_ok" = yes; then
7091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7092$as_echo_n "checking if -fPIE can be added for Python... " >&6; }
7093  cflags_save=$CFLAGS
7094  libs_save=$LIBS
7095  CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7096  LIBS="$LIBS $PYTHON_LIBS"
7097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7098/* end confdefs.h.  */
7099
7100int
7101main ()
7102{
7103
7104  ;
7105  return 0;
7106}
7107_ACEOF
7108if ac_fn_c_try_link "$LINENO"; then :
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7110$as_echo "yes" >&6; }; fpie_ok=yes
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }; fpie_ok=no
7114fi
7115rm -f core conftest.err conftest.$ac_objext \
7116    conftest$ac_exeext conftest.$ac_ext
7117  CFLAGS=$cflags_save
7118  LIBS=$libs_save
7119  if test $fpie_ok = yes; then
7120    PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7121  fi
7122elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
7123  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
7124
7125  PYTHON3_SRC="if_python3.c"
7126  PYTHON3_OBJ="objects/if_python3.o"
7127  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
7128  PYTHON3_LIBS=
7129elif test "$python3_ok" = yes; then
7130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7131$as_echo_n "checking if -fPIE can be added for Python3... " >&6; }
7132  cflags_save=$CFLAGS
7133  libs_save=$LIBS
7134  CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7135  LIBS="$LIBS $PYTHON3_LIBS"
7136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7137/* end confdefs.h.  */
7138
7139int
7140main ()
7141{
7142
7143  ;
7144  return 0;
7145}
7146_ACEOF
7147if ac_fn_c_try_link "$LINENO"; then :
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7149$as_echo "yes" >&6; }; fpie_ok=yes
7150else
7151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7152$as_echo "no" >&6; }; fpie_ok=no
7153fi
7154rm -f core conftest.err conftest.$ac_objext \
7155    conftest$ac_exeext conftest.$ac_ext
7156  CFLAGS=$cflags_save
7157  LIBS=$libs_save
7158  if test $fpie_ok = yes; then
7159    PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7160  fi
7161fi
7162
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7164$as_echo_n "checking --enable-tclinterp argument... " >&6; }
7165# Check whether --enable-tclinterp was given.
7166if test "${enable_tclinterp+set}" = set; then :
7167  enableval=$enable_tclinterp;
7168else
7169  enable_tclinterp="no"
7170fi
7171
7172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7173$as_echo "$enable_tclinterp" >&6; }
7174
7175if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
7176
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7178$as_echo_n "checking --with-tclsh argument... " >&6; }
7179
7180# Check whether --with-tclsh was given.
7181if test "${with_tclsh+set}" = set; then :
7182  withval=$with_tclsh; tclsh_name="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7183$as_echo "$tclsh_name" >&6; }
7184else
7185  tclsh_name="tclsh8.5"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189  # Extract the first word of "$tclsh_name", so it can be a program name with args.
7190set dummy $tclsh_name; ac_word=$2
7191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7192$as_echo_n "checking for $ac_word... " >&6; }
7193if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7194  $as_echo_n "(cached) " >&6
7195else
7196  case $vi_cv_path_tcl in
7197  [\\/]* | ?:[\\/]*)
7198  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7199  ;;
7200  *)
7201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7202for as_dir in $PATH
7203do
7204  IFS=$as_save_IFS
7205  test -z "$as_dir" && as_dir=.
7206    for ac_exec_ext in '' $ac_executable_extensions; do
7207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7208    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7210    break 2
7211  fi
7212done
7213  done
7214IFS=$as_save_IFS
7215
7216  ;;
7217esac
7218fi
7219vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7220if test -n "$vi_cv_path_tcl"; then
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7222$as_echo "$vi_cv_path_tcl" >&6; }
7223else
7224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225$as_echo "no" >&6; }
7226fi
7227
7228
7229
7230
7231    if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7232    tclsh_name="tclsh8.4"
7233    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7234set dummy $tclsh_name; ac_word=$2
7235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7236$as_echo_n "checking for $ac_word... " >&6; }
7237if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7238  $as_echo_n "(cached) " >&6
7239else
7240  case $vi_cv_path_tcl in
7241  [\\/]* | ?:[\\/]*)
7242  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7243  ;;
7244  *)
7245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7246for as_dir in $PATH
7247do
7248  IFS=$as_save_IFS
7249  test -z "$as_dir" && as_dir=.
7250    for ac_exec_ext in '' $ac_executable_extensions; do
7251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7252    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7254    break 2
7255  fi
7256done
7257  done
7258IFS=$as_save_IFS
7259
7260  ;;
7261esac
7262fi
7263vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7264if test -n "$vi_cv_path_tcl"; then
7265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7266$as_echo "$vi_cv_path_tcl" >&6; }
7267else
7268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7269$as_echo "no" >&6; }
7270fi
7271
7272
7273  fi
7274  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
7275    tclsh_name="tclsh8.2"
7276    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7277set dummy $tclsh_name; ac_word=$2
7278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7279$as_echo_n "checking for $ac_word... " >&6; }
7280if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7281  $as_echo_n "(cached) " >&6
7282else
7283  case $vi_cv_path_tcl in
7284  [\\/]* | ?:[\\/]*)
7285  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7286  ;;
7287  *)
7288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289for as_dir in $PATH
7290do
7291  IFS=$as_save_IFS
7292  test -z "$as_dir" && as_dir=.
7293    for ac_exec_ext in '' $ac_executable_extensions; do
7294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7297    break 2
7298  fi
7299done
7300  done
7301IFS=$as_save_IFS
7302
7303  ;;
7304esac
7305fi
7306vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7307if test -n "$vi_cv_path_tcl"; then
7308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7309$as_echo "$vi_cv_path_tcl" >&6; }
7310else
7311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7312$as_echo "no" >&6; }
7313fi
7314
7315
7316  fi
7317  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7318    tclsh_name="tclsh8.0"
7319    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7320set dummy $tclsh_name; ac_word=$2
7321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7322$as_echo_n "checking for $ac_word... " >&6; }
7323if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7324  $as_echo_n "(cached) " >&6
7325else
7326  case $vi_cv_path_tcl in
7327  [\\/]* | ?:[\\/]*)
7328  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7329  ;;
7330  *)
7331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7332for as_dir in $PATH
7333do
7334  IFS=$as_save_IFS
7335  test -z "$as_dir" && as_dir=.
7336    for ac_exec_ext in '' $ac_executable_extensions; do
7337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7338    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7340    break 2
7341  fi
7342done
7343  done
7344IFS=$as_save_IFS
7345
7346  ;;
7347esac
7348fi
7349vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7350if test -n "$vi_cv_path_tcl"; then
7351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7352$as_echo "$vi_cv_path_tcl" >&6; }
7353else
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7355$as_echo "no" >&6; }
7356fi
7357
7358
7359  fi
7360    if test "X$vi_cv_path_tcl" = "X"; then
7361    tclsh_name="tclsh"
7362    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7363set dummy $tclsh_name; ac_word=$2
7364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7365$as_echo_n "checking for $ac_word... " >&6; }
7366if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7367  $as_echo_n "(cached) " >&6
7368else
7369  case $vi_cv_path_tcl in
7370  [\\/]* | ?:[\\/]*)
7371  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7372  ;;
7373  *)
7374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7375for as_dir in $PATH
7376do
7377  IFS=$as_save_IFS
7378  test -z "$as_dir" && as_dir=.
7379    for ac_exec_ext in '' $ac_executable_extensions; do
7380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7381    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7383    break 2
7384  fi
7385done
7386  done
7387IFS=$as_save_IFS
7388
7389  ;;
7390esac
7391fi
7392vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7393if test -n "$vi_cv_path_tcl"; then
7394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7395$as_echo "$vi_cv_path_tcl" >&6; }
7396else
7397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7398$as_echo "no" >&6; }
7399fi
7400
7401
7402  fi
7403  if test "X$vi_cv_path_tcl" != "X"; then
7404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7405$as_echo_n "checking Tcl version... " >&6; }
7406    if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
7407      tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
7408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7409$as_echo "$tclver - OK" >&6; };
7410      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 -`
7411      tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
7412
7413      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7414$as_echo_n "checking for location of Tcl include... " >&6; }
7415      if test "x$MACOS_X" != "xyes"; then
7416	tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
7417      else
7418				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"
7419      fi
7420      TCL_INC=
7421      for try in $tclinc; do
7422	if test -f "$try/tcl.h"; then
7423	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7424$as_echo "$try/tcl.h" >&6; }
7425	  TCL_INC=$try
7426	  break
7427	fi
7428      done
7429      if test -z "$TCL_INC"; then
7430	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7431$as_echo "<not found>" >&6; }
7432	SKIP_TCL=YES
7433      fi
7434      if test -z "$SKIP_TCL"; then
7435	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7436$as_echo_n "checking for location of tclConfig.sh script... " >&6; }
7437	if test "x$MACOS_X" != "xyes"; then
7438	  tclcnf=`echo $tclinc | sed s/include/lib/g`
7439	  tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
7440	else
7441	  	  	  	  tclcnf=`echo $tclinc | sed s/include/lib/g`
7442	  tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
7443	fi
7444	for try in $tclcnf; do
7445	  if test -f "$try/tclConfig.sh"; then
7446	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7447$as_echo "$try/tclConfig.sh" >&6; }
7448	    . "$try/tclConfig.sh"
7449	    	    if test "$enable_tclinterp" = "dynamic"; then
7450	      TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7451	    else
7452	      TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7453	    fi
7454	    	    	    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'`
7455	    break
7456	  fi
7457	done
7458	if test -z "$TCL_LIBS"; then
7459	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7460$as_echo "<not found>" >&6; }
7461	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7462$as_echo_n "checking for Tcl library by myself... " >&6; }
7463	  tcllib=`echo $tclinc | sed s/include/lib/g`
7464	  tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
7465	  for ext in .so .a ; do
7466	    for ver in "" $tclver ; do
7467	      for try in $tcllib ; do
7468		trylib=tcl$ver$ext
7469		if test -f "$try/lib$trylib" ; then
7470		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7471$as_echo "$try/lib$trylib" >&6; }
7472		  TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
7473		  if test "`(uname) 2>/dev/null`" = SunOS &&
7474					 uname -r | grep '^5' >/dev/null; then
7475		    TCL_LIBS="$TCL_LIBS -R $try"
7476		  fi
7477		  break 3
7478		fi
7479	      done
7480	    done
7481	  done
7482	  if test -z "$TCL_LIBS"; then
7483	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7484$as_echo "<not found>" >&6; }
7485	    SKIP_TCL=YES
7486	  fi
7487	fi
7488	if test -z "$SKIP_TCL"; then
7489	  $as_echo "#define FEAT_TCL 1" >>confdefs.h
7490
7491	  TCL_SRC=if_tcl.c
7492	  TCL_OBJ=objects/if_tcl.o
7493	  TCL_PRO=if_tcl.pro
7494	  TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7495	fi
7496      fi
7497    else
7498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
7499$as_echo "too old; need Tcl version 8.0 or later" >&6; }
7500    fi
7501  fi
7502  if test "$enable_tclinterp" = "dynamic"; then
7503    if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
7504      $as_echo "#define DYNAMIC_TCL 1" >>confdefs.h
7505
7506      TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
7507    fi
7508  fi
7509  if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
7510    as_fn_error $? "could not configure Tcl" "$LINENO" 5
7511  fi
7512fi
7513
7514
7515
7516
7517
7518
7519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
7520$as_echo_n "checking --enable-rubyinterp argument... " >&6; }
7521# Check whether --enable-rubyinterp was given.
7522if test "${enable_rubyinterp+set}" = set; then :
7523  enableval=$enable_rubyinterp;
7524else
7525  enable_rubyinterp="no"
7526fi
7527
7528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
7529$as_echo "$enable_rubyinterp" >&6; }
7530if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
7531  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7532    as_fn_error $? "cannot use Ruby with tiny or small features" "$LINENO" 5
7533  fi
7534
7535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
7536$as_echo_n "checking --with-ruby-command argument... " >&6; }
7537
7538
7539# Check whether --with-ruby-command was given.
7540if test "${with_ruby_command+set}" = set; then :
7541  withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
7542$as_echo "$RUBY_CMD" >&6; }
7543else
7544  RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
7545$as_echo "defaulting to $RUBY_CMD" >&6; }
7546fi
7547
7548  # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
7549set dummy $RUBY_CMD; ac_word=$2
7550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7551$as_echo_n "checking for $ac_word... " >&6; }
7552if ${ac_cv_path_vi_cv_path_ruby+:} false; then :
7553  $as_echo_n "(cached) " >&6
7554else
7555  case $vi_cv_path_ruby in
7556  [\\/]* | ?:[\\/]*)
7557  ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
7558  ;;
7559  *)
7560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7561for as_dir in $PATH
7562do
7563  IFS=$as_save_IFS
7564  test -z "$as_dir" && as_dir=.
7565    for ac_exec_ext in '' $ac_executable_extensions; do
7566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7567    ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext"
7568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7569    break 2
7570  fi
7571done
7572  done
7573IFS=$as_save_IFS
7574
7575  ;;
7576esac
7577fi
7578vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
7579if test -n "$vi_cv_path_ruby"; then
7580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
7581$as_echo "$vi_cv_path_ruby" >&6; }
7582else
7583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7584$as_echo "no" >&6; }
7585fi
7586
7587
7588  if test "X$vi_cv_path_ruby" != "X"; then
7589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
7590$as_echo_n "checking Ruby version... " >&6; }
7591    if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
7592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
7593$as_echo "OK" >&6; }
7594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
7595$as_echo_n "checking Ruby rbconfig... " >&6; }
7596      ruby_rbconfig="RbConfig"
7597      if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
7598	ruby_rbconfig="Config"
7599      fi
7600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
7601$as_echo "$ruby_rbconfig" >&6; }
7602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
7603$as_echo_n "checking Ruby header files... " >&6; }
7604      rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
7605      if test "X$rubyhdrdir" != "X"; then
7606	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
7607$as_echo "$rubyhdrdir" >&6; }
7608	RUBY_CFLAGS="-I$rubyhdrdir"
7609        rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
7610        if test -d "$rubyarchdir"; then
7611          RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
7612        fi
7613        rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
7614	if test "X$rubyversion" = "X"; then
7615	  rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]"`
7616	fi
7617        RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
7618	rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
7619	if test "X$rubylibs" != "X"; then
7620	  RUBY_LIBS="$rubylibs"
7621	fi
7622	librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
7623	librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
7624	rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
7625	if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby"; then
7626	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7627	elif test "$librubyarg" = "libruby.a"; then
7628	  	  librubyarg="-lruby"
7629	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7630	fi
7631
7632	if test "X$librubyarg" != "X"; then
7633	  RUBY_LIBS="$librubyarg $RUBY_LIBS"
7634	fi
7635	rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
7636	if test "X$rubyldflags" != "X"; then
7637	  	  	  	  rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
7638	  if test "X$rubyldflags" != "X"; then
7639	    if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then
7640	      LDFLAGS="$rubyldflags $LDFLAGS"
7641	    fi
7642	  fi
7643	fi
7644	RUBY_SRC="if_ruby.c"
7645	RUBY_OBJ="objects/if_ruby.o"
7646	RUBY_PRO="if_ruby.pro"
7647	$as_echo "#define FEAT_RUBY 1" >>confdefs.h
7648
7649	if test "$enable_rubyinterp" = "dynamic"; then
7650	  libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
7651	  if test -z "$libruby_soname"; then
7652	    libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
7653	  fi
7654	  $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
7655
7656	  RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
7657	  RUBY_LIBS=
7658	fi
7659	if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
7660	  RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
7661	fi
7662      else
7663	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
7664$as_echo "not found; disabling Ruby" >&6; }
7665      fi
7666    else
7667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.6.0 or later" >&5
7668$as_echo "too old; need Ruby version 1.6.0 or later" >&6; }
7669    fi
7670  fi
7671
7672  if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
7673    as_fn_error $? "could not configure Ruby" "$LINENO" 5
7674  fi
7675fi
7676
7677
7678
7679
7680
7681
7682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
7683$as_echo_n "checking --enable-cscope argument... " >&6; }
7684# Check whether --enable-cscope was given.
7685if test "${enable_cscope+set}" = set; then :
7686  enableval=$enable_cscope;
7687else
7688  enable_cscope="no"
7689fi
7690
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
7692$as_echo "$enable_cscope" >&6; }
7693if test "$enable_cscope" = "yes"; then
7694  $as_echo "#define FEAT_CSCOPE 1" >>confdefs.h
7695
7696fi
7697
7698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
7699$as_echo_n "checking --disable-netbeans argument... " >&6; }
7700# Check whether --enable-netbeans was given.
7701if test "${enable_netbeans+set}" = set; then :
7702  enableval=$enable_netbeans;
7703else
7704  enable_netbeans="yes"
7705fi
7706
7707if test "$enable_netbeans" = "yes"; then
7708  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7709    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny or small features" >&5
7710$as_echo "cannot use NetBeans with tiny or small features" >&6; }
7711    enable_netbeans="no"
7712  else
7713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7714$as_echo "no" >&6; }
7715  fi
7716else
7717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7718$as_echo "yes" >&6; }
7719fi
7720
7721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
7722$as_echo_n "checking --disable-channel argument... " >&6; }
7723# Check whether --enable-channel was given.
7724if test "${enable_channel+set}" = set; then :
7725  enableval=$enable_channel;
7726else
7727  enable_channel="yes"
7728fi
7729
7730if test "$enable_channel" = "yes"; then
7731  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny or small features" >&5
7733$as_echo "cannot use channels with tiny or small features" >&6; }
7734    enable_channel="no"
7735  else
7736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737$as_echo "no" >&6; }
7738  fi
7739else
7740  if test "$enable_netbeans" = "yes"; then
7741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
7742$as_echo "yes, netbeans also disabled" >&6; }
7743    enable_netbeans="no"
7744  else
7745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7746$as_echo "yes" >&6; }
7747  fi
7748fi
7749
7750if test "$enable_channel" = "yes"; then
7751    if test "x$HAIKU" = "xyes"; then
7752	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7753$as_echo_n "checking for socket in -lnetwork... " >&6; }
7754if ${ac_cv_lib_network_socket+:} false; then :
7755  $as_echo_n "(cached) " >&6
7756else
7757  ac_check_lib_save_LIBS=$LIBS
7758LIBS="-lnetwork  $LIBS"
7759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7760/* end confdefs.h.  */
7761
7762/* Override any GCC internal prototype to avoid an error.
7763   Use char because int might match the return type of a GCC
7764   builtin and then its argument prototype would still apply.  */
7765#ifdef __cplusplus
7766extern "C"
7767#endif
7768char socket ();
7769int
7770main ()
7771{
7772return socket ();
7773  ;
7774  return 0;
7775}
7776_ACEOF
7777if ac_fn_c_try_link "$LINENO"; then :
7778  ac_cv_lib_network_socket=yes
7779else
7780  ac_cv_lib_network_socket=no
7781fi
7782rm -f core conftest.err conftest.$ac_objext \
7783    conftest$ac_exeext conftest.$ac_ext
7784LIBS=$ac_check_lib_save_LIBS
7785fi
7786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
7787$as_echo "$ac_cv_lib_network_socket" >&6; }
7788if test "x$ac_cv_lib_network_socket" = xyes; then :
7789  cat >>confdefs.h <<_ACEOF
7790#define HAVE_LIBNETWORK 1
7791_ACEOF
7792
7793  LIBS="-lnetwork $LIBS"
7794
7795fi
7796
7797  else
7798	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7799$as_echo_n "checking for socket in -lsocket... " >&6; }
7800if ${ac_cv_lib_socket_socket+:} false; then :
7801  $as_echo_n "(cached) " >&6
7802else
7803  ac_check_lib_save_LIBS=$LIBS
7804LIBS="-lsocket  $LIBS"
7805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7806/* end confdefs.h.  */
7807
7808/* Override any GCC internal prototype to avoid an error.
7809   Use char because int might match the return type of a GCC
7810   builtin and then its argument prototype would still apply.  */
7811#ifdef __cplusplus
7812extern "C"
7813#endif
7814char socket ();
7815int
7816main ()
7817{
7818return socket ();
7819  ;
7820  return 0;
7821}
7822_ACEOF
7823if ac_fn_c_try_link "$LINENO"; then :
7824  ac_cv_lib_socket_socket=yes
7825else
7826  ac_cv_lib_socket_socket=no
7827fi
7828rm -f core conftest.err conftest.$ac_objext \
7829    conftest$ac_exeext conftest.$ac_ext
7830LIBS=$ac_check_lib_save_LIBS
7831fi
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7833$as_echo "$ac_cv_lib_socket_socket" >&6; }
7834if test "x$ac_cv_lib_socket_socket" = xyes; then :
7835  cat >>confdefs.h <<_ACEOF
7836#define HAVE_LIBSOCKET 1
7837_ACEOF
7838
7839  LIBS="-lsocket $LIBS"
7840
7841fi
7842
7843  fi
7844
7845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
7846$as_echo_n "checking whether compiling with IPv6 networking is possible... " >&6; }
7847if ${vim_cv_ipv6_networking+:} false; then :
7848  $as_echo_n "(cached) " >&6
7849else
7850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7851/* end confdefs.h.  */
7852
7853#include <stdio.h>
7854#include <stdlib.h>
7855#include <stdarg.h>
7856#include <fcntl.h>
7857#include <netdb.h>
7858#include <netinet/in.h>
7859#include <errno.h>
7860#include <sys/types.h>
7861#include <sys/socket.h>
7862	/* Check bitfields */
7863	struct nbbuf {
7864	unsigned int  initDone:1;
7865	unsigned short signmaplen;
7866	};
7867
7868int
7869main ()
7870{
7871
7872		/* Check creating a socket. */
7873		struct sockaddr_in server;
7874		struct addrinfo *res;
7875		(void)socket(AF_INET, SOCK_STREAM, 0);
7876		(void)htons(100);
7877		(void)getaddrinfo("microsoft.com", NULL, NULL, &res);
7878		if (errno == ECONNREFUSED)
7879		  (void)connect(1, (struct sockaddr *)&server, sizeof(server));
7880		(void)freeaddrinfo(res);
7881
7882  ;
7883  return 0;
7884}
7885_ACEOF
7886if ac_fn_c_try_link "$LINENO"; then :
7887  vim_cv_ipv6_networking="yes"
7888else
7889  vim_cv_ipv6_networking="no"
7890fi
7891rm -f core conftest.err conftest.$ac_objext \
7892    conftest$ac_exeext conftest.$ac_ext
7893fi
7894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
7895$as_echo "$vim_cv_ipv6_networking" >&6; }
7896
7897  if test "x$vim_cv_ipv6_networking" = "xyes"; then
7898    $as_echo "#define FEAT_IPV6 1" >>confdefs.h
7899
7900    for ac_func in inet_ntop
7901do :
7902  ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
7903if test "x$ac_cv_func_inet_ntop" = xyes; then :
7904  cat >>confdefs.h <<_ACEOF
7905#define HAVE_INET_NTOP 1
7906_ACEOF
7907
7908fi
7909done
7910
7911  else
7912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
7913$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7914if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
7915  $as_echo_n "(cached) " >&6
7916else
7917  ac_check_lib_save_LIBS=$LIBS
7918LIBS="-lnsl  $LIBS"
7919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7920/* end confdefs.h.  */
7921
7922/* Override any GCC internal prototype to avoid an error.
7923   Use char because int might match the return type of a GCC
7924   builtin and then its argument prototype would still apply.  */
7925#ifdef __cplusplus
7926extern "C"
7927#endif
7928char gethostbyname ();
7929int
7930main ()
7931{
7932return gethostbyname ();
7933  ;
7934  return 0;
7935}
7936_ACEOF
7937if ac_fn_c_try_link "$LINENO"; then :
7938  ac_cv_lib_nsl_gethostbyname=yes
7939else
7940  ac_cv_lib_nsl_gethostbyname=no
7941fi
7942rm -f core conftest.err conftest.$ac_objext \
7943    conftest$ac_exeext conftest.$ac_ext
7944LIBS=$ac_check_lib_save_LIBS
7945fi
7946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
7947$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7948if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
7949  cat >>confdefs.h <<_ACEOF
7950#define HAVE_LIBNSL 1
7951_ACEOF
7952
7953  LIBS="-lnsl $LIBS"
7954
7955fi
7956
7957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
7958$as_echo_n "checking whether compiling with IPv4 networking is possible... " >&6; }
7959if ${vim_cv_ipv4_networking+:} false; then :
7960  $as_echo_n "(cached) " >&6
7961else
7962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7963/* end confdefs.h.  */
7964
7965#include <stdio.h>
7966#include <stdlib.h>
7967#include <stdarg.h>
7968#include <fcntl.h>
7969#include <netdb.h>
7970#include <netinet/in.h>
7971#include <errno.h>
7972#include <sys/types.h>
7973#include <sys/socket.h>
7974	/* Check bitfields */
7975	struct nbbuf {
7976	unsigned int  initDone:1;
7977	unsigned short signmaplen;
7978	};
7979
7980int
7981main ()
7982{
7983
7984		/* Check creating a socket. */
7985		struct sockaddr_in server;
7986		(void)socket(AF_INET, SOCK_STREAM, 0);
7987		(void)htons(100);
7988		(void)gethostbyname("microsoft.com");
7989		if (errno == ECONNREFUSED)
7990		  (void)connect(1, (struct sockaddr *)&server, sizeof(server));
7991
7992  ;
7993  return 0;
7994}
7995_ACEOF
7996if ac_fn_c_try_link "$LINENO"; then :
7997  vim_cv_ipv4_networking="yes"
7998else
7999  vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
8000fi
8001rm -f core conftest.err conftest.$ac_objext \
8002    conftest$ac_exeext conftest.$ac_ext
8003fi
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8005$as_echo "$vim_cv_ipv4_networking" >&6; }
8006  fi
8007fi
8008if test "$enable_netbeans" = "yes"; then
8009  $as_echo "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
8010
8011  NETBEANS_SRC="netbeans.c"
8012
8013  NETBEANS_OBJ="objects/netbeans.o"
8014
8015fi
8016if test "$enable_channel" = "yes"; then
8017  $as_echo "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
8018
8019  CHANNEL_SRC="job.c channel.c"
8020
8021  CHANNEL_OBJ="objects/job.o objects/channel.o"
8022
8023fi
8024
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8026$as_echo_n "checking --enable-terminal argument... " >&6; }
8027# Check whether --enable-terminal was given.
8028if test "${enable_terminal+set}" = set; then :
8029  enableval=$enable_terminal;
8030else
8031  enable_terminal="auto"
8032fi
8033
8034if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
8035  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
8036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny or small features" >&5
8037$as_echo "cannot use terminal emulator with tiny or small features" >&6; }
8038    enable_terminal="no"
8039  else
8040    if test "$enable_terminal" = "auto"; then
8041      enable_terminal="yes"
8042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8043$as_echo "defaulting to yes" >&6; }
8044    else
8045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8046$as_echo "yes" >&6; }
8047    fi
8048  fi
8049else
8050  if test "$enable_terminal" = "auto"; then
8051    enable_terminal="no"
8052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8053$as_echo "defaulting to no" >&6; }
8054  else
8055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
8057  fi
8058fi
8059if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
8060  $as_echo "#define FEAT_TERMINAL 1" >>confdefs.h
8061
8062  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"
8063
8064  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"
8065
8066  TERM_TEST="test_libvterm"
8067
8068fi
8069
8070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8071$as_echo_n "checking --enable-autoservername argument... " >&6; }
8072# Check whether --enable-autoservername was given.
8073if test "${enable_autoservername+set}" = set; then :
8074  enableval=$enable_autoservername;
8075else
8076  enable_autoservername="no"
8077fi
8078
8079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8080$as_echo "$enable_autoservername" >&6; }
8081if test "$enable_autoservername" = "yes"; then
8082  $as_echo "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
8083
8084fi
8085
8086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8087$as_echo_n "checking --enable-multibyte argument... " >&6; }
8088# Check whether --enable-multibyte was given.
8089if test "${enable_multibyte+set}" = set; then :
8090  enableval=$enable_multibyte;
8091else
8092  enable_multibyte="yes"
8093fi
8094
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8096$as_echo "$enable_multibyte" >&6; }
8097if test "$enable_multibyte" != "yes"; then
8098  as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8099		a problem with this, discuss on the Vim mailing list." "$LINENO" 5
8100fi
8101
8102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8103$as_echo_n "checking --disable-rightleft argument... " >&6; }
8104# Check whether --enable-rightleft was given.
8105if test "${enable_rightleft+set}" = set; then :
8106  enableval=$enable_rightleft;
8107else
8108  enable_rightleft="yes"
8109fi
8110
8111if test "$enable_rightleft" = "yes"; then
8112	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8113$as_echo "no" >&6; }
8114else
8115	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8116$as_echo "yes" >&6; }
8117	$as_echo "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
8118
8119fi
8120
8121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8122$as_echo_n "checking --disable-arabic argument... " >&6; }
8123# Check whether --enable-arabic was given.
8124if test "${enable_arabic+set}" = set; then :
8125  enableval=$enable_arabic;
8126else
8127  enable_arabic="yes"
8128fi
8129
8130if test "$enable_arabic" = "yes"; then
8131	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8132$as_echo "no" >&6; }
8133else
8134	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8135$as_echo "yes" >&6; }
8136	$as_echo "#define DISABLE_ARABIC 1" >>confdefs.h
8137
8138fi
8139
8140# Check whether --enable-farsi was given.
8141if test "${enable_farsi+set}" = set; then :
8142  enableval=$enable_farsi;
8143fi
8144
8145
8146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8147$as_echo_n "checking --enable-xim argument... " >&6; }
8148# Check whether --enable-xim was given.
8149if test "${enable_xim+set}" = set; then :
8150  enableval=$enable_xim; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8151$as_echo "$enable_xim" >&6; }
8152else
8153  enable_xim="auto"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8154$as_echo "defaulting to auto" >&6; }
8155fi
8156
8157
8158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8159$as_echo_n "checking --enable-fontset argument... " >&6; }
8160# Check whether --enable-fontset was given.
8161if test "${enable_fontset+set}" = set; then :
8162  enableval=$enable_fontset;
8163else
8164  enable_fontset="no"
8165fi
8166
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8168$as_echo "$enable_fontset" >&6; }
8169
8170test -z "$with_x" && with_x=yes
8171test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
8172if test "$with_x" = no; then
8173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8174$as_echo "defaulting to: don't HAVE_X11" >&6; }
8175else
8176
8177  # Extract the first word of "xmkmf", so it can be a program name with args.
8178set dummy xmkmf; ac_word=$2
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8180$as_echo_n "checking for $ac_word... " >&6; }
8181if ${ac_cv_path_xmkmfpath+:} false; then :
8182  $as_echo_n "(cached) " >&6
8183else
8184  case $xmkmfpath in
8185  [\\/]* | ?:[\\/]*)
8186  ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8187  ;;
8188  *)
8189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8190for as_dir in $PATH
8191do
8192  IFS=$as_save_IFS
8193  test -z "$as_dir" && as_dir=.
8194    for ac_exec_ext in '' $ac_executable_extensions; do
8195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8196    ac_cv_path_xmkmfpath="$as_dir/$ac_word$ac_exec_ext"
8197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8198    break 2
8199  fi
8200done
8201  done
8202IFS=$as_save_IFS
8203
8204  ;;
8205esac
8206fi
8207xmkmfpath=$ac_cv_path_xmkmfpath
8208if test -n "$xmkmfpath"; then
8209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8210$as_echo "$xmkmfpath" >&6; }
8211else
8212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8213$as_echo "no" >&6; }
8214fi
8215
8216
8217
8218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8219$as_echo_n "checking for X... " >&6; }
8220
8221
8222# Check whether --with-x was given.
8223if test "${with_x+set}" = set; then :
8224  withval=$with_x;
8225fi
8226
8227# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8228if test "x$with_x" = xno; then
8229  # The user explicitly disabled X.
8230  have_x=disabled
8231else
8232  case $x_includes,$x_libraries in #(
8233    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
8234    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
8235  $as_echo_n "(cached) " >&6
8236else
8237  # One or both of the vars are not set, and there is no cached value.
8238ac_x_includes=no ac_x_libraries=no
8239rm -f -r conftest.dir
8240if mkdir conftest.dir; then
8241  cd conftest.dir
8242  cat >Imakefile <<'_ACEOF'
8243incroot:
8244	@echo incroot='${INCROOT}'
8245usrlibdir:
8246	@echo usrlibdir='${USRLIBDIR}'
8247libdir:
8248	@echo libdir='${LIBDIR}'
8249_ACEOF
8250  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
8251    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8252    for ac_var in incroot usrlibdir libdir; do
8253      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8254    done
8255    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8256    for ac_extension in a so sl dylib la dll; do
8257      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8258	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
8259	ac_im_usrlibdir=$ac_im_libdir; break
8260      fi
8261    done
8262    # Screen out bogus values from the imake configuration.  They are
8263    # bogus both because they are the default anyway, and because
8264    # using them would break gcc on systems where it needs fixed includes.
8265    case $ac_im_incroot in
8266	/usr/include) ac_x_includes= ;;
8267	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8268    esac
8269    case $ac_im_usrlibdir in
8270	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
8271	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8272    esac
8273  fi
8274  cd ..
8275  rm -f -r conftest.dir
8276fi
8277
8278# Standard set of common directories for X headers.
8279# Check X11 before X11Rn because it is often a symlink to the current release.
8280ac_x_header_dirs='
8281/usr/X11/include
8282/usr/X11R7/include
8283/usr/X11R6/include
8284/usr/X11R5/include
8285/usr/X11R4/include
8286
8287/usr/include/X11
8288/usr/include/X11R7
8289/usr/include/X11R6
8290/usr/include/X11R5
8291/usr/include/X11R4
8292
8293/usr/local/X11/include
8294/usr/local/X11R7/include
8295/usr/local/X11R6/include
8296/usr/local/X11R5/include
8297/usr/local/X11R4/include
8298
8299/usr/local/include/X11
8300/usr/local/include/X11R7
8301/usr/local/include/X11R6
8302/usr/local/include/X11R5
8303/usr/local/include/X11R4
8304
8305/usr/X386/include
8306/usr/x386/include
8307/usr/XFree86/include/X11
8308
8309/usr/include
8310/usr/local/include
8311/usr/unsupported/include
8312/usr/athena/include
8313/usr/local/x11r5/include
8314/usr/lpp/Xamples/include
8315
8316/usr/openwin/include
8317/usr/openwin/share/include'
8318
8319if test "$ac_x_includes" = no; then
8320  # Guess where to find include files, by looking for Xlib.h.
8321  # First, try using that file with no special directory specified.
8322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8323/* end confdefs.h.  */
8324#include <X11/Xlib.h>
8325_ACEOF
8326if ac_fn_c_try_cpp "$LINENO"; then :
8327  # We can compile using X headers with no special include directory.
8328ac_x_includes=
8329else
8330  for ac_dir in $ac_x_header_dirs; do
8331  if test -r "$ac_dir/X11/Xlib.h"; then
8332    ac_x_includes=$ac_dir
8333    break
8334  fi
8335done
8336fi
8337rm -f conftest.err conftest.i conftest.$ac_ext
8338fi # $ac_x_includes = no
8339
8340if test "$ac_x_libraries" = no; then
8341  # Check for the libraries.
8342  # See if we find them without any special options.
8343  # Don't add to $LIBS permanently.
8344  ac_save_LIBS=$LIBS
8345  LIBS="-lX11 $LIBS"
8346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347/* end confdefs.h.  */
8348#include <X11/Xlib.h>
8349int
8350main ()
8351{
8352XrmInitialize ()
8353  ;
8354  return 0;
8355}
8356_ACEOF
8357if ac_fn_c_try_link "$LINENO"; then :
8358  LIBS=$ac_save_LIBS
8359# We can link X programs with no special library path.
8360ac_x_libraries=
8361else
8362  LIBS=$ac_save_LIBS
8363for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8364do
8365  # Don't even attempt the hair of trying to link an X program!
8366  for ac_extension in a so sl dylib la dll; do
8367    if test -r "$ac_dir/libX11.$ac_extension"; then
8368      ac_x_libraries=$ac_dir
8369      break 2
8370    fi
8371  done
8372done
8373fi
8374rm -f core conftest.err conftest.$ac_objext \
8375    conftest$ac_exeext conftest.$ac_ext
8376fi # $ac_x_libraries = no
8377
8378case $ac_x_includes,$ac_x_libraries in #(
8379  no,* | *,no | *\'*)
8380    # Didn't find X, or a directory has "'" in its name.
8381    ac_cv_have_x="have_x=no";; #(
8382  *)
8383    # Record where we found X for the cache.
8384    ac_cv_have_x="have_x=yes\
8385	ac_x_includes='$ac_x_includes'\
8386	ac_x_libraries='$ac_x_libraries'"
8387esac
8388fi
8389;; #(
8390    *) have_x=yes;;
8391  esac
8392  eval "$ac_cv_have_x"
8393fi # $with_x != no
8394
8395if test "$have_x" != yes; then
8396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8397$as_echo "$have_x" >&6; }
8398  no_x=yes
8399else
8400  # If each of the values was on the command line, it overrides each guess.
8401  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8402  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8403  # Update the cache value to reflect the command line values.
8404  ac_cv_have_x="have_x=yes\
8405	ac_x_includes='$x_includes'\
8406	ac_x_libraries='$x_libraries'"
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8408$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
8409fi
8410
8411if test "$no_x" = yes; then
8412  # Not all programs may use this symbol, but it does not hurt to define it.
8413
8414$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
8415
8416  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8417else
8418  if test -n "$x_includes"; then
8419    X_CFLAGS="$X_CFLAGS -I$x_includes"
8420  fi
8421
8422  # It would also be nice to do this for all -L options, not just this one.
8423  if test -n "$x_libraries"; then
8424    X_LIBS="$X_LIBS -L$x_libraries"
8425    # For Solaris; some versions of Sun CC require a space after -R and
8426    # others require no space.  Words are not sufficient . . . .
8427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8428$as_echo_n "checking whether -R must be followed by a space... " >&6; }
8429    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8430    ac_xsave_c_werror_flag=$ac_c_werror_flag
8431    ac_c_werror_flag=yes
8432    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8433/* end confdefs.h.  */
8434
8435int
8436main ()
8437{
8438
8439  ;
8440  return 0;
8441}
8442_ACEOF
8443if ac_fn_c_try_link "$LINENO"; then :
8444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8445$as_echo "no" >&6; }
8446       X_LIBS="$X_LIBS -R$x_libraries"
8447else
8448  LIBS="$ac_xsave_LIBS -R $x_libraries"
8449       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8450/* end confdefs.h.  */
8451
8452int
8453main ()
8454{
8455
8456  ;
8457  return 0;
8458}
8459_ACEOF
8460if ac_fn_c_try_link "$LINENO"; then :
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8462$as_echo "yes" >&6; }
8463	  X_LIBS="$X_LIBS -R $x_libraries"
8464else
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
8466$as_echo "neither works" >&6; }
8467fi
8468rm -f core conftest.err conftest.$ac_objext \
8469    conftest$ac_exeext conftest.$ac_ext
8470fi
8471rm -f core conftest.err conftest.$ac_objext \
8472    conftest$ac_exeext conftest.$ac_ext
8473    ac_c_werror_flag=$ac_xsave_c_werror_flag
8474    LIBS=$ac_xsave_LIBS
8475  fi
8476
8477  # Check for system-dependent libraries X programs must link with.
8478  # Do this before checking for the system-independent R6 libraries
8479  # (-lICE), since we may need -lsocket or whatever for X linking.
8480
8481  if test "$ISC" = yes; then
8482    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8483  else
8484    # Martyn Johnson says this is needed for Ultrix, if the X
8485    # libraries were built with DECnet support.  And Karl Berry says
8486    # the Alpha needs dnet_stub (dnet does not exist).
8487    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8488    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8489/* end confdefs.h.  */
8490
8491/* Override any GCC internal prototype to avoid an error.
8492   Use char because int might match the return type of a GCC
8493   builtin and then its argument prototype would still apply.  */
8494#ifdef __cplusplus
8495extern "C"
8496#endif
8497char XOpenDisplay ();
8498int
8499main ()
8500{
8501return XOpenDisplay ();
8502  ;
8503  return 0;
8504}
8505_ACEOF
8506if ac_fn_c_try_link "$LINENO"; then :
8507
8508else
8509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
8510$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
8511if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
8512  $as_echo_n "(cached) " >&6
8513else
8514  ac_check_lib_save_LIBS=$LIBS
8515LIBS="-ldnet  $LIBS"
8516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8517/* end confdefs.h.  */
8518
8519/* Override any GCC internal prototype to avoid an error.
8520   Use char because int might match the return type of a GCC
8521   builtin and then its argument prototype would still apply.  */
8522#ifdef __cplusplus
8523extern "C"
8524#endif
8525char dnet_ntoa ();
8526int
8527main ()
8528{
8529return dnet_ntoa ();
8530  ;
8531  return 0;
8532}
8533_ACEOF
8534if ac_fn_c_try_link "$LINENO"; then :
8535  ac_cv_lib_dnet_dnet_ntoa=yes
8536else
8537  ac_cv_lib_dnet_dnet_ntoa=no
8538fi
8539rm -f core conftest.err conftest.$ac_objext \
8540    conftest$ac_exeext conftest.$ac_ext
8541LIBS=$ac_check_lib_save_LIBS
8542fi
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8544$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
8545if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
8546  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8547fi
8548
8549    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8550      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
8551$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
8552if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
8553  $as_echo_n "(cached) " >&6
8554else
8555  ac_check_lib_save_LIBS=$LIBS
8556LIBS="-ldnet_stub  $LIBS"
8557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8558/* end confdefs.h.  */
8559
8560/* Override any GCC internal prototype to avoid an error.
8561   Use char because int might match the return type of a GCC
8562   builtin and then its argument prototype would still apply.  */
8563#ifdef __cplusplus
8564extern "C"
8565#endif
8566char dnet_ntoa ();
8567int
8568main ()
8569{
8570return dnet_ntoa ();
8571  ;
8572  return 0;
8573}
8574_ACEOF
8575if ac_fn_c_try_link "$LINENO"; then :
8576  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8577else
8578  ac_cv_lib_dnet_stub_dnet_ntoa=no
8579fi
8580rm -f core conftest.err conftest.$ac_objext \
8581    conftest$ac_exeext conftest.$ac_ext
8582LIBS=$ac_check_lib_save_LIBS
8583fi
8584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8585$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
8586if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
8587  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8588fi
8589
8590    fi
8591fi
8592rm -f core conftest.err conftest.$ac_objext \
8593    conftest$ac_exeext conftest.$ac_ext
8594    LIBS="$ac_xsave_LIBS"
8595
8596    # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
8597    # to get the SysV transport functions.
8598    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8599    # needs -lnsl.
8600    # The nsl library prevents programs from opening the X display
8601    # on Irix 5.2, according to T.E. Dickey.
8602    # The functions gethostbyname, getservbyname, and inet_addr are
8603    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8604    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
8605if test "x$ac_cv_func_gethostbyname" = xyes; then :
8606
8607fi
8608
8609    if test $ac_cv_func_gethostbyname = no; then
8610      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8611$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
8612if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
8613  $as_echo_n "(cached) " >&6
8614else
8615  ac_check_lib_save_LIBS=$LIBS
8616LIBS="-lnsl  $LIBS"
8617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8618/* end confdefs.h.  */
8619
8620/* Override any GCC internal prototype to avoid an error.
8621   Use char because int might match the return type of a GCC
8622   builtin and then its argument prototype would still apply.  */
8623#ifdef __cplusplus
8624extern "C"
8625#endif
8626char gethostbyname ();
8627int
8628main ()
8629{
8630return gethostbyname ();
8631  ;
8632  return 0;
8633}
8634_ACEOF
8635if ac_fn_c_try_link "$LINENO"; then :
8636  ac_cv_lib_nsl_gethostbyname=yes
8637else
8638  ac_cv_lib_nsl_gethostbyname=no
8639fi
8640rm -f core conftest.err conftest.$ac_objext \
8641    conftest$ac_exeext conftest.$ac_ext
8642LIBS=$ac_check_lib_save_LIBS
8643fi
8644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8645$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
8646if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
8647  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
8648fi
8649
8650      if test $ac_cv_lib_nsl_gethostbyname = no; then
8651	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
8652$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
8653if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
8654  $as_echo_n "(cached) " >&6
8655else
8656  ac_check_lib_save_LIBS=$LIBS
8657LIBS="-lbsd  $LIBS"
8658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8659/* end confdefs.h.  */
8660
8661/* Override any GCC internal prototype to avoid an error.
8662   Use char because int might match the return type of a GCC
8663   builtin and then its argument prototype would still apply.  */
8664#ifdef __cplusplus
8665extern "C"
8666#endif
8667char gethostbyname ();
8668int
8669main ()
8670{
8671return gethostbyname ();
8672  ;
8673  return 0;
8674}
8675_ACEOF
8676if ac_fn_c_try_link "$LINENO"; then :
8677  ac_cv_lib_bsd_gethostbyname=yes
8678else
8679  ac_cv_lib_bsd_gethostbyname=no
8680fi
8681rm -f core conftest.err conftest.$ac_objext \
8682    conftest$ac_exeext conftest.$ac_ext
8683LIBS=$ac_check_lib_save_LIBS
8684fi
8685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
8686$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
8687if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
8688  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8689fi
8690
8691      fi
8692    fi
8693
8694    # [email protected] says without -lsocket,
8695    # socket/setsockopt and other routines are undefined under SCO ODT
8696    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8697    # on later versions), says Simon Leinen: it contains gethostby*
8698    # variants that don't use the name server (or something).  -lsocket
8699    # must be given before -lnsl if both are needed.  We assume that
8700    # if connect needs -lnsl, so does gethostbyname.
8701    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
8702if test "x$ac_cv_func_connect" = xyes; then :
8703
8704fi
8705
8706    if test $ac_cv_func_connect = no; then
8707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
8708$as_echo_n "checking for connect in -lsocket... " >&6; }
8709if ${ac_cv_lib_socket_connect+:} false; then :
8710  $as_echo_n "(cached) " >&6
8711else
8712  ac_check_lib_save_LIBS=$LIBS
8713LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8715/* end confdefs.h.  */
8716
8717/* Override any GCC internal prototype to avoid an error.
8718   Use char because int might match the return type of a GCC
8719   builtin and then its argument prototype would still apply.  */
8720#ifdef __cplusplus
8721extern "C"
8722#endif
8723char connect ();
8724int
8725main ()
8726{
8727return connect ();
8728  ;
8729  return 0;
8730}
8731_ACEOF
8732if ac_fn_c_try_link "$LINENO"; then :
8733  ac_cv_lib_socket_connect=yes
8734else
8735  ac_cv_lib_socket_connect=no
8736fi
8737rm -f core conftest.err conftest.$ac_objext \
8738    conftest$ac_exeext conftest.$ac_ext
8739LIBS=$ac_check_lib_save_LIBS
8740fi
8741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
8742$as_echo "$ac_cv_lib_socket_connect" >&6; }
8743if test "x$ac_cv_lib_socket_connect" = xyes; then :
8744  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8745fi
8746
8747    fi
8748
8749    # Guillermo Gomez says -lposix is necessary on A/UX.
8750    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
8751if test "x$ac_cv_func_remove" = xyes; then :
8752
8753fi
8754
8755    if test $ac_cv_func_remove = no; then
8756      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
8757$as_echo_n "checking for remove in -lposix... " >&6; }
8758if ${ac_cv_lib_posix_remove+:} false; then :
8759  $as_echo_n "(cached) " >&6
8760else
8761  ac_check_lib_save_LIBS=$LIBS
8762LIBS="-lposix  $LIBS"
8763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8764/* end confdefs.h.  */
8765
8766/* Override any GCC internal prototype to avoid an error.
8767   Use char because int might match the return type of a GCC
8768   builtin and then its argument prototype would still apply.  */
8769#ifdef __cplusplus
8770extern "C"
8771#endif
8772char remove ();
8773int
8774main ()
8775{
8776return remove ();
8777  ;
8778  return 0;
8779}
8780_ACEOF
8781if ac_fn_c_try_link "$LINENO"; then :
8782  ac_cv_lib_posix_remove=yes
8783else
8784  ac_cv_lib_posix_remove=no
8785fi
8786rm -f core conftest.err conftest.$ac_objext \
8787    conftest$ac_exeext conftest.$ac_ext
8788LIBS=$ac_check_lib_save_LIBS
8789fi
8790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
8791$as_echo "$ac_cv_lib_posix_remove" >&6; }
8792if test "x$ac_cv_lib_posix_remove" = xyes; then :
8793  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8794fi
8795
8796    fi
8797
8798    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8799    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
8800if test "x$ac_cv_func_shmat" = xyes; then :
8801
8802fi
8803
8804    if test $ac_cv_func_shmat = no; then
8805      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
8806$as_echo_n "checking for shmat in -lipc... " >&6; }
8807if ${ac_cv_lib_ipc_shmat+:} false; then :
8808  $as_echo_n "(cached) " >&6
8809else
8810  ac_check_lib_save_LIBS=$LIBS
8811LIBS="-lipc  $LIBS"
8812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8813/* end confdefs.h.  */
8814
8815/* Override any GCC internal prototype to avoid an error.
8816   Use char because int might match the return type of a GCC
8817   builtin and then its argument prototype would still apply.  */
8818#ifdef __cplusplus
8819extern "C"
8820#endif
8821char shmat ();
8822int
8823main ()
8824{
8825return shmat ();
8826  ;
8827  return 0;
8828}
8829_ACEOF
8830if ac_fn_c_try_link "$LINENO"; then :
8831  ac_cv_lib_ipc_shmat=yes
8832else
8833  ac_cv_lib_ipc_shmat=no
8834fi
8835rm -f core conftest.err conftest.$ac_objext \
8836    conftest$ac_exeext conftest.$ac_ext
8837LIBS=$ac_check_lib_save_LIBS
8838fi
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
8840$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
8841if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
8842  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8843fi
8844
8845    fi
8846  fi
8847
8848  # Check for libraries that X11R6 Xt/Xaw programs need.
8849  ac_save_LDFLAGS=$LDFLAGS
8850  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8851  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8852  # check for ICE first), but we must link in the order -lSM -lICE or
8853  # we get undefined symbols.  So assume we have SM if we have ICE.
8854  # These have to be linked with before -lX11, unlike the other
8855  # libraries we check for below, so use a different variable.
8856  # John Interrante, Karl Berry
8857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
8858$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
8859if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
8860  $as_echo_n "(cached) " >&6
8861else
8862  ac_check_lib_save_LIBS=$LIBS
8863LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8865/* end confdefs.h.  */
8866
8867/* Override any GCC internal prototype to avoid an error.
8868   Use char because int might match the return type of a GCC
8869   builtin and then its argument prototype would still apply.  */
8870#ifdef __cplusplus
8871extern "C"
8872#endif
8873char IceConnectionNumber ();
8874int
8875main ()
8876{
8877return IceConnectionNumber ();
8878  ;
8879  return 0;
8880}
8881_ACEOF
8882if ac_fn_c_try_link "$LINENO"; then :
8883  ac_cv_lib_ICE_IceConnectionNumber=yes
8884else
8885  ac_cv_lib_ICE_IceConnectionNumber=no
8886fi
8887rm -f core conftest.err conftest.$ac_objext \
8888    conftest$ac_exeext conftest.$ac_ext
8889LIBS=$ac_check_lib_save_LIBS
8890fi
8891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8892$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
8893if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
8894  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8895fi
8896
8897  LDFLAGS=$ac_save_LDFLAGS
8898
8899fi
8900
8901
8902        if test "$zOSUnix" = "yes"; then
8903    CFLAGS="$CFLAGS -W c,dll"
8904    LDFLAGS="$LDFLAGS -W l,dll"
8905    X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
8906  fi
8907
8908
8909  if test -d "$x_includes" && test ! -d "$x_libraries"; then
8910    x_libraries=`echo "$x_includes" | sed s/include/lib/`
8911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
8912$as_echo "Corrected X libraries to $x_libraries" >&6; }
8913    X_LIBS="$X_LIBS -L$x_libraries"
8914    if test "`(uname) 2>/dev/null`" = SunOS &&
8915					 uname -r | grep '^5' >/dev/null; then
8916      X_LIBS="$X_LIBS -R $x_libraries"
8917    fi
8918  fi
8919
8920  if test -d "$x_libraries" && test ! -d "$x_includes"; then
8921    x_includes=`echo "$x_libraries" | sed s/lib/include/`
8922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
8923$as_echo "Corrected X includes to $x_includes" >&6; }
8924    X_CFLAGS="$X_CFLAGS -I$x_includes"
8925  fi
8926
8927    X_CFLAGS="`echo $X_CFLAGS\  | sed 's%-I/usr/include %%'`"
8928    X_LIBS="`echo $X_LIBS\  | sed 's%-L/usr/lib %%'`"
8929    X_LIBS="`echo $X_LIBS\  | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
8930
8931
8932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
8933$as_echo_n "checking if X11 header files can be found... " >&6; }
8934  cflags_save=$CFLAGS
8935  CFLAGS="$CFLAGS $X_CFLAGS"
8936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8937/* end confdefs.h.  */
8938#include <X11/Xlib.h>
8939#include <X11/Intrinsic.h>
8940int
8941main ()
8942{
8943
8944  ;
8945  return 0;
8946}
8947_ACEOF
8948if ac_fn_c_try_compile "$LINENO"; then :
8949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8950$as_echo "yes" >&6; }
8951else
8952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8953$as_echo "no" >&6; }; no_x=yes
8954fi
8955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8956  CFLAGS=$cflags_save
8957
8958  if test "${no_x-no}" = yes; then
8959    with_x=no
8960  else
8961    $as_echo "#define HAVE_X11 1" >>confdefs.h
8962
8963    X_LIB="-lXt -lX11";
8964
8965
8966    ac_save_LDFLAGS="$LDFLAGS"
8967    LDFLAGS="-L$x_libraries $LDFLAGS"
8968
8969            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
8970$as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
8971if ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+:} false; then :
8972  $as_echo_n "(cached) " >&6
8973else
8974  ac_check_lib_save_LIBS=$LIBS
8975LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
8976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8977/* end confdefs.h.  */
8978
8979/* Override any GCC internal prototype to avoid an error.
8980   Use char because int might match the return type of a GCC
8981   builtin and then its argument prototype would still apply.  */
8982#ifdef __cplusplus
8983extern "C"
8984#endif
8985char _XdmcpAuthDoIt ();
8986int
8987main ()
8988{
8989return _XdmcpAuthDoIt ();
8990  ;
8991  return 0;
8992}
8993_ACEOF
8994if ac_fn_c_try_link "$LINENO"; then :
8995  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
8996else
8997  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
8998fi
8999rm -f core conftest.err conftest.$ac_objext \
9000    conftest$ac_exeext conftest.$ac_ext
9001LIBS=$ac_check_lib_save_LIBS
9002fi
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9004$as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9005if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes; then :
9006  X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
9007fi
9008
9009
9010                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9011$as_echo_n "checking for IceOpenConnection in -lICE... " >&6; }
9012if ${ac_cv_lib_ICE_IceOpenConnection+:} false; then :
9013  $as_echo_n "(cached) " >&6
9014else
9015  ac_check_lib_save_LIBS=$LIBS
9016LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9018/* end confdefs.h.  */
9019
9020/* Override any GCC internal prototype to avoid an error.
9021   Use char because int might match the return type of a GCC
9022   builtin and then its argument prototype would still apply.  */
9023#ifdef __cplusplus
9024extern "C"
9025#endif
9026char IceOpenConnection ();
9027int
9028main ()
9029{
9030return IceOpenConnection ();
9031  ;
9032  return 0;
9033}
9034_ACEOF
9035if ac_fn_c_try_link "$LINENO"; then :
9036  ac_cv_lib_ICE_IceOpenConnection=yes
9037else
9038  ac_cv_lib_ICE_IceOpenConnection=no
9039fi
9040rm -f core conftest.err conftest.$ac_objext \
9041    conftest$ac_exeext conftest.$ac_ext
9042LIBS=$ac_check_lib_save_LIBS
9043fi
9044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
9045$as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9046if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes; then :
9047  X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
9048fi
9049
9050
9051        LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
9052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9053$as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9054if ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+:} false; then :
9055  $as_echo_n "(cached) " >&6
9056else
9057  ac_check_lib_save_LIBS=$LIBS
9058LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
9059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9060/* end confdefs.h.  */
9061
9062/* Override any GCC internal prototype to avoid an error.
9063   Use char because int might match the return type of a GCC
9064   builtin and then its argument prototype would still apply.  */
9065#ifdef __cplusplus
9066extern "C"
9067#endif
9068char XpmCreatePixmapFromData ();
9069int
9070main ()
9071{
9072return XpmCreatePixmapFromData ();
9073  ;
9074  return 0;
9075}
9076_ACEOF
9077if ac_fn_c_try_link "$LINENO"; then :
9078  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
9079else
9080  ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
9081fi
9082rm -f core conftest.err conftest.$ac_objext \
9083    conftest$ac_exeext conftest.$ac_ext
9084LIBS=$ac_check_lib_save_LIBS
9085fi
9086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9087$as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9088if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes; then :
9089  X_PRE_LIBS="$X_PRE_LIBS -lXpm"
9090fi
9091
9092
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9094$as_echo_n "checking if X11 header files implicitly declare return values... " >&6; }
9095    cflags_save=$CFLAGS
9096        if test "$GCC" = yes; then
9097      CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9098    else
9099      CFLAGS="$CFLAGS $X_CFLAGS"
9100    fi
9101    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9102/* end confdefs.h.  */
9103#include <X11/Xlib.h>
9104int
9105main ()
9106{
9107
9108  ;
9109  return 0;
9110}
9111_ACEOF
9112if ac_fn_c_try_compile "$LINENO"; then :
9113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9114$as_echo "no" >&6; }
9115else
9116  CFLAGS="$CFLAGS -Wno-implicit-int"
9117	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9118/* end confdefs.h.  */
9119#include <X11/Xlib.h>
9120int
9121main ()
9122{
9123
9124  ;
9125  return 0;
9126}
9127_ACEOF
9128if ac_fn_c_try_compile "$LINENO"; then :
9129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9130$as_echo "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9131else
9132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9133$as_echo "test failed" >&6; }
9134
9135fi
9136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9137
9138fi
9139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9140    CFLAGS=$cflags_save
9141
9142    LDFLAGS="$ac_save_LDFLAGS"
9143
9144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5
9145$as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
9146    if ${ac_cv_small_wchar_t+:} false; then :
9147  $as_echo_n "(cached) " >&6
9148else
9149  if test "$cross_compiling" = yes; then :
9150  as_fn_error $? "failed to compile test program" "$LINENO" 5
9151else
9152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9153/* end confdefs.h.  */
9154
9155#include <X11/Xlib.h>
9156#if STDC_HEADERS
9157# include <stdlib.h>
9158# include <stddef.h>
9159#endif
9160		main()
9161		{
9162		  if (sizeof(wchar_t) <= 2)
9163		    exit(1);
9164		  exit(0);
9165		}
9166_ACEOF
9167if ac_fn_c_try_run "$LINENO"; then :
9168  ac_cv_small_wchar_t="no"
9169else
9170  ac_cv_small_wchar_t="yes"
9171fi
9172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9173  conftest.$ac_objext conftest.beam conftest.$ac_ext
9174fi
9175
9176fi
9177
9178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_small_wchar_t" >&5
9179$as_echo "$ac_cv_small_wchar_t" >&6; }
9180    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
9181      $as_echo "#define SMALL_WCHAR_T 1" >>confdefs.h
9182
9183    fi
9184
9185  fi
9186fi
9187
9188if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9189    as_fn_error $? "could not configure X" "$LINENO" 5
9190fi
9191
9192test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
9193
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9195$as_echo_n "checking --enable-gui argument... " >&6; }
9196# Check whether --enable-gui was given.
9197if test "${enable_gui+set}" = set; then :
9198  enableval=$enable_gui;
9199else
9200  enable_gui="auto"
9201fi
9202
9203
9204enable_gui_canon=`echo "_$enable_gui" | \
9205	sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9206
9207SKIP_GTK2=YES
9208SKIP_GTK3=YES
9209SKIP_GNOME=YES
9210SKIP_MOTIF=YES
9211SKIP_ATHENA=YES
9212SKIP_NEXTAW=YES
9213SKIP_PHOTON=YES
9214SKIP_HAIKU=YES
9215GUITYPE=NONE
9216
9217if test "x$HAIKU" = "xyes"; then
9218  SKIP_HAIKU=
9219  case "$enable_gui_canon" in
9220    no)     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9221$as_echo "no GUI support" >&6; }
9222            SKIP_HAIKU=YES ;;
9223    yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9224$as_echo "yes - automatic GUI support" >&6; } ;;
9225    auto)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9226$as_echo "auto - automatic GUI support" >&6; } ;;
9227    haiku)  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9228$as_echo "Haiku GUI support" >&6; } ;;
9229    *)      { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9230$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
9231            SKIP_HAIKU=YES ;;
9232    esac
9233elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
9234  SKIP_PHOTON=
9235  case "$enable_gui_canon" in
9236    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9237$as_echo "no GUI support" >&6; }
9238		SKIP_PHOTON=YES ;;
9239    yes|""|auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9240$as_echo "automatic GUI support" >&6; }
9241    		gui_auto=yes ;;
9242    photon)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9243$as_echo "Photon GUI support" >&6; } ;;
9244    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9245$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
9246		SKIP_PHOTON=YES ;;
9247  esac
9248
9249elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9250  case "$enable_gui_canon" in
9251    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9252$as_echo "no GUI support" >&6; } ;;
9253    yes|"")	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9254$as_echo "yes - automatic GUI support" >&6; }
9255    		gui_auto=yes ;;
9256    auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9257$as_echo "auto - disable GUI support for Mac OS" >&6; } ;;
9258    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9259$as_echo "Sorry, $enable_gui GUI is not supported" >&6; } ;;
9260  esac
9261else
9262
9263  case "$enable_gui_canon" in
9264    no|none)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9265$as_echo "no GUI support" >&6; } ;;
9266    yes|""|auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9267$as_echo "yes/auto - automatic GUI support" >&6; }
9268		gui_auto=yes
9269		SKIP_GTK2=
9270		SKIP_GTK3=
9271		SKIP_GNOME=
9272		SKIP_MOTIF=
9273		SKIP_ATHENA=
9274		SKIP_NEXTAW=;;
9275    gtk2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9276$as_echo "GTK+ 2.x GUI support" >&6; }
9277		SKIP_GTK2=;;
9278    gnome2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9279$as_echo "GNOME 2.x GUI support" >&6; }
9280		SKIP_GNOME=
9281		SKIP_GTK2=;;
9282    gtk3)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9283$as_echo "GTK+ 3.x GUI support" >&6; }
9284		SKIP_GTK3=;;
9285    motif)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9286$as_echo "Motif GUI support" >&6; }
9287		SKIP_MOTIF=;;
9288    athena)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Athena GUI support" >&5
9289$as_echo "Athena GUI support" >&6; }
9290		SKIP_ATHENA=;;
9291    nextaw)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: neXtaw GUI support" >&5
9292$as_echo "neXtaw GUI support" >&6; }
9293		SKIP_NEXTAW=;;
9294    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9295$as_echo "Sorry, $enable_gui GUI is not supported" >&6; } ;;
9296  esac
9297
9298fi
9299
9300if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9301				-a "$enable_gui_canon" != "gnome2"; then
9302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9303$as_echo_n "checking whether or not to look for GTK+ 2... " >&6; }
9304  # Check whether --enable-gtk2-check was given.
9305if test "${enable_gtk2_check+set}" = set; then :
9306  enableval=$enable_gtk2_check;
9307else
9308  enable_gtk2_check="yes"
9309fi
9310
9311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9312$as_echo "$enable_gtk2_check" >&6; }
9313  if test "x$enable_gtk2_check" = "xno"; then
9314    SKIP_GTK2=YES
9315    SKIP_GNOME=YES
9316  fi
9317fi
9318
9319if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
9320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9321$as_echo_n "checking whether or not to look for GNOME... " >&6; }
9322  # Check whether --enable-gnome-check was given.
9323if test "${enable_gnome_check+set}" = set; then :
9324  enableval=$enable_gnome_check;
9325else
9326  enable_gnome_check="no"
9327fi
9328
9329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9330$as_echo "$enable_gnome_check" >&6; }
9331  if test "x$enable_gnome_check" = "xno"; then
9332    SKIP_GNOME=YES
9333  fi
9334fi
9335
9336if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9338$as_echo_n "checking whether or not to look for GTK+ 3... " >&6; }
9339  # Check whether --enable-gtk3-check was given.
9340if test "${enable_gtk3_check+set}" = set; then :
9341  enableval=$enable_gtk3_check;
9342else
9343  enable_gtk3_check="yes"
9344fi
9345
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9347$as_echo "$enable_gtk3_check" >&6; }
9348  if test "x$enable_gtk3_check" = "xno"; then
9349    SKIP_GTK3=YES
9350  fi
9351fi
9352
9353if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
9354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9355$as_echo_n "checking whether or not to look for Motif... " >&6; }
9356  # Check whether --enable-motif-check was given.
9357if test "${enable_motif_check+set}" = set; then :
9358  enableval=$enable_motif_check;
9359else
9360  enable_motif_check="yes"
9361fi
9362
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9364$as_echo "$enable_motif_check" >&6; }
9365  if test "x$enable_motif_check" = "xno"; then
9366    SKIP_MOTIF=YES
9367  fi
9368fi
9369
9370if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
9371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Athena" >&5
9372$as_echo_n "checking whether or not to look for Athena... " >&6; }
9373  # Check whether --enable-athena-check was given.
9374if test "${enable_athena_check+set}" = set; then :
9375  enableval=$enable_athena_check;
9376else
9377  enable_athena_check="yes"
9378fi
9379
9380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_athena_check" >&5
9381$as_echo "$enable_athena_check" >&6; }
9382  if test "x$enable_athena_check" = "xno"; then
9383    SKIP_ATHENA=YES
9384  fi
9385fi
9386
9387if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
9388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for neXtaw" >&5
9389$as_echo_n "checking whether or not to look for neXtaw... " >&6; }
9390  # Check whether --enable-nextaw-check was given.
9391if test "${enable_nextaw_check+set}" = set; then :
9392  enableval=$enable_nextaw_check;
9393else
9394  enable_nextaw_check="yes"
9395fi
9396
9397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nextaw_check" >&5
9398$as_echo "$enable_nextaw_check" >&6; };
9399  if test "x$enable_nextaw_check" = "xno"; then
9400    SKIP_NEXTAW=YES
9401  fi
9402fi
9403
9404
9405
9406
9407
9408
9409
9410if test "X$PKG_CONFIG" = "X"; then
9411  if test -n "$ac_tool_prefix"; then
9412  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9413set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9415$as_echo_n "checking for $ac_word... " >&6; }
9416if ${ac_cv_path_PKG_CONFIG+:} false; then :
9417  $as_echo_n "(cached) " >&6
9418else
9419  case $PKG_CONFIG in
9420  [\\/]* | ?:[\\/]*)
9421  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9422  ;;
9423  *)
9424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9425for as_dir in $PATH
9426do
9427  IFS=$as_save_IFS
9428  test -z "$as_dir" && as_dir=.
9429    for ac_exec_ext in '' $ac_executable_extensions; do
9430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9431    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9433    break 2
9434  fi
9435done
9436  done
9437IFS=$as_save_IFS
9438
9439  ;;
9440esac
9441fi
9442PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9443if test -n "$PKG_CONFIG"; then
9444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9445$as_echo "$PKG_CONFIG" >&6; }
9446else
9447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9448$as_echo "no" >&6; }
9449fi
9450
9451
9452fi
9453if test -z "$ac_cv_path_PKG_CONFIG"; then
9454  ac_pt_PKG_CONFIG=$PKG_CONFIG
9455  # Extract the first word of "pkg-config", so it can be a program name with args.
9456set dummy pkg-config; ac_word=$2
9457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9458$as_echo_n "checking for $ac_word... " >&6; }
9459if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9460  $as_echo_n "(cached) " >&6
9461else
9462  case $ac_pt_PKG_CONFIG in
9463  [\\/]* | ?:[\\/]*)
9464  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9465  ;;
9466  *)
9467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9468for as_dir in $PATH
9469do
9470  IFS=$as_save_IFS
9471  test -z "$as_dir" && as_dir=.
9472    for ac_exec_ext in '' $ac_executable_extensions; do
9473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9474    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9476    break 2
9477  fi
9478done
9479  done
9480IFS=$as_save_IFS
9481
9482  ;;
9483esac
9484fi
9485ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9486if test -n "$ac_pt_PKG_CONFIG"; then
9487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9488$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9489else
9490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9491$as_echo "no" >&6; }
9492fi
9493
9494  if test "x$ac_pt_PKG_CONFIG" = x; then
9495    PKG_CONFIG="no"
9496  else
9497    case $cross_compiling:$ac_tool_warned in
9498yes:)
9499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9501ac_tool_warned=yes ;;
9502esac
9503    PKG_CONFIG=$ac_pt_PKG_CONFIG
9504  fi
9505else
9506  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9507fi
9508
9509fi
9510
9511
9512if test -z "$SKIP_GTK2"; then
9513
9514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9515$as_echo_n "checking --disable-gtktest argument... " >&6; }
9516  # Check whether --enable-gtktest was given.
9517if test "${enable_gtktest+set}" = set; then :
9518  enableval=$enable_gtktest;
9519else
9520  enable_gtktest=yes
9521fi
9522
9523  if test "x$enable_gtktest" = "xyes" ; then
9524    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9525$as_echo "gtk test enabled" >&6; }
9526  else
9527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9528$as_echo "gtk test disabled" >&6; }
9529  fi
9530
9531  if test "x$PKG_CONFIG" != "xno"; then
9532                    save_skip_gtk3=$SKIP_GTK3
9533    SKIP_GTK3=YES
9534
9535  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
9536  {
9537    no_gtk=""
9538    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9539	  && $PKG_CONFIG --exists gtk+-2.0; then
9540    {
9541      min_gtk_version=2.2.0
9542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9543$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9544                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
9545      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
9546      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
9547      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9548	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9549      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9550	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9551      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9552	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9553    }
9554    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9555	  && $PKG_CONFIG --exists gtk+-3.0; then
9556    {
9557      min_gtk_version=2.2.0
9558      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9559$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9560
9561      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
9562      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
9563      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
9564      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9565	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9566      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9567	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9568      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9569	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9570    }
9571    else
9572                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
9573$as_echo_n "checking for GTK -dev package... " >&6; }
9574      no_gtk=yes
9575    fi
9576
9577    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
9578    {
9579      ac_save_CFLAGS="$CFLAGS"
9580      ac_save_LIBS="$LIBS"
9581      CFLAGS="$CFLAGS $GTK_CFLAGS"
9582      LIBS="$LIBS $GTK_LIBS"
9583
9584                        rm -f conf.gtktest
9585      if test "$cross_compiling" = yes; then :
9586  echo $ac_n "cross compiling; assumed OK... $ac_c"
9587else
9588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9589/* end confdefs.h.  */
9590
9591#include <gtk/gtk.h>
9592#include <stdio.h>
9593#if STDC_HEADERS
9594# include <stdlib.h>
9595# include <stddef.h>
9596#endif
9597
9598int
9599main ()
9600{
9601int major, minor, micro;
9602char *tmp_version;
9603
9604system ("touch conf.gtktest");
9605
9606/* HP/UX 9 (%@#!) writes to sscanf strings */
9607tmp_version = g_strdup("$min_gtk_version");
9608if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
9609   printf("%s, bad version string\n", "$min_gtk_version");
9610   exit(1);
9611 }
9612
9613if ((gtk_major_version > major) ||
9614    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
9615    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
9616				     (gtk_micro_version >= micro)))
9617{
9618    return 0;
9619}
9620return 1;
9621}
9622
9623_ACEOF
9624if ac_fn_c_try_run "$LINENO"; then :
9625
9626else
9627  no_gtk=yes
9628fi
9629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9630  conftest.$ac_objext conftest.beam conftest.$ac_ext
9631fi
9632
9633      CFLAGS="$ac_save_CFLAGS"
9634      LIBS="$ac_save_LIBS"
9635    }
9636    fi
9637    if test "x$no_gtk" = x ; then
9638      if test "x$enable_gtktest" = "xyes"; then
9639	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9640$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9641      else
9642	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9643$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9644      fi
9645      GUI_LIB_LOC="$GTK_LIBDIR"
9646		 GTK_LIBNAME="$GTK_LIBS"
9647		GUI_INC_LOC="$GTK_CFLAGS"
9648    else
9649    {
9650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651$as_echo "no" >&6; }
9652      GTK_CFLAGS=""
9653      GTK_LIBS=""
9654      :
9655      if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
9656	as_fn_error $? "could not configure GTK" "$LINENO" 5
9657      fi
9658    }
9659    fi
9660  }
9661  else
9662    GTK_CFLAGS=""
9663    GTK_LIBS=""
9664    :
9665  fi
9666
9667
9668  rm -f conf.gtktest
9669
9670    if test "x$GTK_CFLAGS" != "x"; then
9671      SKIP_GTK3=YES
9672      SKIP_ATHENA=YES
9673      SKIP_NEXTAW=YES
9674      SKIP_MOTIF=YES
9675      GUITYPE=GTK
9676
9677    else
9678      SKIP_GTK3=$save_skip_gtk3
9679    fi
9680  fi
9681  if test "x$GUITYPE" = "xGTK"; then
9682                if test -z "$SKIP_GNOME"; then
9683    {
9684
9685
9686
9687
9688
9689
9690# Check whether --with-gnome-includes was given.
9691if test "${with_gnome_includes+set}" = set; then :
9692  withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
9693
9694fi
9695
9696
9697
9698# Check whether --with-gnome-libs was given.
9699if test "${with_gnome_libs+set}" = set; then :
9700  withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
9701
9702fi
9703
9704
9705
9706# Check whether --with-gnome was given.
9707if test "${with_gnome+set}" = set; then :
9708  withval=$with_gnome; if test x$withval = xyes; then
9709      want_gnome=yes
9710      have_gnome=yes
9711    else
9712      if test "x$withval" = xno; then
9713	want_gnome=no
9714      else
9715	want_gnome=yes
9716	LDFLAGS="$LDFLAGS -L$withval/lib"
9717	CFLAGS="$CFLAGS -I$withval/include"
9718	gnome_prefix=$withval/lib
9719      fi
9720    fi
9721else
9722  want_gnome=yes
9723fi
9724
9725
9726  if test "x$want_gnome" = xyes; then
9727  {
9728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
9729$as_echo_n "checking for libgnomeui-2.0... " >&6; }
9730    if $PKG_CONFIG --exists libgnomeui-2.0; then
9731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9732$as_echo "yes" >&6; }
9733      GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
9734      GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
9735      GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
9736
9737                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
9738$as_echo_n "checking for FreeBSD... " >&6; }
9739      if test "`(uname) 2>/dev/null`" = FreeBSD; then
9740	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9741$as_echo "yes" >&6; }
9742	GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
9743	GNOME_LIBS="$GNOME_LIBS -pthread"
9744      else
9745	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747      fi
9748      have_gnome=yes
9749    else
9750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9751$as_echo "not found" >&6; }
9752      if test "x" = xfail; then
9753	as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
9754      fi
9755    fi
9756  }
9757  fi
9758
9759      if test "x$have_gnome" = xyes ; then
9760	$as_echo "#define FEAT_GUI_GNOME 1" >>confdefs.h
9761
9762	GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
9763	GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
9764      fi
9765    }
9766    fi
9767  fi
9768fi
9769
9770
9771if test -z "$SKIP_GTK3"; then
9772
9773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9774$as_echo_n "checking --disable-gtktest argument... " >&6; }
9775  # Check whether --enable-gtktest was given.
9776if test "${enable_gtktest+set}" = set; then :
9777  enableval=$enable_gtktest;
9778else
9779  enable_gtktest=yes
9780fi
9781
9782  if test "x$enable_gtktest" = "xyes" ; then
9783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9784$as_echo "gtk test enabled" >&6; }
9785  else
9786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9787$as_echo "gtk test disabled" >&6; }
9788  fi
9789
9790  if test "x$PKG_CONFIG" != "xno"; then
9791    save_skip_gtk2=$SKIP_GTK2
9792    SKIP_GTK2=YES
9793
9794  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
9795  {
9796    no_gtk=""
9797    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9798	  && $PKG_CONFIG --exists gtk+-2.0; then
9799    {
9800      min_gtk_version=3.0.0
9801      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9802$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9803                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
9804      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
9805      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
9806      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9807	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9808      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9809	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9810      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9811	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9812    }
9813    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9814	  && $PKG_CONFIG --exists gtk+-3.0; then
9815    {
9816      min_gtk_version=3.0.0
9817      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9818$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9819
9820      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
9821      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
9822      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
9823      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9824	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9825      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9826	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9827      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9828	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9829    }
9830    else
9831                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
9832$as_echo_n "checking for GTK -dev package... " >&6; }
9833      no_gtk=yes
9834    fi
9835
9836    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
9837    {
9838      ac_save_CFLAGS="$CFLAGS"
9839      ac_save_LIBS="$LIBS"
9840      CFLAGS="$CFLAGS $GTK_CFLAGS"
9841      LIBS="$LIBS $GTK_LIBS"
9842
9843                        rm -f conf.gtktest
9844      if test "$cross_compiling" = yes; then :
9845  echo $ac_n "cross compiling; assumed OK... $ac_c"
9846else
9847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9848/* end confdefs.h.  */
9849
9850#include <gtk/gtk.h>
9851#include <stdio.h>
9852#if STDC_HEADERS
9853# include <stdlib.h>
9854# include <stddef.h>
9855#endif
9856
9857int
9858main ()
9859{
9860int major, minor, micro;
9861char *tmp_version;
9862
9863system ("touch conf.gtktest");
9864
9865/* HP/UX 9 (%@#!) writes to sscanf strings */
9866tmp_version = g_strdup("$min_gtk_version");
9867if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
9868   printf("%s, bad version string\n", "$min_gtk_version");
9869   exit(1);
9870 }
9871
9872if ((gtk_major_version > major) ||
9873    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
9874    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
9875				     (gtk_micro_version >= micro)))
9876{
9877    return 0;
9878}
9879return 1;
9880}
9881
9882_ACEOF
9883if ac_fn_c_try_run "$LINENO"; then :
9884
9885else
9886  no_gtk=yes
9887fi
9888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9889  conftest.$ac_objext conftest.beam conftest.$ac_ext
9890fi
9891
9892      CFLAGS="$ac_save_CFLAGS"
9893      LIBS="$ac_save_LIBS"
9894    }
9895    fi
9896    if test "x$no_gtk" = x ; then
9897      if test "x$enable_gtktest" = "xyes"; then
9898	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9899$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9900      else
9901	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9902$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9903      fi
9904      GUI_LIB_LOC="$GTK_LIBDIR"
9905		 GTK_LIBNAME="$GTK_LIBS"
9906		GUI_INC_LOC="$GTK_CFLAGS"
9907    else
9908    {
9909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9910$as_echo "no" >&6; }
9911      GTK_CFLAGS=""
9912      GTK_LIBS=""
9913      :
9914      if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
9915	as_fn_error $? "could not configure GTK" "$LINENO" 5
9916      fi
9917    }
9918    fi
9919  }
9920  else
9921    GTK_CFLAGS=""
9922    GTK_LIBS=""
9923    :
9924  fi
9925
9926
9927  rm -f conf.gtktest
9928
9929    if test "x$GTK_CFLAGS" != "x"; then
9930      SKIP_GTK2=YES
9931      SKIP_GNOME=YES
9932      SKIP_ATHENA=YES
9933      SKIP_NEXTAW=YES
9934      SKIP_MOTIF=YES
9935      GUITYPE=GTK
9936
9937      $as_echo "#define USE_GTK3 1" >>confdefs.h
9938
9939    else
9940      SKIP_GTK2=$save_skip_gtk2
9941    fi
9942  fi
9943fi
9944
9945if test "x$GUITYPE" = "xGTK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
9947$as_echo_n "checking version of Gdk-Pixbuf... " >&6; }
9948  gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
9949  if test "x$gdk_pixbuf_version" != x ; then
9950    gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
9951      sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
9952    if test "x$gdk_pixbuf_version_minor" != x -a \
9953	$gdk_pixbuf_version_minor -ge 31 ; then
9954      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK." >&5
9955$as_echo "OK." >&6; }
9956      # Extract the first word of "glib-compile-resources", so it can be a program name with args.
9957set dummy glib-compile-resources; ac_word=$2
9958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9959$as_echo_n "checking for $ac_word... " >&6; }
9960if ${ac_cv_path_GLIB_COMPILE_RESOURCES+:} false; then :
9961  $as_echo_n "(cached) " >&6
9962else
9963  case $GLIB_COMPILE_RESOURCES in
9964  [\\/]* | ?:[\\/]*)
9965  ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
9966  ;;
9967  *)
9968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9969for as_dir in $PATH
9970do
9971  IFS=$as_save_IFS
9972  test -z "$as_dir" && as_dir=.
9973    for ac_exec_ext in '' $ac_executable_extensions; do
9974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9975    ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir/$ac_word$ac_exec_ext"
9976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9977    break 2
9978  fi
9979done
9980  done
9981IFS=$as_save_IFS
9982
9983  test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
9984  ;;
9985esac
9986fi
9987GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
9988if test -n "$GLIB_COMPILE_RESOURCES"; then
9989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
9990$as_echo "$GLIB_COMPILE_RESOURCES" >&6; }
9991else
9992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993$as_echo "no" >&6; }
9994fi
9995
9996
9997      { $as_echo "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
9998$as_echo_n "checking glib-compile-resources... " >&6; }
9999      if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
10000	GLIB_COMPILE_RESOURCES=""
10001	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10002$as_echo "cannot be found in PATH." >&6; }
10003      else
10004	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10005$as_echo "usable." >&6; }
10006	$as_echo "#define USE_GRESOURCE 1" >>confdefs.h
10007
10008	GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10009	GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
10010      fi
10011    else
10012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10013$as_echo "not usable." >&6; }
10014    fi
10015  else
10016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10017$as_echo "cannot obtain from pkg_config." >&6; }
10018  fi
10019
10020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10021$as_echo_n "checking --disable-icon-cache-update argument... " >&6; }
10022  # Check whether --enable-icon_cache_update was given.
10023if test "${enable_icon_cache_update+set}" = set; then :
10024  enableval=$enable_icon_cache_update;
10025else
10026  enable_icon_cache_update="yes"
10027fi
10028
10029  if test "$enable_icon_cache_update" = "yes"; then
10030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10031$as_echo "not set" >&6; }
10032    # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10033set dummy gtk-update-icon-cache; ac_word=$2
10034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10035$as_echo_n "checking for $ac_word... " >&6; }
10036if ${ac_cv_path_GTK_UPDATE_ICON_CACHE+:} false; then :
10037  $as_echo_n "(cached) " >&6
10038else
10039  case $GTK_UPDATE_ICON_CACHE in
10040  [\\/]* | ?:[\\/]*)
10041  ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10042  ;;
10043  *)
10044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10045for as_dir in $PATH
10046do
10047  IFS=$as_save_IFS
10048  test -z "$as_dir" && as_dir=.
10049    for ac_exec_ext in '' $ac_executable_extensions; do
10050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10051    ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir/$ac_word$ac_exec_ext"
10052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10053    break 2
10054  fi
10055done
10056  done
10057IFS=$as_save_IFS
10058
10059  test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10060  ;;
10061esac
10062fi
10063GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10064if test -n "$GTK_UPDATE_ICON_CACHE"; then
10065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10066$as_echo "$GTK_UPDATE_ICON_CACHE" >&6; }
10067else
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
10070fi
10071
10072
10073    if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
10074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10075$as_echo "not found in PATH." >&6; }
10076    fi
10077  else
10078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10079$as_echo "update disabled" >&6; }
10080  fi
10081
10082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10083$as_echo_n "checking --disable-desktop-database-update argument... " >&6; }
10084  # Check whether --enable-desktop_database_update was given.
10085if test "${enable_desktop_database_update+set}" = set; then :
10086  enableval=$enable_desktop_database_update;
10087else
10088  enable_desktop_database_update="yes"
10089fi
10090
10091  if test "$enable_desktop_database_update" = "yes"; then
10092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10093$as_echo "not set" >&6; }
10094    # Extract the first word of "update-desktop-database", so it can be a program name with args.
10095set dummy update-desktop-database; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then :
10099  $as_echo_n "(cached) " >&6
10100else
10101  case $UPDATE_DESKTOP_DATABASE in
10102  [\\/]* | ?:[\\/]*)
10103  ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10104  ;;
10105  *)
10106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109  IFS=$as_save_IFS
10110  test -z "$as_dir" && as_dir=.
10111    for ac_exec_ext in '' $ac_executable_extensions; do
10112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113    ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext"
10114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115    break 2
10116  fi
10117done
10118  done
10119IFS=$as_save_IFS
10120
10121  test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10122  ;;
10123esac
10124fi
10125UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10126if test -n "$UPDATE_DESKTOP_DATABASE"; then
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10128$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; }
10129else
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
10132fi
10133
10134
10135    if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
10136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10137$as_echo "not found in PATH." >&6; }
10138    fi
10139  else
10140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10141$as_echo "update disabled" >&6; }
10142  fi
10143fi
10144
10145
10146
10147
10148
10149
10150
10151if test -z "$SKIP_MOTIF"; then
10152  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"
10153    GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10154
10155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10156$as_echo_n "checking for location of Motif GUI includes... " >&6; }
10157  gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10158  GUI_INC_LOC=
10159  for try in $gui_includes; do
10160    if test -f "$try/Xm/Xm.h"; then
10161      GUI_INC_LOC=$try
10162    fi
10163  done
10164  if test -n "$GUI_INC_LOC"; then
10165    if test "$GUI_INC_LOC" = /usr/include; then
10166      GUI_INC_LOC=
10167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10168$as_echo "in default path" >&6; }
10169    else
10170      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10171$as_echo "$GUI_INC_LOC" >&6; }
10172    fi
10173  else
10174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10175$as_echo "<not found>" >&6; }
10176    SKIP_MOTIF=YES
10177  fi
10178fi
10179
10180
10181if test -z "$SKIP_MOTIF"; then
10182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10183$as_echo_n "checking --with-motif-lib argument... " >&6; }
10184
10185# Check whether --with-motif-lib was given.
10186if test "${with_motif_lib+set}" = set; then :
10187  withval=$with_motif_lib;  MOTIF_LIBNAME="${withval}"
10188fi
10189
10190
10191  if test -n "$MOTIF_LIBNAME"; then
10192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10193$as_echo "$MOTIF_LIBNAME" >&6; }
10194    GUI_LIB_LOC=
10195  else
10196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
10198
10199        GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10200
10201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10202$as_echo_n "checking for location of Motif GUI libs... " >&6; }
10203    gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
10204    GUI_LIB_LOC=
10205    for try in $gui_libs; do
10206      for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
10207	if test -f "$libtry"; then
10208	  GUI_LIB_LOC=$try
10209	fi
10210      done
10211    done
10212    if test -n "$GUI_LIB_LOC"; then
10213            if test "$GUI_LIB_LOC" = /usr/lib \
10214	   -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10215	   -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
10216	GUI_LIB_LOC=
10217	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10218$as_echo "in default path" >&6; }
10219      else
10220	if test -n "$GUI_LIB_LOC"; then
10221	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10222$as_echo "$GUI_LIB_LOC" >&6; }
10223	  if test "`(uname) 2>/dev/null`" = SunOS &&
10224					 uname -r | grep '^5' >/dev/null; then
10225	    GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10226	  fi
10227	fi
10228      fi
10229      MOTIF_LIBNAME=-lXm
10230    else
10231      { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10232$as_echo "<not found>" >&6; }
10233      SKIP_MOTIF=YES
10234    fi
10235  fi
10236fi
10237
10238if test -z "$SKIP_MOTIF"; then
10239  SKIP_ATHENA=YES
10240  SKIP_NEXTAW=YES
10241  GUITYPE=MOTIF
10242
10243fi
10244
10245
10246GUI_X_LIBS=
10247
10248if test -z "$SKIP_ATHENA"; then
10249  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Athena header files can be found" >&5
10250$as_echo_n "checking if Athena header files can be found... " >&6; }
10251  cflags_save=$CFLAGS
10252  CFLAGS="$CFLAGS $X_CFLAGS"
10253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10254/* end confdefs.h.  */
10255
10256#include <X11/Intrinsic.h>
10257#include <X11/Xaw/Paned.h>
10258int
10259main ()
10260{
10261
10262  ;
10263  return 0;
10264}
10265_ACEOF
10266if ac_fn_c_try_compile "$LINENO"; then :
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10268$as_echo "yes" >&6; }
10269else
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10271$as_echo "no" >&6; }; SKIP_ATHENA=YES
10272fi
10273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10274  CFLAGS=$cflags_save
10275fi
10276
10277if test -z "$SKIP_ATHENA"; then
10278  GUITYPE=ATHENA
10279fi
10280
10281if test -z "$SKIP_NEXTAW"; then
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if neXtaw header files can be found" >&5
10283$as_echo_n "checking if neXtaw header files can be found... " >&6; }
10284  cflags_save=$CFLAGS
10285  CFLAGS="$CFLAGS $X_CFLAGS"
10286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10287/* end confdefs.h.  */
10288
10289#include <X11/Intrinsic.h>
10290#include <X11/neXtaw/Paned.h>
10291int
10292main ()
10293{
10294
10295  ;
10296  return 0;
10297}
10298_ACEOF
10299if ac_fn_c_try_compile "$LINENO"; then :
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10301$as_echo "yes" >&6; }
10302else
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }; SKIP_NEXTAW=YES
10305fi
10306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10307  CFLAGS=$cflags_save
10308fi
10309
10310if test -z "$SKIP_NEXTAW"; then
10311  GUITYPE=NEXTAW
10312fi
10313
10314if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
10315      if test -n "$GUI_INC_LOC"; then
10316    GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10317  fi
10318  if test -n "$GUI_LIB_LOC"; then
10319    GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10320  fi
10321
10322    ldflags_save=$LDFLAGS
10323  LDFLAGS="$X_LIBS $LDFLAGS"
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10325$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
10326if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  ac_check_lib_save_LIBS=$LIBS
10330LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10332/* end confdefs.h.  */
10333
10334/* Override any GCC internal prototype to avoid an error.
10335   Use char because int might match the return type of a GCC
10336   builtin and then its argument prototype would still apply.  */
10337#ifdef __cplusplus
10338extern "C"
10339#endif
10340char XShapeQueryExtension ();
10341int
10342main ()
10343{
10344return XShapeQueryExtension ();
10345  ;
10346  return 0;
10347}
10348_ACEOF
10349if ac_fn_c_try_link "$LINENO"; then :
10350  ac_cv_lib_Xext_XShapeQueryExtension=yes
10351else
10352  ac_cv_lib_Xext_XShapeQueryExtension=no
10353fi
10354rm -f core conftest.err conftest.$ac_objext \
10355    conftest$ac_exeext conftest.$ac_ext
10356LIBS=$ac_check_lib_save_LIBS
10357fi
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10359$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10360if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then :
10361  GUI_X_LIBS="-lXext"
10362fi
10363
10364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10365$as_echo_n "checking for wslen in -lw... " >&6; }
10366if ${ac_cv_lib_w_wslen+:} false; then :
10367  $as_echo_n "(cached) " >&6
10368else
10369  ac_check_lib_save_LIBS=$LIBS
10370LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10372/* end confdefs.h.  */
10373
10374/* Override any GCC internal prototype to avoid an error.
10375   Use char because int might match the return type of a GCC
10376   builtin and then its argument prototype would still apply.  */
10377#ifdef __cplusplus
10378extern "C"
10379#endif
10380char wslen ();
10381int
10382main ()
10383{
10384return wslen ();
10385  ;
10386  return 0;
10387}
10388_ACEOF
10389if ac_fn_c_try_link "$LINENO"; then :
10390  ac_cv_lib_w_wslen=yes
10391else
10392  ac_cv_lib_w_wslen=no
10393fi
10394rm -f core conftest.err conftest.$ac_objext \
10395    conftest$ac_exeext conftest.$ac_ext
10396LIBS=$ac_check_lib_save_LIBS
10397fi
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10399$as_echo "$ac_cv_lib_w_wslen" >&6; }
10400if test "x$ac_cv_lib_w_wslen" = xyes; then :
10401  X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
10402fi
10403
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10405$as_echo_n "checking for dlsym in -ldl... " >&6; }
10406if ${ac_cv_lib_dl_dlsym+:} false; then :
10407  $as_echo_n "(cached) " >&6
10408else
10409  ac_check_lib_save_LIBS=$LIBS
10410LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10412/* end confdefs.h.  */
10413
10414/* Override any GCC internal prototype to avoid an error.
10415   Use char because int might match the return type of a GCC
10416   builtin and then its argument prototype would still apply.  */
10417#ifdef __cplusplus
10418extern "C"
10419#endif
10420char dlsym ();
10421int
10422main ()
10423{
10424return dlsym ();
10425  ;
10426  return 0;
10427}
10428_ACEOF
10429if ac_fn_c_try_link "$LINENO"; then :
10430  ac_cv_lib_dl_dlsym=yes
10431else
10432  ac_cv_lib_dl_dlsym=no
10433fi
10434rm -f core conftest.err conftest.$ac_objext \
10435    conftest$ac_exeext conftest.$ac_ext
10436LIBS=$ac_check_lib_save_LIBS
10437fi
10438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10439$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
10440if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
10441  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
10442fi
10443
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10445$as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10446if ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+:} false; then :
10447  $as_echo_n "(cached) " >&6
10448else
10449  ac_check_lib_save_LIBS=$LIBS
10450LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10452/* end confdefs.h.  */
10453
10454/* Override any GCC internal prototype to avoid an error.
10455   Use char because int might match the return type of a GCC
10456   builtin and then its argument prototype would still apply.  */
10457#ifdef __cplusplus
10458extern "C"
10459#endif
10460char XmuCreateStippledPixmap ();
10461int
10462main ()
10463{
10464return XmuCreateStippledPixmap ();
10465  ;
10466  return 0;
10467}
10468_ACEOF
10469if ac_fn_c_try_link "$LINENO"; then :
10470  ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
10471else
10472  ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
10473fi
10474rm -f core conftest.err conftest.$ac_objext \
10475    conftest$ac_exeext conftest.$ac_ext
10476LIBS=$ac_check_lib_save_LIBS
10477fi
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10479$as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10480if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes; then :
10481  GUI_X_LIBS="-lXmu $GUI_X_LIBS"
10482fi
10483
10484  if test -z "$SKIP_MOTIF"; then
10485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10486$as_echo_n "checking for XpEndJob in -lXp... " >&6; }
10487if ${ac_cv_lib_Xp_XpEndJob+:} false; then :
10488  $as_echo_n "(cached) " >&6
10489else
10490  ac_check_lib_save_LIBS=$LIBS
10491LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10493/* end confdefs.h.  */
10494
10495/* Override any GCC internal prototype to avoid an error.
10496   Use char because int might match the return type of a GCC
10497   builtin and then its argument prototype would still apply.  */
10498#ifdef __cplusplus
10499extern "C"
10500#endif
10501char XpEndJob ();
10502int
10503main ()
10504{
10505return XpEndJob ();
10506  ;
10507  return 0;
10508}
10509_ACEOF
10510if ac_fn_c_try_link "$LINENO"; then :
10511  ac_cv_lib_Xp_XpEndJob=yes
10512else
10513  ac_cv_lib_Xp_XpEndJob=no
10514fi
10515rm -f core conftest.err conftest.$ac_objext \
10516    conftest$ac_exeext conftest.$ac_ext
10517LIBS=$ac_check_lib_save_LIBS
10518fi
10519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
10520$as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; }
10521if test "x$ac_cv_lib_Xp_XpEndJob" = xyes; then :
10522  GUI_X_LIBS="-lXp $GUI_X_LIBS"
10523fi
10524
10525  fi
10526  LDFLAGS=$ldflags_save
10527
10528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
10529$as_echo_n "checking for extra X11 defines... " >&6; }
10530  NARROW_PROTO=
10531  rm -fr conftestdir
10532  if mkdir conftestdir; then
10533    cd conftestdir
10534    cat > Imakefile <<'EOF'
10535acfindx:
10536	@echo 'NARROW_PROTO="${PROTO_DEFINES}"'
10537EOF
10538    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10539      eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10540    fi
10541    cd ..
10542    rm -fr conftestdir
10543  fi
10544  if test -z "$NARROW_PROTO"; then
10545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10546$as_echo "no" >&6; }
10547  else
10548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
10549$as_echo "$NARROW_PROTO" >&6; }
10550  fi
10551
10552fi
10553
10554if test "$enable_xsmp" = "yes"; then
10555  cppflags_save=$CPPFLAGS
10556  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10557  for ac_header in X11/SM/SMlib.h
10558do :
10559  ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10560if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then :
10561  cat >>confdefs.h <<_ACEOF
10562#define HAVE_X11_SM_SMLIB_H 1
10563_ACEOF
10564
10565fi
10566
10567done
10568
10569  CPPFLAGS=$cppflags_save
10570fi
10571
10572
10573if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
10574    cppflags_save=$CPPFLAGS
10575  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10576  for ac_header in X11/xpm.h X11/Sunkeysym.h
10577do :
10578  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10579ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10581  cat >>confdefs.h <<_ACEOF
10582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10583_ACEOF
10584
10585fi
10586
10587done
10588
10589
10590    if test ! "$enable_xim" = "no"; then
10591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
10592$as_echo_n "checking for XIMText in X11/Xlib.h... " >&6; }
10593    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10594/* end confdefs.h.  */
10595#include <X11/Xlib.h>
10596_ACEOF
10597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10598  $EGREP "XIMText" >/dev/null 2>&1; then :
10599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10600$as_echo "yes" >&6; }
10601else
10602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
10603$as_echo "no; xim has been disabled" >&6; }; enable_xim="no"
10604fi
10605rm -f conftest*
10606
10607  fi
10608  CPPFLAGS=$cppflags_save
10609
10610    if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
10611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
10612$as_echo "X GUI selected; xim has been enabled" >&6; }
10613    enable_xim="yes"
10614  fi
10615fi
10616
10617if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
10618  cppflags_save=$CPPFLAGS
10619  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
10621$as_echo_n "checking for X11/Xmu/Editres.h... " >&6; }
10622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10623/* end confdefs.h.  */
10624
10625#include <X11/Intrinsic.h>
10626#include <X11/Xmu/Editres.h>
10627int
10628main ()
10629{
10630int i; i = 0;
10631  ;
10632  return 0;
10633}
10634_ACEOF
10635if ac_fn_c_try_compile "$LINENO"; then :
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10637$as_echo "yes" >&6; }
10638		      $as_echo "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
10639
10640else
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
10643fi
10644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10645  CPPFLAGS=$cppflags_save
10646fi
10647
10648if test -z "$SKIP_MOTIF"; then
10649  cppflags_save=$CPPFLAGS
10650  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10651  if test "$zOSUnix" = "yes"; then
10652	xmheader="Xm/Xm.h"
10653  else
10654	xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
10655	   Xm/UnhighlightT.h Xm/Notebook.h"
10656  fi
10657  for ac_header in $xmheader
10658do :
10659  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10660ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10661if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10662  cat >>confdefs.h <<_ACEOF
10663#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10664_ACEOF
10665
10666fi
10667
10668done
10669
10670
10671  if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
10672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
10673$as_echo_n "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
10674    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10675/* end confdefs.h.  */
10676#include <Xm/XpmP.h>
10677int
10678main ()
10679{
10680XpmAttributes_21 attr;
10681  ;
10682  return 0;
10683}
10684_ACEOF
10685if ac_fn_c_try_compile "$LINENO"; then :
10686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10687$as_echo "yes" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
10688
10689else
10690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10692
10693
10694fi
10695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10696  else
10697    $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10698
10699  fi
10700  CPPFLAGS=$cppflags_save
10701fi
10702
10703if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
10704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
10705$as_echo "no GUI selected; xim has been disabled" >&6; }
10706  enable_xim="no"
10707fi
10708if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
10710$as_echo "no GUI selected; fontset has been disabled" >&6; }
10711  enable_fontset="no"
10712fi
10713if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
10715$as_echo "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
10716  enable_fontset="no"
10717fi
10718
10719if test -z "$SKIP_HAIKU"; then
10720  GUITYPE=HAIKUGUI
10721fi
10722
10723if test -z "$SKIP_PHOTON"; then
10724  GUITYPE=PHOTONGUI
10725fi
10726
10727
10728
10729
10730
10731
10732if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
10733  as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
10734fi
10735
10736if test "$enable_xim" = "yes"; then
10737  $as_echo "#define FEAT_XIM 1" >>confdefs.h
10738
10739fi
10740if test "$enable_fontset" = "yes"; then
10741  $as_echo "#define FEAT_XFONTSET 1" >>confdefs.h
10742
10743fi
10744
10745
10746
10747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
10748$as_echo_n "checking for /proc link to executable... " >&6; }
10749if test -L "/proc/self/exe"; then
10750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
10751$as_echo "/proc/self/exe" >&6; }
10752  $as_echo "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
10753
10754elif test -L "/proc/self/path/a.out"; then
10755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
10756$as_echo "/proc/self/path/a.out" >&6; }
10757  $as_echo "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
10758
10759elif test -L "/proc/curproc/file"; then
10760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
10761$as_echo "/proc/curproc/file" >&6; }
10762  $as_echo "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
10763
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
10770$as_echo_n "checking for CYGWIN or MSYS environment... " >&6; }
10771case `uname` in
10772    CYGWIN*|MSYS*)    CYGWIN=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10773$as_echo "yes" >&6; }
10774                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
10775$as_echo_n "checking for CYGWIN clipboard support... " >&6; }
10776                if test "x$with_x" = "xno" ; then
10777                  OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
10778                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10779$as_echo "yes" >&6; }
10780                  $as_echo "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
10781
10782                else
10783                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
10784$as_echo "no - using X11" >&6; }
10785                fi ;;
10786
10787    *)          CYGWIN=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10788$as_echo "no" >&6; };;
10789esac
10790
10791
10792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
10793$as_echo_n "checking whether toupper is broken... " >&6; }
10794if ${vim_cv_toupper_broken+:} false; then :
10795  $as_echo_n "(cached) " >&6
10796else
10797
10798    if test "$cross_compiling" = yes; then :
10799
10800    as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
10801
10802else
10803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10804/* end confdefs.h.  */
10805
10806#include "confdefs.h"
10807#include <ctype.h>
10808#if STDC_HEADERS
10809# include <stdlib.h>
10810# include <stddef.h>
10811#endif
10812main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
10813
10814_ACEOF
10815if ac_fn_c_try_run "$LINENO"; then :
10816
10817    vim_cv_toupper_broken=yes
10818
10819else
10820
10821    vim_cv_toupper_broken=no
10822
10823fi
10824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10825  conftest.$ac_objext conftest.beam conftest.$ac_ext
10826fi
10827
10828fi
10829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
10830$as_echo "$vim_cv_toupper_broken" >&6; }
10831
10832if test "x$vim_cv_toupper_broken" = "xyes" ; then
10833  $as_echo "#define BROKEN_TOUPPER 1" >>confdefs.h
10834
10835fi
10836
10837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
10838$as_echo_n "checking whether __DATE__ and __TIME__ work... " >&6; }
10839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10840/* end confdefs.h.  */
10841#include <stdio.h>
10842int
10843main ()
10844{
10845printf("(" __DATE__ " " __TIME__ ")");
10846  ;
10847  return 0;
10848}
10849_ACEOF
10850if ac_fn_c_try_compile "$LINENO"; then :
10851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10852$as_echo "yes" >&6; }; $as_echo "#define HAVE_DATE_TIME 1" >>confdefs.h
10853
10854else
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10856$as_echo "no" >&6; }
10857fi
10858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10859
10860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
10861$as_echo_n "checking whether __attribute__((unused)) is allowed... " >&6; }
10862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10863/* end confdefs.h.  */
10864#include <stdio.h>
10865int
10866main ()
10867{
10868int x __attribute__((unused));
10869  ;
10870  return 0;
10871}
10872_ACEOF
10873if ac_fn_c_try_compile "$LINENO"; then :
10874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10875$as_echo "yes" >&6; }; $as_echo "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
10876
10877else
10878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10879$as_echo "no" >&6; }
10880fi
10881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10882
10883ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
10884if test "x$ac_cv_header_elf_h" = xyes; then :
10885  HAS_ELF=1
10886fi
10887
10888
10889if test "$HAS_ELF" = 1; then
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
10891$as_echo_n "checking for main in -lelf... " >&6; }
10892if ${ac_cv_lib_elf_main+:} false; then :
10893  $as_echo_n "(cached) " >&6
10894else
10895  ac_check_lib_save_LIBS=$LIBS
10896LIBS="-lelf  $LIBS"
10897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10898/* end confdefs.h.  */
10899
10900
10901int
10902main ()
10903{
10904return main ();
10905  ;
10906  return 0;
10907}
10908_ACEOF
10909if ac_fn_c_try_link "$LINENO"; then :
10910  ac_cv_lib_elf_main=yes
10911else
10912  ac_cv_lib_elf_main=no
10913fi
10914rm -f core conftest.err conftest.$ac_objext \
10915    conftest$ac_exeext conftest.$ac_ext
10916LIBS=$ac_check_lib_save_LIBS
10917fi
10918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
10919$as_echo "$ac_cv_lib_elf_main" >&6; }
10920if test "x$ac_cv_lib_elf_main" = xyes; then :
10921  cat >>confdefs.h <<_ACEOF
10922#define HAVE_LIBELF 1
10923_ACEOF
10924
10925  LIBS="-lelf $LIBS"
10926
10927fi
10928
10929fi
10930
10931ac_header_dirent=no
10932for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10933  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
10935$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
10936if eval \${$as_ac_Header+:} false; then :
10937  $as_echo_n "(cached) " >&6
10938else
10939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10940/* end confdefs.h.  */
10941#include <sys/types.h>
10942#include <$ac_hdr>
10943
10944int
10945main ()
10946{
10947if ((DIR *) 0)
10948return 0;
10949  ;
10950  return 0;
10951}
10952_ACEOF
10953if ac_fn_c_try_compile "$LINENO"; then :
10954  eval "$as_ac_Header=yes"
10955else
10956  eval "$as_ac_Header=no"
10957fi
10958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10959fi
10960eval ac_res=\$$as_ac_Header
10961	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10962$as_echo "$ac_res" >&6; }
10963if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10964  cat >>confdefs.h <<_ACEOF
10965#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10966_ACEOF
10967
10968ac_header_dirent=$ac_hdr; break
10969fi
10970
10971done
10972# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10973if test $ac_header_dirent = dirent.h; then
10974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10975$as_echo_n "checking for library containing opendir... " >&6; }
10976if ${ac_cv_search_opendir+:} false; then :
10977  $as_echo_n "(cached) " >&6
10978else
10979  ac_func_search_save_LIBS=$LIBS
10980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10981/* end confdefs.h.  */
10982
10983/* 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.  */
10986#ifdef __cplusplus
10987extern "C"
10988#endif
10989char opendir ();
10990int
10991main ()
10992{
10993return opendir ();
10994  ;
10995  return 0;
10996}
10997_ACEOF
10998for ac_lib in '' dir; do
10999  if test -z "$ac_lib"; then
11000    ac_res="none required"
11001  else
11002    ac_res=-l$ac_lib
11003    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11004  fi
11005  if ac_fn_c_try_link "$LINENO"; then :
11006  ac_cv_search_opendir=$ac_res
11007fi
11008rm -f core conftest.err conftest.$ac_objext \
11009    conftest$ac_exeext
11010  if ${ac_cv_search_opendir+:} false; then :
11011  break
11012fi
11013done
11014if ${ac_cv_search_opendir+:} false; then :
11015
11016else
11017  ac_cv_search_opendir=no
11018fi
11019rm conftest.$ac_ext
11020LIBS=$ac_func_search_save_LIBS
11021fi
11022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11023$as_echo "$ac_cv_search_opendir" >&6; }
11024ac_res=$ac_cv_search_opendir
11025if test "$ac_res" != no; then :
11026  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11027
11028fi
11029
11030else
11031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11032$as_echo_n "checking for library containing opendir... " >&6; }
11033if ${ac_cv_search_opendir+:} false; then :
11034  $as_echo_n "(cached) " >&6
11035else
11036  ac_func_search_save_LIBS=$LIBS
11037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11038/* end confdefs.h.  */
11039
11040/* Override any GCC internal prototype to avoid an error.
11041   Use char because int might match the return type of a GCC
11042   builtin and then its argument prototype would still apply.  */
11043#ifdef __cplusplus
11044extern "C"
11045#endif
11046char opendir ();
11047int
11048main ()
11049{
11050return opendir ();
11051  ;
11052  return 0;
11053}
11054_ACEOF
11055for ac_lib in '' x; do
11056  if test -z "$ac_lib"; then
11057    ac_res="none required"
11058  else
11059    ac_res=-l$ac_lib
11060    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11061  fi
11062  if ac_fn_c_try_link "$LINENO"; then :
11063  ac_cv_search_opendir=$ac_res
11064fi
11065rm -f core conftest.err conftest.$ac_objext \
11066    conftest$ac_exeext
11067  if ${ac_cv_search_opendir+:} false; then :
11068  break
11069fi
11070done
11071if ${ac_cv_search_opendir+:} false; then :
11072
11073else
11074  ac_cv_search_opendir=no
11075fi
11076rm conftest.$ac_ext
11077LIBS=$ac_func_search_save_LIBS
11078fi
11079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11080$as_echo "$ac_cv_search_opendir" >&6; }
11081ac_res=$ac_cv_search_opendir
11082if test "$ac_res" != no; then :
11083  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11084
11085fi
11086
11087fi
11088
11089
11090if test $ac_cv_header_sys_wait_h = no; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11092$as_echo_n "checking for sys/wait.h that defines union wait... " >&6; }
11093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11094/* end confdefs.h.  */
11095#include <sys/wait.h>
11096int
11097main ()
11098{
11099union wait xx, yy; xx = yy
11100  ;
11101  return 0;
11102}
11103_ACEOF
11104if ac_fn_c_try_compile "$LINENO"; then :
11105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11106$as_echo "yes" >&6; }
11107			$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
11108
11109			$as_echo "#define HAVE_UNION_WAIT 1" >>confdefs.h
11110
11111else
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11113$as_echo "no" >&6; }
11114fi
11115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11116fi
11117
11118for ac_header in stdint.h stdlib.h string.h \
11119	sys/select.h sys/utsname.h termcap.h fcntl.h \
11120	sgtty.h sys/ioctl.h sys/time.h sys/types.h \
11121	termio.h iconv.h inttypes.h langinfo.h math.h \
11122	unistd.h stropts.h errno.h sys/resource.h \
11123	sys/systeminfo.h locale.h sys/stream.h termios.h \
11124	libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
11125	utime.h sys/param.h sys/ptms.h libintl.h libgen.h \
11126	util/debug.h util/msg18n.h frame.h sys/acl.h \
11127	sys/access.h sys/sysinfo.h wchar.h wctype.h
11128do :
11129  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11130ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11131if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11132  cat >>confdefs.h <<_ACEOF
11133#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11134_ACEOF
11135
11136fi
11137
11138done
11139
11140
11141for ac_header in sys/ptem.h
11142do :
11143  ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "#if defined HAVE_SYS_STREAM_H
11144#  include <sys/stream.h>
11145#endif
11146"
11147if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
11148  cat >>confdefs.h <<_ACEOF
11149#define HAVE_SYS_PTEM_H 1
11150_ACEOF
11151
11152fi
11153
11154done
11155
11156
11157for ac_header in sys/sysctl.h
11158do :
11159  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if defined HAVE_SYS_PARAM_H
11160#  include <sys/param.h>
11161#endif
11162"
11163if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
11164  cat >>confdefs.h <<_ACEOF
11165#define HAVE_SYS_SYSCTL_H 1
11166_ACEOF
11167
11168fi
11169
11170done
11171
11172
11173
11174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11175$as_echo_n "checking for pthread_np.h... " >&6; }
11176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11177/* end confdefs.h.  */
11178
11179#include <pthread.h>
11180#include <pthread_np.h>
11181int
11182main ()
11183{
11184int i; i = 0;
11185  ;
11186  return 0;
11187}
11188_ACEOF
11189if ac_fn_c_try_compile "$LINENO"; then :
11190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11191$as_echo "yes" >&6; }
11192		      $as_echo "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
11193
11194else
11195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11196$as_echo "no" >&6; }
11197fi
11198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11199
11200for ac_header in strings.h
11201do :
11202  ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11203if test "x$ac_cv_header_strings_h" = xyes; then :
11204  cat >>confdefs.h <<_ACEOF
11205#define HAVE_STRINGS_H 1
11206_ACEOF
11207
11208fi
11209
11210done
11211
11212if test "x$MACOS_X" = "xyes"; then
11213    $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
11214
11215else
11216
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11218$as_echo_n "checking if strings.h can be included after string.h... " >&6; }
11219cppflags_save=$CPPFLAGS
11220CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11222/* end confdefs.h.  */
11223
11224#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11225# define _NO_PROTO	/* like in os_unix.h, causes conflict for AIX (Winn) */
11226			/* but don't do it on AIX 5.1 (Uribarri) */
11227#endif
11228#ifdef HAVE_XM_XM_H
11229# include <Xm/Xm.h>	/* This breaks it for HP-UX 11 (Squassabia) */
11230#endif
11231#ifdef HAVE_STRING_H
11232# include <string.h>
11233#endif
11234#if defined(HAVE_STRINGS_H)
11235# include <strings.h>
11236#endif
11237
11238int
11239main ()
11240{
11241int i; i = 0;
11242  ;
11243  return 0;
11244}
11245_ACEOF
11246if ac_fn_c_try_compile "$LINENO"; then :
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11248$as_echo "yes" >&6; }
11249else
11250  $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
11251
11252		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11253$as_echo "no" >&6; }
11254fi
11255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11256CPPFLAGS=$cppflags_save
11257fi
11258
11259if test $ac_cv_c_compiler_gnu = yes; then
11260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
11261$as_echo_n "checking whether $CC needs -traditional... " >&6; }
11262if ${ac_cv_prog_gcc_traditional+:} false; then :
11263  $as_echo_n "(cached) " >&6
11264else
11265    ac_pattern="Autoconf.*'x'"
11266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267/* end confdefs.h.  */
11268#include <sgtty.h>
11269Autoconf TIOCGETP
11270_ACEOF
11271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11272  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
11273  ac_cv_prog_gcc_traditional=yes
11274else
11275  ac_cv_prog_gcc_traditional=no
11276fi
11277rm -f conftest*
11278
11279
11280  if test $ac_cv_prog_gcc_traditional = no; then
11281    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11282/* end confdefs.h.  */
11283#include <termio.h>
11284Autoconf TCGETA
11285_ACEOF
11286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11287  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
11288  ac_cv_prog_gcc_traditional=yes
11289fi
11290rm -f conftest*
11291
11292  fi
11293fi
11294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
11295$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
11296  if test $ac_cv_prog_gcc_traditional = yes; then
11297    CC="$CC -traditional"
11298  fi
11299fi
11300
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11302$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11303if ${ac_cv_c_const+:} false; then :
11304  $as_echo_n "(cached) " >&6
11305else
11306  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307/* end confdefs.h.  */
11308
11309int
11310main ()
11311{
11312
11313#ifndef __cplusplus
11314  /* Ultrix mips cc rejects this sort of thing.  */
11315  typedef int charset[2];
11316  const charset cs = { 0, 0 };
11317  /* SunOS 4.1.1 cc rejects this.  */
11318  char const *const *pcpcc;
11319  char **ppc;
11320  /* NEC SVR4.0.2 mips cc rejects this.  */
11321  struct point {int x, y;};
11322  static struct point const zero = {0,0};
11323  /* AIX XL C 1.02.0.0 rejects this.
11324     It does not let you subtract one const X* pointer from another in
11325     an arm of an if-expression whose if-part is not a constant
11326     expression */
11327  const char *g = "string";
11328  pcpcc = &g + (g ? g-g : 0);
11329  /* HPUX 7.0 cc rejects these. */
11330  ++pcpcc;
11331  ppc = (char**) pcpcc;
11332  pcpcc = (char const *const *) ppc;
11333  { /* SCO 3.2v4 cc rejects this sort of thing.  */
11334    char tx;
11335    char *t = &tx;
11336    char const *s = 0 ? (char *) 0 : (char const *) 0;
11337
11338    *t++ = 0;
11339    if (s) return 0;
11340  }
11341  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11342    int x[] = {25, 17};
11343    const int *foo = &x[0];
11344    ++foo;
11345  }
11346  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11347    typedef const int *iptr;
11348    iptr p = 0;
11349    ++p;
11350  }
11351  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11352       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11353    struct s { int j; const int *ap[3]; } bx;
11354    struct s *b = &bx; b->j = 5;
11355  }
11356  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11357    const int foo = 10;
11358    if (!foo) return 0;
11359  }
11360  return !cs[0] && !zero.x;
11361#endif
11362
11363  ;
11364  return 0;
11365}
11366_ACEOF
11367if ac_fn_c_try_compile "$LINENO"; then :
11368  ac_cv_c_const=yes
11369else
11370  ac_cv_c_const=no
11371fi
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11373fi
11374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11375$as_echo "$ac_cv_c_const" >&6; }
11376if test $ac_cv_c_const = no; then
11377
11378$as_echo "#define const /**/" >>confdefs.h
11379
11380fi
11381
11382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11383$as_echo_n "checking for working volatile... " >&6; }
11384if ${ac_cv_c_volatile+:} false; then :
11385  $as_echo_n "(cached) " >&6
11386else
11387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11388/* end confdefs.h.  */
11389
11390int
11391main ()
11392{
11393
11394volatile int x;
11395int * volatile y = (int *) 0;
11396return !x && !y;
11397  ;
11398  return 0;
11399}
11400_ACEOF
11401if ac_fn_c_try_compile "$LINENO"; then :
11402  ac_cv_c_volatile=yes
11403else
11404  ac_cv_c_volatile=no
11405fi
11406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11407fi
11408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
11409$as_echo "$ac_cv_c_volatile" >&6; }
11410if test $ac_cv_c_volatile = no; then
11411
11412$as_echo "#define volatile /**/" >>confdefs.h
11413
11414fi
11415
11416ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11417if test "x$ac_cv_type_mode_t" = xyes; then :
11418
11419else
11420
11421cat >>confdefs.h <<_ACEOF
11422#define mode_t int
11423_ACEOF
11424
11425fi
11426
11427ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11428if test "x$ac_cv_type_off_t" = xyes; then :
11429
11430else
11431
11432cat >>confdefs.h <<_ACEOF
11433#define off_t long int
11434_ACEOF
11435
11436fi
11437
11438ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11439if test "x$ac_cv_type_pid_t" = xyes; then :
11440
11441else
11442
11443cat >>confdefs.h <<_ACEOF
11444#define pid_t int
11445_ACEOF
11446
11447fi
11448
11449ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
11450if test "x$ac_cv_type_size_t" = xyes; then :
11451
11452else
11453
11454cat >>confdefs.h <<_ACEOF
11455#define size_t unsigned int
11456_ACEOF
11457
11458fi
11459
11460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11461$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11462if ${ac_cv_type_uid_t+:} false; then :
11463  $as_echo_n "(cached) " >&6
11464else
11465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466/* end confdefs.h.  */
11467#include <sys/types.h>
11468
11469_ACEOF
11470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11471  $EGREP "uid_t" >/dev/null 2>&1; then :
11472  ac_cv_type_uid_t=yes
11473else
11474  ac_cv_type_uid_t=no
11475fi
11476rm -f conftest*
11477
11478fi
11479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
11480$as_echo "$ac_cv_type_uid_t" >&6; }
11481if test $ac_cv_type_uid_t = no; then
11482
11483$as_echo "#define uid_t int" >>confdefs.h
11484
11485
11486$as_echo "#define gid_t int" >>confdefs.h
11487
11488fi
11489
11490ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
11491case $ac_cv_c_uint32_t in #(
11492  no|yes) ;; #(
11493  *)
11494
11495$as_echo "#define _UINT32_T 1" >>confdefs.h
11496
11497
11498cat >>confdefs.h <<_ACEOF
11499#define uint32_t $ac_cv_c_uint32_t
11500_ACEOF
11501;;
11502  esac
11503
11504
11505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11506$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
11507if ${ac_cv_header_time+:} false; then :
11508  $as_echo_n "(cached) " >&6
11509else
11510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11511/* end confdefs.h.  */
11512#include <sys/types.h>
11513#include <sys/time.h>
11514#include <time.h>
11515
11516int
11517main ()
11518{
11519if ((struct tm *) 0)
11520return 0;
11521  ;
11522  return 0;
11523}
11524_ACEOF
11525if ac_fn_c_try_compile "$LINENO"; then :
11526  ac_cv_header_time=yes
11527else
11528  ac_cv_header_time=no
11529fi
11530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11531fi
11532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11533$as_echo "$ac_cv_header_time" >&6; }
11534if test $ac_cv_header_time = yes; then
11535
11536$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
11537
11538fi
11539
11540ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
11541if test "x$ac_cv_type_ino_t" = xyes; then :
11542
11543else
11544
11545cat >>confdefs.h <<_ACEOF
11546#define ino_t long
11547_ACEOF
11548
11549fi
11550
11551ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
11552if test "x$ac_cv_type_dev_t" = xyes; then :
11553
11554else
11555
11556cat >>confdefs.h <<_ACEOF
11557#define dev_t unsigned
11558_ACEOF
11559
11560fi
11561
11562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11563$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11564if ${ac_cv_c_bigendian+:} false; then :
11565  $as_echo_n "(cached) " >&6
11566else
11567  ac_cv_c_bigendian=unknown
11568    # See if we're dealing with a universal compiler.
11569    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11570/* end confdefs.h.  */
11571#ifndef __APPLE_CC__
11572	       not a universal capable compiler
11573	     #endif
11574	     typedef int dummy;
11575
11576_ACEOF
11577if ac_fn_c_try_compile "$LINENO"; then :
11578
11579	# Check for potential -arch flags.  It is not universal unless
11580	# there are at least two -arch flags with different values.
11581	ac_arch=
11582	ac_prev=
11583	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11584	 if test -n "$ac_prev"; then
11585	   case $ac_word in
11586	     i?86 | x86_64 | ppc | ppc64)
11587	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11588		 ac_arch=$ac_word
11589	       else
11590		 ac_cv_c_bigendian=universal
11591		 break
11592	       fi
11593	       ;;
11594	   esac
11595	   ac_prev=
11596	 elif test "x$ac_word" = "x-arch"; then
11597	   ac_prev=arch
11598	 fi
11599       done
11600fi
11601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11602    if test $ac_cv_c_bigendian = unknown; then
11603      # See if sys/param.h defines the BYTE_ORDER macro.
11604      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11605/* end confdefs.h.  */
11606#include <sys/types.h>
11607	     #include <sys/param.h>
11608
11609int
11610main ()
11611{
11612#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11613		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11614		     && LITTLE_ENDIAN)
11615	      bogus endian macros
11616	     #endif
11617
11618  ;
11619  return 0;
11620}
11621_ACEOF
11622if ac_fn_c_try_compile "$LINENO"; then :
11623  # It does; now see whether it defined to BIG_ENDIAN or not.
11624	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11625/* end confdefs.h.  */
11626#include <sys/types.h>
11627		#include <sys/param.h>
11628
11629int
11630main ()
11631{
11632#if BYTE_ORDER != BIG_ENDIAN
11633		 not big endian
11634		#endif
11635
11636  ;
11637  return 0;
11638}
11639_ACEOF
11640if ac_fn_c_try_compile "$LINENO"; then :
11641  ac_cv_c_bigendian=yes
11642else
11643  ac_cv_c_bigendian=no
11644fi
11645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11646fi
11647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11648    fi
11649    if test $ac_cv_c_bigendian = unknown; then
11650      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11651      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11652/* end confdefs.h.  */
11653#include <limits.h>
11654
11655int
11656main ()
11657{
11658#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11659	      bogus endian macros
11660	     #endif
11661
11662  ;
11663  return 0;
11664}
11665_ACEOF
11666if ac_fn_c_try_compile "$LINENO"; then :
11667  # It does; now see whether it defined to _BIG_ENDIAN or not.
11668	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11669/* end confdefs.h.  */
11670#include <limits.h>
11671
11672int
11673main ()
11674{
11675#ifndef _BIG_ENDIAN
11676		 not big endian
11677		#endif
11678
11679  ;
11680  return 0;
11681}
11682_ACEOF
11683if ac_fn_c_try_compile "$LINENO"; then :
11684  ac_cv_c_bigendian=yes
11685else
11686  ac_cv_c_bigendian=no
11687fi
11688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11689fi
11690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11691    fi
11692    if test $ac_cv_c_bigendian = unknown; then
11693      # Compile a test program.
11694      if test "$cross_compiling" = yes; then :
11695  # Try to guess by grepping values from an object file.
11696	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11697/* end confdefs.h.  */
11698short int ascii_mm[] =
11699		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11700		short int ascii_ii[] =
11701		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11702		int use_ascii (int i) {
11703		  return ascii_mm[i] + ascii_ii[i];
11704		}
11705		short int ebcdic_ii[] =
11706		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11707		short int ebcdic_mm[] =
11708		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11709		int use_ebcdic (int i) {
11710		  return ebcdic_mm[i] + ebcdic_ii[i];
11711		}
11712		extern int foo;
11713
11714int
11715main ()
11716{
11717return use_ascii (foo) == use_ebcdic (foo);
11718  ;
11719  return 0;
11720}
11721_ACEOF
11722if ac_fn_c_try_compile "$LINENO"; then :
11723  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11724	      ac_cv_c_bigendian=yes
11725	    fi
11726	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11727	      if test "$ac_cv_c_bigendian" = unknown; then
11728		ac_cv_c_bigendian=no
11729	      else
11730		# finding both strings is unlikely to happen, but who knows?
11731		ac_cv_c_bigendian=unknown
11732	      fi
11733	    fi
11734fi
11735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11736else
11737  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11738/* end confdefs.h.  */
11739$ac_includes_default
11740int
11741main ()
11742{
11743
11744	     /* Are we little or big endian?  From Harbison&Steele.  */
11745	     union
11746	     {
11747	       long int l;
11748	       char c[sizeof (long int)];
11749	     } u;
11750	     u.l = 1;
11751	     return u.c[sizeof (long int) - 1] == 1;
11752
11753  ;
11754  return 0;
11755}
11756_ACEOF
11757if ac_fn_c_try_run "$LINENO"; then :
11758  ac_cv_c_bigendian=no
11759else
11760  ac_cv_c_bigendian=yes
11761fi
11762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11763  conftest.$ac_objext conftest.beam conftest.$ac_ext
11764fi
11765
11766    fi
11767fi
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11769$as_echo "$ac_cv_c_bigendian" >&6; }
11770 case $ac_cv_c_bigendian in #(
11771   yes)
11772     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11773;; #(
11774   no)
11775      ;; #(
11776   universal)
11777
11778$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11779
11780     ;; #(
11781   *)
11782     as_fn_error $? "unknown endianness
11783 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11784 esac
11785
11786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11787$as_echo_n "checking for inline... " >&6; }
11788if ${ac_cv_c_inline+:} false; then :
11789  $as_echo_n "(cached) " >&6
11790else
11791  ac_cv_c_inline=no
11792for ac_kw in inline __inline__ __inline; do
11793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11794/* end confdefs.h.  */
11795#ifndef __cplusplus
11796typedef int foo_t;
11797static $ac_kw foo_t static_foo () {return 0; }
11798$ac_kw foo_t foo () {return 0; }
11799#endif
11800
11801_ACEOF
11802if ac_fn_c_try_compile "$LINENO"; then :
11803  ac_cv_c_inline=$ac_kw
11804fi
11805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11806  test "$ac_cv_c_inline" != no && break
11807done
11808
11809fi
11810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11811$as_echo "$ac_cv_c_inline" >&6; }
11812
11813case $ac_cv_c_inline in
11814  inline | yes) ;;
11815  *)
11816    case $ac_cv_c_inline in
11817      no) ac_val=;;
11818      *) ac_val=$ac_cv_c_inline;;
11819    esac
11820    cat >>confdefs.h <<_ACEOF
11821#ifndef __cplusplus
11822#define inline $ac_val
11823#endif
11824_ACEOF
11825    ;;
11826esac
11827
11828
11829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
11830$as_echo_n "checking for rlim_t... " >&6; }
11831if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
11832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
11833$as_echo "(cached) $ac_cv_type_rlim_t" >&6; }
11834else
11835  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11836/* end confdefs.h.  */
11837
11838#include <sys/types.h>
11839#if STDC_HEADERS
11840# include <stdlib.h>
11841# include <stddef.h>
11842#endif
11843#ifdef HAVE_SYS_RESOURCE_H
11844# include <sys/resource.h>
11845#endif
11846
11847_ACEOF
11848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11849  $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then :
11850  ac_cv_type_rlim_t=yes
11851else
11852  ac_cv_type_rlim_t=no
11853fi
11854rm -f conftest*
11855
11856	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
11857$as_echo "$ac_cv_type_rlim_t" >&6; }
11858fi
11859if test $ac_cv_type_rlim_t = no; then
11860  cat >> confdefs.h <<\EOF
11861#define rlim_t unsigned long
11862EOF
11863fi
11864
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
11866$as_echo_n "checking for stack_t... " >&6; }
11867if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
11868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
11869$as_echo "(cached) $ac_cv_type_stack_t" >&6; }
11870else
11871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11872/* end confdefs.h.  */
11873
11874#include <sys/types.h>
11875#if STDC_HEADERS
11876# include <stdlib.h>
11877# include <stddef.h>
11878#endif
11879#include <signal.h>
11880
11881_ACEOF
11882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11883  $EGREP "stack_t" >/dev/null 2>&1; then :
11884  ac_cv_type_stack_t=yes
11885else
11886  ac_cv_type_stack_t=no
11887fi
11888rm -f conftest*
11889
11890	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
11891$as_echo "$ac_cv_type_stack_t" >&6; }
11892fi
11893if test $ac_cv_type_stack_t = no; then
11894  cat >> confdefs.h <<\EOF
11895#define stack_t struct sigaltstack
11896EOF
11897fi
11898
11899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
11900$as_echo_n "checking whether stack_t has an ss_base field... " >&6; }
11901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11902/* end confdefs.h.  */
11903
11904#include <sys/types.h>
11905#if STDC_HEADERS
11906# include <stdlib.h>
11907# include <stddef.h>
11908#endif
11909#include <signal.h>
11910#include "confdefs.h"
11911
11912int
11913main ()
11914{
11915stack_t sigstk; sigstk.ss_base = 0;
11916  ;
11917  return 0;
11918}
11919_ACEOF
11920if ac_fn_c_try_compile "$LINENO"; then :
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11922$as_echo "yes" >&6; }; $as_echo "#define HAVE_SS_BASE 1" >>confdefs.h
11923
11924else
11925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11926$as_echo "no" >&6; }
11927fi
11928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11929
11930olibs="$LIBS"
11931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
11932$as_echo_n "checking --with-tlib argument... " >&6; }
11933
11934# Check whether --with-tlib was given.
11935if test "${with_tlib+set}" = set; then :
11936  withval=$with_tlib;
11937fi
11938
11939if test -n "$with_tlib"; then
11940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
11941$as_echo "$with_tlib" >&6; }
11942  LIBS="$LIBS -l$with_tlib"
11943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
11944$as_echo_n "checking for linking with $with_tlib library... " >&6; }
11945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946/* end confdefs.h.  */
11947
11948int
11949main ()
11950{
11951
11952  ;
11953  return 0;
11954}
11955_ACEOF
11956if ac_fn_c_try_link "$LINENO"; then :
11957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
11958$as_echo "OK" >&6; }
11959else
11960  as_fn_error $? "FAILED" "$LINENO" 5
11961fi
11962rm -f core conftest.err conftest.$ac_objext \
11963    conftest$ac_exeext conftest.$ac_ext
11964    olibs="$LIBS"
11965else
11966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
11967$as_echo "empty: automatic terminal library selection" >&6; }
11968                case "`uname -s 2>/dev/null`" in
11969	OSF1|SCO_SV)	tlibs="tinfo ncurses curses termlib termcap";;
11970	*)	tlibs="tinfo ncurses termlib termcap curses";;
11971  esac
11972  for libname in $tlibs; do
11973    as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh`
11974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
11975$as_echo_n "checking for tgetent in -l${libname}... " >&6; }
11976if eval \${$as_ac_Lib+:} false; then :
11977  $as_echo_n "(cached) " >&6
11978else
11979  ac_check_lib_save_LIBS=$LIBS
11980LIBS="-l${libname}  $LIBS"
11981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982/* end confdefs.h.  */
11983
11984/* Override any GCC internal prototype to avoid an error.
11985   Use char because int might match the return type of a GCC
11986   builtin and then its argument prototype would still apply.  */
11987#ifdef __cplusplus
11988extern "C"
11989#endif
11990char tgetent ();
11991int
11992main ()
11993{
11994return tgetent ();
11995  ;
11996  return 0;
11997}
11998_ACEOF
11999if ac_fn_c_try_link "$LINENO"; then :
12000  eval "$as_ac_Lib=yes"
12001else
12002  eval "$as_ac_Lib=no"
12003fi
12004rm -f core conftest.err conftest.$ac_objext \
12005    conftest$ac_exeext conftest.$ac_ext
12006LIBS=$ac_check_lib_save_LIBS
12007fi
12008eval ac_res=\$$as_ac_Lib
12009	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12010$as_echo "$ac_res" >&6; }
12011if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12012  cat >>confdefs.h <<_ACEOF
12013#define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
12014_ACEOF
12015
12016  LIBS="-l${libname} $LIBS"
12017
12018fi
12019
12020    if test "x$olibs" != "x$LIBS"; then
12021                        if test "$cross_compiling" = yes; then :
12022  res="FAIL"
12023else
12024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12025/* end confdefs.h.  */
12026
12027#ifdef HAVE_TERMCAP_H
12028# include <termcap.h>
12029#endif
12030#if STDC_HEADERS
12031# include <stdlib.h>
12032# include <stddef.h>
12033#endif
12034main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
12035_ACEOF
12036if ac_fn_c_try_run "$LINENO"; then :
12037  res="OK"
12038else
12039  res="FAIL"
12040fi
12041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12042  conftest.$ac_objext conftest.beam conftest.$ac_ext
12043fi
12044
12045      if test "$res" = "OK"; then
12046	break
12047      fi
12048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12049$as_echo "$libname library is not usable" >&6; }
12050      LIBS="$olibs"
12051    fi
12052  done
12053  if test "x$olibs" = "x$LIBS"; then
12054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12055$as_echo "no terminal library found" >&6; }
12056  fi
12057fi
12058
12059if test "x$olibs" = "x$LIBS"; then
12060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12061$as_echo_n "checking for tgetent()... " >&6; }
12062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12063/* end confdefs.h.  */
12064int tgetent(char *, const char *);
12065int
12066main ()
12067{
12068char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
12069  ;
12070  return 0;
12071}
12072_ACEOF
12073if ac_fn_c_try_link "$LINENO"; then :
12074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12075$as_echo "yes" >&6; }
12076else
12077  as_fn_error $? "NOT FOUND!
12078      You need to install a terminal library; for example ncurses.
12079      On Linux that would be the libncurses-dev package.
12080      Or specify the name of the library with --with-tlib." "$LINENO" 5
12081fi
12082rm -f core conftest.err conftest.$ac_objext \
12083    conftest$ac_exeext conftest.$ac_ext
12084fi
12085
12086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12087$as_echo_n "checking whether we talk terminfo... " >&6; }
12088if ${vim_cv_terminfo+:} false; then :
12089  $as_echo_n "(cached) " >&6
12090else
12091
12092    if test "$cross_compiling" = yes; then :
12093
12094      as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
12095
12096else
12097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12098/* end confdefs.h.  */
12099
12100#include "confdefs.h"
12101#ifdef HAVE_TERMCAP_H
12102# include <termcap.h>
12103#endif
12104#ifdef HAVE_STRING_H
12105# include <string.h>
12106#endif
12107#if STDC_HEADERS
12108# include <stdlib.h>
12109# include <stddef.h>
12110#endif
12111main()
12112{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
12113
12114_ACEOF
12115if ac_fn_c_try_run "$LINENO"; then :
12116
12117      vim_cv_terminfo=no
12118
12119else
12120
12121      vim_cv_terminfo=yes
12122
12123fi
12124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12125  conftest.$ac_objext conftest.beam conftest.$ac_ext
12126fi
12127
12128
12129fi
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12131$as_echo "$vim_cv_terminfo" >&6; }
12132
12133if test "x$vim_cv_terminfo" = "xyes" ; then
12134  $as_echo "#define TERMINFO 1" >>confdefs.h
12135
12136fi
12137
12138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12139$as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
12140if ${vim_cv_tgetent+:} false; then :
12141  $as_echo_n "(cached) " >&6
12142else
12143
12144    if test "$cross_compiling" = yes; then :
12145
12146      as_fn_error $? "failed to compile test program." "$LINENO" 5
12147
12148else
12149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150/* end confdefs.h.  */
12151
12152#include "confdefs.h"
12153#ifdef HAVE_TERMCAP_H
12154# include <termcap.h>
12155#endif
12156#if STDC_HEADERS
12157# include <stdlib.h>
12158# include <stddef.h>
12159#endif
12160main()
12161{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
12162
12163_ACEOF
12164if ac_fn_c_try_run "$LINENO"; then :
12165
12166      vim_cv_tgetent=zero
12167
12168else
12169
12170      vim_cv_tgetent=non-zero
12171
12172fi
12173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12174  conftest.$ac_objext conftest.beam conftest.$ac_ext
12175fi
12176
12177
12178fi
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12180$as_echo "$vim_cv_tgetent" >&6; }
12181
12182if test "x$vim_cv_tgetent" = "xzero" ; then
12183  $as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h
12184
12185fi
12186
12187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12188$as_echo_n "checking whether termcap.h contains ospeed... " >&6; }
12189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190/* end confdefs.h.  */
12191
12192#ifdef HAVE_TERMCAP_H
12193# include <termcap.h>
12194#endif
12195
12196int
12197main ()
12198{
12199ospeed = 20000
12200  ;
12201  return 0;
12202}
12203_ACEOF
12204if ac_fn_c_try_link "$LINENO"; then :
12205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12206$as_echo "yes" >&6; }; $as_echo "#define HAVE_OSPEED 1" >>confdefs.h
12207
12208else
12209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12210$as_echo "no" >&6; }
12211	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12212$as_echo_n "checking whether ospeed can be extern... " >&6; }
12213	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12214/* end confdefs.h.  */
12215
12216#ifdef HAVE_TERMCAP_H
12217# include <termcap.h>
12218#endif
12219extern short ospeed;
12220
12221int
12222main ()
12223{
12224ospeed = 20000
12225  ;
12226  return 0;
12227}
12228_ACEOF
12229if ac_fn_c_try_link "$LINENO"; then :
12230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12231$as_echo "yes" >&6; }; $as_echo "#define OSPEED_EXTERN 1" >>confdefs.h
12232
12233else
12234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12235$as_echo "no" >&6; }
12236fi
12237rm -f core conftest.err conftest.$ac_objext \
12238    conftest$ac_exeext conftest.$ac_ext
12239
12240fi
12241rm -f core conftest.err conftest.$ac_objext \
12242    conftest$ac_exeext conftest.$ac_ext
12243
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
12245$as_echo_n "checking whether termcap.h contains UP, BC and PC... " >&6; }
12246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247/* end confdefs.h.  */
12248
12249#ifdef HAVE_TERMCAP_H
12250# include <termcap.h>
12251#endif
12252
12253int
12254main ()
12255{
12256if (UP == 0 && BC == 0) PC = 1
12257  ;
12258  return 0;
12259}
12260_ACEOF
12261if ac_fn_c_try_link "$LINENO"; then :
12262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12263$as_echo "yes" >&6; }; $as_echo "#define HAVE_UP_BC_PC 1" >>confdefs.h
12264
12265else
12266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12267$as_echo "no" >&6; }
12268	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
12269$as_echo_n "checking whether UP, BC and PC can be extern... " >&6; }
12270	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12271/* end confdefs.h.  */
12272
12273#ifdef HAVE_TERMCAP_H
12274# include <termcap.h>
12275#endif
12276extern char *UP, *BC, PC;
12277
12278int
12279main ()
12280{
12281if (UP == 0 && BC == 0) PC = 1
12282  ;
12283  return 0;
12284}
12285_ACEOF
12286if ac_fn_c_try_link "$LINENO"; then :
12287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12288$as_echo "yes" >&6; }; $as_echo "#define UP_BC_PC_EXTERN 1" >>confdefs.h
12289
12290else
12291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12292$as_echo "no" >&6; }
12293fi
12294rm -f core conftest.err conftest.$ac_objext \
12295    conftest$ac_exeext conftest.$ac_ext
12296
12297fi
12298rm -f core conftest.err conftest.$ac_objext \
12299    conftest$ac_exeext conftest.$ac_ext
12300
12301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
12302$as_echo_n "checking whether tputs() uses outfuntype... " >&6; }
12303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12304/* end confdefs.h.  */
12305
12306#ifdef HAVE_TERMCAP_H
12307# include <termcap.h>
12308#endif
12309
12310int
12311main ()
12312{
12313extern int xx(); tputs("test", 1, (outfuntype)xx)
12314  ;
12315  return 0;
12316}
12317_ACEOF
12318if ac_fn_c_try_compile "$LINENO"; then :
12319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12320$as_echo "yes" >&6; }; $as_echo "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
12321
12322else
12323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12324$as_echo "no" >&6; }
12325fi
12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12327
12328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12329$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331/* end confdefs.h.  */
12332
12333#include <sys/types.h>
12334#include <sys/time.h>
12335#include <sys/select.h>
12336int
12337main ()
12338{
12339
12340  ;
12341  return 0;
12342}
12343_ACEOF
12344if ac_fn_c_try_compile "$LINENO"; then :
12345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12346$as_echo "yes" >&6; }
12347			$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
12348
12349else
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12351$as_echo "no" >&6; }
12352fi
12353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12354
12355
12356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
12357$as_echo_n "checking for /dev/ptc... " >&6; }
12358if test -r /dev/ptc; then
12359  $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
12360
12361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12362$as_echo "yes" >&6; }
12363else
12364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12365$as_echo "no" >&6; }
12366fi
12367
12368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
12369$as_echo_n "checking for SVR4 ptys... " >&6; }
12370if test -c /dev/ptmx ; then
12371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12372/* end confdefs.h.  */
12373
12374// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
12375char *ptsname(int);
12376int unlockpt(int);
12377int grantpt(int);
12378
12379int
12380main ()
12381{
12382
12383		ptsname(0);
12384		grantpt(0);
12385		unlockpt(0);
12386  ;
12387  return 0;
12388}
12389_ACEOF
12390if ac_fn_c_try_link "$LINENO"; then :
12391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12392$as_echo "yes" >&6; }; $as_echo "#define HAVE_SVR4_PTYS 1" >>confdefs.h
12393
12394else
12395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12396$as_echo "no" >&6; }
12397fi
12398rm -f core conftest.err conftest.$ac_objext \
12399    conftest$ac_exeext conftest.$ac_ext
12400else
12401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12402$as_echo "no" >&6; }
12403fi
12404
12405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
12406$as_echo_n "checking for ptyranges... " >&6; }
12407if test -d /dev/ptym ; then
12408  pdir='/dev/ptym'
12409else
12410  pdir='/dev'
12411fi
12412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12413/* end confdefs.h.  */
12414#ifdef M_UNIX
12415   yes;
12416#endif
12417
12418_ACEOF
12419if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12420  $EGREP "yes" >/dev/null 2>&1; then :
12421  ptys=`echo /dev/ptyp??`
12422else
12423  ptys=`echo $pdir/pty??`
12424fi
12425rm -f conftest*
12426
12427if test "$ptys" != "$pdir/pty??" ; then
12428  p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
12429  p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\012'`
12430  cat >>confdefs.h <<_ACEOF
12431#define PTYRANGE0 "$p0"
12432_ACEOF
12433
12434  cat >>confdefs.h <<_ACEOF
12435#define PTYRANGE1 "$p1"
12436_ACEOF
12437
12438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
12439$as_echo "$p0 / $p1" >&6; }
12440else
12441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
12442$as_echo "don't know" >&6; }
12443fi
12444
12445
12446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
12447$as_echo_n "checking return type of signal handlers... " >&6; }
12448if ${ac_cv_type_signal+:} false; then :
12449  $as_echo_n "(cached) " >&6
12450else
12451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12452/* end confdefs.h.  */
12453#include <sys/types.h>
12454#include <signal.h>
12455
12456int
12457main ()
12458{
12459return *(signal (0, 0)) (0) == 1;
12460  ;
12461  return 0;
12462}
12463_ACEOF
12464if ac_fn_c_try_compile "$LINENO"; then :
12465  ac_cv_type_signal=int
12466else
12467  ac_cv_type_signal=void
12468fi
12469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12470fi
12471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
12472$as_echo "$ac_cv_type_signal" >&6; }
12473
12474cat >>confdefs.h <<_ACEOF
12475#define RETSIGTYPE $ac_cv_type_signal
12476_ACEOF
12477
12478
12479
12480if test $ac_cv_type_signal = void; then
12481  $as_echo "#define SIGRETURN return" >>confdefs.h
12482
12483else
12484  $as_echo "#define SIGRETURN return 0" >>confdefs.h
12485
12486fi
12487
12488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
12489$as_echo_n "checking for struct sigcontext... " >&6; }
12490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12491/* end confdefs.h.  */
12492
12493#include <signal.h>
12494test_sig()
12495{
12496    struct sigcontext *scont;
12497    scont = (struct sigcontext *)0;
12498    return 1;
12499}
12500int
12501main ()
12502{
12503
12504  ;
12505  return 0;
12506}
12507_ACEOF
12508if ac_fn_c_try_compile "$LINENO"; then :
12509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12510$as_echo "yes" >&6; }
12511		$as_echo "#define HAVE_SIGCONTEXT 1" >>confdefs.h
12512
12513else
12514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12515$as_echo "no" >&6; }
12516fi
12517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12518
12519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
12520$as_echo_n "checking getcwd implementation is broken... " >&6; }
12521if ${vim_cv_getcwd_broken+:} false; then :
12522  $as_echo_n "(cached) " >&6
12523else
12524
12525    if test "$cross_compiling" = yes; then :
12526
12527      as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
12528
12529else
12530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12531/* end confdefs.h.  */
12532
12533#include "confdefs.h"
12534#ifdef HAVE_UNISTD_H
12535#include <unistd.h>
12536#endif
12537char *dagger[] = { "IFS=pwd", 0 };
12538main()
12539{
12540  char buffer[500];
12541  extern char **environ;
12542  environ = dagger;
12543  return getcwd(buffer, 500) ? 0 : 1;
12544}
12545
12546_ACEOF
12547if ac_fn_c_try_run "$LINENO"; then :
12548
12549      vim_cv_getcwd_broken=no
12550
12551else
12552
12553      vim_cv_getcwd_broken=yes
12554
12555fi
12556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12557  conftest.$ac_objext conftest.beam conftest.$ac_ext
12558fi
12559
12560
12561fi
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
12563$as_echo "$vim_cv_getcwd_broken" >&6; }
12564
12565if test "x$vim_cv_getcwd_broken" = "xyes" ; then
12566  $as_echo "#define BAD_GETCWD 1" >>confdefs.h
12567
12568  for ac_func in getwd
12569do :
12570  ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
12571if test "x$ac_cv_func_getwd" = xyes; then :
12572  cat >>confdefs.h <<_ACEOF
12573#define HAVE_GETWD 1
12574_ACEOF
12575
12576fi
12577done
12578
12579fi
12580
12581for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
12582	getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \
12583	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
12584	getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
12585	sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
12586	strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
12587	tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt
12588do :
12589  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12590ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12591if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12592  cat >>confdefs.h <<_ACEOF
12593#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12594_ACEOF
12595
12596fi
12597done
12598
12599for ac_header in sys/select.h sys/socket.h
12600do :
12601  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12602ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12603if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12604  cat >>confdefs.h <<_ACEOF
12605#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12606_ACEOF
12607
12608fi
12609
12610done
12611
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
12613$as_echo_n "checking types of arguments for select... " >&6; }
12614if ${ac_cv_func_select_args+:} false; then :
12615  $as_echo_n "(cached) " >&6
12616else
12617  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
12618 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
12619  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
12620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12621/* end confdefs.h.  */
12622$ac_includes_default
12623#ifdef HAVE_SYS_SELECT_H
12624# include <sys/select.h>
12625#endif
12626#ifdef HAVE_SYS_SOCKET_H
12627# include <sys/socket.h>
12628#endif
12629
12630int
12631main ()
12632{
12633extern int select ($ac_arg1,
12634					    $ac_arg234, $ac_arg234, $ac_arg234,
12635					    $ac_arg5);
12636  ;
12637  return 0;
12638}
12639_ACEOF
12640if ac_fn_c_try_compile "$LINENO"; then :
12641  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
12642fi
12643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12644  done
12645 done
12646done
12647# Provide a safe default value.
12648: "${ac_cv_func_select_args=int,int *,struct timeval *}"
12649
12650fi
12651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
12652$as_echo "$ac_cv_func_select_args" >&6; }
12653ac_save_IFS=$IFS; IFS=','
12654set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
12655IFS=$ac_save_IFS
12656shift
12657
12658cat >>confdefs.h <<_ACEOF
12659#define SELECT_TYPE_ARG1 $1
12660_ACEOF
12661
12662
12663cat >>confdefs.h <<_ACEOF
12664#define SELECT_TYPE_ARG234 ($2)
12665_ACEOF
12666
12667
12668cat >>confdefs.h <<_ACEOF
12669#define SELECT_TYPE_ARG5 ($3)
12670_ACEOF
12671
12672rm -f conftest*
12673
12674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12675$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12676if ${ac_cv_sys_largefile_source+:} false; then :
12677  $as_echo_n "(cached) " >&6
12678else
12679  while :; do
12680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12681/* end confdefs.h.  */
12682#include <sys/types.h> /* for off_t */
12683     #include <stdio.h>
12684int
12685main ()
12686{
12687int (*fp) (FILE *, off_t, int) = fseeko;
12688     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12689  ;
12690  return 0;
12691}
12692_ACEOF
12693if ac_fn_c_try_link "$LINENO"; then :
12694  ac_cv_sys_largefile_source=no; break
12695fi
12696rm -f core conftest.err conftest.$ac_objext \
12697    conftest$ac_exeext conftest.$ac_ext
12698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12699/* end confdefs.h.  */
12700#define _LARGEFILE_SOURCE 1
12701#include <sys/types.h> /* for off_t */
12702     #include <stdio.h>
12703int
12704main ()
12705{
12706int (*fp) (FILE *, off_t, int) = fseeko;
12707     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12708  ;
12709  return 0;
12710}
12711_ACEOF
12712if ac_fn_c_try_link "$LINENO"; then :
12713  ac_cv_sys_largefile_source=1; break
12714fi
12715rm -f core conftest.err conftest.$ac_objext \
12716    conftest$ac_exeext conftest.$ac_ext
12717  ac_cv_sys_largefile_source=unknown
12718  break
12719done
12720fi
12721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12722$as_echo "$ac_cv_sys_largefile_source" >&6; }
12723case $ac_cv_sys_largefile_source in #(
12724  no | unknown) ;;
12725  *)
12726cat >>confdefs.h <<_ACEOF
12727#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12728_ACEOF
12729;;
12730esac
12731rm -rf conftest*
12732
12733# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12734# in glibc 2.1.3, but that breaks too many other things.
12735# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12736if test $ac_cv_sys_largefile_source != unknown; then
12737
12738$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12739
12740fi
12741
12742
12743# Check whether --enable-largefile was given.
12744if test "${enable_largefile+set}" = set; then :
12745  enableval=$enable_largefile;
12746fi
12747
12748if test "$enable_largefile" != no; then
12749
12750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12751$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12752if ${ac_cv_sys_largefile_CC+:} false; then :
12753  $as_echo_n "(cached) " >&6
12754else
12755  ac_cv_sys_largefile_CC=no
12756     if test "$GCC" != yes; then
12757       ac_save_CC=$CC
12758       while :; do
12759	 # IRIX 6.2 and later do not support large files by default,
12760	 # so use the C compiler's -n32 option if that helps.
12761	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12762/* end confdefs.h.  */
12763#include <sys/types.h>
12764 /* Check that off_t can represent 2**63 - 1 correctly.
12765    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12766    since some C++ compilers masquerading as C compilers
12767    incorrectly reject 9223372036854775807.  */
12768#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12769  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12770		       && LARGE_OFF_T % 2147483647 == 1)
12771		      ? 1 : -1];
12772int
12773main ()
12774{
12775
12776  ;
12777  return 0;
12778}
12779_ACEOF
12780	 if ac_fn_c_try_compile "$LINENO"; then :
12781  break
12782fi
12783rm -f core conftest.err conftest.$ac_objext
12784	 CC="$CC -n32"
12785	 if ac_fn_c_try_compile "$LINENO"; then :
12786  ac_cv_sys_largefile_CC=' -n32'; break
12787fi
12788rm -f core conftest.err conftest.$ac_objext
12789	 break
12790       done
12791       CC=$ac_save_CC
12792       rm -f conftest.$ac_ext
12793    fi
12794fi
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12796$as_echo "$ac_cv_sys_largefile_CC" >&6; }
12797  if test "$ac_cv_sys_largefile_CC" != no; then
12798    CC=$CC$ac_cv_sys_largefile_CC
12799  fi
12800
12801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12802$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12803if ${ac_cv_sys_file_offset_bits+:} false; then :
12804  $as_echo_n "(cached) " >&6
12805else
12806  while :; do
12807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12808/* end confdefs.h.  */
12809#include <sys/types.h>
12810 /* Check that off_t can represent 2**63 - 1 correctly.
12811    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12812    since some C++ compilers masquerading as C compilers
12813    incorrectly reject 9223372036854775807.  */
12814#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12815  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12816		       && LARGE_OFF_T % 2147483647 == 1)
12817		      ? 1 : -1];
12818int
12819main ()
12820{
12821
12822  ;
12823  return 0;
12824}
12825_ACEOF
12826if ac_fn_c_try_compile "$LINENO"; then :
12827  ac_cv_sys_file_offset_bits=no; break
12828fi
12829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12831/* end confdefs.h.  */
12832#define _FILE_OFFSET_BITS 64
12833#include <sys/types.h>
12834 /* Check that off_t can represent 2**63 - 1 correctly.
12835    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12836    since some C++ compilers masquerading as C compilers
12837    incorrectly reject 9223372036854775807.  */
12838#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12839  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12840		       && LARGE_OFF_T % 2147483647 == 1)
12841		      ? 1 : -1];
12842int
12843main ()
12844{
12845
12846  ;
12847  return 0;
12848}
12849_ACEOF
12850if ac_fn_c_try_compile "$LINENO"; then :
12851  ac_cv_sys_file_offset_bits=64; break
12852fi
12853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12854  ac_cv_sys_file_offset_bits=unknown
12855  break
12856done
12857fi
12858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12859$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12860case $ac_cv_sys_file_offset_bits in #(
12861  no | unknown) ;;
12862  *)
12863cat >>confdefs.h <<_ACEOF
12864#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12865_ACEOF
12866;;
12867esac
12868rm -rf conftest*
12869  if test $ac_cv_sys_file_offset_bits = unknown; then
12870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12871$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12872if ${ac_cv_sys_large_files+:} false; then :
12873  $as_echo_n "(cached) " >&6
12874else
12875  while :; do
12876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877/* end confdefs.h.  */
12878#include <sys/types.h>
12879 /* Check that off_t can represent 2**63 - 1 correctly.
12880    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12881    since some C++ compilers masquerading as C compilers
12882    incorrectly reject 9223372036854775807.  */
12883#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12884  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12885		       && LARGE_OFF_T % 2147483647 == 1)
12886		      ? 1 : -1];
12887int
12888main ()
12889{
12890
12891  ;
12892  return 0;
12893}
12894_ACEOF
12895if ac_fn_c_try_compile "$LINENO"; then :
12896  ac_cv_sys_large_files=no; break
12897fi
12898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12900/* end confdefs.h.  */
12901#define _LARGE_FILES 1
12902#include <sys/types.h>
12903 /* Check that off_t can represent 2**63 - 1 correctly.
12904    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12905    since some C++ compilers masquerading as C compilers
12906    incorrectly reject 9223372036854775807.  */
12907#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12908  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12909		       && LARGE_OFF_T % 2147483647 == 1)
12910		      ? 1 : -1];
12911int
12912main ()
12913{
12914
12915  ;
12916  return 0;
12917}
12918_ACEOF
12919if ac_fn_c_try_compile "$LINENO"; then :
12920  ac_cv_sys_large_files=1; break
12921fi
12922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12923  ac_cv_sys_large_files=unknown
12924  break
12925done
12926fi
12927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12928$as_echo "$ac_cv_sys_large_files" >&6; }
12929case $ac_cv_sys_large_files in #(
12930  no | unknown) ;;
12931  *)
12932cat >>confdefs.h <<_ACEOF
12933#define _LARGE_FILES $ac_cv_sys_large_files
12934_ACEOF
12935;;
12936esac
12937rm -rf conftest*
12938  fi
12939
12940
12941fi
12942
12943
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
12945$as_echo_n "checking --enable-canberra argument... " >&6; }
12946# Check whether --enable-canberra was given.
12947if test "${enable_canberra+set}" = set; then :
12948  enableval=$enable_canberra;
12949else
12950  enable_canberra="maybe"
12951fi
12952
12953
12954if test "$enable_canberra" = "maybe"; then
12955  if test "$features" = "big" -o "$features" = "huge"; then
12956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
12957$as_echo "Defaulting to yes" >&6; }
12958    enable_canberra="yes"
12959  else
12960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
12961$as_echo "Defaulting to no" >&6; }
12962    enable_canberra="no"
12963  fi
12964else
12965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
12966$as_echo "$enable_canberra" >&6; }
12967fi
12968if test "$enable_canberra" = "yes"; then
12969  if test "x$PKG_CONFIG" != "xno"; then
12970    canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
12971    canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
12972  fi
12973  if test "x$canberra_lib" = "x"; then
12974    canberra_lib=-lcanberra
12975    canberra_cflags=-D_REENTRANT
12976  fi
12977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
12978$as_echo_n "checking for libcanberra... " >&6; }
12979  ac_save_CFLAGS="$CFLAGS"
12980  ac_save_LIBS="$LIBS"
12981  CFLAGS="$CFLAGS $canberra_cflags"
12982  LIBS="$LIBS $canberra_lib"
12983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984/* end confdefs.h.  */
12985
12986  # include <canberra.h>
12987
12988int
12989main ()
12990{
12991
12992     ca_context *hello;
12993     ca_context_create(&hello);
12994  ;
12995  return 0;
12996}
12997_ACEOF
12998if ac_fn_c_try_link "$LINENO"; then :
12999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13000$as_echo "yes" >&6; }; $as_echo "#define HAVE_CANBERRA 1" >>confdefs.h
13001
13002else
13003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
13004$as_echo "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
13005fi
13006rm -f core conftest.err conftest.$ac_objext \
13007    conftest$ac_exeext conftest.$ac_ext
13008fi
13009
13010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
13011$as_echo_n "checking --enable-libsodium argument... " >&6; }
13012# Check whether --enable-libsodium was given.
13013if test "${enable_libsodium+set}" = set; then :
13014  enableval=$enable_libsodium;
13015else
13016  enable_libsodium="maybe"
13017fi
13018
13019
13020if test "$enable_libsodium" = "maybe"; then
13021  if test "$features" = "big" -o "$features" = "huge"; then
13022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
13023$as_echo "Defaulting to yes" >&6; }
13024    enable_libsodium="yes"
13025  else
13026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
13027$as_echo "Defaulting to no" >&6; }
13028    enable_libsodium="no"
13029  fi
13030else
13031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
13032$as_echo "$enable_libsodium" >&6; }
13033fi
13034if test "$enable_libsodium" = "yes"; then
13035  if test "x$PKG_CONFIG" != "xno"; then
13036    libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
13037    libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
13038  fi
13039  if test "x$libsodium_lib" = "x"; then
13040    libsodium_lib=-lsodium
13041    libsodium_cflags=
13042  fi
13043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
13044$as_echo_n "checking for libsodium... " >&6; }
13045  ac_save_CFLAGS="$CFLAGS"
13046  ac_save_LIBS="$LIBS"
13047  CFLAGS="$CFLAGS $libsodium_cflags"
13048  LIBS="$LIBS $libsodium_lib"
13049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13050/* end confdefs.h.  */
13051
13052  # include <sodium.h>
13053
13054int
13055main ()
13056{
13057
13058     printf("%d", sodium_init());
13059  ;
13060  return 0;
13061}
13062_ACEOF
13063if ac_fn_c_try_link "$LINENO"; then :
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13065$as_echo "yes" >&6; }; $as_echo "#define HAVE_SODIUM 1" >>confdefs.h
13066
13067else
13068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
13069$as_echo "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
13070fi
13071rm -f core conftest.err conftest.$ac_objext \
13072    conftest$ac_exeext conftest.$ac_ext
13073fi
13074
13075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
13076$as_echo_n "checking for st_blksize... " >&6; }
13077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13078/* end confdefs.h.  */
13079#include <sys/types.h>
13080#include <sys/stat.h>
13081int
13082main ()
13083{
13084	struct stat st;
13085	int n;
13086
13087	stat("/", &st);
13088	n = (int)st.st_blksize;
13089  ;
13090  return 0;
13091}
13092_ACEOF
13093if ac_fn_c_try_compile "$LINENO"; then :
13094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13095$as_echo "yes" >&6; }; $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
13096
13097else
13098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099$as_echo "no" >&6; }
13100fi
13101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13102
13103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
13104$as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
13105if ${vim_cv_stat_ignores_slash+:} false; then :
13106  $as_echo_n "(cached) " >&6
13107else
13108
13109    if test "$cross_compiling" = yes; then :
13110
13111      as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
13112
13113else
13114  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115/* end confdefs.h.  */
13116
13117#include "confdefs.h"
13118#if STDC_HEADERS
13119# include <stdlib.h>
13120# include <stddef.h>
13121#endif
13122#include <sys/types.h>
13123#include <sys/stat.h>
13124main() {struct stat st;  exit(stat("configure/", &st) != 0); }
13125
13126_ACEOF
13127if ac_fn_c_try_run "$LINENO"; then :
13128
13129      vim_cv_stat_ignores_slash=yes
13130
13131else
13132
13133      vim_cv_stat_ignores_slash=no
13134
13135fi
13136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13137  conftest.$ac_objext conftest.beam conftest.$ac_ext
13138fi
13139
13140
13141fi
13142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
13143$as_echo "$vim_cv_stat_ignores_slash" >&6; }
13144
13145if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
13146  $as_echo "#define STAT_IGNORES_SLASH 1" >>confdefs.h
13147
13148fi
13149
13150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
13151$as_echo_n "checking for iconv_open()... " >&6; }
13152save_LIBS="$LIBS"
13153LIBS="$LIBS -liconv"
13154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13155/* end confdefs.h.  */
13156
13157#ifdef HAVE_ICONV_H
13158# include <iconv.h>
13159#endif
13160
13161int
13162main ()
13163{
13164iconv_open("fr", "to");
13165  ;
13166  return 0;
13167}
13168_ACEOF
13169if ac_fn_c_try_link "$LINENO"; then :
13170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
13171$as_echo "yes; with -liconv" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
13172
13173else
13174  LIBS="$save_LIBS"
13175    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13176/* end confdefs.h.  */
13177
13178#ifdef HAVE_ICONV_H
13179# include <iconv.h>
13180#endif
13181
13182int
13183main ()
13184{
13185iconv_open("fr", "to");
13186  ;
13187  return 0;
13188}
13189_ACEOF
13190if ac_fn_c_try_link "$LINENO"; then :
13191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13192$as_echo "yes" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
13193
13194else
13195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13196$as_echo "no" >&6; }
13197fi
13198rm -f core conftest.err conftest.$ac_objext \
13199    conftest$ac_exeext conftest.$ac_ext
13200fi
13201rm -f core conftest.err conftest.$ac_objext \
13202    conftest$ac_exeext conftest.$ac_ext
13203
13204
13205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
13206$as_echo_n "checking for nl_langinfo(CODESET)... " >&6; }
13207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13208/* end confdefs.h.  */
13209
13210#ifdef HAVE_LANGINFO_H
13211# include <langinfo.h>
13212#endif
13213
13214int
13215main ()
13216{
13217char *cs = nl_langinfo(CODESET);
13218  ;
13219  return 0;
13220}
13221_ACEOF
13222if ac_fn_c_try_link "$LINENO"; then :
13223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13224$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
13225
13226else
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13228$as_echo "no" >&6; }
13229fi
13230rm -f core conftest.err conftest.$ac_objext \
13231    conftest$ac_exeext conftest.$ac_ext
13232
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
13234$as_echo_n "checking for strtod in -lm... " >&6; }
13235if ${ac_cv_lib_m_strtod+:} false; then :
13236  $as_echo_n "(cached) " >&6
13237else
13238  ac_check_lib_save_LIBS=$LIBS
13239LIBS="-lm  $LIBS"
13240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13241/* end confdefs.h.  */
13242
13243/* Override any GCC internal prototype to avoid an error.
13244   Use char because int might match the return type of a GCC
13245   builtin and then its argument prototype would still apply.  */
13246#ifdef __cplusplus
13247extern "C"
13248#endif
13249char strtod ();
13250int
13251main ()
13252{
13253return strtod ();
13254  ;
13255  return 0;
13256}
13257_ACEOF
13258if ac_fn_c_try_link "$LINENO"; then :
13259  ac_cv_lib_m_strtod=yes
13260else
13261  ac_cv_lib_m_strtod=no
13262fi
13263rm -f core conftest.err conftest.$ac_objext \
13264    conftest$ac_exeext conftest.$ac_ext
13265LIBS=$ac_check_lib_save_LIBS
13266fi
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
13268$as_echo "$ac_cv_lib_m_strtod" >&6; }
13269if test "x$ac_cv_lib_m_strtod" = xyes; then :
13270  cat >>confdefs.h <<_ACEOF
13271#define HAVE_LIBM 1
13272_ACEOF
13273
13274  LIBS="-lm $LIBS"
13275
13276fi
13277
13278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod() and other floating point functions" >&5
13279$as_echo_n "checking for strtod() and other floating point functions... " >&6; }
13280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13281/* end confdefs.h.  */
13282
13283#ifdef HAVE_MATH_H
13284# include <math.h>
13285#endif
13286#if STDC_HEADERS
13287# include <stdlib.h>
13288# include <stddef.h>
13289#endif
13290
13291int
13292main ()
13293{
13294char *s; double d;
13295    d = strtod("1.1", &s);
13296    d = fabs(1.11);
13297    d = ceil(1.11);
13298    d = floor(1.11);
13299    d = log10(1.11);
13300    d = pow(1.11, 2.22);
13301    d = sqrt(1.11);
13302    d = sin(1.11);
13303    d = cos(1.11);
13304    d = atan(1.11);
13305
13306  ;
13307  return 0;
13308}
13309_ACEOF
13310if ac_fn_c_try_link "$LINENO"; then :
13311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13312$as_echo "yes" >&6; }; $as_echo "#define HAVE_FLOAT_FUNCS 1" >>confdefs.h
13313
13314else
13315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13316$as_echo "no" >&6; }
13317fi
13318rm -f core conftest.err conftest.$ac_objext \
13319    conftest$ac_exeext conftest.$ac_ext
13320
13321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
13322$as_echo_n "checking for isinf()... " >&6; }
13323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13324/* end confdefs.h.  */
13325
13326#ifdef HAVE_MATH_H
13327# include <math.h>
13328#endif
13329#if STDC_HEADERS
13330# include <stdlib.h>
13331# include <stddef.h>
13332#endif
13333
13334int
13335main ()
13336{
13337int r = isinf(1.11);
13338  ;
13339  return 0;
13340}
13341_ACEOF
13342if ac_fn_c_try_link "$LINENO"; then :
13343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13344$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13345
13346else
13347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13348$as_echo "no" >&6; }
13349fi
13350rm -f core conftest.err conftest.$ac_objext \
13351    conftest$ac_exeext conftest.$ac_ext
13352
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
13354$as_echo_n "checking for isnan()... " >&6; }
13355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13356/* end confdefs.h.  */
13357
13358#ifdef HAVE_MATH_H
13359# include <math.h>
13360#endif
13361#if STDC_HEADERS
13362# include <stdlib.h>
13363# include <stddef.h>
13364#endif
13365
13366int
13367main ()
13368{
13369int r = isnan(1.11);
13370  ;
13371  return 0;
13372}
13373_ACEOF
13374if ac_fn_c_try_link "$LINENO"; then :
13375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13376$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
13377
13378else
13379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13380$as_echo "no" >&6; }
13381fi
13382rm -f core conftest.err conftest.$ac_objext \
13383    conftest$ac_exeext conftest.$ac_ext
13384
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
13386$as_echo_n "checking --disable-acl argument... " >&6; }
13387# Check whether --enable-acl was given.
13388if test "${enable_acl+set}" = set; then :
13389  enableval=$enable_acl;
13390else
13391  enable_acl="yes"
13392fi
13393
13394if test "$enable_acl" = "yes"; then
13395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13396$as_echo "no" >&6; }
13397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
13398$as_echo_n "checking for acl_get_file in -lposix1e... " >&6; }
13399if ${ac_cv_lib_posix1e_acl_get_file+:} false; then :
13400  $as_echo_n "(cached) " >&6
13401else
13402  ac_check_lib_save_LIBS=$LIBS
13403LIBS="-lposix1e  $LIBS"
13404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13405/* end confdefs.h.  */
13406
13407/* Override any GCC internal prototype to avoid an error.
13408   Use char because int might match the return type of a GCC
13409   builtin and then its argument prototype would still apply.  */
13410#ifdef __cplusplus
13411extern "C"
13412#endif
13413char acl_get_file ();
13414int
13415main ()
13416{
13417return acl_get_file ();
13418  ;
13419  return 0;
13420}
13421_ACEOF
13422if ac_fn_c_try_link "$LINENO"; then :
13423  ac_cv_lib_posix1e_acl_get_file=yes
13424else
13425  ac_cv_lib_posix1e_acl_get_file=no
13426fi
13427rm -f core conftest.err conftest.$ac_objext \
13428    conftest$ac_exeext conftest.$ac_ext
13429LIBS=$ac_check_lib_save_LIBS
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
13432$as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; }
13433if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes; then :
13434  LIBS="$LIBS -lposix1e"
13435else
13436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
13437$as_echo_n "checking for acl_get_file in -lacl... " >&6; }
13438if ${ac_cv_lib_acl_acl_get_file+:} false; then :
13439  $as_echo_n "(cached) " >&6
13440else
13441  ac_check_lib_save_LIBS=$LIBS
13442LIBS="-lacl  $LIBS"
13443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h.  */
13445
13446/* Override any GCC internal prototype to avoid an error.
13447   Use char because int might match the return type of a GCC
13448   builtin and then its argument prototype would still apply.  */
13449#ifdef __cplusplus
13450extern "C"
13451#endif
13452char acl_get_file ();
13453int
13454main ()
13455{
13456return acl_get_file ();
13457  ;
13458  return 0;
13459}
13460_ACEOF
13461if ac_fn_c_try_link "$LINENO"; then :
13462  ac_cv_lib_acl_acl_get_file=yes
13463else
13464  ac_cv_lib_acl_acl_get_file=no
13465fi
13466rm -f core conftest.err conftest.$ac_objext \
13467    conftest$ac_exeext conftest.$ac_ext
13468LIBS=$ac_check_lib_save_LIBS
13469fi
13470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
13471$as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
13472if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then :
13473  LIBS="$LIBS -lacl"
13474		  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
13475$as_echo_n "checking for fgetxattr in -lattr... " >&6; }
13476if ${ac_cv_lib_attr_fgetxattr+:} false; then :
13477  $as_echo_n "(cached) " >&6
13478else
13479  ac_check_lib_save_LIBS=$LIBS
13480LIBS="-lattr  $LIBS"
13481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13482/* end confdefs.h.  */
13483
13484/* Override any GCC internal prototype to avoid an error.
13485   Use char because int might match the return type of a GCC
13486   builtin and then its argument prototype would still apply.  */
13487#ifdef __cplusplus
13488extern "C"
13489#endif
13490char fgetxattr ();
13491int
13492main ()
13493{
13494return fgetxattr ();
13495  ;
13496  return 0;
13497}
13498_ACEOF
13499if ac_fn_c_try_link "$LINENO"; then :
13500  ac_cv_lib_attr_fgetxattr=yes
13501else
13502  ac_cv_lib_attr_fgetxattr=no
13503fi
13504rm -f core conftest.err conftest.$ac_objext \
13505    conftest$ac_exeext conftest.$ac_ext
13506LIBS=$ac_check_lib_save_LIBS
13507fi
13508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
13509$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
13510if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
13511  LIBS="$LIBS -lattr"
13512fi
13513
13514fi
13515
13516fi
13517
13518
13519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
13520$as_echo_n "checking for POSIX ACL support... " >&6; }
13521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13522/* end confdefs.h.  */
13523
13524#include <sys/types.h>
13525#ifdef HAVE_SYS_ACL_H
13526# include <sys/acl.h>
13527#endif
13528acl_t acl;
13529int
13530main ()
13531{
13532acl = acl_get_file("foo", ACL_TYPE_ACCESS);
13533	acl_set_file("foo", ACL_TYPE_ACCESS, acl);
13534	acl_free(acl);
13535  ;
13536  return 0;
13537}
13538_ACEOF
13539if ac_fn_c_try_link "$LINENO"; then :
13540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13541$as_echo "yes" >&6; }; $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
13542
13543else
13544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13545$as_echo "no" >&6; }
13546fi
13547rm -f core conftest.err conftest.$ac_objext \
13548    conftest$ac_exeext conftest.$ac_ext
13549
13550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
13551$as_echo_n "checking for acl_get in -lsec... " >&6; }
13552if ${ac_cv_lib_sec_acl_get+:} false; then :
13553  $as_echo_n "(cached) " >&6
13554else
13555  ac_check_lib_save_LIBS=$LIBS
13556LIBS="-lsec  $LIBS"
13557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13558/* end confdefs.h.  */
13559
13560/* Override any GCC internal prototype to avoid an error.
13561   Use char because int might match the return type of a GCC
13562   builtin and then its argument prototype would still apply.  */
13563#ifdef __cplusplus
13564extern "C"
13565#endif
13566char acl_get ();
13567int
13568main ()
13569{
13570return acl_get ();
13571  ;
13572  return 0;
13573}
13574_ACEOF
13575if ac_fn_c_try_link "$LINENO"; then :
13576  ac_cv_lib_sec_acl_get=yes
13577else
13578  ac_cv_lib_sec_acl_get=no
13579fi
13580rm -f core conftest.err conftest.$ac_objext \
13581    conftest$ac_exeext conftest.$ac_ext
13582LIBS=$ac_check_lib_save_LIBS
13583fi
13584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
13585$as_echo "$ac_cv_lib_sec_acl_get" >&6; }
13586if test "x$ac_cv_lib_sec_acl_get" = xyes; then :
13587  LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
13588
13589else
13590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
13591$as_echo_n "checking for Solaris ACL support... " >&6; }
13592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13593/* end confdefs.h.  */
13594
13595#ifdef HAVE_SYS_ACL_H
13596# include <sys/acl.h>
13597#endif
13598int
13599main ()
13600{
13601acl("foo", GETACLCNT, 0, NULL);
13602
13603  ;
13604  return 0;
13605}
13606_ACEOF
13607if ac_fn_c_try_link "$LINENO"; then :
13608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13609$as_echo "yes" >&6; }; $as_echo "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
13610
13611else
13612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13613$as_echo "no" >&6; }
13614fi
13615rm -f core conftest.err conftest.$ac_objext \
13616    conftest$ac_exeext conftest.$ac_ext
13617fi
13618
13619
13620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
13621$as_echo_n "checking for AIX ACL support... " >&6; }
13622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13623/* end confdefs.h.  */
13624
13625#if STDC_HEADERS
13626# include <stdlib.h>
13627# include <stddef.h>
13628#endif
13629#ifdef HAVE_SYS_ACL_H
13630# include <sys/acl.h>
13631#endif
13632#ifdef HAVE_SYS_ACCESS_H
13633# include <sys/access.h>
13634#endif
13635#define _ALL_SOURCE
13636
13637#include <sys/stat.h>
13638
13639int aclsize;
13640struct acl *aclent;
13641int
13642main ()
13643{
13644aclsize = sizeof(struct acl);
13645	aclent = (void *)malloc(aclsize);
13646	statacl("foo", STX_NORMAL, aclent, aclsize);
13647
13648  ;
13649  return 0;
13650}
13651_ACEOF
13652if ac_fn_c_try_link "$LINENO"; then :
13653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13654$as_echo "yes" >&6; }; $as_echo "#define HAVE_AIX_ACL 1" >>confdefs.h
13655
13656else
13657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13658$as_echo "no" >&6; }
13659fi
13660rm -f core conftest.err conftest.$ac_objext \
13661    conftest$ac_exeext conftest.$ac_ext
13662else
13663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13664$as_echo "yes" >&6; }
13665fi
13666
13667if test "x$GTK_CFLAGS" != "x"; then
13668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
13669$as_echo_n "checking for pango_shape_full... " >&6; }
13670  ac_save_CFLAGS="$CFLAGS"
13671  ac_save_LIBS="$LIBS"
13672  CFLAGS="$CFLAGS $GTK_CFLAGS"
13673  LIBS="$LIBS $GTK_LIBS"
13674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675/* end confdefs.h.  */
13676#include <gtk/gtk.h>
13677int
13678main ()
13679{
13680 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
13681  ;
13682  return 0;
13683}
13684_ACEOF
13685if ac_fn_c_try_link "$LINENO"; then :
13686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13687$as_echo "yes" >&6; }; $as_echo "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
13688
13689else
13690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13691$as_echo "no" >&6; }
13692fi
13693rm -f core conftest.err conftest.$ac_objext \
13694    conftest$ac_exeext conftest.$ac_ext
13695  CFLAGS="$ac_save_CFLAGS"
13696  LIBS="$ac_save_LIBS"
13697fi
13698
13699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gpm argument" >&5
13700$as_echo_n "checking --disable-gpm argument... " >&6; }
13701# Check whether --enable-gpm was given.
13702if test "${enable_gpm+set}" = set; then :
13703  enableval=$enable_gpm;
13704else
13705  enable_gpm="yes"
13706fi
13707
13708
13709if test "$enable_gpm" = "yes"; then
13710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13711$as_echo "no" >&6; }
13712    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
13713$as_echo_n "checking for gpm... " >&6; }
13714if ${vi_cv_have_gpm+:} false; then :
13715  $as_echo_n "(cached) " >&6
13716else
13717  olibs="$LIBS" ; LIBS="-lgpm"
13718	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13719/* end confdefs.h.  */
13720#include <gpm.h>
13721	    #include <linux/keyboard.h>
13722int
13723main ()
13724{
13725Gpm_GetLibVersion(NULL);
13726  ;
13727  return 0;
13728}
13729_ACEOF
13730if ac_fn_c_try_link "$LINENO"; then :
13731  	    	    vi_cv_have_gpm=yes
13732else
13733  vi_cv_have_gpm=no
13734fi
13735rm -f core conftest.err conftest.$ac_objext \
13736    conftest$ac_exeext conftest.$ac_ext
13737	LIBS="$olibs"
13738
13739fi
13740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
13741$as_echo "$vi_cv_have_gpm" >&6; }
13742  if test $vi_cv_have_gpm = yes; then
13743    LIBS="$LIBS -lgpm"
13744    $as_echo "#define HAVE_GPM 1" >>confdefs.h
13745
13746  fi
13747else
13748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13749$as_echo "yes" >&6; }
13750fi
13751
13752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
13753$as_echo_n "checking --disable-sysmouse argument... " >&6; }
13754# Check whether --enable-sysmouse was given.
13755if test "${enable_sysmouse+set}" = set; then :
13756  enableval=$enable_sysmouse;
13757else
13758  enable_sysmouse="yes"
13759fi
13760
13761
13762if test "$enable_sysmouse" = "yes"; then
13763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13764$as_echo "no" >&6; }
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
13766$as_echo_n "checking for sysmouse... " >&6; }
13767if ${vi_cv_have_sysmouse+:} false; then :
13768  $as_echo_n "(cached) " >&6
13769else
13770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13771/* end confdefs.h.  */
13772#include <sys/consio.h>
13773	     #include <signal.h>
13774	     #include <sys/fbio.h>
13775int
13776main ()
13777{
13778struct mouse_info   mouse;
13779	     mouse.operation = MOUSE_MODE;
13780	     mouse.operation = MOUSE_SHOW;
13781	     mouse.u.mode.mode = 0;
13782	     mouse.u.mode.signal = SIGUSR2;
13783  ;
13784  return 0;
13785}
13786_ACEOF
13787if ac_fn_c_try_link "$LINENO"; then :
13788  vi_cv_have_sysmouse=yes
13789else
13790  vi_cv_have_sysmouse=no
13791fi
13792rm -f core conftest.err conftest.$ac_objext \
13793    conftest$ac_exeext conftest.$ac_ext
13794
13795fi
13796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
13797$as_echo "$vi_cv_have_sysmouse" >&6; }
13798  if test $vi_cv_have_sysmouse = yes; then
13799    $as_echo "#define HAVE_SYSMOUSE 1" >>confdefs.h
13800
13801  fi
13802else
13803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13804$as_echo "yes" >&6; }
13805fi
13806
13807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
13808$as_echo_n "checking for FD_CLOEXEC... " >&6; }
13809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13810/* end confdefs.h.  */
13811#if HAVE_FCNTL_H
13812# include <fcntl.h>
13813#endif
13814int
13815main ()
13816{
13817	int flag = FD_CLOEXEC;
13818  ;
13819  return 0;
13820}
13821_ACEOF
13822if ac_fn_c_try_compile "$LINENO"; then :
13823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13824$as_echo "yes" >&6; }; $as_echo "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
13825
13826else
13827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13828$as_echo "not usable" >&6; }
13829fi
13830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13831
13832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
13833$as_echo_n "checking for rename... " >&6; }
13834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13835/* end confdefs.h.  */
13836#include <stdio.h>
13837int
13838main ()
13839{
13840rename("this", "that")
13841  ;
13842  return 0;
13843}
13844_ACEOF
13845if ac_fn_c_try_link "$LINENO"; then :
13846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13847$as_echo "yes" >&6; }; $as_echo "#define HAVE_RENAME 1" >>confdefs.h
13848
13849else
13850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13851$as_echo "no" >&6; }
13852fi
13853rm -f core conftest.err conftest.$ac_objext \
13854    conftest$ac_exeext conftest.$ac_ext
13855
13856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
13857$as_echo_n "checking for dirfd... " >&6; }
13858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13859/* end confdefs.h.  */
13860#include <sys/types.h>
13861#include <dirent.h>
13862int
13863main ()
13864{
13865DIR * dir=opendir("dirname"); dirfd(dir);
13866  ;
13867  return 0;
13868}
13869_ACEOF
13870if ac_fn_c_try_link "$LINENO"; then :
13871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13872$as_echo "yes" >&6; }; $as_echo "#define HAVE_DIRFD 1" >>confdefs.h
13873
13874else
13875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13876$as_echo "not usable" >&6; }
13877fi
13878rm -f core conftest.err conftest.$ac_objext \
13879    conftest$ac_exeext conftest.$ac_ext
13880
13881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
13882$as_echo_n "checking for flock... " >&6; }
13883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13884/* end confdefs.h.  */
13885#include <sys/file.h>
13886int
13887main ()
13888{
13889flock(10, LOCK_SH);
13890  ;
13891  return 0;
13892}
13893_ACEOF
13894if ac_fn_c_try_link "$LINENO"; then :
13895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13896$as_echo "yes" >&6; }; $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
13897
13898else
13899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13900$as_echo "not usable" >&6; }
13901fi
13902rm -f core conftest.err conftest.$ac_objext \
13903    conftest$ac_exeext conftest.$ac_ext
13904
13905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
13906$as_echo_n "checking for sysctl... " >&6; }
13907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13908/* end confdefs.h.  */
13909#include <sys/types.h>
13910#include <sys/sysctl.h>
13911int
13912main ()
13913{
13914	int mib[2], r;
13915	size_t len;
13916
13917	mib[0] = CTL_HW;
13918	mib[1] = HW_USERMEM;
13919	len = sizeof(r);
13920	(void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
13921
13922  ;
13923  return 0;
13924}
13925_ACEOF
13926if ac_fn_c_try_compile "$LINENO"; then :
13927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13928$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCTL 1" >>confdefs.h
13929
13930else
13931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13932$as_echo "not usable" >&6; }
13933fi
13934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13935
13936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
13937$as_echo_n "checking for sysinfo... " >&6; }
13938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13939/* end confdefs.h.  */
13940#include <sys/types.h>
13941#include <sys/sysinfo.h>
13942int
13943main ()
13944{
13945	struct sysinfo sinfo;
13946	int t;
13947
13948	(void)sysinfo(&sinfo);
13949	t = sinfo.totalram;
13950
13951  ;
13952  return 0;
13953}
13954_ACEOF
13955if ac_fn_c_try_compile "$LINENO"; then :
13956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13957$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO 1" >>confdefs.h
13958
13959else
13960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13961$as_echo "not usable" >&6; }
13962fi
13963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13964
13965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
13966$as_echo_n "checking for sysinfo.mem_unit... " >&6; }
13967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13968/* end confdefs.h.  */
13969#include <sys/types.h>
13970#include <sys/sysinfo.h>
13971int
13972main ()
13973{
13974	struct sysinfo sinfo;
13975	sinfo.mem_unit = 1;
13976
13977  ;
13978  return 0;
13979}
13980_ACEOF
13981if ac_fn_c_try_compile "$LINENO"; then :
13982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13983$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
13984
13985else
13986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13987$as_echo "no" >&6; }
13988fi
13989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13990
13991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
13992$as_echo_n "checking for sysinfo.uptime... " >&6; }
13993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994/* end confdefs.h.  */
13995#include <sys/types.h>
13996#include <sys/sysinfo.h>
13997int
13998main ()
13999{
14000	struct sysinfo sinfo;
14001        long ut;
14002
14003	(void)sysinfo(&sinfo);
14004	ut = sinfo.uptime;
14005
14006  ;
14007  return 0;
14008}
14009_ACEOF
14010if ac_fn_c_try_compile "$LINENO"; then :
14011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14012$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
14013
14014else
14015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14016$as_echo "no" >&6; }
14017fi
14018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14019
14020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
14021$as_echo_n "checking for sysconf... " >&6; }
14022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023/* end confdefs.h.  */
14024#include <unistd.h>
14025int
14026main ()
14027{
14028	(void)sysconf(_SC_PAGESIZE);
14029	(void)sysconf(_SC_PHYS_PAGES);
14030
14031  ;
14032  return 0;
14033}
14034_ACEOF
14035if ac_fn_c_try_compile "$LINENO"; then :
14036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14037$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCONF 1" >>confdefs.h
14038
14039else
14040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
14041$as_echo "not usable" >&6; }
14042fi
14043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14044
14045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
14046$as_echo_n "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
14047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14048/* end confdefs.h.  */
14049#include <unistd.h>
14050int
14051main ()
14052{
14053	(void)sysconf(_SC_SIGSTKSZ);
14054
14055  ;
14056  return 0;
14057}
14058_ACEOF
14059if ac_fn_c_try_compile "$LINENO"; then :
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14061$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
14062
14063else
14064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
14065$as_echo "not usable" >&6; }
14066fi
14067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14068
14069# The cast to long int works around a bug in the HP C Compiler
14070# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14071# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14072# This bug is HP SR number 8606223364.
14073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
14074$as_echo_n "checking size of int... " >&6; }
14075if ${ac_cv_sizeof_int+:} false; then :
14076  $as_echo_n "(cached) " >&6
14077else
14078  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
14079
14080else
14081  if test "$ac_cv_type_int" = yes; then
14082     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14084as_fn_error 77 "cannot compute sizeof (int)
14085See \`config.log' for more details" "$LINENO" 5; }
14086   else
14087     ac_cv_sizeof_int=0
14088   fi
14089fi
14090
14091fi
14092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
14093$as_echo "$ac_cv_sizeof_int" >&6; }
14094
14095
14096
14097cat >>confdefs.h <<_ACEOF
14098#define SIZEOF_INT $ac_cv_sizeof_int
14099_ACEOF
14100
14101
14102# The cast to long int works around a bug in the HP C Compiler
14103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14105# This bug is HP SR number 8606223364.
14106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
14107$as_echo_n "checking size of long... " >&6; }
14108if ${ac_cv_sizeof_long+:} false; then :
14109  $as_echo_n "(cached) " >&6
14110else
14111  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
14112
14113else
14114  if test "$ac_cv_type_long" = yes; then
14115     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14116$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14117as_fn_error 77 "cannot compute sizeof (long)
14118See \`config.log' for more details" "$LINENO" 5; }
14119   else
14120     ac_cv_sizeof_long=0
14121   fi
14122fi
14123
14124fi
14125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
14126$as_echo "$ac_cv_sizeof_long" >&6; }
14127
14128
14129
14130cat >>confdefs.h <<_ACEOF
14131#define SIZEOF_LONG $ac_cv_sizeof_long
14132_ACEOF
14133
14134
14135# The cast to long int works around a bug in the HP C Compiler
14136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14138# This bug is HP SR number 8606223364.
14139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
14140$as_echo_n "checking size of time_t... " >&6; }
14141if ${ac_cv_sizeof_time_t+:} false; then :
14142  $as_echo_n "(cached) " >&6
14143else
14144  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
14145
14146else
14147  if test "$ac_cv_type_time_t" = yes; then
14148     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14149$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14150as_fn_error 77 "cannot compute sizeof (time_t)
14151See \`config.log' for more details" "$LINENO" 5; }
14152   else
14153     ac_cv_sizeof_time_t=0
14154   fi
14155fi
14156
14157fi
14158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14159$as_echo "$ac_cv_sizeof_time_t" >&6; }
14160
14161
14162
14163cat >>confdefs.h <<_ACEOF
14164#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14165_ACEOF
14166
14167
14168# The cast to long int works around a bug in the HP C Compiler
14169# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14170# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14171# This bug is HP SR number 8606223364.
14172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14173$as_echo_n "checking size of off_t... " >&6; }
14174if ${ac_cv_sizeof_off_t+:} false; then :
14175  $as_echo_n "(cached) " >&6
14176else
14177  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14178
14179else
14180  if test "$ac_cv_type_off_t" = yes; then
14181     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14183as_fn_error 77 "cannot compute sizeof (off_t)
14184See \`config.log' for more details" "$LINENO" 5; }
14185   else
14186     ac_cv_sizeof_off_t=0
14187   fi
14188fi
14189
14190fi
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14192$as_echo "$ac_cv_sizeof_off_t" >&6; }
14193
14194
14195
14196cat >>confdefs.h <<_ACEOF
14197#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14198_ACEOF
14199
14200
14201
14202cat >>confdefs.h <<_ACEOF
14203#define VIM_SIZEOF_INT $ac_cv_sizeof_int
14204_ACEOF
14205
14206cat >>confdefs.h <<_ACEOF
14207#define VIM_SIZEOF_LONG $ac_cv_sizeof_long
14208_ACEOF
14209
14210
14211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
14212$as_echo_n "checking uint32_t is 32 bits... " >&6; }
14213if test "$cross_compiling" = yes; then :
14214  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
14215$as_echo "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
14216else
14217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14218/* end confdefs.h.  */
14219
14220#ifdef HAVE_STDINT_H
14221# include <stdint.h>
14222#endif
14223#ifdef HAVE_INTTYPES_H
14224# include <inttypes.h>
14225#endif
14226main() {
14227  uint32_t nr1 = (uint32_t)-1;
14228  uint32_t nr2 = (uint32_t)0xffffffffUL;
14229  if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
14230  return 0;
14231}
14232_ACEOF
14233if ac_fn_c_try_run "$LINENO"; then :
14234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14235$as_echo "ok" >&6; }
14236else
14237  as_fn_error $? "WRONG!  uint32_t not defined correctly." "$LINENO" 5
14238fi
14239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14240  conftest.$ac_objext conftest.beam conftest.$ac_ext
14241fi
14242
14243
14244
14245bcopy_test_prog='
14246#include "confdefs.h"
14247#ifdef HAVE_STRING_H
14248# include <string.h>
14249#endif
14250#if STDC_HEADERS
14251# include <stdlib.h>
14252# include <stddef.h>
14253#endif
14254main() {
14255  char buf[10];
14256  strcpy(buf, "abcdefghi");
14257  mch_memmove(buf, buf + 2, 3);
14258  if (strncmp(buf, "ababcf", 6))
14259    exit(1);
14260  strcpy(buf, "abcdefghi");
14261  mch_memmove(buf + 2, buf, 3);
14262  if (strncmp(buf, "cdedef", 6))
14263    exit(1);
14264  exit(0); /* libc version works properly.  */
14265}'
14266
14267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
14268$as_echo_n "checking whether memmove handles overlaps... " >&6; }
14269if ${vim_cv_memmove_handles_overlap+:} false; then :
14270  $as_echo_n "(cached) " >&6
14271else
14272
14273    if test "$cross_compiling" = yes; then :
14274
14275	as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
14276
14277else
14278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14279/* end confdefs.h.  */
14280#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
14281_ACEOF
14282if ac_fn_c_try_run "$LINENO"; then :
14283
14284	vim_cv_memmove_handles_overlap=yes
14285
14286else
14287
14288	vim_cv_memmove_handles_overlap=no
14289
14290fi
14291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14292  conftest.$ac_objext conftest.beam conftest.$ac_ext
14293fi
14294
14295
14296fi
14297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
14298$as_echo "$vim_cv_memmove_handles_overlap" >&6; }
14299
14300if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
14301  $as_echo "#define USEMEMMOVE 1" >>confdefs.h
14302
14303else
14304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
14305$as_echo_n "checking whether bcopy handles overlaps... " >&6; }
14306if ${vim_cv_bcopy_handles_overlap+:} false; then :
14307  $as_echo_n "(cached) " >&6
14308else
14309
14310      if test "$cross_compiling" = yes; then :
14311
14312	as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
14313
14314else
14315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14316/* end confdefs.h.  */
14317#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
14318_ACEOF
14319if ac_fn_c_try_run "$LINENO"; then :
14320
14321	vim_cv_bcopy_handles_overlap=yes
14322
14323else
14324
14325	vim_cv_bcopy_handles_overlap=no
14326
14327fi
14328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14329  conftest.$ac_objext conftest.beam conftest.$ac_ext
14330fi
14331
14332
14333fi
14334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
14335$as_echo "$vim_cv_bcopy_handles_overlap" >&6; }
14336
14337  if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
14338    $as_echo "#define USEBCOPY 1" >>confdefs.h
14339
14340  else
14341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
14342$as_echo_n "checking whether memcpy handles overlaps... " >&6; }
14343if ${vim_cv_memcpy_handles_overlap+:} false; then :
14344  $as_echo_n "(cached) " >&6
14345else
14346
14347	if test "$cross_compiling" = yes; then :
14348
14349	    as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
14350
14351else
14352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14353/* end confdefs.h.  */
14354#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
14355_ACEOF
14356if ac_fn_c_try_run "$LINENO"; then :
14357
14358	    vim_cv_memcpy_handles_overlap=yes
14359
14360else
14361
14362	    vim_cv_memcpy_handles_overlap=no
14363
14364fi
14365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14366  conftest.$ac_objext conftest.beam conftest.$ac_ext
14367fi
14368
14369
14370fi
14371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
14372$as_echo "$vim_cv_memcpy_handles_overlap" >&6; }
14373
14374    if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
14375      $as_echo "#define USEMEMCPY 1" >>confdefs.h
14376
14377    fi
14378  fi
14379fi
14380
14381
14382if test "x$with_x" = "xyes"; then
14383  cflags_save=$CFLAGS
14384  libs_save=$LIBS
14385  LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
14386  CFLAGS="$CFLAGS $X_CFLAGS"
14387
14388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
14389$as_echo_n "checking whether X_LOCALE needed... " >&6; }
14390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14391/* end confdefs.h.  */
14392#include <X11/Xlocale.h>
14393int
14394main ()
14395{
14396
14397  ;
14398  return 0;
14399}
14400_ACEOF
14401if ac_fn_c_try_compile "$LINENO"; then :
14402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14403/* end confdefs.h.  */
14404
14405/* Override any GCC internal prototype to avoid an error.
14406   Use char because int might match the return type of a GCC
14407   builtin and then its argument prototype would still apply.  */
14408#ifdef __cplusplus
14409extern "C"
14410#endif
14411char _Xsetlocale ();
14412int
14413main ()
14414{
14415return _Xsetlocale ();
14416  ;
14417  return 0;
14418}
14419_ACEOF
14420if ac_fn_c_try_link "$LINENO"; then :
14421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14422$as_echo "yes" >&6; }
14423	      $as_echo "#define X_LOCALE 1" >>confdefs.h
14424
14425else
14426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14427$as_echo "no" >&6; }
14428fi
14429rm -f core conftest.err conftest.$ac_objext \
14430    conftest$ac_exeext conftest.$ac_ext
14431else
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14433$as_echo "no" >&6; }
14434fi
14435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14436
14437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
14438$as_echo_n "checking whether Xutf8SetWMProperties() can be used... " >&6; }
14439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14440/* end confdefs.h.  */
14441
14442/* Override any GCC internal prototype to avoid an error.
14443   Use char because int might match the return type of a GCC
14444   builtin and then its argument prototype would still apply.  */
14445#ifdef __cplusplus
14446extern "C"
14447#endif
14448char Xutf8SetWMProperties ();
14449int
14450main ()
14451{
14452return Xutf8SetWMProperties ();
14453  ;
14454  return 0;
14455}
14456_ACEOF
14457if ac_fn_c_try_link "$LINENO"; then :
14458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14459$as_echo "yes" >&6; }
14460	      $as_echo "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
14461
14462else
14463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14464$as_echo "no" >&6; }
14465fi
14466rm -f core conftest.err conftest.$ac_objext \
14467    conftest$ac_exeext conftest.$ac_ext
14468
14469  CFLAGS=$cflags_save
14470  LIBS=$libs_save
14471fi
14472
14473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
14474$as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
14475if ${ac_cv_lib_xpg4__xpg4_setrunelocale+:} false; then :
14476  $as_echo_n "(cached) " >&6
14477else
14478  ac_check_lib_save_LIBS=$LIBS
14479LIBS="-lxpg4  $LIBS"
14480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14481/* end confdefs.h.  */
14482
14483/* Override any GCC internal prototype to avoid an error.
14484   Use char because int might match the return type of a GCC
14485   builtin and then its argument prototype would still apply.  */
14486#ifdef __cplusplus
14487extern "C"
14488#endif
14489char _xpg4_setrunelocale ();
14490int
14491main ()
14492{
14493return _xpg4_setrunelocale ();
14494  ;
14495  return 0;
14496}
14497_ACEOF
14498if ac_fn_c_try_link "$LINENO"; then :
14499  ac_cv_lib_xpg4__xpg4_setrunelocale=yes
14500else
14501  ac_cv_lib_xpg4__xpg4_setrunelocale=no
14502fi
14503rm -f core conftest.err conftest.$ac_objext \
14504    conftest$ac_exeext conftest.$ac_ext
14505LIBS=$ac_check_lib_save_LIBS
14506fi
14507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
14508$as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
14509if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes; then :
14510  LIBS="$LIBS -lxpg4"
14511fi
14512
14513
14514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
14515$as_echo_n "checking how to create tags... " >&6; }
14516test -f tags && mv tags tags.save
14517if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14518  TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
14519elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14520  TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
14521elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14522  TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
14523else
14524  TAGPRG="ctags"
14525  (eval etags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
14526  (eval etags -c   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
14527  (eval ctags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
14528  (eval ctags -t   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
14529  (eval ctags -ts  /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
14530  (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
14531  (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
14532fi
14533test -f tags.save && mv tags.save tags
14534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
14535$as_echo "$TAGPRG" >&6; }
14536
14537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
14538$as_echo_n "checking how to run man with a section nr... " >&6; }
14539MANDEF="man"
14540(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
14541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
14542$as_echo "$MANDEF" >&6; }
14543if test "$MANDEF" = "man -s"; then
14544  $as_echo "#define USEMAN_S 1" >>confdefs.h
14545
14546fi
14547
14548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
14549$as_echo_n "checking --disable-nls argument... " >&6; }
14550# Check whether --enable-nls was given.
14551if test "${enable_nls+set}" = set; then :
14552  enableval=$enable_nls;
14553else
14554  enable_nls="yes"
14555fi
14556
14557
14558if test "$enable_nls" = "yes"; then
14559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560$as_echo "no" >&6; }
14561
14562  INSTALL_LANGS=install-languages
14563
14564  INSTALL_TOOL_LANGS=install-tool-languages
14565
14566
14567  # Extract the first word of "msgfmt", so it can be a program name with args.
14568set dummy msgfmt; ac_word=$2
14569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14570$as_echo_n "checking for $ac_word... " >&6; }
14571if ${ac_cv_prog_MSGFMT+:} false; then :
14572  $as_echo_n "(cached) " >&6
14573else
14574  if test -n "$MSGFMT"; then
14575  ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14576else
14577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14578for as_dir in $PATH
14579do
14580  IFS=$as_save_IFS
14581  test -z "$as_dir" && as_dir=.
14582    for ac_exec_ext in '' $ac_executable_extensions; do
14583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14584    ac_cv_prog_MSGFMT="msgfmt"
14585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14586    break 2
14587  fi
14588done
14589  done
14590IFS=$as_save_IFS
14591
14592fi
14593fi
14594MSGFMT=$ac_cv_prog_MSGFMT
14595if test -n "$MSGFMT"; then
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14597$as_echo "$MSGFMT" >&6; }
14598else
14599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14600$as_echo "no" >&6; }
14601fi
14602
14603
14604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
14605$as_echo_n "checking for NLS... " >&6; }
14606  if test -f po/Makefile; then
14607    have_gettext="no"
14608    if test -n "$MSGFMT"; then
14609      olibs=$LIBS
14610      LIBS=""
14611      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14612/* end confdefs.h.  */
14613#include <libintl.h>
14614int
14615main ()
14616{
14617gettext("Test");
14618  ;
14619  return 0;
14620}
14621_ACEOF
14622if ac_fn_c_try_link "$LINENO"; then :
14623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
14624$as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
14625else
14626  LIBS="-lintl"
14627	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628/* end confdefs.h.  */
14629#include <libintl.h>
14630int
14631main ()
14632{
14633gettext("Test");
14634  ;
14635  return 0;
14636}
14637_ACEOF
14638if ac_fn_c_try_link "$LINENO"; then :
14639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
14640$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
14641	      LIBS="$olibs -lintl"
14642else
14643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
14644$as_echo "gettext() doesn't work" >&6; };
14645	      LIBS=$olibs
14646fi
14647rm -f core conftest.err conftest.$ac_objext \
14648    conftest$ac_exeext conftest.$ac_ext
14649fi
14650rm -f core conftest.err conftest.$ac_objext \
14651    conftest$ac_exeext conftest.$ac_ext
14652    else
14653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
14654$as_echo "msgfmt not found - disabled" >&6; };
14655    fi
14656    if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then
14657      $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
14658
14659      MAKEMO=yes
14660
14661            for ac_func in bind_textdomain_codeset
14662do :
14663  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
14664if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
14665  cat >>confdefs.h <<_ACEOF
14666#define HAVE_BIND_TEXTDOMAIN_CODESET 1
14667_ACEOF
14668
14669fi
14670done
14671
14672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
14673$as_echo_n "checking for _nl_msg_cat_cntr... " >&6; }
14674      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14675/* end confdefs.h.  */
14676#include <libintl.h>
14677		extern int _nl_msg_cat_cntr;
14678int
14679main ()
14680{
14681++_nl_msg_cat_cntr;
14682  ;
14683  return 0;
14684}
14685_ACEOF
14686if ac_fn_c_try_link "$LINENO"; then :
14687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14688$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
14689
14690else
14691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14692$as_echo "no" >&6; }
14693fi
14694rm -f core conftest.err conftest.$ac_objext \
14695    conftest$ac_exeext conftest.$ac_ext
14696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
14697$as_echo_n "checking if msgfmt supports --desktop... " >&6; }
14698      MSGFMT_DESKTOP=
14699      if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
14700	if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
14701	  	  	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5
14702$as_echo "broken" >&6; }
14703	else
14704	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14705$as_echo "yes" >&6; }
14706	  MSGFMT_DESKTOP="gvim.desktop vim.desktop"
14707	fi
14708      else
14709	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14710$as_echo "no" >&6; }
14711      fi
14712
14713    fi
14714  else
14715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
14716$as_echo "no \"po/Makefile\" - disabled" >&6; };
14717  fi
14718else
14719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14720$as_echo "yes" >&6; }
14721fi
14722
14723ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
14724if test "x$ac_cv_header_dlfcn_h" = xyes; then :
14725  DLL=dlfcn.h
14726else
14727  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
14728if test "x$ac_cv_header_dl_h" = xyes; then :
14729  DLL=dl.h
14730fi
14731
14732
14733fi
14734
14735
14736if test x${DLL} = xdlfcn.h; then
14737
14738$as_echo "#define HAVE_DLFCN_H 1" >>confdefs.h
14739
14740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
14741$as_echo_n "checking for dlopen()... " >&6; }
14742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14743/* end confdefs.h.  */
14744
14745int
14746main ()
14747{
14748
14749		extern void* dlopen();
14750		dlopen();
14751
14752  ;
14753  return 0;
14754}
14755_ACEOF
14756if ac_fn_c_try_link "$LINENO"; then :
14757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14758$as_echo "yes" >&6; };
14759
14760$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
14761
14762else
14763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14764$as_echo "no" >&6; };
14765	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
14766$as_echo_n "checking for dlopen() in -ldl... " >&6; }
14767	      olibs=$LIBS
14768	      LIBS="$LIBS -ldl"
14769	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14770/* end confdefs.h.  */
14771
14772int
14773main ()
14774{
14775
14776				extern void* dlopen();
14777				dlopen();
14778
14779  ;
14780  return 0;
14781}
14782_ACEOF
14783if ac_fn_c_try_link "$LINENO"; then :
14784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14785$as_echo "yes" >&6; };
14786
14787$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
14788
14789else
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14791$as_echo "no" >&6; };
14792			  LIBS=$olibs
14793fi
14794rm -f core conftest.err conftest.$ac_objext \
14795    conftest$ac_exeext conftest.$ac_ext
14796fi
14797rm -f core conftest.err conftest.$ac_objext \
14798    conftest$ac_exeext conftest.$ac_ext
14799      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
14800$as_echo_n "checking for dlsym()... " >&6; }
14801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14802/* end confdefs.h.  */
14803
14804int
14805main ()
14806{
14807
14808		extern void* dlsym();
14809		dlsym();
14810
14811  ;
14812  return 0;
14813}
14814_ACEOF
14815if ac_fn_c_try_link "$LINENO"; then :
14816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14817$as_echo "yes" >&6; };
14818
14819$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
14820
14821else
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14823$as_echo "no" >&6; };
14824	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
14825$as_echo_n "checking for dlsym() in -ldl... " >&6; }
14826	      olibs=$LIBS
14827	      LIBS="$LIBS -ldl"
14828	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14829/* end confdefs.h.  */
14830
14831int
14832main ()
14833{
14834
14835				extern void* dlsym();
14836				dlsym();
14837
14838  ;
14839  return 0;
14840}
14841_ACEOF
14842if ac_fn_c_try_link "$LINENO"; then :
14843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14844$as_echo "yes" >&6; };
14845
14846$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
14847
14848else
14849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14850$as_echo "no" >&6; };
14851			  LIBS=$olibs
14852fi
14853rm -f core conftest.err conftest.$ac_objext \
14854    conftest$ac_exeext conftest.$ac_ext
14855fi
14856rm -f core conftest.err conftest.$ac_objext \
14857    conftest$ac_exeext conftest.$ac_ext
14858elif test x${DLL} = xdl.h; then
14859
14860$as_echo "#define HAVE_DL_H 1" >>confdefs.h
14861
14862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
14863$as_echo_n "checking for shl_load()... " >&6; }
14864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14865/* end confdefs.h.  */
14866
14867int
14868main ()
14869{
14870
14871		extern void* shl_load();
14872		shl_load();
14873
14874  ;
14875  return 0;
14876}
14877_ACEOF
14878if ac_fn_c_try_link "$LINENO"; then :
14879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14880$as_echo "yes" >&6; };
14881
14882$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
14883
14884else
14885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14886$as_echo "no" >&6; };
14887	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
14888$as_echo_n "checking for shl_load() in -ldld... " >&6; }
14889	  olibs=$LIBS
14890	  LIBS="$LIBS -ldld"
14891	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892/* end confdefs.h.  */
14893
14894int
14895main ()
14896{
14897
14898			extern void* shl_load();
14899			shl_load();
14900
14901  ;
14902  return 0;
14903}
14904_ACEOF
14905if ac_fn_c_try_link "$LINENO"; then :
14906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14907$as_echo "yes" >&6; };
14908
14909$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
14910
14911else
14912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14913$as_echo "no" >&6; };
14914		  LIBS=$olibs
14915fi
14916rm -f core conftest.err conftest.$ac_objext \
14917    conftest$ac_exeext conftest.$ac_ext
14918fi
14919rm -f core conftest.err conftest.$ac_objext \
14920    conftest$ac_exeext conftest.$ac_ext
14921fi
14922for ac_header in setjmp.h
14923do :
14924  ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
14925if test "x$ac_cv_header_setjmp_h" = xyes; then :
14926  cat >>confdefs.h <<_ACEOF
14927#define HAVE_SETJMP_H 1
14928_ACEOF
14929
14930fi
14931
14932done
14933
14934
14935if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
14936    if echo $LIBS | grep -e '-ldl' >/dev/null; then
14937    LIBS=`echo $LIBS | sed s/-ldl//`
14938    PERL_LIBS="$PERL_LIBS -ldl"
14939  fi
14940fi
14941
14942if test "$MACOS_X" = "yes"; then
14943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
14944$as_echo_n "checking whether we need macOS frameworks... " >&6; }
14945  if test "$MACOS_X_DARWIN" = "yes"; then
14946    if test "$features" = "tiny"; then
14947            OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
14948      OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
14949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
14950$as_echo "yes, we need CoreServices" >&6; }
14951      LIBS="$LIBS -framework CoreServices"
14952    else
14953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
14954$as_echo "yes, we need AppKit" >&6; }
14955      LIBS="$LIBS -framework AppKit"
14956    fi
14957  else
14958    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14959$as_echo "no" >&6; }
14960  fi
14961fi
14962
14963DEPEND_CFLAGS_FILTER=
14964if test "$GCC" = yes; then
14965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
14966$as_echo_n "checking for GCC 3 or later... " >&6; }
14967  gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
14968  if test "$gccmajor" -gt "2"; then
14969    DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
14970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14971$as_echo "yes" >&6; }
14972  else
14973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14974$as_echo "no" >&6; }
14975  fi
14976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
14977$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
14978  if test "$gccmajor" -gt "3"; then
14979    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/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
14980    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/ *-U_FORTIFY_SOURCE//g'`
14981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14982$as_echo "yes" >&6; }
14983  else
14984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14985$as_echo "no" >&6; }
14986  fi
14987fi
14988
14989
14990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
14991$as_echo_n "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
14992if 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
14993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14994$as_echo "yes" >&6; }
14995  $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14996
14997else
14998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14999$as_echo "no" >&6; }
15000fi
15001
15002LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
15003
15004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
15005$as_echo_n "checking linker --as-needed support... " >&6; }
15006LINK_AS_NEEDED=
15007# Check if linker supports --as-needed and --no-as-needed options
15008if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
15009  if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
15010    LDFLAGS="$LDFLAGS -Wl,--as-needed"
15011  fi
15012  LINK_AS_NEEDED=yes
15013fi
15014if test "$LINK_AS_NEEDED" = yes; then
15015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15016$as_echo "yes" >&6; }
15017else
15018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15019$as_echo "no" >&6; }
15020fi
15021
15022
15023# IBM z/OS reset CFLAGS for config.mk
15024if test "$zOSUnix" = "yes"; then
15025	CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
15026fi
15027
15028ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
15029
15030cat >confcache <<\_ACEOF
15031# This file is a shell script that caches the results of configure
15032# tests run on this system so they can be shared between configure
15033# scripts and configure runs, see configure's option --config-cache.
15034# It is not useful on other systems.  If it contains results you don't
15035# want to keep, you may remove or edit it.
15036#
15037# config.status only pays attention to the cache file if you give it
15038# the --recheck option to rerun configure.
15039#
15040# `ac_cv_env_foo' variables (set or unset) will be overridden when
15041# loading this file, other *unset* `ac_cv_foo' will be assigned the
15042# following values.
15043
15044_ACEOF
15045
15046# The following way of writing the cache mishandles newlines in values,
15047# but we know of no workaround that is simple, portable, and efficient.
15048# So, we kill variables containing newlines.
15049# Ultrix sh set writes to stderr and can't be redirected directly,
15050# and sets the high bit in the cache file unless we assign to the vars.
15051(
15052  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15053    eval ac_val=\$$ac_var
15054    case $ac_val in #(
15055    *${as_nl}*)
15056      case $ac_var in #(
15057      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15058$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
15059      esac
15060      case $ac_var in #(
15061      _ | IFS | as_nl) ;; #(
15062      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15063      *) { eval $ac_var=; unset $ac_var;} ;;
15064      esac ;;
15065    esac
15066  done
15067
15068  (set) 2>&1 |
15069    case $as_nl`(ac_space=' '; set) 2>&1` in #(
15070    *${as_nl}ac_space=\ *)
15071      # `set' does not quote correctly, so add quotes: double-quote
15072      # substitution turns \\\\ into \\, and sed turns \\ into \.
15073      sed -n \
15074	"s/'/'\\\\''/g;
15075	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15076      ;; #(
15077    *)
15078      # `set' quotes correctly as required by POSIX, so do not add quotes.
15079      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
15080      ;;
15081    esac |
15082    sort
15083) |
15084  sed '
15085     /^ac_cv_env_/b end
15086     t clear
15087     :clear
15088     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15089     t end
15090     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15091     :end' >>confcache
15092if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15093  if test -w "$cache_file"; then
15094    if test "x$cache_file" != "x/dev/null"; then
15095      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15096$as_echo "$as_me: updating cache $cache_file" >&6;}
15097      if test ! -f "$cache_file" || test -h "$cache_file"; then
15098	cat confcache >"$cache_file"
15099      else
15100        case $cache_file in #(
15101        */* | ?:*)
15102	  mv -f confcache "$cache_file"$$ &&
15103	  mv -f "$cache_file"$$ "$cache_file" ;; #(
15104        *)
15105	  mv -f confcache "$cache_file" ;;
15106	esac
15107      fi
15108    fi
15109  else
15110    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15111$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
15112  fi
15113fi
15114rm -f confcache
15115
15116test "x$prefix" = xNONE && prefix=$ac_default_prefix
15117# Let make expand exec_prefix.
15118test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15119
15120DEFS=-DHAVE_CONFIG_H
15121
15122ac_libobjs=
15123ac_ltlibobjs=
15124U=
15125for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15126  # 1. Remove the extension, and $U if already installed.
15127  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
15128  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
15129  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
15130  #    will be set to the directory where LIBOBJS objects are built.
15131  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15132  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
15133done
15134LIBOBJS=$ac_libobjs
15135
15136LTLIBOBJS=$ac_ltlibobjs
15137
15138
15139
15140
15141: "${CONFIG_STATUS=./config.status}"
15142ac_write_fail=0
15143ac_clean_files_save=$ac_clean_files
15144ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15145{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15146$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15147as_write_fail=0
15148cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
15149#! $SHELL
15150# Generated by $as_me.
15151# Run this file to recreate the current configuration.
15152# Compiler output produced by configure, useful for debugging
15153# configure, is in config.log if it exists.
15154
15155debug=false
15156ac_cs_recheck=false
15157ac_cs_silent=false
15158
15159SHELL=\${CONFIG_SHELL-$SHELL}
15160export SHELL
15161_ASEOF
15162cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15163## -------------------- ##
15164## M4sh Initialization. ##
15165## -------------------- ##
15166
15167# Be more Bourne compatible
15168DUALCASE=1; export DUALCASE # for MKS sh
15169if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15170  emulate sh
15171  NULLCMD=:
15172  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15173  # is contrary to our usage.  Disable this feature.
15174  alias -g '${1+"$@"}'='"$@"'
15175  setopt NO_GLOB_SUBST
15176else
15177  case `(set -o) 2>/dev/null` in #(
15178  *posix*) :
15179    set -o posix ;; #(
15180  *) :
15181     ;;
15182esac
15183fi
15184
15185
15186as_nl='
15187'
15188export as_nl
15189# Printing a long string crashes Solaris 7 /usr/bin/printf.
15190as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15191as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15192as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15193# Prefer a ksh shell builtin over an external printf program on Solaris,
15194# but without wasting forks for bash or zsh.
15195if test -z "$BASH_VERSION$ZSH_VERSION" \
15196    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15197  as_echo='print -r --'
15198  as_echo_n='print -rn --'
15199elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15200  as_echo='printf %s\n'
15201  as_echo_n='printf %s'
15202else
15203  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15204    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15205    as_echo_n='/usr/ucb/echo -n'
15206  else
15207    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15208    as_echo_n_body='eval
15209      arg=$1;
15210      case $arg in #(
15211      *"$as_nl"*)
15212	expr "X$arg" : "X\\(.*\\)$as_nl";
15213	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15214      esac;
15215      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15216    '
15217    export as_echo_n_body
15218    as_echo_n='sh -c $as_echo_n_body as_echo'
15219  fi
15220  export as_echo_body
15221  as_echo='sh -c $as_echo_body as_echo'
15222fi
15223
15224# The user is always right.
15225if test "${PATH_SEPARATOR+set}" != set; then
15226  PATH_SEPARATOR=:
15227  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15228    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15229      PATH_SEPARATOR=';'
15230  }
15231fi
15232
15233
15234# IFS
15235# We need space, tab and new line, in precisely that order.  Quoting is
15236# there to prevent editors from complaining about space-tab.
15237# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15238# splitting by setting IFS to empty value.)
15239IFS=" ""	$as_nl"
15240
15241# Find who we are.  Look in the path if we contain no directory separator.
15242as_myself=
15243case $0 in #((
15244  *[\\/]* ) as_myself=$0 ;;
15245  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15246for as_dir in $PATH
15247do
15248  IFS=$as_save_IFS
15249  test -z "$as_dir" && as_dir=.
15250    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15251  done
15252IFS=$as_save_IFS
15253
15254     ;;
15255esac
15256# We did not find ourselves, most probably we were run as `sh COMMAND'
15257# in which case we are not to be found in the path.
15258if test "x$as_myself" = x; then
15259  as_myself=$0
15260fi
15261if test ! -f "$as_myself"; then
15262  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15263  exit 1
15264fi
15265
15266# Unset variables that we do not need and which cause bugs (e.g. in
15267# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15268# suppresses any "Segmentation fault" message there.  '((' could
15269# trigger a bug in pdksh 5.2.14.
15270for as_var in BASH_ENV ENV MAIL MAILPATH
15271do eval test x\${$as_var+set} = xset \
15272  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15273done
15274PS1='$ '
15275PS2='> '
15276PS4='+ '
15277
15278# NLS nuisances.
15279LC_ALL=C
15280export LC_ALL
15281LANGUAGE=C
15282export LANGUAGE
15283
15284# CDPATH.
15285(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15286
15287
15288# as_fn_error STATUS ERROR [LINENO LOG_FD]
15289# ----------------------------------------
15290# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15291# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15292# script with STATUS, using 1 if that was 0.
15293as_fn_error ()
15294{
15295  as_status=$1; test $as_status -eq 0 && as_status=1
15296  if test "$4"; then
15297    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15298    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15299  fi
15300  $as_echo "$as_me: error: $2" >&2
15301  as_fn_exit $as_status
15302} # as_fn_error
15303
15304
15305# as_fn_set_status STATUS
15306# -----------------------
15307# Set $? to STATUS, without forking.
15308as_fn_set_status ()
15309{
15310  return $1
15311} # as_fn_set_status
15312
15313# as_fn_exit STATUS
15314# -----------------
15315# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15316as_fn_exit ()
15317{
15318  set +e
15319  as_fn_set_status $1
15320  exit $1
15321} # as_fn_exit
15322
15323# as_fn_unset VAR
15324# ---------------
15325# Portably unset VAR.
15326as_fn_unset ()
15327{
15328  { eval $1=; unset $1;}
15329}
15330as_unset=as_fn_unset
15331# as_fn_append VAR VALUE
15332# ----------------------
15333# Append the text in VALUE to the end of the definition contained in VAR. Take
15334# advantage of any shell optimizations that allow amortized linear growth over
15335# repeated appends, instead of the typical quadratic growth present in naive
15336# implementations.
15337if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15338  eval 'as_fn_append ()
15339  {
15340    eval $1+=\$2
15341  }'
15342else
15343  as_fn_append ()
15344  {
15345    eval $1=\$$1\$2
15346  }
15347fi # as_fn_append
15348
15349# as_fn_arith ARG...
15350# ------------------
15351# Perform arithmetic evaluation on the ARGs, and store the result in the
15352# global $as_val. Take advantage of shells that can avoid forks. The arguments
15353# must be portable across $(()) and expr.
15354if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15355  eval 'as_fn_arith ()
15356  {
15357    as_val=$(( $* ))
15358  }'
15359else
15360  as_fn_arith ()
15361  {
15362    as_val=`expr "$@" || test $? -eq 1`
15363  }
15364fi # as_fn_arith
15365
15366
15367if expr a : '\(a\)' >/dev/null 2>&1 &&
15368   test "X`expr 00001 : '.*\(...\)'`" = X001; then
15369  as_expr=expr
15370else
15371  as_expr=false
15372fi
15373
15374if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15375  as_basename=basename
15376else
15377  as_basename=false
15378fi
15379
15380if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15381  as_dirname=dirname
15382else
15383  as_dirname=false
15384fi
15385
15386as_me=`$as_basename -- "$0" ||
15387$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15388	 X"$0" : 'X\(//\)$' \| \
15389	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15390$as_echo X/"$0" |
15391    sed '/^.*\/\([^/][^/]*\)\/*$/{
15392	    s//\1/
15393	    q
15394	  }
15395	  /^X\/\(\/\/\)$/{
15396	    s//\1/
15397	    q
15398	  }
15399	  /^X\/\(\/\).*/{
15400	    s//\1/
15401	    q
15402	  }
15403	  s/.*/./; q'`
15404
15405# Avoid depending upon Character Ranges.
15406as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15407as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15408as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15409as_cr_digits='0123456789'
15410as_cr_alnum=$as_cr_Letters$as_cr_digits
15411
15412ECHO_C= ECHO_N= ECHO_T=
15413case `echo -n x` in #(((((
15414-n*)
15415  case `echo 'xy\c'` in
15416  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
15417  xy)  ECHO_C='\c';;
15418  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15419       ECHO_T='	';;
15420  esac;;
15421*)
15422  ECHO_N='-n';;
15423esac
15424
15425rm -f conf$$ conf$$.exe conf$$.file
15426if test -d conf$$.dir; then
15427  rm -f conf$$.dir/conf$$.file
15428else
15429  rm -f conf$$.dir
15430  mkdir conf$$.dir 2>/dev/null
15431fi
15432if (echo >conf$$.file) 2>/dev/null; then
15433  if ln -s conf$$.file conf$$ 2>/dev/null; then
15434    as_ln_s='ln -s'
15435    # ... but there are two gotchas:
15436    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15437    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15438    # In both cases, we have to default to `cp -pR'.
15439    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15440      as_ln_s='cp -pR'
15441  elif ln conf$$.file conf$$ 2>/dev/null; then
15442    as_ln_s=ln
15443  else
15444    as_ln_s='cp -pR'
15445  fi
15446else
15447  as_ln_s='cp -pR'
15448fi
15449rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15450rmdir conf$$.dir 2>/dev/null
15451
15452
15453# as_fn_mkdir_p
15454# -------------
15455# Create "$as_dir" as a directory, including parents if necessary.
15456as_fn_mkdir_p ()
15457{
15458
15459  case $as_dir in #(
15460  -*) as_dir=./$as_dir;;
15461  esac
15462  test -d "$as_dir" || eval $as_mkdir_p || {
15463    as_dirs=
15464    while :; do
15465      case $as_dir in #(
15466      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15467      *) as_qdir=$as_dir;;
15468      esac
15469      as_dirs="'$as_qdir' $as_dirs"
15470      as_dir=`$as_dirname -- "$as_dir" ||
15471$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15472	 X"$as_dir" : 'X\(//\)[^/]' \| \
15473	 X"$as_dir" : 'X\(//\)$' \| \
15474	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15475$as_echo X"$as_dir" |
15476    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15477	    s//\1/
15478	    q
15479	  }
15480	  /^X\(\/\/\)[^/].*/{
15481	    s//\1/
15482	    q
15483	  }
15484	  /^X\(\/\/\)$/{
15485	    s//\1/
15486	    q
15487	  }
15488	  /^X\(\/\).*/{
15489	    s//\1/
15490	    q
15491	  }
15492	  s/.*/./; q'`
15493      test -d "$as_dir" && break
15494    done
15495    test -z "$as_dirs" || eval "mkdir $as_dirs"
15496  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15497
15498
15499} # as_fn_mkdir_p
15500if mkdir -p . 2>/dev/null; then
15501  as_mkdir_p='mkdir -p "$as_dir"'
15502else
15503  test -d ./-p && rmdir ./-p
15504  as_mkdir_p=false
15505fi
15506
15507
15508# as_fn_executable_p FILE
15509# -----------------------
15510# Test if FILE is an executable regular file.
15511as_fn_executable_p ()
15512{
15513  test -f "$1" && test -x "$1"
15514} # as_fn_executable_p
15515as_test_x='test -x'
15516as_executable_p=as_fn_executable_p
15517
15518# Sed expression to map a string onto a valid CPP name.
15519as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15520
15521# Sed expression to map a string onto a valid variable name.
15522as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15523
15524
15525exec 6>&1
15526## ----------------------------------- ##
15527## Main body of $CONFIG_STATUS script. ##
15528## ----------------------------------- ##
15529_ASEOF
15530test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15531
15532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15533# Save the log message, to keep $0 and so on meaningful, and to
15534# report actual input values of CONFIG_FILES etc. instead of their
15535# values after options handling.
15536ac_log="
15537This file was extended by $as_me, which was
15538generated by GNU Autoconf 2.69.  Invocation command line was
15539
15540  CONFIG_FILES    = $CONFIG_FILES
15541  CONFIG_HEADERS  = $CONFIG_HEADERS
15542  CONFIG_LINKS    = $CONFIG_LINKS
15543  CONFIG_COMMANDS = $CONFIG_COMMANDS
15544  $ $0 $@
15545
15546on `(hostname || uname -n) 2>/dev/null | sed 1q`
15547"
15548
15549_ACEOF
15550
15551case $ac_config_files in *"
15552"*) set x $ac_config_files; shift; ac_config_files=$*;;
15553esac
15554
15555case $ac_config_headers in *"
15556"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15557esac
15558
15559
15560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15561# Files that config.status was made for.
15562config_files="$ac_config_files"
15563config_headers="$ac_config_headers"
15564
15565_ACEOF
15566
15567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15568ac_cs_usage="\
15569\`$as_me' instantiates files and other configuration actions
15570from templates according to the current configuration.  Unless the files
15571and actions are specified as TAGs, all are instantiated by default.
15572
15573Usage: $0 [OPTION]... [TAG]...
15574
15575  -h, --help       print this help, then exit
15576  -V, --version    print version number and configuration settings, then exit
15577      --config     print configuration, then exit
15578  -q, --quiet, --silent
15579                   do not print progress messages
15580  -d, --debug      don't remove temporary files
15581      --recheck    update $as_me by reconfiguring in the same conditions
15582      --file=FILE[:TEMPLATE]
15583                   instantiate the configuration file FILE
15584      --header=FILE[:TEMPLATE]
15585                   instantiate the configuration header FILE
15586
15587Configuration files:
15588$config_files
15589
15590Configuration headers:
15591$config_headers
15592
15593Report bugs to the package provider."
15594
15595_ACEOF
15596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15597ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15598ac_cs_version="\\
15599config.status
15600configured by $0, generated by GNU Autoconf 2.69,
15601  with options \\"\$ac_cs_config\\"
15602
15603Copyright (C) 2012 Free Software Foundation, Inc.
15604This config.status script is free software; the Free Software Foundation
15605gives unlimited permission to copy, distribute and modify it."
15606
15607ac_pwd='$ac_pwd'
15608srcdir='$srcdir'
15609AWK='$AWK'
15610test -n "\$AWK" || AWK=awk
15611_ACEOF
15612
15613cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15614# The default lists apply if the user does not specify any file.
15615ac_need_defaults=:
15616while test $# != 0
15617do
15618  case $1 in
15619  --*=?*)
15620    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15621    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15622    ac_shift=:
15623    ;;
15624  --*=)
15625    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15626    ac_optarg=
15627    ac_shift=:
15628    ;;
15629  *)
15630    ac_option=$1
15631    ac_optarg=$2
15632    ac_shift=shift
15633    ;;
15634  esac
15635
15636  case $ac_option in
15637  # Handling of the options.
15638  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15639    ac_cs_recheck=: ;;
15640  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15641    $as_echo "$ac_cs_version"; exit ;;
15642  --config | --confi | --conf | --con | --co | --c )
15643    $as_echo "$ac_cs_config"; exit ;;
15644  --debug | --debu | --deb | --de | --d | -d )
15645    debug=: ;;
15646  --file | --fil | --fi | --f )
15647    $ac_shift
15648    case $ac_optarg in
15649    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15650    '') as_fn_error $? "missing file argument" ;;
15651    esac
15652    as_fn_append CONFIG_FILES " '$ac_optarg'"
15653    ac_need_defaults=false;;
15654  --header | --heade | --head | --hea )
15655    $ac_shift
15656    case $ac_optarg in
15657    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15658    esac
15659    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15660    ac_need_defaults=false;;
15661  --he | --h)
15662    # Conflict between --help and --header
15663    as_fn_error $? "ambiguous option: \`$1'
15664Try \`$0 --help' for more information.";;
15665  --help | --hel | -h )
15666    $as_echo "$ac_cs_usage"; exit ;;
15667  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15668  | -silent | --silent | --silen | --sile | --sil | --si | --s)
15669    ac_cs_silent=: ;;
15670
15671  # This is an error.
15672  -*) as_fn_error $? "unrecognized option: \`$1'
15673Try \`$0 --help' for more information." ;;
15674
15675  *) as_fn_append ac_config_targets " $1"
15676     ac_need_defaults=false ;;
15677
15678  esac
15679  shift
15680done
15681
15682ac_configure_extra_args=
15683
15684if $ac_cs_silent; then
15685  exec 6>/dev/null
15686  ac_configure_extra_args="$ac_configure_extra_args --silent"
15687fi
15688
15689_ACEOF
15690cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15691if \$ac_cs_recheck; then
15692  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15693  shift
15694  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15695  CONFIG_SHELL='$SHELL'
15696  export CONFIG_SHELL
15697  exec "\$@"
15698fi
15699
15700_ACEOF
15701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15702exec 5>>auto/config.log
15703{
15704  echo
15705  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15706## Running $as_me. ##
15707_ASBOX
15708  $as_echo "$ac_log"
15709} >&5
15710
15711_ACEOF
15712cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15713_ACEOF
15714
15715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15716
15717# Handling of arguments.
15718for ac_config_target in $ac_config_targets
15719do
15720  case $ac_config_target in
15721    "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
15722    "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
15723
15724  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15725  esac
15726done
15727
15728
15729# If the user did not use the arguments to specify the items to instantiate,
15730# then the envvar interface is used.  Set only those that are not.
15731# We use the long form for the default assignment because of an extremely
15732# bizarre bug on SunOS 4.1.3.
15733if $ac_need_defaults; then
15734  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15735  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15736fi
15737
15738# Have a temporary directory for convenience.  Make it in the build tree
15739# simply because there is no reason against having it here, and in addition,
15740# creating and moving files from /tmp can sometimes cause problems.
15741# Hook for its removal unless debugging.
15742# Note that there is a small window in which the directory will not be cleaned:
15743# after its creation but before its name has been assigned to `$tmp'.
15744$debug ||
15745{
15746  tmp= ac_tmp=
15747  trap 'exit_status=$?
15748  : "${ac_tmp:=$tmp}"
15749  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15750' 0
15751  trap 'as_fn_exit 1' 1 2 13 15
15752}
15753# Create a (secure) tmp directory for tmp files.
15754
15755{
15756  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15757  test -d "$tmp"
15758}  ||
15759{
15760  tmp=./conf$$-$RANDOM
15761  (umask 077 && mkdir "$tmp")
15762} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15763ac_tmp=$tmp
15764
15765# Set up the scripts for CONFIG_FILES section.
15766# No need to generate them if there are no CONFIG_FILES.
15767# This happens for instance with `./config.status config.h'.
15768if test -n "$CONFIG_FILES"; then
15769
15770
15771ac_cr=`echo X | tr X '\015'`
15772# On cygwin, bash can eat \r inside `` if the user requested igncr.
15773# But we know of no other shell where ac_cr would be empty at this
15774# point, so we can use a bashism as a fallback.
15775if test "x$ac_cr" = x; then
15776  eval ac_cr=\$\'\\r\'
15777fi
15778ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15779if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15780  ac_cs_awk_cr='\\r'
15781else
15782  ac_cs_awk_cr=$ac_cr
15783fi
15784
15785echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15786_ACEOF
15787
15788
15789{
15790  echo "cat >conf$$subs.awk <<_ACEOF" &&
15791  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15792  echo "_ACEOF"
15793} >conf$$subs.sh ||
15794  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15795ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15796ac_delim='%!_!# '
15797for ac_last_try in false false false false false :; do
15798  . ./conf$$subs.sh ||
15799    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15800
15801  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15802  if test $ac_delim_n = $ac_delim_num; then
15803    break
15804  elif $ac_last_try; then
15805    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15806  else
15807    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15808  fi
15809done
15810rm -f conf$$subs.sh
15811
15812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15813cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15814_ACEOF
15815sed -n '
15816h
15817s/^/S["/; s/!.*/"]=/
15818p
15819g
15820s/^[^!]*!//
15821:repl
15822t repl
15823s/'"$ac_delim"'$//
15824t delim
15825:nl
15826h
15827s/\(.\{148\}\)..*/\1/
15828t more1
15829s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15830p
15831n
15832b repl
15833:more1
15834s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15835p
15836g
15837s/.\{148\}//
15838t nl
15839:delim
15840h
15841s/\(.\{148\}\)..*/\1/
15842t more2
15843s/["\\]/\\&/g; s/^/"/; s/$/"/
15844p
15845b
15846:more2
15847s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15848p
15849g
15850s/.\{148\}//
15851t delim
15852' <conf$$subs.awk | sed '
15853/^[^""]/{
15854  N
15855  s/\n//
15856}
15857' >>$CONFIG_STATUS || ac_write_fail=1
15858rm -f conf$$subs.awk
15859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15860_ACAWK
15861cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15862  for (key in S) S_is_set[key] = 1
15863  FS = ""
15864
15865}
15866{
15867  line = $ 0
15868  nfields = split(line, field, "@")
15869  substed = 0
15870  len = length(field[1])
15871  for (i = 2; i < nfields; i++) {
15872    key = field[i]
15873    keylen = length(key)
15874    if (S_is_set[key]) {
15875      value = S[key]
15876      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15877      len += length(value) + length(field[++i])
15878      substed = 1
15879    } else
15880      len += 1 + keylen
15881  }
15882
15883  print line
15884}
15885
15886_ACAWK
15887_ACEOF
15888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15889if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15890  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15891else
15892  cat
15893fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15894  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15895_ACEOF
15896
15897# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15898# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15899# trailing colons and then remove the whole line if VPATH becomes empty
15900# (actually we leave an empty line to preserve line numbers).
15901if test "x$srcdir" = x.; then
15902  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
15903h
15904s///
15905s/^/:/
15906s/[	 ]*$/:/
15907s/:\$(srcdir):/:/g
15908s/:\${srcdir}:/:/g
15909s/:@srcdir@:/:/g
15910s/^:*//
15911s/:*$//
15912x
15913s/\(=[	 ]*\).*/\1/
15914G
15915s/\n//
15916s/^[^=]*=[	 ]*$//
15917}'
15918fi
15919
15920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15921fi # test -n "$CONFIG_FILES"
15922
15923# Set up the scripts for CONFIG_HEADERS section.
15924# No need to generate them if there are no CONFIG_HEADERS.
15925# This happens for instance with `./config.status Makefile'.
15926if test -n "$CONFIG_HEADERS"; then
15927cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15928BEGIN {
15929_ACEOF
15930
15931# Transform confdefs.h into an awk script `defines.awk', embedded as
15932# here-document in config.status, that substitutes the proper values into
15933# config.h.in to produce config.h.
15934
15935# Create a delimiter string that does not exist in confdefs.h, to ease
15936# handling of long lines.
15937ac_delim='%!_!# '
15938for ac_last_try in false false :; do
15939  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15940  if test -z "$ac_tt"; then
15941    break
15942  elif $ac_last_try; then
15943    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15944  else
15945    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15946  fi
15947done
15948
15949# For the awk script, D is an array of macro values keyed by name,
15950# likewise P contains macro parameters if any.  Preserve backslash
15951# newline sequences.
15952
15953ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15954sed -n '
15955s/.\{148\}/&'"$ac_delim"'/g
15956t rset
15957:rset
15958s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
15959t def
15960d
15961:def
15962s/\\$//
15963t bsnl
15964s/["\\]/\\&/g
15965s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15966D["\1"]=" \3"/p
15967s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
15968d
15969:bsnl
15970s/["\\]/\\&/g
15971s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15972D["\1"]=" \3\\\\\\n"\\/p
15973t cont
15974s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15975t cont
15976d
15977:cont
15978n
15979s/.\{148\}/&'"$ac_delim"'/g
15980t clear
15981:clear
15982s/\\$//
15983t bsnlc
15984s/["\\]/\\&/g; s/^/"/; s/$/"/p
15985d
15986:bsnlc
15987s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15988b cont
15989' <confdefs.h | sed '
15990s/'"$ac_delim"'/"\\\
15991"/g' >>$CONFIG_STATUS || ac_write_fail=1
15992
15993cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15994  for (key in D) D_is_set[key] = 1
15995  FS = ""
15996}
15997/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15998  line = \$ 0
15999  split(line, arg, " ")
16000  if (arg[1] == "#") {
16001    defundef = arg[2]
16002    mac1 = arg[3]
16003  } else {
16004    defundef = substr(arg[1], 2)
16005    mac1 = arg[2]
16006  }
16007  split(mac1, mac2, "(") #)
16008  macro = mac2[1]
16009  prefix = substr(line, 1, index(line, defundef) - 1)
16010  if (D_is_set[macro]) {
16011    # Preserve the white space surrounding the "#".
16012    print prefix "define", macro P[macro] D[macro]
16013    next
16014  } else {
16015    # Replace #undef with comments.  This is necessary, for example,
16016    # in the case of _POSIX_SOURCE, which is predefined and required
16017    # on some systems where configure will not decide to define it.
16018    if (defundef == "undef") {
16019      print "/*", prefix defundef, macro, "*/"
16020      next
16021    }
16022  }
16023}
16024{ print }
16025_ACAWK
16026_ACEOF
16027cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16028  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
16029fi # test -n "$CONFIG_HEADERS"
16030
16031
16032eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
16033shift
16034for ac_tag
16035do
16036  case $ac_tag in
16037  :[FHLC]) ac_mode=$ac_tag; continue;;
16038  esac
16039  case $ac_mode$ac_tag in
16040  :[FHL]*:*);;
16041  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
16042  :[FH]-) ac_tag=-:-;;
16043  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16044  esac
16045  ac_save_IFS=$IFS
16046  IFS=:
16047  set x $ac_tag
16048  IFS=$ac_save_IFS
16049  shift
16050  ac_file=$1
16051  shift
16052
16053  case $ac_mode in
16054  :L) ac_source=$1;;
16055  :[FH])
16056    ac_file_inputs=
16057    for ac_f
16058    do
16059      case $ac_f in
16060      -) ac_f="$ac_tmp/stdin";;
16061      *) # Look for the file first in the build tree, then in the source tree
16062	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
16063	 # because $ac_f cannot contain `:'.
16064	 test -f "$ac_f" ||
16065	   case $ac_f in
16066	   [\\/$]*) false;;
16067	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16068	   esac ||
16069	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
16070      esac
16071      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16072      as_fn_append ac_file_inputs " '$ac_f'"
16073    done
16074
16075    # Let's still pretend it is `configure' which instantiates (i.e., don't
16076    # use $as_me), people would be surprised to read:
16077    #    /* config.h.  Generated by config.status.  */
16078    configure_input='Generated from '`
16079	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16080	`' by configure.'
16081    if test x"$ac_file" != x-; then
16082      configure_input="$ac_file.  $configure_input"
16083      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16084$as_echo "$as_me: creating $ac_file" >&6;}
16085    fi
16086    # Neutralize special characters interpreted by sed in replacement strings.
16087    case $configure_input in #(
16088    *\&* | *\|* | *\\* )
16089       ac_sed_conf_input=`$as_echo "$configure_input" |
16090       sed 's/[\\\\&|]/\\\\&/g'`;; #(
16091    *) ac_sed_conf_input=$configure_input;;
16092    esac
16093
16094    case $ac_tag in
16095    *:-:* | *:-) cat >"$ac_tmp/stdin" \
16096      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
16097    esac
16098    ;;
16099  esac
16100
16101  ac_dir=`$as_dirname -- "$ac_file" ||
16102$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16103	 X"$ac_file" : 'X\(//\)[^/]' \| \
16104	 X"$ac_file" : 'X\(//\)$' \| \
16105	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
16106$as_echo X"$ac_file" |
16107    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16108	    s//\1/
16109	    q
16110	  }
16111	  /^X\(\/\/\)[^/].*/{
16112	    s//\1/
16113	    q
16114	  }
16115	  /^X\(\/\/\)$/{
16116	    s//\1/
16117	    q
16118	  }
16119	  /^X\(\/\).*/{
16120	    s//\1/
16121	    q
16122	  }
16123	  s/.*/./; q'`
16124  as_dir="$ac_dir"; as_fn_mkdir_p
16125  ac_builddir=.
16126
16127case "$ac_dir" in
16128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16129*)
16130  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
16131  # A ".." for each directory in $ac_dir_suffix.
16132  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
16133  case $ac_top_builddir_sub in
16134  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16135  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16136  esac ;;
16137esac
16138ac_abs_top_builddir=$ac_pwd
16139ac_abs_builddir=$ac_pwd$ac_dir_suffix
16140# for backward compatibility:
16141ac_top_builddir=$ac_top_build_prefix
16142
16143case $srcdir in
16144  .)  # We are building in place.
16145    ac_srcdir=.
16146    ac_top_srcdir=$ac_top_builddir_sub
16147    ac_abs_top_srcdir=$ac_pwd ;;
16148  [\\/]* | ?:[\\/]* )  # Absolute name.
16149    ac_srcdir=$srcdir$ac_dir_suffix;
16150    ac_top_srcdir=$srcdir
16151    ac_abs_top_srcdir=$srcdir ;;
16152  *) # Relative name.
16153    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16154    ac_top_srcdir=$ac_top_build_prefix$srcdir
16155    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
16156esac
16157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
16158
16159
16160  case $ac_mode in
16161  :F)
16162  #
16163  # CONFIG_FILE
16164  #
16165
16166_ACEOF
16167
16168cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16169# If the template does not know about datarootdir, expand it.
16170# FIXME: This hack should be removed a few years after 2.60.
16171ac_datarootdir_hack=; ac_datarootdir_seen=
16172ac_sed_dataroot='
16173/datarootdir/ {
16174  p
16175  q
16176}
16177/@datadir@/p
16178/@docdir@/p
16179/@infodir@/p
16180/@localedir@/p
16181/@mandir@/p'
16182case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16183*datarootdir*) ac_datarootdir_seen=yes;;
16184*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16185  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16186$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16187_ACEOF
16188cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16189  ac_datarootdir_hack='
16190  s&@datadir@&$datadir&g
16191  s&@docdir@&$docdir&g
16192  s&@infodir@&$infodir&g
16193  s&@localedir@&$localedir&g
16194  s&@mandir@&$mandir&g
16195  s&\\\${datarootdir}&$datarootdir&g' ;;
16196esac
16197_ACEOF
16198
16199# Neutralize VPATH when `$srcdir' = `.'.
16200# Shell code in configure.ac might set extrasub.
16201# FIXME: do we really want to maintain this feature?
16202cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16203ac_sed_extra="$ac_vpsub
16204$extrasub
16205_ACEOF
16206cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16207:t
16208/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16209s|@configure_input@|$ac_sed_conf_input|;t t
16210s&@top_builddir@&$ac_top_builddir_sub&;t t
16211s&@top_build_prefix@&$ac_top_build_prefix&;t t
16212s&@srcdir@&$ac_srcdir&;t t
16213s&@abs_srcdir@&$ac_abs_srcdir&;t t
16214s&@top_srcdir@&$ac_top_srcdir&;t t
16215s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16216s&@builddir@&$ac_builddir&;t t
16217s&@abs_builddir@&$ac_abs_builddir&;t t
16218s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16219$ac_datarootdir_hack
16220"
16221eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16222  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16223
16224test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16225  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16226  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
16227      "$ac_tmp/out"`; test -z "$ac_out"; } &&
16228  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16229which seems to be undefined.  Please make sure it is defined" >&5
16230$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16231which seems to be undefined.  Please make sure it is defined" >&2;}
16232
16233  rm -f "$ac_tmp/stdin"
16234  case $ac_file in
16235  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16236  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16237  esac \
16238  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16239 ;;
16240  :H)
16241  #
16242  # CONFIG_HEADER
16243  #
16244  if test x"$ac_file" != x-; then
16245    {
16246      $as_echo "/* $configure_input  */" \
16247      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16248    } >"$ac_tmp/config.h" \
16249      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16250    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16251      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16252$as_echo "$as_me: $ac_file is unchanged" >&6;}
16253    else
16254      rm -f "$ac_file"
16255      mv "$ac_tmp/config.h" "$ac_file" \
16256	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
16257    fi
16258  else
16259    $as_echo "/* $configure_input  */" \
16260      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16261      || as_fn_error $? "could not create -" "$LINENO" 5
16262  fi
16263 ;;
16264
16265
16266  esac
16267
16268done # for ac_tag
16269
16270
16271as_fn_exit 0
16272_ACEOF
16273ac_clean_files=$ac_clean_files_save
16274
16275test $ac_write_fail = 0 ||
16276  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16277
16278
16279# configure is writing to config.log, and then calls config.status.
16280# config.status does its own redirection, appending to config.log.
16281# Unfortunately, on DOS this fails, as config.log is still kept open
16282# by configure, so config.status won't be able to write to it; its
16283# output is simply discarded.  So we exec the FD to /dev/null,
16284# effectively closing config.log, so it can be properly (re)opened and
16285# appended to by config.status.  When coming back to configure, we
16286# need to make the FD available again.
16287if test "$no_create" != yes; then
16288  ac_cs_success=:
16289  ac_config_status_args=
16290  test "$silent" = yes &&
16291    ac_config_status_args="$ac_config_status_args --quiet"
16292  exec 5>/dev/null
16293  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16294  exec 5>>auto/config.log
16295  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16296  # would make configure fail if this is the last instruction.
16297  $ac_cs_success || as_fn_exit 1
16298fi
16299if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16300  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16301$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16302fi
16303
16304
16305