xref: /vim-8.2.3635/src/auto/configure (revision fcfe1a9b)
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_canberra
844enable_acl
845enable_gpm
846enable_sysmouse
847enable_nls
848'
849      ac_precious_vars='build_alias
850host_alias
851target_alias
852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
857CPP
858XMKMF'
859
860
861# Initialize some variables set by options.
862ac_init_help=
863ac_init_version=false
864ac_unrecognized_opts=
865ac_unrecognized_sep=
866# The variables have the same names as the options, with
867# dashes changed to underlines.
868cache_file=/dev/null
869exec_prefix=NONE
870no_create=
871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
876silent=
877site=
878srcdir=
879verbose=
880x_includes=NONE
881x_libraries=NONE
882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
888# (The list follows the same order as the GNU Coding Standards.)
889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
897runstatedir='${localstatedir}/run'
898includedir='${prefix}/include'
899oldincludedir='/usr/include'
900docdir='${datarootdir}/doc/${PACKAGE}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
909
910ac_prev=
911ac_dashdash=
912for ac_option
913do
914  # If the previous option needs an argument, assign it.
915  if test -n "$ac_prev"; then
916    eval $ac_prev=\$ac_option
917    ac_prev=
918    continue
919  fi
920
921  case $ac_option in
922  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923  *=)   ac_optarg= ;;
924  *)    ac_optarg=yes ;;
925  esac
926
927  # Accept the important Cygnus configure options, so we can diagnose typos.
928
929  case $ac_dashdash$ac_option in
930  --)
931    ac_dashdash=yes ;;
932
933  -bindir | --bindir | --bindi | --bind | --bin | --bi)
934    ac_prev=bindir ;;
935  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
936    bindir=$ac_optarg ;;
937
938  -build | --build | --buil | --bui | --bu)
939    ac_prev=build_alias ;;
940  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
941    build_alias=$ac_optarg ;;
942
943  -cache-file | --cache-file | --cache-fil | --cache-fi \
944  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945    ac_prev=cache_file ;;
946  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
948    cache_file=$ac_optarg ;;
949
950  --config-cache | -C)
951    cache_file=config.cache ;;
952
953  -datadir | --datadir | --datadi | --datad)
954    ac_prev=datadir ;;
955  -datadir=* | --datadir=* | --datadi=* | --datad=*)
956    datadir=$ac_optarg ;;
957
958  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959  | --dataroo | --dataro | --datar)
960    ac_prev=datarootdir ;;
961  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963    datarootdir=$ac_optarg ;;
964
965  -disable-* | --disable-*)
966    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
967    # Reject names that are not valid shell variable names.
968    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969      as_fn_error $? "invalid feature name: $ac_useropt"
970    ac_useropt_orig=$ac_useropt
971    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972    case $ac_user_opts in
973      *"
974"enable_$ac_useropt"
975"*) ;;
976      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977	 ac_unrecognized_sep=', ';;
978    esac
979    eval enable_$ac_useropt=no ;;
980
981  -docdir | --docdir | --docdi | --doc | --do)
982    ac_prev=docdir ;;
983  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984    docdir=$ac_optarg ;;
985
986  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987    ac_prev=dvidir ;;
988  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989    dvidir=$ac_optarg ;;
990
991  -enable-* | --enable-*)
992    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
993    # Reject names that are not valid shell variable names.
994    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
995      as_fn_error $? "invalid feature name: $ac_useropt"
996    ac_useropt_orig=$ac_useropt
997    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998    case $ac_user_opts in
999      *"
1000"enable_$ac_useropt"
1001"*) ;;
1002      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003	 ac_unrecognized_sep=', ';;
1004    esac
1005    eval enable_$ac_useropt=\$ac_optarg ;;
1006
1007  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009  | --exec | --exe | --ex)
1010    ac_prev=exec_prefix ;;
1011  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013  | --exec=* | --exe=* | --ex=*)
1014    exec_prefix=$ac_optarg ;;
1015
1016  -gas | --gas | --ga | --g)
1017    # Obsolete; use --with-gas.
1018    with_gas=yes ;;
1019
1020  -help | --help | --hel | --he | -h)
1021    ac_init_help=long ;;
1022  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023    ac_init_help=recursive ;;
1024  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025    ac_init_help=short ;;
1026
1027  -host | --host | --hos | --ho)
1028    ac_prev=host_alias ;;
1029  -host=* | --host=* | --hos=* | --ho=*)
1030    host_alias=$ac_optarg ;;
1031
1032  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033    ac_prev=htmldir ;;
1034  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035  | --ht=*)
1036    htmldir=$ac_optarg ;;
1037
1038  -includedir | --includedir | --includedi | --included | --include \
1039  | --includ | --inclu | --incl | --inc)
1040    ac_prev=includedir ;;
1041  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042  | --includ=* | --inclu=* | --incl=* | --inc=*)
1043    includedir=$ac_optarg ;;
1044
1045  -infodir | --infodir | --infodi | --infod | --info | --inf)
1046    ac_prev=infodir ;;
1047  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1048    infodir=$ac_optarg ;;
1049
1050  -libdir | --libdir | --libdi | --libd)
1051    ac_prev=libdir ;;
1052  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1053    libdir=$ac_optarg ;;
1054
1055  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056  | --libexe | --libex | --libe)
1057    ac_prev=libexecdir ;;
1058  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059  | --libexe=* | --libex=* | --libe=*)
1060    libexecdir=$ac_optarg ;;
1061
1062  -localedir | --localedir | --localedi | --localed | --locale)
1063    ac_prev=localedir ;;
1064  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065    localedir=$ac_optarg ;;
1066
1067  -localstatedir | --localstatedir | --localstatedi | --localstated \
1068  | --localstate | --localstat | --localsta | --localst | --locals)
1069    ac_prev=localstatedir ;;
1070  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1071  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1072    localstatedir=$ac_optarg ;;
1073
1074  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075    ac_prev=mandir ;;
1076  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1077    mandir=$ac_optarg ;;
1078
1079  -nfp | --nfp | --nf)
1080    # Obsolete; use --without-fp.
1081    with_fp=no ;;
1082
1083  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1084  | --no-cr | --no-c | -n)
1085    no_create=yes ;;
1086
1087  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089    no_recursion=yes ;;
1090
1091  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093  | --oldin | --oldi | --old | --ol | --o)
1094    ac_prev=oldincludedir ;;
1095  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1098    oldincludedir=$ac_optarg ;;
1099
1100  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101    ac_prev=prefix ;;
1102  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1103    prefix=$ac_optarg ;;
1104
1105  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106  | --program-pre | --program-pr | --program-p)
1107    ac_prev=program_prefix ;;
1108  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1110    program_prefix=$ac_optarg ;;
1111
1112  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113  | --program-suf | --program-su | --program-s)
1114    ac_prev=program_suffix ;;
1115  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1117    program_suffix=$ac_optarg ;;
1118
1119  -program-transform-name | --program-transform-name \
1120  | --program-transform-nam | --program-transform-na \
1121  | --program-transform-n | --program-transform- \
1122  | --program-transform | --program-transfor \
1123  | --program-transfo | --program-transf \
1124  | --program-trans | --program-tran \
1125  | --progr-tra | --program-tr | --program-t)
1126    ac_prev=program_transform_name ;;
1127  -program-transform-name=* | --program-transform-name=* \
1128  | --program-transform-nam=* | --program-transform-na=* \
1129  | --program-transform-n=* | --program-transform-=* \
1130  | --program-transform=* | --program-transfor=* \
1131  | --program-transfo=* | --program-transf=* \
1132  | --program-trans=* | --program-tran=* \
1133  | --progr-tra=* | --program-tr=* | --program-t=*)
1134    program_transform_name=$ac_optarg ;;
1135
1136  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137    ac_prev=pdfdir ;;
1138  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139    pdfdir=$ac_optarg ;;
1140
1141  -psdir | --psdir | --psdi | --psd | --ps)
1142    ac_prev=psdir ;;
1143  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144    psdir=$ac_optarg ;;
1145
1146  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147  | -silent | --silent | --silen | --sile | --sil)
1148    silent=yes ;;
1149
1150  -runstatedir | --runstatedir | --runstatedi | --runstated \
1151  | --runstate | --runstat | --runsta | --runst | --runs \
1152  | --run | --ru | --r)
1153    ac_prev=runstatedir ;;
1154  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1155  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1156  | --run=* | --ru=* | --r=*)
1157    runstatedir=$ac_optarg ;;
1158
1159  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1160    ac_prev=sbindir ;;
1161  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1162  | --sbi=* | --sb=*)
1163    sbindir=$ac_optarg ;;
1164
1165  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1166  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1167  | --sharedst | --shareds | --shared | --share | --shar \
1168  | --sha | --sh)
1169    ac_prev=sharedstatedir ;;
1170  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1171  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1172  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1173  | --sha=* | --sh=*)
1174    sharedstatedir=$ac_optarg ;;
1175
1176  -site | --site | --sit)
1177    ac_prev=site ;;
1178  -site=* | --site=* | --sit=*)
1179    site=$ac_optarg ;;
1180
1181  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1182    ac_prev=srcdir ;;
1183  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1184    srcdir=$ac_optarg ;;
1185
1186  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1187  | --syscon | --sysco | --sysc | --sys | --sy)
1188    ac_prev=sysconfdir ;;
1189  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1190  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1191    sysconfdir=$ac_optarg ;;
1192
1193  -target | --target | --targe | --targ | --tar | --ta | --t)
1194    ac_prev=target_alias ;;
1195  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1196    target_alias=$ac_optarg ;;
1197
1198  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1199    verbose=yes ;;
1200
1201  -version | --version | --versio | --versi | --vers | -V)
1202    ac_init_version=: ;;
1203
1204  -with-* | --with-*)
1205    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1206    # Reject names that are not valid shell variable names.
1207    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1208      as_fn_error $? "invalid package name: $ac_useropt"
1209    ac_useropt_orig=$ac_useropt
1210    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211    case $ac_user_opts in
1212      *"
1213"with_$ac_useropt"
1214"*) ;;
1215      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1216	 ac_unrecognized_sep=', ';;
1217    esac
1218    eval with_$ac_useropt=\$ac_optarg ;;
1219
1220  -without-* | --without-*)
1221    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1222    # Reject names that are not valid shell variable names.
1223    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1224      as_fn_error $? "invalid package name: $ac_useropt"
1225    ac_useropt_orig=$ac_useropt
1226    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1227    case $ac_user_opts in
1228      *"
1229"with_$ac_useropt"
1230"*) ;;
1231      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1232	 ac_unrecognized_sep=', ';;
1233    esac
1234    eval with_$ac_useropt=no ;;
1235
1236  --x)
1237    # Obsolete; use --with-x.
1238    with_x=yes ;;
1239
1240  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1241  | --x-incl | --x-inc | --x-in | --x-i)
1242    ac_prev=x_includes ;;
1243  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1244  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1245    x_includes=$ac_optarg ;;
1246
1247  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1248  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1249    ac_prev=x_libraries ;;
1250  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1251  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1252    x_libraries=$ac_optarg ;;
1253
1254  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1255Try \`$0 --help' for more information"
1256    ;;
1257
1258  *=*)
1259    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1260    # Reject names that are not valid shell variable names.
1261    case $ac_envvar in #(
1262      '' | [0-9]* | *[!_$as_cr_alnum]* )
1263      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1264    esac
1265    eval $ac_envvar=\$ac_optarg
1266    export $ac_envvar ;;
1267
1268  *)
1269    # FIXME: should be removed in autoconf 3.0.
1270    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1271    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1272      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1273    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1274    ;;
1275
1276  esac
1277done
1278
1279if test -n "$ac_prev"; then
1280  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1281  as_fn_error $? "missing argument to $ac_option"
1282fi
1283
1284if test -n "$ac_unrecognized_opts"; then
1285  case $enable_option_checking in
1286    no) ;;
1287    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1288    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1289  esac
1290fi
1291
1292# Check all directory arguments for consistency.
1293for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1294		datadir sysconfdir sharedstatedir localstatedir includedir \
1295		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1296		libdir localedir mandir runstatedir
1297do
1298  eval ac_val=\$$ac_var
1299  # Remove trailing slashes.
1300  case $ac_val in
1301    */ )
1302      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1303      eval $ac_var=\$ac_val;;
1304  esac
1305  # Be sure to have absolute directory names.
1306  case $ac_val in
1307    [\\/$]* | ?:[\\/]* )  continue;;
1308    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1309  esac
1310  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1311done
1312
1313# There might be people who depend on the old broken behavior: `$host'
1314# used to hold the argument of --host etc.
1315# FIXME: To remove some day.
1316build=$build_alias
1317host=$host_alias
1318target=$target_alias
1319
1320# FIXME: To remove some day.
1321if test "x$host_alias" != x; then
1322  if test "x$build_alias" = x; then
1323    cross_compiling=maybe
1324  elif test "x$build_alias" != "x$host_alias"; then
1325    cross_compiling=yes
1326  fi
1327fi
1328
1329ac_tool_prefix=
1330test -n "$host_alias" && ac_tool_prefix=$host_alias-
1331
1332test "$silent" = yes && exec 6>/dev/null
1333
1334
1335ac_pwd=`pwd` && test -n "$ac_pwd" &&
1336ac_ls_di=`ls -di .` &&
1337ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1338  as_fn_error $? "working directory cannot be determined"
1339test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1340  as_fn_error $? "pwd does not report name of working directory"
1341
1342
1343# Find the source files, if location was not specified.
1344if test -z "$srcdir"; then
1345  ac_srcdir_defaulted=yes
1346  # Try the directory containing this script, then the parent directory.
1347  ac_confdir=`$as_dirname -- "$as_myself" ||
1348$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1349	 X"$as_myself" : 'X\(//\)[^/]' \| \
1350	 X"$as_myself" : 'X\(//\)$' \| \
1351	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1352$as_echo X"$as_myself" |
1353    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354	    s//\1/
1355	    q
1356	  }
1357	  /^X\(\/\/\)[^/].*/{
1358	    s//\1/
1359	    q
1360	  }
1361	  /^X\(\/\/\)$/{
1362	    s//\1/
1363	    q
1364	  }
1365	  /^X\(\/\).*/{
1366	    s//\1/
1367	    q
1368	  }
1369	  s/.*/./; q'`
1370  srcdir=$ac_confdir
1371  if test ! -r "$srcdir/$ac_unique_file"; then
1372    srcdir=..
1373  fi
1374else
1375  ac_srcdir_defaulted=no
1376fi
1377if test ! -r "$srcdir/$ac_unique_file"; then
1378  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1379  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1380fi
1381ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1382ac_abs_confdir=`(
1383	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1384	pwd)`
1385# When building in place, set srcdir=.
1386if test "$ac_abs_confdir" = "$ac_pwd"; then
1387  srcdir=.
1388fi
1389# Remove unnecessary trailing slashes from srcdir.
1390# Double slashes in file names in object file debugging info
1391# mess up M-x gdb in Emacs.
1392case $srcdir in
1393*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1394esac
1395for ac_var in $ac_precious_vars; do
1396  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1397  eval ac_env_${ac_var}_value=\$${ac_var}
1398  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1399  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1400done
1401
1402#
1403# Report the --help message.
1404#
1405if test "$ac_init_help" = "long"; then
1406  # Omit some internal or obsolete options to make the list less imposing.
1407  # This message is too long to be a string in the A/UX 3.1 sh.
1408  cat <<_ACEOF
1409\`configure' configures this package to adapt to many kinds of systems.
1410
1411Usage: $0 [OPTION]... [VAR=VALUE]...
1412
1413To assign environment variables (e.g., CC, CFLAGS...), specify them as
1414VAR=VALUE.  See below for descriptions of some of the useful variables.
1415
1416Defaults for the options are specified in brackets.
1417
1418Configuration:
1419  -h, --help              display this help and exit
1420      --help=short        display options specific to this package
1421      --help=recursive    display the short help of all the included packages
1422  -V, --version           display version information and exit
1423  -q, --quiet, --silent   do not print \`checking ...' messages
1424      --cache-file=FILE   cache test results in FILE [disabled]
1425  -C, --config-cache      alias for \`--cache-file=config.cache'
1426  -n, --no-create         do not create output files
1427      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1428
1429Installation directories:
1430  --prefix=PREFIX         install architecture-independent files in PREFIX
1431                          [$ac_default_prefix]
1432  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1433                          [PREFIX]
1434
1435By default, \`make install' will install all the files in
1436\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1437an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1438for instance \`--prefix=\$HOME'.
1439
1440For better control, use the options below.
1441
1442Fine tuning of the installation directories:
1443  --bindir=DIR            user executables [EPREFIX/bin]
1444  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1445  --libexecdir=DIR        program executables [EPREFIX/libexec]
1446  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1447  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1448  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1449  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1450  --libdir=DIR            object code libraries [EPREFIX/lib]
1451  --includedir=DIR        C header files [PREFIX/include]
1452  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1453  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1454  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1455  --infodir=DIR           info documentation [DATAROOTDIR/info]
1456  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1457  --mandir=DIR            man documentation [DATAROOTDIR/man]
1458  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1459  --htmldir=DIR           html documentation [DOCDIR]
1460  --dvidir=DIR            dvi documentation [DOCDIR]
1461  --pdfdir=DIR            pdf documentation [DOCDIR]
1462  --psdir=DIR             ps documentation [DOCDIR]
1463_ACEOF
1464
1465  cat <<\_ACEOF
1466
1467X features:
1468  --x-includes=DIR    X include files are in DIR
1469  --x-libraries=DIR   X library files are in DIR
1470_ACEOF
1471fi
1472
1473if test -n "$ac_init_help"; then
1474
1475  cat <<\_ACEOF
1476
1477Optional Features:
1478  --disable-option-checking  ignore unrecognized --enable/--with options
1479  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1480  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1481  --enable-fail-if-missing    Fail if dependencies on additional features
1482     specified on the command line are missing.
1483  --disable-darwin        Disable Darwin (Mac OS X) support.
1484  --disable-smack	  Do not check for Smack support.
1485  --disable-selinux	  Do not check for SELinux support.
1486  --disable-xsmp          Disable XSMP session management
1487  --disable-xsmp-interact Disable XSMP interaction
1488  --enable-luainterp=OPTS      Include Lua interpreter.  default=no OPTS=no/yes/dynamic
1489  --enable-mzschemeinterp      Include MzScheme interpreter.
1490  --enable-perlinterp=OPTS     Include Perl interpreter.  default=no OPTS=no/yes/dynamic
1491  --enable-pythoninterp=OPTS   Include Python interpreter. default=no OPTS=no/yes/dynamic
1492  --enable-python3interp=OPTS  Include Python3 interpreter. default=no OPTS=no/yes/dynamic
1493  --enable-tclinterp=OPTS      Include Tcl interpreter. default=no OPTS=no/yes/dynamic
1494  --enable-rubyinterp=OPTS     Include Ruby interpreter.  default=no OPTS=no/yes/dynamic
1495  --enable-cscope         Include cscope interface.
1496  --disable-netbeans      Disable NetBeans integration support.
1497  --disable-channel       Disable process communication support.
1498  --enable-terminal       Enable terminal emulation support.
1499  --enable-autoservername Automatically define servername at vim startup.
1500  --enable-multibyte      Include multibyte editing support.
1501  --disable-rightleft     Do not include Right-to-Left language support.
1502  --disable-arabic        Do not include Arabic language support.
1503  --disable-farsi         Deprecated.
1504  --enable-hangulinput    Include Hangul input support.
1505  --enable-xim            Include XIM input support.
1506  --enable-fontset        Include X fontset output support.
1507  --enable-gui=OPTS       X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon
1508  --enable-gtk2-check     If auto-select GUI, check for GTK+ 2 default=yes
1509  --enable-gnome-check    If GTK GUI, check for GNOME default=no
1510  --enable-gtk3-check     If auto-select GUI, check for GTK+ 3 default=yes
1511  --enable-motif-check    If auto-select GUI, check for Motif default=yes
1512  --enable-athena-check   If auto-select GUI, check for Athena default=yes
1513  --enable-nextaw-check   If auto-select GUI, check for neXtaw default=yes
1514  --enable-carbon-check   If auto-select GUI, check for Carbon default=yes
1515  --disable-gtktest       Do not try to compile and run a test GTK program
1516  --disable-icon-cache-update        update disabled
1517  --disable-desktop-database-update  update disabled
1518  --disable-largefile     omit support for large files
1519  --disable-canberra      Do not use libcanberra.
1520  --disable-acl           No check for ACL support.
1521  --disable-gpm           Don't use gpm (Linux mouse daemon).
1522  --disable-sysmouse      Don't use sysmouse (mouse in *BSD console).
1523  --disable-nls           Don't support NLS (gettext()).
1524
1525Optional Packages:
1526  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1527  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1528  --with-mac-arch=ARCH    current, intel, ppc or both
1529  --with-developer-dir=PATH    use PATH as location for Xcode developer tools
1530  --with-local-dir=PATH   search PATH instead of /usr/local for local libraries.
1531  --without-local-dir     do not search /usr/local for local libraries.
1532  --with-vim-name=NAME    what to call the Vim executable
1533  --with-ex-name=NAME     what to call the Ex executable
1534  --with-view-name=NAME   what to call the View executable
1535  --with-global-runtime=DIR    global runtime directory in 'runtimepath', comma-separated for multiple directories
1536  --with-modified-by=NAME       name of who modified a release version
1537  --with-features=TYPE    tiny, small, normal, big or huge (default: huge)
1538  --with-compiledby=NAME  name to show in :version message
1539  --with-lua-prefix=PFX   Prefix where Lua is installed.
1540  --with-luajit           Link with LuaJIT instead of Lua.
1541  --with-plthome=PLTHOME   Use PLTHOME.
1542  --with-python-command=NAME  name of the Python 2 command (default: python2 or python)
1543  --with-python-config-dir=PATH  Python's config directory (deprecated)
1544  --with-python3-command=NAME  name of the Python 3 command (default: python3 or python)
1545  --with-python3-config-dir=PATH  Python's config directory (deprecated)
1546  --with-tclsh=PATH       which tclsh to use (default: tclsh8.0)
1547  --with-ruby-command=RUBY  name of the Ruby command (default: ruby)
1548  --with-x                use the X Window System
1549  --with-gnome-includes=DIR Specify location of GNOME headers
1550  --with-gnome-libs=DIR   Specify location of GNOME libs
1551  --with-gnome            Specify prefix for GNOME files
1552  --with-motif-lib=STRING Library for Motif
1553  --with-tlib=library     terminal library to be used
1554
1555Some influential environment variables:
1556  CC          C compiler command
1557  CFLAGS      C compiler flags
1558  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1559              nonstandard directory <lib dir>
1560  LIBS        libraries to pass to the linker, e.g. -l<library>
1561  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1562              you have headers in a nonstandard directory <include dir>
1563  CPP         C preprocessor
1564  XMKMF       Path to xmkmf, Makefile generator for X Window System
1565
1566Use these variables to override the choices made by `configure' or to help
1567it to find libraries and programs with nonstandard names/locations.
1568
1569Report bugs to the package provider.
1570_ACEOF
1571ac_status=$?
1572fi
1573
1574if test "$ac_init_help" = "recursive"; then
1575  # If there are subdirs, report their specific --help.
1576  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1577    test -d "$ac_dir" ||
1578      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1579      continue
1580    ac_builddir=.
1581
1582case "$ac_dir" in
1583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584*)
1585  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1586  # A ".." for each directory in $ac_dir_suffix.
1587  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1588  case $ac_top_builddir_sub in
1589  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1591  esac ;;
1592esac
1593ac_abs_top_builddir=$ac_pwd
1594ac_abs_builddir=$ac_pwd$ac_dir_suffix
1595# for backward compatibility:
1596ac_top_builddir=$ac_top_build_prefix
1597
1598case $srcdir in
1599  .)  # We are building in place.
1600    ac_srcdir=.
1601    ac_top_srcdir=$ac_top_builddir_sub
1602    ac_abs_top_srcdir=$ac_pwd ;;
1603  [\\/]* | ?:[\\/]* )  # Absolute name.
1604    ac_srcdir=$srcdir$ac_dir_suffix;
1605    ac_top_srcdir=$srcdir
1606    ac_abs_top_srcdir=$srcdir ;;
1607  *) # Relative name.
1608    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1609    ac_top_srcdir=$ac_top_build_prefix$srcdir
1610    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1611esac
1612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1613
1614    cd "$ac_dir" || { ac_status=$?; continue; }
1615    # Check for guested configure.
1616    if test -f "$ac_srcdir/configure.gnu"; then
1617      echo &&
1618      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1619    elif test -f "$ac_srcdir/configure"; then
1620      echo &&
1621      $SHELL "$ac_srcdir/configure" --help=recursive
1622    else
1623      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1624    fi || ac_status=$?
1625    cd "$ac_pwd" || { ac_status=$?; break; }
1626  done
1627fi
1628
1629test -n "$ac_init_help" && exit $ac_status
1630if $ac_init_version; then
1631  cat <<\_ACEOF
1632configure
1633generated by GNU Autoconf 2.69
1634
1635Copyright (C) 2012 Free Software Foundation, Inc.
1636This configure script is free software; the Free Software Foundation
1637gives unlimited permission to copy, distribute and modify it.
1638_ACEOF
1639  exit
1640fi
1641
1642## ------------------------ ##
1643## Autoconf initialization. ##
1644## ------------------------ ##
1645
1646# ac_fn_c_try_compile LINENO
1647# --------------------------
1648# Try to compile conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_compile ()
1650{
1651  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652  rm -f conftest.$ac_objext
1653  if { { ac_try="$ac_compile"
1654case "(($ac_try" in
1655  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656  *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660  (eval "$ac_compile") 2>conftest.err
1661  ac_status=$?
1662  if test -s conftest.err; then
1663    grep -v '^ *+' conftest.err >conftest.er1
1664    cat conftest.er1 >&5
1665    mv -f conftest.er1 conftest.err
1666  fi
1667  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668  test $ac_status = 0; } && {
1669	 test -z "$ac_c_werror_flag" ||
1670	 test ! -s conftest.err
1671       } && test -s conftest.$ac_objext; then :
1672  ac_retval=0
1673else
1674  $as_echo "$as_me: failed program was:" >&5
1675sed 's/^/| /' conftest.$ac_ext >&5
1676
1677	ac_retval=1
1678fi
1679  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1680  as_fn_set_status $ac_retval
1681
1682} # ac_fn_c_try_compile
1683
1684# ac_fn_c_try_cpp LINENO
1685# ----------------------
1686# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_cpp ()
1688{
1689  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690  if { { ac_try="$ac_cpp conftest.$ac_ext"
1691case "(($ac_try" in
1692  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693  *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1698  ac_status=$?
1699  if test -s conftest.err; then
1700    grep -v '^ *+' conftest.err >conftest.er1
1701    cat conftest.er1 >&5
1702    mv -f conftest.er1 conftest.err
1703  fi
1704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705  test $ac_status = 0; } > conftest.i && {
1706	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1707	 test ! -s conftest.err
1708       }; then :
1709  ac_retval=0
1710else
1711  $as_echo "$as_me: failed program was:" >&5
1712sed 's/^/| /' conftest.$ac_ext >&5
1713
1714    ac_retval=1
1715fi
1716  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1717  as_fn_set_status $ac_retval
1718
1719} # ac_fn_c_try_cpp
1720
1721# ac_fn_c_try_link LINENO
1722# -----------------------
1723# Try to link conftest.$ac_ext, and return whether this succeeded.
1724ac_fn_c_try_link ()
1725{
1726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1727  rm -f conftest.$ac_objext conftest$ac_exeext
1728  if { { ac_try="$ac_link"
1729case "(($ac_try" in
1730  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1731  *) ac_try_echo=$ac_try;;
1732esac
1733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1734$as_echo "$ac_try_echo"; } >&5
1735  (eval "$ac_link") 2>conftest.err
1736  ac_status=$?
1737  if test -s conftest.err; then
1738    grep -v '^ *+' conftest.err >conftest.er1
1739    cat conftest.er1 >&5
1740    mv -f conftest.er1 conftest.err
1741  fi
1742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1743  test $ac_status = 0; } && {
1744	 test -z "$ac_c_werror_flag" ||
1745	 test ! -s conftest.err
1746       } && test -s conftest$ac_exeext && {
1747	 test "$cross_compiling" = yes ||
1748	 test -x conftest$ac_exeext
1749       }; then :
1750  ac_retval=0
1751else
1752  $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755	ac_retval=1
1756fi
1757  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1758  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1759  # interfere with the next link command; also delete a directory that is
1760  # left behind by Apple's compiler.  We do this before executing the actions.
1761  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1762  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1763  as_fn_set_status $ac_retval
1764
1765} # ac_fn_c_try_link
1766
1767# ac_fn_c_try_run LINENO
1768# ----------------------
1769# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1770# that executables *can* be run.
1771ac_fn_c_try_run ()
1772{
1773  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1774  if { { ac_try="$ac_link"
1775case "(($ac_try" in
1776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1777  *) ac_try_echo=$ac_try;;
1778esac
1779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1780$as_echo "$ac_try_echo"; } >&5
1781  (eval "$ac_link") 2>&5
1782  ac_status=$?
1783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1785  { { case "(($ac_try" in
1786  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1787  *) ac_try_echo=$ac_try;;
1788esac
1789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1790$as_echo "$ac_try_echo"; } >&5
1791  (eval "$ac_try") 2>&5
1792  ac_status=$?
1793  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1794  test $ac_status = 0; }; }; then :
1795  ac_retval=0
1796else
1797  $as_echo "$as_me: program exited with status $ac_status" >&5
1798       $as_echo "$as_me: failed program was:" >&5
1799sed 's/^/| /' conftest.$ac_ext >&5
1800
1801       ac_retval=$ac_status
1802fi
1803  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1804  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1805  as_fn_set_status $ac_retval
1806
1807} # ac_fn_c_try_run
1808
1809# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1810# -------------------------------------------------------
1811# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1812# the include files in INCLUDES and setting the cache variable VAR
1813# accordingly.
1814ac_fn_c_check_header_mongrel ()
1815{
1816  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817  if eval \${$3+:} false; then :
1818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1819$as_echo_n "checking for $2... " >&6; }
1820if eval \${$3+:} false; then :
1821  $as_echo_n "(cached) " >&6
1822fi
1823eval ac_res=\$$3
1824	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1825$as_echo "$ac_res" >&6; }
1826else
1827  # Is the header compilable?
1828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1829$as_echo_n "checking $2 usability... " >&6; }
1830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1831/* end confdefs.h.  */
1832$4
1833#include <$2>
1834_ACEOF
1835if ac_fn_c_try_compile "$LINENO"; then :
1836  ac_header_compiler=yes
1837else
1838  ac_header_compiler=no
1839fi
1840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1842$as_echo "$ac_header_compiler" >&6; }
1843
1844# Is the header present?
1845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1846$as_echo_n "checking $2 presence... " >&6; }
1847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1848/* end confdefs.h.  */
1849#include <$2>
1850_ACEOF
1851if ac_fn_c_try_cpp "$LINENO"; then :
1852  ac_header_preproc=yes
1853else
1854  ac_header_preproc=no
1855fi
1856rm -f conftest.err conftest.i conftest.$ac_ext
1857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1858$as_echo "$ac_header_preproc" >&6; }
1859
1860# So?  What about this header?
1861case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1862  yes:no: )
1863    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1864$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1865    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867    ;;
1868  no:yes:* )
1869    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1870$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1871    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1872$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1873    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1874$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1875    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1876$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1877    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1878$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1879    ;;
1880esac
1881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1882$as_echo_n "checking for $2... " >&6; }
1883if eval \${$3+:} false; then :
1884  $as_echo_n "(cached) " >&6
1885else
1886  eval "$3=\$ac_header_compiler"
1887fi
1888eval ac_res=\$$3
1889	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1890$as_echo "$ac_res" >&6; }
1891fi
1892  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1893
1894} # ac_fn_c_check_header_mongrel
1895
1896# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1897# -------------------------------------------------------
1898# Tests whether HEADER exists and can be compiled using the include files in
1899# INCLUDES, setting the cache variable VAR accordingly.
1900ac_fn_c_check_header_compile ()
1901{
1902  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1903  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1904$as_echo_n "checking for $2... " >&6; }
1905if eval \${$3+:} false; then :
1906  $as_echo_n "(cached) " >&6
1907else
1908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h.  */
1910$4
1911#include <$2>
1912_ACEOF
1913if ac_fn_c_try_compile "$LINENO"; then :
1914  eval "$3=yes"
1915else
1916  eval "$3=no"
1917fi
1918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1919fi
1920eval ac_res=\$$3
1921	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922$as_echo "$ac_res" >&6; }
1923  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1924
1925} # ac_fn_c_check_header_compile
1926
1927# ac_fn_c_check_func LINENO FUNC VAR
1928# ----------------------------------
1929# Tests whether FUNC exists, setting the cache variable VAR accordingly
1930ac_fn_c_check_func ()
1931{
1932  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934$as_echo_n "checking for $2... " >&6; }
1935if eval \${$3+:} false; then :
1936  $as_echo_n "(cached) " >&6
1937else
1938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h.  */
1940/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1941   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1942#define $2 innocuous_$2
1943
1944/* System header to define __stub macros and hopefully few prototypes,
1945    which can conflict with char $2 (); below.
1946    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1947    <limits.h> exists even on freestanding compilers.  */
1948
1949#ifdef __STDC__
1950# include <limits.h>
1951#else
1952# include <assert.h>
1953#endif
1954
1955#undef $2
1956
1957/* Override any GCC internal prototype to avoid an error.
1958   Use char because int might match the return type of a GCC
1959   builtin and then its argument prototype would still apply.  */
1960#ifdef __cplusplus
1961extern "C"
1962#endif
1963char $2 ();
1964/* The GNU C library defines this for functions which it implements
1965    to always fail with ENOSYS.  Some functions are actually named
1966    something starting with __ and the normal name is an alias.  */
1967#if defined __stub_$2 || defined __stub___$2
1968choke me
1969#endif
1970
1971int
1972main ()
1973{
1974return $2 ();
1975  ;
1976  return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_link "$LINENO"; then :
1980  eval "$3=yes"
1981else
1982  eval "$3=no"
1983fi
1984rm -f core conftest.err conftest.$ac_objext \
1985    conftest$ac_exeext conftest.$ac_ext
1986fi
1987eval ac_res=\$$3
1988	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
1990  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1991
1992} # ac_fn_c_check_func
1993
1994# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1995# -------------------------------------------
1996# Tests whether TYPE exists after having included INCLUDES, setting cache
1997# variable VAR accordingly.
1998ac_fn_c_check_type ()
1999{
2000  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2002$as_echo_n "checking for $2... " >&6; }
2003if eval \${$3+:} false; then :
2004  $as_echo_n "(cached) " >&6
2005else
2006  eval "$3=no"
2007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h.  */
2009$4
2010int
2011main ()
2012{
2013if (sizeof ($2))
2014	 return 0;
2015  ;
2016  return 0;
2017}
2018_ACEOF
2019if ac_fn_c_try_compile "$LINENO"; then :
2020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2021/* end confdefs.h.  */
2022$4
2023int
2024main ()
2025{
2026if (sizeof (($2)))
2027	    return 0;
2028  ;
2029  return 0;
2030}
2031_ACEOF
2032if ac_fn_c_try_compile "$LINENO"; then :
2033
2034else
2035  eval "$3=yes"
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040fi
2041eval ac_res=\$$3
2042	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2043$as_echo "$ac_res" >&6; }
2044  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2045
2046} # ac_fn_c_check_type
2047
2048# ac_fn_c_find_uintX_t LINENO BITS VAR
2049# ------------------------------------
2050# Finds an unsigned integer type with width BITS, setting cache variable VAR
2051# accordingly.
2052ac_fn_c_find_uintX_t ()
2053{
2054  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2056$as_echo_n "checking for uint$2_t... " >&6; }
2057if eval \${$3+:} false; then :
2058  $as_echo_n "(cached) " >&6
2059else
2060  eval "$3=no"
2061     # Order is important - never check a type that is potentially smaller
2062     # than half of the expected target width.
2063     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2064	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2065       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2066/* end confdefs.h.  */
2067$ac_includes_default
2068int
2069main ()
2070{
2071static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2072test_array [0] = 0;
2073return test_array [0];
2074
2075  ;
2076  return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080  case $ac_type in #(
2081  uint$2_t) :
2082    eval "$3=yes" ;; #(
2083  *) :
2084    eval "$3=\$ac_type" ;;
2085esac
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088       if eval test \"x\$"$3"\" = x"no"; then :
2089
2090else
2091  break
2092fi
2093     done
2094fi
2095eval ac_res=\$$3
2096	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2097$as_echo "$ac_res" >&6; }
2098  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2099
2100} # ac_fn_c_find_uintX_t
2101
2102# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2103# --------------------------------------------
2104# Tries to find the compile-time value of EXPR in a program that includes
2105# INCLUDES, setting VAR accordingly. Returns whether the value could be
2106# computed
2107ac_fn_c_compute_int ()
2108{
2109  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2110  if test "$cross_compiling" = yes; then
2111    # Depending upon the size, compute the lo and hi bounds.
2112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h.  */
2114$4
2115int
2116main ()
2117{
2118static int test_array [1 - 2 * !(($2) >= 0)];
2119test_array [0] = 0;
2120return test_array [0];
2121
2122  ;
2123  return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127  ac_lo=0 ac_mid=0
2128  while :; do
2129    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h.  */
2131$4
2132int
2133main ()
2134{
2135static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2136test_array [0] = 0;
2137return test_array [0];
2138
2139  ;
2140  return 0;
2141}
2142_ACEOF
2143if ac_fn_c_try_compile "$LINENO"; then :
2144  ac_hi=$ac_mid; break
2145else
2146  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2147			if test $ac_lo -le $ac_mid; then
2148			  ac_lo= ac_hi=
2149			  break
2150			fi
2151			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154  done
2155else
2156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157/* end confdefs.h.  */
2158$4
2159int
2160main ()
2161{
2162static int test_array [1 - 2 * !(($2) < 0)];
2163test_array [0] = 0;
2164return test_array [0];
2165
2166  ;
2167  return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_compile "$LINENO"; then :
2171  ac_hi=-1 ac_mid=-1
2172  while :; do
2173    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h.  */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2180test_array [0] = 0;
2181return test_array [0];
2182
2183  ;
2184  return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_compile "$LINENO"; then :
2188  ac_lo=$ac_mid; break
2189else
2190  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2191			if test $ac_mid -le $ac_hi; then
2192			  ac_lo= ac_hi=
2193			  break
2194			fi
2195			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198  done
2199else
2200  ac_lo= ac_hi=
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203fi
2204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2205# Binary search between lo and hi bounds.
2206while test "x$ac_lo" != "x$ac_hi"; do
2207  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209/* end confdefs.h.  */
2210$4
2211int
2212main ()
2213{
2214static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2215test_array [0] = 0;
2216return test_array [0];
2217
2218  ;
2219  return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_compile "$LINENO"; then :
2223  ac_hi=$ac_mid
2224else
2225  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2226fi
2227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228done
2229case $ac_lo in #((
2230?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2231'') ac_retval=1 ;;
2232esac
2233  else
2234    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h.  */
2236$4
2237static long int longval () { return $2; }
2238static unsigned long int ulongval () { return $2; }
2239#include <stdio.h>
2240#include <stdlib.h>
2241int
2242main ()
2243{
2244
2245  FILE *f = fopen ("conftest.val", "w");
2246  if (! f)
2247    return 1;
2248  if (($2) < 0)
2249    {
2250      long int i = longval ();
2251      if (i != ($2))
2252	return 1;
2253      fprintf (f, "%ld", i);
2254    }
2255  else
2256    {
2257      unsigned long int i = ulongval ();
2258      if (i != ($2))
2259	return 1;
2260      fprintf (f, "%lu", i);
2261    }
2262  /* Do not output a trailing newline, as this causes \r\n confusion
2263     on some platforms.  */
2264  return ferror (f) || fclose (f) != 0;
2265
2266  ;
2267  return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_run "$LINENO"; then :
2271  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2272else
2273  ac_retval=1
2274fi
2275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2276  conftest.$ac_objext conftest.beam conftest.$ac_ext
2277rm -f conftest.val
2278
2279  fi
2280  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281  as_fn_set_status $ac_retval
2282
2283} # ac_fn_c_compute_int
2284cat >auto/config.log <<_ACEOF
2285This file contains any messages produced by compilers while
2286running configure, to aid debugging if configure makes a mistake.
2287
2288It was created by $as_me, which was
2289generated by GNU Autoconf 2.69.  Invocation command line was
2290
2291  $ $0 $@
2292
2293_ACEOF
2294exec 5>>auto/config.log
2295{
2296cat <<_ASUNAME
2297## --------- ##
2298## Platform. ##
2299## --------- ##
2300
2301hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2302uname -m = `(uname -m) 2>/dev/null || echo unknown`
2303uname -r = `(uname -r) 2>/dev/null || echo unknown`
2304uname -s = `(uname -s) 2>/dev/null || echo unknown`
2305uname -v = `(uname -v) 2>/dev/null || echo unknown`
2306
2307/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2308/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2309
2310/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2311/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2312/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2313/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2314/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2315/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2316/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2317
2318_ASUNAME
2319
2320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2321for as_dir in $PATH
2322do
2323  IFS=$as_save_IFS
2324  test -z "$as_dir" && as_dir=.
2325    $as_echo "PATH: $as_dir"
2326  done
2327IFS=$as_save_IFS
2328
2329} >&5
2330
2331cat >&5 <<_ACEOF
2332
2333
2334## ----------- ##
2335## Core tests. ##
2336## ----------- ##
2337
2338_ACEOF
2339
2340
2341# Keep a trace of the command line.
2342# Strip out --no-create and --no-recursion so they do not pile up.
2343# Strip out --silent because we don't want to record it for future runs.
2344# Also quote any args containing shell meta-characters.
2345# Make two passes to allow for proper duplicate-argument suppression.
2346ac_configure_args=
2347ac_configure_args0=
2348ac_configure_args1=
2349ac_must_keep_next=false
2350for ac_pass in 1 2
2351do
2352  for ac_arg
2353  do
2354    case $ac_arg in
2355    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2356    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2357    | -silent | --silent | --silen | --sile | --sil)
2358      continue ;;
2359    *\'*)
2360      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2361    esac
2362    case $ac_pass in
2363    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2364    2)
2365      as_fn_append ac_configure_args1 " '$ac_arg'"
2366      if test $ac_must_keep_next = true; then
2367	ac_must_keep_next=false # Got value, back to normal.
2368      else
2369	case $ac_arg in
2370	  *=* | --config-cache | -C | -disable-* | --disable-* \
2371	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2372	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2373	  | -with-* | --with-* | -without-* | --without-* | --x)
2374	    case "$ac_configure_args0 " in
2375	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2376	    esac
2377	    ;;
2378	  -* ) ac_must_keep_next=true ;;
2379	esac
2380      fi
2381      as_fn_append ac_configure_args " '$ac_arg'"
2382      ;;
2383    esac
2384  done
2385done
2386{ ac_configure_args0=; unset ac_configure_args0;}
2387{ ac_configure_args1=; unset ac_configure_args1;}
2388
2389# When interrupted or exit'd, cleanup temporary files, and complete
2390# config.log.  We remove comments because anyway the quotes in there
2391# would cause problems or look ugly.
2392# WARNING: Use '\'' to represent an apostrophe within the trap.
2393# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2394trap 'exit_status=$?
2395  # Save into config.log some information that might help in debugging.
2396  {
2397    echo
2398
2399    $as_echo "## ---------------- ##
2400## Cache variables. ##
2401## ---------------- ##"
2402    echo
2403    # The following way of writing the cache mishandles newlines in values,
2404(
2405  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2406    eval ac_val=\$$ac_var
2407    case $ac_val in #(
2408    *${as_nl}*)
2409      case $ac_var in #(
2410      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2411$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2412      esac
2413      case $ac_var in #(
2414      _ | IFS | as_nl) ;; #(
2415      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2416      *) { eval $ac_var=; unset $ac_var;} ;;
2417      esac ;;
2418    esac
2419  done
2420  (set) 2>&1 |
2421    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2422    *${as_nl}ac_space=\ *)
2423      sed -n \
2424	"s/'\''/'\''\\\\'\'''\''/g;
2425	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2426      ;; #(
2427    *)
2428      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2429      ;;
2430    esac |
2431    sort
2432)
2433    echo
2434
2435    $as_echo "## ----------------- ##
2436## Output variables. ##
2437## ----------------- ##"
2438    echo
2439    for ac_var in $ac_subst_vars
2440    do
2441      eval ac_val=\$$ac_var
2442      case $ac_val in
2443      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2444      esac
2445      $as_echo "$ac_var='\''$ac_val'\''"
2446    done | sort
2447    echo
2448
2449    if test -n "$ac_subst_files"; then
2450      $as_echo "## ------------------- ##
2451## File substitutions. ##
2452## ------------------- ##"
2453      echo
2454      for ac_var in $ac_subst_files
2455      do
2456	eval ac_val=\$$ac_var
2457	case $ac_val in
2458	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2459	esac
2460	$as_echo "$ac_var='\''$ac_val'\''"
2461      done | sort
2462      echo
2463    fi
2464
2465    if test -s confdefs.h; then
2466      $as_echo "## ----------- ##
2467## confdefs.h. ##
2468## ----------- ##"
2469      echo
2470      cat confdefs.h
2471      echo
2472    fi
2473    test "$ac_signal" != 0 &&
2474      $as_echo "$as_me: caught signal $ac_signal"
2475    $as_echo "$as_me: exit $exit_status"
2476  } >&5
2477  rm -f core *.core core.conftest.* &&
2478    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2479    exit $exit_status
2480' 0
2481for ac_signal in 1 2 13 15; do
2482  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2483done
2484ac_signal=0
2485
2486# confdefs.h avoids OS command line length limits that DEFS can exceed.
2487rm -f -r conftest* confdefs.h
2488
2489$as_echo "/* confdefs.h */" > confdefs.h
2490
2491# Predefined preprocessor variables.
2492
2493cat >>confdefs.h <<_ACEOF
2494#define PACKAGE_NAME "$PACKAGE_NAME"
2495_ACEOF
2496
2497cat >>confdefs.h <<_ACEOF
2498#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2499_ACEOF
2500
2501cat >>confdefs.h <<_ACEOF
2502#define PACKAGE_VERSION "$PACKAGE_VERSION"
2503_ACEOF
2504
2505cat >>confdefs.h <<_ACEOF
2506#define PACKAGE_STRING "$PACKAGE_STRING"
2507_ACEOF
2508
2509cat >>confdefs.h <<_ACEOF
2510#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2511_ACEOF
2512
2513cat >>confdefs.h <<_ACEOF
2514#define PACKAGE_URL "$PACKAGE_URL"
2515_ACEOF
2516
2517
2518# Let the site file select an alternate cache file if it wants to.
2519# Prefer an explicitly selected file to automatically selected ones.
2520ac_site_file1=NONE
2521ac_site_file2=NONE
2522if test -n "$CONFIG_SITE"; then
2523  # We do not want a PATH search for config.site.
2524  case $CONFIG_SITE in #((
2525    -*)  ac_site_file1=./$CONFIG_SITE;;
2526    */*) ac_site_file1=$CONFIG_SITE;;
2527    *)   ac_site_file1=./$CONFIG_SITE;;
2528  esac
2529elif test "x$prefix" != xNONE; then
2530  ac_site_file1=$prefix/share/config.site
2531  ac_site_file2=$prefix/etc/config.site
2532else
2533  ac_site_file1=$ac_default_prefix/share/config.site
2534  ac_site_file2=$ac_default_prefix/etc/config.site
2535fi
2536for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2537do
2538  test "x$ac_site_file" = xNONE && continue
2539  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2540    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2541$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2542    sed 's/^/| /' "$ac_site_file" >&5
2543    . "$ac_site_file" \
2544      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2546as_fn_error $? "failed to load site script $ac_site_file
2547See \`config.log' for more details" "$LINENO" 5; }
2548  fi
2549done
2550
2551if test -r "$cache_file"; then
2552  # Some versions of bash will fail to source /dev/null (special files
2553  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2554  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2555    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2556$as_echo "$as_me: loading cache $cache_file" >&6;}
2557    case $cache_file in
2558      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2559      *)                      . "./$cache_file";;
2560    esac
2561  fi
2562else
2563  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2564$as_echo "$as_me: creating cache $cache_file" >&6;}
2565  >$cache_file
2566fi
2567
2568# Check that the precious variables saved in the cache have kept the same
2569# value.
2570ac_cache_corrupted=false
2571for ac_var in $ac_precious_vars; do
2572  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2573  eval ac_new_set=\$ac_env_${ac_var}_set
2574  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2575  eval ac_new_val=\$ac_env_${ac_var}_value
2576  case $ac_old_set,$ac_new_set in
2577    set,)
2578      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2579$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2580      ac_cache_corrupted=: ;;
2581    ,set)
2582      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2583$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2584      ac_cache_corrupted=: ;;
2585    ,);;
2586    *)
2587      if test "x$ac_old_val" != "x$ac_new_val"; then
2588	# differences in whitespace do not lead to failure.
2589	ac_old_val_w=`echo x $ac_old_val`
2590	ac_new_val_w=`echo x $ac_new_val`
2591	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2592	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2593$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2594	  ac_cache_corrupted=:
2595	else
2596	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2597$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2598	  eval $ac_var=\$ac_old_val
2599	fi
2600	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2601$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2602	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2603$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2604      fi;;
2605  esac
2606  # Pass precious variables to config.status.
2607  if test "$ac_new_set" = set; then
2608    case $ac_new_val in
2609    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2610    *) ac_arg=$ac_var=$ac_new_val ;;
2611    esac
2612    case " $ac_configure_args " in
2613      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2614      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2615    esac
2616  fi
2617done
2618if $ac_cache_corrupted; then
2619  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2620$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2621  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2622$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2623  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2624fi
2625## -------------------- ##
2626## Main body of script. ##
2627## -------------------- ##
2628
2629ac_ext=c
2630ac_cpp='$CPP $CPPFLAGS'
2631ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2632ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2633ac_compiler_gnu=$ac_cv_c_compiler_gnu
2634
2635
2636ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2637
2638
2639$as_echo "#define UNIX 1" >>confdefs.h
2640
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2642$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2643set x ${MAKE-make}
2644ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2645if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2646  $as_echo_n "(cached) " >&6
2647else
2648  cat >conftest.make <<\_ACEOF
2649SHELL = /bin/sh
2650all:
2651	@echo '@@@%%%=$(MAKE)=@@@%%%'
2652_ACEOF
2653# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2654case `${MAKE-make} -f conftest.make 2>/dev/null` in
2655  *@@@%%%=?*=@@@%%%*)
2656    eval ac_cv_prog_make_${ac_make}_set=yes;;
2657  *)
2658    eval ac_cv_prog_make_${ac_make}_set=no;;
2659esac
2660rm -f conftest.make
2661fi
2662if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2664$as_echo "yes" >&6; }
2665  SET_MAKE=
2666else
2667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2668$as_echo "no" >&6; }
2669  SET_MAKE="MAKE=${MAKE-make}"
2670fi
2671
2672
2673ac_ext=c
2674ac_cpp='$CPP $CPPFLAGS'
2675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2677ac_compiler_gnu=$ac_cv_c_compiler_gnu
2678if test -n "$ac_tool_prefix"; then
2679  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2680set dummy ${ac_tool_prefix}gcc; ac_word=$2
2681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2682$as_echo_n "checking for $ac_word... " >&6; }
2683if ${ac_cv_prog_CC+:} false; then :
2684  $as_echo_n "(cached) " >&6
2685else
2686  if test -n "$CC"; then
2687  ac_cv_prog_CC="$CC" # Let the user override the test.
2688else
2689as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2690for as_dir in $PATH
2691do
2692  IFS=$as_save_IFS
2693  test -z "$as_dir" && as_dir=.
2694    for ac_exec_ext in '' $ac_executable_extensions; do
2695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2696    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2698    break 2
2699  fi
2700done
2701  done
2702IFS=$as_save_IFS
2703
2704fi
2705fi
2706CC=$ac_cv_prog_CC
2707if test -n "$CC"; then
2708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2709$as_echo "$CC" >&6; }
2710else
2711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2712$as_echo "no" >&6; }
2713fi
2714
2715
2716fi
2717if test -z "$ac_cv_prog_CC"; then
2718  ac_ct_CC=$CC
2719  # Extract the first word of "gcc", so it can be a program name with args.
2720set dummy gcc; ac_word=$2
2721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2722$as_echo_n "checking for $ac_word... " >&6; }
2723if ${ac_cv_prog_ac_ct_CC+:} false; then :
2724  $as_echo_n "(cached) " >&6
2725else
2726  if test -n "$ac_ct_CC"; then
2727  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2728else
2729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2730for as_dir in $PATH
2731do
2732  IFS=$as_save_IFS
2733  test -z "$as_dir" && as_dir=.
2734    for ac_exec_ext in '' $ac_executable_extensions; do
2735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2736    ac_cv_prog_ac_ct_CC="gcc"
2737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2738    break 2
2739  fi
2740done
2741  done
2742IFS=$as_save_IFS
2743
2744fi
2745fi
2746ac_ct_CC=$ac_cv_prog_ac_ct_CC
2747if test -n "$ac_ct_CC"; then
2748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2749$as_echo "$ac_ct_CC" >&6; }
2750else
2751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2752$as_echo "no" >&6; }
2753fi
2754
2755  if test "x$ac_ct_CC" = x; then
2756    CC=""
2757  else
2758    case $cross_compiling:$ac_tool_warned in
2759yes:)
2760{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2761$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2762ac_tool_warned=yes ;;
2763esac
2764    CC=$ac_ct_CC
2765  fi
2766else
2767  CC="$ac_cv_prog_CC"
2768fi
2769
2770if test -z "$CC"; then
2771          if test -n "$ac_tool_prefix"; then
2772    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2773set dummy ${ac_tool_prefix}cc; ac_word=$2
2774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2775$as_echo_n "checking for $ac_word... " >&6; }
2776if ${ac_cv_prog_CC+:} false; then :
2777  $as_echo_n "(cached) " >&6
2778else
2779  if test -n "$CC"; then
2780  ac_cv_prog_CC="$CC" # Let the user override the test.
2781else
2782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2783for as_dir in $PATH
2784do
2785  IFS=$as_save_IFS
2786  test -z "$as_dir" && as_dir=.
2787    for ac_exec_ext in '' $ac_executable_extensions; do
2788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2789    ac_cv_prog_CC="${ac_tool_prefix}cc"
2790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2791    break 2
2792  fi
2793done
2794  done
2795IFS=$as_save_IFS
2796
2797fi
2798fi
2799CC=$ac_cv_prog_CC
2800if test -n "$CC"; then
2801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2802$as_echo "$CC" >&6; }
2803else
2804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
2806fi
2807
2808
2809  fi
2810fi
2811if test -z "$CC"; then
2812  # Extract the first word of "cc", so it can be a program name with args.
2813set dummy cc; ac_word=$2
2814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2815$as_echo_n "checking for $ac_word... " >&6; }
2816if ${ac_cv_prog_CC+:} false; then :
2817  $as_echo_n "(cached) " >&6
2818else
2819  if test -n "$CC"; then
2820  ac_cv_prog_CC="$CC" # Let the user override the test.
2821else
2822  ac_prog_rejected=no
2823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2824for as_dir in $PATH
2825do
2826  IFS=$as_save_IFS
2827  test -z "$as_dir" && as_dir=.
2828    for ac_exec_ext in '' $ac_executable_extensions; do
2829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2830    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2831       ac_prog_rejected=yes
2832       continue
2833     fi
2834    ac_cv_prog_CC="cc"
2835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2836    break 2
2837  fi
2838done
2839  done
2840IFS=$as_save_IFS
2841
2842if test $ac_prog_rejected = yes; then
2843  # We found a bogon in the path, so make sure we never use it.
2844  set dummy $ac_cv_prog_CC
2845  shift
2846  if test $# != 0; then
2847    # We chose a different compiler from the bogus one.
2848    # However, it has the same basename, so the bogon will be chosen
2849    # first if we set CC to just the basename; use the full file name.
2850    shift
2851    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2852  fi
2853fi
2854fi
2855fi
2856CC=$ac_cv_prog_CC
2857if test -n "$CC"; then
2858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2859$as_echo "$CC" >&6; }
2860else
2861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2862$as_echo "no" >&6; }
2863fi
2864
2865
2866fi
2867if test -z "$CC"; then
2868  if test -n "$ac_tool_prefix"; then
2869  for ac_prog in cl.exe
2870  do
2871    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2872set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2874$as_echo_n "checking for $ac_word... " >&6; }
2875if ${ac_cv_prog_CC+:} false; then :
2876  $as_echo_n "(cached) " >&6
2877else
2878  if test -n "$CC"; then
2879  ac_cv_prog_CC="$CC" # Let the user override the test.
2880else
2881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2882for as_dir in $PATH
2883do
2884  IFS=$as_save_IFS
2885  test -z "$as_dir" && as_dir=.
2886    for ac_exec_ext in '' $ac_executable_extensions; do
2887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2888    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2890    break 2
2891  fi
2892done
2893  done
2894IFS=$as_save_IFS
2895
2896fi
2897fi
2898CC=$ac_cv_prog_CC
2899if test -n "$CC"; then
2900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2901$as_echo "$CC" >&6; }
2902else
2903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2904$as_echo "no" >&6; }
2905fi
2906
2907
2908    test -n "$CC" && break
2909  done
2910fi
2911if test -z "$CC"; then
2912  ac_ct_CC=$CC
2913  for ac_prog in cl.exe
2914do
2915  # Extract the first word of "$ac_prog", so it can be a program name with args.
2916set dummy $ac_prog; ac_word=$2
2917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2918$as_echo_n "checking for $ac_word... " >&6; }
2919if ${ac_cv_prog_ac_ct_CC+:} false; then :
2920  $as_echo_n "(cached) " >&6
2921else
2922  if test -n "$ac_ct_CC"; then
2923  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2924else
2925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2926for as_dir in $PATH
2927do
2928  IFS=$as_save_IFS
2929  test -z "$as_dir" && as_dir=.
2930    for ac_exec_ext in '' $ac_executable_extensions; do
2931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2932    ac_cv_prog_ac_ct_CC="$ac_prog"
2933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2934    break 2
2935  fi
2936done
2937  done
2938IFS=$as_save_IFS
2939
2940fi
2941fi
2942ac_ct_CC=$ac_cv_prog_ac_ct_CC
2943if test -n "$ac_ct_CC"; then
2944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2945$as_echo "$ac_ct_CC" >&6; }
2946else
2947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2948$as_echo "no" >&6; }
2949fi
2950
2951
2952  test -n "$ac_ct_CC" && break
2953done
2954
2955  if test "x$ac_ct_CC" = x; then
2956    CC=""
2957  else
2958    case $cross_compiling:$ac_tool_warned in
2959yes:)
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2961$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2962ac_tool_warned=yes ;;
2963esac
2964    CC=$ac_ct_CC
2965  fi
2966fi
2967
2968fi
2969
2970
2971test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2973as_fn_error $? "no acceptable C compiler found in \$PATH
2974See \`config.log' for more details" "$LINENO" 5; }
2975
2976# Provide some information about the compiler.
2977$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2978set X $ac_compile
2979ac_compiler=$2
2980for ac_option in --version -v -V -qversion; do
2981  { { ac_try="$ac_compiler $ac_option >&5"
2982case "(($ac_try" in
2983  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2984  *) ac_try_echo=$ac_try;;
2985esac
2986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2987$as_echo "$ac_try_echo"; } >&5
2988  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2989  ac_status=$?
2990  if test -s conftest.err; then
2991    sed '10a\
2992... rest of stderr output deleted ...
2993         10q' conftest.err >conftest.er1
2994    cat conftest.er1 >&5
2995  fi
2996  rm -f conftest.er1 conftest.err
2997  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2998  test $ac_status = 0; }
2999done
3000
3001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3002/* end confdefs.h.  */
3003
3004int
3005main ()
3006{
3007
3008  ;
3009  return 0;
3010}
3011_ACEOF
3012ac_clean_files_save=$ac_clean_files
3013ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3014# Try to create an executable without -o first, disregard a.out.
3015# It will help us diagnose broken compilers, and finding out an intuition
3016# of exeext.
3017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3018$as_echo_n "checking whether the C compiler works... " >&6; }
3019ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3020
3021# The possible output files:
3022ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3023
3024ac_rmfiles=
3025for ac_file in $ac_files
3026do
3027  case $ac_file in
3028    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3029    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3030  esac
3031done
3032rm -f $ac_rmfiles
3033
3034if { { ac_try="$ac_link_default"
3035case "(($ac_try" in
3036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3037  *) ac_try_echo=$ac_try;;
3038esac
3039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3040$as_echo "$ac_try_echo"; } >&5
3041  (eval "$ac_link_default") 2>&5
3042  ac_status=$?
3043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3044  test $ac_status = 0; }; then :
3045  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3046# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3047# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3048# so that the user can short-circuit this test for compilers unknown to
3049# Autoconf.
3050for ac_file in $ac_files ''
3051do
3052  test -f "$ac_file" || continue
3053  case $ac_file in
3054    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3055	;;
3056    [ab].out )
3057	# We found the default executable, but exeext='' is most
3058	# certainly right.
3059	break;;
3060    *.* )
3061	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3062	then :; else
3063	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3064	fi
3065	# We set ac_cv_exeext here because the later test for it is not
3066	# safe: cross compilers may not add the suffix if given an `-o'
3067	# argument, so we may need to know it at that point already.
3068	# Even if this section looks crufty: it has the advantage of
3069	# actually working.
3070	break;;
3071    * )
3072	break;;
3073  esac
3074done
3075test "$ac_cv_exeext" = no && ac_cv_exeext=
3076
3077else
3078  ac_file=''
3079fi
3080if test -z "$ac_file"; then :
3081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3082$as_echo "no" >&6; }
3083$as_echo "$as_me: failed program was:" >&5
3084sed 's/^/| /' conftest.$ac_ext >&5
3085
3086{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3088as_fn_error 77 "C compiler cannot create executables
3089See \`config.log' for more details" "$LINENO" 5; }
3090else
3091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3092$as_echo "yes" >&6; }
3093fi
3094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3095$as_echo_n "checking for C compiler default output file name... " >&6; }
3096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3097$as_echo "$ac_file" >&6; }
3098ac_exeext=$ac_cv_exeext
3099
3100rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3101ac_clean_files=$ac_clean_files_save
3102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3103$as_echo_n "checking for suffix of executables... " >&6; }
3104if { { ac_try="$ac_link"
3105case "(($ac_try" in
3106  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3107  *) ac_try_echo=$ac_try;;
3108esac
3109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3110$as_echo "$ac_try_echo"; } >&5
3111  (eval "$ac_link") 2>&5
3112  ac_status=$?
3113  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3114  test $ac_status = 0; }; then :
3115  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3116# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3117# work properly (i.e., refer to `conftest.exe'), while it won't with
3118# `rm'.
3119for ac_file in conftest.exe conftest conftest.*; do
3120  test -f "$ac_file" || continue
3121  case $ac_file in
3122    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3123    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3124	  break;;
3125    * ) break;;
3126  esac
3127done
3128else
3129  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3131as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3132See \`config.log' for more details" "$LINENO" 5; }
3133fi
3134rm -f conftest conftest$ac_cv_exeext
3135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3136$as_echo "$ac_cv_exeext" >&6; }
3137
3138rm -f conftest.$ac_ext
3139EXEEXT=$ac_cv_exeext
3140ac_exeext=$EXEEXT
3141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3142/* end confdefs.h.  */
3143#include <stdio.h>
3144int
3145main ()
3146{
3147FILE *f = fopen ("conftest.out", "w");
3148 return ferror (f) || fclose (f) != 0;
3149
3150  ;
3151  return 0;
3152}
3153_ACEOF
3154ac_clean_files="$ac_clean_files conftest.out"
3155# Check that the compiler produces executables we can run.  If not, either
3156# the compiler is broken, or we cross compile.
3157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3158$as_echo_n "checking whether we are cross compiling... " >&6; }
3159if test "$cross_compiling" != yes; then
3160  { { ac_try="$ac_link"
3161case "(($ac_try" in
3162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3163  *) ac_try_echo=$ac_try;;
3164esac
3165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3166$as_echo "$ac_try_echo"; } >&5
3167  (eval "$ac_link") 2>&5
3168  ac_status=$?
3169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3170  test $ac_status = 0; }
3171  if { ac_try='./conftest$ac_cv_exeext'
3172  { { case "(($ac_try" in
3173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3174  *) ac_try_echo=$ac_try;;
3175esac
3176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3177$as_echo "$ac_try_echo"; } >&5
3178  (eval "$ac_try") 2>&5
3179  ac_status=$?
3180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3181  test $ac_status = 0; }; }; then
3182    cross_compiling=no
3183  else
3184    if test "$cross_compiling" = maybe; then
3185	cross_compiling=yes
3186    else
3187	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3189as_fn_error $? "cannot run C compiled programs.
3190If you meant to cross compile, use \`--host'.
3191See \`config.log' for more details" "$LINENO" 5; }
3192    fi
3193  fi
3194fi
3195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3196$as_echo "$cross_compiling" >&6; }
3197
3198rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3199ac_clean_files=$ac_clean_files_save
3200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3201$as_echo_n "checking for suffix of object files... " >&6; }
3202if ${ac_cv_objext+:} false; then :
3203  $as_echo_n "(cached) " >&6
3204else
3205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3206/* end confdefs.h.  */
3207
3208int
3209main ()
3210{
3211
3212  ;
3213  return 0;
3214}
3215_ACEOF
3216rm -f conftest.o conftest.obj
3217if { { ac_try="$ac_compile"
3218case "(($ac_try" in
3219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3220  *) ac_try_echo=$ac_try;;
3221esac
3222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3223$as_echo "$ac_try_echo"; } >&5
3224  (eval "$ac_compile") 2>&5
3225  ac_status=$?
3226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3227  test $ac_status = 0; }; then :
3228  for ac_file in conftest.o conftest.obj conftest.*; do
3229  test -f "$ac_file" || continue;
3230  case $ac_file in
3231    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3232    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3233       break;;
3234  esac
3235done
3236else
3237  $as_echo "$as_me: failed program was:" >&5
3238sed 's/^/| /' conftest.$ac_ext >&5
3239
3240{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3242as_fn_error $? "cannot compute suffix of object files: cannot compile
3243See \`config.log' for more details" "$LINENO" 5; }
3244fi
3245rm -f conftest.$ac_cv_objext conftest.$ac_ext
3246fi
3247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3248$as_echo "$ac_cv_objext" >&6; }
3249OBJEXT=$ac_cv_objext
3250ac_objext=$OBJEXT
3251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3252$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3253if ${ac_cv_c_compiler_gnu+:} false; then :
3254  $as_echo_n "(cached) " >&6
3255else
3256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3257/* end confdefs.h.  */
3258
3259int
3260main ()
3261{
3262#ifndef __GNUC__
3263       choke me
3264#endif
3265
3266  ;
3267  return 0;
3268}
3269_ACEOF
3270if ac_fn_c_try_compile "$LINENO"; then :
3271  ac_compiler_gnu=yes
3272else
3273  ac_compiler_gnu=no
3274fi
3275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3276ac_cv_c_compiler_gnu=$ac_compiler_gnu
3277
3278fi
3279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3280$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3281if test $ac_compiler_gnu = yes; then
3282  GCC=yes
3283else
3284  GCC=
3285fi
3286ac_test_CFLAGS=${CFLAGS+set}
3287ac_save_CFLAGS=$CFLAGS
3288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3289$as_echo_n "checking whether $CC accepts -g... " >&6; }
3290if ${ac_cv_prog_cc_g+:} false; then :
3291  $as_echo_n "(cached) " >&6
3292else
3293  ac_save_c_werror_flag=$ac_c_werror_flag
3294   ac_c_werror_flag=yes
3295   ac_cv_prog_cc_g=no
3296   CFLAGS="-g"
3297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3298/* end confdefs.h.  */
3299
3300int
3301main ()
3302{
3303
3304  ;
3305  return 0;
3306}
3307_ACEOF
3308if ac_fn_c_try_compile "$LINENO"; then :
3309  ac_cv_prog_cc_g=yes
3310else
3311  CFLAGS=""
3312      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3313/* end confdefs.h.  */
3314
3315int
3316main ()
3317{
3318
3319  ;
3320  return 0;
3321}
3322_ACEOF
3323if ac_fn_c_try_compile "$LINENO"; then :
3324
3325else
3326  ac_c_werror_flag=$ac_save_c_werror_flag
3327	 CFLAGS="-g"
3328	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3329/* end confdefs.h.  */
3330
3331int
3332main ()
3333{
3334
3335  ;
3336  return 0;
3337}
3338_ACEOF
3339if ac_fn_c_try_compile "$LINENO"; then :
3340  ac_cv_prog_cc_g=yes
3341fi
3342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3343fi
3344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3345fi
3346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3347   ac_c_werror_flag=$ac_save_c_werror_flag
3348fi
3349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3350$as_echo "$ac_cv_prog_cc_g" >&6; }
3351if test "$ac_test_CFLAGS" = set; then
3352  CFLAGS=$ac_save_CFLAGS
3353elif test $ac_cv_prog_cc_g = yes; then
3354  if test "$GCC" = yes; then
3355    CFLAGS="-g -O2"
3356  else
3357    CFLAGS="-g"
3358  fi
3359else
3360  if test "$GCC" = yes; then
3361    CFLAGS="-O2"
3362  else
3363    CFLAGS=
3364  fi
3365fi
3366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3367$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3368if ${ac_cv_prog_cc_c89+:} false; then :
3369  $as_echo_n "(cached) " >&6
3370else
3371  ac_cv_prog_cc_c89=no
3372ac_save_CC=$CC
3373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3374/* end confdefs.h.  */
3375#include <stdarg.h>
3376#include <stdio.h>
3377struct stat;
3378/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3379struct buf { int x; };
3380FILE * (*rcsopen) (struct buf *, struct stat *, int);
3381static char *e (p, i)
3382     char **p;
3383     int i;
3384{
3385  return p[i];
3386}
3387static char *f (char * (*g) (char **, int), char **p, ...)
3388{
3389  char *s;
3390  va_list v;
3391  va_start (v,p);
3392  s = g (p, va_arg (v,int));
3393  va_end (v);
3394  return s;
3395}
3396
3397/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3398   function prototypes and stuff, but not '\xHH' hex character constants.
3399   These don't provoke an error unfortunately, instead are silently treated
3400   as 'x'.  The following induces an error, until -std is added to get
3401   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3402   array size at least.  It's necessary to write '\x00'==0 to get something
3403   that's true only with -std.  */
3404int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3405
3406/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3407   inside strings and character constants.  */
3408#define FOO(x) 'x'
3409int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3410
3411int test (int i, double x);
3412struct s1 {int (*f) (int a);};
3413struct s2 {int (*f) (double a);};
3414int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3415int argc;
3416char **argv;
3417int
3418main ()
3419{
3420return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3421  ;
3422  return 0;
3423}
3424_ACEOF
3425for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3426	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3427do
3428  CC="$ac_save_CC $ac_arg"
3429  if ac_fn_c_try_compile "$LINENO"; then :
3430  ac_cv_prog_cc_c89=$ac_arg
3431fi
3432rm -f core conftest.err conftest.$ac_objext
3433  test "x$ac_cv_prog_cc_c89" != "xno" && break
3434done
3435rm -f conftest.$ac_ext
3436CC=$ac_save_CC
3437
3438fi
3439# AC_CACHE_VAL
3440case "x$ac_cv_prog_cc_c89" in
3441  x)
3442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3443$as_echo "none needed" >&6; } ;;
3444  xno)
3445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3446$as_echo "unsupported" >&6; } ;;
3447  *)
3448    CC="$CC $ac_cv_prog_cc_c89"
3449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3450$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3451esac
3452if test "x$ac_cv_prog_cc_c89" != xno; then :
3453
3454fi
3455
3456ac_ext=c
3457ac_cpp='$CPP $CPPFLAGS'
3458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3460ac_compiler_gnu=$ac_cv_c_compiler_gnu
3461
3462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3463$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3464if ${ac_cv_prog_cc_c99+:} false; then :
3465  $as_echo_n "(cached) " >&6
3466else
3467  ac_cv_prog_cc_c99=no
3468ac_save_CC=$CC
3469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3470/* end confdefs.h.  */
3471#include <stdarg.h>
3472#include <stdbool.h>
3473#include <stdlib.h>
3474#include <wchar.h>
3475#include <stdio.h>
3476
3477// Check varargs macros.  These examples are taken from C99 6.10.3.5.
3478#define debug(...) fprintf (stderr, __VA_ARGS__)
3479#define showlist(...) puts (#__VA_ARGS__)
3480#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3481static void
3482test_varargs_macros (void)
3483{
3484  int x = 1234;
3485  int y = 5678;
3486  debug ("Flag");
3487  debug ("X = %d\n", x);
3488  showlist (The first, second, and third items.);
3489  report (x>y, "x is %d but y is %d", x, y);
3490}
3491
3492// Check long long types.
3493#define BIG64 18446744073709551615ull
3494#define BIG32 4294967295ul
3495#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3496#if !BIG_OK
3497  your preprocessor is broken;
3498#endif
3499#if BIG_OK
3500#else
3501  your preprocessor is broken;
3502#endif
3503static long long int bignum = -9223372036854775807LL;
3504static unsigned long long int ubignum = BIG64;
3505
3506struct incomplete_array
3507{
3508  int datasize;
3509  double data[];
3510};
3511
3512struct named_init {
3513  int number;
3514  const wchar_t *name;
3515  double average;
3516};
3517
3518typedef const char *ccp;
3519
3520static inline int
3521test_restrict (ccp restrict text)
3522{
3523  // See if C++-style comments work.
3524  // Iterate through items via the restricted pointer.
3525  // Also check for declarations in for loops.
3526  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3527    continue;
3528  return 0;
3529}
3530
3531// Check varargs and va_copy.
3532static void
3533test_varargs (const char *format, ...)
3534{
3535  va_list args;
3536  va_start (args, format);
3537  va_list args_copy;
3538  va_copy (args_copy, args);
3539
3540  const char *str;
3541  int number;
3542  float fnumber;
3543
3544  while (*format)
3545    {
3546      switch (*format++)
3547	{
3548	case 's': // string
3549	  str = va_arg (args_copy, const char *);
3550	  break;
3551	case 'd': // int
3552	  number = va_arg (args_copy, int);
3553	  break;
3554	case 'f': // float
3555	  fnumber = va_arg (args_copy, double);
3556	  break;
3557	default:
3558	  break;
3559	}
3560    }
3561  va_end (args_copy);
3562  va_end (args);
3563}
3564
3565int
3566main ()
3567{
3568
3569  // Check bool.
3570  _Bool success = false;
3571
3572  // Check restrict.
3573  if (test_restrict ("String literal") == 0)
3574    success = true;
3575  char *restrict newvar = "Another string";
3576
3577  // Check varargs.
3578  test_varargs ("s, d' f .", "string", 65, 34.234);
3579  test_varargs_macros ();
3580
3581  // Check flexible array members.
3582  struct incomplete_array *ia =
3583    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3584  ia->datasize = 10;
3585  for (int i = 0; i < ia->datasize; ++i)
3586    ia->data[i] = i * 1.234;
3587
3588  // Check named initializers.
3589  struct named_init ni = {
3590    .number = 34,
3591    .name = L"Test wide string",
3592    .average = 543.34343,
3593  };
3594
3595  ni.number = 58;
3596
3597  int dynamic_array[ni.number];
3598  dynamic_array[ni.number - 1] = 543;
3599
3600  // work around unused variable warnings
3601  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3602	  || dynamic_array[ni.number - 1] != 543);
3603
3604  ;
3605  return 0;
3606}
3607_ACEOF
3608for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3609do
3610  CC="$ac_save_CC $ac_arg"
3611  if ac_fn_c_try_compile "$LINENO"; then :
3612  ac_cv_prog_cc_c99=$ac_arg
3613fi
3614rm -f core conftest.err conftest.$ac_objext
3615  test "x$ac_cv_prog_cc_c99" != "xno" && break
3616done
3617rm -f conftest.$ac_ext
3618CC=$ac_save_CC
3619
3620fi
3621# AC_CACHE_VAL
3622case "x$ac_cv_prog_cc_c99" in
3623  x)
3624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3625$as_echo "none needed" >&6; } ;;
3626  xno)
3627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3628$as_echo "unsupported" >&6; } ;;
3629  *)
3630    CC="$CC $ac_cv_prog_cc_c99"
3631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3632$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3633esac
3634if test "x$ac_cv_prog_cc_c99" != xno; then :
3635
3636fi
3637
3638		ac_ext=c
3639ac_cpp='$CPP $CPPFLAGS'
3640ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3641ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3642ac_compiler_gnu=$ac_cv_c_compiler_gnu
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3644$as_echo_n "checking how to run the C preprocessor... " >&6; }
3645# On Suns, sometimes $CPP names a directory.
3646if test -n "$CPP" && test -d "$CPP"; then
3647  CPP=
3648fi
3649if test -z "$CPP"; then
3650  if ${ac_cv_prog_CPP+:} false; then :
3651  $as_echo_n "(cached) " >&6
3652else
3653      # Double quotes because CPP needs to be expanded
3654    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3655    do
3656      ac_preproc_ok=false
3657for ac_c_preproc_warn_flag in '' yes
3658do
3659  # Use a header file that comes with gcc, so configuring glibc
3660  # with a fresh cross-compiler works.
3661  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3662  # <limits.h> exists even on freestanding compilers.
3663  # On the NeXT, cc -E runs the code through the compiler's parser,
3664  # not just through cpp. "Syntax error" is here to catch this case.
3665  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3666/* end confdefs.h.  */
3667#ifdef __STDC__
3668# include <limits.h>
3669#else
3670# include <assert.h>
3671#endif
3672		     Syntax error
3673_ACEOF
3674if ac_fn_c_try_cpp "$LINENO"; then :
3675
3676else
3677  # Broken: fails on valid input.
3678continue
3679fi
3680rm -f conftest.err conftest.i conftest.$ac_ext
3681
3682  # OK, works on sane cases.  Now check whether nonexistent headers
3683  # can be detected and how.
3684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3685/* end confdefs.h.  */
3686#include <ac_nonexistent.h>
3687_ACEOF
3688if ac_fn_c_try_cpp "$LINENO"; then :
3689  # Broken: success on invalid input.
3690continue
3691else
3692  # Passes both tests.
3693ac_preproc_ok=:
3694break
3695fi
3696rm -f conftest.err conftest.i conftest.$ac_ext
3697
3698done
3699# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3700rm -f conftest.i conftest.err conftest.$ac_ext
3701if $ac_preproc_ok; then :
3702  break
3703fi
3704
3705    done
3706    ac_cv_prog_CPP=$CPP
3707
3708fi
3709  CPP=$ac_cv_prog_CPP
3710else
3711  ac_cv_prog_CPP=$CPP
3712fi
3713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3714$as_echo "$CPP" >&6; }
3715ac_preproc_ok=false
3716for ac_c_preproc_warn_flag in '' yes
3717do
3718  # Use a header file that comes with gcc, so configuring glibc
3719  # with a fresh cross-compiler works.
3720  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3721  # <limits.h> exists even on freestanding compilers.
3722  # On the NeXT, cc -E runs the code through the compiler's parser,
3723  # not just through cpp. "Syntax error" is here to catch this case.
3724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3725/* end confdefs.h.  */
3726#ifdef __STDC__
3727# include <limits.h>
3728#else
3729# include <assert.h>
3730#endif
3731		     Syntax error
3732_ACEOF
3733if ac_fn_c_try_cpp "$LINENO"; then :
3734
3735else
3736  # Broken: fails on valid input.
3737continue
3738fi
3739rm -f conftest.err conftest.i conftest.$ac_ext
3740
3741  # OK, works on sane cases.  Now check whether nonexistent headers
3742  # can be detected and how.
3743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3744/* end confdefs.h.  */
3745#include <ac_nonexistent.h>
3746_ACEOF
3747if ac_fn_c_try_cpp "$LINENO"; then :
3748  # Broken: success on invalid input.
3749continue
3750else
3751  # Passes both tests.
3752ac_preproc_ok=:
3753break
3754fi
3755rm -f conftest.err conftest.i conftest.$ac_ext
3756
3757done
3758# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3759rm -f conftest.i conftest.err conftest.$ac_ext
3760if $ac_preproc_ok; then :
3761
3762else
3763  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3765as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3766See \`config.log' for more details" "$LINENO" 5; }
3767fi
3768
3769ac_ext=c
3770ac_cpp='$CPP $CPPFLAGS'
3771ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3772ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3773ac_compiler_gnu=$ac_cv_c_compiler_gnu
3774
3775
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3777$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3778if ${ac_cv_path_GREP+:} false; then :
3779  $as_echo_n "(cached) " >&6
3780else
3781  if test -z "$GREP"; then
3782  ac_path_GREP_found=false
3783  # Loop through the user's path and test for each of PROGNAME-LIST
3784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3786do
3787  IFS=$as_save_IFS
3788  test -z "$as_dir" && as_dir=.
3789    for ac_prog in grep ggrep; do
3790    for ac_exec_ext in '' $ac_executable_extensions; do
3791      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3792      as_fn_executable_p "$ac_path_GREP" || continue
3793# Check for GNU ac_path_GREP and select it if it is found.
3794  # Check for GNU $ac_path_GREP
3795case `"$ac_path_GREP" --version 2>&1` in
3796*GNU*)
3797  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3798*)
3799  ac_count=0
3800  $as_echo_n 0123456789 >"conftest.in"
3801  while :
3802  do
3803    cat "conftest.in" "conftest.in" >"conftest.tmp"
3804    mv "conftest.tmp" "conftest.in"
3805    cp "conftest.in" "conftest.nl"
3806    $as_echo 'GREP' >> "conftest.nl"
3807    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3808    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3809    as_fn_arith $ac_count + 1 && ac_count=$as_val
3810    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3811      # Best one so far, save it but keep looking for a better one
3812      ac_cv_path_GREP="$ac_path_GREP"
3813      ac_path_GREP_max=$ac_count
3814    fi
3815    # 10*(2^10) chars as input seems more than enough
3816    test $ac_count -gt 10 && break
3817  done
3818  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3819esac
3820
3821      $ac_path_GREP_found && break 3
3822    done
3823  done
3824  done
3825IFS=$as_save_IFS
3826  if test -z "$ac_cv_path_GREP"; then
3827    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3828  fi
3829else
3830  ac_cv_path_GREP=$GREP
3831fi
3832
3833fi
3834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3835$as_echo "$ac_cv_path_GREP" >&6; }
3836 GREP="$ac_cv_path_GREP"
3837
3838
3839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3840$as_echo_n "checking for egrep... " >&6; }
3841if ${ac_cv_path_EGREP+:} false; then :
3842  $as_echo_n "(cached) " >&6
3843else
3844  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3845   then ac_cv_path_EGREP="$GREP -E"
3846   else
3847     if test -z "$EGREP"; then
3848  ac_path_EGREP_found=false
3849  # Loop through the user's path and test for each of PROGNAME-LIST
3850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3851for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3852do
3853  IFS=$as_save_IFS
3854  test -z "$as_dir" && as_dir=.
3855    for ac_prog in egrep; do
3856    for ac_exec_ext in '' $ac_executable_extensions; do
3857      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3858      as_fn_executable_p "$ac_path_EGREP" || continue
3859# Check for GNU ac_path_EGREP and select it if it is found.
3860  # Check for GNU $ac_path_EGREP
3861case `"$ac_path_EGREP" --version 2>&1` in
3862*GNU*)
3863  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3864*)
3865  ac_count=0
3866  $as_echo_n 0123456789 >"conftest.in"
3867  while :
3868  do
3869    cat "conftest.in" "conftest.in" >"conftest.tmp"
3870    mv "conftest.tmp" "conftest.in"
3871    cp "conftest.in" "conftest.nl"
3872    $as_echo 'EGREP' >> "conftest.nl"
3873    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3874    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3875    as_fn_arith $ac_count + 1 && ac_count=$as_val
3876    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3877      # Best one so far, save it but keep looking for a better one
3878      ac_cv_path_EGREP="$ac_path_EGREP"
3879      ac_path_EGREP_max=$ac_count
3880    fi
3881    # 10*(2^10) chars as input seems more than enough
3882    test $ac_count -gt 10 && break
3883  done
3884  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3885esac
3886
3887      $ac_path_EGREP_found && break 3
3888    done
3889  done
3890  done
3891IFS=$as_save_IFS
3892  if test -z "$ac_cv_path_EGREP"; then
3893    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3894  fi
3895else
3896  ac_cv_path_EGREP=$EGREP
3897fi
3898
3899   fi
3900fi
3901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3902$as_echo "$ac_cv_path_EGREP" >&6; }
3903 EGREP="$ac_cv_path_EGREP"
3904
3905
3906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3907/* end confdefs.h.  */
3908
3909_ACEOF
3910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3911  $EGREP "" >/dev/null 2>&1; then :
3912
3913fi
3914rm -f conftest*
3915	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
3916$as_echo_n "checking for fgrep... " >&6; }
3917if ${ac_cv_path_FGREP+:} false; then :
3918  $as_echo_n "(cached) " >&6
3919else
3920  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3921   then ac_cv_path_FGREP="$GREP -F"
3922   else
3923     if test -z "$FGREP"; then
3924  ac_path_FGREP_found=false
3925  # Loop through the user's path and test for each of PROGNAME-LIST
3926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3927for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3928do
3929  IFS=$as_save_IFS
3930  test -z "$as_dir" && as_dir=.
3931    for ac_prog in fgrep; do
3932    for ac_exec_ext in '' $ac_executable_extensions; do
3933      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
3934      as_fn_executable_p "$ac_path_FGREP" || continue
3935# Check for GNU ac_path_FGREP and select it if it is found.
3936  # Check for GNU $ac_path_FGREP
3937case `"$ac_path_FGREP" --version 2>&1` in
3938*GNU*)
3939  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
3940*)
3941  ac_count=0
3942  $as_echo_n 0123456789 >"conftest.in"
3943  while :
3944  do
3945    cat "conftest.in" "conftest.in" >"conftest.tmp"
3946    mv "conftest.tmp" "conftest.in"
3947    cp "conftest.in" "conftest.nl"
3948    $as_echo 'FGREP' >> "conftest.nl"
3949    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
3950    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3951    as_fn_arith $ac_count + 1 && ac_count=$as_val
3952    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
3953      # Best one so far, save it but keep looking for a better one
3954      ac_cv_path_FGREP="$ac_path_FGREP"
3955      ac_path_FGREP_max=$ac_count
3956    fi
3957    # 10*(2^10) chars as input seems more than enough
3958    test $ac_count -gt 10 && break
3959  done
3960  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3961esac
3962
3963      $ac_path_FGREP_found && break 3
3964    done
3965  done
3966  done
3967IFS=$as_save_IFS
3968  if test -z "$ac_cv_path_FGREP"; then
3969    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3970  fi
3971else
3972  ac_cv_path_FGREP=$FGREP
3973fi
3974
3975   fi
3976fi
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
3978$as_echo "$ac_cv_path_FGREP" >&6; }
3979 FGREP="$ac_cv_path_FGREP"
3980
3981		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
3982$as_echo_n "checking for library containing strerror... " >&6; }
3983if ${ac_cv_search_strerror+:} false; then :
3984  $as_echo_n "(cached) " >&6
3985else
3986  ac_func_search_save_LIBS=$LIBS
3987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3988/* end confdefs.h.  */
3989
3990/* Override any GCC internal prototype to avoid an error.
3991   Use char because int might match the return type of a GCC
3992   builtin and then its argument prototype would still apply.  */
3993#ifdef __cplusplus
3994extern "C"
3995#endif
3996char strerror ();
3997int
3998main ()
3999{
4000return strerror ();
4001  ;
4002  return 0;
4003}
4004_ACEOF
4005for ac_lib in '' cposix; do
4006  if test -z "$ac_lib"; then
4007    ac_res="none required"
4008  else
4009    ac_res=-l$ac_lib
4010    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
4011  fi
4012  if ac_fn_c_try_link "$LINENO"; then :
4013  ac_cv_search_strerror=$ac_res
4014fi
4015rm -f core conftest.err conftest.$ac_objext \
4016    conftest$ac_exeext
4017  if ${ac_cv_search_strerror+:} false; then :
4018  break
4019fi
4020done
4021if ${ac_cv_search_strerror+:} false; then :
4022
4023else
4024  ac_cv_search_strerror=no
4025fi
4026rm conftest.$ac_ext
4027LIBS=$ac_func_search_save_LIBS
4028fi
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
4030$as_echo "$ac_cv_search_strerror" >&6; }
4031ac_res=$ac_cv_search_strerror
4032if test "$ac_res" != no; then :
4033  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4034
4035fi
4036		for ac_prog in gawk mawk nawk awk
4037do
4038  # Extract the first word of "$ac_prog", so it can be a program name with args.
4039set dummy $ac_prog; ac_word=$2
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4041$as_echo_n "checking for $ac_word... " >&6; }
4042if ${ac_cv_prog_AWK+:} false; then :
4043  $as_echo_n "(cached) " >&6
4044else
4045  if test -n "$AWK"; then
4046  ac_cv_prog_AWK="$AWK" # Let the user override the test.
4047else
4048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4049for as_dir in $PATH
4050do
4051  IFS=$as_save_IFS
4052  test -z "$as_dir" && as_dir=.
4053    for ac_exec_ext in '' $ac_executable_extensions; do
4054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4055    ac_cv_prog_AWK="$ac_prog"
4056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4057    break 2
4058  fi
4059done
4060  done
4061IFS=$as_save_IFS
4062
4063fi
4064fi
4065AWK=$ac_cv_prog_AWK
4066if test -n "$AWK"; then
4067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4068$as_echo "$AWK" >&6; }
4069else
4070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4071$as_echo "no" >&6; }
4072fi
4073
4074
4075  test -n "$AWK" && break
4076done
4077
4078# Extract the first word of "strip", so it can be a program name with args.
4079set dummy strip; ac_word=$2
4080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4081$as_echo_n "checking for $ac_word... " >&6; }
4082if ${ac_cv_prog_STRIP+:} false; then :
4083  $as_echo_n "(cached) " >&6
4084else
4085  if test -n "$STRIP"; then
4086  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4087else
4088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4089for as_dir in $PATH
4090do
4091  IFS=$as_save_IFS
4092  test -z "$as_dir" && as_dir=.
4093    for ac_exec_ext in '' $ac_executable_extensions; do
4094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4095    ac_cv_prog_STRIP="strip"
4096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4097    break 2
4098  fi
4099done
4100  done
4101IFS=$as_save_IFS
4102
4103  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4104fi
4105fi
4106STRIP=$ac_cv_prog_STRIP
4107if test -n "$STRIP"; then
4108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4109$as_echo "$STRIP" >&6; }
4110else
4111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4112$as_echo "no" >&6; }
4113fi
4114
4115
4116
4117
4118
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4120$as_echo_n "checking for ANSI C header files... " >&6; }
4121if ${ac_cv_header_stdc+:} false; then :
4122  $as_echo_n "(cached) " >&6
4123else
4124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4125/* end confdefs.h.  */
4126#include <stdlib.h>
4127#include <stdarg.h>
4128#include <string.h>
4129#include <float.h>
4130
4131int
4132main ()
4133{
4134
4135  ;
4136  return 0;
4137}
4138_ACEOF
4139if ac_fn_c_try_compile "$LINENO"; then :
4140  ac_cv_header_stdc=yes
4141else
4142  ac_cv_header_stdc=no
4143fi
4144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4145
4146if test $ac_cv_header_stdc = yes; then
4147  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4149/* end confdefs.h.  */
4150#include <string.h>
4151
4152_ACEOF
4153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4154  $EGREP "memchr" >/dev/null 2>&1; then :
4155
4156else
4157  ac_cv_header_stdc=no
4158fi
4159rm -f conftest*
4160
4161fi
4162
4163if test $ac_cv_header_stdc = yes; then
4164  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4166/* end confdefs.h.  */
4167#include <stdlib.h>
4168
4169_ACEOF
4170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4171  $EGREP "free" >/dev/null 2>&1; then :
4172
4173else
4174  ac_cv_header_stdc=no
4175fi
4176rm -f conftest*
4177
4178fi
4179
4180if test $ac_cv_header_stdc = yes; then
4181  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4182  if test "$cross_compiling" = yes; then :
4183  :
4184else
4185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4186/* end confdefs.h.  */
4187#include <ctype.h>
4188#include <stdlib.h>
4189#if ((' ' & 0x0FF) == 0x020)
4190# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4191# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4192#else
4193# define ISLOWER(c) \
4194		   (('a' <= (c) && (c) <= 'i') \
4195		     || ('j' <= (c) && (c) <= 'r') \
4196		     || ('s' <= (c) && (c) <= 'z'))
4197# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4198#endif
4199
4200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4201int
4202main ()
4203{
4204  int i;
4205  for (i = 0; i < 256; i++)
4206    if (XOR (islower (i), ISLOWER (i))
4207	|| toupper (i) != TOUPPER (i))
4208      return 2;
4209  return 0;
4210}
4211_ACEOF
4212if ac_fn_c_try_run "$LINENO"; then :
4213
4214else
4215  ac_cv_header_stdc=no
4216fi
4217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4218  conftest.$ac_objext conftest.beam conftest.$ac_ext
4219fi
4220
4221fi
4222fi
4223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4224$as_echo "$ac_cv_header_stdc" >&6; }
4225if test $ac_cv_header_stdc = yes; then
4226
4227$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4228
4229fi
4230
4231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4232$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4233if ${ac_cv_header_sys_wait_h+:} false; then :
4234  $as_echo_n "(cached) " >&6
4235else
4236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237/* end confdefs.h.  */
4238#include <sys/types.h>
4239#include <sys/wait.h>
4240#ifndef WEXITSTATUS
4241# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4242#endif
4243#ifndef WIFEXITED
4244# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4245#endif
4246
4247int
4248main ()
4249{
4250  int s;
4251  wait (&s);
4252  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4253  ;
4254  return 0;
4255}
4256_ACEOF
4257if ac_fn_c_try_compile "$LINENO"; then :
4258  ac_cv_header_sys_wait_h=yes
4259else
4260  ac_cv_header_sys_wait_h=no
4261fi
4262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4263fi
4264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4265$as_echo "$ac_cv_header_sys_wait_h" >&6; }
4266if test $ac_cv_header_sys_wait_h = yes; then
4267
4268$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
4269
4270fi
4271
4272
4273if test x"$ac_cv_prog_cc_c99" != xno; then
4274
4275
4276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4277$as_echo_n "checking for unsigned long long int... " >&6; }
4278if ${ac_cv_type_unsigned_long_long_int+:} false; then :
4279  $as_echo_n "(cached) " >&6
4280else
4281  ac_cv_type_unsigned_long_long_int=yes
4282     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
4283       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4284/* end confdefs.h.  */
4285
4286  /* For now, do not test the preprocessor; as of 2007 there are too many
4287	 implementations with broken preprocessors.  Perhaps this can
4288	 be revisited in 2012.  In the meantime, code should not expect
4289	 #if to work with literals wider than 32 bits.  */
4290      /* Test literals.  */
4291      long long int ll = 9223372036854775807ll;
4292      long long int nll = -9223372036854775807LL;
4293      unsigned long long int ull = 18446744073709551615ULL;
4294      /* Test constant expressions.   */
4295      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4296		     ? 1 : -1)];
4297      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4298		     ? 1 : -1)];
4299      int i = 63;
4300int
4301main ()
4302{
4303/* Test availability of runtime routines for shift and division.  */
4304      long long int llmax = 9223372036854775807ll;
4305      unsigned long long int ullmax = 18446744073709551615ull;
4306      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4307	      | (llmax / ll) | (llmax % ll)
4308	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4309	      | (ullmax / ull) | (ullmax % ull));
4310  ;
4311  return 0;
4312}
4313
4314_ACEOF
4315if ac_fn_c_try_link "$LINENO"; then :
4316
4317else
4318  ac_cv_type_unsigned_long_long_int=no
4319fi
4320rm -f core conftest.err conftest.$ac_objext \
4321    conftest$ac_exeext conftest.$ac_ext
4322     fi
4323fi
4324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4325$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
4326  if test $ac_cv_type_unsigned_long_long_int = yes; then
4327
4328$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
4329
4330  fi
4331
4332
4333
4334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4335$as_echo_n "checking for long long int... " >&6; }
4336if ${ac_cv_type_long_long_int+:} false; then :
4337  $as_echo_n "(cached) " >&6
4338else
4339  ac_cv_type_long_long_int=yes
4340      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
4341	ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4342	if test $ac_cv_type_long_long_int = yes; then
4343	  	  	  	  if test "$cross_compiling" = yes; then :
4344  :
4345else
4346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4347/* end confdefs.h.  */
4348#include <limits.h>
4349		 #ifndef LLONG_MAX
4350		 # define HALF \
4351			  (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4352		 # define LLONG_MAX (HALF - 1 + HALF)
4353		 #endif
4354int
4355main ()
4356{
4357long long int n = 1;
4358		 int i;
4359		 for (i = 0; ; i++)
4360		   {
4361		     long long int m = n << i;
4362		     if (m >> i != n)
4363		       return 1;
4364		     if (LLONG_MAX / 2 < m)
4365		       break;
4366		   }
4367		 return 0;
4368  ;
4369  return 0;
4370}
4371_ACEOF
4372if ac_fn_c_try_run "$LINENO"; then :
4373
4374else
4375  ac_cv_type_long_long_int=no
4376fi
4377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4378  conftest.$ac_objext conftest.beam conftest.$ac_ext
4379fi
4380
4381	fi
4382      fi
4383fi
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4385$as_echo "$ac_cv_type_long_long_int" >&6; }
4386  if test $ac_cv_type_long_long_int = yes; then
4387
4388$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
4389
4390  fi
4391
4392  if test "$ac_cv_type_long_long_int" = no; then
4393    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4394$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4395as_fn_error $? "Compiler does not support long long int
4396See \`config.log' for more details" "$LINENO" 5; }
4397  fi
4398
4399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4400$as_echo_n "checking if the compiler supports trailing commas... " >&6; }
4401  trailing_commas=no
4402  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403/* end confdefs.h.  */
4404
4405int
4406main ()
4407{
4408
4409    enum {
4410      one,
4411    };
4412  ;
4413  return 0;
4414}
4415_ACEOF
4416if ac_fn_c_try_compile "$LINENO"; then :
4417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4418$as_echo "yes" >&6; }; trailing_commas=yes
4419else
4420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4421$as_echo "no" >&6; }
4422fi
4423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4424  if test "$trailing_commas" = no; then
4425    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4427as_fn_error $? "Compiler does not support trailing comma in enum
4428See \`config.log' for more details" "$LINENO" 5; }
4429  fi
4430
4431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4432$as_echo_n "checking if the compiler supports C++ comments... " >&6; }
4433  slash_comments=no
4434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4435/* end confdefs.h.  */
4436
4437int
4438main ()
4439{
4440// C++ comments?
4441  ;
4442  return 0;
4443}
4444_ACEOF
4445if ac_fn_c_try_compile "$LINENO"; then :
4446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4447$as_echo "yes" >&6; }; slash_comments=yes
4448else
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4450$as_echo "no" >&6; }
4451fi
4452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4453  if test "$slash_comments" = no; then
4454    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4456as_fn_error $? "Compiler does not support C++ comments
4457See \`config.log' for more details" "$LINENO" 5; }
4458  fi
4459fi
4460
4461
4462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4463$as_echo_n "checking --enable-fail-if-missing argument... " >&6; }
4464# Check whether --enable-fail_if_missing was given.
4465if test "${enable_fail_if_missing+set}" = set; then :
4466  enableval=$enable_fail_if_missing; fail_if_missing="yes"
4467else
4468  fail_if_missing="no"
4469fi
4470
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4472$as_echo "$fail_if_missing" >&6; }
4473
4474with_x_arg="$with_x"
4475
4476if test -z "$CFLAGS"; then
4477  CFLAGS="-O"
4478  test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
4479fi
4480if test "$GCC" = yes; then
4481    gccversion=`$CC -dumpversion`
4482  if test "x$gccversion" = "x"; then
4483        gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
4484  fi
4485    if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
4486    echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4487    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4488  else
4489    if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4490      echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4491      CFLAGS="$CFLAGS -fno-strength-reduce"
4492    fi
4493  fi
4494fi
4495
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4497$as_echo_n "checking for clang version... " >&6; }
4498CLANG_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'`
4499if test x"$CLANG_VERSION_STRING" != x"" ; then
4500  CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4501  CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4502  CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4503  CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4505$as_echo "$CLANG_VERSION" >&6; }
4506          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4507$as_echo_n "checking if clang supports -fno-strength-reduce... " >&6; }
4508  if test "$CLANG_VERSION" -ge 500002075 ; then
4509    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4510$as_echo "no" >&6; }
4511    CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4512  else
4513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4514$as_echo "yes" >&6; }
4515  fi
4516else
4517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4518$as_echo "N/A" >&6; }
4519fi
4520
4521CROSS_COMPILING=
4522if test "$cross_compiling" = yes; then
4523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4524$as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
4525  CROSS_COMPILING=1
4526fi
4527
4528
4529test "$GCC" = yes && CPP_MM=M;
4530
4531if test -f ./toolcheck; then
4532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy tools..." >&5
4533$as_echo "$as_me: checking for buggy tools..." >&6;}
4534  sh ./toolcheck 1>&6
4535fi
4536
4537OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4538
4539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BeOS" >&5
4540$as_echo_n "checking for BeOS... " >&6; }
4541case `uname` in
4542    BeOS)	OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
4543		BEOS=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4544$as_echo "yes" >&6; };;
4545    *)		BEOS=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; };;
4547esac
4548
4549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4550$as_echo_n "checking for QNX... " >&6; }
4551case `uname` in
4552    QNX)	OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4553		test -z "$with_x" && with_x=no
4554		QNX=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4555$as_echo "yes" >&6; };;
4556    *)		QNX=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4557$as_echo "no" >&6; };;
4558esac
4559
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4561$as_echo_n "checking for Darwin (Mac OS X)... " >&6; }
4562if test "`(uname) 2>/dev/null`" = Darwin; then
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4564$as_echo "yes" >&6; }
4565  MACOS_X=yes
4566  CPPFLAGS="$CPPFLAGS -DMACOS_X"
4567
4568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4569$as_echo_n "checking --disable-darwin argument... " >&6; }
4570  # Check whether --enable-darwin was given.
4571if test "${enable_darwin+set}" = set; then :
4572  enableval=$enable_darwin;
4573else
4574  enable_darwin="yes"
4575fi
4576
4577  if test "$enable_darwin" = "yes"; then
4578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4579$as_echo "no" >&6; }
4580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4581$as_echo_n "checking if Darwin files are there... " >&6; }
4582    if test -f os_macosx.m; then
4583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4584$as_echo "yes" >&6; }
4585    else
4586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4587$as_echo "no, Darwin support disabled" >&6; }
4588      enable_darwin=no
4589    fi
4590  else
4591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4592$as_echo "yes, Darwin support excluded" >&6; }
4593  fi
4594
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4596$as_echo_n "checking --with-mac-arch argument... " >&6; }
4597
4598# Check whether --with-mac-arch was given.
4599if test "${with_mac_arch+set}" = set; then :
4600  withval=$with_mac_arch; MACARCH="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4601$as_echo "$MACARCH" >&6; }
4602else
4603  MACARCH="current"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4604$as_echo "defaulting to $MACARCH" >&6; }
4605fi
4606
4607
4608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4609$as_echo_n "checking --with-developer-dir argument... " >&6; }
4610
4611# Check whether --with-developer-dir was given.
4612if test "${with_developer_dir+set}" = set; then :
4613  withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4614$as_echo "$DEVELOPER_DIR" >&6; }
4615else
4616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4617$as_echo "not present" >&6; }
4618fi
4619
4620
4621  if test "x$DEVELOPER_DIR" = "x"; then
4622    # Extract the first word of "xcode-select", so it can be a program name with args.
4623set dummy xcode-select; ac_word=$2
4624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_XCODE_SELECT+:} false; then :
4627  $as_echo_n "(cached) " >&6
4628else
4629  case $XCODE_SELECT in
4630  [\\/]* | ?:[\\/]*)
4631  ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4632  ;;
4633  *)
4634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in $PATH
4636do
4637  IFS=$as_save_IFS
4638  test -z "$as_dir" && as_dir=.
4639    for ac_exec_ext in '' $ac_executable_extensions; do
4640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4641    ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
4642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643    break 2
4644  fi
4645done
4646  done
4647IFS=$as_save_IFS
4648
4649  ;;
4650esac
4651fi
4652XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4653if test -n "$XCODE_SELECT"; then
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4655$as_echo "$XCODE_SELECT" >&6; }
4656else
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
4661
4662    if test "x$XCODE_SELECT" != "x"; then
4663      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4664$as_echo_n "checking for developer dir using xcode-select... " >&6; }
4665      DEVELOPER_DIR=`$XCODE_SELECT -print-path`
4666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4667$as_echo "$DEVELOPER_DIR" >&6; }
4668    else
4669      DEVELOPER_DIR=/Developer
4670    fi
4671  fi
4672
4673  if test "x$MACARCH" = "xboth"; then
4674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4675$as_echo_n "checking for 10.4 universal SDK... " >&6; }
4676                            save_cppflags="$CPPFLAGS"
4677    save_cflags="$CFLAGS"
4678    save_ldflags="$LDFLAGS"
4679    CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
4680    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4681/* end confdefs.h.  */
4682
4683int
4684main ()
4685{
4686
4687  ;
4688  return 0;
4689}
4690_ACEOF
4691if ac_fn_c_try_link "$LINENO"; then :
4692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
4693$as_echo "found" >&6; }
4694else
4695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4696$as_echo "not found" >&6; }
4697	CFLAGS="$save_cflags"
4698	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4699$as_echo_n "checking if Intel architecture is supported... " >&6; }
4700	CPPFLAGS="$CPPFLAGS -arch i386"
4701	LDFLAGS="$save_ldflags -arch i386"
4702	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4703/* end confdefs.h.  */
4704
4705int
4706main ()
4707{
4708
4709  ;
4710  return 0;
4711}
4712_ACEOF
4713if ac_fn_c_try_link "$LINENO"; then :
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4715$as_echo "yes" >&6; }; MACARCH="intel"
4716else
4717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719		MACARCH="ppc"
4720		CPPFLAGS="$save_cppflags -arch ppc"
4721		LDFLAGS="$save_ldflags -arch ppc"
4722fi
4723rm -f core conftest.err conftest.$ac_objext \
4724    conftest$ac_exeext conftest.$ac_ext
4725fi
4726rm -f core conftest.err conftest.$ac_objext \
4727    conftest$ac_exeext conftest.$ac_ext
4728  elif test "x$MACARCH" = "xintel"; then
4729    CPPFLAGS="$CPPFLAGS -arch intel"
4730    LDFLAGS="$LDFLAGS -arch intel"
4731  elif test "x$MACARCH" = "xppc"; then
4732    CPPFLAGS="$CPPFLAGS -arch ppc"
4733    LDFLAGS="$LDFLAGS -arch ppc"
4734  fi
4735
4736  if test "$enable_darwin" = "yes"; then
4737    MACOS_X_DARWIN=yes
4738    OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
4739    OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
4740            CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
4741
4742                # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4743for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4744		  inttypes.h stdint.h unistd.h
4745do :
4746  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4747ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4748"
4749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4750  cat >>confdefs.h <<_ACEOF
4751#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4752_ACEOF
4753
4754fi
4755
4756done
4757
4758
4759ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
4760if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then :
4761  CARBON=yes
4762fi
4763
4764
4765    if test "x$CARBON" = "xyes"; then
4766      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
4767	with_x=no
4768      fi
4769    fi
4770  fi
4771
4772        if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
4773    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
4774  fi
4775
4776else
4777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778$as_echo "no" >&6; }
4779fi
4780
4781for ac_header in AvailabilityMacros.h
4782do :
4783  ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
4784if test "x$ac_cv_header_AvailabilityMacros_h" = xyes; then :
4785  cat >>confdefs.h <<_ACEOF
4786#define HAVE_AVAILABILITYMACROS_H 1
4787_ACEOF
4788
4789fi
4790
4791done
4792
4793
4794
4795
4796
4797if test "$cross_compiling" = no; then
4798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
4799$as_echo_n "checking --with-local-dir argument... " >&6; }
4800  have_local_include=''
4801  have_local_lib=''
4802
4803# Check whether --with-local-dir was given.
4804if test "${with_local_dir+set}" = set; then :
4805  withval=$with_local_dir;
4806    local_dir="$withval"
4807    case "$withval" in
4808    */*) ;;
4809    no)
4810      # avoid adding local dir to LDFLAGS and CPPFLAGS
4811      have_local_include=yes
4812      have_local_lib=yes
4813      ;;
4814    *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
4815    esac
4816	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
4817$as_echo "$local_dir" >&6; }
4818
4819else
4820
4821    local_dir=/usr/local
4822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
4823$as_echo "Defaulting to $local_dir" >&6; }
4824
4825fi
4826
4827  if test "$GCC" = yes -a "$local_dir" != no; then
4828    echo 'void f(){}' > conftest.c
4829        have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
4830    have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
4831    rm -f conftest.c conftest.o
4832  fi
4833  if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
4834    tt=`echo "$LDFLAGS" | sed -e "s+-L${local_dir}/lib ++g" -e "s+-L${local_dir}/lib$++g"`
4835    if test "$tt" = "$LDFLAGS"; then
4836      LDFLAGS="$LDFLAGS -L${local_dir}/lib"
4837    fi
4838  fi
4839  if test -z "$have_local_include" -a -d "${local_dir}/include"; then
4840    tt=`echo "$CPPFLAGS" | sed -e "s+-I${local_dir}/include ++g" -e "s+-I${local_dir}/include$++g"`
4841    if test "$tt" = "$CPPFLAGS"; then
4842      CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
4843    fi
4844  fi
4845fi
4846
4847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
4848$as_echo_n "checking --with-vim-name argument... " >&6; }
4849
4850# Check whether --with-vim-name was given.
4851if test "${with_vim_name+set}" = set; then :
4852  withval=$with_vim_name; VIMNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
4853$as_echo "$VIMNAME" >&6; }
4854else
4855  VIMNAME="vim"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
4856$as_echo "Defaulting to $VIMNAME" >&6; }
4857fi
4858
4859
4860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
4861$as_echo_n "checking --with-ex-name argument... " >&6; }
4862
4863# Check whether --with-ex-name was given.
4864if test "${with_ex_name+set}" = set; then :
4865  withval=$with_ex_name; EXNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
4866$as_echo "$EXNAME" >&6; }
4867else
4868  EXNAME="ex"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
4869$as_echo "Defaulting to ex" >&6; }
4870fi
4871
4872
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
4874$as_echo_n "checking --with-view-name argument... " >&6; }
4875
4876# Check whether --with-view-name was given.
4877if test "${with_view_name+set}" = set; then :
4878  withval=$with_view_name; VIEWNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
4879$as_echo "$VIEWNAME" >&6; }
4880else
4881  VIEWNAME="view"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
4882$as_echo "Defaulting to view" >&6; }
4883fi
4884
4885
4886
4887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
4888$as_echo_n "checking --with-global-runtime argument... " >&6; }
4889
4890# Check whether --with-global-runtime was given.
4891if test "${with_global_runtime+set}" = set; then :
4892  withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4893$as_echo "$withval" >&6; }
4894else
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899
4900if test "X$RUNTIME_GLOBAL" != "X"; then
4901  RUNTIME_GLOBAL_AFTER=$(printf -- "$RUNTIME_GLOBAL\\n" | $AWK -F, 'BEGIN { comma=0 } { for (i = NF; i > 0; i--) { if (comma) { printf ",%s/after", $i } else { printf "%s/after", $i; comma=1 } } } END { printf "\n" }')
4902  cat >>confdefs.h <<_ACEOF
4903#define RUNTIME_GLOBAL "$RUNTIME_GLOBAL"
4904_ACEOF
4905
4906  cat >>confdefs.h <<_ACEOF
4907#define RUNTIME_GLOBAL_AFTER "$RUNTIME_GLOBAL_AFTER"
4908_ACEOF
4909
4910fi
4911
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
4913$as_echo_n "checking --with-modified-by argument... " >&6; }
4914
4915# Check whether --with-modified-by was given.
4916if test "${with_modified_by+set}" = set; then :
4917  withval=$with_modified_by; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4918$as_echo "$withval" >&6; }; cat >>confdefs.h <<_ACEOF
4919#define MODIFIED_BY "$withval"
4920_ACEOF
4921
4922else
4923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4924$as_echo "no" >&6; }
4925fi
4926
4927
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
4929$as_echo_n "checking if character set is EBCDIC... " >&6; }
4930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4931/* end confdefs.h.  */
4932
4933int
4934main ()
4935{
4936 /* TryCompile function for CharSet.
4937   Treat any failure as ASCII for compatibility with existing art.
4938   Use compile-time rather than run-time tests for cross-compiler
4939   tolerance.  */
4940#if '0'!=240
4941make an error "Character set is not EBCDIC"
4942#endif
4943  ;
4944  return 0;
4945}
4946_ACEOF
4947if ac_fn_c_try_compile "$LINENO"; then :
4948   # TryCompile action if true
4949cf_cv_ebcdic=yes
4950else
4951   # TryCompile action if false
4952cf_cv_ebcdic=no
4953fi
4954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4955# end of TryCompile ])
4956# end of CacheVal CvEbcdic
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
4958$as_echo "$cf_cv_ebcdic" >&6; }
4959case "$cf_cv_ebcdic" in  #(vi
4960    yes)	$as_echo "#define EBCDIC 1" >>confdefs.h
4961
4962		line_break='"\\n"'
4963		;;
4964    *)		line_break='"\\012"';;
4965esac
4966
4967
4968if test "$cf_cv_ebcdic" = "yes"; then
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
4970$as_echo_n "checking for z/OS Unix... " >&6; }
4971case `uname` in
4972    OS/390)	zOSUnix="yes";
4973										if test "$CC" = "cc"; then
4974		  ccm="$_CC_CCMODE"
4975		  ccn="CC"
4976		else
4977		  if test "$CC" = "c89"; then
4978		    ccm="$_CC_C89MODE"
4979		    ccn="C89"
4980		  else
4981		    ccm=1
4982		  fi
4983		fi
4984		if test "$ccm" != "1"; then
4985		  echo ""
4986		  echo "------------------------------------------"
4987		  echo " On z/OS Unix, the environment variable"
4988		  echo " _CC_${ccn}MODE must be set to \"1\"!"
4989		  echo " Do:"
4990		  echo "    export _CC_${ccn}MODE=1"
4991		  echo " and then call configure again."
4992		  echo "------------------------------------------"
4993		  exit 1
4994		fi
4995		# Set CFLAGS for configure process.
4996		# This will be reset later for config.mk.
4997		# Use haltonmsg to force error for missing H files.
4998		CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
4999		LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
5000		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5001$as_echo "yes" >&6; }
5002		;;
5003    *)		zOSUnix="no";
5004		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006		;;
5007esac
5008fi
5009
5010if test "$zOSUnix" = "yes"; then
5011    QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/'"
5012else
5013    QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/'"
5014fi
5015
5016
5017
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5019$as_echo_n "checking --disable-smack argument... " >&6; }
5020# Check whether --enable-smack was given.
5021if test "${enable_smack+set}" = set; then :
5022  enableval=$enable_smack;
5023else
5024  enable_smack="yes"
5025fi
5026
5027if test "$enable_smack" = "yes"; then
5028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030  ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5031if test "x$ac_cv_header_linux_xattr_h" = xyes; then :
5032  true
5033else
5034  enable_smack="no"
5035fi
5036
5037
5038else
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5040$as_echo "yes" >&6; }
5041fi
5042if test "$enable_smack" = "yes"; then
5043  ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
5044if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
5045  true
5046else
5047  enable_smack="no"
5048fi
5049
5050
5051fi
5052if test "$enable_smack" = "yes"; then
5053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5054$as_echo_n "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056/* end confdefs.h.  */
5057#include <linux/xattr.h>
5058_ACEOF
5059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5060  $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1; then :
5061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5062$as_echo "yes" >&6; }
5063else
5064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065$as_echo "no" >&6; }; enable_smack="no"
5066fi
5067rm -f conftest*
5068
5069fi
5070if test "$enable_smack" = "yes"; then
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5072$as_echo_n "checking for setxattr in -lattr... " >&6; }
5073if ${ac_cv_lib_attr_setxattr+:} false; then :
5074  $as_echo_n "(cached) " >&6
5075else
5076  ac_check_lib_save_LIBS=$LIBS
5077LIBS="-lattr  $LIBS"
5078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5079/* end confdefs.h.  */
5080
5081/* Override any GCC internal prototype to avoid an error.
5082   Use char because int might match the return type of a GCC
5083   builtin and then its argument prototype would still apply.  */
5084#ifdef __cplusplus
5085extern "C"
5086#endif
5087char setxattr ();
5088int
5089main ()
5090{
5091return setxattr ();
5092  ;
5093  return 0;
5094}
5095_ACEOF
5096if ac_fn_c_try_link "$LINENO"; then :
5097  ac_cv_lib_attr_setxattr=yes
5098else
5099  ac_cv_lib_attr_setxattr=no
5100fi
5101rm -f core conftest.err conftest.$ac_objext \
5102    conftest$ac_exeext conftest.$ac_ext
5103LIBS=$ac_check_lib_save_LIBS
5104fi
5105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5106$as_echo "$ac_cv_lib_attr_setxattr" >&6; }
5107if test "x$ac_cv_lib_attr_setxattr" = xyes; then :
5108  LIBS="$LIBS -lattr"
5109	   found_smack="yes"
5110	   $as_echo "#define HAVE_SMACK 1" >>confdefs.h
5111
5112fi
5113
5114fi
5115
5116if test "x$found_smack" = "x"; then
5117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5118$as_echo_n "checking --disable-selinux argument... " >&6; }
5119  # Check whether --enable-selinux was given.
5120if test "${enable_selinux+set}" = set; then :
5121  enableval=$enable_selinux;
5122else
5123  enable_selinux="yes"
5124fi
5125
5126  if test "$enable_selinux" = "yes"; then
5127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5128$as_echo "no" >&6; }
5129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5130$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
5131if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  ac_check_lib_save_LIBS=$LIBS
5135LIBS="-lselinux  $LIBS"
5136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5137/* end confdefs.h.  */
5138
5139/* Override any GCC internal prototype to avoid an error.
5140   Use char because int might match the return type of a GCC
5141   builtin and then its argument prototype would still apply.  */
5142#ifdef __cplusplus
5143extern "C"
5144#endif
5145char is_selinux_enabled ();
5146int
5147main ()
5148{
5149return is_selinux_enabled ();
5150  ;
5151  return 0;
5152}
5153_ACEOF
5154if ac_fn_c_try_link "$LINENO"; then :
5155  ac_cv_lib_selinux_is_selinux_enabled=yes
5156else
5157  ac_cv_lib_selinux_is_selinux_enabled=no
5158fi
5159rm -f core conftest.err conftest.$ac_objext \
5160    conftest$ac_exeext conftest.$ac_ext
5161LIBS=$ac_check_lib_save_LIBS
5162fi
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5164$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5165if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then :
5166  ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5167if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
5168  LIBS="$LIBS -lselinux"
5169	    $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
5170
5171fi
5172
5173
5174fi
5175
5176  else
5177     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5178$as_echo "yes" >&6; }
5179  fi
5180fi
5181
5182
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5184$as_echo_n "checking --with-features argument... " >&6; }
5185
5186# Check whether --with-features was given.
5187if test "${with_features+set}" = set; then :
5188  withval=$with_features; features="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5189$as_echo "$features" >&6; }
5190else
5191  features="huge"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5192$as_echo "Defaulting to huge" >&6; }
5193fi
5194
5195
5196dovimdiff=""
5197dogvimdiff=""
5198case "$features" in
5199  tiny)		$as_echo "#define FEAT_TINY 1" >>confdefs.h
5200 ;;
5201  small)	$as_echo "#define FEAT_SMALL 1" >>confdefs.h
5202 ;;
5203  normal)	$as_echo "#define FEAT_NORMAL 1" >>confdefs.h
5204 dovimdiff="installvimdiff";
5205			dogvimdiff="installgvimdiff" ;;
5206  big)		$as_echo "#define FEAT_BIG 1" >>confdefs.h
5207 dovimdiff="installvimdiff";
5208			dogvimdiff="installgvimdiff" ;;
5209  huge)		$as_echo "#define FEAT_HUGE 1" >>confdefs.h
5210 dovimdiff="installvimdiff";
5211			dogvimdiff="installgvimdiff" ;;
5212  *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5213$as_echo "Sorry, $features is not supported" >&6; } ;;
5214esac
5215
5216
5217
5218
5219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5220$as_echo_n "checking --with-compiledby argument... " >&6; }
5221
5222# Check whether --with-compiledby was given.
5223if test "${with_compiledby+set}" = set; then :
5224  withval=$with_compiledby; compiledby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5225$as_echo "$withval" >&6; }
5226else
5227  compiledby=""; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230
5231
5232
5233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5234$as_echo_n "checking --disable-xsmp argument... " >&6; }
5235# Check whether --enable-xsmp was given.
5236if test "${enable_xsmp+set}" = set; then :
5237  enableval=$enable_xsmp;
5238else
5239  enable_xsmp="yes"
5240fi
5241
5242
5243if test "$enable_xsmp" = "yes"; then
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245$as_echo "no" >&6; }
5246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5247$as_echo_n "checking --disable-xsmp-interact argument... " >&6; }
5248  # Check whether --enable-xsmp-interact was given.
5249if test "${enable_xsmp_interact+set}" = set; then :
5250  enableval=$enable_xsmp_interact;
5251else
5252  enable_xsmp_interact="yes"
5253fi
5254
5255  if test "$enable_xsmp_interact" = "yes"; then
5256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5257$as_echo "no" >&6; }
5258    $as_echo "#define USE_XSMP_INTERACT 1" >>confdefs.h
5259
5260  else
5261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5262$as_echo "yes" >&6; }
5263  fi
5264else
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5266$as_echo "yes" >&6; }
5267fi
5268
5269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5270$as_echo_n "checking --enable-luainterp argument... " >&6; }
5271# Check whether --enable-luainterp was given.
5272if test "${enable_luainterp+set}" = set; then :
5273  enableval=$enable_luainterp;
5274else
5275  enable_luainterp="no"
5276fi
5277
5278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5279$as_echo "$enable_luainterp" >&6; }
5280
5281if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
5282  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
5283    as_fn_error $? "cannot use Lua with tiny or small features" "$LINENO" 5
5284  fi
5285
5286
5287
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5289$as_echo_n "checking --with-lua-prefix argument... " >&6; }
5290
5291# Check whether --with-lua_prefix was given.
5292if test "${with_lua_prefix+set}" = set; then :
5293  withval=$with_lua_prefix; with_lua_prefix="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5294$as_echo "$with_lua_prefix" >&6; }
5295else
5296  with_lua_prefix="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5297$as_echo "no" >&6; }
5298fi
5299
5300
5301  if test "X$with_lua_prefix" != "X"; then
5302       vi_cv_path_lua_pfx="$with_lua_prefix"
5303  else
5304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5305$as_echo_n "checking LUA_PREFIX environment var... " >&6; }
5306    if test "X$LUA_PREFIX" != "X"; then
5307	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5308$as_echo "\"$LUA_PREFIX\"" >&6; }
5309	vi_cv_path_lua_pfx="$LUA_PREFIX"
5310    else
5311	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5312$as_echo "not set, default to /usr" >&6; }
5313	vi_cv_path_lua_pfx="/usr"
5314    fi
5315  fi
5316
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5318$as_echo_n "checking --with-luajit... " >&6; }
5319
5320# Check whether --with-luajit was given.
5321if test "${with_luajit+set}" = set; then :
5322  withval=$with_luajit; vi_cv_with_luajit="$withval"
5323else
5324  vi_cv_with_luajit="no"
5325fi
5326
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5328$as_echo "$vi_cv_with_luajit" >&6; }
5329
5330  LUA_INC=
5331  if test "X$vi_cv_path_lua_pfx" != "X"; then
5332    if test "x$vi_cv_with_luajit" != "xno"; then
5333            # Extract the first word of "luajit", so it can be a program name with args.
5334set dummy luajit; ac_word=$2
5335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5336$as_echo_n "checking for $ac_word... " >&6; }
5337if ${ac_cv_path_vi_cv_path_luajit+:} false; then :
5338  $as_echo_n "(cached) " >&6
5339else
5340  case $vi_cv_path_luajit in
5341  [\\/]* | ?:[\\/]*)
5342  ac_cv_path_vi_cv_path_luajit="$vi_cv_path_luajit" # Let the user override the test with a path.
5343  ;;
5344  *)
5345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5346for as_dir in $PATH
5347do
5348  IFS=$as_save_IFS
5349  test -z "$as_dir" && as_dir=.
5350    for ac_exec_ext in '' $ac_executable_extensions; do
5351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5352    ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext"
5353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5354    break 2
5355  fi
5356done
5357  done
5358IFS=$as_save_IFS
5359
5360  ;;
5361esac
5362fi
5363vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5364if test -n "$vi_cv_path_luajit"; then
5365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5366$as_echo "$vi_cv_path_luajit" >&6; }
5367else
5368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5369$as_echo "no" >&6; }
5370fi
5371
5372
5373      if test "X$vi_cv_path_luajit" != "X"; then
5374		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5375$as_echo_n "checking LuaJIT version... " >&6; }
5376if ${vi_cv_version_luajit+:} false; then :
5377  $as_echo_n "(cached) " >&6
5378else
5379   vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'`
5380fi
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5382$as_echo "$vi_cv_version_luajit" >&6; }
5383	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5384$as_echo_n "checking Lua version of LuaJIT... " >&6; }
5385if ${vi_cv_version_lua_luajit+:} false; then :
5386  $as_echo_n "(cached) " >&6
5387else
5388   vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5389fi
5390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5391$as_echo "$vi_cv_version_lua_luajit" >&6; }
5392	vi_cv_path_lua="$vi_cv_path_luajit"
5393	vi_cv_version_lua="$vi_cv_version_lua_luajit"
5394      fi
5395    else
5396            # Extract the first word of "lua", so it can be a program name with args.
5397set dummy lua; ac_word=$2
5398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5399$as_echo_n "checking for $ac_word... " >&6; }
5400if ${ac_cv_path_vi_cv_path_plain_lua+:} false; then :
5401  $as_echo_n "(cached) " >&6
5402else
5403  case $vi_cv_path_plain_lua in
5404  [\\/]* | ?:[\\/]*)
5405  ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5406  ;;
5407  *)
5408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5409for as_dir in $PATH
5410do
5411  IFS=$as_save_IFS
5412  test -z "$as_dir" && as_dir=.
5413    for ac_exec_ext in '' $ac_executable_extensions; do
5414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5415    ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext"
5416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5417    break 2
5418  fi
5419done
5420  done
5421IFS=$as_save_IFS
5422
5423  ;;
5424esac
5425fi
5426vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5427if test -n "$vi_cv_path_plain_lua"; then
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5429$as_echo "$vi_cv_path_plain_lua" >&6; }
5430else
5431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432$as_echo "no" >&6; }
5433fi
5434
5435
5436      if test "X$vi_cv_path_plain_lua" != "X"; then
5437		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5438$as_echo_n "checking Lua version... " >&6; }
5439if ${vi_cv_version_plain_lua+:} false; then :
5440  $as_echo_n "(cached) " >&6
5441else
5442   vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5443fi
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5445$as_echo "$vi_cv_version_plain_lua" >&6; }
5446      fi
5447      vi_cv_path_lua="$vi_cv_path_plain_lua"
5448      vi_cv_version_lua="$vi_cv_version_plain_lua"
5449    fi
5450    if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
5451      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit" >&5
5452$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit... " >&6; }
5453      if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
5454	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5455$as_echo "yes" >&6; }
5456	LUA_INC=/luajit-$vi_cv_version_luajit
5457      fi
5458    fi
5459    if test "X$LUA_INC" = "X"; then
5460      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5461$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
5462      if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
5463	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5464$as_echo "yes" >&6; }
5465      else
5466	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5467$as_echo "no" >&6; }
5468	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
5469$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
5470	if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
5471	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5472$as_echo "yes" >&6; }
5473	  LUA_INC=/lua$vi_cv_version_lua
5474	else
5475	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
5477	  vi_cv_path_lua_pfx=
5478	fi
5479      fi
5480    fi
5481  fi
5482
5483  if test "X$vi_cv_path_lua_pfx" != "X"; then
5484    if test "x$vi_cv_with_luajit" != "xno"; then
5485      multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5486      if test "X$multiarch" != "X"; then
5487	lib_multiarch="lib/${multiarch}"
5488      else
5489	lib_multiarch="lib"
5490      fi
5491      if test "X$vi_cv_version_lua" = "X"; then
5492	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5493      else
5494	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5495      fi
5496    else
5497      if test "X$LUA_INC" != "X"; then
5498		LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
5499      else
5500	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
5501      fi
5502    fi
5503    if test "$enable_luainterp" = "dynamic"; then
5504      lua_ok="yes"
5505    else
5506      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5507$as_echo_n "checking if link with ${LUA_LIBS} is sane... " >&6; }
5508      libs_save=$LIBS
5509      LIBS="$LIBS $LUA_LIBS"
5510      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5511/* end confdefs.h.  */
5512
5513int
5514main ()
5515{
5516
5517  ;
5518  return 0;
5519}
5520_ACEOF
5521if ac_fn_c_try_link "$LINENO"; then :
5522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5523$as_echo "yes" >&6; }; lua_ok="yes"
5524else
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5526$as_echo "no" >&6; }; lua_ok="no"; LUA_LIBS=""
5527fi
5528rm -f core conftest.err conftest.$ac_objext \
5529    conftest$ac_exeext conftest.$ac_ext
5530      LIBS=$libs_save
5531    fi
5532    if test "x$lua_ok" = "xyes"; then
5533      LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5534      LUA_SRC="if_lua.c"
5535      LUA_OBJ="objects/if_lua.o"
5536      LUA_PRO="if_lua.pro"
5537      $as_echo "#define FEAT_LUA 1" >>confdefs.h
5538
5539    fi
5540    if test "$enable_luainterp" = "dynamic"; then
5541      if test "x$vi_cv_with_luajit" != "xno"; then
5542	luajit="jit"
5543      fi
5544      if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5545	vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5546      else
5547	if test "x$MACOS_X" = "xyes"; then
5548	  ext="dylib"
5549	  indexes=""
5550	else
5551	  ext="so"
5552	  indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5553	  multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5554	  if test "X$multiarch" != "X"; then
5555	    lib_multiarch="lib/${multiarch}"
5556	  fi
5557	fi
5558			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5559$as_echo_n "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
5560	for subdir in "${lib_multiarch}" lib64 lib; do
5561	  if test -z "$subdir"; then
5562	    continue
5563	  fi
5564	  for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5565	    ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5566	    for i in $indexes ""; do
5567	      if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
5568		sover2="$i"
5569		break 3
5570	      fi
5571	    done
5572	  done
5573	  sover=""
5574	done
5575	if test "X$sover" = "X"; then
5576	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5577$as_echo "no" >&6; }
5578	  lua_ok="no"
5579	  vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5580	else
5581	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5582$as_echo "yes" >&6; }
5583	  lua_ok="yes"
5584	  vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5585	fi
5586      fi
5587      $as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
5588
5589      LUA_LIBS=""
5590      LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
5591    fi
5592    if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
5593       test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
5594       test "`(uname -m) 2>/dev/null`" = "x86_64"; then
5595            LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5596    fi
5597  fi
5598  if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
5599    as_fn_error $? "could not configure lua" "$LINENO" 5
5600  fi
5601
5602
5603
5604
5605
5606fi
5607
5608
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5610$as_echo_n "checking --enable-mzschemeinterp argument... " >&6; }
5611# Check whether --enable-mzschemeinterp was given.
5612if test "${enable_mzschemeinterp+set}" = set; then :
5613  enableval=$enable_mzschemeinterp;
5614else
5615  enable_mzschemeinterp="no"
5616fi
5617
5618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5619$as_echo "$enable_mzschemeinterp" >&6; }
5620
5621if test "$enable_mzschemeinterp" = "yes"; then
5622
5623
5624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5625$as_echo_n "checking --with-plthome argument... " >&6; }
5626
5627# Check whether --with-plthome was given.
5628if test "${with_plthome+set}" = set; then :
5629  withval=$with_plthome; with_plthome="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5630$as_echo "$with_plthome" >&6; }
5631else
5632  with_plthome="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5633$as_echo "\"no\"" >&6; }
5634fi
5635
5636
5637  if test "X$with_plthome" != "X"; then
5638       vi_cv_path_mzscheme_pfx="$with_plthome"
5639       vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5640  else
5641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5642$as_echo_n "checking PLTHOME environment var... " >&6; }
5643    if test "X$PLTHOME" != "X"; then
5644	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5645$as_echo "\"$PLTHOME\"" >&6; }
5646	vi_cv_path_mzscheme_pfx="$PLTHOME"
5647	vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5648    else
5649	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5650$as_echo "not set" >&6; }
5651		# Extract the first word of "mzscheme", so it can be a program name with args.
5652set dummy mzscheme; ac_word=$2
5653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5654$as_echo_n "checking for $ac_word... " >&6; }
5655if ${ac_cv_path_vi_cv_path_mzscheme+:} false; then :
5656  $as_echo_n "(cached) " >&6
5657else
5658  case $vi_cv_path_mzscheme in
5659  [\\/]* | ?:[\\/]*)
5660  ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
5661  ;;
5662  *)
5663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5664for as_dir in $PATH
5665do
5666  IFS=$as_save_IFS
5667  test -z "$as_dir" && as_dir=.
5668    for ac_exec_ext in '' $ac_executable_extensions; do
5669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5670    ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext"
5671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5672    break 2
5673  fi
5674done
5675  done
5676IFS=$as_save_IFS
5677
5678  ;;
5679esac
5680fi
5681vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
5682if test -n "$vi_cv_path_mzscheme"; then
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
5684$as_echo "$vi_cv_path_mzscheme" >&6; }
5685else
5686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5687$as_echo "no" >&6; }
5688fi
5689
5690
5691
5692			if test "X$vi_cv_path_mzscheme" != "X"; then
5693	  lsout=`ls -l $vi_cv_path_mzscheme`
5694	  if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
5695	    vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
5696	  fi
5697	fi
5698
5699	if test "X$vi_cv_path_mzscheme" != "X"; then
5700	    	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
5701$as_echo_n "checking MzScheme install prefix... " >&6; }
5702if ${vi_cv_path_mzscheme_pfx+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  	    	    echo "(display (simplify-path		\
5706	       (build-path (call-with-values	\
5707		(lambda () (split-path (find-system-path (quote exec-file)))) \
5708		(lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
5709	    	     vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
5710		sed -e 's+/$++'`
5711fi
5712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
5713$as_echo "$vi_cv_path_mzscheme_pfx" >&6; }
5714	    rm -f mzdirs.scm
5715	fi
5716    fi
5717  fi
5718
5719  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
5721$as_echo_n "checking for racket include directory... " >&6; }
5722    SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
5723    if test "X$SCHEME_INC" != "X"; then
5724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
5725$as_echo "${SCHEME_INC}" >&6; }
5726    else
5727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5728$as_echo "not found" >&6; }
5729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
5730$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
5731      if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
5732	SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
5733	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5734$as_echo "yes" >&6; }
5735      else
5736	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
5738	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
5739$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
5740	if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
5741	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5742$as_echo "yes" >&6; }
5743	  SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
5744	else
5745	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5746$as_echo "no" >&6; }
5747	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
5748$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
5749	  if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
5750	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5751$as_echo "yes" >&6; }
5752	    SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
5753	  else
5754	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755$as_echo "no" >&6; }
5756	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
5757$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
5758	    if test -f /usr/include/plt/scheme.h; then
5759	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5760$as_echo "yes" >&6; }
5761	      SCHEME_INC=/usr/include/plt
5762	    else
5763	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764$as_echo "no" >&6; }
5765	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
5766$as_echo_n "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
5767	      if test -f /usr/include/racket/scheme.h; then
5768		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5769$as_echo "yes" >&6; }
5770		SCHEME_INC=/usr/include/racket
5771	      else
5772		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
5774		vi_cv_path_mzscheme_pfx=
5775	      fi
5776	    fi
5777	  fi
5778	fi
5779      fi
5780    fi
5781  fi
5782
5783  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5784
5785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
5786$as_echo_n "checking for racket lib directory... " >&6; }
5787    SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
5788    if test "X$SCHEME_LIB" != "X"; then
5789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
5790$as_echo "${SCHEME_LIB}" >&6; }
5791    else
5792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5793$as_echo "not found" >&6; }
5794    fi
5795
5796    for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
5797      if test "X$path" != "X"; then
5798	if test "x$MACOS_X" = "xyes"; then
5799	  MZSCHEME_LIBS="-framework Racket"
5800	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5801	elif test -f "${path}/libmzscheme3m.a"; then
5802	  MZSCHEME_LIBS="${path}/libmzscheme3m.a"
5803	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5804	elif test -f "${path}/libracket3m.a"; then
5805	  MZSCHEME_LIBS="${path}/libracket3m.a"
5806	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5807	elif test -f "${path}/libracket.a"; then
5808	  MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
5809	elif test -f "${path}/libmzscheme.a"; then
5810	  MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
5811	else
5812	  	  if test -f "${path}/libmzscheme3m.so"; then
5813	    MZSCHEME_LIBS="-L${path} -lmzscheme3m"
5814	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5815	  elif test -f "${path}/libracket3m.so"; then
5816	    MZSCHEME_LIBS="-L${path} -lracket3m"
5817	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5818	  elif test -f "${path}/libracket.so"; then
5819	    MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
5820	  else
5821	    	    if test "$path" != "$SCHEME_LIB"; then
5822	      continue
5823	    fi
5824	    MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
5825	  fi
5826	  if test "$GCC" = yes; then
5827	    	    	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
5828	  elif test "`(uname) 2>/dev/null`" = SunOS &&
5829				   uname -r | grep '^5' >/dev/null; then
5830	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
5831	  fi
5832	fi
5833      fi
5834      if test "X$MZSCHEME_LIBS" != "X"; then
5835	break
5836      fi
5837    done
5838
5839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
5840$as_echo_n "checking if racket requires -pthread... " >&6; }
5841    if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
5842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5843$as_echo "yes" >&6; }
5844      MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
5845      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
5846    else
5847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5848$as_echo "no" >&6; }
5849    fi
5850
5851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
5852$as_echo_n "checking for racket config directory... " >&6; }
5853    SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
5854    if test "X$SCHEME_CONFIGDIR" != "X"; then
5855      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
5856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
5857$as_echo "${SCHEME_CONFIGDIR}" >&6; }
5858    else
5859      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5860$as_echo "not found" >&6; }
5861    fi
5862
5863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
5864$as_echo_n "checking for racket collects directory... " >&6; }
5865    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))))'`
5866    if test "X$SCHEME_COLLECTS" = "X"; then
5867      if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
5868	SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
5869      else
5870	if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
5871	  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
5872	else
5873	  if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
5874	    SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
5875	  else
5876	    if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
5877	      SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
5878	    fi
5879	  fi
5880	fi
5881      fi
5882    fi
5883    if test "X$SCHEME_COLLECTS" != "X" ; then
5884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
5885$as_echo "${SCHEME_COLLECTS}" >&6; }
5886    else
5887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5888$as_echo "not found" >&6; }
5889    fi
5890
5891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
5892$as_echo_n "checking for mzscheme_base.c... " >&6; }
5893    if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
5894      MZSCHEME_EXTRA="mzscheme_base.c"
5895      MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5896      MZSCHEME_MOD="++lib scheme/base"
5897    else
5898      if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
5899	MZSCHEME_EXTRA="mzscheme_base.c"
5900	MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5901	MZSCHEME_MOD="++lib scheme/base"
5902      else
5903	if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
5904	  MZSCHEME_EXTRA="mzscheme_base.c"
5905	  MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
5906	  MZSCHEME_MOD=""
5907	fi
5908      fi
5909    fi
5910    if test "X$MZSCHEME_EXTRA" != "X" ; then
5911            MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
5912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: needed" >&5
5913$as_echo "needed" >&6; }
5914    else
5915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
5916$as_echo "not needed" >&6; }
5917    fi
5918
5919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
5920$as_echo_n "checking for ffi_type_void in -lffi... " >&6; }
5921if ${ac_cv_lib_ffi_ffi_type_void+:} false; then :
5922  $as_echo_n "(cached) " >&6
5923else
5924  ac_check_lib_save_LIBS=$LIBS
5925LIBS="-lffi  $LIBS"
5926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5927/* end confdefs.h.  */
5928
5929/* Override any GCC internal prototype to avoid an error.
5930   Use char because int might match the return type of a GCC
5931   builtin and then its argument prototype would still apply.  */
5932#ifdef __cplusplus
5933extern "C"
5934#endif
5935char ffi_type_void ();
5936int
5937main ()
5938{
5939return ffi_type_void ();
5940  ;
5941  return 0;
5942}
5943_ACEOF
5944if ac_fn_c_try_link "$LINENO"; then :
5945  ac_cv_lib_ffi_ffi_type_void=yes
5946else
5947  ac_cv_lib_ffi_ffi_type_void=no
5948fi
5949rm -f core conftest.err conftest.$ac_objext \
5950    conftest$ac_exeext conftest.$ac_ext
5951LIBS=$ac_check_lib_save_LIBS
5952fi
5953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
5954$as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; }
5955if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes; then :
5956  MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
5957fi
5958
5959
5960    MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
5961      -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
5962
5963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
5964$as_echo_n "checking if compile and link flags for MzScheme are sane... " >&6; }
5965    cflags_save=$CFLAGS
5966    libs_save=$LIBS
5967    CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
5968    LIBS="$LIBS $MZSCHEME_LIBS"
5969    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5970/* end confdefs.h.  */
5971
5972int
5973main ()
5974{
5975
5976  ;
5977  return 0;
5978}
5979_ACEOF
5980if ac_fn_c_try_link "$LINENO"; then :
5981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5982$as_echo "yes" >&6; }; mzs_ok=yes
5983else
5984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
5985$as_echo "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
5986fi
5987rm -f core conftest.err conftest.$ac_objext \
5988    conftest$ac_exeext conftest.$ac_ext
5989    CFLAGS=$cflags_save
5990    LIBS=$libs_save
5991    if test $mzs_ok = yes; then
5992      MZSCHEME_SRC="if_mzsch.c"
5993      MZSCHEME_OBJ="objects/if_mzsch.o"
5994      MZSCHEME_PRO="if_mzsch.pro"
5995      $as_echo "#define FEAT_MZSCHEME 1" >>confdefs.h
5996
5997    else
5998      MZSCHEME_CFLAGS=
5999      MZSCHEME_LIBS=
6000      MZSCHEME_EXTRA=
6001      MZSCHEME_MZC=
6002    fi
6003  fi
6004
6005
6006
6007
6008
6009
6010
6011fi
6012
6013
6014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6015$as_echo_n "checking --enable-perlinterp argument... " >&6; }
6016# Check whether --enable-perlinterp was given.
6017if test "${enable_perlinterp+set}" = set; then :
6018  enableval=$enable_perlinterp;
6019else
6020  enable_perlinterp="no"
6021fi
6022
6023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6024$as_echo "$enable_perlinterp" >&6; }
6025if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
6026  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6027    as_fn_error $? "cannot use Perl with tiny or small features" "$LINENO" 5
6028  fi
6029
6030  # Extract the first word of "perl", so it can be a program name with args.
6031set dummy perl; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_path_vi_cv_path_perl+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  case $vi_cv_path_perl in
6038  [\\/]* | ?:[\\/]*)
6039  ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6040  ;;
6041  *)
6042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045  IFS=$as_save_IFS
6046  test -z "$as_dir" && as_dir=.
6047    for ac_exec_ext in '' $ac_executable_extensions; do
6048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6049    ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext"
6050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051    break 2
6052  fi
6053done
6054  done
6055IFS=$as_save_IFS
6056
6057  ;;
6058esac
6059fi
6060vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
6061if test -n "$vi_cv_path_perl"; then
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6063$as_echo "$vi_cv_path_perl" >&6; }
6064else
6065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066$as_echo "no" >&6; }
6067fi
6068
6069
6070  if test "X$vi_cv_path_perl" != "X"; then
6071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6072$as_echo_n "checking Perl version... " >&6; }
6073    if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6074     eval `$vi_cv_path_perl -V:usethreads`
6075     eval `$vi_cv_path_perl -V:libperl`
6076     if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6077       badthreads=no
6078     else
6079       if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6080	 eval `$vi_cv_path_perl -V:use5005threads`
6081	 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6082	   badthreads=no
6083	 else
6084	   badthreads=yes
6085	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6086$as_echo ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
6087	 fi
6088       else
6089	 badthreads=yes
6090	 { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6091$as_echo ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
6092       fi
6093     fi
6094     if test $badthreads = no; then
6095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6096$as_echo "OK" >&6; }
6097      eval `$vi_cv_path_perl -V:shrpenv`
6098      if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6099	shrpenv=""
6100      fi
6101      vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
6102
6103      vi_cv_perl_extutils=unknown_perl_extutils_path
6104      for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6105	xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6106	if test -f "$xsubpp_path"; then
6107	  vi_cv_perl_xsubpp="$xsubpp_path"
6108	fi
6109      done
6110
6111                              perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
6112		-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6113		-e 's/-fdebug-prefix-map[^ ]*//g' \
6114		-e 's/-pipe //' \
6115		-e 's/-W[^ ]*//g' \
6116		-e 's/-D_FORTIFY_SOURCE=.//g'`
6117            perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6118		sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6119			-e 's/-bE:perl.exp//' -e 's/-lc //'`
6120                  perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6121		-e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6122
6123                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6124$as_echo_n "checking if compile and link flags for Perl are sane... " >&6; }
6125      cflags_save=$CFLAGS
6126      libs_save=$LIBS
6127      ldflags_save=$LDFLAGS
6128      CFLAGS="$CFLAGS $perlcppflags"
6129      LIBS="$LIBS $perllibs"
6130      perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
6131      LDFLAGS="$perlldflags $LDFLAGS"
6132      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6133/* end confdefs.h.  */
6134
6135int
6136main ()
6137{
6138
6139  ;
6140  return 0;
6141}
6142_ACEOF
6143if ac_fn_c_try_link "$LINENO"; then :
6144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6145$as_echo "yes" >&6; }; perl_ok=yes
6146else
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6148$as_echo "no: PERL DISABLED" >&6; }; perl_ok=no
6149fi
6150rm -f core conftest.err conftest.$ac_objext \
6151    conftest$ac_exeext conftest.$ac_ext
6152      CFLAGS=$cflags_save
6153      LIBS=$libs_save
6154      LDFLAGS=$ldflags_save
6155      if test $perl_ok = yes; then
6156	if test "X$perlcppflags" != "X"; then
6157	  PERL_CFLAGS=$perlcppflags
6158	fi
6159	if test "X$perlldflags" != "X"; then
6160	  if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
6161	    LDFLAGS="$perlldflags $LDFLAGS"
6162	  fi
6163	fi
6164	PERL_LIBS=$perllibs
6165	PERL_SRC="auto/if_perl.c if_perlsfio.c"
6166	PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6167	PERL_PRO="if_perl.pro if_perlsfio.pro"
6168	$as_echo "#define FEAT_PERL 1" >>confdefs.h
6169
6170      fi
6171     fi
6172    else
6173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6174$as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
6175    fi
6176  fi
6177
6178  if test "x$MACOS_X" = "xyes"; then
6179        dir=/System/Library/Perl
6180    darwindir=$dir/darwin
6181    if test -d $darwindir; then
6182      PERL=/usr/bin/perl
6183    else
6184            dir=/System/Library/Perl/5.8.1
6185      darwindir=$dir/darwin-thread-multi-2level
6186      if test -d $darwindir; then
6187	PERL=/usr/bin/perl
6188      fi
6189    fi
6190    if test -n "$PERL"; then
6191      PERL_DIR="$dir"
6192      PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6193      PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6194      PERL_LIBS="-L$darwindir/CORE -lperl"
6195    fi
6196                PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6197    PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6198  fi
6199  if test "$enable_perlinterp" = "dynamic"; then
6200    if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
6201      $as_echo "#define DYNAMIC_PERL 1" >>confdefs.h
6202
6203      PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
6204    fi
6205  fi
6206
6207  if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
6208    as_fn_error $? "could not configure perl" "$LINENO" 5
6209  fi
6210fi
6211
6212
6213
6214
6215
6216
6217
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6219$as_echo_n "checking --enable-pythoninterp argument... " >&6; }
6220# Check whether --enable-pythoninterp was given.
6221if test "${enable_pythoninterp+set}" = set; then :
6222  enableval=$enable_pythoninterp;
6223else
6224  enable_pythoninterp="no"
6225fi
6226
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6228$as_echo "$enable_pythoninterp" >&6; }
6229if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
6230  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6231    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
6232  fi
6233
6234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6235$as_echo_n "checking --with-python-command argument... " >&6; }
6236
6237
6238# Check whether --with-python-command was given.
6239if test "${with_python_command+set}" = set; then :
6240  withval=$with_python_command; vi_cv_path_python="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6241$as_echo "$vi_cv_path_python" >&6; }
6242else
6243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6244$as_echo "no" >&6; }
6245fi
6246
6247
6248  if test "X$vi_cv_path_python" = "X"; then
6249    for ac_prog in python2 python
6250do
6251  # Extract the first word of "$ac_prog", so it can be a program name with args.
6252set dummy $ac_prog; ac_word=$2
6253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6254$as_echo_n "checking for $ac_word... " >&6; }
6255if ${ac_cv_path_vi_cv_path_python+:} false; then :
6256  $as_echo_n "(cached) " >&6
6257else
6258  case $vi_cv_path_python in
6259  [\\/]* | ?:[\\/]*)
6260  ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6261  ;;
6262  *)
6263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH
6265do
6266  IFS=$as_save_IFS
6267  test -z "$as_dir" && as_dir=.
6268    for ac_exec_ext in '' $ac_executable_extensions; do
6269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6270    ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext"
6271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6272    break 2
6273  fi
6274done
6275  done
6276IFS=$as_save_IFS
6277
6278  ;;
6279esac
6280fi
6281vi_cv_path_python=$ac_cv_path_vi_cv_path_python
6282if test -n "$vi_cv_path_python"; then
6283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6284$as_echo "$vi_cv_path_python" >&6; }
6285else
6286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287$as_echo "no" >&6; }
6288fi
6289
6290
6291  test -n "$vi_cv_path_python" && break
6292done
6293
6294  fi
6295  if test "X$vi_cv_path_python" != "X"; then
6296
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6298$as_echo_n "checking Python version... " >&6; }
6299if ${vi_cv_var_python_version+:} false; then :
6300  $as_echo_n "(cached) " >&6
6301else
6302  vi_cv_var_python_version=`
6303	    ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
6304
6305fi
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6307$as_echo "$vi_cv_var_python_version" >&6; }
6308
6309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6310$as_echo_n "checking Python is 2.3 or better... " >&6; }
6311    if ${vi_cv_path_python} -c \
6312	"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
6313    then
6314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6315$as_echo "yep" >&6; }
6316
6317            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6318$as_echo_n "checking Python's install prefix... " >&6; }
6319if ${vi_cv_path_python_pfx+:} false; then :
6320  $as_echo_n "(cached) " >&6
6321else
6322   vi_cv_path_python_pfx=`
6323	    ${vi_cv_path_python} -c \
6324		"import sys; print sys.prefix"`
6325fi
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6327$as_echo "$vi_cv_path_python_pfx" >&6; }
6328
6329            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6330$as_echo_n "checking Python's execution prefix... " >&6; }
6331if ${vi_cv_path_python_epfx+:} false; then :
6332  $as_echo_n "(cached) " >&6
6333else
6334   vi_cv_path_python_epfx=`
6335	    ${vi_cv_path_python} -c \
6336		"import sys; print sys.exec_prefix"`
6337fi
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6339$as_echo "$vi_cv_path_python_epfx" >&6; }
6340
6341
6342      if ${vi_cv_path_pythonpath+:} false; then :
6343  $as_echo_n "(cached) " >&6
6344else
6345   vi_cv_path_pythonpath=`
6346	    unset PYTHONPATH;
6347	    ${vi_cv_path_python} -c \
6348		"import sys, string; print string.join(sys.path,':')"`
6349fi
6350
6351
6352
6353
6354# Check whether --with-python-config-dir was given.
6355if test "${with_python_config_dir+set}" = set; then :
6356  withval=$with_python_config_dir;  vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
6357fi
6358
6359
6360      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6361$as_echo_n "checking Python's configuration directory... " >&6; }
6362if ${vi_cv_path_python_conf+:} false; then :
6363  $as_echo_n "(cached) " >&6
6364else
6365
6366	vi_cv_path_python_conf=
6367	d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6368	if test -d "$d" && test -f "$d/config.c"; then
6369	  vi_cv_path_python_conf="$d"
6370	else
6371	  for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6372	    for subdir in lib64 lib share; do
6373	      d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6374	      if test -d "$d" && test -f "$d/config.c"; then
6375		vi_cv_path_python_conf="$d"
6376	      fi
6377	    done
6378	  done
6379	fi
6380
6381fi
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6383$as_echo "$vi_cv_path_python_conf" >&6; }
6384
6385      PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6386
6387      if test "X$PYTHON_CONFDIR" = "X"; then
6388	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6389$as_echo "can't find it!" >&6; }
6390      else
6391
6392			if ${vi_cv_path_python_plibs+:} false; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395
6396	    pwd=`pwd`
6397	    tmp_mkf="$pwd/config-PyMake$$"
6398	    cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
6399__:
6400	@echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
6401	@echo "python_LIBS='$(LIBS)'"
6402	@echo "python_SYSLIBS='$(SYSLIBS)'"
6403	@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
6404	@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
6405	@echo "python_INSTSONAME='$(INSTSONAME)'"
6406	@echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6407	@echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6408	@echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
6409eof
6410	    	    eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6411	    rm -f -- "${tmp_mkf}"
6412	    if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
6413		"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6414	      vi_cv_path_python_plibs="-framework Python"
6415	      if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6416		  vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6417	      fi
6418	    else
6419	      vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
6420	      	      	      	      if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6421	        python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6422		python_link_path=`echo ${python_LINKFORSHARED} |   sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6423	        if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6424	          		  	          python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6425		  if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6426		    		    python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6427	            	            		  fi
6428	          python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6429	        fi
6430	      fi
6431	      vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
6432	      	      vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6433	    fi
6434
6435fi
6436
6437	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6438$as_echo_n "checking Python's dll name... " >&6; }
6439if ${vi_cv_dll_name_python+:} false; then :
6440  $as_echo_n "(cached) " >&6
6441else
6442
6443	  if test "X$python_DLLLIBRARY" != "X"; then
6444	    vi_cv_dll_name_python="$python_DLLLIBRARY"
6445	  else
6446	    vi_cv_dll_name_python="$python_INSTSONAME"
6447	  fi
6448
6449fi
6450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6451$as_echo "$vi_cv_dll_name_python" >&6; }
6452
6453	PYTHON_LIBS="${vi_cv_path_python_plibs}"
6454	if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
6455	  PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
6456	else
6457	  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}"
6458	fi
6459	if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
6460	  	  PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6461
6462	fi
6463	PYTHON_SRC="if_python.c"
6464	PYTHON_OBJ="objects/if_python.o"
6465
6466								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6467$as_echo_n "checking if -pthread should be used... " >&6; }
6468	threadsafe_flag=
6469	thread_lib=
6470	        if test "`(uname) 2>/dev/null`" != Darwin; then
6471	  test "$GCC" = yes && threadsafe_flag="-pthread"
6472	  if test "`(uname) 2>/dev/null`" = FreeBSD; then
6473	    threadsafe_flag="-D_THREAD_SAFE"
6474	    thread_lib="-pthread"
6475	  fi
6476	  if test "`(uname) 2>/dev/null`" = SunOS; then
6477	    threadsafe_flag="-pthreads"
6478	  fi
6479	fi
6480	libs_save_old=$LIBS
6481	if test -n "$threadsafe_flag"; then
6482	  cflags_save=$CFLAGS
6483	  CFLAGS="$CFLAGS $threadsafe_flag"
6484	  LIBS="$LIBS $thread_lib"
6485	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6486/* end confdefs.h.  */
6487
6488int
6489main ()
6490{
6491
6492  ;
6493  return 0;
6494}
6495_ACEOF
6496if ac_fn_c_try_link "$LINENO"; then :
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6498$as_echo "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6499else
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501$as_echo "no" >&6; }; LIBS=$libs_save_old
6502
6503fi
6504rm -f core conftest.err conftest.$ac_objext \
6505    conftest$ac_exeext conftest.$ac_ext
6506	  CFLAGS=$cflags_save
6507	else
6508	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; }
6510	fi
6511
6512			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6513$as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
6514	cflags_save=$CFLAGS
6515	libs_save=$LIBS
6516	CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6517	LIBS="$LIBS $PYTHON_LIBS"
6518	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6519/* end confdefs.h.  */
6520
6521int
6522main ()
6523{
6524
6525  ;
6526  return 0;
6527}
6528_ACEOF
6529if ac_fn_c_try_link "$LINENO"; then :
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6531$as_echo "yes" >&6; }; python_ok=yes
6532else
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6534$as_echo "no: PYTHON DISABLED" >&6; }; python_ok=no
6535fi
6536rm -f core conftest.err conftest.$ac_objext \
6537    conftest$ac_exeext conftest.$ac_ext
6538	CFLAGS=$cflags_save
6539	LIBS=$libs_save
6540	if test $python_ok = yes; then
6541	  $as_echo "#define FEAT_PYTHON 1" >>confdefs.h
6542
6543	else
6544	  LIBS=$libs_save_old
6545	  PYTHON_SRC=
6546	  PYTHON_OBJ=
6547	  PYTHON_LIBS=
6548	  PYTHON_CFLAGS=
6549	fi
6550      fi
6551    else
6552      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6553$as_echo "too old" >&6; }
6554    fi
6555  fi
6556
6557  if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
6558    as_fn_error $? "could not configure python" "$LINENO" 5
6559  fi
6560fi
6561
6562
6563
6564
6565
6566
6567
6568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6569$as_echo_n "checking --enable-python3interp argument... " >&6; }
6570# Check whether --enable-python3interp was given.
6571if test "${enable_python3interp+set}" = set; then :
6572  enableval=$enable_python3interp;
6573else
6574  enable_python3interp="no"
6575fi
6576
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6578$as_echo "$enable_python3interp" >&6; }
6579if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
6580  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6581    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
6582  fi
6583
6584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6585$as_echo_n "checking --with-python3-command argument... " >&6; }
6586
6587
6588# Check whether --with-python3-command was given.
6589if test "${with_python3_command+set}" = set; then :
6590  withval=$with_python3_command; vi_cv_path_python3="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6591$as_echo "$vi_cv_path_python3" >&6; }
6592else
6593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597
6598  if test "X$vi_cv_path_python3" = "X"; then
6599    for ac_prog in python3 python
6600do
6601  # Extract the first word of "$ac_prog", so it can be a program name with args.
6602set dummy $ac_prog; ac_word=$2
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6604$as_echo_n "checking for $ac_word... " >&6; }
6605if ${ac_cv_path_vi_cv_path_python3+:} false; then :
6606  $as_echo_n "(cached) " >&6
6607else
6608  case $vi_cv_path_python3 in
6609  [\\/]* | ?:[\\/]*)
6610  ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
6611  ;;
6612  *)
6613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6614for as_dir in $PATH
6615do
6616  IFS=$as_save_IFS
6617  test -z "$as_dir" && as_dir=.
6618    for ac_exec_ext in '' $ac_executable_extensions; do
6619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6620    ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext"
6621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6622    break 2
6623  fi
6624done
6625  done
6626IFS=$as_save_IFS
6627
6628  ;;
6629esac
6630fi
6631vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
6632if test -n "$vi_cv_path_python3"; then
6633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6634$as_echo "$vi_cv_path_python3" >&6; }
6635else
6636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637$as_echo "no" >&6; }
6638fi
6639
6640
6641  test -n "$vi_cv_path_python3" && break
6642done
6643
6644  fi
6645  if test "X$vi_cv_path_python3" != "X"; then
6646
6647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6648$as_echo_n "checking Python version... " >&6; }
6649if ${vi_cv_var_python3_version+:} false; then :
6650  $as_echo_n "(cached) " >&6
6651else
6652  vi_cv_var_python3_version=`
6653          ${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
6654
6655fi
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
6657$as_echo "$vi_cv_var_python3_version" >&6; }
6658
6659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
6660$as_echo_n "checking Python is 3.0 or better... " >&6; }
6661    if ${vi_cv_path_python3} -c \
6662      "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
6663    then
6664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6665$as_echo "yep" >&6; }
6666
6667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
6668$as_echo_n "checking Python's abiflags... " >&6; }
6669if ${vi_cv_var_python3_abiflags+:} false; then :
6670  $as_echo_n "(cached) " >&6
6671else
6672
6673       vi_cv_var_python3_abiflags=
6674       if ${vi_cv_path_python3} -c \
6675           "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
6676       then
6677         vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
6678           "import sys; print(sys.abiflags)"`
6679       fi
6680fi
6681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
6682$as_echo "$vi_cv_var_python3_abiflags" >&6; }
6683
6684            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6685$as_echo_n "checking Python's install prefix... " >&6; }
6686if ${vi_cv_path_python3_pfx+:} false; then :
6687  $as_echo_n "(cached) " >&6
6688else
6689   vi_cv_path_python3_pfx=`
6690       ${vi_cv_path_python3} -c \
6691       "import sys; print(sys.prefix)"`
6692fi
6693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
6694$as_echo "$vi_cv_path_python3_pfx" >&6; }
6695
6696            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6697$as_echo_n "checking Python's execution prefix... " >&6; }
6698if ${vi_cv_path_python3_epfx+:} false; then :
6699  $as_echo_n "(cached) " >&6
6700else
6701   vi_cv_path_python3_epfx=`
6702       ${vi_cv_path_python3} -c \
6703       "import sys; print(sys.exec_prefix)"`
6704fi
6705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
6706$as_echo "$vi_cv_path_python3_epfx" >&6; }
6707
6708
6709      if ${vi_cv_path_python3path+:} false; then :
6710  $as_echo_n "(cached) " >&6
6711else
6712   vi_cv_path_python3path=`
6713       unset PYTHONPATH;
6714       ${vi_cv_path_python3} -c \
6715       "import sys, string; print(':'.join(sys.path))"`
6716fi
6717
6718
6719
6720
6721# Check whether --with-python3-config-dir was given.
6722if test "${with_python3_config_dir+set}" = set; then :
6723  withval=$with_python3_config_dir;  vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
6724fi
6725
6726
6727      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6728$as_echo_n "checking Python's configuration directory... " >&6; }
6729if ${vi_cv_path_python3_conf+:} false; then :
6730  $as_echo_n "(cached) " >&6
6731else
6732
6733       vi_cv_path_python3_conf=
6734       config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6735       d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
6736       if test -d "$d" && test -f "$d/config.c"; then
6737         vi_cv_path_python3_conf="$d"
6738       else
6739         for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
6740	   for subdir in lib64 lib share; do
6741	     d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
6742	     if test -d "$d" && test -f "$d/config.c"; then
6743	       vi_cv_path_python3_conf="$d"
6744	     fi
6745	   done
6746         done
6747       fi
6748
6749fi
6750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
6751$as_echo "$vi_cv_path_python3_conf" >&6; }
6752
6753      PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
6754
6755      if test "X$PYTHON3_CONFDIR" = "X"; then
6756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6757$as_echo "can't find it!" >&6; }
6758      else
6759
6760                        if ${vi_cv_path_python3_plibs+:} false; then :
6761  $as_echo_n "(cached) " >&6
6762else
6763
6764            pwd=`pwd`
6765            tmp_mkf="$pwd/config-PyMake$$"
6766            cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
6767__:
6768	@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
6769	@echo "python3_LIBS='$(LIBS)'"
6770	@echo "python3_SYSLIBS='$(SYSLIBS)'"
6771	@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
6772	@echo "python3_INSTSONAME='$(INSTSONAME)'"
6773eof
6774	    	    eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6775	    rm -f -- "${tmp_mkf}"
6776	    vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6777	    vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
6778	    	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
6779	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
6780
6781fi
6782
6783	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
6784$as_echo_n "checking Python3's dll name... " >&6; }
6785if ${vi_cv_dll_name_python3+:} false; then :
6786  $as_echo_n "(cached) " >&6
6787else
6788
6789	  if test "X$python3_DLLLIBRARY" != "X"; then
6790	    vi_cv_dll_name_python3="$python3_DLLLIBRARY"
6791	  else
6792	    vi_cv_dll_name_python3="$python3_INSTSONAME"
6793	  fi
6794
6795fi
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
6797$as_echo "$vi_cv_dll_name_python3" >&6; }
6798
6799        PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
6800        if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
6801          PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6802        else
6803          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}"
6804        fi
6805	if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
6806	  	  PYTHON3_CFLAGS="${PYTHON3_CFLAGS}  -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
6807	fi
6808        PYTHON3_SRC="if_python3.c"
6809        PYTHON3_OBJ="objects/if_python3.o"
6810
6811                                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6812$as_echo_n "checking if -pthread should be used... " >&6; }
6813        threadsafe_flag=
6814        thread_lib=
6815                if test "`(uname) 2>/dev/null`" != Darwin; then
6816          test "$GCC" = yes && threadsafe_flag="-pthread"
6817          if test "`(uname) 2>/dev/null`" = FreeBSD; then
6818            threadsafe_flag="-D_THREAD_SAFE"
6819            thread_lib="-pthread"
6820          fi
6821          if test "`(uname) 2>/dev/null`" = SunOS; then
6822            threadsafe_flag="-pthreads"
6823          fi
6824        fi
6825        libs_save_old=$LIBS
6826        if test -n "$threadsafe_flag"; then
6827          cflags_save=$CFLAGS
6828          CFLAGS="$CFLAGS $threadsafe_flag"
6829          LIBS="$LIBS $thread_lib"
6830          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6831/* end confdefs.h.  */
6832
6833int
6834main ()
6835{
6836
6837  ;
6838  return 0;
6839}
6840_ACEOF
6841if ac_fn_c_try_link "$LINENO"; then :
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6843$as_echo "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
6844else
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6846$as_echo "no" >&6; }; LIBS=$libs_save_old
6847
6848fi
6849rm -f core conftest.err conftest.$ac_objext \
6850    conftest$ac_exeext conftest.$ac_ext
6851          CFLAGS=$cflags_save
6852        else
6853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6854$as_echo "no" >&6; }
6855        fi
6856
6857                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
6858$as_echo_n "checking if compile and link flags for Python 3 are sane... " >&6; }
6859        cflags_save=$CFLAGS
6860        libs_save=$LIBS
6861        CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
6862        LIBS="$LIBS $PYTHON3_LIBS"
6863        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6864/* end confdefs.h.  */
6865
6866int
6867main ()
6868{
6869
6870  ;
6871  return 0;
6872}
6873_ACEOF
6874if ac_fn_c_try_link "$LINENO"; then :
6875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6876$as_echo "yes" >&6; }; python3_ok=yes
6877else
6878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
6879$as_echo "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
6880fi
6881rm -f core conftest.err conftest.$ac_objext \
6882    conftest$ac_exeext conftest.$ac_ext
6883        CFLAGS=$cflags_save
6884        LIBS=$libs_save
6885        if test "$python3_ok" = yes; then
6886          $as_echo "#define FEAT_PYTHON3 1" >>confdefs.h
6887
6888        else
6889          LIBS=$libs_save_old
6890          PYTHON3_SRC=
6891          PYTHON3_OBJ=
6892          PYTHON3_LIBS=
6893          PYTHON3_CFLAGS=
6894        fi
6895      fi
6896    else
6897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6898$as_echo "too old" >&6; }
6899    fi
6900  fi
6901  if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
6902    as_fn_error $? "could not configure python3" "$LINENO" 5
6903  fi
6904fi
6905
6906
6907
6908
6909
6910
6911if test "$python_ok" = yes && test "$python3_ok" = yes; then
6912  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
6913
6914  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
6915
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
6917$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
6918  cflags_save=$CFLAGS
6919  CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6920  libs_save=$LIBS
6921    LIBS="-ldl $LIBS"
6922  if test "$cross_compiling" = yes; then :
6923  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6925as_fn_error $? "cannot run test program while cross compiling
6926See \`config.log' for more details" "$LINENO" 5; }
6927else
6928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6929/* end confdefs.h.  */
6930
6931    #include <dlfcn.h>
6932    /* If this program fails, then RTLD_GLOBAL is needed.
6933     * RTLD_GLOBAL will be used and then it is not possible to
6934     * have both python versions enabled in the same vim instance.
6935     * Only the first python version used will be switched on.
6936     */
6937
6938    int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
6939    {
6940      int needed = 0;
6941      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
6942      if (pylib != 0)
6943      {
6944          void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
6945          void (*init)(void) = dlsym(pylib, "Py_Initialize");
6946          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
6947          void (*final)(void) = dlsym(pylib, "Py_Finalize");
6948          (*pfx)(prefix);
6949          (*init)();
6950          needed = (*simple)("import termios") == -1;
6951          (*final)();
6952          dlclose(pylib);
6953      }
6954      return !needed;
6955    }
6956
6957    int main(int argc, char** argv)
6958    {
6959      int not_needed = 0;
6960      if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
6961            not_needed = 1;
6962      return !not_needed;
6963    }
6964_ACEOF
6965if ac_fn_c_try_run "$LINENO"; then :
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6967$as_echo "yes" >&6; };$as_echo "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
6968
6969else
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6971$as_echo "no" >&6; }
6972fi
6973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6974  conftest.$ac_objext conftest.beam conftest.$ac_ext
6975fi
6976
6977
6978  CFLAGS=$cflags_save
6979  LIBS=$libs_save
6980
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
6982$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
6983  cflags_save=$CFLAGS
6984  CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
6985  libs_save=$LIBS
6986    LIBS="-ldl $LIBS"
6987  if test "$cross_compiling" = yes; then :
6988  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6990as_fn_error $? "cannot run test program while cross compiling
6991See \`config.log' for more details" "$LINENO" 5; }
6992else
6993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6994/* end confdefs.h.  */
6995
6996    #include <dlfcn.h>
6997    #include <wchar.h>
6998    /* If this program fails, then RTLD_GLOBAL is needed.
6999     * RTLD_GLOBAL will be used and then it is not possible to
7000     * have both python versions enabled in the same vim instance.
7001     * Only the first python version used will be switched on.
7002     */
7003
7004    int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
7005    {
7006      int needed = 0;
7007      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
7008      if (pylib != 0)
7009      {
7010          void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7011          void (*init)(void) = dlsym(pylib, "Py_Initialize");
7012          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7013          void (*final)(void) = dlsym(pylib, "Py_Finalize");
7014          (*pfx)(prefix);
7015          (*init)();
7016          needed = (*simple)("import termios") == -1;
7017          (*final)();
7018          dlclose(pylib);
7019      }
7020      return !needed;
7021    }
7022
7023    int main(int argc, char** argv)
7024    {
7025      int not_needed = 0;
7026      if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
7027            not_needed = 1;
7028      return !not_needed;
7029    }
7030_ACEOF
7031if ac_fn_c_try_run "$LINENO"; then :
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7033$as_echo "yes" >&6; };$as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
7034
7035else
7036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7037$as_echo "no" >&6; }
7038fi
7039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7040  conftest.$ac_objext conftest.beam conftest.$ac_ext
7041fi
7042
7043
7044  CFLAGS=$cflags_save
7045  LIBS=$libs_save
7046
7047  PYTHON_SRC="if_python.c"
7048  PYTHON_OBJ="objects/if_python.o"
7049  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
7050  PYTHON_LIBS=
7051  PYTHON3_SRC="if_python3.c"
7052  PYTHON3_OBJ="objects/if_python3.o"
7053  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
7054  PYTHON3_LIBS=
7055elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
7056  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
7057
7058  PYTHON_SRC="if_python.c"
7059  PYTHON_OBJ="objects/if_python.o"
7060  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
7061  PYTHON_LIBS=
7062elif test "$python_ok" = yes; then
7063      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7064$as_echo_n "checking if -fPIE can be added for Python... " >&6; }
7065  cflags_save=$CFLAGS
7066  libs_save=$LIBS
7067  CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7068  LIBS="$LIBS $PYTHON_LIBS"
7069  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7070/* end confdefs.h.  */
7071
7072int
7073main ()
7074{
7075
7076  ;
7077  return 0;
7078}
7079_ACEOF
7080if ac_fn_c_try_link "$LINENO"; then :
7081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7082$as_echo "yes" >&6; }; fpie_ok=yes
7083else
7084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7085$as_echo "no" >&6; }; fpie_ok=no
7086fi
7087rm -f core conftest.err conftest.$ac_objext \
7088    conftest$ac_exeext conftest.$ac_ext
7089  CFLAGS=$cflags_save
7090  LIBS=$libs_save
7091  if test $fpie_ok = yes; then
7092    PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7093  fi
7094elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
7095  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
7096
7097  PYTHON3_SRC="if_python3.c"
7098  PYTHON3_OBJ="objects/if_python3.o"
7099  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
7100  PYTHON3_LIBS=
7101elif test "$python3_ok" = yes; then
7102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7103$as_echo_n "checking if -fPIE can be added for Python3... " >&6; }
7104  cflags_save=$CFLAGS
7105  libs_save=$LIBS
7106  CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7107  LIBS="$LIBS $PYTHON3_LIBS"
7108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7109/* end confdefs.h.  */
7110
7111int
7112main ()
7113{
7114
7115  ;
7116  return 0;
7117}
7118_ACEOF
7119if ac_fn_c_try_link "$LINENO"; then :
7120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7121$as_echo "yes" >&6; }; fpie_ok=yes
7122else
7123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7124$as_echo "no" >&6; }; fpie_ok=no
7125fi
7126rm -f core conftest.err conftest.$ac_objext \
7127    conftest$ac_exeext conftest.$ac_ext
7128  CFLAGS=$cflags_save
7129  LIBS=$libs_save
7130  if test $fpie_ok = yes; then
7131    PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7132  fi
7133fi
7134
7135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7136$as_echo_n "checking --enable-tclinterp argument... " >&6; }
7137# Check whether --enable-tclinterp was given.
7138if test "${enable_tclinterp+set}" = set; then :
7139  enableval=$enable_tclinterp;
7140else
7141  enable_tclinterp="no"
7142fi
7143
7144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7145$as_echo "$enable_tclinterp" >&6; }
7146
7147if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
7148
7149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7150$as_echo_n "checking --with-tclsh argument... " >&6; }
7151
7152# Check whether --with-tclsh was given.
7153if test "${with_tclsh+set}" = set; then :
7154  withval=$with_tclsh; tclsh_name="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7155$as_echo "$tclsh_name" >&6; }
7156else
7157  tclsh_name="tclsh8.5"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158$as_echo "no" >&6; }
7159fi
7160
7161  # Extract the first word of "$tclsh_name", so it can be a program name with args.
7162set dummy $tclsh_name; ac_word=$2
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7164$as_echo_n "checking for $ac_word... " >&6; }
7165if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7166  $as_echo_n "(cached) " >&6
7167else
7168  case $vi_cv_path_tcl in
7169  [\\/]* | ?:[\\/]*)
7170  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7171  ;;
7172  *)
7173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7174for as_dir in $PATH
7175do
7176  IFS=$as_save_IFS
7177  test -z "$as_dir" && as_dir=.
7178    for ac_exec_ext in '' $ac_executable_extensions; do
7179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7180    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7182    break 2
7183  fi
7184done
7185  done
7186IFS=$as_save_IFS
7187
7188  ;;
7189esac
7190fi
7191vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7192if test -n "$vi_cv_path_tcl"; then
7193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7194$as_echo "$vi_cv_path_tcl" >&6; }
7195else
7196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7197$as_echo "no" >&6; }
7198fi
7199
7200
7201
7202
7203    if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7204    tclsh_name="tclsh8.4"
7205    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7206set dummy $tclsh_name; ac_word=$2
7207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7208$as_echo_n "checking for $ac_word... " >&6; }
7209if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7210  $as_echo_n "(cached) " >&6
7211else
7212  case $vi_cv_path_tcl in
7213  [\\/]* | ?:[\\/]*)
7214  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7215  ;;
7216  *)
7217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218for as_dir in $PATH
7219do
7220  IFS=$as_save_IFS
7221  test -z "$as_dir" && as_dir=.
7222    for ac_exec_ext in '' $ac_executable_extensions; do
7223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226    break 2
7227  fi
7228done
7229  done
7230IFS=$as_save_IFS
7231
7232  ;;
7233esac
7234fi
7235vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7236if test -n "$vi_cv_path_tcl"; then
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7238$as_echo "$vi_cv_path_tcl" >&6; }
7239else
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
7242fi
7243
7244
7245  fi
7246  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
7247    tclsh_name="tclsh8.2"
7248    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7249set dummy $tclsh_name; ac_word=$2
7250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7251$as_echo_n "checking for $ac_word... " >&6; }
7252if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7253  $as_echo_n "(cached) " >&6
7254else
7255  case $vi_cv_path_tcl in
7256  [\\/]* | ?:[\\/]*)
7257  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7258  ;;
7259  *)
7260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261for as_dir in $PATH
7262do
7263  IFS=$as_save_IFS
7264  test -z "$as_dir" && as_dir=.
7265    for ac_exec_ext in '' $ac_executable_extensions; do
7266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7267    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7269    break 2
7270  fi
7271done
7272  done
7273IFS=$as_save_IFS
7274
7275  ;;
7276esac
7277fi
7278vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7279if test -n "$vi_cv_path_tcl"; then
7280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7281$as_echo "$vi_cv_path_tcl" >&6; }
7282else
7283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7284$as_echo "no" >&6; }
7285fi
7286
7287
7288  fi
7289  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7290    tclsh_name="tclsh8.0"
7291    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7292set dummy $tclsh_name; ac_word=$2
7293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7294$as_echo_n "checking for $ac_word... " >&6; }
7295if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7296  $as_echo_n "(cached) " >&6
7297else
7298  case $vi_cv_path_tcl in
7299  [\\/]* | ?:[\\/]*)
7300  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7301  ;;
7302  *)
7303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7304for as_dir in $PATH
7305do
7306  IFS=$as_save_IFS
7307  test -z "$as_dir" && as_dir=.
7308    for ac_exec_ext in '' $ac_executable_extensions; do
7309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7310    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7312    break 2
7313  fi
7314done
7315  done
7316IFS=$as_save_IFS
7317
7318  ;;
7319esac
7320fi
7321vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7322if test -n "$vi_cv_path_tcl"; then
7323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7324$as_echo "$vi_cv_path_tcl" >&6; }
7325else
7326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7327$as_echo "no" >&6; }
7328fi
7329
7330
7331  fi
7332    if test "X$vi_cv_path_tcl" = "X"; then
7333    tclsh_name="tclsh"
7334    # Extract the first word of "$tclsh_name", so it can be a program name with args.
7335set dummy $tclsh_name; ac_word=$2
7336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7337$as_echo_n "checking for $ac_word... " >&6; }
7338if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
7339  $as_echo_n "(cached) " >&6
7340else
7341  case $vi_cv_path_tcl in
7342  [\\/]* | ?:[\\/]*)
7343  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7344  ;;
7345  *)
7346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7347for as_dir in $PATH
7348do
7349  IFS=$as_save_IFS
7350  test -z "$as_dir" && as_dir=.
7351    for ac_exec_ext in '' $ac_executable_extensions; do
7352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7353    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
7354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7355    break 2
7356  fi
7357done
7358  done
7359IFS=$as_save_IFS
7360
7361  ;;
7362esac
7363fi
7364vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
7365if test -n "$vi_cv_path_tcl"; then
7366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7367$as_echo "$vi_cv_path_tcl" >&6; }
7368else
7369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7370$as_echo "no" >&6; }
7371fi
7372
7373
7374  fi
7375  if test "X$vi_cv_path_tcl" != "X"; then
7376    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7377$as_echo_n "checking Tcl version... " >&6; }
7378    if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
7379      tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
7380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7381$as_echo "$tclver - OK" >&6; };
7382      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 -`
7383      tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
7384
7385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7386$as_echo_n "checking for location of Tcl include... " >&6; }
7387      if test "x$MACOS_X" != "xyes"; then
7388	tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
7389      else
7390		tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
7391      fi
7392      TCL_INC=
7393      for try in $tclinc; do
7394	if test -f "$try/tcl.h"; then
7395	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7396$as_echo "$try/tcl.h" >&6; }
7397	  TCL_INC=$try
7398	  break
7399	fi
7400      done
7401      if test -z "$TCL_INC"; then
7402	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7403$as_echo "<not found>" >&6; }
7404	SKIP_TCL=YES
7405      fi
7406      if test -z "$SKIP_TCL"; then
7407	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7408$as_echo_n "checking for location of tclConfig.sh script... " >&6; }
7409	if test "x$MACOS_X" != "xyes"; then
7410	  tclcnf=`echo $tclinc | sed s/include/lib/g`
7411	  tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
7412	else
7413	  	  tclcnf="/System/Library/Frameworks/Tcl.framework"
7414	fi
7415	for try in $tclcnf; do
7416	  if test -f "$try/tclConfig.sh"; then
7417	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7418$as_echo "$try/tclConfig.sh" >&6; }
7419	    . "$try/tclConfig.sh"
7420	    	    if test "$enable_tclinterp" = "dynamic"; then
7421	      TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7422	    else
7423	      TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7424	    fi
7425	    	    	    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'`
7426	    break
7427	  fi
7428	done
7429	if test -z "$TCL_LIBS"; then
7430	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7431$as_echo "<not found>" >&6; }
7432	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7433$as_echo_n "checking for Tcl library by myself... " >&6; }
7434	  tcllib=`echo $tclinc | sed s/include/lib/g`
7435	  tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
7436	  for ext in .so .a ; do
7437	    for ver in "" $tclver ; do
7438	      for try in $tcllib ; do
7439		trylib=tcl$ver$ext
7440		if test -f "$try/lib$trylib" ; then
7441		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7442$as_echo "$try/lib$trylib" >&6; }
7443		  TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
7444		  if test "`(uname) 2>/dev/null`" = SunOS &&
7445					 uname -r | grep '^5' >/dev/null; then
7446		    TCL_LIBS="$TCL_LIBS -R $try"
7447		  fi
7448		  break 3
7449		fi
7450	      done
7451	    done
7452	  done
7453	  if test -z "$TCL_LIBS"; then
7454	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7455$as_echo "<not found>" >&6; }
7456	    SKIP_TCL=YES
7457	  fi
7458	fi
7459	if test -z "$SKIP_TCL"; then
7460	  $as_echo "#define FEAT_TCL 1" >>confdefs.h
7461
7462	  TCL_SRC=if_tcl.c
7463	  TCL_OBJ=objects/if_tcl.o
7464	  TCL_PRO=if_tcl.pro
7465	  TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7466	fi
7467      fi
7468    else
7469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
7470$as_echo "too old; need Tcl version 8.0 or later" >&6; }
7471    fi
7472  fi
7473  if test "$enable_tclinterp" = "dynamic"; then
7474    if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
7475      $as_echo "#define DYNAMIC_TCL 1" >>confdefs.h
7476
7477      TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
7478    fi
7479  fi
7480  if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
7481    as_fn_error $? "could not configure Tcl" "$LINENO" 5
7482  fi
7483fi
7484
7485
7486
7487
7488
7489
7490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
7491$as_echo_n "checking --enable-rubyinterp argument... " >&6; }
7492# Check whether --enable-rubyinterp was given.
7493if test "${enable_rubyinterp+set}" = set; then :
7494  enableval=$enable_rubyinterp;
7495else
7496  enable_rubyinterp="no"
7497fi
7498
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
7500$as_echo "$enable_rubyinterp" >&6; }
7501if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
7502  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7503    as_fn_error $? "cannot use Ruby with tiny or small features" "$LINENO" 5
7504  fi
7505
7506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
7507$as_echo_n "checking --with-ruby-command argument... " >&6; }
7508
7509
7510# Check whether --with-ruby-command was given.
7511if test "${with_ruby_command+set}" = set; then :
7512  withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
7513$as_echo "$RUBY_CMD" >&6; }
7514else
7515  RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
7516$as_echo "defaulting to $RUBY_CMD" >&6; }
7517fi
7518
7519  # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
7520set dummy $RUBY_CMD; ac_word=$2
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7522$as_echo_n "checking for $ac_word... " >&6; }
7523if ${ac_cv_path_vi_cv_path_ruby+:} false; then :
7524  $as_echo_n "(cached) " >&6
7525else
7526  case $vi_cv_path_ruby in
7527  [\\/]* | ?:[\\/]*)
7528  ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
7529  ;;
7530  *)
7531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7532for as_dir in $PATH
7533do
7534  IFS=$as_save_IFS
7535  test -z "$as_dir" && as_dir=.
7536    for ac_exec_ext in '' $ac_executable_extensions; do
7537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7538    ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext"
7539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7540    break 2
7541  fi
7542done
7543  done
7544IFS=$as_save_IFS
7545
7546  ;;
7547esac
7548fi
7549vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
7550if test -n "$vi_cv_path_ruby"; then
7551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
7552$as_echo "$vi_cv_path_ruby" >&6; }
7553else
7554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7555$as_echo "no" >&6; }
7556fi
7557
7558
7559  if test "X$vi_cv_path_ruby" != "X"; then
7560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
7561$as_echo_n "checking Ruby version... " >&6; }
7562    if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
7563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
7564$as_echo "OK" >&6; }
7565      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
7566$as_echo_n "checking Ruby rbconfig... " >&6; }
7567      ruby_rbconfig="RbConfig"
7568      if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
7569	ruby_rbconfig="Config"
7570      fi
7571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
7572$as_echo "$ruby_rbconfig" >&6; }
7573      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
7574$as_echo_n "checking Ruby header files... " >&6; }
7575      rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
7576      if test "X$rubyhdrdir" != "X"; then
7577	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
7578$as_echo "$rubyhdrdir" >&6; }
7579	RUBY_CFLAGS="-I$rubyhdrdir"
7580        rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
7581        if test -d "$rubyarchdir"; then
7582          RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
7583        fi
7584        rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
7585	if test "X$rubyversion" = "X"; then
7586	  rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]"`
7587	fi
7588        RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
7589	rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
7590	if test "X$rubylibs" != "X"; then
7591	  RUBY_LIBS="$rubylibs"
7592	fi
7593	librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
7594	librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
7595	rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
7596	if test -f "$rubylibdir/$librubya"; then
7597	  librubyarg="$librubyarg"
7598	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7599	elif test "$librubyarg" = "libruby.a"; then
7600	  	  librubyarg="-lruby"
7601	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7602	fi
7603
7604	if test "X$librubyarg" != "X"; then
7605	  RUBY_LIBS="$librubyarg $RUBY_LIBS"
7606	fi
7607	rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
7608	if test "X$rubyldflags" != "X"; then
7609	  	  	  	  rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
7610	  if test "X$rubyldflags" != "X"; then
7611	    if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then
7612	      LDFLAGS="$rubyldflags $LDFLAGS"
7613	    fi
7614	  fi
7615	fi
7616	RUBY_SRC="if_ruby.c"
7617	RUBY_OBJ="objects/if_ruby.o"
7618	RUBY_PRO="if_ruby.pro"
7619	$as_echo "#define FEAT_RUBY 1" >>confdefs.h
7620
7621	if test "$enable_rubyinterp" = "dynamic"; then
7622	  libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
7623	  if test -z "$libruby_soname"; then
7624	    libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
7625	  fi
7626	  $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
7627
7628	  RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
7629	  RUBY_LIBS=
7630	fi
7631      else
7632	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
7633$as_echo "not found; disabling Ruby" >&6; }
7634      fi
7635    else
7636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.6.0 or later" >&5
7637$as_echo "too old; need Ruby version 1.6.0 or later" >&6; }
7638    fi
7639  fi
7640
7641  if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
7642    as_fn_error $? "could not configure Ruby" "$LINENO" 5
7643  fi
7644fi
7645
7646
7647
7648
7649
7650
7651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
7652$as_echo_n "checking --enable-cscope argument... " >&6; }
7653# Check whether --enable-cscope was given.
7654if test "${enable_cscope+set}" = set; then :
7655  enableval=$enable_cscope;
7656else
7657  enable_cscope="no"
7658fi
7659
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
7661$as_echo "$enable_cscope" >&6; }
7662if test "$enable_cscope" = "yes"; then
7663  $as_echo "#define FEAT_CSCOPE 1" >>confdefs.h
7664
7665fi
7666
7667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
7668$as_echo_n "checking --disable-netbeans argument... " >&6; }
7669# Check whether --enable-netbeans was given.
7670if test "${enable_netbeans+set}" = set; then :
7671  enableval=$enable_netbeans;
7672else
7673  enable_netbeans="yes"
7674fi
7675
7676if test "$enable_netbeans" = "yes"; then
7677  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny or small features" >&5
7679$as_echo "cannot use NetBeans with tiny or small features" >&6; }
7680    enable_netbeans="no"
7681  else
7682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683$as_echo "no" >&6; }
7684  fi
7685else
7686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7687$as_echo "yes" >&6; }
7688fi
7689
7690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
7691$as_echo_n "checking --disable-channel argument... " >&6; }
7692# Check whether --enable-channel was given.
7693if test "${enable_channel+set}" = set; then :
7694  enableval=$enable_channel;
7695else
7696  enable_channel="yes"
7697fi
7698
7699if test "$enable_channel" = "yes"; then
7700  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny or small features" >&5
7702$as_echo "cannot use channels with tiny or small features" >&6; }
7703    enable_channel="no"
7704  else
7705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707  fi
7708else
7709  if test "$enable_netbeans" = "yes"; then
7710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
7711$as_echo "yes, netbeans also disabled" >&6; }
7712    enable_netbeans="no"
7713  else
7714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7715$as_echo "yes" >&6; }
7716  fi
7717fi
7718
7719if test "$enable_channel" = "yes"; then
7720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7721$as_echo_n "checking for socket in -lsocket... " >&6; }
7722if ${ac_cv_lib_socket_socket+:} false; then :
7723  $as_echo_n "(cached) " >&6
7724else
7725  ac_check_lib_save_LIBS=$LIBS
7726LIBS="-lsocket  $LIBS"
7727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7728/* end confdefs.h.  */
7729
7730/* Override any GCC internal prototype to avoid an error.
7731   Use char because int might match the return type of a GCC
7732   builtin and then its argument prototype would still apply.  */
7733#ifdef __cplusplus
7734extern "C"
7735#endif
7736char socket ();
7737int
7738main ()
7739{
7740return socket ();
7741  ;
7742  return 0;
7743}
7744_ACEOF
7745if ac_fn_c_try_link "$LINENO"; then :
7746  ac_cv_lib_socket_socket=yes
7747else
7748  ac_cv_lib_socket_socket=no
7749fi
7750rm -f core conftest.err conftest.$ac_objext \
7751    conftest$ac_exeext conftest.$ac_ext
7752LIBS=$ac_check_lib_save_LIBS
7753fi
7754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7755$as_echo "$ac_cv_lib_socket_socket" >&6; }
7756if test "x$ac_cv_lib_socket_socket" = xyes; then :
7757  cat >>confdefs.h <<_ACEOF
7758#define HAVE_LIBSOCKET 1
7759_ACEOF
7760
7761  LIBS="-lsocket $LIBS"
7762
7763fi
7764
7765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
7766$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7767if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
7768  $as_echo_n "(cached) " >&6
7769else
7770  ac_check_lib_save_LIBS=$LIBS
7771LIBS="-lnsl  $LIBS"
7772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7773/* end confdefs.h.  */
7774
7775/* Override any GCC internal prototype to avoid an error.
7776   Use char because int might match the return type of a GCC
7777   builtin and then its argument prototype would still apply.  */
7778#ifdef __cplusplus
7779extern "C"
7780#endif
7781char gethostbyname ();
7782int
7783main ()
7784{
7785return gethostbyname ();
7786  ;
7787  return 0;
7788}
7789_ACEOF
7790if ac_fn_c_try_link "$LINENO"; then :
7791  ac_cv_lib_nsl_gethostbyname=yes
7792else
7793  ac_cv_lib_nsl_gethostbyname=no
7794fi
7795rm -f core conftest.err conftest.$ac_objext \
7796    conftest$ac_exeext conftest.$ac_ext
7797LIBS=$ac_check_lib_save_LIBS
7798fi
7799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
7800$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7801if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
7802  cat >>confdefs.h <<_ACEOF
7803#define HAVE_LIBNSL 1
7804_ACEOF
7805
7806  LIBS="-lnsl $LIBS"
7807
7808fi
7809
7810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with process communication is possible" >&5
7811$as_echo_n "checking whether compiling with process communication is possible... " >&6; }
7812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7813/* end confdefs.h.  */
7814
7815#include <stdio.h>
7816#include <stdlib.h>
7817#include <stdarg.h>
7818#include <fcntl.h>
7819#include <netdb.h>
7820#include <netinet/in.h>
7821#include <errno.h>
7822#include <sys/types.h>
7823#include <sys/socket.h>
7824	/* Check bitfields */
7825	struct nbbuf {
7826	unsigned int  initDone:1;
7827	unsigned short signmaplen;
7828	};
7829
7830int
7831main ()
7832{
7833
7834		/* Check creating a socket. */
7835		struct sockaddr_in server;
7836		(void)socket(AF_INET, SOCK_STREAM, 0);
7837		(void)htons(100);
7838		(void)gethostbyname("microsoft.com");
7839		if (errno == ECONNREFUSED)
7840		  (void)connect(1, (struct sockaddr *)&server, sizeof(server));
7841
7842  ;
7843  return 0;
7844}
7845_ACEOF
7846if ac_fn_c_try_link "$LINENO"; then :
7847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7848$as_echo "yes" >&6; }
7849else
7850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7851$as_echo "no" >&6; }; enable_netbeans="no"; enable_channel="no"
7852fi
7853rm -f core conftest.err conftest.$ac_objext \
7854    conftest$ac_exeext conftest.$ac_ext
7855fi
7856if test "$enable_netbeans" = "yes"; then
7857  $as_echo "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
7858
7859  NETBEANS_SRC="netbeans.c"
7860
7861  NETBEANS_OBJ="objects/netbeans.o"
7862
7863fi
7864if test "$enable_channel" = "yes"; then
7865  $as_echo "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
7866
7867  CHANNEL_SRC="channel.c"
7868
7869  CHANNEL_OBJ="objects/channel.o"
7870
7871fi
7872
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
7874$as_echo_n "checking --enable-terminal argument... " >&6; }
7875# Check whether --enable-terminal was given.
7876if test "${enable_terminal+set}" = set; then :
7877  enableval=$enable_terminal;
7878else
7879  enable_terminal="auto"
7880fi
7881
7882if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
7883  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny or small features" >&5
7885$as_echo "cannot use terminal emulator with tiny or small features" >&6; }
7886    enable_terminal="no"
7887  else
7888    if test "$enable_terminal" = "auto"; then
7889      enable_terminal="yes"
7890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
7891$as_echo "defaulting to yes" >&6; }
7892    else
7893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7894$as_echo "yes" >&6; }
7895    fi
7896  fi
7897else
7898  if test "$enable_terminal" = "auto"; then
7899    enable_terminal="no"
7900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
7901$as_echo "defaulting to no" >&6; }
7902  else
7903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7904$as_echo "no" >&6; }
7905  fi
7906fi
7907if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
7908  $as_echo "#define FEAT_TERMINAL 1" >>confdefs.h
7909
7910  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"
7911
7912  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"
7913
7914fi
7915
7916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
7917$as_echo_n "checking --enable-autoservername argument... " >&6; }
7918# Check whether --enable-autoservername was given.
7919if test "${enable_autoservername+set}" = set; then :
7920  enableval=$enable_autoservername;
7921else
7922  enable_autoservername="no"
7923fi
7924
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
7926$as_echo "$enable_autoservername" >&6; }
7927if test "$enable_autoservername" = "yes"; then
7928  $as_echo "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
7929
7930fi
7931
7932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
7933$as_echo_n "checking --enable-multibyte argument... " >&6; }
7934# Check whether --enable-multibyte was given.
7935if test "${enable_multibyte+set}" = set; then :
7936  enableval=$enable_multibyte;
7937else
7938  enable_multibyte="yes"
7939fi
7940
7941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
7942$as_echo "$enable_multibyte" >&6; }
7943if test "$enable_multibyte" != "yes"; then
7944  as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
7945		a problem with this, discuss on the Vim mailing list." "$LINENO" 5
7946fi
7947
7948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
7949$as_echo_n "checking --disable-rightleft argument... " >&6; }
7950# Check whether --enable-rightleft was given.
7951if test "${enable_rightleft+set}" = set; then :
7952  enableval=$enable_rightleft;
7953else
7954  enable_rightleft="yes"
7955fi
7956
7957if test "$enable_rightleft" = "yes"; then
7958	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7959$as_echo "no" >&6; }
7960else
7961	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7962$as_echo "yes" >&6; }
7963	$as_echo "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
7964
7965fi
7966
7967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
7968$as_echo_n "checking --disable-arabic argument... " >&6; }
7969# Check whether --enable-arabic was given.
7970if test "${enable_arabic+set}" = set; then :
7971  enableval=$enable_arabic;
7972else
7973  enable_arabic="yes"
7974fi
7975
7976if test "$enable_arabic" = "yes"; then
7977	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979else
7980	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7981$as_echo "yes" >&6; }
7982	$as_echo "#define DISABLE_ARABIC 1" >>confdefs.h
7983
7984fi
7985
7986# Check whether --enable-farsi was given.
7987if test "${enable_farsi+set}" = set; then :
7988  enableval=$enable_farsi;
7989fi
7990
7991
7992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-hangulinput argument" >&5
7993$as_echo_n "checking --enable-hangulinput argument... " >&6; }
7994# Check whether --enable-hangulinput was given.
7995if test "${enable_hangulinput+set}" = set; then :
7996  enableval=$enable_hangulinput;
7997else
7998  enable_hangulinput="no"
7999fi
8000
8001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_hangulinput" >&5
8002$as_echo "$enable_hangulinput" >&6; }
8003
8004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8005$as_echo_n "checking --enable-xim argument... " >&6; }
8006# Check whether --enable-xim was given.
8007if test "${enable_xim+set}" = set; then :
8008  enableval=$enable_xim; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8009$as_echo "$enable_xim" >&6; }
8010else
8011  enable_xim="auto"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8012$as_echo "defaulting to auto" >&6; }
8013fi
8014
8015
8016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8017$as_echo_n "checking --enable-fontset argument... " >&6; }
8018# Check whether --enable-fontset was given.
8019if test "${enable_fontset+set}" = set; then :
8020  enableval=$enable_fontset;
8021else
8022  enable_fontset="no"
8023fi
8024
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8026$as_echo "$enable_fontset" >&6; }
8027
8028test -z "$with_x" && with_x=yes
8029test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
8030if test "$with_x" = no; then
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8032$as_echo "defaulting to: don't HAVE_X11" >&6; }
8033else
8034
8035  # Extract the first word of "xmkmf", so it can be a program name with args.
8036set dummy xmkmf; ac_word=$2
8037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8038$as_echo_n "checking for $ac_word... " >&6; }
8039if ${ac_cv_path_xmkmfpath+:} false; then :
8040  $as_echo_n "(cached) " >&6
8041else
8042  case $xmkmfpath in
8043  [\\/]* | ?:[\\/]*)
8044  ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8045  ;;
8046  *)
8047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8048for as_dir in $PATH
8049do
8050  IFS=$as_save_IFS
8051  test -z "$as_dir" && as_dir=.
8052    for ac_exec_ext in '' $ac_executable_extensions; do
8053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8054    ac_cv_path_xmkmfpath="$as_dir/$ac_word$ac_exec_ext"
8055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8056    break 2
8057  fi
8058done
8059  done
8060IFS=$as_save_IFS
8061
8062  ;;
8063esac
8064fi
8065xmkmfpath=$ac_cv_path_xmkmfpath
8066if test -n "$xmkmfpath"; then
8067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8068$as_echo "$xmkmfpath" >&6; }
8069else
8070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8071$as_echo "no" >&6; }
8072fi
8073
8074
8075
8076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8077$as_echo_n "checking for X... " >&6; }
8078
8079
8080# Check whether --with-x was given.
8081if test "${with_x+set}" = set; then :
8082  withval=$with_x;
8083fi
8084
8085# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8086if test "x$with_x" = xno; then
8087  # The user explicitly disabled X.
8088  have_x=disabled
8089else
8090  case $x_includes,$x_libraries in #(
8091    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
8092    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
8093  $as_echo_n "(cached) " >&6
8094else
8095  # One or both of the vars are not set, and there is no cached value.
8096ac_x_includes=no ac_x_libraries=no
8097rm -f -r conftest.dir
8098if mkdir conftest.dir; then
8099  cd conftest.dir
8100  cat >Imakefile <<'_ACEOF'
8101incroot:
8102	@echo incroot='${INCROOT}'
8103usrlibdir:
8104	@echo usrlibdir='${USRLIBDIR}'
8105libdir:
8106	@echo libdir='${LIBDIR}'
8107_ACEOF
8108  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
8109    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8110    for ac_var in incroot usrlibdir libdir; do
8111      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8112    done
8113    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8114    for ac_extension in a so sl dylib la dll; do
8115      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8116	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
8117	ac_im_usrlibdir=$ac_im_libdir; break
8118      fi
8119    done
8120    # Screen out bogus values from the imake configuration.  They are
8121    # bogus both because they are the default anyway, and because
8122    # using them would break gcc on systems where it needs fixed includes.
8123    case $ac_im_incroot in
8124	/usr/include) ac_x_includes= ;;
8125	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8126    esac
8127    case $ac_im_usrlibdir in
8128	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
8129	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8130    esac
8131  fi
8132  cd ..
8133  rm -f -r conftest.dir
8134fi
8135
8136# Standard set of common directories for X headers.
8137# Check X11 before X11Rn because it is often a symlink to the current release.
8138ac_x_header_dirs='
8139/usr/X11/include
8140/usr/X11R7/include
8141/usr/X11R6/include
8142/usr/X11R5/include
8143/usr/X11R4/include
8144
8145/usr/include/X11
8146/usr/include/X11R7
8147/usr/include/X11R6
8148/usr/include/X11R5
8149/usr/include/X11R4
8150
8151/usr/local/X11/include
8152/usr/local/X11R7/include
8153/usr/local/X11R6/include
8154/usr/local/X11R5/include
8155/usr/local/X11R4/include
8156
8157/usr/local/include/X11
8158/usr/local/include/X11R7
8159/usr/local/include/X11R6
8160/usr/local/include/X11R5
8161/usr/local/include/X11R4
8162
8163/usr/X386/include
8164/usr/x386/include
8165/usr/XFree86/include/X11
8166
8167/usr/include
8168/usr/local/include
8169/usr/unsupported/include
8170/usr/athena/include
8171/usr/local/x11r5/include
8172/usr/lpp/Xamples/include
8173
8174/usr/openwin/include
8175/usr/openwin/share/include'
8176
8177if test "$ac_x_includes" = no; then
8178  # Guess where to find include files, by looking for Xlib.h.
8179  # First, try using that file with no special directory specified.
8180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8181/* end confdefs.h.  */
8182#include <X11/Xlib.h>
8183_ACEOF
8184if ac_fn_c_try_cpp "$LINENO"; then :
8185  # We can compile using X headers with no special include directory.
8186ac_x_includes=
8187else
8188  for ac_dir in $ac_x_header_dirs; do
8189  if test -r "$ac_dir/X11/Xlib.h"; then
8190    ac_x_includes=$ac_dir
8191    break
8192  fi
8193done
8194fi
8195rm -f conftest.err conftest.i conftest.$ac_ext
8196fi # $ac_x_includes = no
8197
8198if test "$ac_x_libraries" = no; then
8199  # Check for the libraries.
8200  # See if we find them without any special options.
8201  # Don't add to $LIBS permanently.
8202  ac_save_LIBS=$LIBS
8203  LIBS="-lX11 $LIBS"
8204  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8205/* end confdefs.h.  */
8206#include <X11/Xlib.h>
8207int
8208main ()
8209{
8210XrmInitialize ()
8211  ;
8212  return 0;
8213}
8214_ACEOF
8215if ac_fn_c_try_link "$LINENO"; then :
8216  LIBS=$ac_save_LIBS
8217# We can link X programs with no special library path.
8218ac_x_libraries=
8219else
8220  LIBS=$ac_save_LIBS
8221for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8222do
8223  # Don't even attempt the hair of trying to link an X program!
8224  for ac_extension in a so sl dylib la dll; do
8225    if test -r "$ac_dir/libX11.$ac_extension"; then
8226      ac_x_libraries=$ac_dir
8227      break 2
8228    fi
8229  done
8230done
8231fi
8232rm -f core conftest.err conftest.$ac_objext \
8233    conftest$ac_exeext conftest.$ac_ext
8234fi # $ac_x_libraries = no
8235
8236case $ac_x_includes,$ac_x_libraries in #(
8237  no,* | *,no | *\'*)
8238    # Didn't find X, or a directory has "'" in its name.
8239    ac_cv_have_x="have_x=no";; #(
8240  *)
8241    # Record where we found X for the cache.
8242    ac_cv_have_x="have_x=yes\
8243	ac_x_includes='$ac_x_includes'\
8244	ac_x_libraries='$ac_x_libraries'"
8245esac
8246fi
8247;; #(
8248    *) have_x=yes;;
8249  esac
8250  eval "$ac_cv_have_x"
8251fi # $with_x != no
8252
8253if test "$have_x" != yes; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8255$as_echo "$have_x" >&6; }
8256  no_x=yes
8257else
8258  # If each of the values was on the command line, it overrides each guess.
8259  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8260  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8261  # Update the cache value to reflect the command line values.
8262  ac_cv_have_x="have_x=yes\
8263	ac_x_includes='$x_includes'\
8264	ac_x_libraries='$x_libraries'"
8265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8266$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
8267fi
8268
8269if test "$no_x" = yes; then
8270  # Not all programs may use this symbol, but it does not hurt to define it.
8271
8272$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
8273
8274  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8275else
8276  if test -n "$x_includes"; then
8277    X_CFLAGS="$X_CFLAGS -I$x_includes"
8278  fi
8279
8280  # It would also be nice to do this for all -L options, not just this one.
8281  if test -n "$x_libraries"; then
8282    X_LIBS="$X_LIBS -L$x_libraries"
8283    # For Solaris; some versions of Sun CC require a space after -R and
8284    # others require no space.  Words are not sufficient . . . .
8285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8286$as_echo_n "checking whether -R must be followed by a space... " >&6; }
8287    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8288    ac_xsave_c_werror_flag=$ac_c_werror_flag
8289    ac_c_werror_flag=yes
8290    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8291/* end confdefs.h.  */
8292
8293int
8294main ()
8295{
8296
8297  ;
8298  return 0;
8299}
8300_ACEOF
8301if ac_fn_c_try_link "$LINENO"; then :
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303$as_echo "no" >&6; }
8304       X_LIBS="$X_LIBS -R$x_libraries"
8305else
8306  LIBS="$ac_xsave_LIBS -R $x_libraries"
8307       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8308/* end confdefs.h.  */
8309
8310int
8311main ()
8312{
8313
8314  ;
8315  return 0;
8316}
8317_ACEOF
8318if ac_fn_c_try_link "$LINENO"; then :
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8320$as_echo "yes" >&6; }
8321	  X_LIBS="$X_LIBS -R $x_libraries"
8322else
8323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
8324$as_echo "neither works" >&6; }
8325fi
8326rm -f core conftest.err conftest.$ac_objext \
8327    conftest$ac_exeext conftest.$ac_ext
8328fi
8329rm -f core conftest.err conftest.$ac_objext \
8330    conftest$ac_exeext conftest.$ac_ext
8331    ac_c_werror_flag=$ac_xsave_c_werror_flag
8332    LIBS=$ac_xsave_LIBS
8333  fi
8334
8335  # Check for system-dependent libraries X programs must link with.
8336  # Do this before checking for the system-independent R6 libraries
8337  # (-lICE), since we may need -lsocket or whatever for X linking.
8338
8339  if test "$ISC" = yes; then
8340    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8341  else
8342    # Martyn Johnson says this is needed for Ultrix, if the X
8343    # libraries were built with DECnet support.  And Karl Berry says
8344    # the Alpha needs dnet_stub (dnet does not exist).
8345    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8346    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8347/* end confdefs.h.  */
8348
8349/* Override any GCC internal prototype to avoid an error.
8350   Use char because int might match the return type of a GCC
8351   builtin and then its argument prototype would still apply.  */
8352#ifdef __cplusplus
8353extern "C"
8354#endif
8355char XOpenDisplay ();
8356int
8357main ()
8358{
8359return XOpenDisplay ();
8360  ;
8361  return 0;
8362}
8363_ACEOF
8364if ac_fn_c_try_link "$LINENO"; then :
8365
8366else
8367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
8368$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
8369if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
8370  $as_echo_n "(cached) " >&6
8371else
8372  ac_check_lib_save_LIBS=$LIBS
8373LIBS="-ldnet  $LIBS"
8374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8375/* end confdefs.h.  */
8376
8377/* Override any GCC internal prototype to avoid an error.
8378   Use char because int might match the return type of a GCC
8379   builtin and then its argument prototype would still apply.  */
8380#ifdef __cplusplus
8381extern "C"
8382#endif
8383char dnet_ntoa ();
8384int
8385main ()
8386{
8387return dnet_ntoa ();
8388  ;
8389  return 0;
8390}
8391_ACEOF
8392if ac_fn_c_try_link "$LINENO"; then :
8393  ac_cv_lib_dnet_dnet_ntoa=yes
8394else
8395  ac_cv_lib_dnet_dnet_ntoa=no
8396fi
8397rm -f core conftest.err conftest.$ac_objext \
8398    conftest$ac_exeext conftest.$ac_ext
8399LIBS=$ac_check_lib_save_LIBS
8400fi
8401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8402$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
8403if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
8404  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8405fi
8406
8407    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
8409$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
8410if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
8411  $as_echo_n "(cached) " >&6
8412else
8413  ac_check_lib_save_LIBS=$LIBS
8414LIBS="-ldnet_stub  $LIBS"
8415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8416/* end confdefs.h.  */
8417
8418/* Override any GCC internal prototype to avoid an error.
8419   Use char because int might match the return type of a GCC
8420   builtin and then its argument prototype would still apply.  */
8421#ifdef __cplusplus
8422extern "C"
8423#endif
8424char dnet_ntoa ();
8425int
8426main ()
8427{
8428return dnet_ntoa ();
8429  ;
8430  return 0;
8431}
8432_ACEOF
8433if ac_fn_c_try_link "$LINENO"; then :
8434  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8435else
8436  ac_cv_lib_dnet_stub_dnet_ntoa=no
8437fi
8438rm -f core conftest.err conftest.$ac_objext \
8439    conftest$ac_exeext conftest.$ac_ext
8440LIBS=$ac_check_lib_save_LIBS
8441fi
8442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8443$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
8444if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
8445  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8446fi
8447
8448    fi
8449fi
8450rm -f core conftest.err conftest.$ac_objext \
8451    conftest$ac_exeext conftest.$ac_ext
8452    LIBS="$ac_xsave_LIBS"
8453
8454    # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
8455    # to get the SysV transport functions.
8456    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8457    # needs -lnsl.
8458    # The nsl library prevents programs from opening the X display
8459    # on Irix 5.2, according to T.E. Dickey.
8460    # The functions gethostbyname, getservbyname, and inet_addr are
8461    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8462    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
8463if test "x$ac_cv_func_gethostbyname" = xyes; then :
8464
8465fi
8466
8467    if test $ac_cv_func_gethostbyname = no; then
8468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8469$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
8470if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
8471  $as_echo_n "(cached) " >&6
8472else
8473  ac_check_lib_save_LIBS=$LIBS
8474LIBS="-lnsl  $LIBS"
8475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8476/* end confdefs.h.  */
8477
8478/* Override any GCC internal prototype to avoid an error.
8479   Use char because int might match the return type of a GCC
8480   builtin and then its argument prototype would still apply.  */
8481#ifdef __cplusplus
8482extern "C"
8483#endif
8484char gethostbyname ();
8485int
8486main ()
8487{
8488return gethostbyname ();
8489  ;
8490  return 0;
8491}
8492_ACEOF
8493if ac_fn_c_try_link "$LINENO"; then :
8494  ac_cv_lib_nsl_gethostbyname=yes
8495else
8496  ac_cv_lib_nsl_gethostbyname=no
8497fi
8498rm -f core conftest.err conftest.$ac_objext \
8499    conftest$ac_exeext conftest.$ac_ext
8500LIBS=$ac_check_lib_save_LIBS
8501fi
8502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8503$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
8504if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
8505  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
8506fi
8507
8508      if test $ac_cv_lib_nsl_gethostbyname = no; then
8509	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
8510$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
8511if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
8512  $as_echo_n "(cached) " >&6
8513else
8514  ac_check_lib_save_LIBS=$LIBS
8515LIBS="-lbsd  $LIBS"
8516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8517/* end confdefs.h.  */
8518
8519/* Override any GCC internal prototype to avoid an error.
8520   Use char because int might match the return type of a GCC
8521   builtin and then its argument prototype would still apply.  */
8522#ifdef __cplusplus
8523extern "C"
8524#endif
8525char gethostbyname ();
8526int
8527main ()
8528{
8529return gethostbyname ();
8530  ;
8531  return 0;
8532}
8533_ACEOF
8534if ac_fn_c_try_link "$LINENO"; then :
8535  ac_cv_lib_bsd_gethostbyname=yes
8536else
8537  ac_cv_lib_bsd_gethostbyname=no
8538fi
8539rm -f core conftest.err conftest.$ac_objext \
8540    conftest$ac_exeext conftest.$ac_ext
8541LIBS=$ac_check_lib_save_LIBS
8542fi
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
8544$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
8545if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
8546  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8547fi
8548
8549      fi
8550    fi
8551
8552    # [email protected] says without -lsocket,
8553    # socket/setsockopt and other routines are undefined under SCO ODT
8554    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8555    # on later versions), says Simon Leinen: it contains gethostby*
8556    # variants that don't use the name server (or something).  -lsocket
8557    # must be given before -lnsl if both are needed.  We assume that
8558    # if connect needs -lnsl, so does gethostbyname.
8559    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
8560if test "x$ac_cv_func_connect" = xyes; then :
8561
8562fi
8563
8564    if test $ac_cv_func_connect = no; then
8565      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
8566$as_echo_n "checking for connect in -lsocket... " >&6; }
8567if ${ac_cv_lib_socket_connect+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  ac_check_lib_save_LIBS=$LIBS
8571LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8573/* end confdefs.h.  */
8574
8575/* Override any GCC internal prototype to avoid an error.
8576   Use char because int might match the return type of a GCC
8577   builtin and then its argument prototype would still apply.  */
8578#ifdef __cplusplus
8579extern "C"
8580#endif
8581char connect ();
8582int
8583main ()
8584{
8585return connect ();
8586  ;
8587  return 0;
8588}
8589_ACEOF
8590if ac_fn_c_try_link "$LINENO"; then :
8591  ac_cv_lib_socket_connect=yes
8592else
8593  ac_cv_lib_socket_connect=no
8594fi
8595rm -f core conftest.err conftest.$ac_objext \
8596    conftest$ac_exeext conftest.$ac_ext
8597LIBS=$ac_check_lib_save_LIBS
8598fi
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
8600$as_echo "$ac_cv_lib_socket_connect" >&6; }
8601if test "x$ac_cv_lib_socket_connect" = xyes; then :
8602  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8603fi
8604
8605    fi
8606
8607    # Guillermo Gomez says -lposix is necessary on A/UX.
8608    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
8609if test "x$ac_cv_func_remove" = xyes; then :
8610
8611fi
8612
8613    if test $ac_cv_func_remove = no; then
8614      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
8615$as_echo_n "checking for remove in -lposix... " >&6; }
8616if ${ac_cv_lib_posix_remove+:} false; then :
8617  $as_echo_n "(cached) " >&6
8618else
8619  ac_check_lib_save_LIBS=$LIBS
8620LIBS="-lposix  $LIBS"
8621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8622/* end confdefs.h.  */
8623
8624/* Override any GCC internal prototype to avoid an error.
8625   Use char because int might match the return type of a GCC
8626   builtin and then its argument prototype would still apply.  */
8627#ifdef __cplusplus
8628extern "C"
8629#endif
8630char remove ();
8631int
8632main ()
8633{
8634return remove ();
8635  ;
8636  return 0;
8637}
8638_ACEOF
8639if ac_fn_c_try_link "$LINENO"; then :
8640  ac_cv_lib_posix_remove=yes
8641else
8642  ac_cv_lib_posix_remove=no
8643fi
8644rm -f core conftest.err conftest.$ac_objext \
8645    conftest$ac_exeext conftest.$ac_ext
8646LIBS=$ac_check_lib_save_LIBS
8647fi
8648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
8649$as_echo "$ac_cv_lib_posix_remove" >&6; }
8650if test "x$ac_cv_lib_posix_remove" = xyes; then :
8651  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8652fi
8653
8654    fi
8655
8656    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8657    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
8658if test "x$ac_cv_func_shmat" = xyes; then :
8659
8660fi
8661
8662    if test $ac_cv_func_shmat = no; then
8663      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
8664$as_echo_n "checking for shmat in -lipc... " >&6; }
8665if ${ac_cv_lib_ipc_shmat+:} false; then :
8666  $as_echo_n "(cached) " >&6
8667else
8668  ac_check_lib_save_LIBS=$LIBS
8669LIBS="-lipc  $LIBS"
8670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8671/* end confdefs.h.  */
8672
8673/* Override any GCC internal prototype to avoid an error.
8674   Use char because int might match the return type of a GCC
8675   builtin and then its argument prototype would still apply.  */
8676#ifdef __cplusplus
8677extern "C"
8678#endif
8679char shmat ();
8680int
8681main ()
8682{
8683return shmat ();
8684  ;
8685  return 0;
8686}
8687_ACEOF
8688if ac_fn_c_try_link "$LINENO"; then :
8689  ac_cv_lib_ipc_shmat=yes
8690else
8691  ac_cv_lib_ipc_shmat=no
8692fi
8693rm -f core conftest.err conftest.$ac_objext \
8694    conftest$ac_exeext conftest.$ac_ext
8695LIBS=$ac_check_lib_save_LIBS
8696fi
8697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
8698$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
8699if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
8700  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8701fi
8702
8703    fi
8704  fi
8705
8706  # Check for libraries that X11R6 Xt/Xaw programs need.
8707  ac_save_LDFLAGS=$LDFLAGS
8708  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8709  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8710  # check for ICE first), but we must link in the order -lSM -lICE or
8711  # we get undefined symbols.  So assume we have SM if we have ICE.
8712  # These have to be linked with before -lX11, unlike the other
8713  # libraries we check for below, so use a different variable.
8714  # John Interrante, Karl Berry
8715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
8716$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
8717if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
8718  $as_echo_n "(cached) " >&6
8719else
8720  ac_check_lib_save_LIBS=$LIBS
8721LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723/* end confdefs.h.  */
8724
8725/* Override any GCC internal prototype to avoid an error.
8726   Use char because int might match the return type of a GCC
8727   builtin and then its argument prototype would still apply.  */
8728#ifdef __cplusplus
8729extern "C"
8730#endif
8731char IceConnectionNumber ();
8732int
8733main ()
8734{
8735return IceConnectionNumber ();
8736  ;
8737  return 0;
8738}
8739_ACEOF
8740if ac_fn_c_try_link "$LINENO"; then :
8741  ac_cv_lib_ICE_IceConnectionNumber=yes
8742else
8743  ac_cv_lib_ICE_IceConnectionNumber=no
8744fi
8745rm -f core conftest.err conftest.$ac_objext \
8746    conftest$ac_exeext conftest.$ac_ext
8747LIBS=$ac_check_lib_save_LIBS
8748fi
8749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8750$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
8751if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
8752  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8753fi
8754
8755  LDFLAGS=$ac_save_LDFLAGS
8756
8757fi
8758
8759
8760        if test "$zOSUnix" = "yes"; then
8761    CFLAGS="$CFLAGS -W c,dll"
8762    LDFLAGS="$LDFLAGS -W l,dll"
8763    X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
8764  fi
8765
8766
8767  if test -d "$x_includes" && test ! -d "$x_libraries"; then
8768    x_libraries=`echo "$x_includes" | sed s/include/lib/`
8769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
8770$as_echo "Corrected X libraries to $x_libraries" >&6; }
8771    X_LIBS="$X_LIBS -L$x_libraries"
8772    if test "`(uname) 2>/dev/null`" = SunOS &&
8773					 uname -r | grep '^5' >/dev/null; then
8774      X_LIBS="$X_LIBS -R $x_libraries"
8775    fi
8776  fi
8777
8778  if test -d "$x_libraries" && test ! -d "$x_includes"; then
8779    x_includes=`echo "$x_libraries" | sed s/lib/include/`
8780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
8781$as_echo "Corrected X includes to $x_includes" >&6; }
8782    X_CFLAGS="$X_CFLAGS -I$x_includes"
8783  fi
8784
8785    X_CFLAGS="`echo $X_CFLAGS\  | sed 's%-I/usr/include %%'`"
8786    X_LIBS="`echo $X_LIBS\  | sed 's%-L/usr/lib %%'`"
8787    X_LIBS="`echo $X_LIBS\  | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
8788
8789
8790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
8791$as_echo_n "checking if X11 header files can be found... " >&6; }
8792  cflags_save=$CFLAGS
8793  CFLAGS="$CFLAGS $X_CFLAGS"
8794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8795/* end confdefs.h.  */
8796#include <X11/Xlib.h>
8797#include <X11/Intrinsic.h>
8798int
8799main ()
8800{
8801
8802  ;
8803  return 0;
8804}
8805_ACEOF
8806if ac_fn_c_try_compile "$LINENO"; then :
8807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8808$as_echo "yes" >&6; }
8809else
8810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8811$as_echo "no" >&6; }; no_x=yes
8812fi
8813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8814  CFLAGS=$cflags_save
8815
8816  if test "${no_x-no}" = yes; then
8817    with_x=no
8818  else
8819    $as_echo "#define HAVE_X11 1" >>confdefs.h
8820
8821    X_LIB="-lXt -lX11";
8822
8823
8824    ac_save_LDFLAGS="$LDFLAGS"
8825    LDFLAGS="-L$x_libraries $LDFLAGS"
8826
8827            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
8828$as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
8829if ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+:} false; then :
8830  $as_echo_n "(cached) " >&6
8831else
8832  ac_check_lib_save_LIBS=$LIBS
8833LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
8834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8835/* end confdefs.h.  */
8836
8837/* Override any GCC internal prototype to avoid an error.
8838   Use char because int might match the return type of a GCC
8839   builtin and then its argument prototype would still apply.  */
8840#ifdef __cplusplus
8841extern "C"
8842#endif
8843char _XdmcpAuthDoIt ();
8844int
8845main ()
8846{
8847return _XdmcpAuthDoIt ();
8848  ;
8849  return 0;
8850}
8851_ACEOF
8852if ac_fn_c_try_link "$LINENO"; then :
8853  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
8854else
8855  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
8856fi
8857rm -f core conftest.err conftest.$ac_objext \
8858    conftest$ac_exeext conftest.$ac_ext
8859LIBS=$ac_check_lib_save_LIBS
8860fi
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
8862$as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
8863if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes; then :
8864  X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
8865fi
8866
8867
8868                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
8869$as_echo_n "checking for IceOpenConnection in -lICE... " >&6; }
8870if ${ac_cv_lib_ICE_IceOpenConnection+:} false; then :
8871  $as_echo_n "(cached) " >&6
8872else
8873  ac_check_lib_save_LIBS=$LIBS
8874LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8876/* end confdefs.h.  */
8877
8878/* Override any GCC internal prototype to avoid an error.
8879   Use char because int might match the return type of a GCC
8880   builtin and then its argument prototype would still apply.  */
8881#ifdef __cplusplus
8882extern "C"
8883#endif
8884char IceOpenConnection ();
8885int
8886main ()
8887{
8888return IceOpenConnection ();
8889  ;
8890  return 0;
8891}
8892_ACEOF
8893if ac_fn_c_try_link "$LINENO"; then :
8894  ac_cv_lib_ICE_IceOpenConnection=yes
8895else
8896  ac_cv_lib_ICE_IceOpenConnection=no
8897fi
8898rm -f core conftest.err conftest.$ac_objext \
8899    conftest$ac_exeext conftest.$ac_ext
8900LIBS=$ac_check_lib_save_LIBS
8901fi
8902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
8903$as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
8904if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes; then :
8905  X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
8906fi
8907
8908
8909        LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
8910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
8911$as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
8912if ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+:} false; then :
8913  $as_echo_n "(cached) " >&6
8914else
8915  ac_check_lib_save_LIBS=$LIBS
8916LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
8917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8918/* end confdefs.h.  */
8919
8920/* Override any GCC internal prototype to avoid an error.
8921   Use char because int might match the return type of a GCC
8922   builtin and then its argument prototype would still apply.  */
8923#ifdef __cplusplus
8924extern "C"
8925#endif
8926char XpmCreatePixmapFromData ();
8927int
8928main ()
8929{
8930return XpmCreatePixmapFromData ();
8931  ;
8932  return 0;
8933}
8934_ACEOF
8935if ac_fn_c_try_link "$LINENO"; then :
8936  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
8937else
8938  ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
8939fi
8940rm -f core conftest.err conftest.$ac_objext \
8941    conftest$ac_exeext conftest.$ac_ext
8942LIBS=$ac_check_lib_save_LIBS
8943fi
8944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
8945$as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
8946if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes; then :
8947  X_PRE_LIBS="$X_PRE_LIBS -lXpm"
8948fi
8949
8950
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
8952$as_echo_n "checking if X11 header files implicitly declare return values... " >&6; }
8953    cflags_save=$CFLAGS
8954        if test "$GCC" = yes; then
8955      CFLAGS="$CFLAGS $X_CFLAGS -Werror"
8956    else
8957      CFLAGS="$CFLAGS $X_CFLAGS"
8958    fi
8959    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8960/* end confdefs.h.  */
8961#include <X11/Xlib.h>
8962int
8963main ()
8964{
8965
8966  ;
8967  return 0;
8968}
8969_ACEOF
8970if ac_fn_c_try_compile "$LINENO"; then :
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973else
8974  CFLAGS="$CFLAGS -Wno-implicit-int"
8975	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8976/* end confdefs.h.  */
8977#include <X11/Xlib.h>
8978int
8979main ()
8980{
8981
8982  ;
8983  return 0;
8984}
8985_ACEOF
8986if ac_fn_c_try_compile "$LINENO"; then :
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8988$as_echo "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
8989else
8990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
8991$as_echo "test failed" >&6; }
8992
8993fi
8994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8995
8996fi
8997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8998    CFLAGS=$cflags_save
8999
9000    LDFLAGS="$ac_save_LDFLAGS"
9001
9002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5
9003$as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
9004    if ${ac_cv_small_wchar_t+:} false; then :
9005  $as_echo_n "(cached) " >&6
9006else
9007  if test "$cross_compiling" = yes; then :
9008  as_fn_error $? "failed to compile test program" "$LINENO" 5
9009else
9010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9011/* end confdefs.h.  */
9012
9013#include <X11/Xlib.h>
9014#if STDC_HEADERS
9015# include <stdlib.h>
9016# include <stddef.h>
9017#endif
9018		main()
9019		{
9020		  if (sizeof(wchar_t) <= 2)
9021		    exit(1);
9022		  exit(0);
9023		}
9024_ACEOF
9025if ac_fn_c_try_run "$LINENO"; then :
9026  ac_cv_small_wchar_t="no"
9027else
9028  ac_cv_small_wchar_t="yes"
9029fi
9030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9031  conftest.$ac_objext conftest.beam conftest.$ac_ext
9032fi
9033
9034fi
9035
9036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_small_wchar_t" >&5
9037$as_echo "$ac_cv_small_wchar_t" >&6; }
9038    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
9039      $as_echo "#define SMALL_WCHAR_T 1" >>confdefs.h
9040
9041    fi
9042
9043  fi
9044fi
9045
9046if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9047    as_fn_error $? "could not configure X" "$LINENO" 5
9048fi
9049
9050test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
9051
9052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9053$as_echo_n "checking --enable-gui argument... " >&6; }
9054# Check whether --enable-gui was given.
9055if test "${enable_gui+set}" = set; then :
9056  enableval=$enable_gui;
9057else
9058  enable_gui="auto"
9059fi
9060
9061
9062enable_gui_canon=`echo "_$enable_gui" | \
9063	sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9064
9065SKIP_GTK2=YES
9066SKIP_GTK3=YES
9067SKIP_GNOME=YES
9068SKIP_MOTIF=YES
9069SKIP_ATHENA=YES
9070SKIP_NEXTAW=YES
9071SKIP_PHOTON=YES
9072SKIP_CARBON=YES
9073GUITYPE=NONE
9074
9075if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
9076  SKIP_PHOTON=
9077  case "$enable_gui_canon" in
9078    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9079$as_echo "no GUI support" >&6; }
9080		SKIP_PHOTON=YES ;;
9081    yes|""|auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9082$as_echo "automatic GUI support" >&6; }
9083    		gui_auto=yes ;;
9084    photon)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9085$as_echo "Photon GUI support" >&6; } ;;
9086    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9087$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
9088		SKIP_PHOTON=YES ;;
9089  esac
9090
9091elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9092  SKIP_CARBON=
9093  case "$enable_gui_canon" in
9094    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9095$as_echo "no GUI support" >&6; }
9096		SKIP_CARBON=YES ;;
9097    yes|"")	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9098$as_echo "yes - automatic GUI support" >&6; }
9099    		gui_auto=yes ;;
9100    auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - Carbon GUI is outdated - disable GUI support" >&5
9101$as_echo "auto - Carbon GUI is outdated - disable GUI support" >&6; }
9102		SKIP_CARBON=YES ;;
9103    carbon)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Carbon GUI support" >&5
9104$as_echo "Carbon GUI support" >&6; } ;;
9105    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9106$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
9107		SKIP_CARBON=YES ;;
9108  esac
9109
9110else
9111
9112  case "$enable_gui_canon" in
9113    no|none)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9114$as_echo "no GUI support" >&6; } ;;
9115    yes|""|auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9116$as_echo "yes/auto - automatic GUI support" >&6; }
9117		gui_auto=yes
9118		SKIP_GTK2=
9119		SKIP_GNOME=
9120		SKIP_MOTIF=
9121		SKIP_ATHENA=
9122		SKIP_NEXTAW=
9123		SKIP_CARBON=;;
9124    gtk2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9125$as_echo "GTK+ 2.x GUI support" >&6; }
9126		SKIP_GTK2=;;
9127    gnome2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9128$as_echo "GNOME 2.x GUI support" >&6; }
9129		SKIP_GNOME=
9130		SKIP_GTK2=;;
9131    gtk3)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9132$as_echo "GTK+ 3.x GUI support" >&6; }
9133		SKIP_GTK3=;;
9134    motif)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9135$as_echo "Motif GUI support" >&6; }
9136		SKIP_MOTIF=;;
9137    athena)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Athena GUI support" >&5
9138$as_echo "Athena GUI support" >&6; }
9139		SKIP_ATHENA=;;
9140    nextaw)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: neXtaw GUI support" >&5
9141$as_echo "neXtaw GUI support" >&6; }
9142		SKIP_NEXTAW=;;
9143    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9144$as_echo "Sorry, $enable_gui GUI is not supported" >&6; } ;;
9145  esac
9146
9147fi
9148
9149if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9150				-a "$enable_gui_canon" != "gnome2"; then
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9152$as_echo_n "checking whether or not to look for GTK+ 2... " >&6; }
9153  # Check whether --enable-gtk2-check was given.
9154if test "${enable_gtk2_check+set}" = set; then :
9155  enableval=$enable_gtk2_check;
9156else
9157  enable_gtk2_check="yes"
9158fi
9159
9160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9161$as_echo "$enable_gtk2_check" >&6; }
9162  if test "x$enable_gtk2_check" = "xno"; then
9163    SKIP_GTK2=YES
9164    SKIP_GNOME=YES
9165  fi
9166fi
9167
9168if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
9169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9170$as_echo_n "checking whether or not to look for GNOME... " >&6; }
9171  # Check whether --enable-gnome-check was given.
9172if test "${enable_gnome_check+set}" = set; then :
9173  enableval=$enable_gnome_check;
9174else
9175  enable_gnome_check="no"
9176fi
9177
9178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9179$as_echo "$enable_gnome_check" >&6; }
9180  if test "x$enable_gnome_check" = "xno"; then
9181    SKIP_GNOME=YES
9182  fi
9183fi
9184
9185if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
9186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9187$as_echo_n "checking whether or not to look for GTK+ 3... " >&6; }
9188  # Check whether --enable-gtk3-check was given.
9189if test "${enable_gtk3_check+set}" = set; then :
9190  enableval=$enable_gtk3_check;
9191else
9192  enable_gtk3_check="yes"
9193fi
9194
9195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9196$as_echo "$enable_gtk3_check" >&6; }
9197  if test "x$enable_gtk3_check" = "xno"; then
9198    SKIP_GTK3=YES
9199  fi
9200fi
9201
9202if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
9203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9204$as_echo_n "checking whether or not to look for Motif... " >&6; }
9205  # Check whether --enable-motif-check was given.
9206if test "${enable_motif_check+set}" = set; then :
9207  enableval=$enable_motif_check;
9208else
9209  enable_motif_check="yes"
9210fi
9211
9212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9213$as_echo "$enable_motif_check" >&6; }
9214  if test "x$enable_motif_check" = "xno"; then
9215    SKIP_MOTIF=YES
9216  fi
9217fi
9218
9219if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
9220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Athena" >&5
9221$as_echo_n "checking whether or not to look for Athena... " >&6; }
9222  # Check whether --enable-athena-check was given.
9223if test "${enable_athena_check+set}" = set; then :
9224  enableval=$enable_athena_check;
9225else
9226  enable_athena_check="yes"
9227fi
9228
9229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_athena_check" >&5
9230$as_echo "$enable_athena_check" >&6; }
9231  if test "x$enable_athena_check" = "xno"; then
9232    SKIP_ATHENA=YES
9233  fi
9234fi
9235
9236if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
9237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for neXtaw" >&5
9238$as_echo_n "checking whether or not to look for neXtaw... " >&6; }
9239  # Check whether --enable-nextaw-check was given.
9240if test "${enable_nextaw_check+set}" = set; then :
9241  enableval=$enable_nextaw_check;
9242else
9243  enable_nextaw_check="yes"
9244fi
9245
9246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nextaw_check" >&5
9247$as_echo "$enable_nextaw_check" >&6; };
9248  if test "x$enable_nextaw_check" = "xno"; then
9249    SKIP_NEXTAW=YES
9250  fi
9251fi
9252
9253if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
9254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Carbon" >&5
9255$as_echo_n "checking whether or not to look for Carbon... " >&6; }
9256  # Check whether --enable-carbon-check was given.
9257if test "${enable_carbon_check+set}" = set; then :
9258  enableval=$enable_carbon_check;
9259else
9260  enable_carbon_check="yes"
9261fi
9262
9263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_carbon_check" >&5
9264$as_echo "$enable_carbon_check" >&6; };
9265  if test "x$enable_carbon_check" = "xno"; then
9266    SKIP_CARBON=YES
9267  fi
9268fi
9269
9270
9271if test "x$MACOS_X" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
9272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
9273$as_echo_n "checking for Carbon GUI... " >&6; }
9274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9275$as_echo "yes" >&6; };
9276  GUITYPE=CARBONGUI
9277  if test "$VIMNAME" = "vim"; then
9278    VIMNAME=Vim
9279  fi
9280
9281  if test "x$MACARCH" = "xboth"; then
9282    CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
9283  else
9284    CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
9285  fi
9286
9287    if test x$prefix = xNONE; then
9288    prefix=/Applications
9289  fi
9290
9291    datadir='${prefix}/Vim.app/Contents/Resources'
9292
9293    SKIP_GTK2=YES;
9294  SKIP_GNOME=YES;
9295  SKIP_MOTIF=YES;
9296  SKIP_ATHENA=YES;
9297  SKIP_NEXTAW=YES;
9298  SKIP_PHOTON=YES;
9299  SKIP_CARBON=YES
9300fi
9301
9302
9303
9304
9305
9306
9307
9308if test "X$PKG_CONFIG" = "X"; then
9309  if test -n "$ac_tool_prefix"; then
9310  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9311set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_PKG_CONFIG+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $PKG_CONFIG in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9341if test -n "$PKG_CONFIG"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9343$as_echo "$PKG_CONFIG" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350fi
9351if test -z "$ac_cv_path_PKG_CONFIG"; then
9352  ac_pt_PKG_CONFIG=$PKG_CONFIG
9353  # Extract the first word of "pkg-config", so it can be a program name with args.
9354set dummy pkg-config; ac_word=$2
9355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9356$as_echo_n "checking for $ac_word... " >&6; }
9357if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9358  $as_echo_n "(cached) " >&6
9359else
9360  case $ac_pt_PKG_CONFIG in
9361  [\\/]* | ?:[\\/]*)
9362  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9363  ;;
9364  *)
9365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9366for as_dir in $PATH
9367do
9368  IFS=$as_save_IFS
9369  test -z "$as_dir" && as_dir=.
9370    for ac_exec_ext in '' $ac_executable_extensions; do
9371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9372    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9374    break 2
9375  fi
9376done
9377  done
9378IFS=$as_save_IFS
9379
9380  ;;
9381esac
9382fi
9383ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9384if test -n "$ac_pt_PKG_CONFIG"; then
9385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9386$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9387else
9388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9389$as_echo "no" >&6; }
9390fi
9391
9392  if test "x$ac_pt_PKG_CONFIG" = x; then
9393    PKG_CONFIG="no"
9394  else
9395    case $cross_compiling:$ac_tool_warned in
9396yes:)
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9398$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9399ac_tool_warned=yes ;;
9400esac
9401    PKG_CONFIG=$ac_pt_PKG_CONFIG
9402  fi
9403else
9404  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9405fi
9406
9407fi
9408
9409
9410if test -z "$SKIP_GTK2"; then
9411
9412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9413$as_echo_n "checking --disable-gtktest argument... " >&6; }
9414  # Check whether --enable-gtktest was given.
9415if test "${enable_gtktest+set}" = set; then :
9416  enableval=$enable_gtktest;
9417else
9418  enable_gtktest=yes
9419fi
9420
9421  if test "x$enable_gtktest" = "xyes" ; then
9422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9423$as_echo "gtk test enabled" >&6; }
9424  else
9425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9426$as_echo "gtk test disabled" >&6; }
9427  fi
9428
9429  if test "x$PKG_CONFIG" != "xno"; then
9430
9431  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
9432  {
9433    no_gtk=""
9434    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9435	  && $PKG_CONFIG --exists gtk+-2.0; then
9436    {
9437      min_gtk_version=2.2.0
9438      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9439$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9440                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
9441      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
9442      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
9443      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9444	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9445      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9446	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9447      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9448	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9449    }
9450    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9451	  && $PKG_CONFIG --exists gtk+-3.0; then
9452    {
9453      min_gtk_version=2.2.0
9454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9455$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9456
9457      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
9458      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
9459      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
9460      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9461	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9462      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9463	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9464      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9465	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9466    }
9467    else
9468      no_gtk=yes
9469    fi
9470
9471    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
9472    {
9473      ac_save_CFLAGS="$CFLAGS"
9474      ac_save_LIBS="$LIBS"
9475      CFLAGS="$CFLAGS $GTK_CFLAGS"
9476      LIBS="$LIBS $GTK_LIBS"
9477
9478                        rm -f conf.gtktest
9479      if test "$cross_compiling" = yes; then :
9480  echo $ac_n "cross compiling; assumed OK... $ac_c"
9481else
9482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9483/* end confdefs.h.  */
9484
9485#include <gtk/gtk.h>
9486#include <stdio.h>
9487#if STDC_HEADERS
9488# include <stdlib.h>
9489# include <stddef.h>
9490#endif
9491
9492int
9493main ()
9494{
9495int major, minor, micro;
9496char *tmp_version;
9497
9498system ("touch conf.gtktest");
9499
9500/* HP/UX 9 (%@#!) writes to sscanf strings */
9501tmp_version = g_strdup("$min_gtk_version");
9502if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
9503   printf("%s, bad version string\n", "$min_gtk_version");
9504   exit(1);
9505 }
9506
9507if ((gtk_major_version > major) ||
9508    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
9509    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
9510				     (gtk_micro_version >= micro)))
9511{
9512    return 0;
9513}
9514return 1;
9515}
9516
9517_ACEOF
9518if ac_fn_c_try_run "$LINENO"; then :
9519
9520else
9521  no_gtk=yes
9522fi
9523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9524  conftest.$ac_objext conftest.beam conftest.$ac_ext
9525fi
9526
9527      CFLAGS="$ac_save_CFLAGS"
9528      LIBS="$ac_save_LIBS"
9529    }
9530    fi
9531    if test "x$no_gtk" = x ; then
9532      if test "x$enable_gtktest" = "xyes"; then
9533	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9534$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9535      else
9536	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9537$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9538      fi
9539      GUI_LIB_LOC="$GTK_LIBDIR"
9540		 GTK_LIBNAME="$GTK_LIBS"
9541		GUI_INC_LOC="$GTK_CFLAGS"
9542    else
9543    {
9544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
9546      GTK_CFLAGS=""
9547      GTK_LIBS=""
9548      :
9549      if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
9550	as_fn_error $? "could not configure GTK" "$LINENO" 5
9551      fi
9552    }
9553    fi
9554  }
9555  else
9556    GTK_CFLAGS=""
9557    GTK_LIBS=""
9558    :
9559  fi
9560
9561
9562  rm -f conf.gtktest
9563
9564    if test "x$GTK_CFLAGS" != "x"; then
9565      SKIP_GTK3=YES
9566      SKIP_ATHENA=YES
9567      SKIP_NEXTAW=YES
9568      SKIP_MOTIF=YES
9569      GUITYPE=GTK
9570
9571    fi
9572  fi
9573  if test "x$GUITYPE" = "xGTK"; then
9574                if test -z "$SKIP_GNOME"; then
9575    {
9576
9577
9578
9579
9580
9581
9582# Check whether --with-gnome-includes was given.
9583if test "${with_gnome_includes+set}" = set; then :
9584  withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
9585
9586fi
9587
9588
9589
9590# Check whether --with-gnome-libs was given.
9591if test "${with_gnome_libs+set}" = set; then :
9592  withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
9593
9594fi
9595
9596
9597
9598# Check whether --with-gnome was given.
9599if test "${with_gnome+set}" = set; then :
9600  withval=$with_gnome; if test x$withval = xyes; then
9601      want_gnome=yes
9602      have_gnome=yes
9603    else
9604      if test "x$withval" = xno; then
9605	want_gnome=no
9606      else
9607	want_gnome=yes
9608	LDFLAGS="$LDFLAGS -L$withval/lib"
9609	CFLAGS="$CFLAGS -I$withval/include"
9610	gnome_prefix=$withval/lib
9611      fi
9612    fi
9613else
9614  want_gnome=yes
9615fi
9616
9617
9618  if test "x$want_gnome" = xyes; then
9619  {
9620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
9621$as_echo_n "checking for libgnomeui-2.0... " >&6; }
9622    if $PKG_CONFIG --exists libgnomeui-2.0; then
9623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9624$as_echo "yes" >&6; }
9625      GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
9626      GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
9627      GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
9628
9629                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
9630$as_echo_n "checking for FreeBSD... " >&6; }
9631      if test "`(uname) 2>/dev/null`" = FreeBSD; then
9632	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9633$as_echo "yes" >&6; }
9634	GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
9635	GNOME_LIBS="$GNOME_LIBS -pthread"
9636      else
9637	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638$as_echo "no" >&6; }
9639      fi
9640      have_gnome=yes
9641    else
9642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9643$as_echo "not found" >&6; }
9644      if test "x" = xfail; then
9645	as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
9646      fi
9647    fi
9648  }
9649  fi
9650
9651      if test "x$have_gnome" = xyes ; then
9652	$as_echo "#define FEAT_GUI_GNOME 1" >>confdefs.h
9653
9654	GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
9655	GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
9656      fi
9657    }
9658    fi
9659  fi
9660fi
9661
9662
9663if test -z "$SKIP_GTK3"; then
9664
9665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9666$as_echo_n "checking --disable-gtktest argument... " >&6; }
9667  # Check whether --enable-gtktest was given.
9668if test "${enable_gtktest+set}" = set; then :
9669  enableval=$enable_gtktest;
9670else
9671  enable_gtktest=yes
9672fi
9673
9674  if test "x$enable_gtktest" = "xyes" ; then
9675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9676$as_echo "gtk test enabled" >&6; }
9677  else
9678    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9679$as_echo "gtk test disabled" >&6; }
9680  fi
9681
9682  if test "x$PKG_CONFIG" != "xno"; then
9683
9684  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
9685  {
9686    no_gtk=""
9687    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9688	  && $PKG_CONFIG --exists gtk+-2.0; then
9689    {
9690      min_gtk_version=3.0.0
9691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9692$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9693                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
9694      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
9695      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
9696      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9697	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9698      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9699	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9700      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9701	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9702    }
9703    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9704	  && $PKG_CONFIG --exists gtk+-3.0; then
9705    {
9706      min_gtk_version=3.0.0
9707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9708$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9709
9710      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
9711      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
9712      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
9713      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9714	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9715      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9716	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9717      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9718	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9719    }
9720    else
9721      no_gtk=yes
9722    fi
9723
9724    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
9725    {
9726      ac_save_CFLAGS="$CFLAGS"
9727      ac_save_LIBS="$LIBS"
9728      CFLAGS="$CFLAGS $GTK_CFLAGS"
9729      LIBS="$LIBS $GTK_LIBS"
9730
9731                        rm -f conf.gtktest
9732      if test "$cross_compiling" = yes; then :
9733  echo $ac_n "cross compiling; assumed OK... $ac_c"
9734else
9735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9736/* end confdefs.h.  */
9737
9738#include <gtk/gtk.h>
9739#include <stdio.h>
9740#if STDC_HEADERS
9741# include <stdlib.h>
9742# include <stddef.h>
9743#endif
9744
9745int
9746main ()
9747{
9748int major, minor, micro;
9749char *tmp_version;
9750
9751system ("touch conf.gtktest");
9752
9753/* HP/UX 9 (%@#!) writes to sscanf strings */
9754tmp_version = g_strdup("$min_gtk_version");
9755if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
9756   printf("%s, bad version string\n", "$min_gtk_version");
9757   exit(1);
9758 }
9759
9760if ((gtk_major_version > major) ||
9761    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
9762    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
9763				     (gtk_micro_version >= micro)))
9764{
9765    return 0;
9766}
9767return 1;
9768}
9769
9770_ACEOF
9771if ac_fn_c_try_run "$LINENO"; then :
9772
9773else
9774  no_gtk=yes
9775fi
9776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9777  conftest.$ac_objext conftest.beam conftest.$ac_ext
9778fi
9779
9780      CFLAGS="$ac_save_CFLAGS"
9781      LIBS="$ac_save_LIBS"
9782    }
9783    fi
9784    if test "x$no_gtk" = x ; then
9785      if test "x$enable_gtktest" = "xyes"; then
9786	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9787$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9788      else
9789	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9790$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9791      fi
9792      GUI_LIB_LOC="$GTK_LIBDIR"
9793		 GTK_LIBNAME="$GTK_LIBS"
9794		GUI_INC_LOC="$GTK_CFLAGS"
9795    else
9796    {
9797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9798$as_echo "no" >&6; }
9799      GTK_CFLAGS=""
9800      GTK_LIBS=""
9801      :
9802      if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
9803	as_fn_error $? "could not configure GTK" "$LINENO" 5
9804      fi
9805    }
9806    fi
9807  }
9808  else
9809    GTK_CFLAGS=""
9810    GTK_LIBS=""
9811    :
9812  fi
9813
9814
9815  rm -f conf.gtktest
9816
9817    if test "x$GTK_CFLAGS" != "x"; then
9818      SKIP_GTK2=YES
9819      SKIP_GNOME=YES
9820      SKIP_ATHENA=YES
9821      SKIP_NEXTAW=YES
9822      SKIP_MOTIF=YES
9823      GUITYPE=GTK
9824
9825      $as_echo "#define USE_GTK3 1" >>confdefs.h
9826
9827    fi
9828  fi
9829fi
9830
9831if test "x$GUITYPE" = "xGTK"; then
9832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
9833$as_echo_n "checking version of Gdk-Pixbuf... " >&6; }
9834  gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
9835  if test "x$gdk_pixbuf_version" != x ; then
9836    gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
9837      sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
9838    if test "x$gdk_pixbuf_version_minor" != x -a \
9839	$gdk_pixbuf_version_minor -ge 31 ; then
9840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK." >&5
9841$as_echo "OK." >&6; }
9842      # Extract the first word of "glib-compile-resources", so it can be a program name with args.
9843set dummy glib-compile-resources; ac_word=$2
9844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9845$as_echo_n "checking for $ac_word... " >&6; }
9846if ${ac_cv_path_GLIB_COMPILE_RESOURCES+:} false; then :
9847  $as_echo_n "(cached) " >&6
9848else
9849  case $GLIB_COMPILE_RESOURCES in
9850  [\\/]* | ?:[\\/]*)
9851  ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
9852  ;;
9853  *)
9854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9855for as_dir in $PATH
9856do
9857  IFS=$as_save_IFS
9858  test -z "$as_dir" && as_dir=.
9859    for ac_exec_ext in '' $ac_executable_extensions; do
9860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9861    ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir/$ac_word$ac_exec_ext"
9862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9863    break 2
9864  fi
9865done
9866  done
9867IFS=$as_save_IFS
9868
9869  test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
9870  ;;
9871esac
9872fi
9873GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
9874if test -n "$GLIB_COMPILE_RESOURCES"; then
9875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
9876$as_echo "$GLIB_COMPILE_RESOURCES" >&6; }
9877else
9878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9879$as_echo "no" >&6; }
9880fi
9881
9882
9883      { $as_echo "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
9884$as_echo_n "checking glib-compile-resources... " >&6; }
9885      if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
9886	GLIB_COMPILE_RESOURCES=""
9887	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
9888$as_echo "cannot be found in PATH." >&6; }
9889      else
9890	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: usable." >&5
9891$as_echo "usable." >&6; }
9892	$as_echo "#define USE_GRESOURCE 1" >>confdefs.h
9893
9894	GRESOURCE_SRC="auto/gui_gtk_gresources.c"
9895	GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
9896      fi
9897    else
9898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
9899$as_echo "not usable." >&6; }
9900    fi
9901  else
9902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
9903$as_echo "cannot obtain from pkg_config." >&6; }
9904  fi
9905
9906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
9907$as_echo_n "checking --disable-icon-cache-update argument... " >&6; }
9908  # Check whether --enable-icon_cache_update was given.
9909if test "${enable_icon_cache_update+set}" = set; then :
9910  enableval=$enable_icon_cache_update;
9911else
9912  enable_icon_cache_update="yes"
9913fi
9914
9915  if test "$enable_icon_cache_update" = "yes"; then
9916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
9917$as_echo "not set" >&6; }
9918    # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
9919set dummy gtk-update-icon-cache; ac_word=$2
9920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9921$as_echo_n "checking for $ac_word... " >&6; }
9922if ${ac_cv_path_GTK_UPDATE_ICON_CACHE+:} false; then :
9923  $as_echo_n "(cached) " >&6
9924else
9925  case $GTK_UPDATE_ICON_CACHE in
9926  [\\/]* | ?:[\\/]*)
9927  ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
9928  ;;
9929  *)
9930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9931for as_dir in $PATH
9932do
9933  IFS=$as_save_IFS
9934  test -z "$as_dir" && as_dir=.
9935    for ac_exec_ext in '' $ac_executable_extensions; do
9936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9937    ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir/$ac_word$ac_exec_ext"
9938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9939    break 2
9940  fi
9941done
9942  done
9943IFS=$as_save_IFS
9944
9945  test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
9946  ;;
9947esac
9948fi
9949GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
9950if test -n "$GTK_UPDATE_ICON_CACHE"; then
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
9952$as_echo "$GTK_UPDATE_ICON_CACHE" >&6; }
9953else
9954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9955$as_echo "no" >&6; }
9956fi
9957
9958
9959    if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
9960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
9961$as_echo "not found in PATH." >&6; }
9962    fi
9963  else
9964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
9965$as_echo "update disabled" >&6; }
9966  fi
9967
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
9969$as_echo_n "checking --disable-desktop-database-update argument... " >&6; }
9970  # Check whether --enable-desktop_database_update was given.
9971if test "${enable_desktop_database_update+set}" = set; then :
9972  enableval=$enable_desktop_database_update;
9973else
9974  enable_desktop_database_update="yes"
9975fi
9976
9977  if test "$enable_desktop_database_update" = "yes"; then
9978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
9979$as_echo "not set" >&6; }
9980    # Extract the first word of "update-desktop-database", so it can be a program name with args.
9981set dummy update-desktop-database; ac_word=$2
9982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9983$as_echo_n "checking for $ac_word... " >&6; }
9984if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then :
9985  $as_echo_n "(cached) " >&6
9986else
9987  case $UPDATE_DESKTOP_DATABASE in
9988  [\\/]* | ?:[\\/]*)
9989  ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
9990  ;;
9991  *)
9992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9993for as_dir in $PATH
9994do
9995  IFS=$as_save_IFS
9996  test -z "$as_dir" && as_dir=.
9997    for ac_exec_ext in '' $ac_executable_extensions; do
9998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9999    ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext"
10000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10001    break 2
10002  fi
10003done
10004  done
10005IFS=$as_save_IFS
10006
10007  test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10008  ;;
10009esac
10010fi
10011UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10012if test -n "$UPDATE_DESKTOP_DATABASE"; then
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10014$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; }
10015else
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021    if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
10022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10023$as_echo "not found in PATH." >&6; }
10024    fi
10025  else
10026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10027$as_echo "update disabled" >&6; }
10028  fi
10029fi
10030
10031
10032
10033
10034
10035
10036
10037if test -z "$SKIP_MOTIF"; then
10038  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"
10039    GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10040
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10042$as_echo_n "checking for location of Motif GUI includes... " >&6; }
10043  gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10044  GUI_INC_LOC=
10045  for try in $gui_includes; do
10046    if test -f "$try/Xm/Xm.h"; then
10047      GUI_INC_LOC=$try
10048    fi
10049  done
10050  if test -n "$GUI_INC_LOC"; then
10051    if test "$GUI_INC_LOC" = /usr/include; then
10052      GUI_INC_LOC=
10053      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10054$as_echo "in default path" >&6; }
10055    else
10056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10057$as_echo "$GUI_INC_LOC" >&6; }
10058    fi
10059  else
10060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10061$as_echo "<not found>" >&6; }
10062    SKIP_MOTIF=YES
10063  fi
10064fi
10065
10066
10067if test -z "$SKIP_MOTIF"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10069$as_echo_n "checking --with-motif-lib argument... " >&6; }
10070
10071# Check whether --with-motif-lib was given.
10072if test "${with_motif_lib+set}" = set; then :
10073  withval=$with_motif_lib;  MOTIF_LIBNAME="${withval}"
10074fi
10075
10076
10077  if test -n "$MOTIF_LIBNAME"; then
10078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10079$as_echo "$MOTIF_LIBNAME" >&6; }
10080    GUI_LIB_LOC=
10081  else
10082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10083$as_echo "no" >&6; }
10084
10085        GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10086
10087            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10088$as_echo_n "checking for location of Motif GUI libs... " >&6; }
10089    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"
10090    GUI_LIB_LOC=
10091    for try in $gui_libs; do
10092      for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
10093	if test -f "$libtry"; then
10094	  GUI_LIB_LOC=$try
10095	fi
10096      done
10097    done
10098    if test -n "$GUI_LIB_LOC"; then
10099            if test "$GUI_LIB_LOC" = /usr/lib \
10100	   -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10101	   -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
10102	GUI_LIB_LOC=
10103	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10104$as_echo "in default path" >&6; }
10105      else
10106	if test -n "$GUI_LIB_LOC"; then
10107	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10108$as_echo "$GUI_LIB_LOC" >&6; }
10109	  if test "`(uname) 2>/dev/null`" = SunOS &&
10110					 uname -r | grep '^5' >/dev/null; then
10111	    GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10112	  fi
10113	fi
10114      fi
10115      MOTIF_LIBNAME=-lXm
10116    else
10117      { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10118$as_echo "<not found>" >&6; }
10119      SKIP_MOTIF=YES
10120    fi
10121  fi
10122fi
10123
10124if test -z "$SKIP_MOTIF"; then
10125  SKIP_ATHENA=YES
10126  SKIP_NEXTAW=YES
10127  GUITYPE=MOTIF
10128
10129fi
10130
10131
10132GUI_X_LIBS=
10133
10134if test -z "$SKIP_ATHENA"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Athena header files can be found" >&5
10136$as_echo_n "checking if Athena header files can be found... " >&6; }
10137  cflags_save=$CFLAGS
10138  CFLAGS="$CFLAGS $X_CFLAGS"
10139  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10140/* end confdefs.h.  */
10141
10142#include <X11/Intrinsic.h>
10143#include <X11/Xaw/Paned.h>
10144int
10145main ()
10146{
10147
10148  ;
10149  return 0;
10150}
10151_ACEOF
10152if ac_fn_c_try_compile "$LINENO"; then :
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10154$as_echo "yes" >&6; }
10155else
10156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10157$as_echo "no" >&6; }; SKIP_ATHENA=YES
10158fi
10159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10160  CFLAGS=$cflags_save
10161fi
10162
10163if test -z "$SKIP_ATHENA"; then
10164  GUITYPE=ATHENA
10165fi
10166
10167if test -z "$SKIP_NEXTAW"; then
10168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if neXtaw header files can be found" >&5
10169$as_echo_n "checking if neXtaw header files can be found... " >&6; }
10170  cflags_save=$CFLAGS
10171  CFLAGS="$CFLAGS $X_CFLAGS"
10172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173/* end confdefs.h.  */
10174
10175#include <X11/Intrinsic.h>
10176#include <X11/neXtaw/Paned.h>
10177int
10178main ()
10179{
10180
10181  ;
10182  return 0;
10183}
10184_ACEOF
10185if ac_fn_c_try_compile "$LINENO"; then :
10186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10187$as_echo "yes" >&6; }
10188else
10189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10190$as_echo "no" >&6; }; SKIP_NEXTAW=YES
10191fi
10192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10193  CFLAGS=$cflags_save
10194fi
10195
10196if test -z "$SKIP_NEXTAW"; then
10197  GUITYPE=NEXTAW
10198fi
10199
10200if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
10201      if test -n "$GUI_INC_LOC"; then
10202    GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10203  fi
10204  if test -n "$GUI_LIB_LOC"; then
10205    GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10206  fi
10207
10208    ldflags_save=$LDFLAGS
10209  LDFLAGS="$X_LIBS $LDFLAGS"
10210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10211$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
10212if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  ac_check_lib_save_LIBS=$LIBS
10216LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10218/* end confdefs.h.  */
10219
10220/* Override any GCC internal prototype to avoid an error.
10221   Use char because int might match the return type of a GCC
10222   builtin and then its argument prototype would still apply.  */
10223#ifdef __cplusplus
10224extern "C"
10225#endif
10226char XShapeQueryExtension ();
10227int
10228main ()
10229{
10230return XShapeQueryExtension ();
10231  ;
10232  return 0;
10233}
10234_ACEOF
10235if ac_fn_c_try_link "$LINENO"; then :
10236  ac_cv_lib_Xext_XShapeQueryExtension=yes
10237else
10238  ac_cv_lib_Xext_XShapeQueryExtension=no
10239fi
10240rm -f core conftest.err conftest.$ac_objext \
10241    conftest$ac_exeext conftest.$ac_ext
10242LIBS=$ac_check_lib_save_LIBS
10243fi
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10245$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10246if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then :
10247  GUI_X_LIBS="-lXext"
10248fi
10249
10250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10251$as_echo_n "checking for wslen in -lw... " >&6; }
10252if ${ac_cv_lib_w_wslen+:} false; then :
10253  $as_echo_n "(cached) " >&6
10254else
10255  ac_check_lib_save_LIBS=$LIBS
10256LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10258/* end confdefs.h.  */
10259
10260/* Override any GCC internal prototype to avoid an error.
10261   Use char because int might match the return type of a GCC
10262   builtin and then its argument prototype would still apply.  */
10263#ifdef __cplusplus
10264extern "C"
10265#endif
10266char wslen ();
10267int
10268main ()
10269{
10270return wslen ();
10271  ;
10272  return 0;
10273}
10274_ACEOF
10275if ac_fn_c_try_link "$LINENO"; then :
10276  ac_cv_lib_w_wslen=yes
10277else
10278  ac_cv_lib_w_wslen=no
10279fi
10280rm -f core conftest.err conftest.$ac_objext \
10281    conftest$ac_exeext conftest.$ac_ext
10282LIBS=$ac_check_lib_save_LIBS
10283fi
10284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10285$as_echo "$ac_cv_lib_w_wslen" >&6; }
10286if test "x$ac_cv_lib_w_wslen" = xyes; then :
10287  X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
10288fi
10289
10290  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10291$as_echo_n "checking for dlsym in -ldl... " >&6; }
10292if ${ac_cv_lib_dl_dlsym+:} false; then :
10293  $as_echo_n "(cached) " >&6
10294else
10295  ac_check_lib_save_LIBS=$LIBS
10296LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10298/* end confdefs.h.  */
10299
10300/* Override any GCC internal prototype to avoid an error.
10301   Use char because int might match the return type of a GCC
10302   builtin and then its argument prototype would still apply.  */
10303#ifdef __cplusplus
10304extern "C"
10305#endif
10306char dlsym ();
10307int
10308main ()
10309{
10310return dlsym ();
10311  ;
10312  return 0;
10313}
10314_ACEOF
10315if ac_fn_c_try_link "$LINENO"; then :
10316  ac_cv_lib_dl_dlsym=yes
10317else
10318  ac_cv_lib_dl_dlsym=no
10319fi
10320rm -f core conftest.err conftest.$ac_objext \
10321    conftest$ac_exeext conftest.$ac_ext
10322LIBS=$ac_check_lib_save_LIBS
10323fi
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10325$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
10326if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
10327  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
10328fi
10329
10330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10331$as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10332if ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+:} false; then :
10333  $as_echo_n "(cached) " >&6
10334else
10335  ac_check_lib_save_LIBS=$LIBS
10336LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10338/* end confdefs.h.  */
10339
10340/* Override any GCC internal prototype to avoid an error.
10341   Use char because int might match the return type of a GCC
10342   builtin and then its argument prototype would still apply.  */
10343#ifdef __cplusplus
10344extern "C"
10345#endif
10346char XmuCreateStippledPixmap ();
10347int
10348main ()
10349{
10350return XmuCreateStippledPixmap ();
10351  ;
10352  return 0;
10353}
10354_ACEOF
10355if ac_fn_c_try_link "$LINENO"; then :
10356  ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
10357else
10358  ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
10359fi
10360rm -f core conftest.err conftest.$ac_objext \
10361    conftest$ac_exeext conftest.$ac_ext
10362LIBS=$ac_check_lib_save_LIBS
10363fi
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10365$as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10366if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes; then :
10367  GUI_X_LIBS="-lXmu $GUI_X_LIBS"
10368fi
10369
10370  if test -z "$SKIP_MOTIF"; then
10371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10372$as_echo_n "checking for XpEndJob in -lXp... " >&6; }
10373if ${ac_cv_lib_Xp_XpEndJob+:} false; then :
10374  $as_echo_n "(cached) " >&6
10375else
10376  ac_check_lib_save_LIBS=$LIBS
10377LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
10378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10379/* end confdefs.h.  */
10380
10381/* Override any GCC internal prototype to avoid an error.
10382   Use char because int might match the return type of a GCC
10383   builtin and then its argument prototype would still apply.  */
10384#ifdef __cplusplus
10385extern "C"
10386#endif
10387char XpEndJob ();
10388int
10389main ()
10390{
10391return XpEndJob ();
10392  ;
10393  return 0;
10394}
10395_ACEOF
10396if ac_fn_c_try_link "$LINENO"; then :
10397  ac_cv_lib_Xp_XpEndJob=yes
10398else
10399  ac_cv_lib_Xp_XpEndJob=no
10400fi
10401rm -f core conftest.err conftest.$ac_objext \
10402    conftest$ac_exeext conftest.$ac_ext
10403LIBS=$ac_check_lib_save_LIBS
10404fi
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
10406$as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; }
10407if test "x$ac_cv_lib_Xp_XpEndJob" = xyes; then :
10408  GUI_X_LIBS="-lXp $GUI_X_LIBS"
10409fi
10410
10411  fi
10412  LDFLAGS=$ldflags_save
10413
10414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
10415$as_echo_n "checking for extra X11 defines... " >&6; }
10416  NARROW_PROTO=
10417  rm -fr conftestdir
10418  if mkdir conftestdir; then
10419    cd conftestdir
10420    cat > Imakefile <<'EOF'
10421acfindx:
10422	@echo 'NARROW_PROTO="${PROTO_DEFINES}"'
10423EOF
10424    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10425      eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10426    fi
10427    cd ..
10428    rm -fr conftestdir
10429  fi
10430  if test -z "$NARROW_PROTO"; then
10431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432$as_echo "no" >&6; }
10433  else
10434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
10435$as_echo "$NARROW_PROTO" >&6; }
10436  fi
10437
10438fi
10439
10440if test "$enable_xsmp" = "yes"; then
10441  cppflags_save=$CPPFLAGS
10442  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10443  for ac_header in X11/SM/SMlib.h
10444do :
10445  ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10446if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then :
10447  cat >>confdefs.h <<_ACEOF
10448#define HAVE_X11_SM_SMLIB_H 1
10449_ACEOF
10450
10451fi
10452
10453done
10454
10455  CPPFLAGS=$cppflags_save
10456fi
10457
10458
10459if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
10460    cppflags_save=$CPPFLAGS
10461  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10462  for ac_header in X11/xpm.h X11/Sunkeysym.h
10463do :
10464  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10465ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10466if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10467  cat >>confdefs.h <<_ACEOF
10468#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10469_ACEOF
10470
10471fi
10472
10473done
10474
10475
10476    if test ! "$enable_xim" = "no"; then
10477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
10478$as_echo_n "checking for XIMText in X11/Xlib.h... " >&6; }
10479    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10480/* end confdefs.h.  */
10481#include <X11/Xlib.h>
10482_ACEOF
10483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10484  $EGREP "XIMText" >/dev/null 2>&1; then :
10485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10486$as_echo "yes" >&6; }
10487else
10488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
10489$as_echo "no; xim has been disabled" >&6; }; enable_xim="no"
10490fi
10491rm -f conftest*
10492
10493  fi
10494  CPPFLAGS=$cppflags_save
10495
10496    if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
10497		-a "x$GUITYPE" != "xNONE" ; then
10498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
10499$as_echo "X GUI selected; xim has been enabled" >&6; }
10500    enable_xim="yes"
10501  fi
10502fi
10503
10504if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
10505  cppflags_save=$CPPFLAGS
10506  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
10508$as_echo_n "checking for X11/Xmu/Editres.h... " >&6; }
10509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10510/* end confdefs.h.  */
10511
10512#include <X11/Intrinsic.h>
10513#include <X11/Xmu/Editres.h>
10514int
10515main ()
10516{
10517int i; i = 0;
10518  ;
10519  return 0;
10520}
10521_ACEOF
10522if ac_fn_c_try_compile "$LINENO"; then :
10523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10524$as_echo "yes" >&6; }
10525		      $as_echo "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
10526
10527else
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10532  CPPFLAGS=$cppflags_save
10533fi
10534
10535if test -z "$SKIP_MOTIF"; then
10536  cppflags_save=$CPPFLAGS
10537  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10538  if test "$zOSUnix" = "yes"; then
10539	xmheader="Xm/Xm.h"
10540  else
10541	xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
10542	   Xm/UnhighlightT.h Xm/Notebook.h"
10543  fi
10544  for ac_header in $xmheader
10545do :
10546  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10547ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10548if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10549  cat >>confdefs.h <<_ACEOF
10550#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10551_ACEOF
10552
10553fi
10554
10555done
10556
10557
10558  if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
10559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
10560$as_echo_n "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
10561    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10562/* end confdefs.h.  */
10563#include <Xm/XpmP.h>
10564int
10565main ()
10566{
10567XpmAttributes_21 attr;
10568  ;
10569  return 0;
10570}
10571_ACEOF
10572if ac_fn_c_try_compile "$LINENO"; then :
10573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10574$as_echo "yes" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
10575
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10579
10580
10581fi
10582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10583  else
10584    $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10585
10586  fi
10587  CPPFLAGS=$cppflags_save
10588fi
10589
10590if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
10591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
10592$as_echo "no GUI selected; xim has been disabled" >&6; }
10593  enable_xim="no"
10594fi
10595if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
10596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
10597$as_echo "no GUI selected; fontset has been disabled" >&6; }
10598  enable_fontset="no"
10599fi
10600if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
10602$as_echo "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
10603  enable_fontset="no"
10604fi
10605
10606if test -z "$SKIP_PHOTON"; then
10607  GUITYPE=PHOTONGUI
10608fi
10609
10610
10611
10612
10613
10614
10615if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
10616  as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
10617fi
10618
10619if test "$enable_xim" = "yes"; then
10620  $as_echo "#define FEAT_XIM 1" >>confdefs.h
10621
10622fi
10623if test "$enable_fontset" = "yes"; then
10624  $as_echo "#define FEAT_XFONTSET 1" >>confdefs.h
10625
10626fi
10627
10628
10629
10630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
10631$as_echo_n "checking for /proc link to executable... " >&6; }
10632if test -L "/proc/self/exe"; then
10633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
10634$as_echo "/proc/self/exe" >&6; }
10635  $as_echo "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
10636
10637elif test -L "/proc/self/path/a.out"; then
10638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
10639$as_echo "/proc/self/path/a.out" >&6; }
10640  $as_echo "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
10641
10642elif test -L "/proc/curproc/file"; then
10643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
10644$as_echo "/proc/curproc/file" >&6; }
10645  $as_echo "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
10646
10647else
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
10650fi
10651
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
10653$as_echo_n "checking for CYGWIN or MSYS environment... " >&6; }
10654case `uname` in
10655    CYGWIN*|MSYS*)    CYGWIN=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10656$as_echo "yes" >&6; }
10657                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
10658$as_echo_n "checking for CYGWIN clipboard support... " >&6; }
10659                if test "x$with_x" = "xno" ; then
10660                  OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
10661                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10662$as_echo "yes" >&6; }
10663                  $as_echo "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
10664
10665                else
10666                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
10667$as_echo "no - using X11" >&6; }
10668                fi ;;
10669
10670    *)          CYGWIN=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; };;
10672esac
10673
10674if test "$enable_hangulinput" = "yes"; then
10675  if test "x$GUITYPE" = "xNONE"; then
10676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; hangul input has been disabled" >&5
10677$as_echo "no GUI selected; hangul input has been disabled" >&6; }
10678    enable_hangulinput=no
10679  else
10680    $as_echo "#define FEAT_HANGULIN 1" >>confdefs.h
10681
10682    HANGULIN_SRC=hangulin.c
10683
10684    HANGULIN_OBJ=objects/hangulin.o
10685
10686  fi
10687fi
10688
10689
10690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
10691$as_echo_n "checking whether toupper is broken... " >&6; }
10692if ${vim_cv_toupper_broken+:} false; then :
10693  $as_echo_n "(cached) " >&6
10694else
10695
10696    if test "$cross_compiling" = yes; then :
10697
10698    as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
10699
10700else
10701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10702/* end confdefs.h.  */
10703
10704#include "confdefs.h"
10705#include <ctype.h>
10706#if STDC_HEADERS
10707# include <stdlib.h>
10708# include <stddef.h>
10709#endif
10710main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
10711
10712_ACEOF
10713if ac_fn_c_try_run "$LINENO"; then :
10714
10715    vim_cv_toupper_broken=yes
10716
10717else
10718
10719    vim_cv_toupper_broken=no
10720
10721fi
10722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10723  conftest.$ac_objext conftest.beam conftest.$ac_ext
10724fi
10725
10726fi
10727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
10728$as_echo "$vim_cv_toupper_broken" >&6; }
10729
10730if test "x$vim_cv_toupper_broken" = "xyes" ; then
10731  $as_echo "#define BROKEN_TOUPPER 1" >>confdefs.h
10732
10733fi
10734
10735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
10736$as_echo_n "checking whether __DATE__ and __TIME__ work... " >&6; }
10737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10738/* end confdefs.h.  */
10739#include <stdio.h>
10740int
10741main ()
10742{
10743printf("(" __DATE__ " " __TIME__ ")");
10744  ;
10745  return 0;
10746}
10747_ACEOF
10748if ac_fn_c_try_compile "$LINENO"; then :
10749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10750$as_echo "yes" >&6; }; $as_echo "#define HAVE_DATE_TIME 1" >>confdefs.h
10751
10752else
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
10755fi
10756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10757
10758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
10759$as_echo_n "checking whether __attribute__((unused)) is allowed... " >&6; }
10760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10761/* end confdefs.h.  */
10762#include <stdio.h>
10763int
10764main ()
10765{
10766int x __attribute__((unused));
10767  ;
10768  return 0;
10769}
10770_ACEOF
10771if ac_fn_c_try_compile "$LINENO"; then :
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10773$as_echo "yes" >&6; }; $as_echo "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
10774
10775else
10776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777$as_echo "no" >&6; }
10778fi
10779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10780
10781ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
10782if test "x$ac_cv_header_elf_h" = xyes; then :
10783  HAS_ELF=1
10784fi
10785
10786
10787if test "$HAS_ELF" = 1; then
10788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
10789$as_echo_n "checking for main in -lelf... " >&6; }
10790if ${ac_cv_lib_elf_main+:} false; then :
10791  $as_echo_n "(cached) " >&6
10792else
10793  ac_check_lib_save_LIBS=$LIBS
10794LIBS="-lelf  $LIBS"
10795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10796/* end confdefs.h.  */
10797
10798
10799int
10800main ()
10801{
10802return main ();
10803  ;
10804  return 0;
10805}
10806_ACEOF
10807if ac_fn_c_try_link "$LINENO"; then :
10808  ac_cv_lib_elf_main=yes
10809else
10810  ac_cv_lib_elf_main=no
10811fi
10812rm -f core conftest.err conftest.$ac_objext \
10813    conftest$ac_exeext conftest.$ac_ext
10814LIBS=$ac_check_lib_save_LIBS
10815fi
10816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
10817$as_echo "$ac_cv_lib_elf_main" >&6; }
10818if test "x$ac_cv_lib_elf_main" = xyes; then :
10819  cat >>confdefs.h <<_ACEOF
10820#define HAVE_LIBELF 1
10821_ACEOF
10822
10823  LIBS="-lelf $LIBS"
10824
10825fi
10826
10827fi
10828
10829ac_header_dirent=no
10830for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10831  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
10833$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
10834if eval \${$as_ac_Header+:} false; then :
10835  $as_echo_n "(cached) " >&6
10836else
10837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10838/* end confdefs.h.  */
10839#include <sys/types.h>
10840#include <$ac_hdr>
10841
10842int
10843main ()
10844{
10845if ((DIR *) 0)
10846return 0;
10847  ;
10848  return 0;
10849}
10850_ACEOF
10851if ac_fn_c_try_compile "$LINENO"; then :
10852  eval "$as_ac_Header=yes"
10853else
10854  eval "$as_ac_Header=no"
10855fi
10856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10857fi
10858eval ac_res=\$$as_ac_Header
10859	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10860$as_echo "$ac_res" >&6; }
10861if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10862  cat >>confdefs.h <<_ACEOF
10863#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10864_ACEOF
10865
10866ac_header_dirent=$ac_hdr; break
10867fi
10868
10869done
10870# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10871if test $ac_header_dirent = dirent.h; then
10872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10873$as_echo_n "checking for library containing opendir... " >&6; }
10874if ${ac_cv_search_opendir+:} false; then :
10875  $as_echo_n "(cached) " >&6
10876else
10877  ac_func_search_save_LIBS=$LIBS
10878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10879/* end confdefs.h.  */
10880
10881/* Override any GCC internal prototype to avoid an error.
10882   Use char because int might match the return type of a GCC
10883   builtin and then its argument prototype would still apply.  */
10884#ifdef __cplusplus
10885extern "C"
10886#endif
10887char opendir ();
10888int
10889main ()
10890{
10891return opendir ();
10892  ;
10893  return 0;
10894}
10895_ACEOF
10896for ac_lib in '' dir; do
10897  if test -z "$ac_lib"; then
10898    ac_res="none required"
10899  else
10900    ac_res=-l$ac_lib
10901    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10902  fi
10903  if ac_fn_c_try_link "$LINENO"; then :
10904  ac_cv_search_opendir=$ac_res
10905fi
10906rm -f core conftest.err conftest.$ac_objext \
10907    conftest$ac_exeext
10908  if ${ac_cv_search_opendir+:} false; then :
10909  break
10910fi
10911done
10912if ${ac_cv_search_opendir+:} false; then :
10913
10914else
10915  ac_cv_search_opendir=no
10916fi
10917rm conftest.$ac_ext
10918LIBS=$ac_func_search_save_LIBS
10919fi
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
10921$as_echo "$ac_cv_search_opendir" >&6; }
10922ac_res=$ac_cv_search_opendir
10923if test "$ac_res" != no; then :
10924  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10925
10926fi
10927
10928else
10929  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10930$as_echo_n "checking for library containing opendir... " >&6; }
10931if ${ac_cv_search_opendir+:} false; then :
10932  $as_echo_n "(cached) " >&6
10933else
10934  ac_func_search_save_LIBS=$LIBS
10935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10936/* end confdefs.h.  */
10937
10938/* Override any GCC internal prototype to avoid an error.
10939   Use char because int might match the return type of a GCC
10940   builtin and then its argument prototype would still apply.  */
10941#ifdef __cplusplus
10942extern "C"
10943#endif
10944char opendir ();
10945int
10946main ()
10947{
10948return opendir ();
10949  ;
10950  return 0;
10951}
10952_ACEOF
10953for ac_lib in '' x; do
10954  if test -z "$ac_lib"; then
10955    ac_res="none required"
10956  else
10957    ac_res=-l$ac_lib
10958    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10959  fi
10960  if ac_fn_c_try_link "$LINENO"; then :
10961  ac_cv_search_opendir=$ac_res
10962fi
10963rm -f core conftest.err conftest.$ac_objext \
10964    conftest$ac_exeext
10965  if ${ac_cv_search_opendir+:} false; then :
10966  break
10967fi
10968done
10969if ${ac_cv_search_opendir+:} false; then :
10970
10971else
10972  ac_cv_search_opendir=no
10973fi
10974rm conftest.$ac_ext
10975LIBS=$ac_func_search_save_LIBS
10976fi
10977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
10978$as_echo "$ac_cv_search_opendir" >&6; }
10979ac_res=$ac_cv_search_opendir
10980if test "$ac_res" != no; then :
10981  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10982
10983fi
10984
10985fi
10986
10987
10988if test $ac_cv_header_sys_wait_h = no; then
10989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
10990$as_echo_n "checking for sys/wait.h that defines union wait... " >&6; }
10991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10992/* end confdefs.h.  */
10993#include <sys/wait.h>
10994int
10995main ()
10996{
10997union wait xx, yy; xx = yy
10998  ;
10999  return 0;
11000}
11001_ACEOF
11002if ac_fn_c_try_compile "$LINENO"; then :
11003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11004$as_echo "yes" >&6; }
11005			$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
11006
11007			$as_echo "#define HAVE_UNION_WAIT 1" >>confdefs.h
11008
11009else
11010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11011$as_echo "no" >&6; }
11012fi
11013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11014fi
11015
11016for ac_header in stdint.h stdlib.h string.h \
11017	sys/select.h sys/utsname.h termcap.h fcntl.h \
11018	sgtty.h sys/ioctl.h sys/time.h sys/types.h \
11019	termio.h iconv.h inttypes.h langinfo.h math.h \
11020	unistd.h stropts.h errno.h sys/resource.h \
11021	sys/systeminfo.h locale.h sys/stream.h termios.h \
11022	libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
11023	utime.h sys/param.h sys/ptms.h libintl.h libgen.h \
11024	util/debug.h util/msg18n.h frame.h sys/acl.h \
11025	sys/access.h sys/sysinfo.h wchar.h wctype.h
11026do :
11027  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11028ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11029if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11030  cat >>confdefs.h <<_ACEOF
11031#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11032_ACEOF
11033
11034fi
11035
11036done
11037
11038
11039for ac_header in sys/ptem.h
11040do :
11041  ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "#if defined HAVE_SYS_STREAM_H
11042#  include <sys/stream.h>
11043#endif
11044"
11045if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
11046  cat >>confdefs.h <<_ACEOF
11047#define HAVE_SYS_PTEM_H 1
11048_ACEOF
11049
11050fi
11051
11052done
11053
11054
11055for ac_header in sys/sysctl.h
11056do :
11057  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if defined HAVE_SYS_PARAM_H
11058#  include <sys/param.h>
11059#endif
11060"
11061if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
11062  cat >>confdefs.h <<_ACEOF
11063#define HAVE_SYS_SYSCTL_H 1
11064_ACEOF
11065
11066fi
11067
11068done
11069
11070
11071
11072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11073$as_echo_n "checking for pthread_np.h... " >&6; }
11074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11075/* end confdefs.h.  */
11076
11077#include <pthread.h>
11078#include <pthread_np.h>
11079int
11080main ()
11081{
11082int i; i = 0;
11083  ;
11084  return 0;
11085}
11086_ACEOF
11087if ac_fn_c_try_compile "$LINENO"; then :
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11089$as_echo "yes" >&6; }
11090		      $as_echo "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
11091
11092else
11093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
11095fi
11096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11097
11098for ac_header in strings.h
11099do :
11100  ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11101if test "x$ac_cv_header_strings_h" = xyes; then :
11102  cat >>confdefs.h <<_ACEOF
11103#define HAVE_STRINGS_H 1
11104_ACEOF
11105
11106fi
11107
11108done
11109
11110if test "x$MACOS_X" = "xyes"; then
11111    $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
11112
11113else
11114
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11116$as_echo_n "checking if strings.h can be included after string.h... " >&6; }
11117cppflags_save=$CPPFLAGS
11118CPPFLAGS="$CPPFLAGS $X_CFLAGS"
11119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11120/* end confdefs.h.  */
11121
11122#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11123# define _NO_PROTO	/* like in os_unix.h, causes conflict for AIX (Winn) */
11124			/* but don't do it on AIX 5.1 (Uribarri) */
11125#endif
11126#ifdef HAVE_XM_XM_H
11127# include <Xm/Xm.h>	/* This breaks it for HP-UX 11 (Squassabia) */
11128#endif
11129#ifdef HAVE_STRING_H
11130# include <string.h>
11131#endif
11132#if defined(HAVE_STRINGS_H)
11133# include <strings.h>
11134#endif
11135
11136int
11137main ()
11138{
11139int i; i = 0;
11140  ;
11141  return 0;
11142}
11143_ACEOF
11144if ac_fn_c_try_compile "$LINENO"; then :
11145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11146$as_echo "yes" >&6; }
11147else
11148  $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
11149
11150		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
11152fi
11153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11154CPPFLAGS=$cppflags_save
11155fi
11156
11157if test $ac_cv_c_compiler_gnu = yes; then
11158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
11159$as_echo_n "checking whether $CC needs -traditional... " >&6; }
11160if ${ac_cv_prog_gcc_traditional+:} false; then :
11161  $as_echo_n "(cached) " >&6
11162else
11163    ac_pattern="Autoconf.*'x'"
11164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11165/* end confdefs.h.  */
11166#include <sgtty.h>
11167Autoconf TIOCGETP
11168_ACEOF
11169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11170  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
11171  ac_cv_prog_gcc_traditional=yes
11172else
11173  ac_cv_prog_gcc_traditional=no
11174fi
11175rm -f conftest*
11176
11177
11178  if test $ac_cv_prog_gcc_traditional = no; then
11179    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11180/* end confdefs.h.  */
11181#include <termio.h>
11182Autoconf TCGETA
11183_ACEOF
11184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11185  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
11186  ac_cv_prog_gcc_traditional=yes
11187fi
11188rm -f conftest*
11189
11190  fi
11191fi
11192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
11193$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
11194  if test $ac_cv_prog_gcc_traditional = yes; then
11195    CC="$CC -traditional"
11196  fi
11197fi
11198
11199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11200$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11201if ${ac_cv_c_const+:} false; then :
11202  $as_echo_n "(cached) " >&6
11203else
11204  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11205/* end confdefs.h.  */
11206
11207int
11208main ()
11209{
11210
11211#ifndef __cplusplus
11212  /* Ultrix mips cc rejects this sort of thing.  */
11213  typedef int charset[2];
11214  const charset cs = { 0, 0 };
11215  /* SunOS 4.1.1 cc rejects this.  */
11216  char const *const *pcpcc;
11217  char **ppc;
11218  /* NEC SVR4.0.2 mips cc rejects this.  */
11219  struct point {int x, y;};
11220  static struct point const zero = {0,0};
11221  /* AIX XL C 1.02.0.0 rejects this.
11222     It does not let you subtract one const X* pointer from another in
11223     an arm of an if-expression whose if-part is not a constant
11224     expression */
11225  const char *g = "string";
11226  pcpcc = &g + (g ? g-g : 0);
11227  /* HPUX 7.0 cc rejects these. */
11228  ++pcpcc;
11229  ppc = (char**) pcpcc;
11230  pcpcc = (char const *const *) ppc;
11231  { /* SCO 3.2v4 cc rejects this sort of thing.  */
11232    char tx;
11233    char *t = &tx;
11234    char const *s = 0 ? (char *) 0 : (char const *) 0;
11235
11236    *t++ = 0;
11237    if (s) return 0;
11238  }
11239  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11240    int x[] = {25, 17};
11241    const int *foo = &x[0];
11242    ++foo;
11243  }
11244  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11245    typedef const int *iptr;
11246    iptr p = 0;
11247    ++p;
11248  }
11249  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11250       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11251    struct s { int j; const int *ap[3]; } bx;
11252    struct s *b = &bx; b->j = 5;
11253  }
11254  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11255    const int foo = 10;
11256    if (!foo) return 0;
11257  }
11258  return !cs[0] && !zero.x;
11259#endif
11260
11261  ;
11262  return 0;
11263}
11264_ACEOF
11265if ac_fn_c_try_compile "$LINENO"; then :
11266  ac_cv_c_const=yes
11267else
11268  ac_cv_c_const=no
11269fi
11270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11271fi
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11273$as_echo "$ac_cv_c_const" >&6; }
11274if test $ac_cv_c_const = no; then
11275
11276$as_echo "#define const /**/" >>confdefs.h
11277
11278fi
11279
11280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11281$as_echo_n "checking for working volatile... " >&6; }
11282if ${ac_cv_c_volatile+:} false; then :
11283  $as_echo_n "(cached) " >&6
11284else
11285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11286/* end confdefs.h.  */
11287
11288int
11289main ()
11290{
11291
11292volatile int x;
11293int * volatile y = (int *) 0;
11294return !x && !y;
11295  ;
11296  return 0;
11297}
11298_ACEOF
11299if ac_fn_c_try_compile "$LINENO"; then :
11300  ac_cv_c_volatile=yes
11301else
11302  ac_cv_c_volatile=no
11303fi
11304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11305fi
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
11307$as_echo "$ac_cv_c_volatile" >&6; }
11308if test $ac_cv_c_volatile = no; then
11309
11310$as_echo "#define volatile /**/" >>confdefs.h
11311
11312fi
11313
11314ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
11315if test "x$ac_cv_type_mode_t" = xyes; then :
11316
11317else
11318
11319cat >>confdefs.h <<_ACEOF
11320#define mode_t int
11321_ACEOF
11322
11323fi
11324
11325ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
11326if test "x$ac_cv_type_off_t" = xyes; then :
11327
11328else
11329
11330cat >>confdefs.h <<_ACEOF
11331#define off_t long int
11332_ACEOF
11333
11334fi
11335
11336ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
11337if test "x$ac_cv_type_pid_t" = xyes; then :
11338
11339else
11340
11341cat >>confdefs.h <<_ACEOF
11342#define pid_t int
11343_ACEOF
11344
11345fi
11346
11347ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
11348if test "x$ac_cv_type_size_t" = xyes; then :
11349
11350else
11351
11352cat >>confdefs.h <<_ACEOF
11353#define size_t unsigned int
11354_ACEOF
11355
11356fi
11357
11358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
11359$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
11360if ${ac_cv_type_uid_t+:} false; then :
11361  $as_echo_n "(cached) " >&6
11362else
11363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11364/* end confdefs.h.  */
11365#include <sys/types.h>
11366
11367_ACEOF
11368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11369  $EGREP "uid_t" >/dev/null 2>&1; then :
11370  ac_cv_type_uid_t=yes
11371else
11372  ac_cv_type_uid_t=no
11373fi
11374rm -f conftest*
11375
11376fi
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
11378$as_echo "$ac_cv_type_uid_t" >&6; }
11379if test $ac_cv_type_uid_t = no; then
11380
11381$as_echo "#define uid_t int" >>confdefs.h
11382
11383
11384$as_echo "#define gid_t int" >>confdefs.h
11385
11386fi
11387
11388ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
11389case $ac_cv_c_uint32_t in #(
11390  no|yes) ;; #(
11391  *)
11392
11393$as_echo "#define _UINT32_T 1" >>confdefs.h
11394
11395
11396cat >>confdefs.h <<_ACEOF
11397#define uint32_t $ac_cv_c_uint32_t
11398_ACEOF
11399;;
11400  esac
11401
11402
11403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11404$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
11405if ${ac_cv_header_time+:} false; then :
11406  $as_echo_n "(cached) " >&6
11407else
11408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11409/* end confdefs.h.  */
11410#include <sys/types.h>
11411#include <sys/time.h>
11412#include <time.h>
11413
11414int
11415main ()
11416{
11417if ((struct tm *) 0)
11418return 0;
11419  ;
11420  return 0;
11421}
11422_ACEOF
11423if ac_fn_c_try_compile "$LINENO"; then :
11424  ac_cv_header_time=yes
11425else
11426  ac_cv_header_time=no
11427fi
11428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11429fi
11430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11431$as_echo "$ac_cv_header_time" >&6; }
11432if test $ac_cv_header_time = yes; then
11433
11434$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
11435
11436fi
11437
11438ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
11439if test "x$ac_cv_type_ino_t" = xyes; then :
11440
11441else
11442
11443cat >>confdefs.h <<_ACEOF
11444#define ino_t long
11445_ACEOF
11446
11447fi
11448
11449ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
11450if test "x$ac_cv_type_dev_t" = xyes; then :
11451
11452else
11453
11454cat >>confdefs.h <<_ACEOF
11455#define dev_t unsigned
11456_ACEOF
11457
11458fi
11459
11460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11461$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11462if ${ac_cv_c_bigendian+:} false; then :
11463  $as_echo_n "(cached) " >&6
11464else
11465  ac_cv_c_bigendian=unknown
11466    # See if we're dealing with a universal compiler.
11467    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11468/* end confdefs.h.  */
11469#ifndef __APPLE_CC__
11470	       not a universal capable compiler
11471	     #endif
11472	     typedef int dummy;
11473
11474_ACEOF
11475if ac_fn_c_try_compile "$LINENO"; then :
11476
11477	# Check for potential -arch flags.  It is not universal unless
11478	# there are at least two -arch flags with different values.
11479	ac_arch=
11480	ac_prev=
11481	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11482	 if test -n "$ac_prev"; then
11483	   case $ac_word in
11484	     i?86 | x86_64 | ppc | ppc64)
11485	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11486		 ac_arch=$ac_word
11487	       else
11488		 ac_cv_c_bigendian=universal
11489		 break
11490	       fi
11491	       ;;
11492	   esac
11493	   ac_prev=
11494	 elif test "x$ac_word" = "x-arch"; then
11495	   ac_prev=arch
11496	 fi
11497       done
11498fi
11499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11500    if test $ac_cv_c_bigendian = unknown; then
11501      # See if sys/param.h defines the BYTE_ORDER macro.
11502      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11503/* end confdefs.h.  */
11504#include <sys/types.h>
11505	     #include <sys/param.h>
11506
11507int
11508main ()
11509{
11510#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11511		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11512		     && LITTLE_ENDIAN)
11513	      bogus endian macros
11514	     #endif
11515
11516  ;
11517  return 0;
11518}
11519_ACEOF
11520if ac_fn_c_try_compile "$LINENO"; then :
11521  # It does; now see whether it defined to BIG_ENDIAN or not.
11522	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11523/* end confdefs.h.  */
11524#include <sys/types.h>
11525		#include <sys/param.h>
11526
11527int
11528main ()
11529{
11530#if BYTE_ORDER != BIG_ENDIAN
11531		 not big endian
11532		#endif
11533
11534  ;
11535  return 0;
11536}
11537_ACEOF
11538if ac_fn_c_try_compile "$LINENO"; then :
11539  ac_cv_c_bigendian=yes
11540else
11541  ac_cv_c_bigendian=no
11542fi
11543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11544fi
11545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11546    fi
11547    if test $ac_cv_c_bigendian = unknown; then
11548      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11549      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11550/* end confdefs.h.  */
11551#include <limits.h>
11552
11553int
11554main ()
11555{
11556#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11557	      bogus endian macros
11558	     #endif
11559
11560  ;
11561  return 0;
11562}
11563_ACEOF
11564if ac_fn_c_try_compile "$LINENO"; then :
11565  # It does; now see whether it defined to _BIG_ENDIAN or not.
11566	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11567/* end confdefs.h.  */
11568#include <limits.h>
11569
11570int
11571main ()
11572{
11573#ifndef _BIG_ENDIAN
11574		 not big endian
11575		#endif
11576
11577  ;
11578  return 0;
11579}
11580_ACEOF
11581if ac_fn_c_try_compile "$LINENO"; then :
11582  ac_cv_c_bigendian=yes
11583else
11584  ac_cv_c_bigendian=no
11585fi
11586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11587fi
11588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11589    fi
11590    if test $ac_cv_c_bigendian = unknown; then
11591      # Compile a test program.
11592      if test "$cross_compiling" = yes; then :
11593  # Try to guess by grepping values from an object file.
11594	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11595/* end confdefs.h.  */
11596short int ascii_mm[] =
11597		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11598		short int ascii_ii[] =
11599		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11600		int use_ascii (int i) {
11601		  return ascii_mm[i] + ascii_ii[i];
11602		}
11603		short int ebcdic_ii[] =
11604		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11605		short int ebcdic_mm[] =
11606		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11607		int use_ebcdic (int i) {
11608		  return ebcdic_mm[i] + ebcdic_ii[i];
11609		}
11610		extern int foo;
11611
11612int
11613main ()
11614{
11615return use_ascii (foo) == use_ebcdic (foo);
11616  ;
11617  return 0;
11618}
11619_ACEOF
11620if ac_fn_c_try_compile "$LINENO"; then :
11621  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11622	      ac_cv_c_bigendian=yes
11623	    fi
11624	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11625	      if test "$ac_cv_c_bigendian" = unknown; then
11626		ac_cv_c_bigendian=no
11627	      else
11628		# finding both strings is unlikely to happen, but who knows?
11629		ac_cv_c_bigendian=unknown
11630	      fi
11631	    fi
11632fi
11633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11634else
11635  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11636/* end confdefs.h.  */
11637$ac_includes_default
11638int
11639main ()
11640{
11641
11642	     /* Are we little or big endian?  From Harbison&Steele.  */
11643	     union
11644	     {
11645	       long int l;
11646	       char c[sizeof (long int)];
11647	     } u;
11648	     u.l = 1;
11649	     return u.c[sizeof (long int) - 1] == 1;
11650
11651  ;
11652  return 0;
11653}
11654_ACEOF
11655if ac_fn_c_try_run "$LINENO"; then :
11656  ac_cv_c_bigendian=no
11657else
11658  ac_cv_c_bigendian=yes
11659fi
11660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11661  conftest.$ac_objext conftest.beam conftest.$ac_ext
11662fi
11663
11664    fi
11665fi
11666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11667$as_echo "$ac_cv_c_bigendian" >&6; }
11668 case $ac_cv_c_bigendian in #(
11669   yes)
11670     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11671;; #(
11672   no)
11673      ;; #(
11674   universal)
11675
11676$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11677
11678     ;; #(
11679   *)
11680     as_fn_error $? "unknown endianness
11681 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11682 esac
11683
11684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11685$as_echo_n "checking for inline... " >&6; }
11686if ${ac_cv_c_inline+:} false; then :
11687  $as_echo_n "(cached) " >&6
11688else
11689  ac_cv_c_inline=no
11690for ac_kw in inline __inline__ __inline; do
11691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11692/* end confdefs.h.  */
11693#ifndef __cplusplus
11694typedef int foo_t;
11695static $ac_kw foo_t static_foo () {return 0; }
11696$ac_kw foo_t foo () {return 0; }
11697#endif
11698
11699_ACEOF
11700if ac_fn_c_try_compile "$LINENO"; then :
11701  ac_cv_c_inline=$ac_kw
11702fi
11703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11704  test "$ac_cv_c_inline" != no && break
11705done
11706
11707fi
11708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11709$as_echo "$ac_cv_c_inline" >&6; }
11710
11711case $ac_cv_c_inline in
11712  inline | yes) ;;
11713  *)
11714    case $ac_cv_c_inline in
11715      no) ac_val=;;
11716      *) ac_val=$ac_cv_c_inline;;
11717    esac
11718    cat >>confdefs.h <<_ACEOF
11719#ifndef __cplusplus
11720#define inline $ac_val
11721#endif
11722_ACEOF
11723    ;;
11724esac
11725
11726
11727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
11728$as_echo_n "checking for rlim_t... " >&6; }
11729if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
11730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
11731$as_echo "(cached) $ac_cv_type_rlim_t" >&6; }
11732else
11733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11734/* end confdefs.h.  */
11735
11736#include <sys/types.h>
11737#if STDC_HEADERS
11738# include <stdlib.h>
11739# include <stddef.h>
11740#endif
11741#ifdef HAVE_SYS_RESOURCE_H
11742# include <sys/resource.h>
11743#endif
11744
11745_ACEOF
11746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11747  $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then :
11748  ac_cv_type_rlim_t=yes
11749else
11750  ac_cv_type_rlim_t=no
11751fi
11752rm -f conftest*
11753
11754	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
11755$as_echo "$ac_cv_type_rlim_t" >&6; }
11756fi
11757if test $ac_cv_type_rlim_t = no; then
11758  cat >> confdefs.h <<\EOF
11759#define rlim_t unsigned long
11760EOF
11761fi
11762
11763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
11764$as_echo_n "checking for stack_t... " >&6; }
11765if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
11766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
11767$as_echo "(cached) $ac_cv_type_stack_t" >&6; }
11768else
11769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11770/* end confdefs.h.  */
11771
11772#include <sys/types.h>
11773#if STDC_HEADERS
11774# include <stdlib.h>
11775# include <stddef.h>
11776#endif
11777#include <signal.h>
11778
11779_ACEOF
11780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11781  $EGREP "stack_t" >/dev/null 2>&1; then :
11782  ac_cv_type_stack_t=yes
11783else
11784  ac_cv_type_stack_t=no
11785fi
11786rm -f conftest*
11787
11788	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
11789$as_echo "$ac_cv_type_stack_t" >&6; }
11790fi
11791if test $ac_cv_type_stack_t = no; then
11792  cat >> confdefs.h <<\EOF
11793#define stack_t struct sigaltstack
11794EOF
11795fi
11796
11797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
11798$as_echo_n "checking whether stack_t has an ss_base field... " >&6; }
11799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11800/* end confdefs.h.  */
11801
11802#include <sys/types.h>
11803#if STDC_HEADERS
11804# include <stdlib.h>
11805# include <stddef.h>
11806#endif
11807#include <signal.h>
11808#include "confdefs.h"
11809
11810int
11811main ()
11812{
11813stack_t sigstk; sigstk.ss_base = 0;
11814  ;
11815  return 0;
11816}
11817_ACEOF
11818if ac_fn_c_try_compile "$LINENO"; then :
11819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11820$as_echo "yes" >&6; }; $as_echo "#define HAVE_SS_BASE 1" >>confdefs.h
11821
11822else
11823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824$as_echo "no" >&6; }
11825fi
11826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11827
11828olibs="$LIBS"
11829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
11830$as_echo_n "checking --with-tlib argument... " >&6; }
11831
11832# Check whether --with-tlib was given.
11833if test "${with_tlib+set}" = set; then :
11834  withval=$with_tlib;
11835fi
11836
11837if test -n "$with_tlib"; then
11838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
11839$as_echo "$with_tlib" >&6; }
11840  LIBS="$LIBS -l$with_tlib"
11841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
11842$as_echo_n "checking for linking with $with_tlib library... " >&6; }
11843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11844/* end confdefs.h.  */
11845
11846int
11847main ()
11848{
11849
11850  ;
11851  return 0;
11852}
11853_ACEOF
11854if ac_fn_c_try_link "$LINENO"; then :
11855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
11856$as_echo "OK" >&6; }
11857else
11858  as_fn_error $? "FAILED" "$LINENO" 5
11859fi
11860rm -f core conftest.err conftest.$ac_objext \
11861    conftest$ac_exeext conftest.$ac_ext
11862    olibs="$LIBS"
11863else
11864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
11865$as_echo "empty: automatic terminal library selection" >&6; }
11866                case "`uname -s 2>/dev/null`" in
11867	OSF1|SCO_SV)	tlibs="tinfo ncurses curses termlib termcap";;
11868	*)	tlibs="tinfo ncurses termlib termcap curses";;
11869  esac
11870  for libname in $tlibs; do
11871    as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh`
11872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
11873$as_echo_n "checking for tgetent in -l${libname}... " >&6; }
11874if eval \${$as_ac_Lib+:} false; then :
11875  $as_echo_n "(cached) " >&6
11876else
11877  ac_check_lib_save_LIBS=$LIBS
11878LIBS="-l${libname}  $LIBS"
11879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11880/* end confdefs.h.  */
11881
11882/* Override any GCC internal prototype to avoid an error.
11883   Use char because int might match the return type of a GCC
11884   builtin and then its argument prototype would still apply.  */
11885#ifdef __cplusplus
11886extern "C"
11887#endif
11888char tgetent ();
11889int
11890main ()
11891{
11892return tgetent ();
11893  ;
11894  return 0;
11895}
11896_ACEOF
11897if ac_fn_c_try_link "$LINENO"; then :
11898  eval "$as_ac_Lib=yes"
11899else
11900  eval "$as_ac_Lib=no"
11901fi
11902rm -f core conftest.err conftest.$ac_objext \
11903    conftest$ac_exeext conftest.$ac_ext
11904LIBS=$ac_check_lib_save_LIBS
11905fi
11906eval ac_res=\$$as_ac_Lib
11907	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11908$as_echo "$ac_res" >&6; }
11909if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11910  cat >>confdefs.h <<_ACEOF
11911#define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
11912_ACEOF
11913
11914  LIBS="-l${libname} $LIBS"
11915
11916fi
11917
11918    if test "x$olibs" != "x$LIBS"; then
11919                        if test "$cross_compiling" = yes; then :
11920  res="FAIL"
11921else
11922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11923/* end confdefs.h.  */
11924
11925#ifdef HAVE_TERMCAP_H
11926# include <termcap.h>
11927#endif
11928#if STDC_HEADERS
11929# include <stdlib.h>
11930# include <stddef.h>
11931#endif
11932main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
11933_ACEOF
11934if ac_fn_c_try_run "$LINENO"; then :
11935  res="OK"
11936else
11937  res="FAIL"
11938fi
11939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11940  conftest.$ac_objext conftest.beam conftest.$ac_ext
11941fi
11942
11943      if test "$res" = "OK"; then
11944	break
11945      fi
11946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
11947$as_echo "$libname library is not usable" >&6; }
11948      LIBS="$olibs"
11949    fi
11950  done
11951  if test "x$olibs" = "x$LIBS"; then
11952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
11953$as_echo "no terminal library found" >&6; }
11954  fi
11955fi
11956
11957if test "x$olibs" = "x$LIBS"; then
11958  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
11959$as_echo_n "checking for tgetent()... " >&6; }
11960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11961/* end confdefs.h.  */
11962
11963int
11964main ()
11965{
11966char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
11967  ;
11968  return 0;
11969}
11970_ACEOF
11971if ac_fn_c_try_link "$LINENO"; then :
11972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11973$as_echo "yes" >&6; }
11974else
11975  as_fn_error $? "NOT FOUND!
11976      You need to install a terminal library; for example ncurses.
11977      Or specify the name of the library with --with-tlib." "$LINENO" 5
11978fi
11979rm -f core conftest.err conftest.$ac_objext \
11980    conftest$ac_exeext conftest.$ac_ext
11981fi
11982
11983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
11984$as_echo_n "checking whether we talk terminfo... " >&6; }
11985if ${vim_cv_terminfo+:} false; then :
11986  $as_echo_n "(cached) " >&6
11987else
11988
11989    if test "$cross_compiling" = yes; then :
11990
11991      as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
11992
11993else
11994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11995/* end confdefs.h.  */
11996
11997#include "confdefs.h"
11998#ifdef HAVE_TERMCAP_H
11999# include <termcap.h>
12000#endif
12001#ifdef HAVE_STRING_H
12002# include <string.h>
12003#endif
12004#if STDC_HEADERS
12005# include <stdlib.h>
12006# include <stddef.h>
12007#endif
12008main()
12009{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
12010
12011_ACEOF
12012if ac_fn_c_try_run "$LINENO"; then :
12013
12014      vim_cv_terminfo=no
12015
12016else
12017
12018      vim_cv_terminfo=yes
12019
12020fi
12021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12022  conftest.$ac_objext conftest.beam conftest.$ac_ext
12023fi
12024
12025
12026fi
12027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12028$as_echo "$vim_cv_terminfo" >&6; }
12029
12030if test "x$vim_cv_terminfo" = "xyes" ; then
12031  $as_echo "#define TERMINFO 1" >>confdefs.h
12032
12033fi
12034
12035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12036$as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
12037if ${vim_cv_tgetent+:} false; then :
12038  $as_echo_n "(cached) " >&6
12039else
12040
12041    if test "$cross_compiling" = yes; then :
12042
12043      as_fn_error $? "failed to compile test program." "$LINENO" 5
12044
12045else
12046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12047/* end confdefs.h.  */
12048
12049#include "confdefs.h"
12050#ifdef HAVE_TERMCAP_H
12051# include <termcap.h>
12052#endif
12053#if STDC_HEADERS
12054# include <stdlib.h>
12055# include <stddef.h>
12056#endif
12057main()
12058{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
12059
12060_ACEOF
12061if ac_fn_c_try_run "$LINENO"; then :
12062
12063      vim_cv_tgetent=zero
12064
12065else
12066
12067      vim_cv_tgetent=non-zero
12068
12069fi
12070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12071  conftest.$ac_objext conftest.beam conftest.$ac_ext
12072fi
12073
12074
12075fi
12076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12077$as_echo "$vim_cv_tgetent" >&6; }
12078
12079if test "x$vim_cv_tgetent" = "xzero" ; then
12080  $as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h
12081
12082fi
12083
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12085$as_echo_n "checking whether termcap.h contains ospeed... " >&6; }
12086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12087/* end confdefs.h.  */
12088
12089#ifdef HAVE_TERMCAP_H
12090# include <termcap.h>
12091#endif
12092
12093int
12094main ()
12095{
12096ospeed = 20000
12097  ;
12098  return 0;
12099}
12100_ACEOF
12101if ac_fn_c_try_link "$LINENO"; then :
12102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12103$as_echo "yes" >&6; }; $as_echo "#define HAVE_OSPEED 1" >>confdefs.h
12104
12105else
12106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12107$as_echo "no" >&6; }
12108	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12109$as_echo_n "checking whether ospeed can be extern... " >&6; }
12110	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12111/* end confdefs.h.  */
12112
12113#ifdef HAVE_TERMCAP_H
12114# include <termcap.h>
12115#endif
12116extern short ospeed;
12117
12118int
12119main ()
12120{
12121ospeed = 20000
12122  ;
12123  return 0;
12124}
12125_ACEOF
12126if ac_fn_c_try_link "$LINENO"; then :
12127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12128$as_echo "yes" >&6; }; $as_echo "#define OSPEED_EXTERN 1" >>confdefs.h
12129
12130else
12131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132$as_echo "no" >&6; }
12133fi
12134rm -f core conftest.err conftest.$ac_objext \
12135    conftest$ac_exeext conftest.$ac_ext
12136
12137fi
12138rm -f core conftest.err conftest.$ac_objext \
12139    conftest$ac_exeext conftest.$ac_ext
12140
12141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
12142$as_echo_n "checking whether termcap.h contains UP, BC and PC... " >&6; }
12143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12144/* end confdefs.h.  */
12145
12146#ifdef HAVE_TERMCAP_H
12147# include <termcap.h>
12148#endif
12149
12150int
12151main ()
12152{
12153if (UP == 0 && BC == 0) PC = 1
12154  ;
12155  return 0;
12156}
12157_ACEOF
12158if ac_fn_c_try_link "$LINENO"; then :
12159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12160$as_echo "yes" >&6; }; $as_echo "#define HAVE_UP_BC_PC 1" >>confdefs.h
12161
12162else
12163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12164$as_echo "no" >&6; }
12165	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
12166$as_echo_n "checking whether UP, BC and PC can be extern... " >&6; }
12167	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168/* end confdefs.h.  */
12169
12170#ifdef HAVE_TERMCAP_H
12171# include <termcap.h>
12172#endif
12173extern char *UP, *BC, PC;
12174
12175int
12176main ()
12177{
12178if (UP == 0 && BC == 0) PC = 1
12179  ;
12180  return 0;
12181}
12182_ACEOF
12183if ac_fn_c_try_link "$LINENO"; then :
12184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12185$as_echo "yes" >&6; }; $as_echo "#define UP_BC_PC_EXTERN 1" >>confdefs.h
12186
12187else
12188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12189$as_echo "no" >&6; }
12190fi
12191rm -f core conftest.err conftest.$ac_objext \
12192    conftest$ac_exeext conftest.$ac_ext
12193
12194fi
12195rm -f core conftest.err conftest.$ac_objext \
12196    conftest$ac_exeext conftest.$ac_ext
12197
12198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
12199$as_echo_n "checking whether tputs() uses outfuntype... " >&6; }
12200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12201/* end confdefs.h.  */
12202
12203#ifdef HAVE_TERMCAP_H
12204# include <termcap.h>
12205#endif
12206
12207int
12208main ()
12209{
12210extern int xx(); tputs("test", 1, (outfuntype)xx)
12211  ;
12212  return 0;
12213}
12214_ACEOF
12215if ac_fn_c_try_compile "$LINENO"; then :
12216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12217$as_echo "yes" >&6; }; $as_echo "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
12218
12219else
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12221$as_echo "no" >&6; }
12222fi
12223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12224
12225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12226$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12228/* end confdefs.h.  */
12229
12230#include <sys/types.h>
12231#include <sys/time.h>
12232#include <sys/select.h>
12233int
12234main ()
12235{
12236
12237  ;
12238  return 0;
12239}
12240_ACEOF
12241if ac_fn_c_try_compile "$LINENO"; then :
12242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12243$as_echo "yes" >&6; }
12244			$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
12245
12246else
12247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12248$as_echo "no" >&6; }
12249fi
12250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12251
12252
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
12254$as_echo_n "checking for /dev/ptc... " >&6; }
12255if test -r /dev/ptc; then
12256  $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
12257
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12259$as_echo "yes" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
12266$as_echo_n "checking for SVR4 ptys... " >&6; }
12267if test -c /dev/ptmx ; then
12268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12269/* end confdefs.h.  */
12270
12271int
12272main ()
12273{
12274ptsname(0);grantpt(0);unlockpt(0);
12275  ;
12276  return 0;
12277}
12278_ACEOF
12279if ac_fn_c_try_link "$LINENO"; then :
12280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12281$as_echo "yes" >&6; }; $as_echo "#define HAVE_SVR4_PTYS 1" >>confdefs.h
12282
12283else
12284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285$as_echo "no" >&6; }
12286fi
12287rm -f core conftest.err conftest.$ac_objext \
12288    conftest$ac_exeext conftest.$ac_ext
12289else
12290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12291$as_echo "no" >&6; }
12292fi
12293
12294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
12295$as_echo_n "checking for ptyranges... " >&6; }
12296if test -d /dev/ptym ; then
12297  pdir='/dev/ptym'
12298else
12299  pdir='/dev'
12300fi
12301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12302/* end confdefs.h.  */
12303#ifdef M_UNIX
12304   yes;
12305#endif
12306
12307_ACEOF
12308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12309  $EGREP "yes" >/dev/null 2>&1; then :
12310  ptys=`echo /dev/ptyp??`
12311else
12312  ptys=`echo $pdir/pty??`
12313fi
12314rm -f conftest*
12315
12316if test "$ptys" != "$pdir/pty??" ; then
12317  p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
12318  p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\012'`
12319  cat >>confdefs.h <<_ACEOF
12320#define PTYRANGE0 "$p0"
12321_ACEOF
12322
12323  cat >>confdefs.h <<_ACEOF
12324#define PTYRANGE1 "$p1"
12325_ACEOF
12326
12327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
12328$as_echo "$p0 / $p1" >&6; }
12329else
12330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
12331$as_echo "don't know" >&6; }
12332fi
12333
12334rm -f conftest_grp
12335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5
12336$as_echo_n "checking default tty permissions/group... " >&6; }
12337if ${vim_cv_tty_group+:} false; then :
12338  $as_echo_n "(cached) " >&6
12339else
12340
12341    if test "$cross_compiling" = yes; then :
12342
12343      as_fn_error $? "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5
12344
12345else
12346  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12347/* end confdefs.h.  */
12348
12349#include "confdefs.h"
12350#include <sys/types.h>
12351#if STDC_HEADERS
12352# include <stdlib.h>
12353# include <stddef.h>
12354#endif
12355#ifdef HAVE_UNISTD_H
12356#include <unistd.h>
12357#endif
12358#include <sys/stat.h>
12359#include <stdio.h>
12360main()
12361{
12362  struct stat sb;
12363  char *x,*ttyname();
12364  int om, m;
12365  FILE *fp;
12366
12367  if (!(x = ttyname(0))) exit(1);
12368  if (stat(x, &sb)) exit(1);
12369  om = sb.st_mode;
12370  if (om & 002) exit(0);
12371  m = system("mesg y");
12372  if (m == -1 || m == 127) exit(1);
12373  if (stat(x, &sb)) exit(1);
12374  m = sb.st_mode;
12375  if (chmod(x, om)) exit(1);
12376  if (m & 002) exit(0);
12377  if (sb.st_gid == getgid()) exit(1);
12378  if (!(fp=fopen("conftest_grp", "w")))
12379    exit(1);
12380  fprintf(fp, "%d\n", sb.st_gid);
12381  fclose(fp);
12382  exit(0);
12383}
12384
12385_ACEOF
12386if ac_fn_c_try_run "$LINENO"; then :
12387
12388      if test -f conftest_grp; then
12389	vim_cv_tty_group=`cat conftest_grp`
12390	if test "x$vim_cv_tty_mode" = "x" ; then
12391	  vim_cv_tty_mode=0620
12392	fi
12393	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&5
12394$as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; }
12395      else
12396	vim_cv_tty_group=world
12397	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ptys are world accessible" >&5
12398$as_echo "ptys are world accessible" >&6; }
12399      fi
12400
12401else
12402
12403      vim_cv_tty_group=world
12404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't determine - assume ptys are world accessible" >&5
12405$as_echo "can't determine - assume ptys are world accessible" >&6; }
12406
12407fi
12408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12409  conftest.$ac_objext conftest.beam conftest.$ac_ext
12410fi
12411
12412
12413fi
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tty_group" >&5
12415$as_echo "$vim_cv_tty_group" >&6; }
12416rm -f conftest_grp
12417
12418if test "x$vim_cv_tty_group" != "xworld" ; then
12419  cat >>confdefs.h <<_ACEOF
12420#define PTYGROUP $vim_cv_tty_group
12421_ACEOF
12422
12423  if test "x$vim_cv_tty_mode" = "x" ; then
12424    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
12425  else
12426    $as_echo "#define PTYMODE 0620" >>confdefs.h
12427
12428  fi
12429fi
12430
12431
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
12433$as_echo_n "checking return type of signal handlers... " >&6; }
12434if ${ac_cv_type_signal+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438/* end confdefs.h.  */
12439#include <sys/types.h>
12440#include <signal.h>
12441
12442int
12443main ()
12444{
12445return *(signal (0, 0)) (0) == 1;
12446  ;
12447  return 0;
12448}
12449_ACEOF
12450if ac_fn_c_try_compile "$LINENO"; then :
12451  ac_cv_type_signal=int
12452else
12453  ac_cv_type_signal=void
12454fi
12455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12456fi
12457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
12458$as_echo "$ac_cv_type_signal" >&6; }
12459
12460cat >>confdefs.h <<_ACEOF
12461#define RETSIGTYPE $ac_cv_type_signal
12462_ACEOF
12463
12464
12465
12466if test $ac_cv_type_signal = void; then
12467  $as_echo "#define SIGRETURN return" >>confdefs.h
12468
12469else
12470  $as_echo "#define SIGRETURN return 0" >>confdefs.h
12471
12472fi
12473
12474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
12475$as_echo_n "checking for struct sigcontext... " >&6; }
12476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12477/* end confdefs.h.  */
12478
12479#include <signal.h>
12480test_sig()
12481{
12482    struct sigcontext *scont;
12483    scont = (struct sigcontext *)0;
12484    return 1;
12485}
12486int
12487main ()
12488{
12489
12490  ;
12491  return 0;
12492}
12493_ACEOF
12494if ac_fn_c_try_compile "$LINENO"; then :
12495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12496$as_echo "yes" >&6; }
12497		$as_echo "#define HAVE_SIGCONTEXT 1" >>confdefs.h
12498
12499else
12500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12501$as_echo "no" >&6; }
12502fi
12503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12504
12505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
12506$as_echo_n "checking getcwd implementation is broken... " >&6; }
12507if ${vim_cv_getcwd_broken+:} false; then :
12508  $as_echo_n "(cached) " >&6
12509else
12510
12511    if test "$cross_compiling" = yes; then :
12512
12513      as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
12514
12515else
12516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517/* end confdefs.h.  */
12518
12519#include "confdefs.h"
12520#ifdef HAVE_UNISTD_H
12521#include <unistd.h>
12522#endif
12523char *dagger[] = { "IFS=pwd", 0 };
12524main()
12525{
12526  char buffer[500];
12527  extern char **environ;
12528  environ = dagger;
12529  return getcwd(buffer, 500) ? 0 : 1;
12530}
12531
12532_ACEOF
12533if ac_fn_c_try_run "$LINENO"; then :
12534
12535      vim_cv_getcwd_broken=no
12536
12537else
12538
12539      vim_cv_getcwd_broken=yes
12540
12541fi
12542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12543  conftest.$ac_objext conftest.beam conftest.$ac_ext
12544fi
12545
12546
12547fi
12548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
12549$as_echo "$vim_cv_getcwd_broken" >&6; }
12550
12551if test "x$vim_cv_getcwd_broken" = "xyes" ; then
12552  $as_echo "#define BAD_GETCWD 1" >>confdefs.h
12553
12554  for ac_func in getwd
12555do :
12556  ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
12557if test "x$ac_cv_func_getwd" = xyes; then :
12558  cat >>confdefs.h <<_ACEOF
12559#define HAVE_GETWD 1
12560_ACEOF
12561
12562fi
12563done
12564
12565fi
12566
12567for ac_func in fchdir fchown fchmod fsync getcwd getpseudotty \
12568	getpwent getpwnam getpwuid getrlimit gettimeofday localtime_r lstat \
12569	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
12570	getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
12571	sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
12572	strnicmp strpbrk strtol tgetent towlower towupper iswupper tzset \
12573	usleep utime utimes mblen ftruncate unsetenv posix_openpt
12574do :
12575  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12576ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12577if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12578  cat >>confdefs.h <<_ACEOF
12579#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12580_ACEOF
12581
12582fi
12583done
12584
12585for ac_header in sys/select.h sys/socket.h
12586do :
12587  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12588ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12589if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12590  cat >>confdefs.h <<_ACEOF
12591#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12592_ACEOF
12593
12594fi
12595
12596done
12597
12598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
12599$as_echo_n "checking types of arguments for select... " >&6; }
12600if ${ac_cv_func_select_args+:} false; then :
12601  $as_echo_n "(cached) " >&6
12602else
12603  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
12604 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
12605  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
12606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12607/* end confdefs.h.  */
12608$ac_includes_default
12609#ifdef HAVE_SYS_SELECT_H
12610# include <sys/select.h>
12611#endif
12612#ifdef HAVE_SYS_SOCKET_H
12613# include <sys/socket.h>
12614#endif
12615
12616int
12617main ()
12618{
12619extern int select ($ac_arg1,
12620					    $ac_arg234, $ac_arg234, $ac_arg234,
12621					    $ac_arg5);
12622  ;
12623  return 0;
12624}
12625_ACEOF
12626if ac_fn_c_try_compile "$LINENO"; then :
12627  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
12628fi
12629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12630  done
12631 done
12632done
12633# Provide a safe default value.
12634: "${ac_cv_func_select_args=int,int *,struct timeval *}"
12635
12636fi
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
12638$as_echo "$ac_cv_func_select_args" >&6; }
12639ac_save_IFS=$IFS; IFS=','
12640set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
12641IFS=$ac_save_IFS
12642shift
12643
12644cat >>confdefs.h <<_ACEOF
12645#define SELECT_TYPE_ARG1 $1
12646_ACEOF
12647
12648
12649cat >>confdefs.h <<_ACEOF
12650#define SELECT_TYPE_ARG234 ($2)
12651_ACEOF
12652
12653
12654cat >>confdefs.h <<_ACEOF
12655#define SELECT_TYPE_ARG5 ($3)
12656_ACEOF
12657
12658rm -f conftest*
12659
12660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12661$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12662if ${ac_cv_sys_largefile_source+:} false; then :
12663  $as_echo_n "(cached) " >&6
12664else
12665  while :; do
12666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12667/* end confdefs.h.  */
12668#include <sys/types.h> /* for off_t */
12669     #include <stdio.h>
12670int
12671main ()
12672{
12673int (*fp) (FILE *, off_t, int) = fseeko;
12674     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12675  ;
12676  return 0;
12677}
12678_ACEOF
12679if ac_fn_c_try_link "$LINENO"; then :
12680  ac_cv_sys_largefile_source=no; break
12681fi
12682rm -f core conftest.err conftest.$ac_objext \
12683    conftest$ac_exeext conftest.$ac_ext
12684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12685/* end confdefs.h.  */
12686#define _LARGEFILE_SOURCE 1
12687#include <sys/types.h> /* for off_t */
12688     #include <stdio.h>
12689int
12690main ()
12691{
12692int (*fp) (FILE *, off_t, int) = fseeko;
12693     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12694  ;
12695  return 0;
12696}
12697_ACEOF
12698if ac_fn_c_try_link "$LINENO"; then :
12699  ac_cv_sys_largefile_source=1; break
12700fi
12701rm -f core conftest.err conftest.$ac_objext \
12702    conftest$ac_exeext conftest.$ac_ext
12703  ac_cv_sys_largefile_source=unknown
12704  break
12705done
12706fi
12707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12708$as_echo "$ac_cv_sys_largefile_source" >&6; }
12709case $ac_cv_sys_largefile_source in #(
12710  no | unknown) ;;
12711  *)
12712cat >>confdefs.h <<_ACEOF
12713#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12714_ACEOF
12715;;
12716esac
12717rm -rf conftest*
12718
12719# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12720# in glibc 2.1.3, but that breaks too many other things.
12721# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12722if test $ac_cv_sys_largefile_source != unknown; then
12723
12724$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12725
12726fi
12727
12728
12729# Check whether --enable-largefile was given.
12730if test "${enable_largefile+set}" = set; then :
12731  enableval=$enable_largefile;
12732fi
12733
12734if test "$enable_largefile" != no; then
12735
12736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12737$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12738if ${ac_cv_sys_largefile_CC+:} false; then :
12739  $as_echo_n "(cached) " >&6
12740else
12741  ac_cv_sys_largefile_CC=no
12742     if test "$GCC" != yes; then
12743       ac_save_CC=$CC
12744       while :; do
12745	 # IRIX 6.2 and later do not support large files by default,
12746	 # so use the C compiler's -n32 option if that helps.
12747	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12748/* end confdefs.h.  */
12749#include <sys/types.h>
12750 /* Check that off_t can represent 2**63 - 1 correctly.
12751    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12752    since some C++ compilers masquerading as C compilers
12753    incorrectly reject 9223372036854775807.  */
12754#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12755  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12756		       && LARGE_OFF_T % 2147483647 == 1)
12757		      ? 1 : -1];
12758int
12759main ()
12760{
12761
12762  ;
12763  return 0;
12764}
12765_ACEOF
12766	 if ac_fn_c_try_compile "$LINENO"; then :
12767  break
12768fi
12769rm -f core conftest.err conftest.$ac_objext
12770	 CC="$CC -n32"
12771	 if ac_fn_c_try_compile "$LINENO"; then :
12772  ac_cv_sys_largefile_CC=' -n32'; break
12773fi
12774rm -f core conftest.err conftest.$ac_objext
12775	 break
12776       done
12777       CC=$ac_save_CC
12778       rm -f conftest.$ac_ext
12779    fi
12780fi
12781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12782$as_echo "$ac_cv_sys_largefile_CC" >&6; }
12783  if test "$ac_cv_sys_largefile_CC" != no; then
12784    CC=$CC$ac_cv_sys_largefile_CC
12785  fi
12786
12787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12788$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12789if ${ac_cv_sys_file_offset_bits+:} false; then :
12790  $as_echo_n "(cached) " >&6
12791else
12792  while :; do
12793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794/* end confdefs.h.  */
12795#include <sys/types.h>
12796 /* Check that off_t can represent 2**63 - 1 correctly.
12797    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12798    since some C++ compilers masquerading as C compilers
12799    incorrectly reject 9223372036854775807.  */
12800#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12801  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12802		       && LARGE_OFF_T % 2147483647 == 1)
12803		      ? 1 : -1];
12804int
12805main ()
12806{
12807
12808  ;
12809  return 0;
12810}
12811_ACEOF
12812if ac_fn_c_try_compile "$LINENO"; then :
12813  ac_cv_sys_file_offset_bits=no; break
12814fi
12815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817/* end confdefs.h.  */
12818#define _FILE_OFFSET_BITS 64
12819#include <sys/types.h>
12820 /* Check that off_t can represent 2**63 - 1 correctly.
12821    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12822    since some C++ compilers masquerading as C compilers
12823    incorrectly reject 9223372036854775807.  */
12824#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12825  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12826		       && LARGE_OFF_T % 2147483647 == 1)
12827		      ? 1 : -1];
12828int
12829main ()
12830{
12831
12832  ;
12833  return 0;
12834}
12835_ACEOF
12836if ac_fn_c_try_compile "$LINENO"; then :
12837  ac_cv_sys_file_offset_bits=64; break
12838fi
12839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12840  ac_cv_sys_file_offset_bits=unknown
12841  break
12842done
12843fi
12844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12845$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12846case $ac_cv_sys_file_offset_bits in #(
12847  no | unknown) ;;
12848  *)
12849cat >>confdefs.h <<_ACEOF
12850#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12851_ACEOF
12852;;
12853esac
12854rm -rf conftest*
12855  if test $ac_cv_sys_file_offset_bits = unknown; then
12856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12857$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12858if ${ac_cv_sys_large_files+:} false; then :
12859  $as_echo_n "(cached) " >&6
12860else
12861  while :; do
12862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12863/* end confdefs.h.  */
12864#include <sys/types.h>
12865 /* Check that off_t can represent 2**63 - 1 correctly.
12866    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12867    since some C++ compilers masquerading as C compilers
12868    incorrectly reject 9223372036854775807.  */
12869#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12870  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12871		       && LARGE_OFF_T % 2147483647 == 1)
12872		      ? 1 : -1];
12873int
12874main ()
12875{
12876
12877  ;
12878  return 0;
12879}
12880_ACEOF
12881if ac_fn_c_try_compile "$LINENO"; then :
12882  ac_cv_sys_large_files=no; break
12883fi
12884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12886/* end confdefs.h.  */
12887#define _LARGE_FILES 1
12888#include <sys/types.h>
12889 /* Check that off_t can represent 2**63 - 1 correctly.
12890    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12891    since some C++ compilers masquerading as C compilers
12892    incorrectly reject 9223372036854775807.  */
12893#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12894  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12895		       && LARGE_OFF_T % 2147483647 == 1)
12896		      ? 1 : -1];
12897int
12898main ()
12899{
12900
12901  ;
12902  return 0;
12903}
12904_ACEOF
12905if ac_fn_c_try_compile "$LINENO"; then :
12906  ac_cv_sys_large_files=1; break
12907fi
12908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12909  ac_cv_sys_large_files=unknown
12910  break
12911done
12912fi
12913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12914$as_echo "$ac_cv_sys_large_files" >&6; }
12915case $ac_cv_sys_large_files in #(
12916  no | unknown) ;;
12917  *)
12918cat >>confdefs.h <<_ACEOF
12919#define _LARGE_FILES $ac_cv_sys_large_files
12920_ACEOF
12921;;
12922esac
12923rm -rf conftest*
12924  fi
12925
12926
12927fi
12928
12929
12930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
12931$as_echo_n "checking --enable-canberra argument... " >&6; }
12932# Check whether --enable-canberra was given.
12933if test "${enable_canberra+set}" = set; then :
12934  enableval=$enable_canberra;
12935else
12936  enable_canberra="maybe"
12937fi
12938
12939
12940if test "$enable_canberra" = "maybe"; then
12941  if test "$features" = "big" -o "$features" = "huge"; then
12942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
12943$as_echo "Defaulting to yes" >&6; }
12944    enable_canberra="yes"
12945  else
12946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
12947$as_echo "Defaulting to no" >&6; }
12948    enable_canberra="no"
12949  fi
12950else
12951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
12952$as_echo "$enable_canberra" >&6; }
12953fi
12954if test "$enable_canberra" = "yes"; then
12955  if test "x$PKG_CONFIG" != "xno"; then
12956    canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
12957    canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
12958  fi
12959  if test "x$canberra_lib" = "x"; then
12960    canberra_lib=-lcanberra
12961    canberra_cflags=-D_REENTRANT
12962  fi
12963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
12964$as_echo_n "checking for libcanberra... " >&6; }
12965  ac_save_CFLAGS="$CFLAGS"
12966  ac_save_LIBS="$LIBS"
12967  CFLAGS="$CFLAGS $canberra_cflags"
12968  LIBS="$LIBS $canberra_lib"
12969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12970/* end confdefs.h.  */
12971
12972  # include <canberra.h>
12973
12974int
12975main ()
12976{
12977
12978     ca_context *hello;
12979     ca_context_create(&hello);
12980  ;
12981  return 0;
12982}
12983_ACEOF
12984if ac_fn_c_try_link "$LINENO"; then :
12985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12986$as_echo "yes" >&6; }; $as_echo "#define HAVE_CANBERRA 1" >>confdefs.h
12987
12988else
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12990$as_echo "no" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
12991fi
12992rm -f core conftest.err conftest.$ac_objext \
12993    conftest$ac_exeext conftest.$ac_ext
12994fi
12995
12996
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
12998$as_echo_n "checking for st_blksize... " >&6; }
12999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13000/* end confdefs.h.  */
13001#include <sys/types.h>
13002#include <sys/stat.h>
13003int
13004main ()
13005{
13006	struct stat st;
13007	int n;
13008
13009	stat("/", &st);
13010	n = (int)st.st_blksize;
13011  ;
13012  return 0;
13013}
13014_ACEOF
13015if ac_fn_c_try_compile "$LINENO"; then :
13016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13017$as_echo "yes" >&6; }; $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
13018
13019else
13020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13021$as_echo "no" >&6; }
13022fi
13023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13024
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
13026$as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
13027if ${vim_cv_stat_ignores_slash+:} false; then :
13028  $as_echo_n "(cached) " >&6
13029else
13030
13031    if test "$cross_compiling" = yes; then :
13032
13033      as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
13034
13035else
13036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037/* end confdefs.h.  */
13038
13039#include "confdefs.h"
13040#if STDC_HEADERS
13041# include <stdlib.h>
13042# include <stddef.h>
13043#endif
13044#include <sys/types.h>
13045#include <sys/stat.h>
13046main() {struct stat st;  exit(stat("configure/", &st) != 0); }
13047
13048_ACEOF
13049if ac_fn_c_try_run "$LINENO"; then :
13050
13051      vim_cv_stat_ignores_slash=yes
13052
13053else
13054
13055      vim_cv_stat_ignores_slash=no
13056
13057fi
13058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13059  conftest.$ac_objext conftest.beam conftest.$ac_ext
13060fi
13061
13062
13063fi
13064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
13065$as_echo "$vim_cv_stat_ignores_slash" >&6; }
13066
13067if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
13068  $as_echo "#define STAT_IGNORES_SLASH 1" >>confdefs.h
13069
13070fi
13071
13072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
13073$as_echo_n "checking for iconv_open()... " >&6; }
13074save_LIBS="$LIBS"
13075LIBS="$LIBS -liconv"
13076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13077/* end confdefs.h.  */
13078
13079#ifdef HAVE_ICONV_H
13080# include <iconv.h>
13081#endif
13082
13083int
13084main ()
13085{
13086iconv_open("fr", "to");
13087  ;
13088  return 0;
13089}
13090_ACEOF
13091if ac_fn_c_try_link "$LINENO"; then :
13092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
13093$as_echo "yes; with -liconv" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
13094
13095else
13096  LIBS="$save_LIBS"
13097    cat 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" >&5
13114$as_echo "yes" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
13115
13116else
13117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13118$as_echo "no" >&6; }
13119fi
13120rm -f core conftest.err conftest.$ac_objext \
13121    conftest$ac_exeext conftest.$ac_ext
13122fi
13123rm -f core conftest.err conftest.$ac_objext \
13124    conftest$ac_exeext conftest.$ac_ext
13125
13126
13127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
13128$as_echo_n "checking for nl_langinfo(CODESET)... " >&6; }
13129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13130/* end confdefs.h.  */
13131
13132#ifdef HAVE_LANGINFO_H
13133# include <langinfo.h>
13134#endif
13135
13136int
13137main ()
13138{
13139char *cs = nl_langinfo(CODESET);
13140  ;
13141  return 0;
13142}
13143_ACEOF
13144if ac_fn_c_try_link "$LINENO"; then :
13145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13146$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
13147
13148else
13149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13150$as_echo "no" >&6; }
13151fi
13152rm -f core conftest.err conftest.$ac_objext \
13153    conftest$ac_exeext conftest.$ac_ext
13154
13155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
13156$as_echo_n "checking for strtod in -lm... " >&6; }
13157if ${ac_cv_lib_m_strtod+:} false; then :
13158  $as_echo_n "(cached) " >&6
13159else
13160  ac_check_lib_save_LIBS=$LIBS
13161LIBS="-lm  $LIBS"
13162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13163/* end confdefs.h.  */
13164
13165/* Override any GCC internal prototype to avoid an error.
13166   Use char because int might match the return type of a GCC
13167   builtin and then its argument prototype would still apply.  */
13168#ifdef __cplusplus
13169extern "C"
13170#endif
13171char strtod ();
13172int
13173main ()
13174{
13175return strtod ();
13176  ;
13177  return 0;
13178}
13179_ACEOF
13180if ac_fn_c_try_link "$LINENO"; then :
13181  ac_cv_lib_m_strtod=yes
13182else
13183  ac_cv_lib_m_strtod=no
13184fi
13185rm -f core conftest.err conftest.$ac_objext \
13186    conftest$ac_exeext conftest.$ac_ext
13187LIBS=$ac_check_lib_save_LIBS
13188fi
13189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
13190$as_echo "$ac_cv_lib_m_strtod" >&6; }
13191if test "x$ac_cv_lib_m_strtod" = xyes; then :
13192  cat >>confdefs.h <<_ACEOF
13193#define HAVE_LIBM 1
13194_ACEOF
13195
13196  LIBS="-lm $LIBS"
13197
13198fi
13199
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod() and other floating point functions" >&5
13201$as_echo_n "checking for strtod() and other floating point functions... " >&6; }
13202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13203/* end confdefs.h.  */
13204
13205#ifdef HAVE_MATH_H
13206# include <math.h>
13207#endif
13208#if STDC_HEADERS
13209# include <stdlib.h>
13210# include <stddef.h>
13211#endif
13212
13213int
13214main ()
13215{
13216char *s; double d;
13217    d = strtod("1.1", &s);
13218    d = fabs(1.11);
13219    d = ceil(1.11);
13220    d = floor(1.11);
13221    d = log10(1.11);
13222    d = pow(1.11, 2.22);
13223    d = sqrt(1.11);
13224    d = sin(1.11);
13225    d = cos(1.11);
13226    d = atan(1.11);
13227
13228  ;
13229  return 0;
13230}
13231_ACEOF
13232if ac_fn_c_try_link "$LINENO"; then :
13233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13234$as_echo "yes" >&6; }; $as_echo "#define HAVE_FLOAT_FUNCS 1" >>confdefs.h
13235
13236else
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13238$as_echo "no" >&6; }
13239fi
13240rm -f core conftest.err conftest.$ac_objext \
13241    conftest$ac_exeext conftest.$ac_ext
13242
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
13244$as_echo_n "checking for isinf()... " >&6; }
13245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13246/* end confdefs.h.  */
13247
13248#ifdef HAVE_MATH_H
13249# include <math.h>
13250#endif
13251#if STDC_HEADERS
13252# include <stdlib.h>
13253# include <stddef.h>
13254#endif
13255
13256int
13257main ()
13258{
13259int r = isinf(1.11);
13260  ;
13261  return 0;
13262}
13263_ACEOF
13264if ac_fn_c_try_link "$LINENO"; then :
13265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13266$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISINF 1" >>confdefs.h
13267
13268else
13269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13270$as_echo "no" >&6; }
13271fi
13272rm -f core conftest.err conftest.$ac_objext \
13273    conftest$ac_exeext conftest.$ac_ext
13274
13275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
13276$as_echo_n "checking for isnan()... " >&6; }
13277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278/* end confdefs.h.  */
13279
13280#ifdef HAVE_MATH_H
13281# include <math.h>
13282#endif
13283#if STDC_HEADERS
13284# include <stdlib.h>
13285# include <stddef.h>
13286#endif
13287
13288int
13289main ()
13290{
13291int r = isnan(1.11);
13292  ;
13293  return 0;
13294}
13295_ACEOF
13296if ac_fn_c_try_link "$LINENO"; then :
13297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13298$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
13299
13300else
13301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13302$as_echo "no" >&6; }
13303fi
13304rm -f core conftest.err conftest.$ac_objext \
13305    conftest$ac_exeext conftest.$ac_ext
13306
13307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
13308$as_echo_n "checking --disable-acl argument... " >&6; }
13309# Check whether --enable-acl was given.
13310if test "${enable_acl+set}" = set; then :
13311  enableval=$enable_acl;
13312else
13313  enable_acl="yes"
13314fi
13315
13316if test "$enable_acl" = "yes"; then
13317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13318$as_echo "no" >&6; }
13319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
13320$as_echo_n "checking for acl_get_file in -lposix1e... " >&6; }
13321if ${ac_cv_lib_posix1e_acl_get_file+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  ac_check_lib_save_LIBS=$LIBS
13325LIBS="-lposix1e  $LIBS"
13326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13327/* end confdefs.h.  */
13328
13329/* Override any GCC internal prototype to avoid an error.
13330   Use char because int might match the return type of a GCC
13331   builtin and then its argument prototype would still apply.  */
13332#ifdef __cplusplus
13333extern "C"
13334#endif
13335char acl_get_file ();
13336int
13337main ()
13338{
13339return acl_get_file ();
13340  ;
13341  return 0;
13342}
13343_ACEOF
13344if ac_fn_c_try_link "$LINENO"; then :
13345  ac_cv_lib_posix1e_acl_get_file=yes
13346else
13347  ac_cv_lib_posix1e_acl_get_file=no
13348fi
13349rm -f core conftest.err conftest.$ac_objext \
13350    conftest$ac_exeext conftest.$ac_ext
13351LIBS=$ac_check_lib_save_LIBS
13352fi
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
13354$as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; }
13355if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes; then :
13356  LIBS="$LIBS -lposix1e"
13357else
13358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
13359$as_echo_n "checking for acl_get_file in -lacl... " >&6; }
13360if ${ac_cv_lib_acl_acl_get_file+:} false; then :
13361  $as_echo_n "(cached) " >&6
13362else
13363  ac_check_lib_save_LIBS=$LIBS
13364LIBS="-lacl  $LIBS"
13365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13366/* end confdefs.h.  */
13367
13368/* Override any GCC internal prototype to avoid an error.
13369   Use char because int might match the return type of a GCC
13370   builtin and then its argument prototype would still apply.  */
13371#ifdef __cplusplus
13372extern "C"
13373#endif
13374char acl_get_file ();
13375int
13376main ()
13377{
13378return acl_get_file ();
13379  ;
13380  return 0;
13381}
13382_ACEOF
13383if ac_fn_c_try_link "$LINENO"; then :
13384  ac_cv_lib_acl_acl_get_file=yes
13385else
13386  ac_cv_lib_acl_acl_get_file=no
13387fi
13388rm -f core conftest.err conftest.$ac_objext \
13389    conftest$ac_exeext conftest.$ac_ext
13390LIBS=$ac_check_lib_save_LIBS
13391fi
13392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
13393$as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
13394if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then :
13395  LIBS="$LIBS -lacl"
13396		  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
13397$as_echo_n "checking for fgetxattr in -lattr... " >&6; }
13398if ${ac_cv_lib_attr_fgetxattr+:} false; then :
13399  $as_echo_n "(cached) " >&6
13400else
13401  ac_check_lib_save_LIBS=$LIBS
13402LIBS="-lattr  $LIBS"
13403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13404/* end confdefs.h.  */
13405
13406/* Override any GCC internal prototype to avoid an error.
13407   Use char because int might match the return type of a GCC
13408   builtin and then its argument prototype would still apply.  */
13409#ifdef __cplusplus
13410extern "C"
13411#endif
13412char fgetxattr ();
13413int
13414main ()
13415{
13416return fgetxattr ();
13417  ;
13418  return 0;
13419}
13420_ACEOF
13421if ac_fn_c_try_link "$LINENO"; then :
13422  ac_cv_lib_attr_fgetxattr=yes
13423else
13424  ac_cv_lib_attr_fgetxattr=no
13425fi
13426rm -f core conftest.err conftest.$ac_objext \
13427    conftest$ac_exeext conftest.$ac_ext
13428LIBS=$ac_check_lib_save_LIBS
13429fi
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
13431$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
13432if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
13433  LIBS="$LIBS -lattr"
13434fi
13435
13436fi
13437
13438fi
13439
13440
13441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
13442$as_echo_n "checking for POSIX ACL support... " >&6; }
13443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h.  */
13445
13446#include <sys/types.h>
13447#ifdef HAVE_SYS_ACL_H
13448# include <sys/acl.h>
13449#endif
13450acl_t acl;
13451int
13452main ()
13453{
13454acl = acl_get_file("foo", ACL_TYPE_ACCESS);
13455	acl_set_file("foo", ACL_TYPE_ACCESS, acl);
13456	acl_free(acl);
13457  ;
13458  return 0;
13459}
13460_ACEOF
13461if ac_fn_c_try_link "$LINENO"; then :
13462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13463$as_echo "yes" >&6; }; $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
13464
13465else
13466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13467$as_echo "no" >&6; }
13468fi
13469rm -f core conftest.err conftest.$ac_objext \
13470    conftest$ac_exeext conftest.$ac_ext
13471
13472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
13473$as_echo_n "checking for acl_get in -lsec... " >&6; }
13474if ${ac_cv_lib_sec_acl_get+:} false; then :
13475  $as_echo_n "(cached) " >&6
13476else
13477  ac_check_lib_save_LIBS=$LIBS
13478LIBS="-lsec  $LIBS"
13479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13480/* end confdefs.h.  */
13481
13482/* Override any GCC internal prototype to avoid an error.
13483   Use char because int might match the return type of a GCC
13484   builtin and then its argument prototype would still apply.  */
13485#ifdef __cplusplus
13486extern "C"
13487#endif
13488char acl_get ();
13489int
13490main ()
13491{
13492return acl_get ();
13493  ;
13494  return 0;
13495}
13496_ACEOF
13497if ac_fn_c_try_link "$LINENO"; then :
13498  ac_cv_lib_sec_acl_get=yes
13499else
13500  ac_cv_lib_sec_acl_get=no
13501fi
13502rm -f core conftest.err conftest.$ac_objext \
13503    conftest$ac_exeext conftest.$ac_ext
13504LIBS=$ac_check_lib_save_LIBS
13505fi
13506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
13507$as_echo "$ac_cv_lib_sec_acl_get" >&6; }
13508if test "x$ac_cv_lib_sec_acl_get" = xyes; then :
13509  LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
13510
13511else
13512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
13513$as_echo_n "checking for Solaris ACL support... " >&6; }
13514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13515/* end confdefs.h.  */
13516
13517#ifdef HAVE_SYS_ACL_H
13518# include <sys/acl.h>
13519#endif
13520int
13521main ()
13522{
13523acl("foo", GETACLCNT, 0, NULL);
13524
13525  ;
13526  return 0;
13527}
13528_ACEOF
13529if ac_fn_c_try_link "$LINENO"; then :
13530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13531$as_echo "yes" >&6; }; $as_echo "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
13532
13533else
13534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13535$as_echo "no" >&6; }
13536fi
13537rm -f core conftest.err conftest.$ac_objext \
13538    conftest$ac_exeext conftest.$ac_ext
13539fi
13540
13541
13542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
13543$as_echo_n "checking for AIX ACL support... " >&6; }
13544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13545/* end confdefs.h.  */
13546
13547#if STDC_HEADERS
13548# include <stdlib.h>
13549# include <stddef.h>
13550#endif
13551#ifdef HAVE_SYS_ACL_H
13552# include <sys/acl.h>
13553#endif
13554#ifdef HAVE_SYS_ACCESS_H
13555# include <sys/access.h>
13556#endif
13557#define _ALL_SOURCE
13558
13559#include <sys/stat.h>
13560
13561int aclsize;
13562struct acl *aclent;
13563int
13564main ()
13565{
13566aclsize = sizeof(struct acl);
13567	aclent = (void *)malloc(aclsize);
13568	statacl("foo", STX_NORMAL, aclent, aclsize);
13569
13570  ;
13571  return 0;
13572}
13573_ACEOF
13574if ac_fn_c_try_link "$LINENO"; then :
13575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13576$as_echo "yes" >&6; }; $as_echo "#define HAVE_AIX_ACL 1" >>confdefs.h
13577
13578else
13579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13580$as_echo "no" >&6; }
13581fi
13582rm -f core conftest.err conftest.$ac_objext \
13583    conftest$ac_exeext conftest.$ac_ext
13584else
13585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13586$as_echo "yes" >&6; }
13587fi
13588
13589if test "x$GTK_CFLAGS" != "x"; then
13590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
13591$as_echo_n "checking for pango_shape_full... " >&6; }
13592  ac_save_CFLAGS="$CFLAGS"
13593  ac_save_LIBS="$LIBS"
13594  CFLAGS="$CFLAGS $GTK_CFLAGS"
13595  LIBS="$LIBS $GTK_LIBS"
13596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597/* end confdefs.h.  */
13598#include <gtk/gtk.h>
13599int
13600main ()
13601{
13602 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
13603  ;
13604  return 0;
13605}
13606_ACEOF
13607if ac_fn_c_try_link "$LINENO"; then :
13608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13609$as_echo "yes" >&6; }; $as_echo "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
13610
13611else
13612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13613$as_echo "no" >&6; }
13614fi
13615rm -f core conftest.err conftest.$ac_objext \
13616    conftest$ac_exeext conftest.$ac_ext
13617  CFLAGS="$ac_save_CFLAGS"
13618  LIBS="$ac_save_LIBS"
13619fi
13620
13621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gpm argument" >&5
13622$as_echo_n "checking --disable-gpm argument... " >&6; }
13623# Check whether --enable-gpm was given.
13624if test "${enable_gpm+set}" = set; then :
13625  enableval=$enable_gpm;
13626else
13627  enable_gpm="yes"
13628fi
13629
13630
13631if test "$enable_gpm" = "yes"; then
13632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13633$as_echo "no" >&6; }
13634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
13635$as_echo_n "checking for gpm... " >&6; }
13636if ${vi_cv_have_gpm+:} false; then :
13637  $as_echo_n "(cached) " >&6
13638else
13639  olibs="$LIBS" ; LIBS="-lgpm"
13640	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641/* end confdefs.h.  */
13642#include <gpm.h>
13643	    #include <linux/keyboard.h>
13644int
13645main ()
13646{
13647Gpm_GetLibVersion(NULL);
13648  ;
13649  return 0;
13650}
13651_ACEOF
13652if ac_fn_c_try_link "$LINENO"; then :
13653  	    	    vi_cv_have_gpm=yes
13654else
13655  vi_cv_have_gpm=no
13656fi
13657rm -f core conftest.err conftest.$ac_objext \
13658    conftest$ac_exeext conftest.$ac_ext
13659	LIBS="$olibs"
13660
13661fi
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
13663$as_echo "$vi_cv_have_gpm" >&6; }
13664  if test $vi_cv_have_gpm = yes; then
13665    LIBS="$LIBS -lgpm"
13666    $as_echo "#define HAVE_GPM 1" >>confdefs.h
13667
13668  fi
13669else
13670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13671$as_echo "yes" >&6; }
13672fi
13673
13674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
13675$as_echo_n "checking --disable-sysmouse argument... " >&6; }
13676# Check whether --enable-sysmouse was given.
13677if test "${enable_sysmouse+set}" = set; then :
13678  enableval=$enable_sysmouse;
13679else
13680  enable_sysmouse="yes"
13681fi
13682
13683
13684if test "$enable_sysmouse" = "yes"; then
13685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13686$as_echo "no" >&6; }
13687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
13688$as_echo_n "checking for sysmouse... " >&6; }
13689if ${vi_cv_have_sysmouse+:} false; then :
13690  $as_echo_n "(cached) " >&6
13691else
13692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693/* end confdefs.h.  */
13694#include <sys/consio.h>
13695	     #include <signal.h>
13696	     #include <sys/fbio.h>
13697int
13698main ()
13699{
13700struct mouse_info   mouse;
13701	     mouse.operation = MOUSE_MODE;
13702	     mouse.operation = MOUSE_SHOW;
13703	     mouse.u.mode.mode = 0;
13704	     mouse.u.mode.signal = SIGUSR2;
13705  ;
13706  return 0;
13707}
13708_ACEOF
13709if ac_fn_c_try_link "$LINENO"; then :
13710  vi_cv_have_sysmouse=yes
13711else
13712  vi_cv_have_sysmouse=no
13713fi
13714rm -f core conftest.err conftest.$ac_objext \
13715    conftest$ac_exeext conftest.$ac_ext
13716
13717fi
13718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
13719$as_echo "$vi_cv_have_sysmouse" >&6; }
13720  if test $vi_cv_have_sysmouse = yes; then
13721    $as_echo "#define HAVE_SYSMOUSE 1" >>confdefs.h
13722
13723  fi
13724else
13725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13726$as_echo "yes" >&6; }
13727fi
13728
13729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
13730$as_echo_n "checking for FD_CLOEXEC... " >&6; }
13731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732/* end confdefs.h.  */
13733#if HAVE_FCNTL_H
13734# include <fcntl.h>
13735#endif
13736int
13737main ()
13738{
13739	int flag = FD_CLOEXEC;
13740  ;
13741  return 0;
13742}
13743_ACEOF
13744if ac_fn_c_try_compile "$LINENO"; then :
13745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13746$as_echo "yes" >&6; }; $as_echo "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
13747
13748else
13749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13750$as_echo "not usable" >&6; }
13751fi
13752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13753
13754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
13755$as_echo_n "checking for rename... " >&6; }
13756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13757/* end confdefs.h.  */
13758#include <stdio.h>
13759int
13760main ()
13761{
13762rename("this", "that")
13763  ;
13764  return 0;
13765}
13766_ACEOF
13767if ac_fn_c_try_link "$LINENO"; then :
13768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13769$as_echo "yes" >&6; }; $as_echo "#define HAVE_RENAME 1" >>confdefs.h
13770
13771else
13772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13773$as_echo "no" >&6; }
13774fi
13775rm -f core conftest.err conftest.$ac_objext \
13776    conftest$ac_exeext conftest.$ac_ext
13777
13778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
13779$as_echo_n "checking for sysctl... " >&6; }
13780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13781/* end confdefs.h.  */
13782#include <sys/types.h>
13783#include <sys/sysctl.h>
13784int
13785main ()
13786{
13787	int mib[2], r;
13788	size_t len;
13789
13790	mib[0] = CTL_HW;
13791	mib[1] = HW_USERMEM;
13792	len = sizeof(r);
13793	(void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
13794
13795  ;
13796  return 0;
13797}
13798_ACEOF
13799if ac_fn_c_try_compile "$LINENO"; then :
13800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13801$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCTL 1" >>confdefs.h
13802
13803else
13804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13805$as_echo "not usable" >&6; }
13806fi
13807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13808
13809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
13810$as_echo_n "checking for sysinfo... " >&6; }
13811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13812/* end confdefs.h.  */
13813#include <sys/types.h>
13814#include <sys/sysinfo.h>
13815int
13816main ()
13817{
13818	struct sysinfo sinfo;
13819	int t;
13820
13821	(void)sysinfo(&sinfo);
13822	t = sinfo.totalram;
13823
13824  ;
13825  return 0;
13826}
13827_ACEOF
13828if ac_fn_c_try_compile "$LINENO"; then :
13829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13830$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO 1" >>confdefs.h
13831
13832else
13833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13834$as_echo "not usable" >&6; }
13835fi
13836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13837
13838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
13839$as_echo_n "checking for sysinfo.mem_unit... " >&6; }
13840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13841/* end confdefs.h.  */
13842#include <sys/types.h>
13843#include <sys/sysinfo.h>
13844int
13845main ()
13846{
13847	struct sysinfo sinfo;
13848	sinfo.mem_unit = 1;
13849
13850  ;
13851  return 0;
13852}
13853_ACEOF
13854if ac_fn_c_try_compile "$LINENO"; then :
13855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13856$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
13857
13858else
13859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13860$as_echo "no" >&6; }
13861fi
13862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13863
13864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
13865$as_echo_n "checking for sysconf... " >&6; }
13866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867/* end confdefs.h.  */
13868#include <unistd.h>
13869int
13870main ()
13871{
13872	(void)sysconf(_SC_PAGESIZE);
13873	(void)sysconf(_SC_PHYS_PAGES);
13874
13875  ;
13876  return 0;
13877}
13878_ACEOF
13879if ac_fn_c_try_compile "$LINENO"; then :
13880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13881$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCONF 1" >>confdefs.h
13882
13883else
13884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13885$as_echo "not usable" >&6; }
13886fi
13887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13888
13889# The cast to long int works around a bug in the HP C Compiler
13890# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13891# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13892# This bug is HP SR number 8606223364.
13893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
13894$as_echo_n "checking size of int... " >&6; }
13895if ${ac_cv_sizeof_int+:} false; then :
13896  $as_echo_n "(cached) " >&6
13897else
13898  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
13899
13900else
13901  if test "$ac_cv_type_int" = yes; then
13902     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13904as_fn_error 77 "cannot compute sizeof (int)
13905See \`config.log' for more details" "$LINENO" 5; }
13906   else
13907     ac_cv_sizeof_int=0
13908   fi
13909fi
13910
13911fi
13912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
13913$as_echo "$ac_cv_sizeof_int" >&6; }
13914
13915
13916
13917cat >>confdefs.h <<_ACEOF
13918#define SIZEOF_INT $ac_cv_sizeof_int
13919_ACEOF
13920
13921
13922# The cast to long int works around a bug in the HP C Compiler
13923# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13924# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13925# This bug is HP SR number 8606223364.
13926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13927$as_echo_n "checking size of long... " >&6; }
13928if ${ac_cv_sizeof_long+:} false; then :
13929  $as_echo_n "(cached) " >&6
13930else
13931  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13932
13933else
13934  if test "$ac_cv_type_long" = yes; then
13935     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13937as_fn_error 77 "cannot compute sizeof (long)
13938See \`config.log' for more details" "$LINENO" 5; }
13939   else
13940     ac_cv_sizeof_long=0
13941   fi
13942fi
13943
13944fi
13945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13946$as_echo "$ac_cv_sizeof_long" >&6; }
13947
13948
13949
13950cat >>confdefs.h <<_ACEOF
13951#define SIZEOF_LONG $ac_cv_sizeof_long
13952_ACEOF
13953
13954
13955# The cast to long int works around a bug in the HP C Compiler
13956# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13957# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13958# This bug is HP SR number 8606223364.
13959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
13960$as_echo_n "checking size of time_t... " >&6; }
13961if ${ac_cv_sizeof_time_t+:} false; then :
13962  $as_echo_n "(cached) " >&6
13963else
13964  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
13965
13966else
13967  if test "$ac_cv_type_time_t" = yes; then
13968     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13970as_fn_error 77 "cannot compute sizeof (time_t)
13971See \`config.log' for more details" "$LINENO" 5; }
13972   else
13973     ac_cv_sizeof_time_t=0
13974   fi
13975fi
13976
13977fi
13978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
13979$as_echo "$ac_cv_sizeof_time_t" >&6; }
13980
13981
13982
13983cat >>confdefs.h <<_ACEOF
13984#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
13985_ACEOF
13986
13987
13988# The cast to long int works around a bug in the HP C Compiler
13989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13991# This bug is HP SR number 8606223364.
13992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
13993$as_echo_n "checking size of off_t... " >&6; }
13994if ${ac_cv_sizeof_off_t+:} false; then :
13995  $as_echo_n "(cached) " >&6
13996else
13997  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
13998
13999else
14000  if test "$ac_cv_type_off_t" = yes; then
14001     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14003as_fn_error 77 "cannot compute sizeof (off_t)
14004See \`config.log' for more details" "$LINENO" 5; }
14005   else
14006     ac_cv_sizeof_off_t=0
14007   fi
14008fi
14009
14010fi
14011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
14012$as_echo "$ac_cv_sizeof_off_t" >&6; }
14013
14014
14015
14016cat >>confdefs.h <<_ACEOF
14017#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
14018_ACEOF
14019
14020
14021
14022cat >>confdefs.h <<_ACEOF
14023#define VIM_SIZEOF_INT $ac_cv_sizeof_int
14024_ACEOF
14025
14026cat >>confdefs.h <<_ACEOF
14027#define VIM_SIZEOF_LONG $ac_cv_sizeof_long
14028_ACEOF
14029
14030
14031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
14032$as_echo_n "checking uint32_t is 32 bits... " >&6; }
14033if test "$cross_compiling" = yes; then :
14034  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
14035$as_echo "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
14036else
14037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14038/* end confdefs.h.  */
14039
14040#ifdef HAVE_STDINT_H
14041# include <stdint.h>
14042#endif
14043#ifdef HAVE_INTTYPES_H
14044# include <inttypes.h>
14045#endif
14046main() {
14047  uint32_t nr1 = (uint32_t)-1;
14048  uint32_t nr2 = (uint32_t)0xffffffffUL;
14049  if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1);
14050  exit(0);
14051}
14052_ACEOF
14053if ac_fn_c_try_run "$LINENO"; then :
14054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
14055$as_echo "ok" >&6; }
14056else
14057  as_fn_error $? "WRONG!  uint32_t not defined correctly." "$LINENO" 5
14058fi
14059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14060  conftest.$ac_objext conftest.beam conftest.$ac_ext
14061fi
14062
14063
14064
14065bcopy_test_prog='
14066#include "confdefs.h"
14067#ifdef HAVE_STRING_H
14068# include <string.h>
14069#endif
14070#if STDC_HEADERS
14071# include <stdlib.h>
14072# include <stddef.h>
14073#endif
14074main() {
14075  char buf[10];
14076  strcpy(buf, "abcdefghi");
14077  mch_memmove(buf, buf + 2, 3);
14078  if (strncmp(buf, "ababcf", 6))
14079    exit(1);
14080  strcpy(buf, "abcdefghi");
14081  mch_memmove(buf + 2, buf, 3);
14082  if (strncmp(buf, "cdedef", 6))
14083    exit(1);
14084  exit(0); /* libc version works properly.  */
14085}'
14086
14087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
14088$as_echo_n "checking whether memmove handles overlaps... " >&6; }
14089if ${vim_cv_memmove_handles_overlap+:} false; then :
14090  $as_echo_n "(cached) " >&6
14091else
14092
14093    if test "$cross_compiling" = yes; then :
14094
14095	as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
14096
14097else
14098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14099/* end confdefs.h.  */
14100#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
14101_ACEOF
14102if ac_fn_c_try_run "$LINENO"; then :
14103
14104	vim_cv_memmove_handles_overlap=yes
14105
14106else
14107
14108	vim_cv_memmove_handles_overlap=no
14109
14110fi
14111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14112  conftest.$ac_objext conftest.beam conftest.$ac_ext
14113fi
14114
14115
14116fi
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
14118$as_echo "$vim_cv_memmove_handles_overlap" >&6; }
14119
14120if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
14121  $as_echo "#define USEMEMMOVE 1" >>confdefs.h
14122
14123else
14124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
14125$as_echo_n "checking whether bcopy handles overlaps... " >&6; }
14126if ${vim_cv_bcopy_handles_overlap+:} false; then :
14127  $as_echo_n "(cached) " >&6
14128else
14129
14130      if test "$cross_compiling" = yes; then :
14131
14132	as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
14133
14134else
14135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14136/* end confdefs.h.  */
14137#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
14138_ACEOF
14139if ac_fn_c_try_run "$LINENO"; then :
14140
14141	vim_cv_bcopy_handles_overlap=yes
14142
14143else
14144
14145	vim_cv_bcopy_handles_overlap=no
14146
14147fi
14148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14149  conftest.$ac_objext conftest.beam conftest.$ac_ext
14150fi
14151
14152
14153fi
14154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
14155$as_echo "$vim_cv_bcopy_handles_overlap" >&6; }
14156
14157  if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
14158    $as_echo "#define USEBCOPY 1" >>confdefs.h
14159
14160  else
14161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
14162$as_echo_n "checking whether memcpy handles overlaps... " >&6; }
14163if ${vim_cv_memcpy_handles_overlap+:} false; then :
14164  $as_echo_n "(cached) " >&6
14165else
14166
14167	if test "$cross_compiling" = yes; then :
14168
14169	    as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
14170
14171else
14172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14173/* end confdefs.h.  */
14174#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
14175_ACEOF
14176if ac_fn_c_try_run "$LINENO"; then :
14177
14178	    vim_cv_memcpy_handles_overlap=yes
14179
14180else
14181
14182	    vim_cv_memcpy_handles_overlap=no
14183
14184fi
14185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14186  conftest.$ac_objext conftest.beam conftest.$ac_ext
14187fi
14188
14189
14190fi
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
14192$as_echo "$vim_cv_memcpy_handles_overlap" >&6; }
14193
14194    if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
14195      $as_echo "#define USEMEMCPY 1" >>confdefs.h
14196
14197    fi
14198  fi
14199fi
14200
14201
14202if test "x$with_x" = "xyes"; then
14203  cflags_save=$CFLAGS
14204  libs_save=$LIBS
14205  LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
14206  CFLAGS="$CFLAGS $X_CFLAGS"
14207
14208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
14209$as_echo_n "checking whether X_LOCALE needed... " >&6; }
14210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14211/* end confdefs.h.  */
14212#include <X11/Xlocale.h>
14213int
14214main ()
14215{
14216
14217  ;
14218  return 0;
14219}
14220_ACEOF
14221if ac_fn_c_try_compile "$LINENO"; then :
14222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14223/* end confdefs.h.  */
14224
14225/* Override any GCC internal prototype to avoid an error.
14226   Use char because int might match the return type of a GCC
14227   builtin and then its argument prototype would still apply.  */
14228#ifdef __cplusplus
14229extern "C"
14230#endif
14231char _Xsetlocale ();
14232int
14233main ()
14234{
14235return _Xsetlocale ();
14236  ;
14237  return 0;
14238}
14239_ACEOF
14240if ac_fn_c_try_link "$LINENO"; then :
14241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14242$as_echo "yes" >&6; }
14243	      $as_echo "#define X_LOCALE 1" >>confdefs.h
14244
14245else
14246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14247$as_echo "no" >&6; }
14248fi
14249rm -f core conftest.err conftest.$ac_objext \
14250    conftest$ac_exeext conftest.$ac_ext
14251else
14252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14253$as_echo "no" >&6; }
14254fi
14255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14256
14257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
14258$as_echo_n "checking whether Xutf8SetWMProperties() can be used... " >&6; }
14259  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14260/* end confdefs.h.  */
14261
14262/* Override any GCC internal prototype to avoid an error.
14263   Use char because int might match the return type of a GCC
14264   builtin and then its argument prototype would still apply.  */
14265#ifdef __cplusplus
14266extern "C"
14267#endif
14268char Xutf8SetWMProperties ();
14269int
14270main ()
14271{
14272return Xutf8SetWMProperties ();
14273  ;
14274  return 0;
14275}
14276_ACEOF
14277if ac_fn_c_try_link "$LINENO"; then :
14278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14279$as_echo "yes" >&6; }
14280	      $as_echo "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
14281
14282else
14283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14284$as_echo "no" >&6; }
14285fi
14286rm -f core conftest.err conftest.$ac_objext \
14287    conftest$ac_exeext conftest.$ac_ext
14288
14289  CFLAGS=$cflags_save
14290  LIBS=$libs_save
14291fi
14292
14293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
14294$as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
14295if ${ac_cv_lib_xpg4__xpg4_setrunelocale+:} false; then :
14296  $as_echo_n "(cached) " >&6
14297else
14298  ac_check_lib_save_LIBS=$LIBS
14299LIBS="-lxpg4  $LIBS"
14300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14301/* end confdefs.h.  */
14302
14303/* Override any GCC internal prototype to avoid an error.
14304   Use char because int might match the return type of a GCC
14305   builtin and then its argument prototype would still apply.  */
14306#ifdef __cplusplus
14307extern "C"
14308#endif
14309char _xpg4_setrunelocale ();
14310int
14311main ()
14312{
14313return _xpg4_setrunelocale ();
14314  ;
14315  return 0;
14316}
14317_ACEOF
14318if ac_fn_c_try_link "$LINENO"; then :
14319  ac_cv_lib_xpg4__xpg4_setrunelocale=yes
14320else
14321  ac_cv_lib_xpg4__xpg4_setrunelocale=no
14322fi
14323rm -f core conftest.err conftest.$ac_objext \
14324    conftest$ac_exeext conftest.$ac_ext
14325LIBS=$ac_check_lib_save_LIBS
14326fi
14327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
14328$as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
14329if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes; then :
14330  LIBS="$LIBS -lxpg4"
14331fi
14332
14333
14334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
14335$as_echo_n "checking how to create tags... " >&6; }
14336test -f tags && mv tags tags.save
14337if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14338  TAGPRG="ctags -I INIT+ --fields=+S"
14339elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14340  TAGPRG="exctags -I INIT+ --fields=+S"
14341elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
14342  TAGPRG="exuberant-ctags -I INIT+ --fields=+S"
14343else
14344  TAGPRG="ctags"
14345  (eval etags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
14346  (eval etags -c   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
14347  (eval ctags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
14348  (eval ctags -t   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
14349  (eval ctags -ts  /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
14350  (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
14351  (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
14352fi
14353test -f tags.save && mv tags.save tags
14354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
14355$as_echo "$TAGPRG" >&6; }
14356
14357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
14358$as_echo_n "checking how to run man with a section nr... " >&6; }
14359MANDEF="man"
14360(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
14361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
14362$as_echo "$MANDEF" >&6; }
14363if test "$MANDEF" = "man -s"; then
14364  $as_echo "#define USEMAN_S 1" >>confdefs.h
14365
14366fi
14367
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
14369$as_echo_n "checking --disable-nls argument... " >&6; }
14370# Check whether --enable-nls was given.
14371if test "${enable_nls+set}" = set; then :
14372  enableval=$enable_nls;
14373else
14374  enable_nls="yes"
14375fi
14376
14377
14378if test "$enable_nls" = "yes"; then
14379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14380$as_echo "no" >&6; }
14381
14382  INSTALL_LANGS=install-languages
14383
14384  INSTALL_TOOL_LANGS=install-tool-languages
14385
14386
14387  # Extract the first word of "msgfmt", so it can be a program name with args.
14388set dummy msgfmt; ac_word=$2
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14390$as_echo_n "checking for $ac_word... " >&6; }
14391if ${ac_cv_prog_MSGFMT+:} false; then :
14392  $as_echo_n "(cached) " >&6
14393else
14394  if test -n "$MSGFMT"; then
14395  ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
14396else
14397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14398for as_dir in $PATH
14399do
14400  IFS=$as_save_IFS
14401  test -z "$as_dir" && as_dir=.
14402    for ac_exec_ext in '' $ac_executable_extensions; do
14403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14404    ac_cv_prog_MSGFMT="msgfmt"
14405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14406    break 2
14407  fi
14408done
14409  done
14410IFS=$as_save_IFS
14411
14412fi
14413fi
14414MSGFMT=$ac_cv_prog_MSGFMT
14415if test -n "$MSGFMT"; then
14416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
14417$as_echo "$MSGFMT" >&6; }
14418else
14419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14420$as_echo "no" >&6; }
14421fi
14422
14423
14424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
14425$as_echo_n "checking for NLS... " >&6; }
14426  if test -f po/Makefile; then
14427    have_gettext="no"
14428    if test -n "$MSGFMT"; then
14429      olibs=$LIBS
14430      LIBS=""
14431      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14432/* end confdefs.h.  */
14433#include <libintl.h>
14434int
14435main ()
14436{
14437gettext("Test");
14438  ;
14439  return 0;
14440}
14441_ACEOF
14442if ac_fn_c_try_link "$LINENO"; then :
14443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
14444$as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
14445else
14446  LIBS="-lintl"
14447	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14448/* end confdefs.h.  */
14449#include <libintl.h>
14450int
14451main ()
14452{
14453gettext("Test");
14454  ;
14455  return 0;
14456}
14457_ACEOF
14458if ac_fn_c_try_link "$LINENO"; then :
14459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
14460$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
14461	      LIBS="$olibs -lintl"
14462else
14463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
14464$as_echo "gettext() doesn't work" >&6; };
14465	      LIBS=$olibs
14466fi
14467rm -f core conftest.err conftest.$ac_objext \
14468    conftest$ac_exeext conftest.$ac_ext
14469fi
14470rm -f core conftest.err conftest.$ac_objext \
14471    conftest$ac_exeext conftest.$ac_ext
14472    else
14473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
14474$as_echo "msgfmt not found - disabled" >&6; };
14475    fi
14476    if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then
14477      $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
14478
14479      MAKEMO=yes
14480
14481            for ac_func in bind_textdomain_codeset
14482do :
14483  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
14484if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
14485  cat >>confdefs.h <<_ACEOF
14486#define HAVE_BIND_TEXTDOMAIN_CODESET 1
14487_ACEOF
14488
14489fi
14490done
14491
14492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
14493$as_echo_n "checking for _nl_msg_cat_cntr... " >&6; }
14494      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495/* end confdefs.h.  */
14496#include <libintl.h>
14497		extern int _nl_msg_cat_cntr;
14498int
14499main ()
14500{
14501++_nl_msg_cat_cntr;
14502  ;
14503  return 0;
14504}
14505_ACEOF
14506if ac_fn_c_try_link "$LINENO"; then :
14507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14508$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
14509
14510else
14511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14512$as_echo "no" >&6; }
14513fi
14514rm -f core conftest.err conftest.$ac_objext \
14515    conftest$ac_exeext conftest.$ac_ext
14516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
14517$as_echo_n "checking if msgfmt supports --desktop... " >&6; }
14518      MSGFMT_DESKTOP=
14519      if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
14520	if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
14521	  	  	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5
14522$as_echo "broken" >&6; }
14523	else
14524	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14525$as_echo "yes" >&6; }
14526	  MSGFMT_DESKTOP="gvim.desktop vim.desktop"
14527	fi
14528      else
14529	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14530$as_echo "no" >&6; }
14531      fi
14532
14533    fi
14534  else
14535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
14536$as_echo "no \"po/Makefile\" - disabled" >&6; };
14537  fi
14538else
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14540$as_echo "yes" >&6; }
14541fi
14542
14543ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
14544if test "x$ac_cv_header_dlfcn_h" = xyes; then :
14545  DLL=dlfcn.h
14546else
14547  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
14548if test "x$ac_cv_header_dl_h" = xyes; then :
14549  DLL=dl.h
14550fi
14551
14552
14553fi
14554
14555
14556if test x${DLL} = xdlfcn.h; then
14557
14558$as_echo "#define HAVE_DLFCN_H 1" >>confdefs.h
14559
14560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
14561$as_echo_n "checking for dlopen()... " >&6; }
14562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14563/* end confdefs.h.  */
14564
14565int
14566main ()
14567{
14568
14569		extern void* dlopen();
14570		dlopen();
14571
14572  ;
14573  return 0;
14574}
14575_ACEOF
14576if ac_fn_c_try_link "$LINENO"; then :
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14578$as_echo "yes" >&6; };
14579
14580$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
14581
14582else
14583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14584$as_echo "no" >&6; };
14585	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
14586$as_echo_n "checking for dlopen() in -ldl... " >&6; }
14587	      olibs=$LIBS
14588	      LIBS="$LIBS -ldl"
14589	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590/* end confdefs.h.  */
14591
14592int
14593main ()
14594{
14595
14596				extern void* dlopen();
14597				dlopen();
14598
14599  ;
14600  return 0;
14601}
14602_ACEOF
14603if ac_fn_c_try_link "$LINENO"; then :
14604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14605$as_echo "yes" >&6; };
14606
14607$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
14608
14609else
14610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14611$as_echo "no" >&6; };
14612			  LIBS=$olibs
14613fi
14614rm -f core conftest.err conftest.$ac_objext \
14615    conftest$ac_exeext conftest.$ac_ext
14616fi
14617rm -f core conftest.err conftest.$ac_objext \
14618    conftest$ac_exeext conftest.$ac_ext
14619      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
14620$as_echo_n "checking for dlsym()... " >&6; }
14621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14622/* end confdefs.h.  */
14623
14624int
14625main ()
14626{
14627
14628		extern void* dlsym();
14629		dlsym();
14630
14631  ;
14632  return 0;
14633}
14634_ACEOF
14635if ac_fn_c_try_link "$LINENO"; then :
14636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14637$as_echo "yes" >&6; };
14638
14639$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
14640
14641else
14642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14643$as_echo "no" >&6; };
14644	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
14645$as_echo_n "checking for dlsym() in -ldl... " >&6; }
14646	      olibs=$LIBS
14647	      LIBS="$LIBS -ldl"
14648	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14649/* end confdefs.h.  */
14650
14651int
14652main ()
14653{
14654
14655				extern void* dlsym();
14656				dlsym();
14657
14658  ;
14659  return 0;
14660}
14661_ACEOF
14662if ac_fn_c_try_link "$LINENO"; then :
14663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14664$as_echo "yes" >&6; };
14665
14666$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
14667
14668else
14669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14670$as_echo "no" >&6; };
14671			  LIBS=$olibs
14672fi
14673rm -f core conftest.err conftest.$ac_objext \
14674    conftest$ac_exeext conftest.$ac_ext
14675fi
14676rm -f core conftest.err conftest.$ac_objext \
14677    conftest$ac_exeext conftest.$ac_ext
14678elif test x${DLL} = xdl.h; then
14679
14680$as_echo "#define HAVE_DL_H 1" >>confdefs.h
14681
14682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
14683$as_echo_n "checking for shl_load()... " >&6; }
14684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14685/* end confdefs.h.  */
14686
14687int
14688main ()
14689{
14690
14691		extern void* shl_load();
14692		shl_load();
14693
14694  ;
14695  return 0;
14696}
14697_ACEOF
14698if ac_fn_c_try_link "$LINENO"; then :
14699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14700$as_echo "yes" >&6; };
14701
14702$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
14703
14704else
14705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14706$as_echo "no" >&6; };
14707	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
14708$as_echo_n "checking for shl_load() in -ldld... " >&6; }
14709	  olibs=$LIBS
14710	  LIBS="$LIBS -ldld"
14711	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14712/* end confdefs.h.  */
14713
14714int
14715main ()
14716{
14717
14718			extern void* shl_load();
14719			shl_load();
14720
14721  ;
14722  return 0;
14723}
14724_ACEOF
14725if ac_fn_c_try_link "$LINENO"; then :
14726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14727$as_echo "yes" >&6; };
14728
14729$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
14730
14731else
14732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14733$as_echo "no" >&6; };
14734		  LIBS=$olibs
14735fi
14736rm -f core conftest.err conftest.$ac_objext \
14737    conftest$ac_exeext conftest.$ac_ext
14738fi
14739rm -f core conftest.err conftest.$ac_objext \
14740    conftest$ac_exeext conftest.$ac_ext
14741fi
14742for ac_header in setjmp.h
14743do :
14744  ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
14745if test "x$ac_cv_header_setjmp_h" = xyes; then :
14746  cat >>confdefs.h <<_ACEOF
14747#define HAVE_SETJMP_H 1
14748_ACEOF
14749
14750fi
14751
14752done
14753
14754
14755if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
14756    if echo $LIBS | grep -e '-ldl' >/dev/null; then
14757    LIBS=`echo $LIBS | sed s/-ldl//`
14758    PERL_LIBS="$PERL_LIBS -ldl"
14759  fi
14760fi
14761
14762if test "$MACOS_X" = "yes"; then
14763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
14764$as_echo_n "checking whether we need macOS frameworks... " >&6; }
14765  if test "$GUITYPE" = "CARBONGUI"; then
14766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need Carbon" >&5
14767$as_echo "yes, we need Carbon" >&6; }
14768    LIBS="$LIBS -framework Carbon"
14769  elif test "$MACOS_X_DARWIN" = "yes"; then
14770    if test "$features" = "tiny"; then
14771            OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
14772      OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
14773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
14774$as_echo "yes, we need CoreServices" >&6; }
14775      LIBS="$LIBS -framework CoreServices"
14776    else
14777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
14778$as_echo "yes, we need AppKit" >&6; }
14779      LIBS="$LIBS -framework AppKit"
14780    fi
14781  else
14782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14783$as_echo "no" >&6; }
14784  fi
14785fi
14786if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
14787  LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
14788fi
14789
14790DEPEND_CFLAGS_FILTER=
14791if test "$GCC" = yes; then
14792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
14793$as_echo_n "checking for GCC 3 or later... " >&6; }
14794  gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'`
14795  if test "$gccmajor" -gt "2"; then
14796    DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
14797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14798$as_echo "yes" >&6; }
14799  else
14800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14801$as_echo "no" >&6; }
14802  fi
14803          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
14804$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
14805  if test "$gccmajor" -gt "3"; then
14806    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/'`
14807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14808$as_echo "yes" >&6; }
14809  else
14810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14811$as_echo "no" >&6; }
14812  fi
14813fi
14814
14815
14816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
14817$as_echo_n "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
14818if 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
14819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14820$as_echo "yes" >&6; }
14821  $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14822
14823else
14824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14825$as_echo "no" >&6; }
14826fi
14827
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
14829$as_echo_n "checking linker --as-needed support... " >&6; }
14830LINK_AS_NEEDED=
14831# Check if linker supports --as-needed and --no-as-needed options
14832if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
14833  LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
14834  LINK_AS_NEEDED=yes
14835fi
14836if test "$LINK_AS_NEEDED" = yes; then
14837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14838$as_echo "yes" >&6; }
14839else
14840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14841$as_echo "no" >&6; }
14842fi
14843
14844
14845# IBM z/OS reset CFLAGS for config.mk
14846if test "$zOSUnix" = "yes"; then
14847	CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
14848fi
14849
14850ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
14851
14852cat >confcache <<\_ACEOF
14853# This file is a shell script that caches the results of configure
14854# tests run on this system so they can be shared between configure
14855# scripts and configure runs, see configure's option --config-cache.
14856# It is not useful on other systems.  If it contains results you don't
14857# want to keep, you may remove or edit it.
14858#
14859# config.status only pays attention to the cache file if you give it
14860# the --recheck option to rerun configure.
14861#
14862# `ac_cv_env_foo' variables (set or unset) will be overridden when
14863# loading this file, other *unset* `ac_cv_foo' will be assigned the
14864# following values.
14865
14866_ACEOF
14867
14868# The following way of writing the cache mishandles newlines in values,
14869# but we know of no workaround that is simple, portable, and efficient.
14870# So, we kill variables containing newlines.
14871# Ultrix sh set writes to stderr and can't be redirected directly,
14872# and sets the high bit in the cache file unless we assign to the vars.
14873(
14874  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14875    eval ac_val=\$$ac_var
14876    case $ac_val in #(
14877    *${as_nl}*)
14878      case $ac_var in #(
14879      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14880$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14881      esac
14882      case $ac_var in #(
14883      _ | IFS | as_nl) ;; #(
14884      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14885      *) { eval $ac_var=; unset $ac_var;} ;;
14886      esac ;;
14887    esac
14888  done
14889
14890  (set) 2>&1 |
14891    case $as_nl`(ac_space=' '; set) 2>&1` in #(
14892    *${as_nl}ac_space=\ *)
14893      # `set' does not quote correctly, so add quotes: double-quote
14894      # substitution turns \\\\ into \\, and sed turns \\ into \.
14895      sed -n \
14896	"s/'/'\\\\''/g;
14897	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14898      ;; #(
14899    *)
14900      # `set' quotes correctly as required by POSIX, so do not add quotes.
14901      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14902      ;;
14903    esac |
14904    sort
14905) |
14906  sed '
14907     /^ac_cv_env_/b end
14908     t clear
14909     :clear
14910     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14911     t end
14912     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14913     :end' >>confcache
14914if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14915  if test -w "$cache_file"; then
14916    if test "x$cache_file" != "x/dev/null"; then
14917      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14918$as_echo "$as_me: updating cache $cache_file" >&6;}
14919      if test ! -f "$cache_file" || test -h "$cache_file"; then
14920	cat confcache >"$cache_file"
14921      else
14922        case $cache_file in #(
14923        */* | ?:*)
14924	  mv -f confcache "$cache_file"$$ &&
14925	  mv -f "$cache_file"$$ "$cache_file" ;; #(
14926        *)
14927	  mv -f confcache "$cache_file" ;;
14928	esac
14929      fi
14930    fi
14931  else
14932    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14933$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14934  fi
14935fi
14936rm -f confcache
14937
14938test "x$prefix" = xNONE && prefix=$ac_default_prefix
14939# Let make expand exec_prefix.
14940test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14941
14942DEFS=-DHAVE_CONFIG_H
14943
14944ac_libobjs=
14945ac_ltlibobjs=
14946U=
14947for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14948  # 1. Remove the extension, and $U if already installed.
14949  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14950  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14951  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14952  #    will be set to the directory where LIBOBJS objects are built.
14953  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14954  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14955done
14956LIBOBJS=$ac_libobjs
14957
14958LTLIBOBJS=$ac_ltlibobjs
14959
14960
14961
14962
14963: "${CONFIG_STATUS=./config.status}"
14964ac_write_fail=0
14965ac_clean_files_save=$ac_clean_files
14966ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14967{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14968$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14969as_write_fail=0
14970cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14971#! $SHELL
14972# Generated by $as_me.
14973# Run this file to recreate the current configuration.
14974# Compiler output produced by configure, useful for debugging
14975# configure, is in config.log if it exists.
14976
14977debug=false
14978ac_cs_recheck=false
14979ac_cs_silent=false
14980
14981SHELL=\${CONFIG_SHELL-$SHELL}
14982export SHELL
14983_ASEOF
14984cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14985## -------------------- ##
14986## M4sh Initialization. ##
14987## -------------------- ##
14988
14989# Be more Bourne compatible
14990DUALCASE=1; export DUALCASE # for MKS sh
14991if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14992  emulate sh
14993  NULLCMD=:
14994  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14995  # is contrary to our usage.  Disable this feature.
14996  alias -g '${1+"$@"}'='"$@"'
14997  setopt NO_GLOB_SUBST
14998else
14999  case `(set -o) 2>/dev/null` in #(
15000  *posix*) :
15001    set -o posix ;; #(
15002  *) :
15003     ;;
15004esac
15005fi
15006
15007
15008as_nl='
15009'
15010export as_nl
15011# Printing a long string crashes Solaris 7 /usr/bin/printf.
15012as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15013as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15014as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15015# Prefer a ksh shell builtin over an external printf program on Solaris,
15016# but without wasting forks for bash or zsh.
15017if test -z "$BASH_VERSION$ZSH_VERSION" \
15018    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15019  as_echo='print -r --'
15020  as_echo_n='print -rn --'
15021elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15022  as_echo='printf %s\n'
15023  as_echo_n='printf %s'
15024else
15025  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15026    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15027    as_echo_n='/usr/ucb/echo -n'
15028  else
15029    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15030    as_echo_n_body='eval
15031      arg=$1;
15032      case $arg in #(
15033      *"$as_nl"*)
15034	expr "X$arg" : "X\\(.*\\)$as_nl";
15035	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15036      esac;
15037      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15038    '
15039    export as_echo_n_body
15040    as_echo_n='sh -c $as_echo_n_body as_echo'
15041  fi
15042  export as_echo_body
15043  as_echo='sh -c $as_echo_body as_echo'
15044fi
15045
15046# The user is always right.
15047if test "${PATH_SEPARATOR+set}" != set; then
15048  PATH_SEPARATOR=:
15049  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15050    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15051      PATH_SEPARATOR=';'
15052  }
15053fi
15054
15055
15056# IFS
15057# We need space, tab and new line, in precisely that order.  Quoting is
15058# there to prevent editors from complaining about space-tab.
15059# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15060# splitting by setting IFS to empty value.)
15061IFS=" ""	$as_nl"
15062
15063# Find who we are.  Look in the path if we contain no directory separator.
15064as_myself=
15065case $0 in #((
15066  *[\\/]* ) as_myself=$0 ;;
15067  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15068for as_dir in $PATH
15069do
15070  IFS=$as_save_IFS
15071  test -z "$as_dir" && as_dir=.
15072    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15073  done
15074IFS=$as_save_IFS
15075
15076     ;;
15077esac
15078# We did not find ourselves, most probably we were run as `sh COMMAND'
15079# in which case we are not to be found in the path.
15080if test "x$as_myself" = x; then
15081  as_myself=$0
15082fi
15083if test ! -f "$as_myself"; then
15084  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15085  exit 1
15086fi
15087
15088# Unset variables that we do not need and which cause bugs (e.g. in
15089# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
15090# suppresses any "Segmentation fault" message there.  '((' could
15091# trigger a bug in pdksh 5.2.14.
15092for as_var in BASH_ENV ENV MAIL MAILPATH
15093do eval test x\${$as_var+set} = xset \
15094  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
15095done
15096PS1='$ '
15097PS2='> '
15098PS4='+ '
15099
15100# NLS nuisances.
15101LC_ALL=C
15102export LC_ALL
15103LANGUAGE=C
15104export LANGUAGE
15105
15106# CDPATH.
15107(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15108
15109
15110# as_fn_error STATUS ERROR [LINENO LOG_FD]
15111# ----------------------------------------
15112# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15113# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
15114# script with STATUS, using 1 if that was 0.
15115as_fn_error ()
15116{
15117  as_status=$1; test $as_status -eq 0 && as_status=1
15118  if test "$4"; then
15119    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15120    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
15121  fi
15122  $as_echo "$as_me: error: $2" >&2
15123  as_fn_exit $as_status
15124} # as_fn_error
15125
15126
15127# as_fn_set_status STATUS
15128# -----------------------
15129# Set $? to STATUS, without forking.
15130as_fn_set_status ()
15131{
15132  return $1
15133} # as_fn_set_status
15134
15135# as_fn_exit STATUS
15136# -----------------
15137# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15138as_fn_exit ()
15139{
15140  set +e
15141  as_fn_set_status $1
15142  exit $1
15143} # as_fn_exit
15144
15145# as_fn_unset VAR
15146# ---------------
15147# Portably unset VAR.
15148as_fn_unset ()
15149{
15150  { eval $1=; unset $1;}
15151}
15152as_unset=as_fn_unset
15153# as_fn_append VAR VALUE
15154# ----------------------
15155# Append the text in VALUE to the end of the definition contained in VAR. Take
15156# advantage of any shell optimizations that allow amortized linear growth over
15157# repeated appends, instead of the typical quadratic growth present in naive
15158# implementations.
15159if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15160  eval 'as_fn_append ()
15161  {
15162    eval $1+=\$2
15163  }'
15164else
15165  as_fn_append ()
15166  {
15167    eval $1=\$$1\$2
15168  }
15169fi # as_fn_append
15170
15171# as_fn_arith ARG...
15172# ------------------
15173# Perform arithmetic evaluation on the ARGs, and store the result in the
15174# global $as_val. Take advantage of shells that can avoid forks. The arguments
15175# must be portable across $(()) and expr.
15176if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15177  eval 'as_fn_arith ()
15178  {
15179    as_val=$(( $* ))
15180  }'
15181else
15182  as_fn_arith ()
15183  {
15184    as_val=`expr "$@" || test $? -eq 1`
15185  }
15186fi # as_fn_arith
15187
15188
15189if expr a : '\(a\)' >/dev/null 2>&1 &&
15190   test "X`expr 00001 : '.*\(...\)'`" = X001; then
15191  as_expr=expr
15192else
15193  as_expr=false
15194fi
15195
15196if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15197  as_basename=basename
15198else
15199  as_basename=false
15200fi
15201
15202if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15203  as_dirname=dirname
15204else
15205  as_dirname=false
15206fi
15207
15208as_me=`$as_basename -- "$0" ||
15209$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15210	 X"$0" : 'X\(//\)$' \| \
15211	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
15212$as_echo X/"$0" |
15213    sed '/^.*\/\([^/][^/]*\)\/*$/{
15214	    s//\1/
15215	    q
15216	  }
15217	  /^X\/\(\/\/\)$/{
15218	    s//\1/
15219	    q
15220	  }
15221	  /^X\/\(\/\).*/{
15222	    s//\1/
15223	    q
15224	  }
15225	  s/.*/./; q'`
15226
15227# Avoid depending upon Character Ranges.
15228as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15229as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15230as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15231as_cr_digits='0123456789'
15232as_cr_alnum=$as_cr_Letters$as_cr_digits
15233
15234ECHO_C= ECHO_N= ECHO_T=
15235case `echo -n x` in #(((((
15236-n*)
15237  case `echo 'xy\c'` in
15238  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
15239  xy)  ECHO_C='\c';;
15240  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
15241       ECHO_T='	';;
15242  esac;;
15243*)
15244  ECHO_N='-n';;
15245esac
15246
15247rm -f conf$$ conf$$.exe conf$$.file
15248if test -d conf$$.dir; then
15249  rm -f conf$$.dir/conf$$.file
15250else
15251  rm -f conf$$.dir
15252  mkdir conf$$.dir 2>/dev/null
15253fi
15254if (echo >conf$$.file) 2>/dev/null; then
15255  if ln -s conf$$.file conf$$ 2>/dev/null; then
15256    as_ln_s='ln -s'
15257    # ... but there are two gotchas:
15258    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15259    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15260    # In both cases, we have to default to `cp -pR'.
15261    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15262      as_ln_s='cp -pR'
15263  elif ln conf$$.file conf$$ 2>/dev/null; then
15264    as_ln_s=ln
15265  else
15266    as_ln_s='cp -pR'
15267  fi
15268else
15269  as_ln_s='cp -pR'
15270fi
15271rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15272rmdir conf$$.dir 2>/dev/null
15273
15274
15275# as_fn_mkdir_p
15276# -------------
15277# Create "$as_dir" as a directory, including parents if necessary.
15278as_fn_mkdir_p ()
15279{
15280
15281  case $as_dir in #(
15282  -*) as_dir=./$as_dir;;
15283  esac
15284  test -d "$as_dir" || eval $as_mkdir_p || {
15285    as_dirs=
15286    while :; do
15287      case $as_dir in #(
15288      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15289      *) as_qdir=$as_dir;;
15290      esac
15291      as_dirs="'$as_qdir' $as_dirs"
15292      as_dir=`$as_dirname -- "$as_dir" ||
15293$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15294	 X"$as_dir" : 'X\(//\)[^/]' \| \
15295	 X"$as_dir" : 'X\(//\)$' \| \
15296	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15297$as_echo X"$as_dir" |
15298    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15299	    s//\1/
15300	    q
15301	  }
15302	  /^X\(\/\/\)[^/].*/{
15303	    s//\1/
15304	    q
15305	  }
15306	  /^X\(\/\/\)$/{
15307	    s//\1/
15308	    q
15309	  }
15310	  /^X\(\/\).*/{
15311	    s//\1/
15312	    q
15313	  }
15314	  s/.*/./; q'`
15315      test -d "$as_dir" && break
15316    done
15317    test -z "$as_dirs" || eval "mkdir $as_dirs"
15318  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
15319
15320
15321} # as_fn_mkdir_p
15322if mkdir -p . 2>/dev/null; then
15323  as_mkdir_p='mkdir -p "$as_dir"'
15324else
15325  test -d ./-p && rmdir ./-p
15326  as_mkdir_p=false
15327fi
15328
15329
15330# as_fn_executable_p FILE
15331# -----------------------
15332# Test if FILE is an executable regular file.
15333as_fn_executable_p ()
15334{
15335  test -f "$1" && test -x "$1"
15336} # as_fn_executable_p
15337as_test_x='test -x'
15338as_executable_p=as_fn_executable_p
15339
15340# Sed expression to map a string onto a valid CPP name.
15341as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
15342
15343# Sed expression to map a string onto a valid variable name.
15344as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
15345
15346
15347exec 6>&1
15348## ----------------------------------- ##
15349## Main body of $CONFIG_STATUS script. ##
15350## ----------------------------------- ##
15351_ASEOF
15352test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
15353
15354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15355# Save the log message, to keep $0 and so on meaningful, and to
15356# report actual input values of CONFIG_FILES etc. instead of their
15357# values after options handling.
15358ac_log="
15359This file was extended by $as_me, which was
15360generated by GNU Autoconf 2.69.  Invocation command line was
15361
15362  CONFIG_FILES    = $CONFIG_FILES
15363  CONFIG_HEADERS  = $CONFIG_HEADERS
15364  CONFIG_LINKS    = $CONFIG_LINKS
15365  CONFIG_COMMANDS = $CONFIG_COMMANDS
15366  $ $0 $@
15367
15368on `(hostname || uname -n) 2>/dev/null | sed 1q`
15369"
15370
15371_ACEOF
15372
15373case $ac_config_files in *"
15374"*) set x $ac_config_files; shift; ac_config_files=$*;;
15375esac
15376
15377case $ac_config_headers in *"
15378"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15379esac
15380
15381
15382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15383# Files that config.status was made for.
15384config_files="$ac_config_files"
15385config_headers="$ac_config_headers"
15386
15387_ACEOF
15388
15389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15390ac_cs_usage="\
15391\`$as_me' instantiates files and other configuration actions
15392from templates according to the current configuration.  Unless the files
15393and actions are specified as TAGs, all are instantiated by default.
15394
15395Usage: $0 [OPTION]... [TAG]...
15396
15397  -h, --help       print this help, then exit
15398  -V, --version    print version number and configuration settings, then exit
15399      --config     print configuration, then exit
15400  -q, --quiet, --silent
15401                   do not print progress messages
15402  -d, --debug      don't remove temporary files
15403      --recheck    update $as_me by reconfiguring in the same conditions
15404      --file=FILE[:TEMPLATE]
15405                   instantiate the configuration file FILE
15406      --header=FILE[:TEMPLATE]
15407                   instantiate the configuration header FILE
15408
15409Configuration files:
15410$config_files
15411
15412Configuration headers:
15413$config_headers
15414
15415Report bugs to the package provider."
15416
15417_ACEOF
15418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15419ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
15420ac_cs_version="\\
15421config.status
15422configured by $0, generated by GNU Autoconf 2.69,
15423  with options \\"\$ac_cs_config\\"
15424
15425Copyright (C) 2012 Free Software Foundation, Inc.
15426This config.status script is free software; the Free Software Foundation
15427gives unlimited permission to copy, distribute and modify it."
15428
15429ac_pwd='$ac_pwd'
15430srcdir='$srcdir'
15431AWK='$AWK'
15432test -n "\$AWK" || AWK=awk
15433_ACEOF
15434
15435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15436# The default lists apply if the user does not specify any file.
15437ac_need_defaults=:
15438while test $# != 0
15439do
15440  case $1 in
15441  --*=?*)
15442    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15443    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
15444    ac_shift=:
15445    ;;
15446  --*=)
15447    ac_option=`expr "X$1" : 'X\([^=]*\)='`
15448    ac_optarg=
15449    ac_shift=:
15450    ;;
15451  *)
15452    ac_option=$1
15453    ac_optarg=$2
15454    ac_shift=shift
15455    ;;
15456  esac
15457
15458  case $ac_option in
15459  # Handling of the options.
15460  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15461    ac_cs_recheck=: ;;
15462  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
15463    $as_echo "$ac_cs_version"; exit ;;
15464  --config | --confi | --conf | --con | --co | --c )
15465    $as_echo "$ac_cs_config"; exit ;;
15466  --debug | --debu | --deb | --de | --d | -d )
15467    debug=: ;;
15468  --file | --fil | --fi | --f )
15469    $ac_shift
15470    case $ac_optarg in
15471    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15472    '') as_fn_error $? "missing file argument" ;;
15473    esac
15474    as_fn_append CONFIG_FILES " '$ac_optarg'"
15475    ac_need_defaults=false;;
15476  --header | --heade | --head | --hea )
15477    $ac_shift
15478    case $ac_optarg in
15479    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15480    esac
15481    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
15482    ac_need_defaults=false;;
15483  --he | --h)
15484    # Conflict between --help and --header
15485    as_fn_error $? "ambiguous option: \`$1'
15486Try \`$0 --help' for more information.";;
15487  --help | --hel | -h )
15488    $as_echo "$ac_cs_usage"; exit ;;
15489  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15490  | -silent | --silent | --silen | --sile | --sil | --si | --s)
15491    ac_cs_silent=: ;;
15492
15493  # This is an error.
15494  -*) as_fn_error $? "unrecognized option: \`$1'
15495Try \`$0 --help' for more information." ;;
15496
15497  *) as_fn_append ac_config_targets " $1"
15498     ac_need_defaults=false ;;
15499
15500  esac
15501  shift
15502done
15503
15504ac_configure_extra_args=
15505
15506if $ac_cs_silent; then
15507  exec 6>/dev/null
15508  ac_configure_extra_args="$ac_configure_extra_args --silent"
15509fi
15510
15511_ACEOF
15512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15513if \$ac_cs_recheck; then
15514  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15515  shift
15516  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15517  CONFIG_SHELL='$SHELL'
15518  export CONFIG_SHELL
15519  exec "\$@"
15520fi
15521
15522_ACEOF
15523cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15524exec 5>>auto/config.log
15525{
15526  echo
15527  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15528## Running $as_me. ##
15529_ASBOX
15530  $as_echo "$ac_log"
15531} >&5
15532
15533_ACEOF
15534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15535_ACEOF
15536
15537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15538
15539# Handling of arguments.
15540for ac_config_target in $ac_config_targets
15541do
15542  case $ac_config_target in
15543    "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
15544    "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
15545
15546  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
15547  esac
15548done
15549
15550
15551# If the user did not use the arguments to specify the items to instantiate,
15552# then the envvar interface is used.  Set only those that are not.
15553# We use the long form for the default assignment because of an extremely
15554# bizarre bug on SunOS 4.1.3.
15555if $ac_need_defaults; then
15556  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15557  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15558fi
15559
15560# Have a temporary directory for convenience.  Make it in the build tree
15561# simply because there is no reason against having it here, and in addition,
15562# creating and moving files from /tmp can sometimes cause problems.
15563# Hook for its removal unless debugging.
15564# Note that there is a small window in which the directory will not be cleaned:
15565# after its creation but before its name has been assigned to `$tmp'.
15566$debug ||
15567{
15568  tmp= ac_tmp=
15569  trap 'exit_status=$?
15570  : "${ac_tmp:=$tmp}"
15571  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
15572' 0
15573  trap 'as_fn_exit 1' 1 2 13 15
15574}
15575# Create a (secure) tmp directory for tmp files.
15576
15577{
15578  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
15579  test -d "$tmp"
15580}  ||
15581{
15582  tmp=./conf$$-$RANDOM
15583  (umask 077 && mkdir "$tmp")
15584} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
15585ac_tmp=$tmp
15586
15587# Set up the scripts for CONFIG_FILES section.
15588# No need to generate them if there are no CONFIG_FILES.
15589# This happens for instance with `./config.status config.h'.
15590if test -n "$CONFIG_FILES"; then
15591
15592
15593ac_cr=`echo X | tr X '\015'`
15594# On cygwin, bash can eat \r inside `` if the user requested igncr.
15595# But we know of no other shell where ac_cr would be empty at this
15596# point, so we can use a bashism as a fallback.
15597if test "x$ac_cr" = x; then
15598  eval ac_cr=\$\'\\r\'
15599fi
15600ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15601if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
15602  ac_cs_awk_cr='\\r'
15603else
15604  ac_cs_awk_cr=$ac_cr
15605fi
15606
15607echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
15608_ACEOF
15609
15610
15611{
15612  echo "cat >conf$$subs.awk <<_ACEOF" &&
15613  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15614  echo "_ACEOF"
15615} >conf$$subs.sh ||
15616  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15617ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
15618ac_delim='%!_!# '
15619for ac_last_try in false false false false false :; do
15620  . ./conf$$subs.sh ||
15621    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15622
15623  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15624  if test $ac_delim_n = $ac_delim_num; then
15625    break
15626  elif $ac_last_try; then
15627    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15628  else
15629    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15630  fi
15631done
15632rm -f conf$$subs.sh
15633
15634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15635cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
15636_ACEOF
15637sed -n '
15638h
15639s/^/S["/; s/!.*/"]=/
15640p
15641g
15642s/^[^!]*!//
15643:repl
15644t repl
15645s/'"$ac_delim"'$//
15646t delim
15647:nl
15648h
15649s/\(.\{148\}\)..*/\1/
15650t more1
15651s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15652p
15653n
15654b repl
15655:more1
15656s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15657p
15658g
15659s/.\{148\}//
15660t nl
15661:delim
15662h
15663s/\(.\{148\}\)..*/\1/
15664t more2
15665s/["\\]/\\&/g; s/^/"/; s/$/"/
15666p
15667b
15668:more2
15669s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15670p
15671g
15672s/.\{148\}//
15673t delim
15674' <conf$$subs.awk | sed '
15675/^[^""]/{
15676  N
15677  s/\n//
15678}
15679' >>$CONFIG_STATUS || ac_write_fail=1
15680rm -f conf$$subs.awk
15681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15682_ACAWK
15683cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
15684  for (key in S) S_is_set[key] = 1
15685  FS = ""
15686
15687}
15688{
15689  line = $ 0
15690  nfields = split(line, field, "@")
15691  substed = 0
15692  len = length(field[1])
15693  for (i = 2; i < nfields; i++) {
15694    key = field[i]
15695    keylen = length(key)
15696    if (S_is_set[key]) {
15697      value = S[key]
15698      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15699      len += length(value) + length(field[++i])
15700      substed = 1
15701    } else
15702      len += 1 + keylen
15703  }
15704
15705  print line
15706}
15707
15708_ACAWK
15709_ACEOF
15710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15711if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15712  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15713else
15714  cat
15715fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
15716  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
15717_ACEOF
15718
15719# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15720# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
15721# trailing colons and then remove the whole line if VPATH becomes empty
15722# (actually we leave an empty line to preserve line numbers).
15723if test "x$srcdir" = x.; then
15724  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
15725h
15726s///
15727s/^/:/
15728s/[	 ]*$/:/
15729s/:\$(srcdir):/:/g
15730s/:\${srcdir}:/:/g
15731s/:@srcdir@:/:/g
15732s/^:*//
15733s/:*$//
15734x
15735s/\(=[	 ]*\).*/\1/
15736G
15737s/\n//
15738s/^[^=]*=[	 ]*$//
15739}'
15740fi
15741
15742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15743fi # test -n "$CONFIG_FILES"
15744
15745# Set up the scripts for CONFIG_HEADERS section.
15746# No need to generate them if there are no CONFIG_HEADERS.
15747# This happens for instance with `./config.status Makefile'.
15748if test -n "$CONFIG_HEADERS"; then
15749cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15750BEGIN {
15751_ACEOF
15752
15753# Transform confdefs.h into an awk script `defines.awk', embedded as
15754# here-document in config.status, that substitutes the proper values into
15755# config.h.in to produce config.h.
15756
15757# Create a delimiter string that does not exist in confdefs.h, to ease
15758# handling of long lines.
15759ac_delim='%!_!# '
15760for ac_last_try in false false :; do
15761  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15762  if test -z "$ac_tt"; then
15763    break
15764  elif $ac_last_try; then
15765    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15766  else
15767    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15768  fi
15769done
15770
15771# For the awk script, D is an array of macro values keyed by name,
15772# likewise P contains macro parameters if any.  Preserve backslash
15773# newline sequences.
15774
15775ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15776sed -n '
15777s/.\{148\}/&'"$ac_delim"'/g
15778t rset
15779:rset
15780s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
15781t def
15782d
15783:def
15784s/\\$//
15785t bsnl
15786s/["\\]/\\&/g
15787s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15788D["\1"]=" \3"/p
15789s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
15790d
15791:bsnl
15792s/["\\]/\\&/g
15793s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15794D["\1"]=" \3\\\\\\n"\\/p
15795t cont
15796s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15797t cont
15798d
15799:cont
15800n
15801s/.\{148\}/&'"$ac_delim"'/g
15802t clear
15803:clear
15804s/\\$//
15805t bsnlc
15806s/["\\]/\\&/g; s/^/"/; s/$/"/p
15807d
15808:bsnlc
15809s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15810b cont
15811' <confdefs.h | sed '
15812s/'"$ac_delim"'/"\\\
15813"/g' >>$CONFIG_STATUS || ac_write_fail=1
15814
15815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15816  for (key in D) D_is_set[key] = 1
15817  FS = ""
15818}
15819/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15820  line = \$ 0
15821  split(line, arg, " ")
15822  if (arg[1] == "#") {
15823    defundef = arg[2]
15824    mac1 = arg[3]
15825  } else {
15826    defundef = substr(arg[1], 2)
15827    mac1 = arg[2]
15828  }
15829  split(mac1, mac2, "(") #)
15830  macro = mac2[1]
15831  prefix = substr(line, 1, index(line, defundef) - 1)
15832  if (D_is_set[macro]) {
15833    # Preserve the white space surrounding the "#".
15834    print prefix "define", macro P[macro] D[macro]
15835    next
15836  } else {
15837    # Replace #undef with comments.  This is necessary, for example,
15838    # in the case of _POSIX_SOURCE, which is predefined and required
15839    # on some systems where configure will not decide to define it.
15840    if (defundef == "undef") {
15841      print "/*", prefix defundef, macro, "*/"
15842      next
15843    }
15844  }
15845}
15846{ print }
15847_ACAWK
15848_ACEOF
15849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15850  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15851fi # test -n "$CONFIG_HEADERS"
15852
15853
15854eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
15855shift
15856for ac_tag
15857do
15858  case $ac_tag in
15859  :[FHLC]) ac_mode=$ac_tag; continue;;
15860  esac
15861  case $ac_mode$ac_tag in
15862  :[FHL]*:*);;
15863  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15864  :[FH]-) ac_tag=-:-;;
15865  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15866  esac
15867  ac_save_IFS=$IFS
15868  IFS=:
15869  set x $ac_tag
15870  IFS=$ac_save_IFS
15871  shift
15872  ac_file=$1
15873  shift
15874
15875  case $ac_mode in
15876  :L) ac_source=$1;;
15877  :[FH])
15878    ac_file_inputs=
15879    for ac_f
15880    do
15881      case $ac_f in
15882      -) ac_f="$ac_tmp/stdin";;
15883      *) # Look for the file first in the build tree, then in the source tree
15884	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
15885	 # because $ac_f cannot contain `:'.
15886	 test -f "$ac_f" ||
15887	   case $ac_f in
15888	   [\\/$]*) false;;
15889	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15890	   esac ||
15891	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15892      esac
15893      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15894      as_fn_append ac_file_inputs " '$ac_f'"
15895    done
15896
15897    # Let's still pretend it is `configure' which instantiates (i.e., don't
15898    # use $as_me), people would be surprised to read:
15899    #    /* config.h.  Generated by config.status.  */
15900    configure_input='Generated from '`
15901	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15902	`' by configure.'
15903    if test x"$ac_file" != x-; then
15904      configure_input="$ac_file.  $configure_input"
15905      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15906$as_echo "$as_me: creating $ac_file" >&6;}
15907    fi
15908    # Neutralize special characters interpreted by sed in replacement strings.
15909    case $configure_input in #(
15910    *\&* | *\|* | *\\* )
15911       ac_sed_conf_input=`$as_echo "$configure_input" |
15912       sed 's/[\\\\&|]/\\\\&/g'`;; #(
15913    *) ac_sed_conf_input=$configure_input;;
15914    esac
15915
15916    case $ac_tag in
15917    *:-:* | *:-) cat >"$ac_tmp/stdin" \
15918      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15919    esac
15920    ;;
15921  esac
15922
15923  ac_dir=`$as_dirname -- "$ac_file" ||
15924$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15925	 X"$ac_file" : 'X\(//\)[^/]' \| \
15926	 X"$ac_file" : 'X\(//\)$' \| \
15927	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15928$as_echo X"$ac_file" |
15929    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15930	    s//\1/
15931	    q
15932	  }
15933	  /^X\(\/\/\)[^/].*/{
15934	    s//\1/
15935	    q
15936	  }
15937	  /^X\(\/\/\)$/{
15938	    s//\1/
15939	    q
15940	  }
15941	  /^X\(\/\).*/{
15942	    s//\1/
15943	    q
15944	  }
15945	  s/.*/./; q'`
15946  as_dir="$ac_dir"; as_fn_mkdir_p
15947  ac_builddir=.
15948
15949case "$ac_dir" in
15950.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15951*)
15952  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15953  # A ".." for each directory in $ac_dir_suffix.
15954  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15955  case $ac_top_builddir_sub in
15956  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15957  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15958  esac ;;
15959esac
15960ac_abs_top_builddir=$ac_pwd
15961ac_abs_builddir=$ac_pwd$ac_dir_suffix
15962# for backward compatibility:
15963ac_top_builddir=$ac_top_build_prefix
15964
15965case $srcdir in
15966  .)  # We are building in place.
15967    ac_srcdir=.
15968    ac_top_srcdir=$ac_top_builddir_sub
15969    ac_abs_top_srcdir=$ac_pwd ;;
15970  [\\/]* | ?:[\\/]* )  # Absolute name.
15971    ac_srcdir=$srcdir$ac_dir_suffix;
15972    ac_top_srcdir=$srcdir
15973    ac_abs_top_srcdir=$srcdir ;;
15974  *) # Relative name.
15975    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15976    ac_top_srcdir=$ac_top_build_prefix$srcdir
15977    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15978esac
15979ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15980
15981
15982  case $ac_mode in
15983  :F)
15984  #
15985  # CONFIG_FILE
15986  #
15987
15988_ACEOF
15989
15990cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15991# If the template does not know about datarootdir, expand it.
15992# FIXME: This hack should be removed a few years after 2.60.
15993ac_datarootdir_hack=; ac_datarootdir_seen=
15994ac_sed_dataroot='
15995/datarootdir/ {
15996  p
15997  q
15998}
15999/@datadir@/p
16000/@docdir@/p
16001/@infodir@/p
16002/@localedir@/p
16003/@mandir@/p'
16004case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
16005*datarootdir*) ac_datarootdir_seen=yes;;
16006*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
16007  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16008$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
16009_ACEOF
16010cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16011  ac_datarootdir_hack='
16012  s&@datadir@&$datadir&g
16013  s&@docdir@&$docdir&g
16014  s&@infodir@&$infodir&g
16015  s&@localedir@&$localedir&g
16016  s&@mandir@&$mandir&g
16017  s&\\\${datarootdir}&$datarootdir&g' ;;
16018esac
16019_ACEOF
16020
16021# Neutralize VPATH when `$srcdir' = `.'.
16022# Shell code in configure.ac might set extrasub.
16023# FIXME: do we really want to maintain this feature?
16024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16025ac_sed_extra="$ac_vpsub
16026$extrasub
16027_ACEOF
16028cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16029:t
16030/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16031s|@configure_input@|$ac_sed_conf_input|;t t
16032s&@top_builddir@&$ac_top_builddir_sub&;t t
16033s&@top_build_prefix@&$ac_top_build_prefix&;t t
16034s&@srcdir@&$ac_srcdir&;t t
16035s&@abs_srcdir@&$ac_abs_srcdir&;t t
16036s&@top_srcdir@&$ac_top_srcdir&;t t
16037s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16038s&@builddir@&$ac_builddir&;t t
16039s&@abs_builddir@&$ac_abs_builddir&;t t
16040s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16041$ac_datarootdir_hack
16042"
16043eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16044  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16045
16046test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16047  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16048  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
16049      "$ac_tmp/out"`; test -z "$ac_out"; } &&
16050  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16051which seems to be undefined.  Please make sure it is defined" >&5
16052$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
16053which seems to be undefined.  Please make sure it is defined" >&2;}
16054
16055  rm -f "$ac_tmp/stdin"
16056  case $ac_file in
16057  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16058  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
16059  esac \
16060  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16061 ;;
16062  :H)
16063  #
16064  # CONFIG_HEADER
16065  #
16066  if test x"$ac_file" != x-; then
16067    {
16068      $as_echo "/* $configure_input  */" \
16069      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16070    } >"$ac_tmp/config.h" \
16071      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
16072    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
16073      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16074$as_echo "$as_me: $ac_file is unchanged" >&6;}
16075    else
16076      rm -f "$ac_file"
16077      mv "$ac_tmp/config.h" "$ac_file" \
16078	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
16079    fi
16080  else
16081    $as_echo "/* $configure_input  */" \
16082      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
16083      || as_fn_error $? "could not create -" "$LINENO" 5
16084  fi
16085 ;;
16086
16087
16088  esac
16089
16090done # for ac_tag
16091
16092
16093as_fn_exit 0
16094_ACEOF
16095ac_clean_files=$ac_clean_files_save
16096
16097test $ac_write_fail = 0 ||
16098  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
16099
16100
16101# configure is writing to config.log, and then calls config.status.
16102# config.status does its own redirection, appending to config.log.
16103# Unfortunately, on DOS this fails, as config.log is still kept open
16104# by configure, so config.status won't be able to write to it; its
16105# output is simply discarded.  So we exec the FD to /dev/null,
16106# effectively closing config.log, so it can be properly (re)opened and
16107# appended to by config.status.  When coming back to configure, we
16108# need to make the FD available again.
16109if test "$no_create" != yes; then
16110  ac_cs_success=:
16111  ac_config_status_args=
16112  test "$silent" = yes &&
16113    ac_config_status_args="$ac_config_status_args --quiet"
16114  exec 5>/dev/null
16115  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
16116  exec 5>>auto/config.log
16117  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16118  # would make configure fail if this is the last instruction.
16119  $ac_cs_success || as_fn_exit 1
16120fi
16121if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16122  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16123$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
16124fi
16125
16126
16127