xref: /vim-8.2.3635/src/auto/configure (revision eae1b91f)
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
632HANGULIN_OBJ
633HANGULIN_SRC
634GUI_X_LIBS
635GUITYPE
636GUI_LIB_LOC
637GUI_INC_LOC
638NARROW_PROTO
639MOTIF_LIBNAME
640GRESOURCE_OBJ
641GRESOURCE_SRC
642UPDATE_DESKTOP_DATABASE
643GTK_UPDATE_ICON_CACHE
644GLIB_COMPILE_RESOURCES
645GNOME_INCLUDEDIR
646GNOME_LIBDIR
647GNOME_LIBS
648GTK_LIBNAME
649GTK_LIBS
650GTK_CFLAGS
651PKG_CONFIG
652X_LIB
653X_EXTRA_LIBS
654X_LIBS
655X_PRE_LIBS
656X_CFLAGS
657XMKMF
658xmkmfpath
659TERM_OBJ
660TERM_SRC
661CHANNEL_OBJ
662CHANNEL_SRC
663NETBEANS_OBJ
664NETBEANS_SRC
665RUBY_LIBS
666RUBY_CFLAGS
667RUBY_PRO
668RUBY_OBJ
669RUBY_SRC
670vi_cv_path_ruby
671TCL_LIBS
672TCL_CFLAGS
673TCL_PRO
674TCL_OBJ
675TCL_SRC
676vi_cv_path_tcl
677PYTHON3_OBJ
678PYTHON3_SRC
679PYTHON3_CFLAGS
680PYTHON3_LIBS
681vi_cv_path_python3
682PYTHON_OBJ
683PYTHON_SRC
684PYTHON_CFLAGS
685PYTHON_LIBS
686vi_cv_path_python
687PERL_LIBS
688PERL_CFLAGS
689PERL_PRO
690PERL_OBJ
691PERL_SRC
692shrpenv
693vi_cv_perl_xsubpp
694vi_cv_perllib
695vi_cv_path_perl
696MZSCHEME_MZC
697MZSCHEME_EXTRA
698MZSCHEME_CFLAGS
699MZSCHEME_LIBS
700MZSCHEME_PRO
701MZSCHEME_OBJ
702MZSCHEME_SRC
703vi_cv_path_mzscheme
704LUA_CFLAGS
705LUA_LIBS
706LUA_PRO
707LUA_OBJ
708LUA_SRC
709vi_cv_path_plain_lua
710vi_cv_path_luajit
711vi_cv_path_lua
712compiledby
713dogvimdiff
714dovimdiff
715QUOTESED
716line_break
717VIEWNAME
718EXNAME
719VIMNAME
720OS_EXTRA_OBJ
721OS_EXTRA_SRC
722XCODE_SELECT
723CPP_MM
724CROSS_COMPILING
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_hangulinput
823enable_xim
824enable_fontset
825with_x
826enable_gui
827enable_gtk2_check
828enable_gnome_check
829enable_gtk3_check
830enable_motif_check
831enable_athena_check
832enable_nextaw_check
833enable_carbon_check
834enable_gtktest
835with_gnome_includes
836with_gnome_libs
837with_gnome
838enable_icon_cache_update
839enable_desktop_database_update
840with_motif_lib
841with_tlib
842enable_largefile
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-hangulinput    Include Hangul input support.
1504  --enable-xim            Include XIM input support.
1505  --enable-fontset        Include X fontset output support.
1506  --enable-gui=OPTS       X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon
1507  --enable-gtk2-check     If auto-select GUI, check for GTK+ 2 default=yes
1508  --enable-gnome-check    If GTK GUI, check for GNOME default=no
1509  --enable-gtk3-check     If auto-select GUI, check for GTK+ 3 default=yes
1510  --enable-motif-check    If auto-select GUI, check for Motif default=yes
1511  --enable-athena-check   If auto-select GUI, check for Athena default=yes
1512  --enable-nextaw-check   If auto-select GUI, check for neXtaw default=yes
1513  --enable-carbon-check   If auto-select GUI, check for Carbon default=yes
1514  --disable-gtktest       Do not try to compile and run a test GTK program
1515  --disable-icon-cache-update        update disabled
1516  --disable-desktop-database-update  update disabled
1517  --disable-largefile     omit support for large files
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
4459
4460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4461$as_echo_n "checking --enable-fail-if-missing argument... " >&6; }
4462# Check whether --enable-fail_if_missing was given.
4463if test "${enable_fail_if_missing+set}" = set; then :
4464  enableval=$enable_fail_if_missing; fail_if_missing="yes"
4465else
4466  fail_if_missing="no"
4467fi
4468
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4470$as_echo "$fail_if_missing" >&6; }
4471
4472with_x_arg="$with_x"
4473
4474if test -z "$CFLAGS"; then
4475  CFLAGS="-O"
4476  test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
4477fi
4478if test "$GCC" = yes; then
4479    gccversion=`$CC -dumpversion`
4480  if test "x$gccversion" = "x"; then
4481        gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
4482  fi
4483    if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
4484    echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4485    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4486  else
4487    if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4488      echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4489      CFLAGS="$CFLAGS -fno-strength-reduce"
4490    fi
4491  fi
4492fi
4493
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4495$as_echo_n "checking for clang version... " >&6; }
4496CLANG_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'`
4497if test x"$CLANG_VERSION_STRING" != x"" ; then
4498  CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4499  CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4500  CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4501  CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
4502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4503$as_echo "$CLANG_VERSION" >&6; }
4504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4505$as_echo_n "checking if clang supports -fno-strength-reduce... " >&6; }
4506  if test "$CLANG_VERSION" -ge 500002075 ; then
4507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4508$as_echo "no" >&6; }
4509    CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4510  else
4511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4512$as_echo "yes" >&6; }
4513  fi
4514else
4515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4516$as_echo "N/A" >&6; }
4517fi
4518
4519CROSS_COMPILING=
4520if test "$cross_compiling" = yes; then
4521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4522$as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
4523  CROSS_COMPILING=1
4524fi
4525
4526
4527test "$GCC" = yes && CPP_MM=M;
4528
4529if test -f ./toolcheck; then
4530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy tools..." >&5
4531$as_echo "$as_me: checking for buggy tools..." >&6;}
4532  sh ./toolcheck 1>&6
4533fi
4534
4535OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4536
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BeOS" >&5
4538$as_echo_n "checking for BeOS... " >&6; }
4539case `uname` in
4540    BeOS)	OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
4541		BEOS=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4542$as_echo "yes" >&6; };;
4543    *)		BEOS=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4544$as_echo "no" >&6; };;
4545esac
4546
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4548$as_echo_n "checking for QNX... " >&6; }
4549case `uname` in
4550    QNX)	OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4551		test -z "$with_x" && with_x=no
4552		QNX=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4553$as_echo "yes" >&6; };;
4554    *)		QNX=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555$as_echo "no" >&6; };;
4556esac
4557
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4559$as_echo_n "checking for Darwin (Mac OS X)... " >&6; }
4560if test "`(uname) 2>/dev/null`" = Darwin; then
4561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4562$as_echo "yes" >&6; }
4563  MACOS_X=yes
4564  CPPFLAGS="$CPPFLAGS -DMACOS_X"
4565
4566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4567$as_echo_n "checking --disable-darwin argument... " >&6; }
4568  # Check whether --enable-darwin was given.
4569if test "${enable_darwin+set}" = set; then :
4570  enableval=$enable_darwin;
4571else
4572  enable_darwin="yes"
4573fi
4574
4575  if test "$enable_darwin" = "yes"; then
4576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4577$as_echo "no" >&6; }
4578    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4579$as_echo_n "checking if Darwin files are there... " >&6; }
4580    if test -f os_macosx.m; then
4581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4582$as_echo "yes" >&6; }
4583    else
4584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4585$as_echo "no, Darwin support disabled" >&6; }
4586      enable_darwin=no
4587    fi
4588  else
4589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4590$as_echo "yes, Darwin support excluded" >&6; }
4591  fi
4592
4593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4594$as_echo_n "checking --with-mac-arch argument... " >&6; }
4595
4596# Check whether --with-mac-arch was given.
4597if test "${with_mac_arch+set}" = set; then :
4598  withval=$with_mac_arch; MACARCH="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4599$as_echo "$MACARCH" >&6; }
4600else
4601  MACARCH="current"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4602$as_echo "defaulting to $MACARCH" >&6; }
4603fi
4604
4605
4606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4607$as_echo_n "checking --with-developer-dir argument... " >&6; }
4608
4609# Check whether --with-developer-dir was given.
4610if test "${with_developer_dir+set}" = set; then :
4611  withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4612$as_echo "$DEVELOPER_DIR" >&6; }
4613else
4614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4615$as_echo "not present" >&6; }
4616fi
4617
4618
4619  if test "x$DEVELOPER_DIR" = "x"; then
4620    # Extract the first word of "xcode-select", so it can be a program name with args.
4621set dummy xcode-select; ac_word=$2
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4623$as_echo_n "checking for $ac_word... " >&6; }
4624if ${ac_cv_path_XCODE_SELECT+:} false; then :
4625  $as_echo_n "(cached) " >&6
4626else
4627  case $XCODE_SELECT in
4628  [\\/]* | ?:[\\/]*)
4629  ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4630  ;;
4631  *)
4632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4639    ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647  ;;
4648esac
4649fi
4650XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4651if test -n "$XCODE_SELECT"; then
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4653$as_echo "$XCODE_SELECT" >&6; }
4654else
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656$as_echo "no" >&6; }
4657fi
4658
4659
4660    if test "x$XCODE_SELECT" != "x"; then
4661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4662$as_echo_n "checking for developer dir using xcode-select... " >&6; }
4663      DEVELOPER_DIR=`$XCODE_SELECT -print-path`
4664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4665$as_echo "$DEVELOPER_DIR" >&6; }
4666    else
4667      DEVELOPER_DIR=/Developer
4668    fi
4669  fi
4670
4671  if test "x$MACARCH" = "xboth"; then
4672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4673$as_echo_n "checking for 10.4 universal SDK... " >&6; }
4674                            save_cppflags="$CPPFLAGS"
4675    save_cflags="$CFLAGS"
4676    save_ldflags="$LDFLAGS"
4677    CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
4678    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4679/* end confdefs.h.  */
4680
4681int
4682main ()
4683{
4684
4685  ;
4686  return 0;
4687}
4688_ACEOF
4689if ac_fn_c_try_link "$LINENO"; then :
4690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
4691$as_echo "found" >&6; }
4692else
4693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4694$as_echo "not found" >&6; }
4695	CFLAGS="$save_cflags"
4696	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4697$as_echo_n "checking if Intel architecture is supported... " >&6; }
4698	CPPFLAGS="$CPPFLAGS -arch i386"
4699	LDFLAGS="$save_ldflags -arch i386"
4700	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701/* end confdefs.h.  */
4702
4703int
4704main ()
4705{
4706
4707  ;
4708  return 0;
4709}
4710_ACEOF
4711if ac_fn_c_try_link "$LINENO"; then :
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4713$as_echo "yes" >&6; }; MACARCH="intel"
4714else
4715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716$as_echo "no" >&6; }
4717		MACARCH="ppc"
4718		CPPFLAGS="$save_cppflags -arch ppc"
4719		LDFLAGS="$save_ldflags -arch ppc"
4720fi
4721rm -f core conftest.err conftest.$ac_objext \
4722    conftest$ac_exeext conftest.$ac_ext
4723fi
4724rm -f core conftest.err conftest.$ac_objext \
4725    conftest$ac_exeext conftest.$ac_ext
4726  elif test "x$MACARCH" = "xintel"; then
4727    CPPFLAGS="$CPPFLAGS -arch intel"
4728    LDFLAGS="$LDFLAGS -arch intel"
4729  elif test "x$MACARCH" = "xppc"; then
4730    CPPFLAGS="$CPPFLAGS -arch ppc"
4731    LDFLAGS="$LDFLAGS -arch ppc"
4732  fi
4733
4734  if test "$enable_darwin" = "yes"; then
4735    MACOS_X_DARWIN=yes
4736    OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
4737    OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
4738            CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
4739
4740                # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4741for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4742		  inttypes.h stdint.h unistd.h
4743do :
4744  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4745ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4746"
4747if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4748  cat >>confdefs.h <<_ACEOF
4749#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4750_ACEOF
4751
4752fi
4753
4754done
4755
4756
4757ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
4758if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then :
4759  CARBON=yes
4760fi
4761
4762
4763    if test "x$CARBON" = "xyes"; then
4764      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
4765	with_x=no
4766      fi
4767    fi
4768  fi
4769
4770        if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
4771    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
4772  fi
4773
4774else
4775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4776$as_echo "no" >&6; }
4777fi
4778
4779for ac_header in AvailabilityMacros.h
4780do :
4781  ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
4782if test "x$ac_cv_header_AvailabilityMacros_h" = xyes; then :
4783  cat >>confdefs.h <<_ACEOF
4784#define HAVE_AVAILABILITYMACROS_H 1
4785_ACEOF
4786
4787fi
4788
4789done
4790
4791
4792
4793
4794
4795if test "$cross_compiling" = no; then
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
4797$as_echo_n "checking --with-local-dir argument... " >&6; }
4798  have_local_include=''
4799  have_local_lib=''
4800
4801# Check whether --with-local-dir was given.
4802if test "${with_local_dir+set}" = set; then :
4803  withval=$with_local_dir;
4804    local_dir="$withval"
4805    case "$withval" in
4806    */*) ;;
4807    no)
4808      # avoid adding local dir to LDFLAGS and CPPFLAGS
4809      have_local_include=yes
4810      have_local_lib=yes
4811      ;;
4812    *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
4813    esac
4814	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
4815$as_echo "$local_dir" >&6; }
4816
4817else
4818
4819    local_dir=/usr/local
4820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
4821$as_echo "Defaulting to $local_dir" >&6; }
4822
4823fi
4824
4825  if test "$GCC" = yes -a "$local_dir" != no; then
4826    echo 'void f(){}' > conftest.c
4827        have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
4828    have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
4829    rm -f conftest.c conftest.o
4830  fi
4831  if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
4832    tt=`echo "$LDFLAGS" | sed -e "s+-L${local_dir}/lib ++g" -e "s+-L${local_dir}/lib$++g"`
4833    if test "$tt" = "$LDFLAGS"; then
4834      LDFLAGS="$LDFLAGS -L${local_dir}/lib"
4835    fi
4836  fi
4837  if test -z "$have_local_include" -a -d "${local_dir}/include"; then
4838    tt=`echo "$CPPFLAGS" | sed -e "s+-I${local_dir}/include ++g" -e "s+-I${local_dir}/include$++g"`
4839    if test "$tt" = "$CPPFLAGS"; then
4840      CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
4841    fi
4842  fi
4843fi
4844
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
4846$as_echo_n "checking --with-vim-name argument... " >&6; }
4847
4848# Check whether --with-vim-name was given.
4849if test "${with_vim_name+set}" = set; then :
4850  withval=$with_vim_name; VIMNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
4851$as_echo "$VIMNAME" >&6; }
4852else
4853  VIMNAME="vim"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
4854$as_echo "Defaulting to $VIMNAME" >&6; }
4855fi
4856
4857
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
4859$as_echo_n "checking --with-ex-name argument... " >&6; }
4860
4861# Check whether --with-ex-name was given.
4862if test "${with_ex_name+set}" = set; then :
4863  withval=$with_ex_name; EXNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
4864$as_echo "$EXNAME" >&6; }
4865else
4866  EXNAME="ex"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
4867$as_echo "Defaulting to ex" >&6; }
4868fi
4869
4870
4871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
4872$as_echo_n "checking --with-view-name argument... " >&6; }
4873
4874# Check whether --with-view-name was given.
4875if test "${with_view_name+set}" = set; then :
4876  withval=$with_view_name; VIEWNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
4877$as_echo "$VIEWNAME" >&6; }
4878else
4879  VIEWNAME="view"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
4880$as_echo "Defaulting to view" >&6; }
4881fi
4882
4883
4884
4885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
4886$as_echo_n "checking --with-global-runtime argument... " >&6; }
4887
4888# Check whether --with-global-runtime was given.
4889if test "${with_global_runtime+set}" = set; then :
4890  withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4891$as_echo "$withval" >&6; }
4892else
4893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4894$as_echo "no" >&6; }
4895fi
4896
4897
4898if test "X$RUNTIME_GLOBAL" != "X"; then
4899  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" }')
4900  cat >>confdefs.h <<_ACEOF
4901#define RUNTIME_GLOBAL "$RUNTIME_GLOBAL"
4902_ACEOF
4903
4904  cat >>confdefs.h <<_ACEOF
4905#define RUNTIME_GLOBAL_AFTER "$RUNTIME_GLOBAL_AFTER"
4906_ACEOF
4907
4908fi
4909
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
4911$as_echo_n "checking --with-modified-by argument... " >&6; }
4912
4913# Check whether --with-modified-by was given.
4914if test "${with_modified_by+set}" = set; then :
4915  withval=$with_modified_by; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4916$as_echo "$withval" >&6; }; cat >>confdefs.h <<_ACEOF
4917#define MODIFIED_BY "$withval"
4918_ACEOF
4919
4920else
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922$as_echo "no" >&6; }
4923fi
4924
4925
4926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
4927$as_echo_n "checking if character set is EBCDIC... " >&6; }
4928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4929/* end confdefs.h.  */
4930
4931int
4932main ()
4933{
4934 /* TryCompile function for CharSet.
4935   Treat any failure as ASCII for compatibility with existing art.
4936   Use compile-time rather than run-time tests for cross-compiler
4937   tolerance.  */
4938#if '0'!=240
4939make an error "Character set is not EBCDIC"
4940#endif
4941  ;
4942  return 0;
4943}
4944_ACEOF
4945if ac_fn_c_try_compile "$LINENO"; then :
4946   # TryCompile action if true
4947cf_cv_ebcdic=yes
4948else
4949   # TryCompile action if false
4950cf_cv_ebcdic=no
4951fi
4952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4953# end of TryCompile ])
4954# end of CacheVal CvEbcdic
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
4956$as_echo "$cf_cv_ebcdic" >&6; }
4957case "$cf_cv_ebcdic" in  #(vi
4958    yes)	$as_echo "#define EBCDIC 1" >>confdefs.h
4959
4960		line_break='"\\n"'
4961		;;
4962    *)		line_break='"\\012"';;
4963esac
4964
4965
4966if test "$cf_cv_ebcdic" = "yes"; then
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
4968$as_echo_n "checking for z/OS Unix... " >&6; }
4969case `uname` in
4970    OS/390)	zOSUnix="yes";
4971										if test "$CC" = "cc"; then
4972		  ccm="$_CC_CCMODE"
4973		  ccn="CC"
4974		else
4975		  if test "$CC" = "c89"; then
4976		    ccm="$_CC_C89MODE"
4977		    ccn="C89"
4978		  else
4979		    ccm=1
4980		  fi
4981		fi
4982		if test "$ccm" != "1"; then
4983		  echo ""
4984		  echo "------------------------------------------"
4985		  echo " On z/OS Unix, the environment variable"
4986		  echo " _CC_${ccn}MODE must be set to \"1\"!"
4987		  echo " Do:"
4988		  echo "    export _CC_${ccn}MODE=1"
4989		  echo " and then call configure again."
4990		  echo "------------------------------------------"
4991		  exit 1
4992		fi
4993		# Set CFLAGS for configure process.
4994		# This will be reset later for config.mk.
4995		# Use haltonmsg to force error for missing H files.
4996		CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
4997		LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
4998		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4999$as_echo "yes" >&6; }
5000		;;
5001    *)		zOSUnix="no";
5002		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003$as_echo "no" >&6; }
5004		;;
5005esac
5006fi
5007
5008if test "$zOSUnix" = "yes"; then
5009    QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/'"
5010else
5011    QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/'"
5012fi
5013
5014
5015
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5017$as_echo_n "checking --disable-smack argument... " >&6; }
5018# Check whether --enable-smack was given.
5019if test "${enable_smack+set}" = set; then :
5020  enableval=$enable_smack;
5021else
5022  enable_smack="yes"
5023fi
5024
5025if test "$enable_smack" = "yes"; then
5026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027$as_echo "no" >&6; }
5028  ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5029if test "x$ac_cv_header_linux_xattr_h" = xyes; then :
5030  true
5031else
5032  enable_smack="no"
5033fi
5034
5035
5036else
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5038$as_echo "yes" >&6; }
5039fi
5040if test "$enable_smack" = "yes"; then
5041  ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
5042if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
5043  true
5044else
5045  enable_smack="no"
5046fi
5047
5048
5049fi
5050if test "$enable_smack" = "yes"; then
5051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5052$as_echo_n "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5053  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5054/* end confdefs.h.  */
5055#include <linux/xattr.h>
5056_ACEOF
5057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5058  $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1; then :
5059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5060$as_echo "yes" >&6; }
5061else
5062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }; enable_smack="no"
5064fi
5065rm -f conftest*
5066
5067fi
5068if test "$enable_smack" = "yes"; then
5069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5070$as_echo_n "checking for setxattr in -lattr... " >&6; }
5071if ${ac_cv_lib_attr_setxattr+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  ac_check_lib_save_LIBS=$LIBS
5075LIBS="-lattr  $LIBS"
5076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5077/* end confdefs.h.  */
5078
5079/* Override any GCC internal prototype to avoid an error.
5080   Use char because int might match the return type of a GCC
5081   builtin and then its argument prototype would still apply.  */
5082#ifdef __cplusplus
5083extern "C"
5084#endif
5085char setxattr ();
5086int
5087main ()
5088{
5089return setxattr ();
5090  ;
5091  return 0;
5092}
5093_ACEOF
5094if ac_fn_c_try_link "$LINENO"; then :
5095  ac_cv_lib_attr_setxattr=yes
5096else
5097  ac_cv_lib_attr_setxattr=no
5098fi
5099rm -f core conftest.err conftest.$ac_objext \
5100    conftest$ac_exeext conftest.$ac_ext
5101LIBS=$ac_check_lib_save_LIBS
5102fi
5103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5104$as_echo "$ac_cv_lib_attr_setxattr" >&6; }
5105if test "x$ac_cv_lib_attr_setxattr" = xyes; then :
5106  LIBS="$LIBS -lattr"
5107	   found_smack="yes"
5108	   $as_echo "#define HAVE_SMACK 1" >>confdefs.h
5109
5110fi
5111
5112fi
5113
5114if test "x$found_smack" = "x"; then
5115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5116$as_echo_n "checking --disable-selinux argument... " >&6; }
5117  # Check whether --enable-selinux was given.
5118if test "${enable_selinux+set}" = set; then :
5119  enableval=$enable_selinux;
5120else
5121  enable_selinux="yes"
5122fi
5123
5124  if test "$enable_selinux" = "yes"; then
5125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5126$as_echo "no" >&6; }
5127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5128$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
5129if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  ac_check_lib_save_LIBS=$LIBS
5133LIBS="-lselinux  $LIBS"
5134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5135/* end confdefs.h.  */
5136
5137/* Override any GCC internal prototype to avoid an error.
5138   Use char because int might match the return type of a GCC
5139   builtin and then its argument prototype would still apply.  */
5140#ifdef __cplusplus
5141extern "C"
5142#endif
5143char is_selinux_enabled ();
5144int
5145main ()
5146{
5147return is_selinux_enabled ();
5148  ;
5149  return 0;
5150}
5151_ACEOF
5152if ac_fn_c_try_link "$LINENO"; then :
5153  ac_cv_lib_selinux_is_selinux_enabled=yes
5154else
5155  ac_cv_lib_selinux_is_selinux_enabled=no
5156fi
5157rm -f core conftest.err conftest.$ac_objext \
5158    conftest$ac_exeext conftest.$ac_ext
5159LIBS=$ac_check_lib_save_LIBS
5160fi
5161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5162$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5163if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then :
5164  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5165if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
5166  LIBS="$LIBS -lselinux"
5167	    $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
5168
5169fi
5170
5171
5172fi
5173
5174  else
5175     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5176$as_echo "yes" >&6; }
5177  fi
5178fi
5179
5180
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5182$as_echo_n "checking --with-features argument... " >&6; }
5183
5184# Check whether --with-features was given.
5185if test "${with_features+set}" = set; then :
5186  withval=$with_features; features="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5187$as_echo "$features" >&6; }
5188else
5189  features="huge"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5190$as_echo "Defaulting to huge" >&6; }
5191fi
5192
5193
5194dovimdiff=""
5195dogvimdiff=""
5196case "$features" in
5197  tiny)		$as_echo "#define FEAT_TINY 1" >>confdefs.h
5198 ;;
5199  small)	$as_echo "#define FEAT_SMALL 1" >>confdefs.h
5200 ;;
5201  normal)	$as_echo "#define FEAT_NORMAL 1" >>confdefs.h
5202 dovimdiff="installvimdiff";
5203			dogvimdiff="installgvimdiff" ;;
5204  big)		$as_echo "#define FEAT_BIG 1" >>confdefs.h
5205 dovimdiff="installvimdiff";
5206			dogvimdiff="installgvimdiff" ;;
5207  huge)		$as_echo "#define FEAT_HUGE 1" >>confdefs.h
5208 dovimdiff="installvimdiff";
5209			dogvimdiff="installgvimdiff" ;;
5210  *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5211$as_echo "Sorry, $features is not supported" >&6; } ;;
5212esac
5213
5214
5215
5216
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5218$as_echo_n "checking --with-compiledby argument... " >&6; }
5219
5220# Check whether --with-compiledby was given.
5221if test "${with_compiledby+set}" = set; then :
5222  withval=$with_compiledby; compiledby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5223$as_echo "$withval" >&6; }
5224else
5225  compiledby=""; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5226$as_echo "no" >&6; }
5227fi
5228
5229
5230
5231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5232$as_echo_n "checking --disable-xsmp argument... " >&6; }
5233# Check whether --enable-xsmp was given.
5234if test "${enable_xsmp+set}" = set; then :
5235  enableval=$enable_xsmp;
5236else
5237  enable_xsmp="yes"
5238fi
5239
5240
5241if test "$enable_xsmp" = "yes"; then
5242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243$as_echo "no" >&6; }
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5245$as_echo_n "checking --disable-xsmp-interact argument... " >&6; }
5246  # Check whether --enable-xsmp-interact was given.
5247if test "${enable_xsmp_interact+set}" = set; then :
5248  enableval=$enable_xsmp_interact;
5249else
5250  enable_xsmp_interact="yes"
5251fi
5252
5253  if test "$enable_xsmp_interact" = "yes"; then
5254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255$as_echo "no" >&6; }
5256    $as_echo "#define USE_XSMP_INTERACT 1" >>confdefs.h
5257
5258  else
5259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5260$as_echo "yes" >&6; }
5261  fi
5262else
5263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5264$as_echo "yes" >&6; }
5265fi
5266
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5268$as_echo_n "checking --enable-luainterp argument... " >&6; }
5269# Check whether --enable-luainterp was given.
5270if test "${enable_luainterp+set}" = set; then :
5271  enableval=$enable_luainterp;
5272else
5273  enable_luainterp="no"
5274fi
5275
5276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5277$as_echo "$enable_luainterp" >&6; }
5278
5279if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
5280  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
5281    as_fn_error $? "cannot use Lua with tiny or small features" "$LINENO" 5
5282  fi
5283
5284
5285
5286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5287$as_echo_n "checking --with-lua-prefix argument... " >&6; }
5288
5289# Check whether --with-lua_prefix was given.
5290if test "${with_lua_prefix+set}" = set; then :
5291  withval=$with_lua_prefix; with_lua_prefix="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5292$as_echo "$with_lua_prefix" >&6; }
5293else
5294  with_lua_prefix="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5295$as_echo "no" >&6; }
5296fi
5297
5298
5299  if test "X$with_lua_prefix" != "X"; then
5300       vi_cv_path_lua_pfx="$with_lua_prefix"
5301  else
5302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5303$as_echo_n "checking LUA_PREFIX environment var... " >&6; }
5304    if test "X$LUA_PREFIX" != "X"; then
5305	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5306$as_echo "\"$LUA_PREFIX\"" >&6; }
5307	vi_cv_path_lua_pfx="$LUA_PREFIX"
5308    else
5309	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5310$as_echo "not set, default to /usr" >&6; }
5311	vi_cv_path_lua_pfx="/usr"
5312    fi
5313  fi
5314
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5316$as_echo_n "checking --with-luajit... " >&6; }
5317
5318# Check whether --with-luajit was given.
5319if test "${with_luajit+set}" = set; then :
5320  withval=$with_luajit; vi_cv_with_luajit="$withval"
5321else
5322  vi_cv_with_luajit="no"
5323fi
5324
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5326$as_echo "$vi_cv_with_luajit" >&6; }
5327
5328  LUA_INC=
5329  if test "X$vi_cv_path_lua_pfx" != "X"; then
5330    if test "x$vi_cv_with_luajit" != "xno"; then
5331            # Extract the first word of "luajit", so it can be a program name with args.
5332set dummy luajit; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_vi_cv_path_luajit+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $vi_cv_path_luajit in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_vi_cv_path_luajit="$vi_cv_path_luajit" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5362if test -n "$vi_cv_path_luajit"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5364$as_echo "$vi_cv_path_luajit" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371      if test "X$vi_cv_path_luajit" != "X"; then
5372		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5373$as_echo_n "checking LuaJIT version... " >&6; }
5374if ${vi_cv_version_luajit+:} false; then :
5375  $as_echo_n "(cached) " >&6
5376else
5377   vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'`
5378fi
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5380$as_echo "$vi_cv_version_luajit" >&6; }
5381	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5382$as_echo_n "checking Lua version of LuaJIT... " >&6; }
5383if ${vi_cv_version_lua_luajit+:} false; then :
5384  $as_echo_n "(cached) " >&6
5385else
5386   vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5387fi
5388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5389$as_echo "$vi_cv_version_lua_luajit" >&6; }
5390	vi_cv_path_lua="$vi_cv_path_luajit"
5391	vi_cv_version_lua="$vi_cv_version_lua_luajit"
5392      fi
5393    else
5394            # Extract the first word of "lua", so it can be a program name with args.
5395set dummy lua; ac_word=$2
5396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5397$as_echo_n "checking for $ac_word... " >&6; }
5398if ${ac_cv_path_vi_cv_path_plain_lua+:} false; then :
5399  $as_echo_n "(cached) " >&6
5400else
5401  case $vi_cv_path_plain_lua in
5402  [\\/]* | ?:[\\/]*)
5403  ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5404  ;;
5405  *)
5406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5407for as_dir in $PATH
5408do
5409  IFS=$as_save_IFS
5410  test -z "$as_dir" && as_dir=.
5411    for ac_exec_ext in '' $ac_executable_extensions; do
5412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5413    ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext"
5414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5415    break 2
5416  fi
5417done
5418  done
5419IFS=$as_save_IFS
5420
5421  ;;
5422esac
5423fi
5424vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5425if test -n "$vi_cv_path_plain_lua"; then
5426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5427$as_echo "$vi_cv_path_plain_lua" >&6; }
5428else
5429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5430$as_echo "no" >&6; }
5431fi
5432
5433
5434      if test "X$vi_cv_path_plain_lua" != "X"; then
5435		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5436$as_echo_n "checking Lua version... " >&6; }
5437if ${vi_cv_version_plain_lua+:} false; then :
5438  $as_echo_n "(cached) " >&6
5439else
5440   vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5441fi
5442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5443$as_echo "$vi_cv_version_plain_lua" >&6; }
5444      fi
5445      vi_cv_path_lua="$vi_cv_path_plain_lua"
5446      vi_cv_version_lua="$vi_cv_version_plain_lua"
5447    fi
5448    if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
5449      { $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
5450$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit... " >&6; }
5451      if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
5452	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5453$as_echo "yes" >&6; }
5454	LUA_INC=/luajit-$vi_cv_version_luajit
5455      fi
5456    fi
5457    if test "X$LUA_INC" = "X"; then
5458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5459$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
5460      if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
5461	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5462$as_echo "yes" >&6; }
5463      else
5464	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5465$as_echo "no" >&6; }
5466	{ $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
5467$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
5468	if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
5469	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5470$as_echo "yes" >&6; }
5471	  LUA_INC=/lua$vi_cv_version_lua
5472	else
5473	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5474$as_echo "no" >&6; }
5475	  vi_cv_path_lua_pfx=
5476	fi
5477      fi
5478    fi
5479  fi
5480
5481  if test "X$vi_cv_path_lua_pfx" != "X"; then
5482    if test "x$vi_cv_with_luajit" != "xno"; then
5483      multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5484      if test "X$multiarch" != "X"; then
5485	lib_multiarch="lib/${multiarch}"
5486      else
5487	lib_multiarch="lib"
5488      fi
5489      if test "X$vi_cv_version_lua" = "X"; then
5490	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5491      else
5492	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5493      fi
5494    else
5495      if test "X$LUA_INC" != "X"; then
5496		LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
5497      else
5498	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
5499      fi
5500    fi
5501    if test "$enable_luainterp" = "dynamic"; then
5502      lua_ok="yes"
5503    else
5504      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5505$as_echo_n "checking if link with ${LUA_LIBS} is sane... " >&6; }
5506      libs_save=$LIBS
5507      LIBS="$LIBS $LUA_LIBS"
5508      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h.  */
5510
5511int
5512main ()
5513{
5514
5515  ;
5516  return 0;
5517}
5518_ACEOF
5519if ac_fn_c_try_link "$LINENO"; then :
5520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5521$as_echo "yes" >&6; }; lua_ok="yes"
5522else
5523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524$as_echo "no" >&6; }; lua_ok="no"; LUA_LIBS=""
5525fi
5526rm -f core conftest.err conftest.$ac_objext \
5527    conftest$ac_exeext conftest.$ac_ext
5528      LIBS=$libs_save
5529    fi
5530    if test "x$lua_ok" = "xyes"; then
5531      LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5532      LUA_SRC="if_lua.c"
5533      LUA_OBJ="objects/if_lua.o"
5534      LUA_PRO="if_lua.pro"
5535      $as_echo "#define FEAT_LUA 1" >>confdefs.h
5536
5537    fi
5538    if test "$enable_luainterp" = "dynamic"; then
5539      if test "x$vi_cv_with_luajit" != "xno"; then
5540	luajit="jit"
5541      fi
5542      if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5543	vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5544      else
5545	if test "x$MACOS_X" = "xyes"; then
5546	  ext="dylib"
5547	  indexes=""
5548	else
5549	  ext="so"
5550	  indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5551	  multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5552	  if test "X$multiarch" != "X"; then
5553	    lib_multiarch="lib/${multiarch}"
5554	  fi
5555	fi
5556			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5557$as_echo_n "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
5558	for subdir in "${lib_multiarch}" lib64 lib; do
5559	  if test -z "$subdir"; then
5560	    continue
5561	  fi
5562	  for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5563	    ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5564	    for i in $indexes ""; do
5565	      if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
5566		sover2="$i"
5567		break 3
5568	      fi
5569	    done
5570	  done
5571	  sover=""
5572	done
5573	if test "X$sover" = "X"; then
5574	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5575$as_echo "no" >&6; }
5576	  lua_ok="no"
5577	  vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5578	else
5579	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5580$as_echo "yes" >&6; }
5581	  lua_ok="yes"
5582	  vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5583	fi
5584      fi
5585      $as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
5586
5587      LUA_LIBS=""
5588      LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
5589    fi
5590    if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
5591       test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
5592       test "`(uname -m) 2>/dev/null`" = "x86_64"; then
5593            LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5594    fi
5595  fi
5596  if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
5597    as_fn_error $? "could not configure lua" "$LINENO" 5
5598  fi
5599
5600
5601
5602
5603
5604fi
5605
5606
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5608$as_echo_n "checking --enable-mzschemeinterp argument... " >&6; }
5609# Check whether --enable-mzschemeinterp was given.
5610if test "${enable_mzschemeinterp+set}" = set; then :
5611  enableval=$enable_mzschemeinterp;
5612else
5613  enable_mzschemeinterp="no"
5614fi
5615
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5617$as_echo "$enable_mzschemeinterp" >&6; }
5618
5619if test "$enable_mzschemeinterp" = "yes"; then
5620
5621
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5623$as_echo_n "checking --with-plthome argument... " >&6; }
5624
5625# Check whether --with-plthome was given.
5626if test "${with_plthome+set}" = set; then :
5627  withval=$with_plthome; with_plthome="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5628$as_echo "$with_plthome" >&6; }
5629else
5630  with_plthome="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5631$as_echo "\"no\"" >&6; }
5632fi
5633
5634
5635  if test "X$with_plthome" != "X"; then
5636       vi_cv_path_mzscheme_pfx="$with_plthome"
5637       vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5638  else
5639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5640$as_echo_n "checking PLTHOME environment var... " >&6; }
5641    if test "X$PLTHOME" != "X"; then
5642	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5643$as_echo "\"$PLTHOME\"" >&6; }
5644	vi_cv_path_mzscheme_pfx="$PLTHOME"
5645	vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5646    else
5647	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5648$as_echo "not set" >&6; }
5649		# Extract the first word of "mzscheme", so it can be a program name with args.
5650set dummy mzscheme; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if ${ac_cv_path_vi_cv_path_mzscheme+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $vi_cv_path_mzscheme in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5668    ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
5680if test -n "$vi_cv_path_mzscheme"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
5682$as_echo "$vi_cv_path_mzscheme" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689
5690			if test "X$vi_cv_path_mzscheme" != "X"; then
5691	  lsout=`ls -l $vi_cv_path_mzscheme`
5692	  if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
5693	    vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
5694	  fi
5695	fi
5696
5697	if test "X$vi_cv_path_mzscheme" != "X"; then
5698	    	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
5699$as_echo_n "checking MzScheme install prefix... " >&6; }
5700if ${vi_cv_path_mzscheme_pfx+:} false; then :
5701  $as_echo_n "(cached) " >&6
5702else
5703  	    	    echo "(display (simplify-path		\
5704	       (build-path (call-with-values	\
5705		(lambda () (split-path (find-system-path (quote exec-file)))) \
5706		(lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
5707	    	     vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
5708		sed -e 's+/$++'`
5709fi
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
5711$as_echo "$vi_cv_path_mzscheme_pfx" >&6; }
5712	    rm -f mzdirs.scm
5713	fi
5714    fi
5715  fi
5716
5717  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
5719$as_echo_n "checking for racket include directory... " >&6; }
5720    SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
5721    if test "X$SCHEME_INC" != "X"; then
5722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
5723$as_echo "${SCHEME_INC}" >&6; }
5724    else
5725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5726$as_echo "not found" >&6; }
5727      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
5728$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
5729      if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
5730	SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
5731	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5732$as_echo "yes" >&6; }
5733      else
5734	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
5736	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
5737$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
5738	if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
5739	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5740$as_echo "yes" >&6; }
5741	  SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
5742	else
5743	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
5745	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
5746$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
5747	  if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
5748	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5749$as_echo "yes" >&6; }
5750	    SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
5751	  else
5752	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5753$as_echo "no" >&6; }
5754	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
5755$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
5756	    if test -f /usr/include/plt/scheme.h; then
5757	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5758$as_echo "yes" >&6; }
5759	      SCHEME_INC=/usr/include/plt
5760	    else
5761	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5762$as_echo "no" >&6; }
5763	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
5764$as_echo_n "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
5765	      if test -f /usr/include/racket/scheme.h; then
5766		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5767$as_echo "yes" >&6; }
5768		SCHEME_INC=/usr/include/racket
5769	      else
5770		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
5772		vi_cv_path_mzscheme_pfx=
5773	      fi
5774	    fi
5775	  fi
5776	fi
5777      fi
5778    fi
5779  fi
5780
5781  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5782
5783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
5784$as_echo_n "checking for racket lib directory... " >&6; }
5785    SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
5786    if test "X$SCHEME_LIB" != "X"; then
5787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
5788$as_echo "${SCHEME_LIB}" >&6; }
5789    else
5790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5791$as_echo "not found" >&6; }
5792    fi
5793
5794    for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
5795      if test "X$path" != "X"; then
5796	if test "x$MACOS_X" = "xyes"; then
5797	  MZSCHEME_LIBS="-framework Racket"
5798	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5799	elif test -f "${path}/libmzscheme3m.a"; then
5800	  MZSCHEME_LIBS="${path}/libmzscheme3m.a"
5801	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5802	elif test -f "${path}/libracket3m.a"; then
5803	  MZSCHEME_LIBS="${path}/libracket3m.a"
5804	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5805	elif test -f "${path}/libracket.a"; then
5806	  MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
5807	elif test -f "${path}/libmzscheme.a"; then
5808	  MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
5809	else
5810	  	  if test -f "${path}/libmzscheme3m.so"; then
5811	    MZSCHEME_LIBS="-L${path} -lmzscheme3m"
5812	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5813	  elif test -f "${path}/libracket3m.so"; then
5814	    MZSCHEME_LIBS="-L${path} -lracket3m"
5815	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5816	  elif test -f "${path}/libracket.so"; then
5817	    MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
5818	  else
5819	    	    if test "$path" != "$SCHEME_LIB"; then
5820	      continue
5821	    fi
5822	    MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
5823	  fi
5824	  if test "$GCC" = yes; then
5825	    	    	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
5826	  elif test "`(uname) 2>/dev/null`" = SunOS &&
5827				   uname -r | grep '^5' >/dev/null; then
5828	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
5829	  fi
5830	fi
5831      fi
5832      if test "X$MZSCHEME_LIBS" != "X"; then
5833	break
5834      fi
5835    done
5836
5837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
5838$as_echo_n "checking if racket requires -pthread... " >&6; }
5839    if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
5840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5841$as_echo "yes" >&6; }
5842      MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
5843      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
5844    else
5845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5846$as_echo "no" >&6; }
5847    fi
5848
5849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
5850$as_echo_n "checking for racket config directory... " >&6; }
5851    SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
5852    if test "X$SCHEME_CONFIGDIR" != "X"; then
5853      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
5854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
5855$as_echo "${SCHEME_CONFIGDIR}" >&6; }
5856    else
5857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5858$as_echo "not found" >&6; }
5859    fi
5860
5861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
5862$as_echo_n "checking for racket collects directory... " >&6; }
5863    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))))'`
5864    if test "X$SCHEME_COLLECTS" = "X"; then
5865      if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
5866	SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
5867      else
5868	if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
5869	  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
5870	else
5871	  if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
5872	    SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
5873	  else
5874	    if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
5875	      SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
5876	    fi
5877	  fi
5878	fi
5879      fi
5880    fi
5881    if test "X$SCHEME_COLLECTS" != "X" ; then
5882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
5883$as_echo "${SCHEME_COLLECTS}" >&6; }
5884    else
5885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5886$as_echo "not found" >&6; }
5887    fi
5888
5889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
5890$as_echo_n "checking for mzscheme_base.c... " >&6; }
5891    if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
5892      MZSCHEME_EXTRA="mzscheme_base.c"
5893      MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5894      MZSCHEME_MOD="++lib scheme/base"
5895    else
5896      if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
5897	MZSCHEME_EXTRA="mzscheme_base.c"
5898	MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5899	MZSCHEME_MOD="++lib scheme/base"
5900      else
5901	if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
5902	  MZSCHEME_EXTRA="mzscheme_base.c"
5903	  MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
5904	  MZSCHEME_MOD=""
5905	fi
5906      fi
5907    fi
5908    if test "X$MZSCHEME_EXTRA" != "X" ; then
5909            MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
5910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: needed" >&5
5911$as_echo "needed" >&6; }
5912    else
5913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
5914$as_echo "not needed" >&6; }
5915    fi
5916
5917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
5918$as_echo_n "checking for ffi_type_void in -lffi... " >&6; }
5919if ${ac_cv_lib_ffi_ffi_type_void+:} false; then :
5920  $as_echo_n "(cached) " >&6
5921else
5922  ac_check_lib_save_LIBS=$LIBS
5923LIBS="-lffi  $LIBS"
5924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5925/* end confdefs.h.  */
5926
5927/* Override any GCC internal prototype to avoid an error.
5928   Use char because int might match the return type of a GCC
5929   builtin and then its argument prototype would still apply.  */
5930#ifdef __cplusplus
5931extern "C"
5932#endif
5933char ffi_type_void ();
5934int
5935main ()
5936{
5937return ffi_type_void ();
5938  ;
5939  return 0;
5940}
5941_ACEOF
5942if ac_fn_c_try_link "$LINENO"; then :
5943  ac_cv_lib_ffi_ffi_type_void=yes
5944else
5945  ac_cv_lib_ffi_ffi_type_void=no
5946fi
5947rm -f core conftest.err conftest.$ac_objext \
5948    conftest$ac_exeext conftest.$ac_ext
5949LIBS=$ac_check_lib_save_LIBS
5950fi
5951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
5952$as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; }
5953if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes; then :
5954  MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
5955fi
5956
5957
5958    MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
5959      -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
5960
5961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
5962$as_echo_n "checking if compile and link flags for MzScheme are sane... " >&6; }
5963    cflags_save=$CFLAGS
5964    libs_save=$LIBS
5965    CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
5966    LIBS="$LIBS $MZSCHEME_LIBS"
5967    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5968/* end confdefs.h.  */
5969
5970int
5971main ()
5972{
5973
5974  ;
5975  return 0;
5976}
5977_ACEOF
5978if ac_fn_c_try_link "$LINENO"; then :
5979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5980$as_echo "yes" >&6; }; mzs_ok=yes
5981else
5982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
5983$as_echo "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
5984fi
5985rm -f core conftest.err conftest.$ac_objext \
5986    conftest$ac_exeext conftest.$ac_ext
5987    CFLAGS=$cflags_save
5988    LIBS=$libs_save
5989    if test $mzs_ok = yes; then
5990      MZSCHEME_SRC="if_mzsch.c"
5991      MZSCHEME_OBJ="objects/if_mzsch.o"
5992      MZSCHEME_PRO="if_mzsch.pro"
5993      $as_echo "#define FEAT_MZSCHEME 1" >>confdefs.h
5994
5995    else
5996      MZSCHEME_CFLAGS=
5997      MZSCHEME_LIBS=
5998      MZSCHEME_EXTRA=
5999      MZSCHEME_MZC=
6000    fi
6001  fi
6002
6003
6004
6005
6006
6007
6008
6009fi
6010
6011
6012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6013$as_echo_n "checking --enable-perlinterp argument... " >&6; }
6014# Check whether --enable-perlinterp was given.
6015if test "${enable_perlinterp+set}" = set; then :
6016  enableval=$enable_perlinterp;
6017else
6018  enable_perlinterp="no"
6019fi
6020
6021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6022$as_echo "$enable_perlinterp" >&6; }
6023if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
6024  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6025    as_fn_error $? "cannot use Perl with tiny or small features" "$LINENO" 5
6026  fi
6027
6028  # Extract the first word of "perl", so it can be a program name with args.
6029set dummy perl; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if ${ac_cv_path_vi_cv_path_perl+:} false; then :
6033  $as_echo_n "(cached) " >&6
6034else
6035  case $vi_cv_path_perl in
6036  [\\/]* | ?:[\\/]*)
6037  ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6038  ;;
6039  *)
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_exec_ext in '' $ac_executable_extensions; do
6046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047    ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext"
6048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049    break 2
6050  fi
6051done
6052  done
6053IFS=$as_save_IFS
6054
6055  ;;
6056esac
6057fi
6058vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
6059if test -n "$vi_cv_path_perl"; then
6060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6061$as_echo "$vi_cv_path_perl" >&6; }
6062else
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
6065fi
6066
6067
6068  if test "X$vi_cv_path_perl" != "X"; then
6069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6070$as_echo_n "checking Perl version... " >&6; }
6071    if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6072     eval `$vi_cv_path_perl -V:usethreads`
6073     eval `$vi_cv_path_perl -V:libperl`
6074     if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6075       badthreads=no
6076     else
6077       if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6078	 eval `$vi_cv_path_perl -V:use5005threads`
6079	 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6080	   badthreads=no
6081	 else
6082	   badthreads=yes
6083	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6084$as_echo ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
6085	 fi
6086       else
6087	 badthreads=yes
6088	 { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6089$as_echo ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
6090       fi
6091     fi
6092     if test $badthreads = no; then
6093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6094$as_echo "OK" >&6; }
6095      eval `$vi_cv_path_perl -V:shrpenv`
6096      if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6097	shrpenv=""
6098      fi
6099      vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
6100
6101      vi_cv_perl_extutils=unknown_perl_extutils_path
6102      for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6103	xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6104	if test -f "$xsubpp_path"; then
6105	  vi_cv_perl_xsubpp="$xsubpp_path"
6106	fi
6107      done
6108
6109                              perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
6110		-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6111		-e 's/-fdebug-prefix-map[^ ]*//g' \
6112		-e 's/-pipe //' \
6113		-e 's/-W[^ ]*//g' \
6114		-e 's/-D_FORTIFY_SOURCE=.//g'`
6115            perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6116		sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6117			-e 's/-bE:perl.exp//' -e 's/-lc //'`
6118                  perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6119		-e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6120
6121                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6122$as_echo_n "checking if compile and link flags for Perl are sane... " >&6; }
6123      cflags_save=$CFLAGS
6124      libs_save=$LIBS
6125      ldflags_save=$LDFLAGS
6126      CFLAGS="$CFLAGS $perlcppflags"
6127      LIBS="$LIBS $perllibs"
6128      perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
6129      LDFLAGS="$perlldflags $LDFLAGS"
6130      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6131/* end confdefs.h.  */
6132
6133int
6134main ()
6135{
6136
6137  ;
6138  return 0;
6139}
6140_ACEOF
6141if ac_fn_c_try_link "$LINENO"; then :
6142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6143$as_echo "yes" >&6; }; perl_ok=yes
6144else
6145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6146$as_echo "no: PERL DISABLED" >&6; }; perl_ok=no
6147fi
6148rm -f core conftest.err conftest.$ac_objext \
6149    conftest$ac_exeext conftest.$ac_ext
6150      CFLAGS=$cflags_save
6151      LIBS=$libs_save
6152      LDFLAGS=$ldflags_save
6153      if test $perl_ok = yes; then
6154	if test "X$perlcppflags" != "X"; then
6155	  PERL_CFLAGS=$perlcppflags
6156	fi
6157	if test "X$perlldflags" != "X"; then
6158	  if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
6159	    LDFLAGS="$perlldflags $LDFLAGS"
6160	  fi
6161	fi
6162	PERL_LIBS=$perllibs
6163	PERL_SRC="auto/if_perl.c if_perlsfio.c"
6164	PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6165	PERL_PRO="if_perl.pro if_perlsfio.pro"
6166	$as_echo "#define FEAT_PERL 1" >>confdefs.h
6167
6168      fi
6169     fi
6170    else
6171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6172$as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
6173    fi
6174  fi
6175
6176  if test "x$MACOS_X" = "xyes"; then
6177        dir=/System/Library/Perl
6178    darwindir=$dir/darwin
6179    if test -d $darwindir; then
6180      PERL=/usr/bin/perl
6181    else
6182            dir=/System/Library/Perl/5.8.1
6183      darwindir=$dir/darwin-thread-multi-2level
6184      if test -d $darwindir; then
6185	PERL=/usr/bin/perl
6186      fi
6187    fi
6188    if test -n "$PERL"; then
6189      PERL_DIR="$dir"
6190      PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6191      PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6192      PERL_LIBS="-L$darwindir/CORE -lperl"
6193    fi
6194                PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6195    PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6196  fi
6197  if test "$enable_perlinterp" = "dynamic"; then
6198    if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
6199      $as_echo "#define DYNAMIC_PERL 1" >>confdefs.h
6200
6201      PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
6202    fi
6203  fi
6204
6205  if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
6206    as_fn_error $? "could not configure perl" "$LINENO" 5
6207  fi
6208fi
6209
6210
6211
6212
6213
6214
6215
6216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6217$as_echo_n "checking --enable-pythoninterp argument... " >&6; }
6218# Check whether --enable-pythoninterp was given.
6219if test "${enable_pythoninterp+set}" = set; then :
6220  enableval=$enable_pythoninterp;
6221else
6222  enable_pythoninterp="no"
6223fi
6224
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6226$as_echo "$enable_pythoninterp" >&6; }
6227if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
6228  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6229    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
6230  fi
6231
6232    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6233$as_echo_n "checking --with-python-command argument... " >&6; }
6234
6235
6236# Check whether --with-python-command was given.
6237if test "${with_python_command+set}" = set; then :
6238  withval=$with_python_command; vi_cv_path_python="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6239$as_echo "$vi_cv_path_python" >&6; }
6240else
6241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
6243fi
6244
6245
6246  if test "X$vi_cv_path_python" = "X"; then
6247    for ac_prog in python2 python
6248do
6249  # Extract the first word of "$ac_prog", so it can be a program name with args.
6250set dummy $ac_prog; ac_word=$2
6251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6252$as_echo_n "checking for $ac_word... " >&6; }
6253if ${ac_cv_path_vi_cv_path_python+:} false; then :
6254  $as_echo_n "(cached) " >&6
6255else
6256  case $vi_cv_path_python in
6257  [\\/]* | ?:[\\/]*)
6258  ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6259  ;;
6260  *)
6261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262for as_dir in $PATH
6263do
6264  IFS=$as_save_IFS
6265  test -z "$as_dir" && as_dir=.
6266    for ac_exec_ext in '' $ac_executable_extensions; do
6267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6268    ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext"
6269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6270    break 2
6271  fi
6272done
6273  done
6274IFS=$as_save_IFS
6275
6276  ;;
6277esac
6278fi
6279vi_cv_path_python=$ac_cv_path_vi_cv_path_python
6280if test -n "$vi_cv_path_python"; then
6281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6282$as_echo "$vi_cv_path_python" >&6; }
6283else
6284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6285$as_echo "no" >&6; }
6286fi
6287
6288
6289  test -n "$vi_cv_path_python" && break
6290done
6291
6292  fi
6293  if test "X$vi_cv_path_python" != "X"; then
6294
6295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6296$as_echo_n "checking Python version... " >&6; }
6297if ${vi_cv_var_python_version+:} false; then :
6298  $as_echo_n "(cached) " >&6
6299else
6300  vi_cv_var_python_version=`
6301	    ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
6302
6303fi
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6305$as_echo "$vi_cv_var_python_version" >&6; }
6306
6307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6308$as_echo_n "checking Python is 2.3 or better... " >&6; }
6309    if ${vi_cv_path_python} -c \
6310	"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
6311    then
6312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6313$as_echo "yep" >&6; }
6314
6315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6316$as_echo_n "checking Python's install prefix... " >&6; }
6317if ${vi_cv_path_python_pfx+:} false; then :
6318  $as_echo_n "(cached) " >&6
6319else
6320   vi_cv_path_python_pfx=`
6321	    ${vi_cv_path_python} -c \
6322		"import sys; print sys.prefix"`
6323fi
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6325$as_echo "$vi_cv_path_python_pfx" >&6; }
6326
6327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6328$as_echo_n "checking Python's execution prefix... " >&6; }
6329if ${vi_cv_path_python_epfx+:} false; then :
6330  $as_echo_n "(cached) " >&6
6331else
6332   vi_cv_path_python_epfx=`
6333	    ${vi_cv_path_python} -c \
6334		"import sys; print sys.exec_prefix"`
6335fi
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6337$as_echo "$vi_cv_path_python_epfx" >&6; }
6338
6339
6340      if ${vi_cv_path_pythonpath+:} false; then :
6341  $as_echo_n "(cached) " >&6
6342else
6343   vi_cv_path_pythonpath=`
6344	    unset PYTHONPATH;
6345	    ${vi_cv_path_python} -c \
6346		"import sys, string; print string.join(sys.path,':')"`
6347fi
6348
6349
6350
6351
6352# Check whether --with-python-config-dir was given.
6353if test "${with_python_config_dir+set}" = set; then :
6354  withval=$with_python_config_dir;  vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
6355fi
6356
6357
6358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6359$as_echo_n "checking Python's configuration directory... " >&6; }
6360if ${vi_cv_path_python_conf+:} false; then :
6361  $as_echo_n "(cached) " >&6
6362else
6363
6364	vi_cv_path_python_conf=
6365	d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6366	if test -d "$d" && test -f "$d/config.c"; then
6367	  vi_cv_path_python_conf="$d"
6368	else
6369	  for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6370	    for subdir in lib64 lib share; do
6371	      d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6372	      if test -d "$d" && test -f "$d/config.c"; then
6373		vi_cv_path_python_conf="$d"
6374	      fi
6375	    done
6376	  done
6377	fi
6378
6379fi
6380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6381$as_echo "$vi_cv_path_python_conf" >&6; }
6382
6383      PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6384
6385      if test "X$PYTHON_CONFDIR" = "X"; then
6386	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6387$as_echo "can't find it!" >&6; }
6388      else
6389
6390			if ${vi_cv_path_python_plibs+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393
6394	    pwd=`pwd`
6395	    tmp_mkf="$pwd/config-PyMake$$"
6396	    cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
6397__:
6398	@echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
6399	@echo "python_LIBS='$(LIBS)'"
6400	@echo "python_SYSLIBS='$(SYSLIBS)'"
6401	@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
6402	@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
6403	@echo "python_INSTSONAME='$(INSTSONAME)'"
6404	@echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6405	@echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6406	@echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
6407eof
6408	    	    eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6409	    rm -f -- "${tmp_mkf}"
6410	    if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
6411		"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6412	      vi_cv_path_python_plibs="-framework Python"
6413	      if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6414		  vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6415	      fi
6416	    else
6417	      vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
6418	      	      	      	      if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6419	        python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6420		python_link_path=`echo ${python_LINKFORSHARED} |   sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6421	        if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6422	          		  	          python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6423		  if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6424		    		    python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6425	            	            		  fi
6426	          python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6427	        fi
6428	      fi
6429	      vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
6430	      	      vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6431	    fi
6432
6433fi
6434
6435	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6436$as_echo_n "checking Python's dll name... " >&6; }
6437if ${vi_cv_dll_name_python+:} false; then :
6438  $as_echo_n "(cached) " >&6
6439else
6440
6441	  if test "X$python_DLLLIBRARY" != "X"; then
6442	    vi_cv_dll_name_python="$python_DLLLIBRARY"
6443	  else
6444	    vi_cv_dll_name_python="$python_INSTSONAME"
6445	  fi
6446
6447fi
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6449$as_echo "$vi_cv_dll_name_python" >&6; }
6450
6451	PYTHON_LIBS="${vi_cv_path_python_plibs}"
6452	if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
6453	  PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
6454	else
6455	  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}"
6456	fi
6457	if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
6458	  	  PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6459
6460	fi
6461	PYTHON_SRC="if_python.c"
6462	PYTHON_OBJ="objects/if_python.o"
6463
6464								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6465$as_echo_n "checking if -pthread should be used... " >&6; }
6466	threadsafe_flag=
6467	thread_lib=
6468	        if test "`(uname) 2>/dev/null`" != Darwin; then
6469	  test "$GCC" = yes && threadsafe_flag="-pthread"
6470	  if test "`(uname) 2>/dev/null`" = FreeBSD; then
6471	    threadsafe_flag="-D_THREAD_SAFE"
6472	    thread_lib="-pthread"
6473	  fi
6474	  if test "`(uname) 2>/dev/null`" = SunOS; then
6475	    threadsafe_flag="-pthreads"
6476	  fi
6477	fi
6478	libs_save_old=$LIBS
6479	if test -n "$threadsafe_flag"; then
6480	  cflags_save=$CFLAGS
6481	  CFLAGS="$CFLAGS $threadsafe_flag"
6482	  LIBS="$LIBS $thread_lib"
6483	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6484/* end confdefs.h.  */
6485
6486int
6487main ()
6488{
6489
6490  ;
6491  return 0;
6492}
6493_ACEOF
6494if ac_fn_c_try_link "$LINENO"; then :
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6496$as_echo "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6497else
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }; LIBS=$libs_save_old
6500
6501fi
6502rm -f core conftest.err conftest.$ac_objext \
6503    conftest$ac_exeext conftest.$ac_ext
6504	  CFLAGS=$cflags_save
6505	else
6506	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; }
6508	fi
6509
6510			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6511$as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
6512	cflags_save=$CFLAGS
6513	libs_save=$LIBS
6514	CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6515	LIBS="$LIBS $PYTHON_LIBS"
6516	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6517/* end confdefs.h.  */
6518
6519int
6520main ()
6521{
6522
6523  ;
6524  return 0;
6525}
6526_ACEOF
6527if ac_fn_c_try_link "$LINENO"; then :
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6529$as_echo "yes" >&6; }; python_ok=yes
6530else
6531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6532$as_echo "no: PYTHON DISABLED" >&6; }; python_ok=no
6533fi
6534rm -f core conftest.err conftest.$ac_objext \
6535    conftest$ac_exeext conftest.$ac_ext
6536	CFLAGS=$cflags_save
6537	LIBS=$libs_save
6538	if test $python_ok = yes; then
6539	  $as_echo "#define FEAT_PYTHON 1" >>confdefs.h
6540
6541	else
6542	  LIBS=$libs_save_old
6543	  PYTHON_SRC=
6544	  PYTHON_OBJ=
6545	  PYTHON_LIBS=
6546	  PYTHON_CFLAGS=
6547	fi
6548      fi
6549    else
6550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6551$as_echo "too old" >&6; }
6552    fi
6553  fi
6554
6555  if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
6556    as_fn_error $? "could not configure python" "$LINENO" 5
6557  fi
6558fi
6559
6560
6561
6562
6563
6564
6565
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6567$as_echo_n "checking --enable-python3interp argument... " >&6; }
6568# Check whether --enable-python3interp was given.
6569if test "${enable_python3interp+set}" = set; then :
6570  enableval=$enable_python3interp;
6571else
6572  enable_python3interp="no"
6573fi
6574
6575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6576$as_echo "$enable_python3interp" >&6; }
6577if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
6578  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6579    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
6580  fi
6581
6582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6583$as_echo_n "checking --with-python3-command argument... " >&6; }
6584
6585
6586# Check whether --with-python3-command was given.
6587if test "${with_python3_command+set}" = set; then :
6588  withval=$with_python3_command; vi_cv_path_python3="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6589$as_echo "$vi_cv_path_python3" >&6; }
6590else
6591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595
6596  if test "X$vi_cv_path_python3" = "X"; then
6597    for ac_prog in python3 python
6598do
6599  # Extract the first word of "$ac_prog", so it can be a program name with args.
6600set dummy $ac_prog; ac_word=$2
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6602$as_echo_n "checking for $ac_word... " >&6; }
6603if ${ac_cv_path_vi_cv_path_python3+:} false; then :
6604  $as_echo_n "(cached) " >&6
6605else
6606  case $vi_cv_path_python3 in
6607  [\\/]* | ?:[\\/]*)
6608  ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
6609  ;;
6610  *)
6611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6612for as_dir in $PATH
6613do
6614  IFS=$as_save_IFS
6615  test -z "$as_dir" && as_dir=.
6616    for ac_exec_ext in '' $ac_executable_extensions; do
6617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6618    ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext"
6619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6620    break 2
6621  fi
6622done
6623  done
6624IFS=$as_save_IFS
6625
6626  ;;
6627esac
6628fi
6629vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
6630if test -n "$vi_cv_path_python3"; then
6631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6632$as_echo "$vi_cv_path_python3" >&6; }
6633else
6634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6635$as_echo "no" >&6; }
6636fi
6637
6638
6639  test -n "$vi_cv_path_python3" && break
6640done
6641
6642  fi
6643  if test "X$vi_cv_path_python3" != "X"; then
6644
6645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6646$as_echo_n "checking Python version... " >&6; }
6647if ${vi_cv_var_python3_version+:} false; then :
6648  $as_echo_n "(cached) " >&6
6649else
6650  vi_cv_var_python3_version=`
6651          ${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
6652
6653fi
6654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
6655$as_echo "$vi_cv_var_python3_version" >&6; }
6656
6657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
6658$as_echo_n "checking Python is 3.0 or better... " >&6; }
6659    if ${vi_cv_path_python3} -c \
6660      "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
6661    then
6662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6663$as_echo "yep" >&6; }
6664
6665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
6666$as_echo_n "checking Python's abiflags... " >&6; }
6667if ${vi_cv_var_python3_abiflags+:} false; then :
6668  $as_echo_n "(cached) " >&6
6669else
6670
6671       vi_cv_var_python3_abiflags=
6672       if ${vi_cv_path_python3} -c \
6673           "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
6674       then
6675         vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
6676           "import sys; print(sys.abiflags)"`
6677       fi
6678fi
6679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
6680$as_echo "$vi_cv_var_python3_abiflags" >&6; }
6681
6682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6683$as_echo_n "checking Python's install prefix... " >&6; }
6684if ${vi_cv_path_python3_pfx+:} false; then :
6685  $as_echo_n "(cached) " >&6
6686else
6687   vi_cv_path_python3_pfx=`
6688       ${vi_cv_path_python3} -c \
6689       "import sys; print(sys.prefix)"`
6690fi
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
6692$as_echo "$vi_cv_path_python3_pfx" >&6; }
6693
6694            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6695$as_echo_n "checking Python's execution prefix... " >&6; }
6696if ${vi_cv_path_python3_epfx+:} false; then :
6697  $as_echo_n "(cached) " >&6
6698else
6699   vi_cv_path_python3_epfx=`
6700       ${vi_cv_path_python3} -c \
6701       "import sys; print(sys.exec_prefix)"`
6702fi
6703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
6704$as_echo "$vi_cv_path_python3_epfx" >&6; }
6705
6706
6707      if ${vi_cv_path_python3path+:} false; then :
6708  $as_echo_n "(cached) " >&6
6709else
6710   vi_cv_path_python3path=`
6711       unset PYTHONPATH;
6712       ${vi_cv_path_python3} -c \
6713       "import sys, string; print(':'.join(sys.path))"`
6714fi
6715
6716
6717
6718
6719# Check whether --with-python3-config-dir was given.
6720if test "${with_python3_config_dir+set}" = set; then :
6721  withval=$with_python3_config_dir;  vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
6722fi
6723
6724
6725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6726$as_echo_n "checking Python's configuration directory... " >&6; }
6727if ${vi_cv_path_python3_conf+:} false; then :
6728  $as_echo_n "(cached) " >&6
6729else
6730
6731       vi_cv_path_python3_conf=
6732       config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6733       d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
6734       if test -d "$d" && test -f "$d/config.c"; then
6735         vi_cv_path_python3_conf="$d"
6736       else
6737         for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
6738	   for subdir in lib64 lib share; do
6739	     d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
6740	     if test -d "$d" && test -f "$d/config.c"; then
6741	       vi_cv_path_python3_conf="$d"
6742	     fi
6743	   done
6744         done
6745       fi
6746
6747fi
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
6749$as_echo "$vi_cv_path_python3_conf" >&6; }
6750
6751      PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
6752
6753      if test "X$PYTHON3_CONFDIR" = "X"; then
6754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6755$as_echo "can't find it!" >&6; }
6756      else
6757
6758                        if ${vi_cv_path_python3_plibs+:} false; then :
6759  $as_echo_n "(cached) " >&6
6760else
6761
6762            pwd=`pwd`
6763            tmp_mkf="$pwd/config-PyMake$$"
6764            cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
6765__:
6766	@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
6767	@echo "python3_LIBS='$(LIBS)'"
6768	@echo "python3_SYSLIBS='$(SYSLIBS)'"
6769	@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
6770	@echo "python3_INSTSONAME='$(INSTSONAME)'"
6771eof
6772	    	    eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6773	    rm -f -- "${tmp_mkf}"
6774	    vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6775	    vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
6776	    	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
6777	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
6778
6779fi
6780
6781	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
6782$as_echo_n "checking Python3's dll name... " >&6; }
6783if ${vi_cv_dll_name_python3+:} false; then :
6784  $as_echo_n "(cached) " >&6
6785else
6786
6787	  if test "X$python3_DLLLIBRARY" != "X"; then
6788	    vi_cv_dll_name_python3="$python3_DLLLIBRARY"
6789	  else
6790	    vi_cv_dll_name_python3="$python3_INSTSONAME"
6791	  fi
6792
6793fi
6794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
6795$as_echo "$vi_cv_dll_name_python3" >&6; }
6796
6797        PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
6798        if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
6799          PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6800        else
6801          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}"
6802        fi
6803	if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
6804	  	  PYTHON3_CFLAGS="${PYTHON3_CFLAGS}  -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
6805	fi
6806        PYTHON3_SRC="if_python3.c"
6807        PYTHON3_OBJ="objects/if_python3.o"
6808
6809                                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6810$as_echo_n "checking if -pthread should be used... " >&6; }
6811        threadsafe_flag=
6812        thread_lib=
6813                if test "`(uname) 2>/dev/null`" != Darwin; then
6814          test "$GCC" = yes && threadsafe_flag="-pthread"
6815          if test "`(uname) 2>/dev/null`" = FreeBSD; then
6816            threadsafe_flag="-D_THREAD_SAFE"
6817            thread_lib="-pthread"
6818          fi
6819          if test "`(uname) 2>/dev/null`" = SunOS; then
6820            threadsafe_flag="-pthreads"
6821          fi
6822        fi
6823        libs_save_old=$LIBS
6824        if test -n "$threadsafe_flag"; then
6825          cflags_save=$CFLAGS
6826          CFLAGS="$CFLAGS $threadsafe_flag"
6827          LIBS="$LIBS $thread_lib"
6828          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829/* end confdefs.h.  */
6830
6831int
6832main ()
6833{
6834
6835  ;
6836  return 0;
6837}
6838_ACEOF
6839if ac_fn_c_try_link "$LINENO"; then :
6840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6841$as_echo "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
6842else
6843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6844$as_echo "no" >&6; }; LIBS=$libs_save_old
6845
6846fi
6847rm -f core conftest.err conftest.$ac_objext \
6848    conftest$ac_exeext conftest.$ac_ext
6849          CFLAGS=$cflags_save
6850        else
6851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6852$as_echo "no" >&6; }
6853        fi
6854
6855                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
6856$as_echo_n "checking if compile and link flags for Python 3 are sane... " >&6; }
6857        cflags_save=$CFLAGS
6858        libs_save=$LIBS
6859        CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
6860        LIBS="$LIBS $PYTHON3_LIBS"
6861        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6862/* end confdefs.h.  */
6863
6864int
6865main ()
6866{
6867
6868  ;
6869  return 0;
6870}
6871_ACEOF
6872if ac_fn_c_try_link "$LINENO"; then :
6873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6874$as_echo "yes" >&6; }; python3_ok=yes
6875else
6876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
6877$as_echo "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
6878fi
6879rm -f core conftest.err conftest.$ac_objext \
6880    conftest$ac_exeext conftest.$ac_ext
6881        CFLAGS=$cflags_save
6882        LIBS=$libs_save
6883        if test "$python3_ok" = yes; then
6884          $as_echo "#define FEAT_PYTHON3 1" >>confdefs.h
6885
6886        else
6887          LIBS=$libs_save_old
6888          PYTHON3_SRC=
6889          PYTHON3_OBJ=
6890          PYTHON3_LIBS=
6891          PYTHON3_CFLAGS=
6892        fi
6893      fi
6894    else
6895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6896$as_echo "too old" >&6; }
6897    fi
6898  fi
6899  if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
6900    as_fn_error $? "could not configure python3" "$LINENO" 5
6901  fi
6902fi
6903
6904
6905
6906
6907
6908
6909if test "$python_ok" = yes && test "$python3_ok" = yes; then
6910  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
6911
6912  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
6913
6914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
6915$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
6916  cflags_save=$CFLAGS
6917  CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6918  libs_save=$LIBS
6919    LIBS="-ldl $LIBS"
6920  if test "$cross_compiling" = yes; then :
6921  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6923as_fn_error $? "cannot run test program while cross compiling
6924See \`config.log' for more details" "$LINENO" 5; }
6925else
6926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6927/* end confdefs.h.  */
6928
6929    #include <dlfcn.h>
6930    /* If this program fails, then RTLD_GLOBAL is needed.
6931     * RTLD_GLOBAL will be used and then it is not possible to
6932     * have both python versions enabled in the same vim instance.
6933     * Only the first python version used will be switched on.
6934     */
6935
6936    int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
6937    {
6938      int needed = 0;
6939      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
6940      if (pylib != 0)
6941      {
6942          void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
6943          void (*init)(void) = dlsym(pylib, "Py_Initialize");
6944          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
6945          void (*final)(void) = dlsym(pylib, "Py_Finalize");
6946          (*pfx)(prefix);
6947          (*init)();
6948          needed = (*simple)("import termios") == -1;
6949          (*final)();
6950          dlclose(pylib);
6951      }
6952      return !needed;
6953    }
6954
6955    int main(int argc, char** argv)
6956    {
6957      int not_needed = 0;
6958      if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
6959            not_needed = 1;
6960      return !not_needed;
6961    }
6962_ACEOF
6963if ac_fn_c_try_run "$LINENO"; then :
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6965$as_echo "yes" >&6; };$as_echo "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
6966
6967else
6968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6969$as_echo "no" >&6; }
6970fi
6971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6972  conftest.$ac_objext conftest.beam conftest.$ac_ext
6973fi
6974
6975
6976  CFLAGS=$cflags_save
6977  LIBS=$libs_save
6978
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
6980$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
6981  cflags_save=$CFLAGS
6982  CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
6983  libs_save=$LIBS
6984    LIBS="-ldl $LIBS"
6985  if test "$cross_compiling" = yes; then :
6986  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6988as_fn_error $? "cannot run test program while cross compiling
6989See \`config.log' for more details" "$LINENO" 5; }
6990else
6991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6992/* end confdefs.h.  */
6993
6994    #include <dlfcn.h>
6995    #include <wchar.h>
6996    /* If this program fails, then RTLD_GLOBAL is needed.
6997     * RTLD_GLOBAL will be used and then it is not possible to
6998     * have both python versions enabled in the same vim instance.
6999     * Only the first python version used will be switched on.
7000     */
7001
7002    int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
7003    {
7004      int needed = 0;
7005      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
7006      if (pylib != 0)
7007      {
7008          void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7009          void (*init)(void) = dlsym(pylib, "Py_Initialize");
7010          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7011          void (*final)(void) = dlsym(pylib, "Py_Finalize");
7012          (*pfx)(prefix);
7013          (*init)();
7014          needed = (*simple)("import termios") == -1;
7015          (*final)();
7016          dlclose(pylib);
7017      }
7018      return !needed;
7019    }
7020
7021    int main(int argc, char** argv)
7022    {
7023      int not_needed = 0;
7024      if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
7025            not_needed = 1;
7026      return !not_needed;
7027    }
7028_ACEOF
7029if ac_fn_c_try_run "$LINENO"; then :
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7031$as_echo "yes" >&6; };$as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
7032
7033else
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035$as_echo "no" >&6; }
7036fi
7037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7038  conftest.$ac_objext conftest.beam conftest.$ac_ext
7039fi
7040
7041
7042  CFLAGS=$cflags_save
7043  LIBS=$libs_save
7044
7045  PYTHON_SRC="if_python.c"
7046  PYTHON_OBJ="objects/if_python.o"
7047  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
7048  PYTHON_LIBS=
7049  PYTHON3_SRC="if_python3.c"
7050  PYTHON3_OBJ="objects/if_python3.o"
7051  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
7052  PYTHON3_LIBS=
7053elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
7054  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
7055
7056  PYTHON_SRC="if_python.c"
7057  PYTHON_OBJ="objects/if_python.o"
7058  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
7059  PYTHON_LIBS=
7060elif test "$python_ok" = yes; then
7061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7062$as_echo_n "checking if -fPIE can be added for Python... " >&6; }
7063  cflags_save=$CFLAGS
7064  libs_save=$LIBS
7065  CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7066  LIBS="$LIBS $PYTHON_LIBS"
7067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068/* end confdefs.h.  */
7069
7070int
7071main ()
7072{
7073
7074  ;
7075  return 0;
7076}
7077_ACEOF
7078if ac_fn_c_try_link "$LINENO"; then :
7079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7080$as_echo "yes" >&6; }; fpie_ok=yes
7081else
7082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083$as_echo "no" >&6; }; fpie_ok=no
7084fi
7085rm -f core conftest.err conftest.$ac_objext \
7086    conftest$ac_exeext conftest.$ac_ext
7087  CFLAGS=$cflags_save
7088  LIBS=$libs_save
7089  if test $fpie_ok = yes; then
7090    PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7091  fi
7092elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
7093  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
7094
7095  PYTHON3_SRC="if_python3.c"
7096  PYTHON3_OBJ="objects/if_python3.o"
7097  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
7098  PYTHON3_LIBS=
7099elif test "$python3_ok" = yes; then
7100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7101$as_echo_n "checking if -fPIE can be added for Python3... " >&6; }
7102  cflags_save=$CFLAGS
7103  libs_save=$LIBS
7104  CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7105  LIBS="$LIBS $PYTHON3_LIBS"
7106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h.  */
7108
7109int
7110main ()
7111{
7112
7113  ;
7114  return 0;
7115}
7116_ACEOF
7117if ac_fn_c_try_link "$LINENO"; then :
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7119$as_echo "yes" >&6; }; fpie_ok=yes
7120else
7121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7122$as_echo "no" >&6; }; fpie_ok=no
7123fi
7124rm -f core conftest.err conftest.$ac_objext \
7125    conftest$ac_exeext conftest.$ac_ext
7126  CFLAGS=$cflags_save
7127  LIBS=$libs_save
7128  if test $fpie_ok = yes; then
7129    PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7130  fi
7131fi
7132
7133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7134$as_echo_n "checking --enable-tclinterp argument... " >&6; }
7135# Check whether --enable-tclinterp was given.
7136if test "${enable_tclinterp+set}" = set; then :
7137  enableval=$enable_tclinterp;
7138else
7139  enable_tclinterp="no"
7140fi
7141
7142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7143$as_echo "$enable_tclinterp" >&6; }
7144
7145if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
7146
7147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7148$as_echo_n "checking --with-tclsh argument... " >&6; }
7149
7150# Check whether --with-tclsh was given.
7151if test "${with_tclsh+set}" = set; then :
7152  withval=$with_tclsh; tclsh_name="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7153$as_echo "$tclsh_name" >&6; }
7154else
7155  tclsh_name="tclsh8.5"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7156$as_echo "no" >&6; }
7157fi
7158
7159  # Extract the first word of "$tclsh_name", so it can be a program name with args.
7160set dummy $tclsh_name; ac_word=$2
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7162$as_echo_n "checking for $ac_word... " >&6; }
7163if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7164  $as_echo_n "(cached) " >&6
7165else
7166  case $vi_cv_path_tcl in
7167  [\\/]* | ?:[\\/]*)
7168  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7169  ;;
7170  *)
7171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172for as_dir in $PATH
7173do
7174  IFS=$as_save_IFS
7175  test -z "$as_dir" && as_dir=.
7176    for ac_exec_ext in '' $ac_executable_extensions; do
7177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7178    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7180    break 2
7181  fi
7182done
7183  done
7184IFS=$as_save_IFS
7185
7186  ;;
7187esac
7188fi
7189vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7190if test -n "$vi_cv_path_tcl"; then
7191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7192$as_echo "$vi_cv_path_tcl" >&6; }
7193else
7194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195$as_echo "no" >&6; }
7196fi
7197
7198
7199
7200
7201    if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7202    tclsh_name="tclsh8.4"
7203    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7204set dummy $tclsh_name; ac_word=$2
7205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7206$as_echo_n "checking for $ac_word... " >&6; }
7207if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7208  $as_echo_n "(cached) " >&6
7209else
7210  case $vi_cv_path_tcl in
7211  [\\/]* | ?:[\\/]*)
7212  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7213  ;;
7214  *)
7215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7216for as_dir in $PATH
7217do
7218  IFS=$as_save_IFS
7219  test -z "$as_dir" && as_dir=.
7220    for ac_exec_ext in '' $ac_executable_extensions; do
7221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7222    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7224    break 2
7225  fi
7226done
7227  done
7228IFS=$as_save_IFS
7229
7230  ;;
7231esac
7232fi
7233vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7234if test -n "$vi_cv_path_tcl"; then
7235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7236$as_echo "$vi_cv_path_tcl" >&6; }
7237else
7238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7239$as_echo "no" >&6; }
7240fi
7241
7242
7243  fi
7244  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
7245    tclsh_name="tclsh8.2"
7246    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7247set dummy $tclsh_name; ac_word=$2
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7249$as_echo_n "checking for $ac_word... " >&6; }
7250if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7251  $as_echo_n "(cached) " >&6
7252else
7253  case $vi_cv_path_tcl in
7254  [\\/]* | ?:[\\/]*)
7255  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7256  ;;
7257  *)
7258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259for as_dir in $PATH
7260do
7261  IFS=$as_save_IFS
7262  test -z "$as_dir" && as_dir=.
7263    for ac_exec_ext in '' $ac_executable_extensions; do
7264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267    break 2
7268  fi
7269done
7270  done
7271IFS=$as_save_IFS
7272
7273  ;;
7274esac
7275fi
7276vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7277if test -n "$vi_cv_path_tcl"; then
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7279$as_echo "$vi_cv_path_tcl" >&6; }
7280else
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7282$as_echo "no" >&6; }
7283fi
7284
7285
7286  fi
7287  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7288    tclsh_name="tclsh8.0"
7289    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7290set dummy $tclsh_name; ac_word=$2
7291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7292$as_echo_n "checking for $ac_word... " >&6; }
7293if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7294  $as_echo_n "(cached) " >&6
7295else
7296  case $vi_cv_path_tcl in
7297  [\\/]* | ?:[\\/]*)
7298  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7299  ;;
7300  *)
7301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7302for as_dir in $PATH
7303do
7304  IFS=$as_save_IFS
7305  test -z "$as_dir" && as_dir=.
7306    for ac_exec_ext in '' $ac_executable_extensions; do
7307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7308    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7310    break 2
7311  fi
7312done
7313  done
7314IFS=$as_save_IFS
7315
7316  ;;
7317esac
7318fi
7319vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7320if test -n "$vi_cv_path_tcl"; then
7321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7322$as_echo "$vi_cv_path_tcl" >&6; }
7323else
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7325$as_echo "no" >&6; }
7326fi
7327
7328
7329  fi
7330    if test "X$vi_cv_path_tcl" = "X"; then
7331    tclsh_name="tclsh"
7332    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7333set dummy $tclsh_name; ac_word=$2
7334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7335$as_echo_n "checking for $ac_word... " >&6; }
7336if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7337  $as_echo_n "(cached) " >&6
7338else
7339  case $vi_cv_path_tcl in
7340  [\\/]* | ?:[\\/]*)
7341  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7342  ;;
7343  *)
7344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7345for as_dir in $PATH
7346do
7347  IFS=$as_save_IFS
7348  test -z "$as_dir" && as_dir=.
7349    for ac_exec_ext in '' $ac_executable_extensions; do
7350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7351    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7353    break 2
7354  fi
7355done
7356  done
7357IFS=$as_save_IFS
7358
7359  ;;
7360esac
7361fi
7362vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7363if test -n "$vi_cv_path_tcl"; then
7364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7365$as_echo "$vi_cv_path_tcl" >&6; }
7366else
7367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7368$as_echo "no" >&6; }
7369fi
7370
7371
7372  fi
7373  if test "X$vi_cv_path_tcl" != "X"; then
7374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7375$as_echo_n "checking Tcl version... " >&6; }
7376    if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
7377      tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
7378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7379$as_echo "$tclver - OK" >&6; };
7380      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 -`
7381      tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
7382
7383      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7384$as_echo_n "checking for location of Tcl include... " >&6; }
7385      if test "x$MACOS_X" != "xyes"; then
7386	tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
7387      else
7388		tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
7389      fi
7390      TCL_INC=
7391      for try in $tclinc; do
7392	if test -f "$try/tcl.h"; then
7393	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7394$as_echo "$try/tcl.h" >&6; }
7395	  TCL_INC=$try
7396	  break
7397	fi
7398      done
7399      if test -z "$TCL_INC"; then
7400	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7401$as_echo "<not found>" >&6; }
7402	SKIP_TCL=YES
7403      fi
7404      if test -z "$SKIP_TCL"; then
7405	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7406$as_echo_n "checking for location of tclConfig.sh script... " >&6; }
7407	if test "x$MACOS_X" != "xyes"; then
7408	  tclcnf=`echo $tclinc | sed s/include/lib/g`
7409	  tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
7410	else
7411	  	  tclcnf="/System/Library/Frameworks/Tcl.framework"
7412	fi
7413	for try in $tclcnf; do
7414	  if test -f "$try/tclConfig.sh"; then
7415	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7416$as_echo "$try/tclConfig.sh" >&6; }
7417	    . "$try/tclConfig.sh"
7418	    	    if test "$enable_tclinterp" = "dynamic"; then
7419	      TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7420	    else
7421	      TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7422	    fi
7423	    	    	    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'`
7424	    break
7425	  fi
7426	done
7427	if test -z "$TCL_LIBS"; then
7428	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7429$as_echo "<not found>" >&6; }
7430	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7431$as_echo_n "checking for Tcl library by myself... " >&6; }
7432	  tcllib=`echo $tclinc | sed s/include/lib/g`
7433	  tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
7434	  for ext in .so .a ; do
7435	    for ver in "" $tclver ; do
7436	      for try in $tcllib ; do
7437		trylib=tcl$ver$ext
7438		if test -f "$try/lib$trylib" ; then
7439		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7440$as_echo "$try/lib$trylib" >&6; }
7441		  TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
7442		  if test "`(uname) 2>/dev/null`" = SunOS &&
7443					 uname -r | grep '^5' >/dev/null; then
7444		    TCL_LIBS="$TCL_LIBS -R $try"
7445		  fi
7446		  break 3
7447		fi
7448	      done
7449	    done
7450	  done
7451	  if test -z "$TCL_LIBS"; then
7452	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7453$as_echo "<not found>" >&6; }
7454	    SKIP_TCL=YES
7455	  fi
7456	fi
7457	if test -z "$SKIP_TCL"; then
7458	  $as_echo "#define FEAT_TCL 1" >>confdefs.h
7459
7460	  TCL_SRC=if_tcl.c
7461	  TCL_OBJ=objects/if_tcl.o
7462	  TCL_PRO=if_tcl.pro
7463	  TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7464	fi
7465      fi
7466    else
7467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
7468$as_echo "too old; need Tcl version 8.0 or later" >&6; }
7469    fi
7470  fi
7471  if test "$enable_tclinterp" = "dynamic"; then
7472    if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
7473      $as_echo "#define DYNAMIC_TCL 1" >>confdefs.h
7474
7475      TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
7476    fi
7477  fi
7478  if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
7479    as_fn_error $? "could not configure Tcl" "$LINENO" 5
7480  fi
7481fi
7482
7483
7484
7485
7486
7487
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
7489$as_echo_n "checking --enable-rubyinterp argument... " >&6; }
7490# Check whether --enable-rubyinterp was given.
7491if test "${enable_rubyinterp+set}" = set; then :
7492  enableval=$enable_rubyinterp;
7493else
7494  enable_rubyinterp="no"
7495fi
7496
7497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
7498$as_echo "$enable_rubyinterp" >&6; }
7499if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
7500  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7501    as_fn_error $? "cannot use Ruby with tiny or small features" "$LINENO" 5
7502  fi
7503
7504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
7505$as_echo_n "checking --with-ruby-command argument... " >&6; }
7506
7507
7508# Check whether --with-ruby-command was given.
7509if test "${with_ruby_command+set}" = set; then :
7510  withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
7511$as_echo "$RUBY_CMD" >&6; }
7512else
7513  RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
7514$as_echo "defaulting to $RUBY_CMD" >&6; }
7515fi
7516
7517  # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
7518set dummy $RUBY_CMD; ac_word=$2
7519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7520$as_echo_n "checking for $ac_word... " >&6; }
7521if ${ac_cv_path_vi_cv_path_ruby+:} false; then :
7522  $as_echo_n "(cached) " >&6
7523else
7524  case $vi_cv_path_ruby in
7525  [\\/]* | ?:[\\/]*)
7526  ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
7527  ;;
7528  *)
7529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7530for as_dir in $PATH
7531do
7532  IFS=$as_save_IFS
7533  test -z "$as_dir" && as_dir=.
7534    for ac_exec_ext in '' $ac_executable_extensions; do
7535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7536    ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext"
7537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7538    break 2
7539  fi
7540done
7541  done
7542IFS=$as_save_IFS
7543
7544  ;;
7545esac
7546fi
7547vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
7548if test -n "$vi_cv_path_ruby"; then
7549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
7550$as_echo "$vi_cv_path_ruby" >&6; }
7551else
7552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7553$as_echo "no" >&6; }
7554fi
7555
7556
7557  if test "X$vi_cv_path_ruby" != "X"; then
7558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
7559$as_echo_n "checking Ruby version... " >&6; }
7560    if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
7561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
7562$as_echo "OK" >&6; }
7563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
7564$as_echo_n "checking Ruby rbconfig... " >&6; }
7565      ruby_rbconfig="RbConfig"
7566      if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
7567	ruby_rbconfig="Config"
7568      fi
7569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
7570$as_echo "$ruby_rbconfig" >&6; }
7571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
7572$as_echo_n "checking Ruby header files... " >&6; }
7573      rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
7574      if test "X$rubyhdrdir" != "X"; then
7575	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
7576$as_echo "$rubyhdrdir" >&6; }
7577	RUBY_CFLAGS="-I$rubyhdrdir"
7578        rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
7579        if test -d "$rubyarchdir"; then
7580          RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
7581        fi
7582        rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
7583	if test "X$rubyversion" = "X"; then
7584	  rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]"`
7585	fi
7586        RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
7587	rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
7588	if test "X$rubylibs" != "X"; then
7589	  RUBY_LIBS="$rubylibs"
7590	fi
7591	librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
7592	librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
7593	rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
7594	if test -f "$rubylibdir/$librubya"; then
7595	  librubyarg="$librubyarg"
7596	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7597	elif test "$librubyarg" = "libruby.a"; then
7598	  	  librubyarg="-lruby"
7599	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7600	fi
7601
7602	if test "X$librubyarg" != "X"; then
7603	  RUBY_LIBS="$librubyarg $RUBY_LIBS"
7604	fi
7605	rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
7606	if test "X$rubyldflags" != "X"; then
7607	  	  	  	  rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
7608	  if test "X$rubyldflags" != "X"; then
7609	    if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then
7610	      LDFLAGS="$rubyldflags $LDFLAGS"
7611	    fi
7612	  fi
7613	fi
7614	RUBY_SRC="if_ruby.c"
7615	RUBY_OBJ="objects/if_ruby.o"
7616	RUBY_PRO="if_ruby.pro"
7617	$as_echo "#define FEAT_RUBY 1" >>confdefs.h
7618
7619	if test "$enable_rubyinterp" = "dynamic"; then
7620	  libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
7621	  if test -z "$libruby_soname"; then
7622	    libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
7623	  fi
7624	  $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
7625
7626	  RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
7627	  RUBY_LIBS=
7628	fi
7629      else
7630	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
7631$as_echo "not found; disabling Ruby" >&6; }
7632      fi
7633    else
7634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.6.0 or later" >&5
7635$as_echo "too old; need Ruby version 1.6.0 or later" >&6; }
7636    fi
7637  fi
7638
7639  if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
7640    as_fn_error $? "could not configure Ruby" "$LINENO" 5
7641  fi
7642fi
7643
7644
7645
7646
7647
7648
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
7650$as_echo_n "checking --enable-cscope argument... " >&6; }
7651# Check whether --enable-cscope was given.
7652if test "${enable_cscope+set}" = set; then :
7653  enableval=$enable_cscope;
7654else
7655  enable_cscope="no"
7656fi
7657
7658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
7659$as_echo "$enable_cscope" >&6; }
7660if test "$enable_cscope" = "yes"; then
7661  $as_echo "#define FEAT_CSCOPE 1" >>confdefs.h
7662
7663fi
7664
7665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
7666$as_echo_n "checking --disable-netbeans argument... " >&6; }
7667# Check whether --enable-netbeans was given.
7668if test "${enable_netbeans+set}" = set; then :
7669  enableval=$enable_netbeans;
7670else
7671  enable_netbeans="yes"
7672fi
7673
7674if test "$enable_netbeans" = "yes"; then
7675  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny or small features" >&5
7677$as_echo "cannot use NetBeans with tiny or small features" >&6; }
7678    enable_netbeans="no"
7679  else
7680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7681$as_echo "no" >&6; }
7682  fi
7683else
7684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7685$as_echo "yes" >&6; }
7686fi
7687
7688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
7689$as_echo_n "checking --disable-channel argument... " >&6; }
7690# Check whether --enable-channel was given.
7691if test "${enable_channel+set}" = set; then :
7692  enableval=$enable_channel;
7693else
7694  enable_channel="yes"
7695fi
7696
7697if test "$enable_channel" = "yes"; then
7698  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny or small features" >&5
7700$as_echo "cannot use channels with tiny or small features" >&6; }
7701    enable_channel="no"
7702  else
7703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704$as_echo "no" >&6; }
7705  fi
7706else
7707  if test "$enable_netbeans" = "yes"; then
7708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
7709$as_echo "yes, netbeans also disabled" >&6; }
7710    enable_netbeans="no"
7711  else
7712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7713$as_echo "yes" >&6; }
7714  fi
7715fi
7716
7717if test "$enable_channel" = "yes"; then
7718    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7719$as_echo_n "checking for socket in -lsocket... " >&6; }
7720if ${ac_cv_lib_socket_socket+:} false; then :
7721  $as_echo_n "(cached) " >&6
7722else
7723  ac_check_lib_save_LIBS=$LIBS
7724LIBS="-lsocket  $LIBS"
7725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7726/* end confdefs.h.  */
7727
7728/* Override any GCC internal prototype to avoid an error.
7729   Use char because int might match the return type of a GCC
7730   builtin and then its argument prototype would still apply.  */
7731#ifdef __cplusplus
7732extern "C"
7733#endif
7734char socket ();
7735int
7736main ()
7737{
7738return socket ();
7739  ;
7740  return 0;
7741}
7742_ACEOF
7743if ac_fn_c_try_link "$LINENO"; then :
7744  ac_cv_lib_socket_socket=yes
7745else
7746  ac_cv_lib_socket_socket=no
7747fi
7748rm -f core conftest.err conftest.$ac_objext \
7749    conftest$ac_exeext conftest.$ac_ext
7750LIBS=$ac_check_lib_save_LIBS
7751fi
7752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7753$as_echo "$ac_cv_lib_socket_socket" >&6; }
7754if test "x$ac_cv_lib_socket_socket" = xyes; then :
7755  cat >>confdefs.h <<_ACEOF
7756#define HAVE_LIBSOCKET 1
7757_ACEOF
7758
7759  LIBS="-lsocket $LIBS"
7760
7761fi
7762
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
7764$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7765if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
7766  $as_echo_n "(cached) " >&6
7767else
7768  ac_check_lib_save_LIBS=$LIBS
7769LIBS="-lnsl  $LIBS"
7770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7771/* end confdefs.h.  */
7772
7773/* Override any GCC internal prototype to avoid an error.
7774   Use char because int might match the return type of a GCC
7775   builtin and then its argument prototype would still apply.  */
7776#ifdef __cplusplus
7777extern "C"
7778#endif
7779char gethostbyname ();
7780int
7781main ()
7782{
7783return gethostbyname ();
7784  ;
7785  return 0;
7786}
7787_ACEOF
7788if ac_fn_c_try_link "$LINENO"; then :
7789  ac_cv_lib_nsl_gethostbyname=yes
7790else
7791  ac_cv_lib_nsl_gethostbyname=no
7792fi
7793rm -f core conftest.err conftest.$ac_objext \
7794    conftest$ac_exeext conftest.$ac_ext
7795LIBS=$ac_check_lib_save_LIBS
7796fi
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
7798$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7799if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
7800  cat >>confdefs.h <<_ACEOF
7801#define HAVE_LIBNSL 1
7802_ACEOF
7803
7804  LIBS="-lnsl $LIBS"
7805
7806fi
7807
7808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with process communication is possible" >&5
7809$as_echo_n "checking whether compiling with process communication is possible... " >&6; }
7810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7811/* end confdefs.h.  */
7812
7813#include <stdio.h>
7814#include <stdlib.h>
7815#include <stdarg.h>
7816#include <fcntl.h>
7817#include <netdb.h>
7818#include <netinet/in.h>
7819#include <errno.h>
7820#include <sys/types.h>
7821#include <sys/socket.h>
7822	/* Check bitfields */
7823	struct nbbuf {
7824	unsigned int  initDone:1;
7825	unsigned short signmaplen;
7826	};
7827
7828int
7829main ()
7830{
7831
7832		/* Check creating a socket. */
7833		struct sockaddr_in server;
7834		(void)socket(AF_INET, SOCK_STREAM, 0);
7835		(void)htons(100);
7836		(void)gethostbyname("microsoft.com");
7837		if (errno == ECONNREFUSED)
7838		  (void)connect(1, (struct sockaddr *)&server, sizeof(server));
7839
7840  ;
7841  return 0;
7842}
7843_ACEOF
7844if ac_fn_c_try_link "$LINENO"; then :
7845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7846$as_echo "yes" >&6; }
7847else
7848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7849$as_echo "no" >&6; }; enable_netbeans="no"; enable_channel="no"
7850fi
7851rm -f core conftest.err conftest.$ac_objext \
7852    conftest$ac_exeext conftest.$ac_ext
7853fi
7854if test "$enable_netbeans" = "yes"; then
7855  $as_echo "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
7856
7857  NETBEANS_SRC="netbeans.c"
7858
7859  NETBEANS_OBJ="objects/netbeans.o"
7860
7861fi
7862if test "$enable_channel" = "yes"; then
7863  $as_echo "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
7864
7865  CHANNEL_SRC="channel.c"
7866
7867  CHANNEL_OBJ="objects/channel.o"
7868
7869fi
7870
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
7872$as_echo_n "checking --enable-terminal argument... " >&6; }
7873# Check whether --enable-terminal was given.
7874if test "${enable_terminal+set}" = set; then :
7875  enableval=$enable_terminal;
7876else
7877  enable_terminal="auto"
7878fi
7879
7880if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
7881  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny or small features" >&5
7883$as_echo "cannot use terminal emulator with tiny or small features" >&6; }
7884    enable_terminal="no"
7885  else
7886    if test "$enable_terminal" = "auto"; then
7887      enable_terminal="yes"
7888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
7889$as_echo "defaulting to yes" >&6; }
7890    else
7891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7892$as_echo "yes" >&6; }
7893    fi
7894  fi
7895else
7896  if test "$enable_terminal" = "auto"; then
7897    enable_terminal="no"
7898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
7899$as_echo "defaulting to no" >&6; }
7900  else
7901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7902$as_echo "no" >&6; }
7903  fi
7904fi
7905if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
7906  $as_echo "#define FEAT_TERMINAL 1" >>confdefs.h
7907
7908  TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/termscreen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
7909
7910  TERM_OBJ="objects/encoding.o objects/keyboard.o objects/mouse.o objects/parser.o objects/pen.o objects/termscreen.o objects/state.o objects/unicode.o objects/vterm.o"
7911
7912fi
7913
7914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
7915$as_echo_n "checking --enable-autoservername argument... " >&6; }
7916# Check whether --enable-autoservername was given.
7917if test "${enable_autoservername+set}" = set; then :
7918  enableval=$enable_autoservername;
7919else
7920  enable_autoservername="no"
7921fi
7922
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
7924$as_echo "$enable_autoservername" >&6; }
7925if test "$enable_autoservername" = "yes"; then
7926  $as_echo "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
7927
7928fi
7929
7930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
7931$as_echo_n "checking --enable-multibyte argument... " >&6; }
7932# Check whether --enable-multibyte was given.
7933if test "${enable_multibyte+set}" = set; then :
7934  enableval=$enable_multibyte;
7935else
7936  enable_multibyte="yes"
7937fi
7938
7939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
7940$as_echo "$enable_multibyte" >&6; }
7941if test "$enable_multibyte" != "yes"; then
7942  as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
7943		a problem with this, discuss on the Vim mailing list." "$LINENO" 5
7944fi
7945
7946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
7947$as_echo_n "checking --disable-rightleft argument... " >&6; }
7948# Check whether --enable-rightleft was given.
7949if test "${enable_rightleft+set}" = set; then :
7950  enableval=$enable_rightleft;
7951else
7952  enable_rightleft="yes"
7953fi
7954
7955if test "$enable_rightleft" = "yes"; then
7956	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7957$as_echo "no" >&6; }
7958else
7959	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7960$as_echo "yes" >&6; }
7961	$as_echo "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
7962
7963fi
7964
7965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
7966$as_echo_n "checking --disable-arabic argument... " >&6; }
7967# Check whether --enable-arabic was given.
7968if test "${enable_arabic+set}" = set; then :
7969  enableval=$enable_arabic;
7970else
7971  enable_arabic="yes"
7972fi
7973
7974if test "$enable_arabic" = "yes"; then
7975	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7976$as_echo "no" >&6; }
7977else
7978	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7979$as_echo "yes" >&6; }
7980	$as_echo "#define DISABLE_ARABIC 1" >>confdefs.h
7981
7982fi
7983
7984# Check whether --enable-farsi was given.
7985if test "${enable_farsi+set}" = set; then :
7986  enableval=$enable_farsi;
7987fi
7988
7989
7990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-hangulinput argument" >&5
7991$as_echo_n "checking --enable-hangulinput argument... " >&6; }
7992# Check whether --enable-hangulinput was given.
7993if test "${enable_hangulinput+set}" = set; then :
7994  enableval=$enable_hangulinput;
7995else
7996  enable_hangulinput="no"
7997fi
7998
7999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_hangulinput" >&5
8000$as_echo "$enable_hangulinput" >&6; }
8001
8002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8003$as_echo_n "checking --enable-xim argument... " >&6; }
8004# Check whether --enable-xim was given.
8005if test "${enable_xim+set}" = set; then :
8006  enableval=$enable_xim; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8007$as_echo "$enable_xim" >&6; }
8008else
8009  enable_xim="auto"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8010$as_echo "defaulting to auto" >&6; }
8011fi
8012
8013
8014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8015$as_echo_n "checking --enable-fontset argument... " >&6; }
8016# Check whether --enable-fontset was given.
8017if test "${enable_fontset+set}" = set; then :
8018  enableval=$enable_fontset;
8019else
8020  enable_fontset="no"
8021fi
8022
8023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8024$as_echo "$enable_fontset" >&6; }
8025
8026test -z "$with_x" && with_x=yes
8027test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
8028if test "$with_x" = no; then
8029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8030$as_echo "defaulting to: don't HAVE_X11" >&6; }
8031else
8032
8033  # Extract the first word of "xmkmf", so it can be a program name with args.
8034set dummy xmkmf; ac_word=$2
8035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8036$as_echo_n "checking for $ac_word... " >&6; }
8037if ${ac_cv_path_xmkmfpath+:} false; then :
8038  $as_echo_n "(cached) " >&6
8039else
8040  case $xmkmfpath in
8041  [\\/]* | ?:[\\/]*)
8042  ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8043  ;;
8044  *)
8045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8046for as_dir in $PATH
8047do
8048  IFS=$as_save_IFS
8049  test -z "$as_dir" && as_dir=.
8050    for ac_exec_ext in '' $ac_executable_extensions; do
8051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8052    ac_cv_path_xmkmfpath="$as_dir/$ac_word$ac_exec_ext"
8053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8054    break 2
8055  fi
8056done
8057  done
8058IFS=$as_save_IFS
8059
8060  ;;
8061esac
8062fi
8063xmkmfpath=$ac_cv_path_xmkmfpath
8064if test -n "$xmkmfpath"; then
8065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8066$as_echo "$xmkmfpath" >&6; }
8067else
8068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8069$as_echo "no" >&6; }
8070fi
8071
8072
8073
8074  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8075$as_echo_n "checking for X... " >&6; }
8076
8077
8078# Check whether --with-x was given.
8079if test "${with_x+set}" = set; then :
8080  withval=$with_x;
8081fi
8082
8083# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8084if test "x$with_x" = xno; then
8085  # The user explicitly disabled X.
8086  have_x=disabled
8087else
8088  case $x_includes,$x_libraries in #(
8089    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
8090    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
8091  $as_echo_n "(cached) " >&6
8092else
8093  # One or both of the vars are not set, and there is no cached value.
8094ac_x_includes=no ac_x_libraries=no
8095rm -f -r conftest.dir
8096if mkdir conftest.dir; then
8097  cd conftest.dir
8098  cat >Imakefile <<'_ACEOF'
8099incroot:
8100	@echo incroot='${INCROOT}'
8101usrlibdir:
8102	@echo usrlibdir='${USRLIBDIR}'
8103libdir:
8104	@echo libdir='${LIBDIR}'
8105_ACEOF
8106  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
8107    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8108    for ac_var in incroot usrlibdir libdir; do
8109      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8110    done
8111    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8112    for ac_extension in a so sl dylib la dll; do
8113      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8114	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
8115	ac_im_usrlibdir=$ac_im_libdir; break
8116      fi
8117    done
8118    # Screen out bogus values from the imake configuration.  They are
8119    # bogus both because they are the default anyway, and because
8120    # using them would break gcc on systems where it needs fixed includes.
8121    case $ac_im_incroot in
8122	/usr/include) ac_x_includes= ;;
8123	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8124    esac
8125    case $ac_im_usrlibdir in
8126	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
8127	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8128    esac
8129  fi
8130  cd ..
8131  rm -f -r conftest.dir
8132fi
8133
8134# Standard set of common directories for X headers.
8135# Check X11 before X11Rn because it is often a symlink to the current release.
8136ac_x_header_dirs='
8137/usr/X11/include
8138/usr/X11R7/include
8139/usr/X11R6/include
8140/usr/X11R5/include
8141/usr/X11R4/include
8142
8143/usr/include/X11
8144/usr/include/X11R7
8145/usr/include/X11R6
8146/usr/include/X11R5
8147/usr/include/X11R4
8148
8149/usr/local/X11/include
8150/usr/local/X11R7/include
8151/usr/local/X11R6/include
8152/usr/local/X11R5/include
8153/usr/local/X11R4/include
8154
8155/usr/local/include/X11
8156/usr/local/include/X11R7
8157/usr/local/include/X11R6
8158/usr/local/include/X11R5
8159/usr/local/include/X11R4
8160
8161/usr/X386/include
8162/usr/x386/include
8163/usr/XFree86/include/X11
8164
8165/usr/include
8166/usr/local/include
8167/usr/unsupported/include
8168/usr/athena/include
8169/usr/local/x11r5/include
8170/usr/lpp/Xamples/include
8171
8172/usr/openwin/include
8173/usr/openwin/share/include'
8174
8175if test "$ac_x_includes" = no; then
8176  # Guess where to find include files, by looking for Xlib.h.
8177  # First, try using that file with no special directory specified.
8178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8179/* end confdefs.h.  */
8180#include <X11/Xlib.h>
8181_ACEOF
8182if ac_fn_c_try_cpp "$LINENO"; then :
8183  # We can compile using X headers with no special include directory.
8184ac_x_includes=
8185else
8186  for ac_dir in $ac_x_header_dirs; do
8187  if test -r "$ac_dir/X11/Xlib.h"; then
8188    ac_x_includes=$ac_dir
8189    break
8190  fi
8191done
8192fi
8193rm -f conftest.err conftest.i conftest.$ac_ext
8194fi # $ac_x_includes = no
8195
8196if test "$ac_x_libraries" = no; then
8197  # Check for the libraries.
8198  # See if we find them without any special options.
8199  # Don't add to $LIBS permanently.
8200  ac_save_LIBS=$LIBS
8201  LIBS="-lX11 $LIBS"
8202  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8203/* end confdefs.h.  */
8204#include <X11/Xlib.h>
8205int
8206main ()
8207{
8208XrmInitialize ()
8209  ;
8210  return 0;
8211}
8212_ACEOF
8213if ac_fn_c_try_link "$LINENO"; then :
8214  LIBS=$ac_save_LIBS
8215# We can link X programs with no special library path.
8216ac_x_libraries=
8217else
8218  LIBS=$ac_save_LIBS
8219for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8220do
8221  # Don't even attempt the hair of trying to link an X program!
8222  for ac_extension in a so sl dylib la dll; do
8223    if test -r "$ac_dir/libX11.$ac_extension"; then
8224      ac_x_libraries=$ac_dir
8225      break 2
8226    fi
8227  done
8228done
8229fi
8230rm -f core conftest.err conftest.$ac_objext \
8231    conftest$ac_exeext conftest.$ac_ext
8232fi # $ac_x_libraries = no
8233
8234case $ac_x_includes,$ac_x_libraries in #(
8235  no,* | *,no | *\'*)
8236    # Didn't find X, or a directory has "'" in its name.
8237    ac_cv_have_x="have_x=no";; #(
8238  *)
8239    # Record where we found X for the cache.
8240    ac_cv_have_x="have_x=yes\
8241	ac_x_includes='$ac_x_includes'\
8242	ac_x_libraries='$ac_x_libraries'"
8243esac
8244fi
8245;; #(
8246    *) have_x=yes;;
8247  esac
8248  eval "$ac_cv_have_x"
8249fi # $with_x != no
8250
8251if test "$have_x" != yes; then
8252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8253$as_echo "$have_x" >&6; }
8254  no_x=yes
8255else
8256  # If each of the values was on the command line, it overrides each guess.
8257  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8258  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8259  # Update the cache value to reflect the command line values.
8260  ac_cv_have_x="have_x=yes\
8261	ac_x_includes='$x_includes'\
8262	ac_x_libraries='$x_libraries'"
8263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8264$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
8265fi
8266
8267if test "$no_x" = yes; then
8268  # Not all programs may use this symbol, but it does not hurt to define it.
8269
8270$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
8271
8272  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8273else
8274  if test -n "$x_includes"; then
8275    X_CFLAGS="$X_CFLAGS -I$x_includes"
8276  fi
8277
8278  # It would also be nice to do this for all -L options, not just this one.
8279  if test -n "$x_libraries"; then
8280    X_LIBS="$X_LIBS -L$x_libraries"
8281    # For Solaris; some versions of Sun CC require a space after -R and
8282    # others require no space.  Words are not sufficient . . . .
8283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8284$as_echo_n "checking whether -R must be followed by a space... " >&6; }
8285    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8286    ac_xsave_c_werror_flag=$ac_c_werror_flag
8287    ac_c_werror_flag=yes
8288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8289/* end confdefs.h.  */
8290
8291int
8292main ()
8293{
8294
8295  ;
8296  return 0;
8297}
8298_ACEOF
8299if ac_fn_c_try_link "$LINENO"; then :
8300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8301$as_echo "no" >&6; }
8302       X_LIBS="$X_LIBS -R$x_libraries"
8303else
8304  LIBS="$ac_xsave_LIBS -R $x_libraries"
8305       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8306/* end confdefs.h.  */
8307
8308int
8309main ()
8310{
8311
8312  ;
8313  return 0;
8314}
8315_ACEOF
8316if ac_fn_c_try_link "$LINENO"; then :
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8318$as_echo "yes" >&6; }
8319	  X_LIBS="$X_LIBS -R $x_libraries"
8320else
8321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
8322$as_echo "neither works" >&6; }
8323fi
8324rm -f core conftest.err conftest.$ac_objext \
8325    conftest$ac_exeext conftest.$ac_ext
8326fi
8327rm -f core conftest.err conftest.$ac_objext \
8328    conftest$ac_exeext conftest.$ac_ext
8329    ac_c_werror_flag=$ac_xsave_c_werror_flag
8330    LIBS=$ac_xsave_LIBS
8331  fi
8332
8333  # Check for system-dependent libraries X programs must link with.
8334  # Do this before checking for the system-independent R6 libraries
8335  # (-lICE), since we may need -lsocket or whatever for X linking.
8336
8337  if test "$ISC" = yes; then
8338    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8339  else
8340    # Martyn Johnson says this is needed for Ultrix, if the X
8341    # libraries were built with DECnet support.  And Karl Berry says
8342    # the Alpha needs dnet_stub (dnet does not exist).
8343    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8344    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8345/* end confdefs.h.  */
8346
8347/* Override any GCC internal prototype to avoid an error.
8348   Use char because int might match the return type of a GCC
8349   builtin and then its argument prototype would still apply.  */
8350#ifdef __cplusplus
8351extern "C"
8352#endif
8353char XOpenDisplay ();
8354int
8355main ()
8356{
8357return XOpenDisplay ();
8358  ;
8359  return 0;
8360}
8361_ACEOF
8362if ac_fn_c_try_link "$LINENO"; then :
8363
8364else
8365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
8366$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
8367if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
8368  $as_echo_n "(cached) " >&6
8369else
8370  ac_check_lib_save_LIBS=$LIBS
8371LIBS="-ldnet  $LIBS"
8372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8373/* end confdefs.h.  */
8374
8375/* Override any GCC internal prototype to avoid an error.
8376   Use char because int might match the return type of a GCC
8377   builtin and then its argument prototype would still apply.  */
8378#ifdef __cplusplus
8379extern "C"
8380#endif
8381char dnet_ntoa ();
8382int
8383main ()
8384{
8385return dnet_ntoa ();
8386  ;
8387  return 0;
8388}
8389_ACEOF
8390if ac_fn_c_try_link "$LINENO"; then :
8391  ac_cv_lib_dnet_dnet_ntoa=yes
8392else
8393  ac_cv_lib_dnet_dnet_ntoa=no
8394fi
8395rm -f core conftest.err conftest.$ac_objext \
8396    conftest$ac_exeext conftest.$ac_ext
8397LIBS=$ac_check_lib_save_LIBS
8398fi
8399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8400$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
8401if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
8402  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8403fi
8404
8405    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
8407$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
8408if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  ac_check_lib_save_LIBS=$LIBS
8412LIBS="-ldnet_stub  $LIBS"
8413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8414/* end confdefs.h.  */
8415
8416/* Override any GCC internal prototype to avoid an error.
8417   Use char because int might match the return type of a GCC
8418   builtin and then its argument prototype would still apply.  */
8419#ifdef __cplusplus
8420extern "C"
8421#endif
8422char dnet_ntoa ();
8423int
8424main ()
8425{
8426return dnet_ntoa ();
8427  ;
8428  return 0;
8429}
8430_ACEOF
8431if ac_fn_c_try_link "$LINENO"; then :
8432  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8433else
8434  ac_cv_lib_dnet_stub_dnet_ntoa=no
8435fi
8436rm -f core conftest.err conftest.$ac_objext \
8437    conftest$ac_exeext conftest.$ac_ext
8438LIBS=$ac_check_lib_save_LIBS
8439fi
8440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8441$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
8442if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
8443  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8444fi
8445
8446    fi
8447fi
8448rm -f core conftest.err conftest.$ac_objext \
8449    conftest$ac_exeext conftest.$ac_ext
8450    LIBS="$ac_xsave_LIBS"
8451
8452    # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
8453    # to get the SysV transport functions.
8454    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8455    # needs -lnsl.
8456    # The nsl library prevents programs from opening the X display
8457    # on Irix 5.2, according to T.E. Dickey.
8458    # The functions gethostbyname, getservbyname, and inet_addr are
8459    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8460    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
8461if test "x$ac_cv_func_gethostbyname" = xyes; then :
8462
8463fi
8464
8465    if test $ac_cv_func_gethostbyname = no; then
8466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8467$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
8468if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
8469  $as_echo_n "(cached) " >&6
8470else
8471  ac_check_lib_save_LIBS=$LIBS
8472LIBS="-lnsl  $LIBS"
8473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8474/* end confdefs.h.  */
8475
8476/* Override any GCC internal prototype to avoid an error.
8477   Use char because int might match the return type of a GCC
8478   builtin and then its argument prototype would still apply.  */
8479#ifdef __cplusplus
8480extern "C"
8481#endif
8482char gethostbyname ();
8483int
8484main ()
8485{
8486return gethostbyname ();
8487  ;
8488  return 0;
8489}
8490_ACEOF
8491if ac_fn_c_try_link "$LINENO"; then :
8492  ac_cv_lib_nsl_gethostbyname=yes
8493else
8494  ac_cv_lib_nsl_gethostbyname=no
8495fi
8496rm -f core conftest.err conftest.$ac_objext \
8497    conftest$ac_exeext conftest.$ac_ext
8498LIBS=$ac_check_lib_save_LIBS
8499fi
8500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8501$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
8502if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
8503  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
8504fi
8505
8506      if test $ac_cv_lib_nsl_gethostbyname = no; then
8507	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
8508$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
8509if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
8510  $as_echo_n "(cached) " >&6
8511else
8512  ac_check_lib_save_LIBS=$LIBS
8513LIBS="-lbsd  $LIBS"
8514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8515/* end confdefs.h.  */
8516
8517/* Override any GCC internal prototype to avoid an error.
8518   Use char because int might match the return type of a GCC
8519   builtin and then its argument prototype would still apply.  */
8520#ifdef __cplusplus
8521extern "C"
8522#endif
8523char gethostbyname ();
8524int
8525main ()
8526{
8527return gethostbyname ();
8528  ;
8529  return 0;
8530}
8531_ACEOF
8532if ac_fn_c_try_link "$LINENO"; then :
8533  ac_cv_lib_bsd_gethostbyname=yes
8534else
8535  ac_cv_lib_bsd_gethostbyname=no
8536fi
8537rm -f core conftest.err conftest.$ac_objext \
8538    conftest$ac_exeext conftest.$ac_ext
8539LIBS=$ac_check_lib_save_LIBS
8540fi
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
8542$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
8543if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
8544  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8545fi
8546
8547      fi
8548    fi
8549
8550    # [email protected] says without -lsocket,
8551    # socket/setsockopt and other routines are undefined under SCO ODT
8552    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8553    # on later versions), says Simon Leinen: it contains gethostby*
8554    # variants that don't use the name server (or something).  -lsocket
8555    # must be given before -lnsl if both are needed.  We assume that
8556    # if connect needs -lnsl, so does gethostbyname.
8557    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
8558if test "x$ac_cv_func_connect" = xyes; then :
8559
8560fi
8561
8562    if test $ac_cv_func_connect = no; then
8563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
8564$as_echo_n "checking for connect in -lsocket... " >&6; }
8565if ${ac_cv_lib_socket_connect+:} false; then :
8566  $as_echo_n "(cached) " >&6
8567else
8568  ac_check_lib_save_LIBS=$LIBS
8569LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8571/* end confdefs.h.  */
8572
8573/* Override any GCC internal prototype to avoid an error.
8574   Use char because int might match the return type of a GCC
8575   builtin and then its argument prototype would still apply.  */
8576#ifdef __cplusplus
8577extern "C"
8578#endif
8579char connect ();
8580int
8581main ()
8582{
8583return connect ();
8584  ;
8585  return 0;
8586}
8587_ACEOF
8588if ac_fn_c_try_link "$LINENO"; then :
8589  ac_cv_lib_socket_connect=yes
8590else
8591  ac_cv_lib_socket_connect=no
8592fi
8593rm -f core conftest.err conftest.$ac_objext \
8594    conftest$ac_exeext conftest.$ac_ext
8595LIBS=$ac_check_lib_save_LIBS
8596fi
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
8598$as_echo "$ac_cv_lib_socket_connect" >&6; }
8599if test "x$ac_cv_lib_socket_connect" = xyes; then :
8600  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8601fi
8602
8603    fi
8604
8605    # Guillermo Gomez says -lposix is necessary on A/UX.
8606    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
8607if test "x$ac_cv_func_remove" = xyes; then :
8608
8609fi
8610
8611    if test $ac_cv_func_remove = no; then
8612      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
8613$as_echo_n "checking for remove in -lposix... " >&6; }
8614if ${ac_cv_lib_posix_remove+:} false; then :
8615  $as_echo_n "(cached) " >&6
8616else
8617  ac_check_lib_save_LIBS=$LIBS
8618LIBS="-lposix  $LIBS"
8619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620/* end confdefs.h.  */
8621
8622/* Override any GCC internal prototype to avoid an error.
8623   Use char because int might match the return type of a GCC
8624   builtin and then its argument prototype would still apply.  */
8625#ifdef __cplusplus
8626extern "C"
8627#endif
8628char remove ();
8629int
8630main ()
8631{
8632return remove ();
8633  ;
8634  return 0;
8635}
8636_ACEOF
8637if ac_fn_c_try_link "$LINENO"; then :
8638  ac_cv_lib_posix_remove=yes
8639else
8640  ac_cv_lib_posix_remove=no
8641fi
8642rm -f core conftest.err conftest.$ac_objext \
8643    conftest$ac_exeext conftest.$ac_ext
8644LIBS=$ac_check_lib_save_LIBS
8645fi
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
8647$as_echo "$ac_cv_lib_posix_remove" >&6; }
8648if test "x$ac_cv_lib_posix_remove" = xyes; then :
8649  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8650fi
8651
8652    fi
8653
8654    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8655    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
8656if test "x$ac_cv_func_shmat" = xyes; then :
8657
8658fi
8659
8660    if test $ac_cv_func_shmat = no; then
8661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
8662$as_echo_n "checking for shmat in -lipc... " >&6; }
8663if ${ac_cv_lib_ipc_shmat+:} false; then :
8664  $as_echo_n "(cached) " >&6
8665else
8666  ac_check_lib_save_LIBS=$LIBS
8667LIBS="-lipc  $LIBS"
8668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669/* end confdefs.h.  */
8670
8671/* Override any GCC internal prototype to avoid an error.
8672   Use char because int might match the return type of a GCC
8673   builtin and then its argument prototype would still apply.  */
8674#ifdef __cplusplus
8675extern "C"
8676#endif
8677char shmat ();
8678int
8679main ()
8680{
8681return shmat ();
8682  ;
8683  return 0;
8684}
8685_ACEOF
8686if ac_fn_c_try_link "$LINENO"; then :
8687  ac_cv_lib_ipc_shmat=yes
8688else
8689  ac_cv_lib_ipc_shmat=no
8690fi
8691rm -f core conftest.err conftest.$ac_objext \
8692    conftest$ac_exeext conftest.$ac_ext
8693LIBS=$ac_check_lib_save_LIBS
8694fi
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
8696$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
8697if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
8698  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8699fi
8700
8701    fi
8702  fi
8703
8704  # Check for libraries that X11R6 Xt/Xaw programs need.
8705  ac_save_LDFLAGS=$LDFLAGS
8706  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8707  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8708  # check for ICE first), but we must link in the order -lSM -lICE or
8709  # we get undefined symbols.  So assume we have SM if we have ICE.
8710  # These have to be linked with before -lX11, unlike the other
8711  # libraries we check for below, so use a different variable.
8712  # John Interrante, Karl Berry
8713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
8714$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
8715if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
8716  $as_echo_n "(cached) " >&6
8717else
8718  ac_check_lib_save_LIBS=$LIBS
8719LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8721/* end confdefs.h.  */
8722
8723/* Override any GCC internal prototype to avoid an error.
8724   Use char because int might match the return type of a GCC
8725   builtin and then its argument prototype would still apply.  */
8726#ifdef __cplusplus
8727extern "C"
8728#endif
8729char IceConnectionNumber ();
8730int
8731main ()
8732{
8733return IceConnectionNumber ();
8734  ;
8735  return 0;
8736}
8737_ACEOF
8738if ac_fn_c_try_link "$LINENO"; then :
8739  ac_cv_lib_ICE_IceConnectionNumber=yes
8740else
8741  ac_cv_lib_ICE_IceConnectionNumber=no
8742fi
8743rm -f core conftest.err conftest.$ac_objext \
8744    conftest$ac_exeext conftest.$ac_ext
8745LIBS=$ac_check_lib_save_LIBS
8746fi
8747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8748$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
8749if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
8750  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8751fi
8752
8753  LDFLAGS=$ac_save_LDFLAGS
8754
8755fi
8756
8757
8758        if test "$zOSUnix" = "yes"; then
8759    CFLAGS="$CFLAGS -W c,dll"
8760    LDFLAGS="$LDFLAGS -W l,dll"
8761    X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
8762  fi
8763
8764
8765  if test -d "$x_includes" && test ! -d "$x_libraries"; then
8766    x_libraries=`echo "$x_includes" | sed s/include/lib/`
8767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
8768$as_echo "Corrected X libraries to $x_libraries" >&6; }
8769    X_LIBS="$X_LIBS -L$x_libraries"
8770    if test "`(uname) 2>/dev/null`" = SunOS &&
8771					 uname -r | grep '^5' >/dev/null; then
8772      X_LIBS="$X_LIBS -R $x_libraries"
8773    fi
8774  fi
8775
8776  if test -d "$x_libraries" && test ! -d "$x_includes"; then
8777    x_includes=`echo "$x_libraries" | sed s/lib/include/`
8778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
8779$as_echo "Corrected X includes to $x_includes" >&6; }
8780    X_CFLAGS="$X_CFLAGS -I$x_includes"
8781  fi
8782
8783    X_CFLAGS="`echo $X_CFLAGS\  | sed 's%-I/usr/include %%'`"
8784    X_LIBS="`echo $X_LIBS\  | sed 's%-L/usr/lib %%'`"
8785    X_LIBS="`echo $X_LIBS\  | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
8786
8787
8788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
8789$as_echo_n "checking if X11 header files can be found... " >&6; }
8790  cflags_save=$CFLAGS
8791  CFLAGS="$CFLAGS $X_CFLAGS"
8792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8793/* end confdefs.h.  */
8794#include <X11/Xlib.h>
8795#include <X11/Intrinsic.h>
8796int
8797main ()
8798{
8799
8800  ;
8801  return 0;
8802}
8803_ACEOF
8804if ac_fn_c_try_compile "$LINENO"; then :
8805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8806$as_echo "yes" >&6; }
8807else
8808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8809$as_echo "no" >&6; }; no_x=yes
8810fi
8811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8812  CFLAGS=$cflags_save
8813
8814  if test "${no_x-no}" = yes; then
8815    with_x=no
8816  else
8817    $as_echo "#define HAVE_X11 1" >>confdefs.h
8818
8819    X_LIB="-lXt -lX11";
8820
8821
8822    ac_save_LDFLAGS="$LDFLAGS"
8823    LDFLAGS="-L$x_libraries $LDFLAGS"
8824
8825            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
8826$as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
8827if ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+:} false; then :
8828  $as_echo_n "(cached) " >&6
8829else
8830  ac_check_lib_save_LIBS=$LIBS
8831LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
8832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8833/* end confdefs.h.  */
8834
8835/* Override any GCC internal prototype to avoid an error.
8836   Use char because int might match the return type of a GCC
8837   builtin and then its argument prototype would still apply.  */
8838#ifdef __cplusplus
8839extern "C"
8840#endif
8841char _XdmcpAuthDoIt ();
8842int
8843main ()
8844{
8845return _XdmcpAuthDoIt ();
8846  ;
8847  return 0;
8848}
8849_ACEOF
8850if ac_fn_c_try_link "$LINENO"; then :
8851  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
8852else
8853  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
8854fi
8855rm -f core conftest.err conftest.$ac_objext \
8856    conftest$ac_exeext conftest.$ac_ext
8857LIBS=$ac_check_lib_save_LIBS
8858fi
8859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
8860$as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
8861if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes; then :
8862  X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
8863fi
8864
8865
8866                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
8867$as_echo_n "checking for IceOpenConnection in -lICE... " >&6; }
8868if ${ac_cv_lib_ICE_IceOpenConnection+:} false; then :
8869  $as_echo_n "(cached) " >&6
8870else
8871  ac_check_lib_save_LIBS=$LIBS
8872LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8874/* end confdefs.h.  */
8875
8876/* Override any GCC internal prototype to avoid an error.
8877   Use char because int might match the return type of a GCC
8878   builtin and then its argument prototype would still apply.  */
8879#ifdef __cplusplus
8880extern "C"
8881#endif
8882char IceOpenConnection ();
8883int
8884main ()
8885{
8886return IceOpenConnection ();
8887  ;
8888  return 0;
8889}
8890_ACEOF
8891if ac_fn_c_try_link "$LINENO"; then :
8892  ac_cv_lib_ICE_IceOpenConnection=yes
8893else
8894  ac_cv_lib_ICE_IceOpenConnection=no
8895fi
8896rm -f core conftest.err conftest.$ac_objext \
8897    conftest$ac_exeext conftest.$ac_ext
8898LIBS=$ac_check_lib_save_LIBS
8899fi
8900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
8901$as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
8902if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes; then :
8903  X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
8904fi
8905
8906
8907        LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
8908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
8909$as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
8910if ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+:} false; then :
8911  $as_echo_n "(cached) " >&6
8912else
8913  ac_check_lib_save_LIBS=$LIBS
8914LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
8915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8916/* end confdefs.h.  */
8917
8918/* Override any GCC internal prototype to avoid an error.
8919   Use char because int might match the return type of a GCC
8920   builtin and then its argument prototype would still apply.  */
8921#ifdef __cplusplus
8922extern "C"
8923#endif
8924char XpmCreatePixmapFromData ();
8925int
8926main ()
8927{
8928return XpmCreatePixmapFromData ();
8929  ;
8930  return 0;
8931}
8932_ACEOF
8933if ac_fn_c_try_link "$LINENO"; then :
8934  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
8935else
8936  ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
8937fi
8938rm -f core conftest.err conftest.$ac_objext \
8939    conftest$ac_exeext conftest.$ac_ext
8940LIBS=$ac_check_lib_save_LIBS
8941fi
8942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
8943$as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
8944if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes; then :
8945  X_PRE_LIBS="$X_PRE_LIBS -lXpm"
8946fi
8947
8948
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
8950$as_echo_n "checking if X11 header files implicitly declare return values... " >&6; }
8951    cflags_save=$CFLAGS
8952        if test "$GCC" = yes; then
8953      CFLAGS="$CFLAGS $X_CFLAGS -Werror"
8954    else
8955      CFLAGS="$CFLAGS $X_CFLAGS"
8956    fi
8957    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8958/* end confdefs.h.  */
8959#include <X11/Xlib.h>
8960int
8961main ()
8962{
8963
8964  ;
8965  return 0;
8966}
8967_ACEOF
8968if ac_fn_c_try_compile "$LINENO"; then :
8969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8970$as_echo "no" >&6; }
8971else
8972  CFLAGS="$CFLAGS -Wno-implicit-int"
8973	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974/* end confdefs.h.  */
8975#include <X11/Xlib.h>
8976int
8977main ()
8978{
8979
8980  ;
8981  return 0;
8982}
8983_ACEOF
8984if ac_fn_c_try_compile "$LINENO"; then :
8985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8986$as_echo "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
8987else
8988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
8989$as_echo "test failed" >&6; }
8990
8991fi
8992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8993
8994fi
8995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8996    CFLAGS=$cflags_save
8997
8998    LDFLAGS="$ac_save_LDFLAGS"
8999
9000    { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5
9001$as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
9002    if ${ac_cv_small_wchar_t+:} false; then :
9003  $as_echo_n "(cached) " >&6
9004else
9005  if test "$cross_compiling" = yes; then :
9006  as_fn_error $? "failed to compile test program" "$LINENO" 5
9007else
9008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9009/* end confdefs.h.  */
9010
9011#include <X11/Xlib.h>
9012#if STDC_HEADERS
9013# include <stdlib.h>
9014# include <stddef.h>
9015#endif
9016		main()
9017		{
9018		  if (sizeof(wchar_t) <= 2)
9019		    exit(1);
9020		  exit(0);
9021		}
9022_ACEOF
9023if ac_fn_c_try_run "$LINENO"; then :
9024  ac_cv_small_wchar_t="no"
9025else
9026  ac_cv_small_wchar_t="yes"
9027fi
9028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9029  conftest.$ac_objext conftest.beam conftest.$ac_ext
9030fi
9031
9032fi
9033
9034    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_small_wchar_t" >&5
9035$as_echo "$ac_cv_small_wchar_t" >&6; }
9036    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
9037      $as_echo "#define SMALL_WCHAR_T 1" >>confdefs.h
9038
9039    fi
9040
9041  fi
9042fi
9043
9044if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9045    as_fn_error $? "could not configure X" "$LINENO" 5
9046fi
9047
9048test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
9049
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9051$as_echo_n "checking --enable-gui argument... " >&6; }
9052# Check whether --enable-gui was given.
9053if test "${enable_gui+set}" = set; then :
9054  enableval=$enable_gui;
9055else
9056  enable_gui="auto"
9057fi
9058
9059
9060enable_gui_canon=`echo "_$enable_gui" | \
9061	sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9062
9063SKIP_GTK2=YES
9064SKIP_GTK3=YES
9065SKIP_GNOME=YES
9066SKIP_MOTIF=YES
9067SKIP_ATHENA=YES
9068SKIP_NEXTAW=YES
9069SKIP_PHOTON=YES
9070SKIP_CARBON=YES
9071GUITYPE=NONE
9072
9073if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
9074  SKIP_PHOTON=
9075  case "$enable_gui_canon" in
9076    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9077$as_echo "no GUI support" >&6; }
9078		SKIP_PHOTON=YES ;;
9079    yes|""|auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9080$as_echo "automatic GUI support" >&6; }
9081    		gui_auto=yes ;;
9082    photon)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9083$as_echo "Photon GUI support" >&6; } ;;
9084    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9085$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
9086		SKIP_PHOTON=YES ;;
9087  esac
9088
9089elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9090  SKIP_CARBON=
9091  case "$enable_gui_canon" in
9092    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9093$as_echo "no GUI support" >&6; }
9094		SKIP_CARBON=YES ;;
9095    yes|"")	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9096$as_echo "yes - automatic GUI support" >&6; }
9097    		gui_auto=yes ;;
9098    auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - Carbon GUI is outdated - disable GUI support" >&5
9099$as_echo "auto - Carbon GUI is outdated - disable GUI support" >&6; }
9100		SKIP_CARBON=YES ;;
9101    carbon)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Carbon GUI support" >&5
9102$as_echo "Carbon GUI support" >&6; } ;;
9103    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9104$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
9105		SKIP_CARBON=YES ;;
9106  esac
9107
9108else
9109
9110  case "$enable_gui_canon" in
9111    no|none)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9112$as_echo "no GUI support" >&6; } ;;
9113    yes|""|auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9114$as_echo "yes/auto - automatic GUI support" >&6; }
9115		gui_auto=yes
9116		SKIP_GTK2=
9117		SKIP_GNOME=
9118		SKIP_MOTIF=
9119		SKIP_ATHENA=
9120		SKIP_NEXTAW=
9121		SKIP_CARBON=;;
9122    gtk2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9123$as_echo "GTK+ 2.x GUI support" >&6; }
9124		SKIP_GTK2=;;
9125    gnome2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9126$as_echo "GNOME 2.x GUI support" >&6; }
9127		SKIP_GNOME=
9128		SKIP_GTK2=;;
9129    gtk3)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9130$as_echo "GTK+ 3.x GUI support" >&6; }
9131		SKIP_GTK3=;;
9132    motif)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9133$as_echo "Motif GUI support" >&6; }
9134		SKIP_MOTIF=;;
9135    athena)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Athena GUI support" >&5
9136$as_echo "Athena GUI support" >&6; }
9137		SKIP_ATHENA=;;
9138    nextaw)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: neXtaw GUI support" >&5
9139$as_echo "neXtaw GUI support" >&6; }
9140		SKIP_NEXTAW=;;
9141    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9142$as_echo "Sorry, $enable_gui GUI is not supported" >&6; } ;;
9143  esac
9144
9145fi
9146
9147if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9148				-a "$enable_gui_canon" != "gnome2"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9150$as_echo_n "checking whether or not to look for GTK+ 2... " >&6; }
9151  # Check whether --enable-gtk2-check was given.
9152if test "${enable_gtk2_check+set}" = set; then :
9153  enableval=$enable_gtk2_check;
9154else
9155  enable_gtk2_check="yes"
9156fi
9157
9158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9159$as_echo "$enable_gtk2_check" >&6; }
9160  if test "x$enable_gtk2_check" = "xno"; then
9161    SKIP_GTK2=YES
9162    SKIP_GNOME=YES
9163  fi
9164fi
9165
9166if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
9167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9168$as_echo_n "checking whether or not to look for GNOME... " >&6; }
9169  # Check whether --enable-gnome-check was given.
9170if test "${enable_gnome_check+set}" = set; then :
9171  enableval=$enable_gnome_check;
9172else
9173  enable_gnome_check="no"
9174fi
9175
9176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9177$as_echo "$enable_gnome_check" >&6; }
9178  if test "x$enable_gnome_check" = "xno"; then
9179    SKIP_GNOME=YES
9180  fi
9181fi
9182
9183if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
9184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9185$as_echo_n "checking whether or not to look for GTK+ 3... " >&6; }
9186  # Check whether --enable-gtk3-check was given.
9187if test "${enable_gtk3_check+set}" = set; then :
9188  enableval=$enable_gtk3_check;
9189else
9190  enable_gtk3_check="yes"
9191fi
9192
9193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9194$as_echo "$enable_gtk3_check" >&6; }
9195  if test "x$enable_gtk3_check" = "xno"; then
9196    SKIP_GTK3=YES
9197  fi
9198fi
9199
9200if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9202$as_echo_n "checking whether or not to look for Motif... " >&6; }
9203  # Check whether --enable-motif-check was given.
9204if test "${enable_motif_check+set}" = set; then :
9205  enableval=$enable_motif_check;
9206else
9207  enable_motif_check="yes"
9208fi
9209
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9211$as_echo "$enable_motif_check" >&6; }
9212  if test "x$enable_motif_check" = "xno"; then
9213    SKIP_MOTIF=YES
9214  fi
9215fi
9216
9217if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
9218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Athena" >&5
9219$as_echo_n "checking whether or not to look for Athena... " >&6; }
9220  # Check whether --enable-athena-check was given.
9221if test "${enable_athena_check+set}" = set; then :
9222  enableval=$enable_athena_check;
9223else
9224  enable_athena_check="yes"
9225fi
9226
9227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_athena_check" >&5
9228$as_echo "$enable_athena_check" >&6; }
9229  if test "x$enable_athena_check" = "xno"; then
9230    SKIP_ATHENA=YES
9231  fi
9232fi
9233
9234if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
9235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for neXtaw" >&5
9236$as_echo_n "checking whether or not to look for neXtaw... " >&6; }
9237  # Check whether --enable-nextaw-check was given.
9238if test "${enable_nextaw_check+set}" = set; then :
9239  enableval=$enable_nextaw_check;
9240else
9241  enable_nextaw_check="yes"
9242fi
9243
9244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nextaw_check" >&5
9245$as_echo "$enable_nextaw_check" >&6; };
9246  if test "x$enable_nextaw_check" = "xno"; then
9247    SKIP_NEXTAW=YES
9248  fi
9249fi
9250
9251if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
9252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Carbon" >&5
9253$as_echo_n "checking whether or not to look for Carbon... " >&6; }
9254  # Check whether --enable-carbon-check was given.
9255if test "${enable_carbon_check+set}" = set; then :
9256  enableval=$enable_carbon_check;
9257else
9258  enable_carbon_check="yes"
9259fi
9260
9261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_carbon_check" >&5
9262$as_echo "$enable_carbon_check" >&6; };
9263  if test "x$enable_carbon_check" = "xno"; then
9264    SKIP_CARBON=YES
9265  fi
9266fi
9267
9268
9269if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
9270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
9271$as_echo_n "checking for Carbon GUI... " >&6; }
9272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9273$as_echo "yes" >&6; };
9274  GUITYPE=CARBONGUI
9275  if test "$VIMNAME" = "vim"; then
9276    VIMNAME=Vim
9277  fi
9278
9279  if test "x$MACARCH" = "xboth"; then
9280    CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
9281  else
9282    CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
9283  fi
9284
9285    if test x$prefix = xNONE; then
9286    prefix=/Applications
9287  fi
9288
9289    datadir='${prefix}/Vim.app/Contents/Resources'
9290
9291    SKIP_GTK2=YES;
9292  SKIP_GNOME=YES;
9293  SKIP_MOTIF=YES;
9294  SKIP_ATHENA=YES;
9295  SKIP_NEXTAW=YES;
9296  SKIP_PHOTON=YES;
9297  SKIP_CARBON=YES
9298fi
9299
9300
9301
9302
9303
9304
9305
9306
9307if test -z "$SKIP_GTK2"; then
9308
9309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9310$as_echo_n "checking --disable-gtktest argument... " >&6; }
9311  # Check whether --enable-gtktest was given.
9312if test "${enable_gtktest+set}" = set; then :
9313  enableval=$enable_gtktest;
9314else
9315  enable_gtktest=yes
9316fi
9317
9318  if test "x$enable_gtktest" = "xyes" ; then
9319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9320$as_echo "gtk test enabled" >&6; }
9321  else
9322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9323$as_echo "gtk test disabled" >&6; }
9324  fi
9325
9326  if test "X$PKG_CONFIG" = "X"; then
9327    if test -n "$ac_tool_prefix"; then
9328  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9329set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9331$as_echo_n "checking for $ac_word... " >&6; }
9332if ${ac_cv_path_PKG_CONFIG+:} false; then :
9333  $as_echo_n "(cached) " >&6
9334else
9335  case $PKG_CONFIG in
9336  [\\/]* | ?:[\\/]*)
9337  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9338  ;;
9339  *)
9340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9341for as_dir in $PATH
9342do
9343  IFS=$as_save_IFS
9344  test -z "$as_dir" && as_dir=.
9345    for ac_exec_ext in '' $ac_executable_extensions; do
9346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9347    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9349    break 2
9350  fi
9351done
9352  done
9353IFS=$as_save_IFS
9354
9355  ;;
9356esac
9357fi
9358PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9359if test -n "$PKG_CONFIG"; then
9360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9361$as_echo "$PKG_CONFIG" >&6; }
9362else
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9364$as_echo "no" >&6; }
9365fi
9366
9367
9368fi
9369if test -z "$ac_cv_path_PKG_CONFIG"; then
9370  ac_pt_PKG_CONFIG=$PKG_CONFIG
9371  # Extract the first word of "pkg-config", so it can be a program name with args.
9372set dummy pkg-config; ac_word=$2
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374$as_echo_n "checking for $ac_word... " >&6; }
9375if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9376  $as_echo_n "(cached) " >&6
9377else
9378  case $ac_pt_PKG_CONFIG in
9379  [\\/]* | ?:[\\/]*)
9380  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9381  ;;
9382  *)
9383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384for as_dir in $PATH
9385do
9386  IFS=$as_save_IFS
9387  test -z "$as_dir" && as_dir=.
9388    for ac_exec_ext in '' $ac_executable_extensions; do
9389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9390    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9392    break 2
9393  fi
9394done
9395  done
9396IFS=$as_save_IFS
9397
9398  ;;
9399esac
9400fi
9401ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9402if test -n "$ac_pt_PKG_CONFIG"; then
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9404$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9405else
9406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407$as_echo "no" >&6; }
9408fi
9409
9410  if test "x$ac_pt_PKG_CONFIG" = x; then
9411    PKG_CONFIG="no"
9412  else
9413    case $cross_compiling:$ac_tool_warned in
9414yes:)
9415{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9416$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9417ac_tool_warned=yes ;;
9418esac
9419    PKG_CONFIG=$ac_pt_PKG_CONFIG
9420  fi
9421else
9422  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9423fi
9424
9425  fi
9426
9427  if test "x$PKG_CONFIG" != "xno"; then
9428
9429  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
9430  {
9431    no_gtk=""
9432    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9433	  && $PKG_CONFIG --exists gtk+-2.0; then
9434    {
9435      min_gtk_version=2.2.0
9436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9437$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9438                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
9439      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
9440      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
9441      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9442	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9443      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9444	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9445      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9446	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9447    }
9448    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9449	  && $PKG_CONFIG --exists gtk+-3.0; then
9450    {
9451      min_gtk_version=2.2.0
9452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9453$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9454
9455      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
9456      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
9457      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
9458      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9459	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9460      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9461	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9462      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9463	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9464    }
9465    else
9466      no_gtk=yes
9467    fi
9468
9469    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
9470    {
9471      ac_save_CFLAGS="$CFLAGS"
9472      ac_save_LIBS="$LIBS"
9473      CFLAGS="$CFLAGS $GTK_CFLAGS"
9474      LIBS="$LIBS $GTK_LIBS"
9475
9476                        rm -f conf.gtktest
9477      if test "$cross_compiling" = yes; then :
9478  echo $ac_n "cross compiling; assumed OK... $ac_c"
9479else
9480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9481/* end confdefs.h.  */
9482
9483#include <gtk/gtk.h>
9484#include <stdio.h>
9485#if STDC_HEADERS
9486# include <stdlib.h>
9487# include <stddef.h>
9488#endif
9489
9490int
9491main ()
9492{
9493int major, minor, micro;
9494char *tmp_version;
9495
9496system ("touch conf.gtktest");
9497
9498/* HP/UX 9 (%@#!) writes to sscanf strings */
9499tmp_version = g_strdup("$min_gtk_version");
9500if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
9501   printf("%s, bad version string\n", "$min_gtk_version");
9502   exit(1);
9503 }
9504
9505if ((gtk_major_version > major) ||
9506    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
9507    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
9508				     (gtk_micro_version >= micro)))
9509{
9510    return 0;
9511}
9512return 1;
9513}
9514
9515_ACEOF
9516if ac_fn_c_try_run "$LINENO"; then :
9517
9518else
9519  no_gtk=yes
9520fi
9521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9522  conftest.$ac_objext conftest.beam conftest.$ac_ext
9523fi
9524
9525      CFLAGS="$ac_save_CFLAGS"
9526      LIBS="$ac_save_LIBS"
9527    }
9528    fi
9529    if test "x$no_gtk" = x ; then
9530      if test "x$enable_gtktest" = "xyes"; then
9531	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9532$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9533      else
9534	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9535$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9536      fi
9537      GUI_LIB_LOC="$GTK_LIBDIR"
9538		 GTK_LIBNAME="$GTK_LIBS"
9539		GUI_INC_LOC="$GTK_CFLAGS"
9540    else
9541    {
9542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
9544      GTK_CFLAGS=""
9545      GTK_LIBS=""
9546      :
9547      if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
9548	as_fn_error $? "could not configure GTK" "$LINENO" 5
9549      fi
9550    }
9551    fi
9552  }
9553  else
9554    GTK_CFLAGS=""
9555    GTK_LIBS=""
9556    :
9557  fi
9558
9559
9560  rm -f conf.gtktest
9561
9562    if test "x$GTK_CFLAGS" != "x"; then
9563      SKIP_GTK3=YES
9564      SKIP_ATHENA=YES
9565      SKIP_NEXTAW=YES
9566      SKIP_MOTIF=YES
9567      GUITYPE=GTK
9568
9569    fi
9570  fi
9571  if test "x$GUITYPE" = "xGTK"; then
9572                if test -z "$SKIP_GNOME"; then
9573    {
9574
9575
9576
9577
9578
9579
9580# Check whether --with-gnome-includes was given.
9581if test "${with_gnome_includes+set}" = set; then :
9582  withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
9583
9584fi
9585
9586
9587
9588# Check whether --with-gnome-libs was given.
9589if test "${with_gnome_libs+set}" = set; then :
9590  withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
9591
9592fi
9593
9594
9595
9596# Check whether --with-gnome was given.
9597if test "${with_gnome+set}" = set; then :
9598  withval=$with_gnome; if test x$withval = xyes; then
9599      want_gnome=yes
9600      have_gnome=yes
9601    else
9602      if test "x$withval" = xno; then
9603	want_gnome=no
9604      else
9605	want_gnome=yes
9606	LDFLAGS="$LDFLAGS -L$withval/lib"
9607	CFLAGS="$CFLAGS -I$withval/include"
9608	gnome_prefix=$withval/lib
9609      fi
9610    fi
9611else
9612  want_gnome=yes
9613fi
9614
9615
9616  if test "x$want_gnome" = xyes; then
9617  {
9618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
9619$as_echo_n "checking for libgnomeui-2.0... " >&6; }
9620    if $PKG_CONFIG --exists libgnomeui-2.0; then
9621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9622$as_echo "yes" >&6; }
9623      GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
9624      GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
9625      GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
9626
9627                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
9628$as_echo_n "checking for FreeBSD... " >&6; }
9629      if test "`(uname) 2>/dev/null`" = FreeBSD; then
9630	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9631$as_echo "yes" >&6; }
9632	GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
9633	GNOME_LIBS="$GNOME_LIBS -pthread"
9634      else
9635	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636$as_echo "no" >&6; }
9637      fi
9638      have_gnome=yes
9639    else
9640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9641$as_echo "not found" >&6; }
9642      if test "x" = xfail; then
9643	as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
9644      fi
9645    fi
9646  }
9647  fi
9648
9649      if test "x$have_gnome" = xyes ; then
9650	$as_echo "#define FEAT_GUI_GNOME 1" >>confdefs.h
9651
9652	GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
9653	GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
9654      fi
9655    }
9656    fi
9657  fi
9658fi
9659
9660
9661if test -z "$SKIP_GTK3"; then
9662
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9664$as_echo_n "checking --disable-gtktest argument... " >&6; }
9665  # Check whether --enable-gtktest was given.
9666if test "${enable_gtktest+set}" = set; then :
9667  enableval=$enable_gtktest;
9668else
9669  enable_gtktest=yes
9670fi
9671
9672  if test "x$enable_gtktest" = "xyes" ; then
9673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9674$as_echo "gtk test enabled" >&6; }
9675  else
9676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9677$as_echo "gtk test disabled" >&6; }
9678  fi
9679
9680  if test "X$PKG_CONFIG" = "X"; then
9681    if test -n "$ac_tool_prefix"; then
9682  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9683set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9685$as_echo_n "checking for $ac_word... " >&6; }
9686if ${ac_cv_path_PKG_CONFIG+:} false; then :
9687  $as_echo_n "(cached) " >&6
9688else
9689  case $PKG_CONFIG in
9690  [\\/]* | ?:[\\/]*)
9691  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9692  ;;
9693  *)
9694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9695for as_dir in $PATH
9696do
9697  IFS=$as_save_IFS
9698  test -z "$as_dir" && as_dir=.
9699    for ac_exec_ext in '' $ac_executable_extensions; do
9700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9701    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9703    break 2
9704  fi
9705done
9706  done
9707IFS=$as_save_IFS
9708
9709  ;;
9710esac
9711fi
9712PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9713if test -n "$PKG_CONFIG"; then
9714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9715$as_echo "$PKG_CONFIG" >&6; }
9716else
9717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9718$as_echo "no" >&6; }
9719fi
9720
9721
9722fi
9723if test -z "$ac_cv_path_PKG_CONFIG"; then
9724  ac_pt_PKG_CONFIG=$PKG_CONFIG
9725  # Extract the first word of "pkg-config", so it can be a program name with args.
9726set dummy pkg-config; ac_word=$2
9727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9728$as_echo_n "checking for $ac_word... " >&6; }
9729if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9730  $as_echo_n "(cached) " >&6
9731else
9732  case $ac_pt_PKG_CONFIG in
9733  [\\/]* | ?:[\\/]*)
9734  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9735  ;;
9736  *)
9737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9738for as_dir in $PATH
9739do
9740  IFS=$as_save_IFS
9741  test -z "$as_dir" && as_dir=.
9742    for ac_exec_ext in '' $ac_executable_extensions; do
9743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9744    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9746    break 2
9747  fi
9748done
9749  done
9750IFS=$as_save_IFS
9751
9752  ;;
9753esac
9754fi
9755ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9756if test -n "$ac_pt_PKG_CONFIG"; then
9757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9758$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9759else
9760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761$as_echo "no" >&6; }
9762fi
9763
9764  if test "x$ac_pt_PKG_CONFIG" = x; then
9765    PKG_CONFIG="no"
9766  else
9767    case $cross_compiling:$ac_tool_warned in
9768yes:)
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9770$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9771ac_tool_warned=yes ;;
9772esac
9773    PKG_CONFIG=$ac_pt_PKG_CONFIG
9774  fi
9775else
9776  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9777fi
9778
9779  fi
9780
9781  if test "x$PKG_CONFIG" != "xno"; then
9782
9783  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
9784  {
9785    no_gtk=""
9786    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9787	  && $PKG_CONFIG --exists gtk+-2.0; then
9788    {
9789      min_gtk_version=3.0.0
9790      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9791$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9792                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
9793      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
9794      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
9795      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9796	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9797      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9798	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9799      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9800	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9801    }
9802    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9803	  && $PKG_CONFIG --exists gtk+-3.0; then
9804    {
9805      min_gtk_version=3.0.0
9806      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9807$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9808
9809      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
9810      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
9811      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
9812      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9813	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9814      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9815	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9816      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9817	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9818    }
9819    else
9820      no_gtk=yes
9821    fi
9822
9823    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
9824    {
9825      ac_save_CFLAGS="$CFLAGS"
9826      ac_save_LIBS="$LIBS"
9827      CFLAGS="$CFLAGS $GTK_CFLAGS"
9828      LIBS="$LIBS $GTK_LIBS"
9829
9830                        rm -f conf.gtktest
9831      if test "$cross_compiling" = yes; then :
9832  echo $ac_n "cross compiling; assumed OK... $ac_c"
9833else
9834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9835/* end confdefs.h.  */
9836
9837#include <gtk/gtk.h>
9838#include <stdio.h>
9839#if STDC_HEADERS
9840# include <stdlib.h>
9841# include <stddef.h>
9842#endif
9843
9844int
9845main ()
9846{
9847int major, minor, micro;
9848char *tmp_version;
9849
9850system ("touch conf.gtktest");
9851
9852/* HP/UX 9 (%@#!) writes to sscanf strings */
9853tmp_version = g_strdup("$min_gtk_version");
9854if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
9855   printf("%s, bad version string\n", "$min_gtk_version");
9856   exit(1);
9857 }
9858
9859if ((gtk_major_version > major) ||
9860    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
9861    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
9862				     (gtk_micro_version >= micro)))
9863{
9864    return 0;
9865}
9866return 1;
9867}
9868
9869_ACEOF
9870if ac_fn_c_try_run "$LINENO"; then :
9871
9872else
9873  no_gtk=yes
9874fi
9875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9876  conftest.$ac_objext conftest.beam conftest.$ac_ext
9877fi
9878
9879      CFLAGS="$ac_save_CFLAGS"
9880      LIBS="$ac_save_LIBS"
9881    }
9882    fi
9883    if test "x$no_gtk" = x ; then
9884      if test "x$enable_gtktest" = "xyes"; then
9885	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9886$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9887      else
9888	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9889$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9890      fi
9891      GUI_LIB_LOC="$GTK_LIBDIR"
9892		 GTK_LIBNAME="$GTK_LIBS"
9893		GUI_INC_LOC="$GTK_CFLAGS"
9894    else
9895    {
9896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
9898      GTK_CFLAGS=""
9899      GTK_LIBS=""
9900      :
9901      if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
9902	as_fn_error $? "could not configure GTK" "$LINENO" 5
9903      fi
9904    }
9905    fi
9906  }
9907  else
9908    GTK_CFLAGS=""
9909    GTK_LIBS=""
9910    :
9911  fi
9912
9913
9914  rm -f conf.gtktest
9915
9916    if test "x$GTK_CFLAGS" != "x"; then
9917      SKIP_GTK2=YES
9918      SKIP_GNOME=YES
9919      SKIP_ATHENA=YES
9920      SKIP_NEXTAW=YES
9921      SKIP_MOTIF=YES
9922      GUITYPE=GTK
9923
9924      $as_echo "#define USE_GTK3 1" >>confdefs.h
9925
9926    fi
9927  fi
9928fi
9929
9930if test "x$GUITYPE" = "xGTK"; then
9931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
9932$as_echo_n "checking version of Gdk-Pixbuf... " >&6; }
9933  gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
9934  if test "x$gdk_pixbuf_version" != x ; then
9935    gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
9936      sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
9937    if test "x$gdk_pixbuf_version_minor" != x -a \
9938	$gdk_pixbuf_version_minor -ge 31 ; then
9939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK." >&5
9940$as_echo "OK." >&6; }
9941      # Extract the first word of "glib-compile-resources", so it can be a program name with args.
9942set dummy glib-compile-resources; ac_word=$2
9943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9944$as_echo_n "checking for $ac_word... " >&6; }
9945if ${ac_cv_path_GLIB_COMPILE_RESOURCES+:} false; then :
9946  $as_echo_n "(cached) " >&6
9947else
9948  case $GLIB_COMPILE_RESOURCES in
9949  [\\/]* | ?:[\\/]*)
9950  ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
9951  ;;
9952  *)
9953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9954for as_dir in $PATH
9955do
9956  IFS=$as_save_IFS
9957  test -z "$as_dir" && as_dir=.
9958    for ac_exec_ext in '' $ac_executable_extensions; do
9959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9960    ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir/$ac_word$ac_exec_ext"
9961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9962    break 2
9963  fi
9964done
9965  done
9966IFS=$as_save_IFS
9967
9968  test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
9969  ;;
9970esac
9971fi
9972GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
9973if test -n "$GLIB_COMPILE_RESOURCES"; then
9974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
9975$as_echo "$GLIB_COMPILE_RESOURCES" >&6; }
9976else
9977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9978$as_echo "no" >&6; }
9979fi
9980
9981
9982      { $as_echo "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
9983$as_echo_n "checking glib-compile-resources... " >&6; }
9984      if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
9985	GLIB_COMPILE_RESOURCES=""
9986	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
9987$as_echo "cannot be found in PATH." >&6; }
9988      else
9989	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: usable." >&5
9990$as_echo "usable." >&6; }
9991	$as_echo "#define USE_GRESOURCE 1" >>confdefs.h
9992
9993	GRESOURCE_SRC="auto/gui_gtk_gresources.c"
9994	GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
9995      fi
9996    else
9997      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
9998$as_echo "not usable." >&6; }
9999    fi
10000  else
10001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10002$as_echo "cannot obtain from pkg_config." >&6; }
10003  fi
10004
10005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10006$as_echo_n "checking --disable-icon-cache-update argument... " >&6; }
10007  # Check whether --enable-icon_cache_update was given.
10008if test "${enable_icon_cache_update+set}" = set; then :
10009  enableval=$enable_icon_cache_update;
10010else
10011  enable_icon_cache_update="yes"
10012fi
10013
10014  if test "$enable_icon_cache_update" = "yes"; then
10015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10016$as_echo "not set" >&6; }
10017    # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10018set dummy gtk-update-icon-cache; ac_word=$2
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10020$as_echo_n "checking for $ac_word... " >&6; }
10021if ${ac_cv_path_GTK_UPDATE_ICON_CACHE+:} false; then :
10022  $as_echo_n "(cached) " >&6
10023else
10024  case $GTK_UPDATE_ICON_CACHE in
10025  [\\/]* | ?:[\\/]*)
10026  ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10027  ;;
10028  *)
10029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10030for as_dir in $PATH
10031do
10032  IFS=$as_save_IFS
10033  test -z "$as_dir" && as_dir=.
10034    for ac_exec_ext in '' $ac_executable_extensions; do
10035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10036    ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir/$ac_word$ac_exec_ext"
10037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10038    break 2
10039  fi
10040done
10041  done
10042IFS=$as_save_IFS
10043
10044  test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10045  ;;
10046esac
10047fi
10048GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10049if test -n "$GTK_UPDATE_ICON_CACHE"; then
10050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10051$as_echo "$GTK_UPDATE_ICON_CACHE" >&6; }
10052else
10053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10054$as_echo "no" >&6; }
10055fi
10056
10057
10058    if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
10059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10060$as_echo "not found in PATH." >&6; }
10061    fi
10062  else
10063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10064$as_echo "update disabled" >&6; }
10065  fi
10066
10067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10068$as_echo_n "checking --disable-desktop-database-update argument... " >&6; }
10069  # Check whether --enable-desktop_database_update was given.
10070if test "${enable_desktop_database_update+set}" = set; then :
10071  enableval=$enable_desktop_database_update;
10072else
10073  enable_desktop_database_update="yes"
10074fi
10075
10076  if test "$enable_desktop_database_update" = "yes"; then
10077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10078$as_echo "not set" >&6; }
10079    # Extract the first word of "update-desktop-database", so it can be a program name with args.
10080set dummy update-desktop-database; ac_word=$2
10081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10082$as_echo_n "checking for $ac_word... " >&6; }
10083if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then :
10084  $as_echo_n "(cached) " >&6
10085else
10086  case $UPDATE_DESKTOP_DATABASE in
10087  [\\/]* | ?:[\\/]*)
10088  ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10089  ;;
10090  *)
10091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10092for as_dir in $PATH
10093do
10094  IFS=$as_save_IFS
10095  test -z "$as_dir" && as_dir=.
10096    for ac_exec_ext in '' $ac_executable_extensions; do
10097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10098    ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext"
10099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10100    break 2
10101  fi
10102done
10103  done
10104IFS=$as_save_IFS
10105
10106  test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10107  ;;
10108esac
10109fi
10110UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10111if test -n "$UPDATE_DESKTOP_DATABASE"; then
10112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10113$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; }
10114else
10115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10116$as_echo "no" >&6; }
10117fi
10118
10119
10120    if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
10121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10122$as_echo "not found in PATH." >&6; }
10123    fi
10124  else
10125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10126$as_echo "update disabled" >&6; }
10127  fi
10128fi
10129
10130
10131
10132
10133
10134
10135
10136if test -z "$SKIP_MOTIF"; then
10137  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"
10138    GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10139
10140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10141$as_echo_n "checking for location of Motif GUI includes... " >&6; }
10142  gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10143  GUI_INC_LOC=
10144  for try in $gui_includes; do
10145    if test -f "$try/Xm/Xm.h"; then
10146      GUI_INC_LOC=$try
10147    fi
10148  done
10149  if test -n "$GUI_INC_LOC"; then
10150    if test "$GUI_INC_LOC" = /usr/include; then
10151      GUI_INC_LOC=
10152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10153$as_echo "in default path" >&6; }
10154    else
10155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10156$as_echo "$GUI_INC_LOC" >&6; }
10157    fi
10158  else
10159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10160$as_echo "<not found>" >&6; }
10161    SKIP_MOTIF=YES
10162  fi
10163fi
10164
10165
10166if test -z "$SKIP_MOTIF"; then
10167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10168$as_echo_n "checking --with-motif-lib argument... " >&6; }
10169
10170# Check whether --with-motif-lib was given.
10171if test "${with_motif_lib+set}" = set; then :
10172  withval=$with_motif_lib;  MOTIF_LIBNAME="${withval}"
10173fi
10174
10175
10176  if test -n "$MOTIF_LIBNAME"; then
10177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10178$as_echo "$MOTIF_LIBNAME" >&6; }
10179    GUI_LIB_LOC=
10180  else
10181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10182$as_echo "no" >&6; }
10183
10184        GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10185
10186            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10187$as_echo_n "checking for location of Motif GUI libs... " >&6; }
10188    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"
10189    GUI_LIB_LOC=
10190    for try in $gui_libs; do
10191      for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
10192	if test -f "$libtry"; then
10193	  GUI_LIB_LOC=$try
10194	fi
10195      done
10196    done
10197    if test -n "$GUI_LIB_LOC"; then
10198            if test "$GUI_LIB_LOC" = /usr/lib \
10199	   -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10200	   -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
10201	GUI_LIB_LOC=
10202	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10203$as_echo "in default path" >&6; }
10204      else
10205	if test -n "$GUI_LIB_LOC"; then
10206	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10207$as_echo "$GUI_LIB_LOC" >&6; }
10208	  if test "`(uname) 2>/dev/null`" = SunOS &&
10209					 uname -r | grep '^5' >/dev/null; then
10210	    GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10211	  fi
10212	fi
10213      fi
10214      MOTIF_LIBNAME=-lXm
10215    else
10216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10217$as_echo "<not found>" >&6; }
10218      SKIP_MOTIF=YES
10219    fi
10220  fi
10221fi
10222
10223if test -z "$SKIP_MOTIF"; then
10224  SKIP_ATHENA=YES
10225  SKIP_NEXTAW=YES
10226  GUITYPE=MOTIF
10227
10228fi
10229
10230
10231GUI_X_LIBS=
10232
10233if test -z "$SKIP_ATHENA"; then
10234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Athena header files can be found" >&5
10235$as_echo_n "checking if Athena header files can be found... " >&6; }
10236  cflags_save=$CFLAGS
10237  CFLAGS="$CFLAGS $X_CFLAGS"
10238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10239/* end confdefs.h.  */
10240
10241#include <X11/Intrinsic.h>
10242#include <X11/Xaw/Paned.h>
10243int
10244main ()
10245{
10246
10247  ;
10248  return 0;
10249}
10250_ACEOF
10251if ac_fn_c_try_compile "$LINENO"; then :
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10253$as_echo "yes" >&6; }
10254else
10255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }; SKIP_ATHENA=YES
10257fi
10258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10259  CFLAGS=$cflags_save
10260fi
10261
10262if test -z "$SKIP_ATHENA"; then
10263  GUITYPE=ATHENA
10264fi
10265
10266if test -z "$SKIP_NEXTAW"; then
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if neXtaw header files can be found" >&5
10268$as_echo_n "checking if neXtaw header files can be found... " >&6; }
10269  cflags_save=$CFLAGS
10270  CFLAGS="$CFLAGS $X_CFLAGS"
10271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10272/* end confdefs.h.  */
10273
10274#include <X11/Intrinsic.h>
10275#include <X11/neXtaw/Paned.h>
10276int
10277main ()
10278{
10279
10280  ;
10281  return 0;
10282}
10283_ACEOF
10284if ac_fn_c_try_compile "$LINENO"; then :
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10286$as_echo "yes" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }; SKIP_NEXTAW=YES
10290fi
10291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10292  CFLAGS=$cflags_save
10293fi
10294
10295if test -z "$SKIP_NEXTAW"; then
10296  GUITYPE=NEXTAW
10297fi
10298
10299if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
10300      if test -n "$GUI_INC_LOC"; then
10301    GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10302  fi
10303  if test -n "$GUI_LIB_LOC"; then
10304    GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10305  fi
10306
10307    ldflags_save=$LDFLAGS
10308  LDFLAGS="$X_LIBS $LDFLAGS"
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10310$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
10311if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then :
10312  $as_echo_n "(cached) " >&6
10313else
10314  ac_check_lib_save_LIBS=$LIBS
10315LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10317/* end confdefs.h.  */
10318
10319/* Override any GCC internal prototype to avoid an error.
10320   Use char because int might match the return type of a GCC
10321   builtin and then its argument prototype would still apply.  */
10322#ifdef __cplusplus
10323extern "C"
10324#endif
10325char XShapeQueryExtension ();
10326int
10327main ()
10328{
10329return XShapeQueryExtension ();
10330  ;
10331  return 0;
10332}
10333_ACEOF
10334if ac_fn_c_try_link "$LINENO"; then :
10335  ac_cv_lib_Xext_XShapeQueryExtension=yes
10336else
10337  ac_cv_lib_Xext_XShapeQueryExtension=no
10338fi
10339rm -f core conftest.err conftest.$ac_objext \
10340    conftest$ac_exeext conftest.$ac_ext
10341LIBS=$ac_check_lib_save_LIBS
10342fi
10343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10344$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10345if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then :
10346  GUI_X_LIBS="-lXext"
10347fi
10348
10349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10350$as_echo_n "checking for wslen in -lw... " >&6; }
10351if ${ac_cv_lib_w_wslen+:} false; then :
10352  $as_echo_n "(cached) " >&6
10353else
10354  ac_check_lib_save_LIBS=$LIBS
10355LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10357/* end confdefs.h.  */
10358
10359/* Override any GCC internal prototype to avoid an error.
10360   Use char because int might match the return type of a GCC
10361   builtin and then its argument prototype would still apply.  */
10362#ifdef __cplusplus
10363extern "C"
10364#endif
10365char wslen ();
10366int
10367main ()
10368{
10369return wslen ();
10370  ;
10371  return 0;
10372}
10373_ACEOF
10374if ac_fn_c_try_link "$LINENO"; then :
10375  ac_cv_lib_w_wslen=yes
10376else
10377  ac_cv_lib_w_wslen=no
10378fi
10379rm -f core conftest.err conftest.$ac_objext \
10380    conftest$ac_exeext conftest.$ac_ext
10381LIBS=$ac_check_lib_save_LIBS
10382fi
10383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10384$as_echo "$ac_cv_lib_w_wslen" >&6; }
10385if test "x$ac_cv_lib_w_wslen" = xyes; then :
10386  X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
10387fi
10388
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10390$as_echo_n "checking for dlsym in -ldl... " >&6; }
10391if ${ac_cv_lib_dl_dlsym+:} false; then :
10392  $as_echo_n "(cached) " >&6
10393else
10394  ac_check_lib_save_LIBS=$LIBS
10395LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10397/* end confdefs.h.  */
10398
10399/* Override any GCC internal prototype to avoid an error.
10400   Use char because int might match the return type of a GCC
10401   builtin and then its argument prototype would still apply.  */
10402#ifdef __cplusplus
10403extern "C"
10404#endif
10405char dlsym ();
10406int
10407main ()
10408{
10409return dlsym ();
10410  ;
10411  return 0;
10412}
10413_ACEOF
10414if ac_fn_c_try_link "$LINENO"; then :
10415  ac_cv_lib_dl_dlsym=yes
10416else
10417  ac_cv_lib_dl_dlsym=no
10418fi
10419rm -f core conftest.err conftest.$ac_objext \
10420    conftest$ac_exeext conftest.$ac_ext
10421LIBS=$ac_check_lib_save_LIBS
10422fi
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10424$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
10425if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
10426  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
10427fi
10428
10429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10430$as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10431if ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+:} false; then :
10432  $as_echo_n "(cached) " >&6
10433else
10434  ac_check_lib_save_LIBS=$LIBS
10435LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10437/* end confdefs.h.  */
10438
10439/* Override any GCC internal prototype to avoid an error.
10440   Use char because int might match the return type of a GCC
10441   builtin and then its argument prototype would still apply.  */
10442#ifdef __cplusplus
10443extern "C"
10444#endif
10445char XmuCreateStippledPixmap ();
10446int
10447main ()
10448{
10449return XmuCreateStippledPixmap ();
10450  ;
10451  return 0;
10452}
10453_ACEOF
10454if ac_fn_c_try_link "$LINENO"; then :
10455  ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
10456else
10457  ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
10458fi
10459rm -f core conftest.err conftest.$ac_objext \
10460    conftest$ac_exeext conftest.$ac_ext
10461LIBS=$ac_check_lib_save_LIBS
10462fi
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10464$as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10465if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes; then :
10466  GUI_X_LIBS="-lXmu $GUI_X_LIBS"
10467fi
10468
10469  if test -z "$SKIP_MOTIF"; then
10470    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10471$as_echo_n "checking for XpEndJob in -lXp... " >&6; }
10472if ${ac_cv_lib_Xp_XpEndJob+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  ac_check_lib_save_LIBS=$LIBS
10476LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10478/* end confdefs.h.  */
10479
10480/* Override any GCC internal prototype to avoid an error.
10481   Use char because int might match the return type of a GCC
10482   builtin and then its argument prototype would still apply.  */
10483#ifdef __cplusplus
10484extern "C"
10485#endif
10486char XpEndJob ();
10487int
10488main ()
10489{
10490return XpEndJob ();
10491  ;
10492  return 0;
10493}
10494_ACEOF
10495if ac_fn_c_try_link "$LINENO"; then :
10496  ac_cv_lib_Xp_XpEndJob=yes
10497else
10498  ac_cv_lib_Xp_XpEndJob=no
10499fi
10500rm -f core conftest.err conftest.$ac_objext \
10501    conftest$ac_exeext conftest.$ac_ext
10502LIBS=$ac_check_lib_save_LIBS
10503fi
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
10505$as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; }
10506if test "x$ac_cv_lib_Xp_XpEndJob" = xyes; then :
10507  GUI_X_LIBS="-lXp $GUI_X_LIBS"
10508fi
10509
10510  fi
10511  LDFLAGS=$ldflags_save
10512
10513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
10514$as_echo_n "checking for extra X11 defines... " >&6; }
10515  NARROW_PROTO=
10516  rm -fr conftestdir
10517  if mkdir conftestdir; then
10518    cd conftestdir
10519    cat > Imakefile <<'EOF'
10520acfindx:
10521	@echo 'NARROW_PROTO="${PROTO_DEFINES}"'
10522EOF
10523    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10524      eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10525    fi
10526    cd ..
10527    rm -fr conftestdir
10528  fi
10529  if test -z "$NARROW_PROTO"; then
10530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10531$as_echo "no" >&6; }
10532  else
10533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
10534$as_echo "$NARROW_PROTO" >&6; }
10535  fi
10536
10537fi
10538
10539if test "$enable_xsmp" = "yes"; then
10540  cppflags_save=$CPPFLAGS
10541  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10542  for ac_header in X11/SM/SMlib.h
10543do :
10544  ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10545if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then :
10546  cat >>confdefs.h <<_ACEOF
10547#define HAVE_X11_SM_SMLIB_H 1
10548_ACEOF
10549
10550fi
10551
10552done
10553
10554  CPPFLAGS=$cppflags_save
10555fi
10556
10557
10558if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
10559    cppflags_save=$CPPFLAGS
10560  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10561  for ac_header in X11/xpm.h X11/Sunkeysym.h
10562do :
10563  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10564ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10565if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10566  cat >>confdefs.h <<_ACEOF
10567#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10568_ACEOF
10569
10570fi
10571
10572done
10573
10574
10575    if test ! "$enable_xim" = "no"; then
10576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
10577$as_echo_n "checking for XIMText in X11/Xlib.h... " >&6; }
10578    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10579/* end confdefs.h.  */
10580#include <X11/Xlib.h>
10581_ACEOF
10582if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10583  $EGREP "XIMText" >/dev/null 2>&1; then :
10584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10585$as_echo "yes" >&6; }
10586else
10587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
10588$as_echo "no; xim has been disabled" >&6; }; enable_xim="no"
10589fi
10590rm -f conftest*
10591
10592  fi
10593  CPPFLAGS=$cppflags_save
10594
10595    if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
10596		-a "x$GUITYPE" != "xNONE" ; then
10597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
10598$as_echo "X GUI selected; xim has been enabled" >&6; }
10599    enable_xim="yes"
10600  fi
10601fi
10602
10603if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
10604  cppflags_save=$CPPFLAGS
10605  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10606  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
10607$as_echo_n "checking for X11/Xmu/Editres.h... " >&6; }
10608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609/* end confdefs.h.  */
10610
10611#include <X11/Intrinsic.h>
10612#include <X11/Xmu/Editres.h>
10613int
10614main ()
10615{
10616int i; i = 0;
10617  ;
10618  return 0;
10619}
10620_ACEOF
10621if ac_fn_c_try_compile "$LINENO"; then :
10622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10623$as_echo "yes" >&6; }
10624		      $as_echo "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
10625
10626else
10627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10628$as_echo "no" >&6; }
10629fi
10630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10631  CPPFLAGS=$cppflags_save
10632fi
10633
10634if test -z "$SKIP_MOTIF"; then
10635  cppflags_save=$CPPFLAGS
10636  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10637  if test "$zOSUnix" = "yes"; then
10638	xmheader="Xm/Xm.h"
10639  else
10640	xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
10641	   Xm/UnhighlightT.h Xm/Notebook.h"
10642  fi
10643  for ac_header in $xmheader
10644do :
10645  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10646ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10647if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10648  cat >>confdefs.h <<_ACEOF
10649#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10650_ACEOF
10651
10652fi
10653
10654done
10655
10656
10657  if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
10658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
10659$as_echo_n "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
10660    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10661/* end confdefs.h.  */
10662#include <Xm/XpmP.h>
10663int
10664main ()
10665{
10666XpmAttributes_21 attr;
10667  ;
10668  return 0;
10669}
10670_ACEOF
10671if ac_fn_c_try_compile "$LINENO"; then :
10672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10673$as_echo "yes" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
10674
10675else
10676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10678
10679
10680fi
10681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10682  else
10683    $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10684
10685  fi
10686  CPPFLAGS=$cppflags_save
10687fi
10688
10689if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
10690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
10691$as_echo "no GUI selected; xim has been disabled" >&6; }
10692  enable_xim="no"
10693fi
10694if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
10696$as_echo "no GUI selected; fontset has been disabled" >&6; }
10697  enable_fontset="no"
10698fi
10699if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
10701$as_echo "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
10702  enable_fontset="no"
10703fi
10704
10705if test -z "$SKIP_PHOTON"; then
10706  GUITYPE=PHOTONGUI
10707fi
10708
10709
10710
10711
10712
10713
10714if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
10715  as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
10716fi
10717
10718if test "$enable_xim" = "yes"; then
10719  $as_echo "#define FEAT_XIM 1" >>confdefs.h
10720
10721fi
10722if test "$enable_fontset" = "yes"; then
10723  $as_echo "#define FEAT_XFONTSET 1" >>confdefs.h
10724
10725fi
10726
10727
10728
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
10730$as_echo_n "checking for /proc link to executable... " >&6; }
10731if test -L "/proc/self/exe"; then
10732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
10733$as_echo "/proc/self/exe" >&6; }
10734  $as_echo "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
10735
10736elif test -L "/proc/self/path/a.out"; then
10737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
10738$as_echo "/proc/self/path/a.out" >&6; }
10739  $as_echo "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
10740
10741elif test -L "/proc/curproc/file"; then
10742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
10743$as_echo "/proc/curproc/file" >&6; }
10744  $as_echo "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
10745
10746else
10747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10748$as_echo "no" >&6; }
10749fi
10750
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
10752$as_echo_n "checking for CYGWIN or MSYS environment... " >&6; }
10753case `uname` in
10754    CYGWIN*|MSYS*)    CYGWIN=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10755$as_echo "yes" >&6; }
10756                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
10757$as_echo_n "checking for CYGWIN clipboard support... " >&6; }
10758                if test "x$with_x" = "xno" ; then
10759                  OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
10760                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10761$as_echo "yes" >&6; }
10762                  $as_echo "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
10763
10764                else
10765                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
10766$as_echo "no - using X11" >&6; }
10767                fi ;;
10768
10769    *)          CYGWIN=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10770$as_echo "no" >&6; };;
10771esac
10772
10773if test "$enable_hangulinput" = "yes"; then
10774  if test "x$GUITYPE" = "xNONE"; then
10775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; hangul input has been disabled" >&5
10776$as_echo "no GUI selected; hangul input has been disabled" >&6; }
10777    enable_hangulinput=no
10778  else
10779    $as_echo "#define FEAT_HANGULIN 1" >>confdefs.h
10780
10781    HANGULIN_SRC=hangulin.c
10782
10783    HANGULIN_OBJ=objects/hangulin.o
10784
10785  fi
10786fi
10787
10788
10789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
10790$as_echo_n "checking whether toupper is broken... " >&6; }
10791if ${vim_cv_toupper_broken+:} false; then :
10792  $as_echo_n "(cached) " >&6
10793else
10794
10795    if test "$cross_compiling" = yes; then :
10796
10797    as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
10798
10799else
10800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10801/* end confdefs.h.  */
10802
10803#include "confdefs.h"
10804#include <ctype.h>
10805#if STDC_HEADERS
10806# include <stdlib.h>
10807# include <stddef.h>
10808#endif
10809main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
10810
10811_ACEOF
10812if ac_fn_c_try_run "$LINENO"; then :
10813
10814    vim_cv_toupper_broken=yes
10815
10816else
10817
10818    vim_cv_toupper_broken=no
10819
10820fi
10821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10822  conftest.$ac_objext conftest.beam conftest.$ac_ext
10823fi
10824
10825fi
10826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
10827$as_echo "$vim_cv_toupper_broken" >&6; }
10828
10829if test "x$vim_cv_toupper_broken" = "xyes" ; then
10830  $as_echo "#define BROKEN_TOUPPER 1" >>confdefs.h
10831
10832fi
10833
10834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
10835$as_echo_n "checking whether __DATE__ and __TIME__ work... " >&6; }
10836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10837/* end confdefs.h.  */
10838#include <stdio.h>
10839int
10840main ()
10841{
10842printf("(" __DATE__ " " __TIME__ ")");
10843  ;
10844  return 0;
10845}
10846_ACEOF
10847if ac_fn_c_try_compile "$LINENO"; then :
10848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10849$as_echo "yes" >&6; }; $as_echo "#define HAVE_DATE_TIME 1" >>confdefs.h
10850
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10856
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
10858$as_echo_n "checking whether __attribute__((unused)) is allowed... " >&6; }
10859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10860/* end confdefs.h.  */
10861#include <stdio.h>
10862int
10863main ()
10864{
10865int x __attribute__((unused));
10866  ;
10867  return 0;
10868}
10869_ACEOF
10870if ac_fn_c_try_compile "$LINENO"; then :
10871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10872$as_echo "yes" >&6; }; $as_echo "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
10873
10874else
10875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10876$as_echo "no" >&6; }
10877fi
10878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10879
10880ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
10881if test "x$ac_cv_header_elf_h" = xyes; then :
10882  HAS_ELF=1
10883fi
10884
10885
10886if test "$HAS_ELF" = 1; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
10888$as_echo_n "checking for main in -lelf... " >&6; }
10889if ${ac_cv_lib_elf_main+:} false; then :
10890  $as_echo_n "(cached) " >&6
10891else
10892  ac_check_lib_save_LIBS=$LIBS
10893LIBS="-lelf  $LIBS"
10894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10895/* end confdefs.h.  */
10896
10897
10898int
10899main ()
10900{
10901return main ();
10902  ;
10903  return 0;
10904}
10905_ACEOF
10906if ac_fn_c_try_link "$LINENO"; then :
10907  ac_cv_lib_elf_main=yes
10908else
10909  ac_cv_lib_elf_main=no
10910fi
10911rm -f core conftest.err conftest.$ac_objext \
10912    conftest$ac_exeext conftest.$ac_ext
10913LIBS=$ac_check_lib_save_LIBS
10914fi
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
10916$as_echo "$ac_cv_lib_elf_main" >&6; }
10917if test "x$ac_cv_lib_elf_main" = xyes; then :
10918  cat >>confdefs.h <<_ACEOF
10919#define HAVE_LIBELF 1
10920_ACEOF
10921
10922  LIBS="-lelf $LIBS"
10923
10924fi
10925
10926fi
10927
10928ac_header_dirent=no
10929for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10930  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
10932$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
10933if eval \${$as_ac_Header+:} false; then :
10934  $as_echo_n "(cached) " >&6
10935else
10936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10937/* end confdefs.h.  */
10938#include <sys/types.h>
10939#include <$ac_hdr>
10940
10941int
10942main ()
10943{
10944if ((DIR *) 0)
10945return 0;
10946  ;
10947  return 0;
10948}
10949_ACEOF
10950if ac_fn_c_try_compile "$LINENO"; then :
10951  eval "$as_ac_Header=yes"
10952else
10953  eval "$as_ac_Header=no"
10954fi
10955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10956fi
10957eval ac_res=\$$as_ac_Header
10958	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10959$as_echo "$ac_res" >&6; }
10960if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10961  cat >>confdefs.h <<_ACEOF
10962#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10963_ACEOF
10964
10965ac_header_dirent=$ac_hdr; break
10966fi
10967
10968done
10969# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10970if test $ac_header_dirent = dirent.h; then
10971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10972$as_echo_n "checking for library containing opendir... " >&6; }
10973if ${ac_cv_search_opendir+:} false; then :
10974  $as_echo_n "(cached) " >&6
10975else
10976  ac_func_search_save_LIBS=$LIBS
10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978/* end confdefs.h.  */
10979
10980/* Override any GCC internal prototype to avoid an error.
10981   Use char because int might match the return type of a GCC
10982   builtin and then its argument prototype would still apply.  */
10983#ifdef __cplusplus
10984extern "C"
10985#endif
10986char opendir ();
10987int
10988main ()
10989{
10990return opendir ();
10991  ;
10992  return 0;
10993}
10994_ACEOF
10995for ac_lib in '' dir; do
10996  if test -z "$ac_lib"; then
10997    ac_res="none required"
10998  else
10999    ac_res=-l$ac_lib
11000    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11001  fi
11002  if ac_fn_c_try_link "$LINENO"; then :
11003  ac_cv_search_opendir=$ac_res
11004fi
11005rm -f core conftest.err conftest.$ac_objext \
11006    conftest$ac_exeext
11007  if ${ac_cv_search_opendir+:} false; then :
11008  break
11009fi
11010done
11011if ${ac_cv_search_opendir+:} false; then :
11012
11013else
11014  ac_cv_search_opendir=no
11015fi
11016rm conftest.$ac_ext
11017LIBS=$ac_func_search_save_LIBS
11018fi
11019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11020$as_echo "$ac_cv_search_opendir" >&6; }
11021ac_res=$ac_cv_search_opendir
11022if test "$ac_res" != no; then :
11023  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11024
11025fi
11026
11027else
11028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11029$as_echo_n "checking for library containing opendir... " >&6; }
11030if ${ac_cv_search_opendir+:} false; then :
11031  $as_echo_n "(cached) " >&6
11032else
11033  ac_func_search_save_LIBS=$LIBS
11034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11035/* end confdefs.h.  */
11036
11037/* Override any GCC internal prototype to avoid an error.
11038   Use char because int might match the return type of a GCC
11039   builtin and then its argument prototype would still apply.  */
11040#ifdef __cplusplus
11041extern "C"
11042#endif
11043char opendir ();
11044int
11045main ()
11046{
11047return opendir ();
11048  ;
11049  return 0;
11050}
11051_ACEOF
11052for ac_lib in '' x; do
11053  if test -z "$ac_lib"; then
11054    ac_res="none required"
11055  else
11056    ac_res=-l$ac_lib
11057    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11058  fi
11059  if ac_fn_c_try_link "$LINENO"; then :
11060  ac_cv_search_opendir=$ac_res
11061fi
11062rm -f core conftest.err conftest.$ac_objext \
11063    conftest$ac_exeext
11064  if ${ac_cv_search_opendir+:} false; then :
11065  break
11066fi
11067done
11068if ${ac_cv_search_opendir+:} false; then :
11069
11070else
11071  ac_cv_search_opendir=no
11072fi
11073rm conftest.$ac_ext
11074LIBS=$ac_func_search_save_LIBS
11075fi
11076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11077$as_echo "$ac_cv_search_opendir" >&6; }
11078ac_res=$ac_cv_search_opendir
11079if test "$ac_res" != no; then :
11080  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11081
11082fi
11083
11084fi
11085
11086
11087if test $ac_cv_header_sys_wait_h = no; then
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11089$as_echo_n "checking for sys/wait.h that defines union wait... " >&6; }
11090  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11091/* end confdefs.h.  */
11092#include <sys/wait.h>
11093int
11094main ()
11095{
11096union wait xx, yy; xx = yy
11097  ;
11098  return 0;
11099}
11100_ACEOF
11101if ac_fn_c_try_compile "$LINENO"; then :
11102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11103$as_echo "yes" >&6; }
11104			$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
11105
11106			$as_echo "#define HAVE_UNION_WAIT 1" >>confdefs.h
11107
11108else
11109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11110$as_echo "no" >&6; }
11111fi
11112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11113fi
11114
11115for ac_header in stdint.h stdlib.h string.h \
11116	sys/select.h sys/utsname.h termcap.h fcntl.h \
11117	sgtty.h sys/ioctl.h sys/time.h sys/types.h \
11118	termio.h iconv.h inttypes.h langinfo.h math.h \
11119	unistd.h stropts.h errno.h sys/resource.h \
11120	sys/systeminfo.h locale.h sys/stream.h termios.h \
11121	libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
11122	utime.h sys/param.h sys/ptms.h libintl.h libgen.h \
11123	util/debug.h util/msg18n.h frame.h sys/acl.h \
11124	sys/access.h sys/sysinfo.h wchar.h wctype.h
11125do :
11126  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11127ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11128if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11129  cat >>confdefs.h <<_ACEOF
11130#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11131_ACEOF
11132
11133fi
11134
11135done
11136
11137
11138for ac_header in sys/ptem.h
11139do :
11140  ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "#if defined HAVE_SYS_STREAM_H
11141#  include <sys/stream.h>
11142#endif
11143"
11144if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
11145  cat >>confdefs.h <<_ACEOF
11146#define HAVE_SYS_PTEM_H 1
11147_ACEOF
11148
11149fi
11150
11151done
11152
11153
11154for ac_header in sys/sysctl.h
11155do :
11156  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if defined HAVE_SYS_PARAM_H
11157#  include <sys/param.h>
11158#endif
11159"
11160if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
11161  cat >>confdefs.h <<_ACEOF
11162#define HAVE_SYS_SYSCTL_H 1
11163_ACEOF
11164
11165fi
11166
11167done
11168
11169
11170
11171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11172$as_echo_n "checking for pthread_np.h... " >&6; }
11173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174/* end confdefs.h.  */
11175
11176#include <pthread.h>
11177#include <pthread_np.h>
11178int
11179main ()
11180{
11181int i; i = 0;
11182  ;
11183  return 0;
11184}
11185_ACEOF
11186if ac_fn_c_try_compile "$LINENO"; then :
11187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11188$as_echo "yes" >&6; }
11189		      $as_echo "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
11190
11191else
11192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
11194fi
11195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11196
11197for ac_header in strings.h
11198do :
11199  ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11200if test "x$ac_cv_header_strings_h" = xyes; then :
11201  cat >>confdefs.h <<_ACEOF
11202#define HAVE_STRINGS_H 1
11203_ACEOF
11204
11205fi
11206
11207done
11208
11209if test "x$MACOS_X" = "xyes"; then
11210    $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
11211
11212else
11213
11214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11215$as_echo_n "checking if strings.h can be included after string.h... " >&6; }
11216cppflags_save=$CPPFLAGS
11217CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11219/* end confdefs.h.  */
11220
11221#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11222# define _NO_PROTO	/* like in os_unix.h, causes conflict for AIX (Winn) */
11223			/* but don't do it on AIX 5.1 (Uribarri) */
11224#endif
11225#ifdef HAVE_XM_XM_H
11226# include <Xm/Xm.h>	/* This breaks it for HP-UX 11 (Squassabia) */
11227#endif
11228#ifdef HAVE_STRING_H
11229# include <string.h>
11230#endif
11231#if defined(HAVE_STRINGS_H)
11232# include <strings.h>
11233#endif
11234
11235int
11236main ()
11237{
11238int i; i = 0;
11239  ;
11240  return 0;
11241}
11242_ACEOF
11243if ac_fn_c_try_compile "$LINENO"; then :
11244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11245$as_echo "yes" >&6; }
11246else
11247  $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
11248
11249		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11250$as_echo "no" >&6; }
11251fi
11252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11253CPPFLAGS=$cppflags_save
11254fi
11255
11256if test $ac_cv_c_compiler_gnu = yes; then
11257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
11258$as_echo_n "checking whether $CC needs -traditional... " >&6; }
11259if ${ac_cv_prog_gcc_traditional+:} false; then :
11260  $as_echo_n "(cached) " >&6
11261else
11262    ac_pattern="Autoconf.*'x'"
11263  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264/* end confdefs.h.  */
11265#include <sgtty.h>
11266Autoconf TIOCGETP
11267_ACEOF
11268if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11269  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
11270  ac_cv_prog_gcc_traditional=yes
11271else
11272  ac_cv_prog_gcc_traditional=no
11273fi
11274rm -f conftest*
11275
11276
11277  if test $ac_cv_prog_gcc_traditional = no; then
11278    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11279/* end confdefs.h.  */
11280#include <termio.h>
11281Autoconf TCGETA
11282_ACEOF
11283if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11284  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
11285  ac_cv_prog_gcc_traditional=yes
11286fi
11287rm -f conftest*
11288
11289  fi
11290fi
11291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
11292$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
11293  if test $ac_cv_prog_gcc_traditional = yes; then
11294    CC="$CC -traditional"
11295  fi
11296fi
11297
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11299$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11300if ${ac_cv_c_const+:} false; then :
11301  $as_echo_n "(cached) " >&6
11302else
11303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11304/* end confdefs.h.  */
11305
11306int
11307main ()
11308{
11309
11310#ifndef __cplusplus
11311  /* Ultrix mips cc rejects this sort of thing.  */
11312  typedef int charset[2];
11313  const charset cs = { 0, 0 };
11314  /* SunOS 4.1.1 cc rejects this.  */
11315  char const *const *pcpcc;
11316  char **ppc;
11317  /* NEC SVR4.0.2 mips cc rejects this.  */
11318  struct point {int x, y;};
11319  static struct point const zero = {0,0};
11320  /* AIX XL C 1.02.0.0 rejects this.
11321     It does not let you subtract one const X* pointer from another in
11322     an arm of an if-expression whose if-part is not a constant
11323     expression */
11324  const char *g = "string";
11325  pcpcc = &g + (g ? g-g : 0);
11326  /* HPUX 7.0 cc rejects these. */
11327  ++pcpcc;
11328  ppc = (char**) pcpcc;
11329  pcpcc = (char const *const *) ppc;
11330  { /* SCO 3.2v4 cc rejects this sort of thing.  */
11331    char tx;
11332    char *t = &tx;
11333    char const *s = 0 ? (char *) 0 : (char const *) 0;
11334
11335    *t++ = 0;
11336    if (s) return 0;
11337  }
11338  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11339    int x[] = {25, 17};
11340    const int *foo = &x[0];
11341    ++foo;
11342  }
11343  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11344    typedef const int *iptr;
11345    iptr p = 0;
11346    ++p;
11347  }
11348  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11349       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11350    struct s { int j; const int *ap[3]; } bx;
11351    struct s *b = &bx; b->j = 5;
11352  }
11353  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11354    const int foo = 10;
11355    if (!foo) return 0;
11356  }
11357  return !cs[0] && !zero.x;
11358#endif
11359
11360  ;
11361  return 0;
11362}
11363_ACEOF
11364if ac_fn_c_try_compile "$LINENO"; then :
11365  ac_cv_c_const=yes
11366else
11367  ac_cv_c_const=no
11368fi
11369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11370fi
11371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11372$as_echo "$ac_cv_c_const" >&6; }
11373if test $ac_cv_c_const = no; then
11374
11375$as_echo "#define const /**/" >>confdefs.h
11376
11377fi
11378
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11380$as_echo_n "checking for working volatile... " >&6; }
11381if ${ac_cv_c_volatile+:} false; then :
11382  $as_echo_n "(cached) " >&6
11383else
11384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11385/* end confdefs.h.  */
11386
11387int
11388main ()
11389{
11390
11391volatile int x;
11392int * volatile y = (int *) 0;
11393return !x && !y;
11394  ;
11395  return 0;
11396}
11397_ACEOF
11398if ac_fn_c_try_compile "$LINENO"; then :
11399  ac_cv_c_volatile=yes
11400else
11401  ac_cv_c_volatile=no
11402fi
11403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11404fi
11405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
11406$as_echo "$ac_cv_c_volatile" >&6; }
11407if test $ac_cv_c_volatile = no; then
11408
11409$as_echo "#define volatile /**/" >>confdefs.h
11410
11411fi
11412
11413ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11414if test "x$ac_cv_type_mode_t" = xyes; then :
11415
11416else
11417
11418cat >>confdefs.h <<_ACEOF
11419#define mode_t int
11420_ACEOF
11421
11422fi
11423
11424ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11425if test "x$ac_cv_type_off_t" = xyes; then :
11426
11427else
11428
11429cat >>confdefs.h <<_ACEOF
11430#define off_t long int
11431_ACEOF
11432
11433fi
11434
11435ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11436if test "x$ac_cv_type_pid_t" = xyes; then :
11437
11438else
11439
11440cat >>confdefs.h <<_ACEOF
11441#define pid_t int
11442_ACEOF
11443
11444fi
11445
11446ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
11447if test "x$ac_cv_type_size_t" = xyes; then :
11448
11449else
11450
11451cat >>confdefs.h <<_ACEOF
11452#define size_t unsigned int
11453_ACEOF
11454
11455fi
11456
11457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11458$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11459if ${ac_cv_type_uid_t+:} false; then :
11460  $as_echo_n "(cached) " >&6
11461else
11462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463/* end confdefs.h.  */
11464#include <sys/types.h>
11465
11466_ACEOF
11467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11468  $EGREP "uid_t" >/dev/null 2>&1; then :
11469  ac_cv_type_uid_t=yes
11470else
11471  ac_cv_type_uid_t=no
11472fi
11473rm -f conftest*
11474
11475fi
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
11477$as_echo "$ac_cv_type_uid_t" >&6; }
11478if test $ac_cv_type_uid_t = no; then
11479
11480$as_echo "#define uid_t int" >>confdefs.h
11481
11482
11483$as_echo "#define gid_t int" >>confdefs.h
11484
11485fi
11486
11487ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
11488case $ac_cv_c_uint32_t in #(
11489  no|yes) ;; #(
11490  *)
11491
11492$as_echo "#define _UINT32_T 1" >>confdefs.h
11493
11494
11495cat >>confdefs.h <<_ACEOF
11496#define uint32_t $ac_cv_c_uint32_t
11497_ACEOF
11498;;
11499  esac
11500
11501
11502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11503$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
11504if ${ac_cv_header_time+:} false; then :
11505  $as_echo_n "(cached) " >&6
11506else
11507  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11508/* end confdefs.h.  */
11509#include <sys/types.h>
11510#include <sys/time.h>
11511#include <time.h>
11512
11513int
11514main ()
11515{
11516if ((struct tm *) 0)
11517return 0;
11518  ;
11519  return 0;
11520}
11521_ACEOF
11522if ac_fn_c_try_compile "$LINENO"; then :
11523  ac_cv_header_time=yes
11524else
11525  ac_cv_header_time=no
11526fi
11527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11528fi
11529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11530$as_echo "$ac_cv_header_time" >&6; }
11531if test $ac_cv_header_time = yes; then
11532
11533$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
11534
11535fi
11536
11537ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
11538if test "x$ac_cv_type_ino_t" = xyes; then :
11539
11540else
11541
11542cat >>confdefs.h <<_ACEOF
11543#define ino_t long
11544_ACEOF
11545
11546fi
11547
11548ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
11549if test "x$ac_cv_type_dev_t" = xyes; then :
11550
11551else
11552
11553cat >>confdefs.h <<_ACEOF
11554#define dev_t unsigned
11555_ACEOF
11556
11557fi
11558
11559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11560$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11561if ${ac_cv_c_bigendian+:} false; then :
11562  $as_echo_n "(cached) " >&6
11563else
11564  ac_cv_c_bigendian=unknown
11565    # See if we're dealing with a universal compiler.
11566    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11567/* end confdefs.h.  */
11568#ifndef __APPLE_CC__
11569	       not a universal capable compiler
11570	     #endif
11571	     typedef int dummy;
11572
11573_ACEOF
11574if ac_fn_c_try_compile "$LINENO"; then :
11575
11576	# Check for potential -arch flags.  It is not universal unless
11577	# there are at least two -arch flags with different values.
11578	ac_arch=
11579	ac_prev=
11580	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11581	 if test -n "$ac_prev"; then
11582	   case $ac_word in
11583	     i?86 | x86_64 | ppc | ppc64)
11584	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11585		 ac_arch=$ac_word
11586	       else
11587		 ac_cv_c_bigendian=universal
11588		 break
11589	       fi
11590	       ;;
11591	   esac
11592	   ac_prev=
11593	 elif test "x$ac_word" = "x-arch"; then
11594	   ac_prev=arch
11595	 fi
11596       done
11597fi
11598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11599    if test $ac_cv_c_bigendian = unknown; then
11600      # See if sys/param.h defines the BYTE_ORDER macro.
11601      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11602/* end confdefs.h.  */
11603#include <sys/types.h>
11604	     #include <sys/param.h>
11605
11606int
11607main ()
11608{
11609#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11610		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11611		     && LITTLE_ENDIAN)
11612	      bogus endian macros
11613	     #endif
11614
11615  ;
11616  return 0;
11617}
11618_ACEOF
11619if ac_fn_c_try_compile "$LINENO"; then :
11620  # It does; now see whether it defined to BIG_ENDIAN or not.
11621	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11622/* end confdefs.h.  */
11623#include <sys/types.h>
11624		#include <sys/param.h>
11625
11626int
11627main ()
11628{
11629#if BYTE_ORDER != BIG_ENDIAN
11630		 not big endian
11631		#endif
11632
11633  ;
11634  return 0;
11635}
11636_ACEOF
11637if ac_fn_c_try_compile "$LINENO"; then :
11638  ac_cv_c_bigendian=yes
11639else
11640  ac_cv_c_bigendian=no
11641fi
11642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11643fi
11644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11645    fi
11646    if test $ac_cv_c_bigendian = unknown; then
11647      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11648      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649/* end confdefs.h.  */
11650#include <limits.h>
11651
11652int
11653main ()
11654{
11655#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11656	      bogus endian macros
11657	     #endif
11658
11659  ;
11660  return 0;
11661}
11662_ACEOF
11663if ac_fn_c_try_compile "$LINENO"; then :
11664  # It does; now see whether it defined to _BIG_ENDIAN or not.
11665	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11666/* end confdefs.h.  */
11667#include <limits.h>
11668
11669int
11670main ()
11671{
11672#ifndef _BIG_ENDIAN
11673		 not big endian
11674		#endif
11675
11676  ;
11677  return 0;
11678}
11679_ACEOF
11680if ac_fn_c_try_compile "$LINENO"; then :
11681  ac_cv_c_bigendian=yes
11682else
11683  ac_cv_c_bigendian=no
11684fi
11685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11686fi
11687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11688    fi
11689    if test $ac_cv_c_bigendian = unknown; then
11690      # Compile a test program.
11691      if test "$cross_compiling" = yes; then :
11692  # Try to guess by grepping values from an object file.
11693	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11694/* end confdefs.h.  */
11695short int ascii_mm[] =
11696		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11697		short int ascii_ii[] =
11698		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11699		int use_ascii (int i) {
11700		  return ascii_mm[i] + ascii_ii[i];
11701		}
11702		short int ebcdic_ii[] =
11703		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11704		short int ebcdic_mm[] =
11705		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11706		int use_ebcdic (int i) {
11707		  return ebcdic_mm[i] + ebcdic_ii[i];
11708		}
11709		extern int foo;
11710
11711int
11712main ()
11713{
11714return use_ascii (foo) == use_ebcdic (foo);
11715  ;
11716  return 0;
11717}
11718_ACEOF
11719if ac_fn_c_try_compile "$LINENO"; then :
11720  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11721	      ac_cv_c_bigendian=yes
11722	    fi
11723	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11724	      if test "$ac_cv_c_bigendian" = unknown; then
11725		ac_cv_c_bigendian=no
11726	      else
11727		# finding both strings is unlikely to happen, but who knows?
11728		ac_cv_c_bigendian=unknown
11729	      fi
11730	    fi
11731fi
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11733else
11734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11735/* end confdefs.h.  */
11736$ac_includes_default
11737int
11738main ()
11739{
11740
11741	     /* Are we little or big endian?  From Harbison&Steele.  */
11742	     union
11743	     {
11744	       long int l;
11745	       char c[sizeof (long int)];
11746	     } u;
11747	     u.l = 1;
11748	     return u.c[sizeof (long int) - 1] == 1;
11749
11750  ;
11751  return 0;
11752}
11753_ACEOF
11754if ac_fn_c_try_run "$LINENO"; then :
11755  ac_cv_c_bigendian=no
11756else
11757  ac_cv_c_bigendian=yes
11758fi
11759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11760  conftest.$ac_objext conftest.beam conftest.$ac_ext
11761fi
11762
11763    fi
11764fi
11765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11766$as_echo "$ac_cv_c_bigendian" >&6; }
11767 case $ac_cv_c_bigendian in #(
11768   yes)
11769     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11770;; #(
11771   no)
11772      ;; #(
11773   universal)
11774
11775$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11776
11777     ;; #(
11778   *)
11779     as_fn_error $? "unknown endianness
11780 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11781 esac
11782
11783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11784$as_echo_n "checking for inline... " >&6; }
11785if ${ac_cv_c_inline+:} false; then :
11786  $as_echo_n "(cached) " >&6
11787else
11788  ac_cv_c_inline=no
11789for ac_kw in inline __inline__ __inline; do
11790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11791/* end confdefs.h.  */
11792#ifndef __cplusplus
11793typedef int foo_t;
11794static $ac_kw foo_t static_foo () {return 0; }
11795$ac_kw foo_t foo () {return 0; }
11796#endif
11797
11798_ACEOF
11799if ac_fn_c_try_compile "$LINENO"; then :
11800  ac_cv_c_inline=$ac_kw
11801fi
11802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11803  test "$ac_cv_c_inline" != no && break
11804done
11805
11806fi
11807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11808$as_echo "$ac_cv_c_inline" >&6; }
11809
11810case $ac_cv_c_inline in
11811  inline | yes) ;;
11812  *)
11813    case $ac_cv_c_inline in
11814      no) ac_val=;;
11815      *) ac_val=$ac_cv_c_inline;;
11816    esac
11817    cat >>confdefs.h <<_ACEOF
11818#ifndef __cplusplus
11819#define inline $ac_val
11820#endif
11821_ACEOF
11822    ;;
11823esac
11824
11825
11826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
11827$as_echo_n "checking for rlim_t... " >&6; }
11828if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
11829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
11830$as_echo "(cached) $ac_cv_type_rlim_t" >&6; }
11831else
11832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11833/* end confdefs.h.  */
11834
11835#include <sys/types.h>
11836#if STDC_HEADERS
11837# include <stdlib.h>
11838# include <stddef.h>
11839#endif
11840#ifdef HAVE_SYS_RESOURCE_H
11841# include <sys/resource.h>
11842#endif
11843
11844_ACEOF
11845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11846  $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then :
11847  ac_cv_type_rlim_t=yes
11848else
11849  ac_cv_type_rlim_t=no
11850fi
11851rm -f conftest*
11852
11853	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
11854$as_echo "$ac_cv_type_rlim_t" >&6; }
11855fi
11856if test $ac_cv_type_rlim_t = no; then
11857  cat >> confdefs.h <<\EOF
11858#define rlim_t unsigned long
11859EOF
11860fi
11861
11862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
11863$as_echo_n "checking for stack_t... " >&6; }
11864if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
11865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
11866$as_echo "(cached) $ac_cv_type_stack_t" >&6; }
11867else
11868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11869/* end confdefs.h.  */
11870
11871#include <sys/types.h>
11872#if STDC_HEADERS
11873# include <stdlib.h>
11874# include <stddef.h>
11875#endif
11876#include <signal.h>
11877
11878_ACEOF
11879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11880  $EGREP "stack_t" >/dev/null 2>&1; then :
11881  ac_cv_type_stack_t=yes
11882else
11883  ac_cv_type_stack_t=no
11884fi
11885rm -f conftest*
11886
11887	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
11888$as_echo "$ac_cv_type_stack_t" >&6; }
11889fi
11890if test $ac_cv_type_stack_t = no; then
11891  cat >> confdefs.h <<\EOF
11892#define stack_t struct sigaltstack
11893EOF
11894fi
11895
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
11897$as_echo_n "checking whether stack_t has an ss_base field... " >&6; }
11898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11899/* end confdefs.h.  */
11900
11901#include <sys/types.h>
11902#if STDC_HEADERS
11903# include <stdlib.h>
11904# include <stddef.h>
11905#endif
11906#include <signal.h>
11907#include "confdefs.h"
11908
11909int
11910main ()
11911{
11912stack_t sigstk; sigstk.ss_base = 0;
11913  ;
11914  return 0;
11915}
11916_ACEOF
11917if ac_fn_c_try_compile "$LINENO"; then :
11918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11919$as_echo "yes" >&6; }; $as_echo "#define HAVE_SS_BASE 1" >>confdefs.h
11920
11921else
11922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11923$as_echo "no" >&6; }
11924fi
11925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11926
11927olibs="$LIBS"
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
11929$as_echo_n "checking --with-tlib argument... " >&6; }
11930
11931# Check whether --with-tlib was given.
11932if test "${with_tlib+set}" = set; then :
11933  withval=$with_tlib;
11934fi
11935
11936if test -n "$with_tlib"; then
11937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
11938$as_echo "$with_tlib" >&6; }
11939  LIBS="$LIBS -l$with_tlib"
11940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
11941$as_echo_n "checking for linking with $with_tlib library... " >&6; }
11942  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11943/* end confdefs.h.  */
11944
11945int
11946main ()
11947{
11948
11949  ;
11950  return 0;
11951}
11952_ACEOF
11953if ac_fn_c_try_link "$LINENO"; then :
11954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
11955$as_echo "OK" >&6; }
11956else
11957  as_fn_error $? "FAILED" "$LINENO" 5
11958fi
11959rm -f core conftest.err conftest.$ac_objext \
11960    conftest$ac_exeext conftest.$ac_ext
11961    olibs="$LIBS"
11962else
11963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
11964$as_echo "empty: automatic terminal library selection" >&6; }
11965                case "`uname -s 2>/dev/null`" in
11966	OSF1|SCO_SV)	tlibs="tinfo ncurses curses termlib termcap";;
11967	*)	tlibs="tinfo ncurses termlib termcap curses";;
11968  esac
11969  for libname in $tlibs; do
11970    as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh`
11971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
11972$as_echo_n "checking for tgetent in -l${libname}... " >&6; }
11973if eval \${$as_ac_Lib+:} false; then :
11974  $as_echo_n "(cached) " >&6
11975else
11976  ac_check_lib_save_LIBS=$LIBS
11977LIBS="-l${libname}  $LIBS"
11978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11979/* end confdefs.h.  */
11980
11981/* Override any GCC internal prototype to avoid an error.
11982   Use char because int might match the return type of a GCC
11983   builtin and then its argument prototype would still apply.  */
11984#ifdef __cplusplus
11985extern "C"
11986#endif
11987char tgetent ();
11988int
11989main ()
11990{
11991return tgetent ();
11992  ;
11993  return 0;
11994}
11995_ACEOF
11996if ac_fn_c_try_link "$LINENO"; then :
11997  eval "$as_ac_Lib=yes"
11998else
11999  eval "$as_ac_Lib=no"
12000fi
12001rm -f core conftest.err conftest.$ac_objext \
12002    conftest$ac_exeext conftest.$ac_ext
12003LIBS=$ac_check_lib_save_LIBS
12004fi
12005eval ac_res=\$$as_ac_Lib
12006	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12007$as_echo "$ac_res" >&6; }
12008if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
12009  cat >>confdefs.h <<_ACEOF
12010#define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
12011_ACEOF
12012
12013  LIBS="-l${libname} $LIBS"
12014
12015fi
12016
12017    if test "x$olibs" != "x$LIBS"; then
12018                        if test "$cross_compiling" = yes; then :
12019  res="FAIL"
12020else
12021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12022/* end confdefs.h.  */
12023
12024#ifdef HAVE_TERMCAP_H
12025# include <termcap.h>
12026#endif
12027#if STDC_HEADERS
12028# include <stdlib.h>
12029# include <stddef.h>
12030#endif
12031main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
12032_ACEOF
12033if ac_fn_c_try_run "$LINENO"; then :
12034  res="OK"
12035else
12036  res="FAIL"
12037fi
12038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12039  conftest.$ac_objext conftest.beam conftest.$ac_ext
12040fi
12041
12042      if test "$res" = "OK"; then
12043	break
12044      fi
12045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12046$as_echo "$libname library is not usable" >&6; }
12047      LIBS="$olibs"
12048    fi
12049  done
12050  if test "x$olibs" = "x$LIBS"; then
12051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12052$as_echo "no terminal library found" >&6; }
12053  fi
12054fi
12055
12056if test "x$olibs" = "x$LIBS"; then
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12058$as_echo_n "checking for tgetent()... " >&6; }
12059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12060/* end confdefs.h.  */
12061
12062int
12063main ()
12064{
12065char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
12066  ;
12067  return 0;
12068}
12069_ACEOF
12070if ac_fn_c_try_link "$LINENO"; then :
12071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12072$as_echo "yes" >&6; }
12073else
12074  as_fn_error $? "NOT FOUND!
12075      You need to install a terminal library; for example ncurses.
12076      Or specify the name of the library with --with-tlib." "$LINENO" 5
12077fi
12078rm -f core conftest.err conftest.$ac_objext \
12079    conftest$ac_exeext conftest.$ac_ext
12080fi
12081
12082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12083$as_echo_n "checking whether we talk terminfo... " >&6; }
12084if ${vim_cv_terminfo+:} false; then :
12085  $as_echo_n "(cached) " >&6
12086else
12087
12088    if test "$cross_compiling" = yes; then :
12089
12090      as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
12091
12092else
12093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12094/* end confdefs.h.  */
12095
12096#include "confdefs.h"
12097#ifdef HAVE_TERMCAP_H
12098# include <termcap.h>
12099#endif
12100#ifdef HAVE_STRING_H
12101# include <string.h>
12102#endif
12103#if STDC_HEADERS
12104# include <stdlib.h>
12105# include <stddef.h>
12106#endif
12107main()
12108{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
12109
12110_ACEOF
12111if ac_fn_c_try_run "$LINENO"; then :
12112
12113      vim_cv_terminfo=no
12114
12115else
12116
12117      vim_cv_terminfo=yes
12118
12119fi
12120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12121  conftest.$ac_objext conftest.beam conftest.$ac_ext
12122fi
12123
12124
12125fi
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12127$as_echo "$vim_cv_terminfo" >&6; }
12128
12129if test "x$vim_cv_terminfo" = "xyes" ; then
12130  $as_echo "#define TERMINFO 1" >>confdefs.h
12131
12132fi
12133
12134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12135$as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
12136if ${vim_cv_tgetent+:} false; then :
12137  $as_echo_n "(cached) " >&6
12138else
12139
12140    if test "$cross_compiling" = yes; then :
12141
12142      as_fn_error $? "failed to compile test program." "$LINENO" 5
12143
12144else
12145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12146/* end confdefs.h.  */
12147
12148#include "confdefs.h"
12149#ifdef HAVE_TERMCAP_H
12150# include <termcap.h>
12151#endif
12152#if STDC_HEADERS
12153# include <stdlib.h>
12154# include <stddef.h>
12155#endif
12156main()
12157{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
12158
12159_ACEOF
12160if ac_fn_c_try_run "$LINENO"; then :
12161
12162      vim_cv_tgetent=zero
12163
12164else
12165
12166      vim_cv_tgetent=non-zero
12167
12168fi
12169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12170  conftest.$ac_objext conftest.beam conftest.$ac_ext
12171fi
12172
12173
12174fi
12175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12176$as_echo "$vim_cv_tgetent" >&6; }
12177
12178if test "x$vim_cv_tgetent" = "xzero" ; then
12179  $as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h
12180
12181fi
12182
12183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12184$as_echo_n "checking whether termcap.h contains ospeed... " >&6; }
12185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186/* end confdefs.h.  */
12187
12188#ifdef HAVE_TERMCAP_H
12189# include <termcap.h>
12190#endif
12191
12192int
12193main ()
12194{
12195ospeed = 20000
12196  ;
12197  return 0;
12198}
12199_ACEOF
12200if ac_fn_c_try_link "$LINENO"; then :
12201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12202$as_echo "yes" >&6; }; $as_echo "#define HAVE_OSPEED 1" >>confdefs.h
12203
12204else
12205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12206$as_echo "no" >&6; }
12207	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12208$as_echo_n "checking whether ospeed can be extern... " >&6; }
12209	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12210/* end confdefs.h.  */
12211
12212#ifdef HAVE_TERMCAP_H
12213# include <termcap.h>
12214#endif
12215extern short ospeed;
12216
12217int
12218main ()
12219{
12220ospeed = 20000
12221  ;
12222  return 0;
12223}
12224_ACEOF
12225if ac_fn_c_try_link "$LINENO"; then :
12226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12227$as_echo "yes" >&6; }; $as_echo "#define OSPEED_EXTERN 1" >>confdefs.h
12228
12229else
12230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12231$as_echo "no" >&6; }
12232fi
12233rm -f core conftest.err conftest.$ac_objext \
12234    conftest$ac_exeext conftest.$ac_ext
12235
12236fi
12237rm -f core conftest.err conftest.$ac_objext \
12238    conftest$ac_exeext conftest.$ac_ext
12239
12240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
12241$as_echo_n "checking whether termcap.h contains UP, BC and PC... " >&6; }
12242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243/* end confdefs.h.  */
12244
12245#ifdef HAVE_TERMCAP_H
12246# include <termcap.h>
12247#endif
12248
12249int
12250main ()
12251{
12252if (UP == 0 && BC == 0) PC = 1
12253  ;
12254  return 0;
12255}
12256_ACEOF
12257if ac_fn_c_try_link "$LINENO"; then :
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12259$as_echo "yes" >&6; }; $as_echo "#define HAVE_UP_BC_PC 1" >>confdefs.h
12260
12261else
12262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12263$as_echo "no" >&6; }
12264	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
12265$as_echo_n "checking whether UP, BC and PC can be extern... " >&6; }
12266	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12267/* end confdefs.h.  */
12268
12269#ifdef HAVE_TERMCAP_H
12270# include <termcap.h>
12271#endif
12272extern char *UP, *BC, PC;
12273
12274int
12275main ()
12276{
12277if (UP == 0 && BC == 0) PC = 1
12278  ;
12279  return 0;
12280}
12281_ACEOF
12282if ac_fn_c_try_link "$LINENO"; then :
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12284$as_echo "yes" >&6; }; $as_echo "#define UP_BC_PC_EXTERN 1" >>confdefs.h
12285
12286else
12287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12288$as_echo "no" >&6; }
12289fi
12290rm -f core conftest.err conftest.$ac_objext \
12291    conftest$ac_exeext conftest.$ac_ext
12292
12293fi
12294rm -f core conftest.err conftest.$ac_objext \
12295    conftest$ac_exeext conftest.$ac_ext
12296
12297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
12298$as_echo_n "checking whether tputs() uses outfuntype... " >&6; }
12299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12300/* end confdefs.h.  */
12301
12302#ifdef HAVE_TERMCAP_H
12303# include <termcap.h>
12304#endif
12305
12306int
12307main ()
12308{
12309extern int xx(); tputs("test", 1, (outfuntype)xx)
12310  ;
12311  return 0;
12312}
12313_ACEOF
12314if ac_fn_c_try_compile "$LINENO"; then :
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12316$as_echo "yes" >&6; }; $as_echo "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
12317
12318else
12319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12320$as_echo "no" >&6; }
12321fi
12322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12323
12324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12325$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12327/* end confdefs.h.  */
12328
12329#include <sys/types.h>
12330#include <sys/time.h>
12331#include <sys/select.h>
12332int
12333main ()
12334{
12335
12336  ;
12337  return 0;
12338}
12339_ACEOF
12340if ac_fn_c_try_compile "$LINENO"; then :
12341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12342$as_echo "yes" >&6; }
12343			$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
12344
12345else
12346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
12348fi
12349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12350
12351
12352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
12353$as_echo_n "checking for /dev/ptc... " >&6; }
12354if test -r /dev/ptc; then
12355  $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
12356
12357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12358$as_echo "yes" >&6; }
12359else
12360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361$as_echo "no" >&6; }
12362fi
12363
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
12365$as_echo_n "checking for SVR4 ptys... " >&6; }
12366if test -c /dev/ptmx ; then
12367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12368/* end confdefs.h.  */
12369
12370int
12371main ()
12372{
12373ptsname(0);grantpt(0);unlockpt(0);
12374  ;
12375  return 0;
12376}
12377_ACEOF
12378if ac_fn_c_try_link "$LINENO"; then :
12379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12380$as_echo "yes" >&6; }; $as_echo "#define HAVE_SVR4_PTYS 1" >>confdefs.h
12381
12382else
12383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12384$as_echo "no" >&6; }
12385fi
12386rm -f core conftest.err conftest.$ac_objext \
12387    conftest$ac_exeext conftest.$ac_ext
12388else
12389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12390$as_echo "no" >&6; }
12391fi
12392
12393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
12394$as_echo_n "checking for ptyranges... " >&6; }
12395if test -d /dev/ptym ; then
12396  pdir='/dev/ptym'
12397else
12398  pdir='/dev'
12399fi
12400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12401/* end confdefs.h.  */
12402#ifdef M_UNIX
12403   yes;
12404#endif
12405
12406_ACEOF
12407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12408  $EGREP "yes" >/dev/null 2>&1; then :
12409  ptys=`echo /dev/ptyp??`
12410else
12411  ptys=`echo $pdir/pty??`
12412fi
12413rm -f conftest*
12414
12415if test "$ptys" != "$pdir/pty??" ; then
12416  p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
12417  p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\012'`
12418  cat >>confdefs.h <<_ACEOF
12419#define PTYRANGE0 "$p0"
12420_ACEOF
12421
12422  cat >>confdefs.h <<_ACEOF
12423#define PTYRANGE1 "$p1"
12424_ACEOF
12425
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
12427$as_echo "$p0 / $p1" >&6; }
12428else
12429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
12430$as_echo "don't know" >&6; }
12431fi
12432
12433rm -f conftest_grp
12434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5
12435$as_echo_n "checking default tty permissions/group... " >&6; }
12436if ${vim_cv_tty_group+:} false; then :
12437  $as_echo_n "(cached) " >&6
12438else
12439
12440    if test "$cross_compiling" = yes; then :
12441
12442      as_fn_error $? "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5
12443
12444else
12445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446/* end confdefs.h.  */
12447
12448#include "confdefs.h"
12449#include <sys/types.h>
12450#if STDC_HEADERS
12451# include <stdlib.h>
12452# include <stddef.h>
12453#endif
12454#ifdef HAVE_UNISTD_H
12455#include <unistd.h>
12456#endif
12457#include <sys/stat.h>
12458#include <stdio.h>
12459main()
12460{
12461  struct stat sb;
12462  char *x,*ttyname();
12463  int om, m;
12464  FILE *fp;
12465
12466  if (!(x = ttyname(0))) exit(1);
12467  if (stat(x, &sb)) exit(1);
12468  om = sb.st_mode;
12469  if (om & 002) exit(0);
12470  m = system("mesg y");
12471  if (m == -1 || m == 127) exit(1);
12472  if (stat(x, &sb)) exit(1);
12473  m = sb.st_mode;
12474  if (chmod(x, om)) exit(1);
12475  if (m & 002) exit(0);
12476  if (sb.st_gid == getgid()) exit(1);
12477  if (!(fp=fopen("conftest_grp", "w")))
12478    exit(1);
12479  fprintf(fp, "%d\n", sb.st_gid);
12480  fclose(fp);
12481  exit(0);
12482}
12483
12484_ACEOF
12485if ac_fn_c_try_run "$LINENO"; then :
12486
12487      if test -f conftest_grp; then
12488	vim_cv_tty_group=`cat conftest_grp`
12489	if test "x$vim_cv_tty_mode" = "x" ; then
12490	  vim_cv_tty_mode=0620
12491	fi
12492	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&5
12493$as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; }
12494      else
12495	vim_cv_tty_group=world
12496	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ptys are world accessible" >&5
12497$as_echo "ptys are world accessible" >&6; }
12498      fi
12499
12500else
12501
12502      vim_cv_tty_group=world
12503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't determine - assume ptys are world accessible" >&5
12504$as_echo "can't determine - assume ptys are world accessible" >&6; }
12505
12506fi
12507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12508  conftest.$ac_objext conftest.beam conftest.$ac_ext
12509fi
12510
12511
12512fi
12513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tty_group" >&5
12514$as_echo "$vim_cv_tty_group" >&6; }
12515rm -f conftest_grp
12516
12517if test "x$vim_cv_tty_group" != "xworld" ; then
12518  cat >>confdefs.h <<_ACEOF
12519#define PTYGROUP $vim_cv_tty_group
12520_ACEOF
12521
12522  if test "x$vim_cv_tty_mode" = "x" ; then
12523    as_fn_error $? "It seems you're cross compiling and have 'vim_cv_tty_group' set, please also set the environment variable 'vim_cv_tty_mode' to the correct mode (probably 0620)" "$LINENO" 5
12524  else
12525    $as_echo "#define PTYMODE 0620" >>confdefs.h
12526
12527  fi
12528fi
12529
12530
12531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
12532$as_echo_n "checking return type of signal handlers... " >&6; }
12533if ${ac_cv_type_signal+:} false; then :
12534  $as_echo_n "(cached) " >&6
12535else
12536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12537/* end confdefs.h.  */
12538#include <sys/types.h>
12539#include <signal.h>
12540
12541int
12542main ()
12543{
12544return *(signal (0, 0)) (0) == 1;
12545  ;
12546  return 0;
12547}
12548_ACEOF
12549if ac_fn_c_try_compile "$LINENO"; then :
12550  ac_cv_type_signal=int
12551else
12552  ac_cv_type_signal=void
12553fi
12554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12555fi
12556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
12557$as_echo "$ac_cv_type_signal" >&6; }
12558
12559cat >>confdefs.h <<_ACEOF
12560#define RETSIGTYPE $ac_cv_type_signal
12561_ACEOF
12562
12563
12564
12565if test $ac_cv_type_signal = void; then
12566  $as_echo "#define SIGRETURN return" >>confdefs.h
12567
12568else
12569  $as_echo "#define SIGRETURN return 0" >>confdefs.h
12570
12571fi
12572
12573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
12574$as_echo_n "checking for struct sigcontext... " >&6; }
12575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12576/* end confdefs.h.  */
12577
12578#include <signal.h>
12579test_sig()
12580{
12581    struct sigcontext *scont;
12582    scont = (struct sigcontext *)0;
12583    return 1;
12584}
12585int
12586main ()
12587{
12588
12589  ;
12590  return 0;
12591}
12592_ACEOF
12593if ac_fn_c_try_compile "$LINENO"; then :
12594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12595$as_echo "yes" >&6; }
12596		$as_echo "#define HAVE_SIGCONTEXT 1" >>confdefs.h
12597
12598else
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600$as_echo "no" >&6; }
12601fi
12602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12603
12604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
12605$as_echo_n "checking getcwd implementation is broken... " >&6; }
12606if ${vim_cv_getcwd_broken+:} false; then :
12607  $as_echo_n "(cached) " >&6
12608else
12609
12610    if test "$cross_compiling" = yes; then :
12611
12612      as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
12613
12614else
12615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12616/* end confdefs.h.  */
12617
12618#include "confdefs.h"
12619#ifdef HAVE_UNISTD_H
12620#include <unistd.h>
12621#endif
12622char *dagger[] = { "IFS=pwd", 0 };
12623main()
12624{
12625  char buffer[500];
12626  extern char **environ;
12627  environ = dagger;
12628  return getcwd(buffer, 500) ? 0 : 1;
12629}
12630
12631_ACEOF
12632if ac_fn_c_try_run "$LINENO"; then :
12633
12634      vim_cv_getcwd_broken=no
12635
12636else
12637
12638      vim_cv_getcwd_broken=yes
12639
12640fi
12641rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12642  conftest.$ac_objext conftest.beam conftest.$ac_ext
12643fi
12644
12645
12646fi
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
12648$as_echo "$vim_cv_getcwd_broken" >&6; }
12649
12650if test "x$vim_cv_getcwd_broken" = "xyes" ; then
12651  $as_echo "#define BAD_GETCWD 1" >>confdefs.h
12652
12653fi
12654
12655for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
12656	getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
12657	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
12658	getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
12659	sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
12660	strnicmp strpbrk strtol tgetent towlower towupper iswupper \
12661	usleep utime utimes mblen ftruncate unsetenv posix_openpt
12662do :
12663  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12664ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12665if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12666  cat >>confdefs.h <<_ACEOF
12667#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12668_ACEOF
12669
12670fi
12671done
12672
12673for ac_header in sys/select.h sys/socket.h
12674do :
12675  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12676ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12677if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12678  cat >>confdefs.h <<_ACEOF
12679#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12680_ACEOF
12681
12682fi
12683
12684done
12685
12686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
12687$as_echo_n "checking types of arguments for select... " >&6; }
12688if ${ac_cv_func_select_args+:} false; then :
12689  $as_echo_n "(cached) " >&6
12690else
12691  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
12692 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
12693  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
12694   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12695/* end confdefs.h.  */
12696$ac_includes_default
12697#ifdef HAVE_SYS_SELECT_H
12698# include <sys/select.h>
12699#endif
12700#ifdef HAVE_SYS_SOCKET_H
12701# include <sys/socket.h>
12702#endif
12703
12704int
12705main ()
12706{
12707extern int select ($ac_arg1,
12708					    $ac_arg234, $ac_arg234, $ac_arg234,
12709					    $ac_arg5);
12710  ;
12711  return 0;
12712}
12713_ACEOF
12714if ac_fn_c_try_compile "$LINENO"; then :
12715  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
12716fi
12717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12718  done
12719 done
12720done
12721# Provide a safe default value.
12722: "${ac_cv_func_select_args=int,int *,struct timeval *}"
12723
12724fi
12725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
12726$as_echo "$ac_cv_func_select_args" >&6; }
12727ac_save_IFS=$IFS; IFS=','
12728set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
12729IFS=$ac_save_IFS
12730shift
12731
12732cat >>confdefs.h <<_ACEOF
12733#define SELECT_TYPE_ARG1 $1
12734_ACEOF
12735
12736
12737cat >>confdefs.h <<_ACEOF
12738#define SELECT_TYPE_ARG234 ($2)
12739_ACEOF
12740
12741
12742cat >>confdefs.h <<_ACEOF
12743#define SELECT_TYPE_ARG5 ($3)
12744_ACEOF
12745
12746rm -f conftest*
12747
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12749$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12750if ${ac_cv_sys_largefile_source+:} false; then :
12751  $as_echo_n "(cached) " >&6
12752else
12753  while :; do
12754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12755/* end confdefs.h.  */
12756#include <sys/types.h> /* for off_t */
12757     #include <stdio.h>
12758int
12759main ()
12760{
12761int (*fp) (FILE *, off_t, int) = fseeko;
12762     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12763  ;
12764  return 0;
12765}
12766_ACEOF
12767if ac_fn_c_try_link "$LINENO"; then :
12768  ac_cv_sys_largefile_source=no; break
12769fi
12770rm -f core conftest.err conftest.$ac_objext \
12771    conftest$ac_exeext conftest.$ac_ext
12772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12773/* end confdefs.h.  */
12774#define _LARGEFILE_SOURCE 1
12775#include <sys/types.h> /* for off_t */
12776     #include <stdio.h>
12777int
12778main ()
12779{
12780int (*fp) (FILE *, off_t, int) = fseeko;
12781     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12782  ;
12783  return 0;
12784}
12785_ACEOF
12786if ac_fn_c_try_link "$LINENO"; then :
12787  ac_cv_sys_largefile_source=1; break
12788fi
12789rm -f core conftest.err conftest.$ac_objext \
12790    conftest$ac_exeext conftest.$ac_ext
12791  ac_cv_sys_largefile_source=unknown
12792  break
12793done
12794fi
12795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12796$as_echo "$ac_cv_sys_largefile_source" >&6; }
12797case $ac_cv_sys_largefile_source in #(
12798  no | unknown) ;;
12799  *)
12800cat >>confdefs.h <<_ACEOF
12801#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12802_ACEOF
12803;;
12804esac
12805rm -rf conftest*
12806
12807# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12808# in glibc 2.1.3, but that breaks too many other things.
12809# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12810if test $ac_cv_sys_largefile_source != unknown; then
12811
12812$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12813
12814fi
12815
12816
12817# Check whether --enable-largefile was given.
12818if test "${enable_largefile+set}" = set; then :
12819  enableval=$enable_largefile;
12820fi
12821
12822if test "$enable_largefile" != no; then
12823
12824  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12825$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12826if ${ac_cv_sys_largefile_CC+:} false; then :
12827  $as_echo_n "(cached) " >&6
12828else
12829  ac_cv_sys_largefile_CC=no
12830     if test "$GCC" != yes; then
12831       ac_save_CC=$CC
12832       while :; do
12833	 # IRIX 6.2 and later do not support large files by default,
12834	 # so use the C compiler's -n32 option if that helps.
12835	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12836/* end confdefs.h.  */
12837#include <sys/types.h>
12838 /* Check that off_t can represent 2**63 - 1 correctly.
12839    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12840    since some C++ compilers masquerading as C compilers
12841    incorrectly reject 9223372036854775807.  */
12842#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12843  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12844		       && LARGE_OFF_T % 2147483647 == 1)
12845		      ? 1 : -1];
12846int
12847main ()
12848{
12849
12850  ;
12851  return 0;
12852}
12853_ACEOF
12854	 if ac_fn_c_try_compile "$LINENO"; then :
12855  break
12856fi
12857rm -f core conftest.err conftest.$ac_objext
12858	 CC="$CC -n32"
12859	 if ac_fn_c_try_compile "$LINENO"; then :
12860  ac_cv_sys_largefile_CC=' -n32'; break
12861fi
12862rm -f core conftest.err conftest.$ac_objext
12863	 break
12864       done
12865       CC=$ac_save_CC
12866       rm -f conftest.$ac_ext
12867    fi
12868fi
12869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12870$as_echo "$ac_cv_sys_largefile_CC" >&6; }
12871  if test "$ac_cv_sys_largefile_CC" != no; then
12872    CC=$CC$ac_cv_sys_largefile_CC
12873  fi
12874
12875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12876$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12877if ${ac_cv_sys_file_offset_bits+:} false; then :
12878  $as_echo_n "(cached) " >&6
12879else
12880  while :; do
12881  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12882/* end confdefs.h.  */
12883#include <sys/types.h>
12884 /* Check that off_t can represent 2**63 - 1 correctly.
12885    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12886    since some C++ compilers masquerading as C compilers
12887    incorrectly reject 9223372036854775807.  */
12888#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12889  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12890		       && LARGE_OFF_T % 2147483647 == 1)
12891		      ? 1 : -1];
12892int
12893main ()
12894{
12895
12896  ;
12897  return 0;
12898}
12899_ACEOF
12900if ac_fn_c_try_compile "$LINENO"; then :
12901  ac_cv_sys_file_offset_bits=no; break
12902fi
12903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12905/* end confdefs.h.  */
12906#define _FILE_OFFSET_BITS 64
12907#include <sys/types.h>
12908 /* Check that off_t can represent 2**63 - 1 correctly.
12909    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12910    since some C++ compilers masquerading as C compilers
12911    incorrectly reject 9223372036854775807.  */
12912#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12913  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12914		       && LARGE_OFF_T % 2147483647 == 1)
12915		      ? 1 : -1];
12916int
12917main ()
12918{
12919
12920  ;
12921  return 0;
12922}
12923_ACEOF
12924if ac_fn_c_try_compile "$LINENO"; then :
12925  ac_cv_sys_file_offset_bits=64; break
12926fi
12927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12928  ac_cv_sys_file_offset_bits=unknown
12929  break
12930done
12931fi
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12933$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12934case $ac_cv_sys_file_offset_bits in #(
12935  no | unknown) ;;
12936  *)
12937cat >>confdefs.h <<_ACEOF
12938#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12939_ACEOF
12940;;
12941esac
12942rm -rf conftest*
12943  if test $ac_cv_sys_file_offset_bits = unknown; then
12944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12945$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12946if ${ac_cv_sys_large_files+:} false; then :
12947  $as_echo_n "(cached) " >&6
12948else
12949  while :; do
12950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12951/* end confdefs.h.  */
12952#include <sys/types.h>
12953 /* Check that off_t can represent 2**63 - 1 correctly.
12954    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12955    since some C++ compilers masquerading as C compilers
12956    incorrectly reject 9223372036854775807.  */
12957#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12958  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12959		       && LARGE_OFF_T % 2147483647 == 1)
12960		      ? 1 : -1];
12961int
12962main ()
12963{
12964
12965  ;
12966  return 0;
12967}
12968_ACEOF
12969if ac_fn_c_try_compile "$LINENO"; then :
12970  ac_cv_sys_large_files=no; break
12971fi
12972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12973  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12974/* end confdefs.h.  */
12975#define _LARGE_FILES 1
12976#include <sys/types.h>
12977 /* Check that off_t can represent 2**63 - 1 correctly.
12978    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12979    since some C++ compilers masquerading as C compilers
12980    incorrectly reject 9223372036854775807.  */
12981#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12982  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12983		       && LARGE_OFF_T % 2147483647 == 1)
12984		      ? 1 : -1];
12985int
12986main ()
12987{
12988
12989  ;
12990  return 0;
12991}
12992_ACEOF
12993if ac_fn_c_try_compile "$LINENO"; then :
12994  ac_cv_sys_large_files=1; break
12995fi
12996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12997  ac_cv_sys_large_files=unknown
12998  break
12999done
13000fi
13001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13002$as_echo "$ac_cv_sys_large_files" >&6; }
13003case $ac_cv_sys_large_files in #(
13004  no | unknown) ;;
13005  *)
13006cat >>confdefs.h <<_ACEOF
13007#define _LARGE_FILES $ac_cv_sys_large_files
13008_ACEOF
13009;;
13010esac
13011rm -rf conftest*
13012  fi
13013
13014
13015fi
13016
13017
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
13019$as_echo_n "checking for st_blksize... " >&6; }
13020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13021/* end confdefs.h.  */
13022#include <sys/types.h>
13023#include <sys/stat.h>
13024int
13025main ()
13026{
13027	struct stat st;
13028	int n;
13029
13030	stat("/", &st);
13031	n = (int)st.st_blksize;
13032  ;
13033  return 0;
13034}
13035_ACEOF
13036if ac_fn_c_try_compile "$LINENO"; then :
13037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13038$as_echo "yes" >&6; }; $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
13039
13040else
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
13043fi
13044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13045
13046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
13047$as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
13048if ${vim_cv_stat_ignores_slash+:} false; then :
13049  $as_echo_n "(cached) " >&6
13050else
13051
13052    if test "$cross_compiling" = yes; then :
13053
13054      as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
13055
13056else
13057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13058/* end confdefs.h.  */
13059
13060#include "confdefs.h"
13061#if STDC_HEADERS
13062# include <stdlib.h>
13063# include <stddef.h>
13064#endif
13065#include <sys/types.h>
13066#include <sys/stat.h>
13067main() {struct stat st;  exit(stat("configure/", &st) != 0); }
13068
13069_ACEOF
13070if ac_fn_c_try_run "$LINENO"; then :
13071
13072      vim_cv_stat_ignores_slash=yes
13073
13074else
13075
13076      vim_cv_stat_ignores_slash=no
13077
13078fi
13079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13080  conftest.$ac_objext conftest.beam conftest.$ac_ext
13081fi
13082
13083
13084fi
13085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
13086$as_echo "$vim_cv_stat_ignores_slash" >&6; }
13087
13088if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
13089  $as_echo "#define STAT_IGNORES_SLASH 1" >>confdefs.h
13090
13091fi
13092
13093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
13094$as_echo_n "checking for iconv_open()... " >&6; }
13095save_LIBS="$LIBS"
13096LIBS="$LIBS -liconv"
13097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13098/* end confdefs.h.  */
13099
13100#ifdef HAVE_ICONV_H
13101# include <iconv.h>
13102#endif
13103
13104int
13105main ()
13106{
13107iconv_open("fr", "to");
13108  ;
13109  return 0;
13110}
13111_ACEOF
13112if ac_fn_c_try_link "$LINENO"; then :
13113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
13114$as_echo "yes; with -liconv" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
13115
13116else
13117  LIBS="$save_LIBS"
13118    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13119/* end confdefs.h.  */
13120
13121#ifdef HAVE_ICONV_H
13122# include <iconv.h>
13123#endif
13124
13125int
13126main ()
13127{
13128iconv_open("fr", "to");
13129  ;
13130  return 0;
13131}
13132_ACEOF
13133if ac_fn_c_try_link "$LINENO"; then :
13134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13135$as_echo "yes" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
13136
13137else
13138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13139$as_echo "no" >&6; }
13140fi
13141rm -f core conftest.err conftest.$ac_objext \
13142    conftest$ac_exeext conftest.$ac_ext
13143fi
13144rm -f core conftest.err conftest.$ac_objext \
13145    conftest$ac_exeext conftest.$ac_ext
13146
13147
13148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
13149$as_echo_n "checking for nl_langinfo(CODESET)... " >&6; }
13150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13151/* end confdefs.h.  */
13152
13153#ifdef HAVE_LANGINFO_H
13154# include <langinfo.h>
13155#endif
13156
13157int
13158main ()
13159{
13160char *cs = nl_langinfo(CODESET);
13161  ;
13162  return 0;
13163}
13164_ACEOF
13165if ac_fn_c_try_link "$LINENO"; then :
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13167$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
13168
13169else
13170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13171$as_echo "no" >&6; }
13172fi
13173rm -f core conftest.err conftest.$ac_objext \
13174    conftest$ac_exeext conftest.$ac_ext
13175
13176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
13177$as_echo_n "checking for strtod in -lm... " >&6; }
13178if ${ac_cv_lib_m_strtod+:} false; then :
13179  $as_echo_n "(cached) " >&6
13180else
13181  ac_check_lib_save_LIBS=$LIBS
13182LIBS="-lm  $LIBS"
13183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13184/* end confdefs.h.  */
13185
13186/* Override any GCC internal prototype to avoid an error.
13187   Use char because int might match the return type of a GCC
13188   builtin and then its argument prototype would still apply.  */
13189#ifdef __cplusplus
13190extern "C"
13191#endif
13192char strtod ();
13193int
13194main ()
13195{
13196return strtod ();
13197  ;
13198  return 0;
13199}
13200_ACEOF
13201if ac_fn_c_try_link "$LINENO"; then :
13202  ac_cv_lib_m_strtod=yes
13203else
13204  ac_cv_lib_m_strtod=no
13205fi
13206rm -f core conftest.err conftest.$ac_objext \
13207    conftest$ac_exeext conftest.$ac_ext
13208LIBS=$ac_check_lib_save_LIBS
13209fi
13210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
13211$as_echo "$ac_cv_lib_m_strtod" >&6; }
13212if test "x$ac_cv_lib_m_strtod" = xyes; then :
13213  cat >>confdefs.h <<_ACEOF
13214#define HAVE_LIBM 1
13215_ACEOF
13216
13217  LIBS="-lm $LIBS"
13218
13219fi
13220
13221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod() and other floating point functions" >&5
13222$as_echo_n "checking for strtod() and other floating point functions... " >&6; }
13223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224/* end confdefs.h.  */
13225
13226#ifdef HAVE_MATH_H
13227# include <math.h>
13228#endif
13229#if STDC_HEADERS
13230# include <stdlib.h>
13231# include <stddef.h>
13232#endif
13233
13234int
13235main ()
13236{
13237char *s; double d;
13238    d = strtod("1.1", &s);
13239    d = fabs(1.11);
13240    d = ceil(1.11);
13241    d = floor(1.11);
13242    d = log10(1.11);
13243    d = pow(1.11, 2.22);
13244    d = sqrt(1.11);
13245    d = sin(1.11);
13246    d = cos(1.11);
13247    d = atan(1.11);
13248
13249  ;
13250  return 0;
13251}
13252_ACEOF
13253if ac_fn_c_try_link "$LINENO"; then :
13254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13255$as_echo "yes" >&6; }; $as_echo "#define HAVE_FLOAT_FUNCS 1" >>confdefs.h
13256
13257else
13258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13259$as_echo "no" >&6; }
13260fi
13261rm -f core conftest.err conftest.$ac_objext \
13262    conftest$ac_exeext conftest.$ac_ext
13263
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
13265$as_echo_n "checking for isinf()... " >&6; }
13266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13267/* end confdefs.h.  */
13268
13269#ifdef HAVE_MATH_H
13270# include <math.h>
13271#endif
13272#if STDC_HEADERS
13273# include <stdlib.h>
13274# include <stddef.h>
13275#endif
13276
13277int
13278main ()
13279{
13280int r = isinf(1.11);
13281  ;
13282  return 0;
13283}
13284_ACEOF
13285if ac_fn_c_try_link "$LINENO"; then :
13286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13287$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13288
13289else
13290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291$as_echo "no" >&6; }
13292fi
13293rm -f core conftest.err conftest.$ac_objext \
13294    conftest$ac_exeext conftest.$ac_ext
13295
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
13297$as_echo_n "checking for isnan()... " >&6; }
13298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13299/* end confdefs.h.  */
13300
13301#ifdef HAVE_MATH_H
13302# include <math.h>
13303#endif
13304#if STDC_HEADERS
13305# include <stdlib.h>
13306# include <stddef.h>
13307#endif
13308
13309int
13310main ()
13311{
13312int r = isnan(1.11);
13313  ;
13314  return 0;
13315}
13316_ACEOF
13317if ac_fn_c_try_link "$LINENO"; then :
13318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13319$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
13320
13321else
13322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13323$as_echo "no" >&6; }
13324fi
13325rm -f core conftest.err conftest.$ac_objext \
13326    conftest$ac_exeext conftest.$ac_ext
13327
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
13329$as_echo_n "checking --disable-acl argument... " >&6; }
13330# Check whether --enable-acl was given.
13331if test "${enable_acl+set}" = set; then :
13332  enableval=$enable_acl;
13333else
13334  enable_acl="yes"
13335fi
13336
13337if test "$enable_acl" = "yes"; then
13338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13339$as_echo "no" >&6; }
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
13341$as_echo_n "checking for acl_get_file in -lposix1e... " >&6; }
13342if ${ac_cv_lib_posix1e_acl_get_file+:} false; then :
13343  $as_echo_n "(cached) " >&6
13344else
13345  ac_check_lib_save_LIBS=$LIBS
13346LIBS="-lposix1e  $LIBS"
13347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13348/* end confdefs.h.  */
13349
13350/* Override any GCC internal prototype to avoid an error.
13351   Use char because int might match the return type of a GCC
13352   builtin and then its argument prototype would still apply.  */
13353#ifdef __cplusplus
13354extern "C"
13355#endif
13356char acl_get_file ();
13357int
13358main ()
13359{
13360return acl_get_file ();
13361  ;
13362  return 0;
13363}
13364_ACEOF
13365if ac_fn_c_try_link "$LINENO"; then :
13366  ac_cv_lib_posix1e_acl_get_file=yes
13367else
13368  ac_cv_lib_posix1e_acl_get_file=no
13369fi
13370rm -f core conftest.err conftest.$ac_objext \
13371    conftest$ac_exeext conftest.$ac_ext
13372LIBS=$ac_check_lib_save_LIBS
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
13375$as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; }
13376if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes; then :
13377  LIBS="$LIBS -lposix1e"
13378else
13379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
13380$as_echo_n "checking for acl_get_file in -lacl... " >&6; }
13381if ${ac_cv_lib_acl_acl_get_file+:} false; then :
13382  $as_echo_n "(cached) " >&6
13383else
13384  ac_check_lib_save_LIBS=$LIBS
13385LIBS="-lacl  $LIBS"
13386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13387/* end confdefs.h.  */
13388
13389/* Override any GCC internal prototype to avoid an error.
13390   Use char because int might match the return type of a GCC
13391   builtin and then its argument prototype would still apply.  */
13392#ifdef __cplusplus
13393extern "C"
13394#endif
13395char acl_get_file ();
13396int
13397main ()
13398{
13399return acl_get_file ();
13400  ;
13401  return 0;
13402}
13403_ACEOF
13404if ac_fn_c_try_link "$LINENO"; then :
13405  ac_cv_lib_acl_acl_get_file=yes
13406else
13407  ac_cv_lib_acl_acl_get_file=no
13408fi
13409rm -f core conftest.err conftest.$ac_objext \
13410    conftest$ac_exeext conftest.$ac_ext
13411LIBS=$ac_check_lib_save_LIBS
13412fi
13413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
13414$as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
13415if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then :
13416  LIBS="$LIBS -lacl"
13417		  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
13418$as_echo_n "checking for fgetxattr in -lattr... " >&6; }
13419if ${ac_cv_lib_attr_fgetxattr+:} false; then :
13420  $as_echo_n "(cached) " >&6
13421else
13422  ac_check_lib_save_LIBS=$LIBS
13423LIBS="-lattr  $LIBS"
13424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425/* end confdefs.h.  */
13426
13427/* Override any GCC internal prototype to avoid an error.
13428   Use char because int might match the return type of a GCC
13429   builtin and then its argument prototype would still apply.  */
13430#ifdef __cplusplus
13431extern "C"
13432#endif
13433char fgetxattr ();
13434int
13435main ()
13436{
13437return fgetxattr ();
13438  ;
13439  return 0;
13440}
13441_ACEOF
13442if ac_fn_c_try_link "$LINENO"; then :
13443  ac_cv_lib_attr_fgetxattr=yes
13444else
13445  ac_cv_lib_attr_fgetxattr=no
13446fi
13447rm -f core conftest.err conftest.$ac_objext \
13448    conftest$ac_exeext conftest.$ac_ext
13449LIBS=$ac_check_lib_save_LIBS
13450fi
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
13452$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
13453if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
13454  LIBS="$LIBS -lattr"
13455fi
13456
13457fi
13458
13459fi
13460
13461
13462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
13463$as_echo_n "checking for POSIX ACL support... " >&6; }
13464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13465/* end confdefs.h.  */
13466
13467#include <sys/types.h>
13468#ifdef HAVE_SYS_ACL_H
13469# include <sys/acl.h>
13470#endif
13471acl_t acl;
13472int
13473main ()
13474{
13475acl = acl_get_file("foo", ACL_TYPE_ACCESS);
13476	acl_set_file("foo", ACL_TYPE_ACCESS, acl);
13477	acl_free(acl);
13478  ;
13479  return 0;
13480}
13481_ACEOF
13482if ac_fn_c_try_link "$LINENO"; then :
13483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13484$as_echo "yes" >&6; }; $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
13485
13486else
13487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13488$as_echo "no" >&6; }
13489fi
13490rm -f core conftest.err conftest.$ac_objext \
13491    conftest$ac_exeext conftest.$ac_ext
13492
13493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
13494$as_echo_n "checking for acl_get in -lsec... " >&6; }
13495if ${ac_cv_lib_sec_acl_get+:} false; then :
13496  $as_echo_n "(cached) " >&6
13497else
13498  ac_check_lib_save_LIBS=$LIBS
13499LIBS="-lsec  $LIBS"
13500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13501/* end confdefs.h.  */
13502
13503/* Override any GCC internal prototype to avoid an error.
13504   Use char because int might match the return type of a GCC
13505   builtin and then its argument prototype would still apply.  */
13506#ifdef __cplusplus
13507extern "C"
13508#endif
13509char acl_get ();
13510int
13511main ()
13512{
13513return acl_get ();
13514  ;
13515  return 0;
13516}
13517_ACEOF
13518if ac_fn_c_try_link "$LINENO"; then :
13519  ac_cv_lib_sec_acl_get=yes
13520else
13521  ac_cv_lib_sec_acl_get=no
13522fi
13523rm -f core conftest.err conftest.$ac_objext \
13524    conftest$ac_exeext conftest.$ac_ext
13525LIBS=$ac_check_lib_save_LIBS
13526fi
13527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
13528$as_echo "$ac_cv_lib_sec_acl_get" >&6; }
13529if test "x$ac_cv_lib_sec_acl_get" = xyes; then :
13530  LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
13531
13532else
13533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
13534$as_echo_n "checking for Solaris ACL support... " >&6; }
13535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13536/* end confdefs.h.  */
13537
13538#ifdef HAVE_SYS_ACL_H
13539# include <sys/acl.h>
13540#endif
13541int
13542main ()
13543{
13544acl("foo", GETACLCNT, 0, NULL);
13545
13546  ;
13547  return 0;
13548}
13549_ACEOF
13550if ac_fn_c_try_link "$LINENO"; then :
13551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13552$as_echo "yes" >&6; }; $as_echo "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
13553
13554else
13555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13556$as_echo "no" >&6; }
13557fi
13558rm -f core conftest.err conftest.$ac_objext \
13559    conftest$ac_exeext conftest.$ac_ext
13560fi
13561
13562
13563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
13564$as_echo_n "checking for AIX ACL support... " >&6; }
13565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13566/* end confdefs.h.  */
13567
13568#if STDC_HEADERS
13569# include <stdlib.h>
13570# include <stddef.h>
13571#endif
13572#ifdef HAVE_SYS_ACL_H
13573# include <sys/acl.h>
13574#endif
13575#ifdef HAVE_SYS_ACCESS_H
13576# include <sys/access.h>
13577#endif
13578#define _ALL_SOURCE
13579
13580#include <sys/stat.h>
13581
13582int aclsize;
13583struct acl *aclent;
13584int
13585main ()
13586{
13587aclsize = sizeof(struct acl);
13588	aclent = (void *)malloc(aclsize);
13589	statacl("foo", STX_NORMAL, aclent, aclsize);
13590
13591  ;
13592  return 0;
13593}
13594_ACEOF
13595if ac_fn_c_try_link "$LINENO"; then :
13596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13597$as_echo "yes" >&6; }; $as_echo "#define HAVE_AIX_ACL 1" >>confdefs.h
13598
13599else
13600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
13602fi
13603rm -f core conftest.err conftest.$ac_objext \
13604    conftest$ac_exeext conftest.$ac_ext
13605else
13606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13607$as_echo "yes" >&6; }
13608fi
13609
13610if test "x$GTK_CFLAGS" != "x"; then
13611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
13612$as_echo_n "checking for pango_shape_full... " >&6; }
13613  ac_save_CFLAGS="$CFLAGS"
13614  ac_save_LIBS="$LIBS"
13615  CFLAGS="$CFLAGS $GTK_CFLAGS"
13616  LIBS="$LIBS $GTK_LIBS"
13617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13618/* end confdefs.h.  */
13619#include <gtk/gtk.h>
13620int
13621main ()
13622{
13623 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
13624  ;
13625  return 0;
13626}
13627_ACEOF
13628if ac_fn_c_try_link "$LINENO"; then :
13629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13630$as_echo "yes" >&6; }; $as_echo "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
13631
13632else
13633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13634$as_echo "no" >&6; }
13635fi
13636rm -f core conftest.err conftest.$ac_objext \
13637    conftest$ac_exeext conftest.$ac_ext
13638  CFLAGS="$ac_save_CFLAGS"
13639  LIBS="$ac_save_LIBS"
13640fi
13641
13642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gpm argument" >&5
13643$as_echo_n "checking --disable-gpm argument... " >&6; }
13644# Check whether --enable-gpm was given.
13645if test "${enable_gpm+set}" = set; then :
13646  enableval=$enable_gpm;
13647else
13648  enable_gpm="yes"
13649fi
13650
13651
13652if test "$enable_gpm" = "yes"; then
13653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13654$as_echo "no" >&6; }
13655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
13656$as_echo_n "checking for gpm... " >&6; }
13657if ${vi_cv_have_gpm+:} false; then :
13658  $as_echo_n "(cached) " >&6
13659else
13660  olibs="$LIBS" ; LIBS="-lgpm"
13661	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662/* end confdefs.h.  */
13663#include <gpm.h>
13664	    #include <linux/keyboard.h>
13665int
13666main ()
13667{
13668Gpm_GetLibVersion(NULL);
13669  ;
13670  return 0;
13671}
13672_ACEOF
13673if ac_fn_c_try_link "$LINENO"; then :
13674  	    	    vi_cv_have_gpm=yes
13675else
13676  vi_cv_have_gpm=no
13677fi
13678rm -f core conftest.err conftest.$ac_objext \
13679    conftest$ac_exeext conftest.$ac_ext
13680	LIBS="$olibs"
13681
13682fi
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
13684$as_echo "$vi_cv_have_gpm" >&6; }
13685  if test $vi_cv_have_gpm = yes; then
13686    LIBS="$LIBS -lgpm"
13687    $as_echo "#define HAVE_GPM 1" >>confdefs.h
13688
13689  fi
13690else
13691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13692$as_echo "yes" >&6; }
13693fi
13694
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
13696$as_echo_n "checking --disable-sysmouse argument... " >&6; }
13697# Check whether --enable-sysmouse was given.
13698if test "${enable_sysmouse+set}" = set; then :
13699  enableval=$enable_sysmouse;
13700else
13701  enable_sysmouse="yes"
13702fi
13703
13704
13705if test "$enable_sysmouse" = "yes"; then
13706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13707$as_echo "no" >&6; }
13708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
13709$as_echo_n "checking for sysmouse... " >&6; }
13710if ${vi_cv_have_sysmouse+:} false; then :
13711  $as_echo_n "(cached) " >&6
13712else
13713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13714/* end confdefs.h.  */
13715#include <sys/consio.h>
13716	     #include <signal.h>
13717	     #include <sys/fbio.h>
13718int
13719main ()
13720{
13721struct mouse_info   mouse;
13722	     mouse.operation = MOUSE_MODE;
13723	     mouse.operation = MOUSE_SHOW;
13724	     mouse.u.mode.mode = 0;
13725	     mouse.u.mode.signal = SIGUSR2;
13726  ;
13727  return 0;
13728}
13729_ACEOF
13730if ac_fn_c_try_link "$LINENO"; then :
13731  vi_cv_have_sysmouse=yes
13732else
13733  vi_cv_have_sysmouse=no
13734fi
13735rm -f core conftest.err conftest.$ac_objext \
13736    conftest$ac_exeext conftest.$ac_ext
13737
13738fi
13739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
13740$as_echo "$vi_cv_have_sysmouse" >&6; }
13741  if test $vi_cv_have_sysmouse = yes; then
13742    $as_echo "#define HAVE_SYSMOUSE 1" >>confdefs.h
13743
13744  fi
13745else
13746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13747$as_echo "yes" >&6; }
13748fi
13749
13750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
13751$as_echo_n "checking for FD_CLOEXEC... " >&6; }
13752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13753/* end confdefs.h.  */
13754#if HAVE_FCNTL_H
13755# include <fcntl.h>
13756#endif
13757int
13758main ()
13759{
13760	int flag = FD_CLOEXEC;
13761  ;
13762  return 0;
13763}
13764_ACEOF
13765if ac_fn_c_try_compile "$LINENO"; then :
13766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13767$as_echo "yes" >&6; }; $as_echo "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
13768
13769else
13770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13771$as_echo "not usable" >&6; }
13772fi
13773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13774
13775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
13776$as_echo_n "checking for rename... " >&6; }
13777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13778/* end confdefs.h.  */
13779#include <stdio.h>
13780int
13781main ()
13782{
13783rename("this", "that")
13784  ;
13785  return 0;
13786}
13787_ACEOF
13788if ac_fn_c_try_link "$LINENO"; then :
13789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13790$as_echo "yes" >&6; }; $as_echo "#define HAVE_RENAME 1" >>confdefs.h
13791
13792else
13793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13794$as_echo "no" >&6; }
13795fi
13796rm -f core conftest.err conftest.$ac_objext \
13797    conftest$ac_exeext conftest.$ac_ext
13798
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
13800$as_echo_n "checking for sysctl... " >&6; }
13801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13802/* end confdefs.h.  */
13803#include <sys/types.h>
13804#include <sys/sysctl.h>
13805int
13806main ()
13807{
13808	int mib[2], r;
13809	size_t len;
13810
13811	mib[0] = CTL_HW;
13812	mib[1] = HW_USERMEM;
13813	len = sizeof(r);
13814	(void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
13815
13816  ;
13817  return 0;
13818}
13819_ACEOF
13820if ac_fn_c_try_compile "$LINENO"; then :
13821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13822$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCTL 1" >>confdefs.h
13823
13824else
13825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13826$as_echo "not usable" >&6; }
13827fi
13828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13829
13830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
13831$as_echo_n "checking for sysinfo... " >&6; }
13832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13833/* end confdefs.h.  */
13834#include <sys/types.h>
13835#include <sys/sysinfo.h>
13836int
13837main ()
13838{
13839	struct sysinfo sinfo;
13840	int t;
13841
13842	(void)sysinfo(&sinfo);
13843	t = sinfo.totalram;
13844
13845  ;
13846  return 0;
13847}
13848_ACEOF
13849if ac_fn_c_try_compile "$LINENO"; then :
13850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13851$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO 1" >>confdefs.h
13852
13853else
13854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13855$as_echo "not usable" >&6; }
13856fi
13857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13858
13859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
13860$as_echo_n "checking for sysinfo.mem_unit... " >&6; }
13861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13862/* end confdefs.h.  */
13863#include <sys/types.h>
13864#include <sys/sysinfo.h>
13865int
13866main ()
13867{
13868	struct sysinfo sinfo;
13869	sinfo.mem_unit = 1;
13870
13871  ;
13872  return 0;
13873}
13874_ACEOF
13875if ac_fn_c_try_compile "$LINENO"; then :
13876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13877$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
13878
13879else
13880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13881$as_echo "no" >&6; }
13882fi
13883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13884
13885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
13886$as_echo_n "checking for sysconf... " >&6; }
13887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13888/* end confdefs.h.  */
13889#include <unistd.h>
13890int
13891main ()
13892{
13893	(void)sysconf(_SC_PAGESIZE);
13894	(void)sysconf(_SC_PHYS_PAGES);
13895
13896  ;
13897  return 0;
13898}
13899_ACEOF
13900if ac_fn_c_try_compile "$LINENO"; then :
13901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13902$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCONF 1" >>confdefs.h
13903
13904else
13905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13906$as_echo "not usable" >&6; }
13907fi
13908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13909
13910# The cast to long int works around a bug in the HP C Compiler
13911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13913# This bug is HP SR number 8606223364.
13914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
13915$as_echo_n "checking size of int... " >&6; }
13916if ${ac_cv_sizeof_int+:} false; then :
13917  $as_echo_n "(cached) " >&6
13918else
13919  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
13920
13921else
13922  if test "$ac_cv_type_int" = yes; then
13923     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13925as_fn_error 77 "cannot compute sizeof (int)
13926See \`config.log' for more details" "$LINENO" 5; }
13927   else
13928     ac_cv_sizeof_int=0
13929   fi
13930fi
13931
13932fi
13933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
13934$as_echo "$ac_cv_sizeof_int" >&6; }
13935
13936
13937
13938cat >>confdefs.h <<_ACEOF
13939#define SIZEOF_INT $ac_cv_sizeof_int
13940_ACEOF
13941
13942
13943# The cast to long int works around a bug in the HP C Compiler
13944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13946# This bug is HP SR number 8606223364.
13947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13948$as_echo_n "checking size of long... " >&6; }
13949if ${ac_cv_sizeof_long+:} false; then :
13950  $as_echo_n "(cached) " >&6
13951else
13952  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13953
13954else
13955  if test "$ac_cv_type_long" = yes; then
13956     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13958as_fn_error 77 "cannot compute sizeof (long)
13959See \`config.log' for more details" "$LINENO" 5; }
13960   else
13961     ac_cv_sizeof_long=0
13962   fi
13963fi
13964
13965fi
13966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13967$as_echo "$ac_cv_sizeof_long" >&6; }
13968
13969
13970
13971cat >>confdefs.h <<_ACEOF
13972#define SIZEOF_LONG $ac_cv_sizeof_long
13973_ACEOF
13974
13975
13976# The cast to long int works around a bug in the HP C Compiler
13977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13979# This bug is HP SR number 8606223364.
13980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
13981$as_echo_n "checking size of time_t... " >&6; }
13982if ${ac_cv_sizeof_time_t+:} false; then :
13983  $as_echo_n "(cached) " >&6
13984else
13985  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
13986
13987else
13988  if test "$ac_cv_type_time_t" = yes; then
13989     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13991as_fn_error 77 "cannot compute sizeof (time_t)
13992See \`config.log' for more details" "$LINENO" 5; }
13993   else
13994     ac_cv_sizeof_time_t=0
13995   fi
13996fi
13997
13998fi
13999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
14000$as_echo "$ac_cv_sizeof_time_t" >&6; }
14001
14002
14003
14004cat >>confdefs.h <<_ACEOF
14005#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
14006_ACEOF
14007
14008
14009# The cast to long int works around a bug in the HP C Compiler
14010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14012# This bug is HP SR number 8606223364.
14013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
14014$as_echo_n "checking size of off_t... " >&6; }
14015if ${ac_cv_sizeof_off_t+:} false; then :
14016  $as_echo_n "(cached) " >&6
14017else
14018  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
14019
14020else
14021  if test "$ac_cv_type_off_t" = yes; then
14022     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14024as_fn_error 77 "cannot compute sizeof (off_t)
14025See \`config.log' for more details" "$LINENO" 5; }
14026   else
14027     ac_cv_sizeof_off_t=0
14028   fi
14029fi
14030
14031fi
14032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14033$as_echo "$ac_cv_sizeof_off_t" >&6; }
14034
14035
14036
14037cat >>confdefs.h <<_ACEOF
14038#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14039_ACEOF
14040
14041
14042
14043cat >>confdefs.h <<_ACEOF
14044#define VIM_SIZEOF_INT $ac_cv_sizeof_int
14045_ACEOF
14046
14047cat >>confdefs.h <<_ACEOF
14048#define VIM_SIZEOF_LONG $ac_cv_sizeof_long
14049_ACEOF
14050
14051
14052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
14053$as_echo_n "checking uint32_t is 32 bits... " >&6; }
14054if test "$cross_compiling" = yes; then :
14055  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
14056$as_echo "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
14057else
14058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14059/* end confdefs.h.  */
14060
14061#ifdef HAVE_STDINT_H
14062# include <stdint.h>
14063#endif
14064#ifdef HAVE_INTTYPES_H
14065# include <inttypes.h>
14066#endif
14067main() {
14068  uint32_t nr1 = (uint32_t)-1;
14069  uint32_t nr2 = (uint32_t)0xffffffffUL;
14070  if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1);
14071  exit(0);
14072}
14073_ACEOF
14074if ac_fn_c_try_run "$LINENO"; then :
14075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14076$as_echo "ok" >&6; }
14077else
14078  as_fn_error $? "WRONG!  uint32_t not defined correctly." "$LINENO" 5
14079fi
14080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14081  conftest.$ac_objext conftest.beam conftest.$ac_ext
14082fi
14083
14084
14085
14086bcopy_test_prog='
14087#include "confdefs.h"
14088#ifdef HAVE_STRING_H
14089# include <string.h>
14090#endif
14091#if STDC_HEADERS
14092# include <stdlib.h>
14093# include <stddef.h>
14094#endif
14095main() {
14096  char buf[10];
14097  strcpy(buf, "abcdefghi");
14098  mch_memmove(buf, buf + 2, 3);
14099  if (strncmp(buf, "ababcf", 6))
14100    exit(1);
14101  strcpy(buf, "abcdefghi");
14102  mch_memmove(buf + 2, buf, 3);
14103  if (strncmp(buf, "cdedef", 6))
14104    exit(1);
14105  exit(0); /* libc version works properly.  */
14106}'
14107
14108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
14109$as_echo_n "checking whether memmove handles overlaps... " >&6; }
14110if ${vim_cv_memmove_handles_overlap+:} false; then :
14111  $as_echo_n "(cached) " >&6
14112else
14113
14114    if test "$cross_compiling" = yes; then :
14115
14116	as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
14117
14118else
14119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14120/* end confdefs.h.  */
14121#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
14122_ACEOF
14123if ac_fn_c_try_run "$LINENO"; then :
14124
14125	vim_cv_memmove_handles_overlap=yes
14126
14127else
14128
14129	vim_cv_memmove_handles_overlap=no
14130
14131fi
14132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14133  conftest.$ac_objext conftest.beam conftest.$ac_ext
14134fi
14135
14136
14137fi
14138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
14139$as_echo "$vim_cv_memmove_handles_overlap" >&6; }
14140
14141if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
14142  $as_echo "#define USEMEMMOVE 1" >>confdefs.h
14143
14144else
14145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
14146$as_echo_n "checking whether bcopy handles overlaps... " >&6; }
14147if ${vim_cv_bcopy_handles_overlap+:} false; then :
14148  $as_echo_n "(cached) " >&6
14149else
14150
14151      if test "$cross_compiling" = yes; then :
14152
14153	as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
14154
14155else
14156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14157/* end confdefs.h.  */
14158#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
14159_ACEOF
14160if ac_fn_c_try_run "$LINENO"; then :
14161
14162	vim_cv_bcopy_handles_overlap=yes
14163
14164else
14165
14166	vim_cv_bcopy_handles_overlap=no
14167
14168fi
14169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14170  conftest.$ac_objext conftest.beam conftest.$ac_ext
14171fi
14172
14173
14174fi
14175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
14176$as_echo "$vim_cv_bcopy_handles_overlap" >&6; }
14177
14178  if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
14179    $as_echo "#define USEBCOPY 1" >>confdefs.h
14180
14181  else
14182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
14183$as_echo_n "checking whether memcpy handles overlaps... " >&6; }
14184if ${vim_cv_memcpy_handles_overlap+:} false; then :
14185  $as_echo_n "(cached) " >&6
14186else
14187
14188	if test "$cross_compiling" = yes; then :
14189
14190	    as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
14191
14192else
14193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14194/* end confdefs.h.  */
14195#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
14196_ACEOF
14197if ac_fn_c_try_run "$LINENO"; then :
14198
14199	    vim_cv_memcpy_handles_overlap=yes
14200
14201else
14202
14203	    vim_cv_memcpy_handles_overlap=no
14204
14205fi
14206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14207  conftest.$ac_objext conftest.beam conftest.$ac_ext
14208fi
14209
14210
14211fi
14212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
14213$as_echo "$vim_cv_memcpy_handles_overlap" >&6; }
14214
14215    if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
14216      $as_echo "#define USEMEMCPY 1" >>confdefs.h
14217
14218    fi
14219  fi
14220fi
14221
14222
14223if test "x$with_x" = "xyes"; then
14224  cflags_save=$CFLAGS
14225  libs_save=$LIBS
14226  LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
14227  CFLAGS="$CFLAGS $X_CFLAGS"
14228
14229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
14230$as_echo_n "checking whether X_LOCALE needed... " >&6; }
14231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14232/* end confdefs.h.  */
14233#include <X11/Xlocale.h>
14234int
14235main ()
14236{
14237
14238  ;
14239  return 0;
14240}
14241_ACEOF
14242if ac_fn_c_try_compile "$LINENO"; then :
14243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14244/* end confdefs.h.  */
14245
14246/* Override any GCC internal prototype to avoid an error.
14247   Use char because int might match the return type of a GCC
14248   builtin and then its argument prototype would still apply.  */
14249#ifdef __cplusplus
14250extern "C"
14251#endif
14252char _Xsetlocale ();
14253int
14254main ()
14255{
14256return _Xsetlocale ();
14257  ;
14258  return 0;
14259}
14260_ACEOF
14261if ac_fn_c_try_link "$LINENO"; then :
14262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14263$as_echo "yes" >&6; }
14264	      $as_echo "#define X_LOCALE 1" >>confdefs.h
14265
14266else
14267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14268$as_echo "no" >&6; }
14269fi
14270rm -f core conftest.err conftest.$ac_objext \
14271    conftest$ac_exeext conftest.$ac_ext
14272else
14273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14274$as_echo "no" >&6; }
14275fi
14276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14277
14278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
14279$as_echo_n "checking whether Xutf8SetWMProperties() can be used... " >&6; }
14280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14281/* end confdefs.h.  */
14282
14283/* Override any GCC internal prototype to avoid an error.
14284   Use char because int might match the return type of a GCC
14285   builtin and then its argument prototype would still apply.  */
14286#ifdef __cplusplus
14287extern "C"
14288#endif
14289char Xutf8SetWMProperties ();
14290int
14291main ()
14292{
14293return Xutf8SetWMProperties ();
14294  ;
14295  return 0;
14296}
14297_ACEOF
14298if ac_fn_c_try_link "$LINENO"; then :
14299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14300$as_echo "yes" >&6; }
14301	      $as_echo "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
14302
14303else
14304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14305$as_echo "no" >&6; }
14306fi
14307rm -f core conftest.err conftest.$ac_objext \
14308    conftest$ac_exeext conftest.$ac_ext
14309
14310  CFLAGS=$cflags_save
14311  LIBS=$libs_save
14312fi
14313
14314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
14315$as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
14316if ${ac_cv_lib_xpg4__xpg4_setrunelocale+:} false; then :
14317  $as_echo_n "(cached) " >&6
14318else
14319  ac_check_lib_save_LIBS=$LIBS
14320LIBS="-lxpg4  $LIBS"
14321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14322/* end confdefs.h.  */
14323
14324/* Override any GCC internal prototype to avoid an error.
14325   Use char because int might match the return type of a GCC
14326   builtin and then its argument prototype would still apply.  */
14327#ifdef __cplusplus
14328extern "C"
14329#endif
14330char _xpg4_setrunelocale ();
14331int
14332main ()
14333{
14334return _xpg4_setrunelocale ();
14335  ;
14336  return 0;
14337}
14338_ACEOF
14339if ac_fn_c_try_link "$LINENO"; then :
14340  ac_cv_lib_xpg4__xpg4_setrunelocale=yes
14341else
14342  ac_cv_lib_xpg4__xpg4_setrunelocale=no
14343fi
14344rm -f core conftest.err conftest.$ac_objext \
14345    conftest$ac_exeext conftest.$ac_ext
14346LIBS=$ac_check_lib_save_LIBS
14347fi
14348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
14349$as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
14350if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes; then :
14351  LIBS="$LIBS -lxpg4"
14352fi
14353
14354
14355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
14356$as_echo_n "checking how to create tags... " >&6; }
14357test -f tags && mv tags tags.save
14358if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14359  TAGPRG="ctags -I INIT+ --fields=+S"
14360elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14361  TAGPRG="exctags -I INIT+ --fields=+S"
14362elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14363  TAGPRG="exuberant-ctags -I INIT+ --fields=+S"
14364else
14365  TAGPRG="ctags"
14366  (eval etags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
14367  (eval etags -c   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
14368  (eval ctags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
14369  (eval ctags -t   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
14370  (eval ctags -ts  /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
14371  (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
14372  (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
14373fi
14374test -f tags.save && mv tags.save tags
14375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
14376$as_echo "$TAGPRG" >&6; }
14377
14378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
14379$as_echo_n "checking how to run man with a section nr... " >&6; }
14380MANDEF="man"
14381(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
14382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
14383$as_echo "$MANDEF" >&6; }
14384if test "$MANDEF" = "man -s"; then
14385  $as_echo "#define USEMAN_S 1" >>confdefs.h
14386
14387fi
14388
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
14390$as_echo_n "checking --disable-nls argument... " >&6; }
14391# Check whether --enable-nls was given.
14392if test "${enable_nls+set}" = set; then :
14393  enableval=$enable_nls;
14394else
14395  enable_nls="yes"
14396fi
14397
14398
14399if test "$enable_nls" = "yes"; then
14400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14401$as_echo "no" >&6; }
14402
14403  INSTALL_LANGS=install-languages
14404
14405  INSTALL_TOOL_LANGS=install-tool-languages
14406
14407
14408  # Extract the first word of "msgfmt", so it can be a program name with args.
14409set dummy msgfmt; ac_word=$2
14410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14411$as_echo_n "checking for $ac_word... " >&6; }
14412if ${ac_cv_prog_MSGFMT+:} false; then :
14413  $as_echo_n "(cached) " >&6
14414else
14415  if test -n "$MSGFMT"; then
14416  ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14417else
14418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14419for as_dir in $PATH
14420do
14421  IFS=$as_save_IFS
14422  test -z "$as_dir" && as_dir=.
14423    for ac_exec_ext in '' $ac_executable_extensions; do
14424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14425    ac_cv_prog_MSGFMT="msgfmt"
14426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14427    break 2
14428  fi
14429done
14430  done
14431IFS=$as_save_IFS
14432
14433fi
14434fi
14435MSGFMT=$ac_cv_prog_MSGFMT
14436if test -n "$MSGFMT"; then
14437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14438$as_echo "$MSGFMT" >&6; }
14439else
14440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14441$as_echo "no" >&6; }
14442fi
14443
14444
14445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
14446$as_echo_n "checking for NLS... " >&6; }
14447  if test -f po/Makefile; then
14448    have_gettext="no"
14449    if test -n "$MSGFMT"; then
14450      olibs=$LIBS
14451      LIBS=""
14452      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14453/* end confdefs.h.  */
14454#include <libintl.h>
14455int
14456main ()
14457{
14458gettext("Test");
14459  ;
14460  return 0;
14461}
14462_ACEOF
14463if ac_fn_c_try_link "$LINENO"; then :
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
14465$as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
14466else
14467  LIBS="-lintl"
14468	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14469/* end confdefs.h.  */
14470#include <libintl.h>
14471int
14472main ()
14473{
14474gettext("Test");
14475  ;
14476  return 0;
14477}
14478_ACEOF
14479if ac_fn_c_try_link "$LINENO"; then :
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
14481$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
14482	      LIBS="$olibs -lintl"
14483else
14484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
14485$as_echo "gettext() doesn't work" >&6; };
14486	      LIBS=$olibs
14487fi
14488rm -f core conftest.err conftest.$ac_objext \
14489    conftest$ac_exeext conftest.$ac_ext
14490fi
14491rm -f core conftest.err conftest.$ac_objext \
14492    conftest$ac_exeext conftest.$ac_ext
14493    else
14494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
14495$as_echo "msgfmt not found - disabled" >&6; };
14496    fi
14497    if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then
14498      $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
14499
14500      MAKEMO=yes
14501
14502            for ac_func in bind_textdomain_codeset
14503do :
14504  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
14505if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
14506  cat >>confdefs.h <<_ACEOF
14507#define HAVE_BIND_TEXTDOMAIN_CODESET 1
14508_ACEOF
14509
14510fi
14511done
14512
14513            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
14514$as_echo_n "checking for _nl_msg_cat_cntr... " >&6; }
14515      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516/* end confdefs.h.  */
14517#include <libintl.h>
14518		extern int _nl_msg_cat_cntr;
14519int
14520main ()
14521{
14522++_nl_msg_cat_cntr;
14523  ;
14524  return 0;
14525}
14526_ACEOF
14527if ac_fn_c_try_link "$LINENO"; then :
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14529$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
14530
14531else
14532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14533$as_echo "no" >&6; }
14534fi
14535rm -f core conftest.err conftest.$ac_objext \
14536    conftest$ac_exeext conftest.$ac_ext
14537      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
14538$as_echo_n "checking if msgfmt supports --desktop... " >&6; }
14539      MSGFMT_DESKTOP=
14540      if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
14541	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14542$as_echo "yes" >&6; }
14543	MSGFMT_DESKTOP="gvim.desktop vim.desktop"
14544      else
14545	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14546$as_echo "no" >&6; }
14547      fi
14548
14549    fi
14550  else
14551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
14552$as_echo "no \"po/Makefile\" - disabled" >&6; };
14553  fi
14554else
14555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14556$as_echo "yes" >&6; }
14557fi
14558
14559ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
14560if test "x$ac_cv_header_dlfcn_h" = xyes; then :
14561  DLL=dlfcn.h
14562else
14563  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
14564if test "x$ac_cv_header_dl_h" = xyes; then :
14565  DLL=dl.h
14566fi
14567
14568
14569fi
14570
14571
14572if test x${DLL} = xdlfcn.h; then
14573
14574$as_echo "#define HAVE_DLFCN_H 1" >>confdefs.h
14575
14576  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
14577$as_echo_n "checking for dlopen()... " >&6; }
14578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14579/* end confdefs.h.  */
14580
14581int
14582main ()
14583{
14584
14585		extern void* dlopen();
14586		dlopen();
14587
14588  ;
14589  return 0;
14590}
14591_ACEOF
14592if ac_fn_c_try_link "$LINENO"; then :
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14594$as_echo "yes" >&6; };
14595
14596$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
14597
14598else
14599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14600$as_echo "no" >&6; };
14601	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
14602$as_echo_n "checking for dlopen() in -ldl... " >&6; }
14603	      olibs=$LIBS
14604	      LIBS="$LIBS -ldl"
14605	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14606/* end confdefs.h.  */
14607
14608int
14609main ()
14610{
14611
14612				extern void* dlopen();
14613				dlopen();
14614
14615  ;
14616  return 0;
14617}
14618_ACEOF
14619if ac_fn_c_try_link "$LINENO"; then :
14620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14621$as_echo "yes" >&6; };
14622
14623$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
14624
14625else
14626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14627$as_echo "no" >&6; };
14628			  LIBS=$olibs
14629fi
14630rm -f core conftest.err conftest.$ac_objext \
14631    conftest$ac_exeext conftest.$ac_ext
14632fi
14633rm -f core conftest.err conftest.$ac_objext \
14634    conftest$ac_exeext conftest.$ac_ext
14635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
14636$as_echo_n "checking for dlsym()... " >&6; }
14637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14638/* end confdefs.h.  */
14639
14640int
14641main ()
14642{
14643
14644		extern void* dlsym();
14645		dlsym();
14646
14647  ;
14648  return 0;
14649}
14650_ACEOF
14651if ac_fn_c_try_link "$LINENO"; then :
14652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14653$as_echo "yes" >&6; };
14654
14655$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
14656
14657else
14658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14659$as_echo "no" >&6; };
14660	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
14661$as_echo_n "checking for dlsym() in -ldl... " >&6; }
14662	      olibs=$LIBS
14663	      LIBS="$LIBS -ldl"
14664	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14665/* end confdefs.h.  */
14666
14667int
14668main ()
14669{
14670
14671				extern void* dlsym();
14672				dlsym();
14673
14674  ;
14675  return 0;
14676}
14677_ACEOF
14678if ac_fn_c_try_link "$LINENO"; then :
14679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14680$as_echo "yes" >&6; };
14681
14682$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
14683
14684else
14685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14686$as_echo "no" >&6; };
14687			  LIBS=$olibs
14688fi
14689rm -f core conftest.err conftest.$ac_objext \
14690    conftest$ac_exeext conftest.$ac_ext
14691fi
14692rm -f core conftest.err conftest.$ac_objext \
14693    conftest$ac_exeext conftest.$ac_ext
14694elif test x${DLL} = xdl.h; then
14695
14696$as_echo "#define HAVE_DL_H 1" >>confdefs.h
14697
14698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
14699$as_echo_n "checking for shl_load()... " >&6; }
14700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14701/* end confdefs.h.  */
14702
14703int
14704main ()
14705{
14706
14707		extern void* shl_load();
14708		shl_load();
14709
14710  ;
14711  return 0;
14712}
14713_ACEOF
14714if ac_fn_c_try_link "$LINENO"; then :
14715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14716$as_echo "yes" >&6; };
14717
14718$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
14719
14720else
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14722$as_echo "no" >&6; };
14723	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
14724$as_echo_n "checking for shl_load() in -ldld... " >&6; }
14725	  olibs=$LIBS
14726	  LIBS="$LIBS -ldld"
14727	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14728/* end confdefs.h.  */
14729
14730int
14731main ()
14732{
14733
14734			extern void* shl_load();
14735			shl_load();
14736
14737  ;
14738  return 0;
14739}
14740_ACEOF
14741if ac_fn_c_try_link "$LINENO"; then :
14742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14743$as_echo "yes" >&6; };
14744
14745$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
14746
14747else
14748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14749$as_echo "no" >&6; };
14750		  LIBS=$olibs
14751fi
14752rm -f core conftest.err conftest.$ac_objext \
14753    conftest$ac_exeext conftest.$ac_ext
14754fi
14755rm -f core conftest.err conftest.$ac_objext \
14756    conftest$ac_exeext conftest.$ac_ext
14757fi
14758for ac_header in setjmp.h
14759do :
14760  ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
14761if test "x$ac_cv_header_setjmp_h" = xyes; then :
14762  cat >>confdefs.h <<_ACEOF
14763#define HAVE_SETJMP_H 1
14764_ACEOF
14765
14766fi
14767
14768done
14769
14770
14771if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
14772    if echo $LIBS | grep -e '-ldl' >/dev/null; then
14773    LIBS=`echo $LIBS | sed s/-ldl//`
14774    PERL_LIBS="$PERL_LIBS -ldl"
14775  fi
14776fi
14777
14778if test "$MACOS_X" = "yes"; then
14779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
14780$as_echo_n "checking whether we need macOS frameworks... " >&6; }
14781  if test "$GUITYPE" = "CARBONGUI"; then
14782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need Carbon" >&5
14783$as_echo "yes, we need Carbon" >&6; }
14784    LIBS="$LIBS -framework Carbon"
14785  elif test "$MACOS_X_DARWIN" = "yes"; then
14786    if test "$features" = "tiny"; then
14787            OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
14788      OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
14789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
14790$as_echo "yes, we need CoreServices" >&6; }
14791      LIBS="$LIBS -framework CoreServices"
14792    else
14793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
14794$as_echo "yes, we need AppKit" >&6; }
14795      LIBS="$LIBS -framework AppKit"
14796    fi
14797  else
14798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14799$as_echo "no" >&6; }
14800  fi
14801fi
14802if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
14803  LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
14804fi
14805
14806DEPEND_CFLAGS_FILTER=
14807if test "$GCC" = yes; then
14808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
14809$as_echo_n "checking for GCC 3 or later... " >&6; }
14810  gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'`
14811  if test "$gccmajor" -gt "2"; then
14812    DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
14813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14814$as_echo "yes" >&6; }
14815  else
14816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14817$as_echo "no" >&6; }
14818  fi
14819          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
14820$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
14821  if test "$gccmajor" -gt "3"; then
14822    CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-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/'`
14823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14824$as_echo "yes" >&6; }
14825  else
14826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14827$as_echo "no" >&6; }
14828  fi
14829fi
14830
14831
14832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
14833$as_echo_n "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
14834if 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
14835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14836$as_echo "yes" >&6; }
14837  $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14838
14839else
14840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14841$as_echo "no" >&6; }
14842fi
14843
14844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
14845$as_echo_n "checking linker --as-needed support... " >&6; }
14846LINK_AS_NEEDED=
14847# Check if linker supports --as-needed and --no-as-needed options
14848if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
14849  LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
14850  LINK_AS_NEEDED=yes
14851fi
14852if test "$LINK_AS_NEEDED" = yes; then
14853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14854$as_echo "yes" >&6; }
14855else
14856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14857$as_echo "no" >&6; }
14858fi
14859
14860
14861# IBM z/OS reset CFLAGS for config.mk
14862if test "$zOSUnix" = "yes"; then
14863	CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
14864fi
14865
14866ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
14867
14868cat >confcache <<\_ACEOF
14869# This file is a shell script that caches the results of configure
14870# tests run on this system so they can be shared between configure
14871# scripts and configure runs, see configure's option --config-cache.
14872# It is not useful on other systems.  If it contains results you don't
14873# want to keep, you may remove or edit it.
14874#
14875# config.status only pays attention to the cache file if you give it
14876# the --recheck option to rerun configure.
14877#
14878# `ac_cv_env_foo' variables (set or unset) will be overridden when
14879# loading this file, other *unset* `ac_cv_foo' will be assigned the
14880# following values.
14881
14882_ACEOF
14883
14884# The following way of writing the cache mishandles newlines in values,
14885# but we know of no workaround that is simple, portable, and efficient.
14886# So, we kill variables containing newlines.
14887# Ultrix sh set writes to stderr and can't be redirected directly,
14888# and sets the high bit in the cache file unless we assign to the vars.
14889(
14890  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14891    eval ac_val=\$$ac_var
14892    case $ac_val in #(
14893    *${as_nl}*)
14894      case $ac_var in #(
14895      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14896$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14897      esac
14898      case $ac_var in #(
14899      _ | IFS | as_nl) ;; #(
14900      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14901      *) { eval $ac_var=; unset $ac_var;} ;;
14902      esac ;;
14903    esac
14904  done
14905
14906  (set) 2>&1 |
14907    case $as_nl`(ac_space=' '; set) 2>&1` in #(
14908    *${as_nl}ac_space=\ *)
14909      # `set' does not quote correctly, so add quotes: double-quote
14910      # substitution turns \\\\ into \\, and sed turns \\ into \.
14911      sed -n \
14912	"s/'/'\\\\''/g;
14913	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14914      ;; #(
14915    *)
14916      # `set' quotes correctly as required by POSIX, so do not add quotes.
14917      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14918      ;;
14919    esac |
14920    sort
14921) |
14922  sed '
14923     /^ac_cv_env_/b end
14924     t clear
14925     :clear
14926     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14927     t end
14928     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14929     :end' >>confcache
14930if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14931  if test -w "$cache_file"; then
14932    if test "x$cache_file" != "x/dev/null"; then
14933      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14934$as_echo "$as_me: updating cache $cache_file" >&6;}
14935      if test ! -f "$cache_file" || test -h "$cache_file"; then
14936	cat confcache >"$cache_file"
14937      else
14938        case $cache_file in #(
14939        */* | ?:*)
14940	  mv -f confcache "$cache_file"$$ &&
14941	  mv -f "$cache_file"$$ "$cache_file" ;; #(
14942        *)
14943	  mv -f confcache "$cache_file" ;;
14944	esac
14945      fi
14946    fi
14947  else
14948    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14949$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14950  fi
14951fi
14952rm -f confcache
14953
14954test "x$prefix" = xNONE && prefix=$ac_default_prefix
14955# Let make expand exec_prefix.
14956test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14957
14958DEFS=-DHAVE_CONFIG_H
14959
14960ac_libobjs=
14961ac_ltlibobjs=
14962U=
14963for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14964  # 1. Remove the extension, and $U if already installed.
14965  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14966  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14967  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14968  #    will be set to the directory where LIBOBJS objects are built.
14969  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14970  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14971done
14972LIBOBJS=$ac_libobjs
14973
14974LTLIBOBJS=$ac_ltlibobjs
14975
14976
14977
14978
14979: "${CONFIG_STATUS=./config.status}"
14980ac_write_fail=0
14981ac_clean_files_save=$ac_clean_files
14982ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14984$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14985as_write_fail=0
14986cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14987#! $SHELL
14988# Generated by $as_me.
14989# Run this file to recreate the current configuration.
14990# Compiler output produced by configure, useful for debugging
14991# configure, is in config.log if it exists.
14992
14993debug=false
14994ac_cs_recheck=false
14995ac_cs_silent=false
14996
14997SHELL=\${CONFIG_SHELL-$SHELL}
14998export SHELL
14999_ASEOF
15000cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15001## -------------------- ##
15002## M4sh Initialization. ##
15003## -------------------- ##
15004
15005# Be more Bourne compatible
15006DUALCASE=1; export DUALCASE # for MKS sh
15007if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
15008  emulate sh
15009  NULLCMD=:
15010  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
15011  # is contrary to our usage.  Disable this feature.
15012  alias -g '${1+"$@"}'='"$@"'
15013  setopt NO_GLOB_SUBST
15014else
15015  case `(set -o) 2>/dev/null` in #(
15016  *posix*) :
15017    set -o posix ;; #(
15018  *) :
15019     ;;
15020esac
15021fi
15022
15023
15024as_nl='
15025'
15026export as_nl
15027# Printing a long string crashes Solaris 7 /usr/bin/printf.
15028as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15029as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15030as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15031# Prefer a ksh shell builtin over an external printf program on Solaris,
15032# but without wasting forks for bash or zsh.
15033if test -z "$BASH_VERSION$ZSH_VERSION" \
15034    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15035  as_echo='print -r --'
15036  as_echo_n='print -rn --'
15037elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15038  as_echo='printf %s\n'
15039  as_echo_n='printf %s'
15040else
15041  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15042    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15043    as_echo_n='/usr/ucb/echo -n'
15044  else
15045    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15046    as_echo_n_body='eval
15047      arg=$1;
15048      case $arg in #(
15049      *"$as_nl"*)
15050	expr "X$arg" : "X\\(.*\\)$as_nl";
15051	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15052      esac;
15053      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15054    '
15055    export as_echo_n_body
15056    as_echo_n='sh -c $as_echo_n_body as_echo'
15057  fi
15058  export as_echo_body
15059  as_echo='sh -c $as_echo_body as_echo'
15060fi
15061
15062# The user is always right.
15063if test "${PATH_SEPARATOR+set}" != set; then
15064  PATH_SEPARATOR=:
15065  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15066    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15067      PATH_SEPARATOR=';'
15068  }
15069fi
15070
15071
15072# IFS
15073# We need space, tab and new line, in precisely that order.  Quoting is
15074# there to prevent editors from complaining about space-tab.
15075# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15076# splitting by setting IFS to empty value.)
15077IFS=" ""	$as_nl"
15078
15079# Find who we are.  Look in the path if we contain no directory separator.
15080as_myself=
15081case $0 in #((
15082  *[\\/]* ) as_myself=$0 ;;
15083  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15084for as_dir in $PATH
15085do
15086  IFS=$as_save_IFS
15087  test -z "$as_dir" && as_dir=.
15088    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15089  done
15090IFS=$as_save_IFS
15091
15092     ;;
15093esac
15094# We did not find ourselves, most probably we were run as `sh COMMAND'
15095# in which case we are not to be found in the path.
15096if test "x$as_myself" = x; then
15097  as_myself=$0
15098fi
15099if test ! -f "$as_myself"; then
15100  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15101  exit 1
15102fi
15103
15104# Unset variables that we do not need and which cause bugs (e.g. in
15105# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15106# suppresses any "Segmentation fault" message there.  '((' could
15107# trigger a bug in pdksh 5.2.14.
15108for as_var in BASH_ENV ENV MAIL MAILPATH
15109do eval test x\${$as_var+set} = xset \
15110  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15111done
15112PS1='$ '
15113PS2='> '
15114PS4='+ '
15115
15116# NLS nuisances.
15117LC_ALL=C
15118export LC_ALL
15119LANGUAGE=C
15120export LANGUAGE
15121
15122# CDPATH.
15123(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15124
15125
15126# as_fn_error STATUS ERROR [LINENO LOG_FD]
15127# ----------------------------------------
15128# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15129# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15130# script with STATUS, using 1 if that was 0.
15131as_fn_error ()
15132{
15133  as_status=$1; test $as_status -eq 0 && as_status=1
15134  if test "$4"; then
15135    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15136    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15137  fi
15138  $as_echo "$as_me: error: $2" >&2
15139  as_fn_exit $as_status
15140} # as_fn_error
15141
15142
15143# as_fn_set_status STATUS
15144# -----------------------
15145# Set $? to STATUS, without forking.
15146as_fn_set_status ()
15147{
15148  return $1
15149} # as_fn_set_status
15150
15151# as_fn_exit STATUS
15152# -----------------
15153# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15154as_fn_exit ()
15155{
15156  set +e
15157  as_fn_set_status $1
15158  exit $1
15159} # as_fn_exit
15160
15161# as_fn_unset VAR
15162# ---------------
15163# Portably unset VAR.
15164as_fn_unset ()
15165{
15166  { eval $1=; unset $1;}
15167}
15168as_unset=as_fn_unset
15169# as_fn_append VAR VALUE
15170# ----------------------
15171# Append the text in VALUE to the end of the definition contained in VAR. Take
15172# advantage of any shell optimizations that allow amortized linear growth over
15173# repeated appends, instead of the typical quadratic growth present in naive
15174# implementations.
15175if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15176  eval 'as_fn_append ()
15177  {
15178    eval $1+=\$2
15179  }'
15180else
15181  as_fn_append ()
15182  {
15183    eval $1=\$$1\$2
15184  }
15185fi # as_fn_append
15186
15187# as_fn_arith ARG...
15188# ------------------
15189# Perform arithmetic evaluation on the ARGs, and store the result in the
15190# global $as_val. Take advantage of shells that can avoid forks. The arguments
15191# must be portable across $(()) and expr.
15192if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15193  eval 'as_fn_arith ()
15194  {
15195    as_val=$(( $* ))
15196  }'
15197else
15198  as_fn_arith ()
15199  {
15200    as_val=`expr "$@" || test $? -eq 1`
15201  }
15202fi # as_fn_arith
15203
15204
15205if expr a : '\(a\)' >/dev/null 2>&1 &&
15206   test "X`expr 00001 : '.*\(...\)'`" = X001; then
15207  as_expr=expr
15208else
15209  as_expr=false
15210fi
15211
15212if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15213  as_basename=basename
15214else
15215  as_basename=false
15216fi
15217
15218if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15219  as_dirname=dirname
15220else
15221  as_dirname=false
15222fi
15223
15224as_me=`$as_basename -- "$0" ||
15225$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15226	 X"$0" : 'X\(//\)$' \| \
15227	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15228$as_echo X/"$0" |
15229    sed '/^.*\/\([^/][^/]*\)\/*$/{
15230	    s//\1/
15231	    q
15232	  }
15233	  /^X\/\(\/\/\)$/{
15234	    s//\1/
15235	    q
15236	  }
15237	  /^X\/\(\/\).*/{
15238	    s//\1/
15239	    q
15240	  }
15241	  s/.*/./; q'`
15242
15243# Avoid depending upon Character Ranges.
15244as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15245as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15246as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15247as_cr_digits='0123456789'
15248as_cr_alnum=$as_cr_Letters$as_cr_digits
15249
15250ECHO_C= ECHO_N= ECHO_T=
15251case `echo -n x` in #(((((
15252-n*)
15253  case `echo 'xy\c'` in
15254  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
15255  xy)  ECHO_C='\c';;
15256  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15257       ECHO_T='	';;
15258  esac;;
15259*)
15260  ECHO_N='-n';;
15261esac
15262
15263rm -f conf$$ conf$$.exe conf$$.file
15264if test -d conf$$.dir; then
15265  rm -f conf$$.dir/conf$$.file
15266else
15267  rm -f conf$$.dir
15268  mkdir conf$$.dir 2>/dev/null
15269fi
15270if (echo >conf$$.file) 2>/dev/null; then
15271  if ln -s conf$$.file conf$$ 2>/dev/null; then
15272    as_ln_s='ln -s'
15273    # ... but there are two gotchas:
15274    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15275    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15276    # In both cases, we have to default to `cp -pR'.
15277    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15278      as_ln_s='cp -pR'
15279  elif ln conf$$.file conf$$ 2>/dev/null; then
15280    as_ln_s=ln
15281  else
15282    as_ln_s='cp -pR'
15283  fi
15284else
15285  as_ln_s='cp -pR'
15286fi
15287rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15288rmdir conf$$.dir 2>/dev/null
15289
15290
15291# as_fn_mkdir_p
15292# -------------
15293# Create "$as_dir" as a directory, including parents if necessary.
15294as_fn_mkdir_p ()
15295{
15296
15297  case $as_dir in #(
15298  -*) as_dir=./$as_dir;;
15299  esac
15300  test -d "$as_dir" || eval $as_mkdir_p || {
15301    as_dirs=
15302    while :; do
15303      case $as_dir in #(
15304      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15305      *) as_qdir=$as_dir;;
15306      esac
15307      as_dirs="'$as_qdir' $as_dirs"
15308      as_dir=`$as_dirname -- "$as_dir" ||
15309$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15310	 X"$as_dir" : 'X\(//\)[^/]' \| \
15311	 X"$as_dir" : 'X\(//\)$' \| \
15312	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15313$as_echo X"$as_dir" |
15314    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15315	    s//\1/
15316	    q
15317	  }
15318	  /^X\(\/\/\)[^/].*/{
15319	    s//\1/
15320	    q
15321	  }
15322	  /^X\(\/\/\)$/{
15323	    s//\1/
15324	    q
15325	  }
15326	  /^X\(\/\).*/{
15327	    s//\1/
15328	    q
15329	  }
15330	  s/.*/./; q'`
15331      test -d "$as_dir" && break
15332    done
15333    test -z "$as_dirs" || eval "mkdir $as_dirs"
15334  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15335
15336
15337} # as_fn_mkdir_p
15338if mkdir -p . 2>/dev/null; then
15339  as_mkdir_p='mkdir -p "$as_dir"'
15340else
15341  test -d ./-p && rmdir ./-p
15342  as_mkdir_p=false
15343fi
15344
15345
15346# as_fn_executable_p FILE
15347# -----------------------
15348# Test if FILE is an executable regular file.
15349as_fn_executable_p ()
15350{
15351  test -f "$1" && test -x "$1"
15352} # as_fn_executable_p
15353as_test_x='test -x'
15354as_executable_p=as_fn_executable_p
15355
15356# Sed expression to map a string onto a valid CPP name.
15357as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15358
15359# Sed expression to map a string onto a valid variable name.
15360as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15361
15362
15363exec 6>&1
15364## ----------------------------------- ##
15365## Main body of $CONFIG_STATUS script. ##
15366## ----------------------------------- ##
15367_ASEOF
15368test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15369
15370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15371# Save the log message, to keep $0 and so on meaningful, and to
15372# report actual input values of CONFIG_FILES etc. instead of their
15373# values after options handling.
15374ac_log="
15375This file was extended by $as_me, which was
15376generated by GNU Autoconf 2.69.  Invocation command line was
15377
15378  CONFIG_FILES    = $CONFIG_FILES
15379  CONFIG_HEADERS  = $CONFIG_HEADERS
15380  CONFIG_LINKS    = $CONFIG_LINKS
15381  CONFIG_COMMANDS = $CONFIG_COMMANDS
15382  $ $0 $@
15383
15384on `(hostname || uname -n) 2>/dev/null | sed 1q`
15385"
15386
15387_ACEOF
15388
15389case $ac_config_files in *"
15390"*) set x $ac_config_files; shift; ac_config_files=$*;;
15391esac
15392
15393case $ac_config_headers in *"
15394"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15395esac
15396
15397
15398cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15399# Files that config.status was made for.
15400config_files="$ac_config_files"
15401config_headers="$ac_config_headers"
15402
15403_ACEOF
15404
15405cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15406ac_cs_usage="\
15407\`$as_me' instantiates files and other configuration actions
15408from templates according to the current configuration.  Unless the files
15409and actions are specified as TAGs, all are instantiated by default.
15410
15411Usage: $0 [OPTION]... [TAG]...
15412
15413  -h, --help       print this help, then exit
15414  -V, --version    print version number and configuration settings, then exit
15415      --config     print configuration, then exit
15416  -q, --quiet, --silent
15417                   do not print progress messages
15418  -d, --debug      don't remove temporary files
15419      --recheck    update $as_me by reconfiguring in the same conditions
15420      --file=FILE[:TEMPLATE]
15421                   instantiate the configuration file FILE
15422      --header=FILE[:TEMPLATE]
15423                   instantiate the configuration header FILE
15424
15425Configuration files:
15426$config_files
15427
15428Configuration headers:
15429$config_headers
15430
15431Report bugs to the package provider."
15432
15433_ACEOF
15434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15435ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15436ac_cs_version="\\
15437config.status
15438configured by $0, generated by GNU Autoconf 2.69,
15439  with options \\"\$ac_cs_config\\"
15440
15441Copyright (C) 2012 Free Software Foundation, Inc.
15442This config.status script is free software; the Free Software Foundation
15443gives unlimited permission to copy, distribute and modify it."
15444
15445ac_pwd='$ac_pwd'
15446srcdir='$srcdir'
15447AWK='$AWK'
15448test -n "\$AWK" || AWK=awk
15449_ACEOF
15450
15451cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15452# The default lists apply if the user does not specify any file.
15453ac_need_defaults=:
15454while test $# != 0
15455do
15456  case $1 in
15457  --*=?*)
15458    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15459    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15460    ac_shift=:
15461    ;;
15462  --*=)
15463    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15464    ac_optarg=
15465    ac_shift=:
15466    ;;
15467  *)
15468    ac_option=$1
15469    ac_optarg=$2
15470    ac_shift=shift
15471    ;;
15472  esac
15473
15474  case $ac_option in
15475  # Handling of the options.
15476  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15477    ac_cs_recheck=: ;;
15478  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15479    $as_echo "$ac_cs_version"; exit ;;
15480  --config | --confi | --conf | --con | --co | --c )
15481    $as_echo "$ac_cs_config"; exit ;;
15482  --debug | --debu | --deb | --de | --d | -d )
15483    debug=: ;;
15484  --file | --fil | --fi | --f )
15485    $ac_shift
15486    case $ac_optarg in
15487    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15488    '') as_fn_error $? "missing file argument" ;;
15489    esac
15490    as_fn_append CONFIG_FILES " '$ac_optarg'"
15491    ac_need_defaults=false;;
15492  --header | --heade | --head | --hea )
15493    $ac_shift
15494    case $ac_optarg in
15495    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15496    esac
15497    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15498    ac_need_defaults=false;;
15499  --he | --h)
15500    # Conflict between --help and --header
15501    as_fn_error $? "ambiguous option: \`$1'
15502Try \`$0 --help' for more information.";;
15503  --help | --hel | -h )
15504    $as_echo "$ac_cs_usage"; exit ;;
15505  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15506  | -silent | --silent | --silen | --sile | --sil | --si | --s)
15507    ac_cs_silent=: ;;
15508
15509  # This is an error.
15510  -*) as_fn_error $? "unrecognized option: \`$1'
15511Try \`$0 --help' for more information." ;;
15512
15513  *) as_fn_append ac_config_targets " $1"
15514     ac_need_defaults=false ;;
15515
15516  esac
15517  shift
15518done
15519
15520ac_configure_extra_args=
15521
15522if $ac_cs_silent; then
15523  exec 6>/dev/null
15524  ac_configure_extra_args="$ac_configure_extra_args --silent"
15525fi
15526
15527_ACEOF
15528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15529if \$ac_cs_recheck; then
15530  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15531  shift
15532  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15533  CONFIG_SHELL='$SHELL'
15534  export CONFIG_SHELL
15535  exec "\$@"
15536fi
15537
15538_ACEOF
15539cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15540exec 5>>auto/config.log
15541{
15542  echo
15543  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15544## Running $as_me. ##
15545_ASBOX
15546  $as_echo "$ac_log"
15547} >&5
15548
15549_ACEOF
15550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15551_ACEOF
15552
15553cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15554
15555# Handling of arguments.
15556for ac_config_target in $ac_config_targets
15557do
15558  case $ac_config_target in
15559    "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
15560    "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
15561
15562  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15563  esac
15564done
15565
15566
15567# If the user did not use the arguments to specify the items to instantiate,
15568# then the envvar interface is used.  Set only those that are not.
15569# We use the long form for the default assignment because of an extremely
15570# bizarre bug on SunOS 4.1.3.
15571if $ac_need_defaults; then
15572  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15573  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15574fi
15575
15576# Have a temporary directory for convenience.  Make it in the build tree
15577# simply because there is no reason against having it here, and in addition,
15578# creating and moving files from /tmp can sometimes cause problems.
15579# Hook for its removal unless debugging.
15580# Note that there is a small window in which the directory will not be cleaned:
15581# after its creation but before its name has been assigned to `$tmp'.
15582$debug ||
15583{
15584  tmp= ac_tmp=
15585  trap 'exit_status=$?
15586  : "${ac_tmp:=$tmp}"
15587  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15588' 0
15589  trap 'as_fn_exit 1' 1 2 13 15
15590}
15591# Create a (secure) tmp directory for tmp files.
15592
15593{
15594  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15595  test -d "$tmp"
15596}  ||
15597{
15598  tmp=./conf$$-$RANDOM
15599  (umask 077 && mkdir "$tmp")
15600} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15601ac_tmp=$tmp
15602
15603# Set up the scripts for CONFIG_FILES section.
15604# No need to generate them if there are no CONFIG_FILES.
15605# This happens for instance with `./config.status config.h'.
15606if test -n "$CONFIG_FILES"; then
15607
15608
15609ac_cr=`echo X | tr X '\015'`
15610# On cygwin, bash can eat \r inside `` if the user requested igncr.
15611# But we know of no other shell where ac_cr would be empty at this
15612# point, so we can use a bashism as a fallback.
15613if test "x$ac_cr" = x; then
15614  eval ac_cr=\$\'\\r\'
15615fi
15616ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15617if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15618  ac_cs_awk_cr='\\r'
15619else
15620  ac_cs_awk_cr=$ac_cr
15621fi
15622
15623echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15624_ACEOF
15625
15626
15627{
15628  echo "cat >conf$$subs.awk <<_ACEOF" &&
15629  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15630  echo "_ACEOF"
15631} >conf$$subs.sh ||
15632  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15633ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15634ac_delim='%!_!# '
15635for ac_last_try in false false false false false :; do
15636  . ./conf$$subs.sh ||
15637    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15638
15639  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15640  if test $ac_delim_n = $ac_delim_num; then
15641    break
15642  elif $ac_last_try; then
15643    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15644  else
15645    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15646  fi
15647done
15648rm -f conf$$subs.sh
15649
15650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15651cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15652_ACEOF
15653sed -n '
15654h
15655s/^/S["/; s/!.*/"]=/
15656p
15657g
15658s/^[^!]*!//
15659:repl
15660t repl
15661s/'"$ac_delim"'$//
15662t delim
15663:nl
15664h
15665s/\(.\{148\}\)..*/\1/
15666t more1
15667s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15668p
15669n
15670b repl
15671:more1
15672s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15673p
15674g
15675s/.\{148\}//
15676t nl
15677:delim
15678h
15679s/\(.\{148\}\)..*/\1/
15680t more2
15681s/["\\]/\\&/g; s/^/"/; s/$/"/
15682p
15683b
15684:more2
15685s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15686p
15687g
15688s/.\{148\}//
15689t delim
15690' <conf$$subs.awk | sed '
15691/^[^""]/{
15692  N
15693  s/\n//
15694}
15695' >>$CONFIG_STATUS || ac_write_fail=1
15696rm -f conf$$subs.awk
15697cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15698_ACAWK
15699cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15700  for (key in S) S_is_set[key] = 1
15701  FS = ""
15702
15703}
15704{
15705  line = $ 0
15706  nfields = split(line, field, "@")
15707  substed = 0
15708  len = length(field[1])
15709  for (i = 2; i < nfields; i++) {
15710    key = field[i]
15711    keylen = length(key)
15712    if (S_is_set[key]) {
15713      value = S[key]
15714      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15715      len += length(value) + length(field[++i])
15716      substed = 1
15717    } else
15718      len += 1 + keylen
15719  }
15720
15721  print line
15722}
15723
15724_ACAWK
15725_ACEOF
15726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15727if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15728  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15729else
15730  cat
15731fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15732  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15733_ACEOF
15734
15735# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15736# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15737# trailing colons and then remove the whole line if VPATH becomes empty
15738# (actually we leave an empty line to preserve line numbers).
15739if test "x$srcdir" = x.; then
15740  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
15741h
15742s///
15743s/^/:/
15744s/[	 ]*$/:/
15745s/:\$(srcdir):/:/g
15746s/:\${srcdir}:/:/g
15747s/:@srcdir@:/:/g
15748s/^:*//
15749s/:*$//
15750x
15751s/\(=[	 ]*\).*/\1/
15752G
15753s/\n//
15754s/^[^=]*=[	 ]*$//
15755}'
15756fi
15757
15758cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15759fi # test -n "$CONFIG_FILES"
15760
15761# Set up the scripts for CONFIG_HEADERS section.
15762# No need to generate them if there are no CONFIG_HEADERS.
15763# This happens for instance with `./config.status Makefile'.
15764if test -n "$CONFIG_HEADERS"; then
15765cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15766BEGIN {
15767_ACEOF
15768
15769# Transform confdefs.h into an awk script `defines.awk', embedded as
15770# here-document in config.status, that substitutes the proper values into
15771# config.h.in to produce config.h.
15772
15773# Create a delimiter string that does not exist in confdefs.h, to ease
15774# handling of long lines.
15775ac_delim='%!_!# '
15776for ac_last_try in false false :; do
15777  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15778  if test -z "$ac_tt"; then
15779    break
15780  elif $ac_last_try; then
15781    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15782  else
15783    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15784  fi
15785done
15786
15787# For the awk script, D is an array of macro values keyed by name,
15788# likewise P contains macro parameters if any.  Preserve backslash
15789# newline sequences.
15790
15791ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15792sed -n '
15793s/.\{148\}/&'"$ac_delim"'/g
15794t rset
15795:rset
15796s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
15797t def
15798d
15799:def
15800s/\\$//
15801t bsnl
15802s/["\\]/\\&/g
15803s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15804D["\1"]=" \3"/p
15805s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
15806d
15807:bsnl
15808s/["\\]/\\&/g
15809s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15810D["\1"]=" \3\\\\\\n"\\/p
15811t cont
15812s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15813t cont
15814d
15815:cont
15816n
15817s/.\{148\}/&'"$ac_delim"'/g
15818t clear
15819:clear
15820s/\\$//
15821t bsnlc
15822s/["\\]/\\&/g; s/^/"/; s/$/"/p
15823d
15824:bsnlc
15825s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15826b cont
15827' <confdefs.h | sed '
15828s/'"$ac_delim"'/"\\\
15829"/g' >>$CONFIG_STATUS || ac_write_fail=1
15830
15831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15832  for (key in D) D_is_set[key] = 1
15833  FS = ""
15834}
15835/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15836  line = \$ 0
15837  split(line, arg, " ")
15838  if (arg[1] == "#") {
15839    defundef = arg[2]
15840    mac1 = arg[3]
15841  } else {
15842    defundef = substr(arg[1], 2)
15843    mac1 = arg[2]
15844  }
15845  split(mac1, mac2, "(") #)
15846  macro = mac2[1]
15847  prefix = substr(line, 1, index(line, defundef) - 1)
15848  if (D_is_set[macro]) {
15849    # Preserve the white space surrounding the "#".
15850    print prefix "define", macro P[macro] D[macro]
15851    next
15852  } else {
15853    # Replace #undef with comments.  This is necessary, for example,
15854    # in the case of _POSIX_SOURCE, which is predefined and required
15855    # on some systems where configure will not decide to define it.
15856    if (defundef == "undef") {
15857      print "/*", prefix defundef, macro, "*/"
15858      next
15859    }
15860  }
15861}
15862{ print }
15863_ACAWK
15864_ACEOF
15865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15866  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15867fi # test -n "$CONFIG_HEADERS"
15868
15869
15870eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
15871shift
15872for ac_tag
15873do
15874  case $ac_tag in
15875  :[FHLC]) ac_mode=$ac_tag; continue;;
15876  esac
15877  case $ac_mode$ac_tag in
15878  :[FHL]*:*);;
15879  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15880  :[FH]-) ac_tag=-:-;;
15881  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15882  esac
15883  ac_save_IFS=$IFS
15884  IFS=:
15885  set x $ac_tag
15886  IFS=$ac_save_IFS
15887  shift
15888  ac_file=$1
15889  shift
15890
15891  case $ac_mode in
15892  :L) ac_source=$1;;
15893  :[FH])
15894    ac_file_inputs=
15895    for ac_f
15896    do
15897      case $ac_f in
15898      -) ac_f="$ac_tmp/stdin";;
15899      *) # Look for the file first in the build tree, then in the source tree
15900	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
15901	 # because $ac_f cannot contain `:'.
15902	 test -f "$ac_f" ||
15903	   case $ac_f in
15904	   [\\/$]*) false;;
15905	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15906	   esac ||
15907	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15908      esac
15909      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15910      as_fn_append ac_file_inputs " '$ac_f'"
15911    done
15912
15913    # Let's still pretend it is `configure' which instantiates (i.e., don't
15914    # use $as_me), people would be surprised to read:
15915    #    /* config.h.  Generated by config.status.  */
15916    configure_input='Generated from '`
15917	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15918	`' by configure.'
15919    if test x"$ac_file" != x-; then
15920      configure_input="$ac_file.  $configure_input"
15921      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15922$as_echo "$as_me: creating $ac_file" >&6;}
15923    fi
15924    # Neutralize special characters interpreted by sed in replacement strings.
15925    case $configure_input in #(
15926    *\&* | *\|* | *\\* )
15927       ac_sed_conf_input=`$as_echo "$configure_input" |
15928       sed 's/[\\\\&|]/\\\\&/g'`;; #(
15929    *) ac_sed_conf_input=$configure_input;;
15930    esac
15931
15932    case $ac_tag in
15933    *:-:* | *:-) cat >"$ac_tmp/stdin" \
15934      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15935    esac
15936    ;;
15937  esac
15938
15939  ac_dir=`$as_dirname -- "$ac_file" ||
15940$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15941	 X"$ac_file" : 'X\(//\)[^/]' \| \
15942	 X"$ac_file" : 'X\(//\)$' \| \
15943	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15944$as_echo X"$ac_file" |
15945    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15946	    s//\1/
15947	    q
15948	  }
15949	  /^X\(\/\/\)[^/].*/{
15950	    s//\1/
15951	    q
15952	  }
15953	  /^X\(\/\/\)$/{
15954	    s//\1/
15955	    q
15956	  }
15957	  /^X\(\/\).*/{
15958	    s//\1/
15959	    q
15960	  }
15961	  s/.*/./; q'`
15962  as_dir="$ac_dir"; as_fn_mkdir_p
15963  ac_builddir=.
15964
15965case "$ac_dir" in
15966.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15967*)
15968  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15969  # A ".." for each directory in $ac_dir_suffix.
15970  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15971  case $ac_top_builddir_sub in
15972  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15973  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15974  esac ;;
15975esac
15976ac_abs_top_builddir=$ac_pwd
15977ac_abs_builddir=$ac_pwd$ac_dir_suffix
15978# for backward compatibility:
15979ac_top_builddir=$ac_top_build_prefix
15980
15981case $srcdir in
15982  .)  # We are building in place.
15983    ac_srcdir=.
15984    ac_top_srcdir=$ac_top_builddir_sub
15985    ac_abs_top_srcdir=$ac_pwd ;;
15986  [\\/]* | ?:[\\/]* )  # Absolute name.
15987    ac_srcdir=$srcdir$ac_dir_suffix;
15988    ac_top_srcdir=$srcdir
15989    ac_abs_top_srcdir=$srcdir ;;
15990  *) # Relative name.
15991    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15992    ac_top_srcdir=$ac_top_build_prefix$srcdir
15993    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15994esac
15995ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15996
15997
15998  case $ac_mode in
15999  :F)
16000  #
16001  # CONFIG_FILE
16002  #
16003
16004_ACEOF
16005
16006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16007# If the template does not know about datarootdir, expand it.
16008# FIXME: This hack should be removed a few years after 2.60.
16009ac_datarootdir_hack=; ac_datarootdir_seen=
16010ac_sed_dataroot='
16011/datarootdir/ {
16012  p
16013  q
16014}
16015/@datadir@/p
16016/@docdir@/p
16017/@infodir@/p
16018/@localedir@/p
16019/@mandir@/p'
16020case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16021*datarootdir*) ac_datarootdir_seen=yes;;
16022*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16023  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16024$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16025_ACEOF
16026cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16027  ac_datarootdir_hack='
16028  s&@datadir@&$datadir&g
16029  s&@docdir@&$docdir&g
16030  s&@infodir@&$infodir&g
16031  s&@localedir@&$localedir&g
16032  s&@mandir@&$mandir&g
16033  s&\\\${datarootdir}&$datarootdir&g' ;;
16034esac
16035_ACEOF
16036
16037# Neutralize VPATH when `$srcdir' = `.'.
16038# Shell code in configure.ac might set extrasub.
16039# FIXME: do we really want to maintain this feature?
16040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16041ac_sed_extra="$ac_vpsub
16042$extrasub
16043_ACEOF
16044cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16045:t
16046/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16047s|@configure_input@|$ac_sed_conf_input|;t t
16048s&@top_builddir@&$ac_top_builddir_sub&;t t
16049s&@top_build_prefix@&$ac_top_build_prefix&;t t
16050s&@srcdir@&$ac_srcdir&;t t
16051s&@abs_srcdir@&$ac_abs_srcdir&;t t
16052s&@top_srcdir@&$ac_top_srcdir&;t t
16053s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16054s&@builddir@&$ac_builddir&;t t
16055s&@abs_builddir@&$ac_abs_builddir&;t t
16056s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16057$ac_datarootdir_hack
16058"
16059eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16060  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16061
16062test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16063  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16064  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
16065      "$ac_tmp/out"`; test -z "$ac_out"; } &&
16066  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16067which seems to be undefined.  Please make sure it is defined" >&5
16068$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16069which seems to be undefined.  Please make sure it is defined" >&2;}
16070
16071  rm -f "$ac_tmp/stdin"
16072  case $ac_file in
16073  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16074  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16075  esac \
16076  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16077 ;;
16078  :H)
16079  #
16080  # CONFIG_HEADER
16081  #
16082  if test x"$ac_file" != x-; then
16083    {
16084      $as_echo "/* $configure_input  */" \
16085      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16086    } >"$ac_tmp/config.h" \
16087      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16088    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16089      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16090$as_echo "$as_me: $ac_file is unchanged" >&6;}
16091    else
16092      rm -f "$ac_file"
16093      mv "$ac_tmp/config.h" "$ac_file" \
16094	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
16095    fi
16096  else
16097    $as_echo "/* $configure_input  */" \
16098      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16099      || as_fn_error $? "could not create -" "$LINENO" 5
16100  fi
16101 ;;
16102
16103
16104  esac
16105
16106done # for ac_tag
16107
16108
16109as_fn_exit 0
16110_ACEOF
16111ac_clean_files=$ac_clean_files_save
16112
16113test $ac_write_fail = 0 ||
16114  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16115
16116
16117# configure is writing to config.log, and then calls config.status.
16118# config.status does its own redirection, appending to config.log.
16119# Unfortunately, on DOS this fails, as config.log is still kept open
16120# by configure, so config.status won't be able to write to it; its
16121# output is simply discarded.  So we exec the FD to /dev/null,
16122# effectively closing config.log, so it can be properly (re)opened and
16123# appended to by config.status.  When coming back to configure, we
16124# need to make the FD available again.
16125if test "$no_create" != yes; then
16126  ac_cs_success=:
16127  ac_config_status_args=
16128  test "$silent" = yes &&
16129    ac_config_status_args="$ac_config_status_args --quiet"
16130  exec 5>/dev/null
16131  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16132  exec 5>>auto/config.log
16133  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16134  # would make configure fail if this is the last instruction.
16135  $ac_cs_success || as_fn_exit 1
16136fi
16137if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16138  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16139$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16140fi
16141
16142
16143