xref: /vim-8.2.3635/src/auto/configure (revision bc2eada5)
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
626MAKEMO
627MSGFMT
628INSTALL_TOOL_LANGS
629INSTALL_LANGS
630TAGPRG
631HANGULIN_OBJ
632HANGULIN_SRC
633GUI_X_LIBS
634GUITYPE
635GUI_LIB_LOC
636GUI_INC_LOC
637NARROW_PROTO
638MOTIF_LIBNAME
639GRESOURCE_OBJ
640GRESOURCE_SRC
641UPDATE_DESKTOP_DATABASE
642GTK_UPDATE_ICON_CACHE
643GLIB_COMPILE_RESOURCES
644GNOME_INCLUDEDIR
645GNOME_LIBDIR
646GNOME_LIBS
647GTK_LIBNAME
648GTK_LIBS
649GTK_CFLAGS
650PKG_CONFIG
651X_LIB
652X_EXTRA_LIBS
653X_LIBS
654X_PRE_LIBS
655X_CFLAGS
656XMKMF
657xmkmfpath
658CHANNEL_OBJ
659CHANNEL_SRC
660NETBEANS_OBJ
661NETBEANS_SRC
662WORKSHOP_OBJ
663WORKSHOP_SRC
664RUBY_LIBS
665RUBY_CFLAGS
666RUBY_PRO
667RUBY_OBJ
668RUBY_SRC
669vi_cv_path_ruby
670TCL_LIBS
671TCL_CFLAGS
672TCL_PRO
673TCL_OBJ
674TCL_SRC
675vi_cv_path_tcl
676PYTHON3_OBJ
677PYTHON3_SRC
678PYTHON3_CFLAGS
679PYTHON3_LIBS
680PYTHON3_CONFDIR
681vi_cv_path_python3
682PYTHON_OBJ
683PYTHON_SRC
684PYTHON_CFLAGS
685PYTHON_GETPATH_CFLAGS
686PYTHON_LIBS
687PYTHON_CONFDIR
688vi_cv_path_python
689PERL_LIBS
690PERL_CFLAGS
691PERL_PRO
692PERL_OBJ
693PERL_SRC
694shrpenv
695vi_cv_perl_xsubpp
696vi_cv_perllib
697vi_cv_path_perl
698MZSCHEME_MZC
699MZSCHEME_EXTRA
700MZSCHEME_CFLAGS
701MZSCHEME_LIBS
702MZSCHEME_PRO
703MZSCHEME_OBJ
704MZSCHEME_SRC
705vi_cv_path_mzscheme
706LUA_CFLAGS
707LUA_LIBS
708LUA_PRO
709LUA_OBJ
710LUA_SRC
711vi_cv_path_plain_lua
712vi_cv_path_luajit
713vi_cv_path_lua
714compiledby
715dogvimdiff
716dovimdiff
717QUOTESED
718line_break
719VIEWNAME
720EXNAME
721VIMNAME
722OS_EXTRA_OBJ
723OS_EXTRA_SRC
724XCODE_SELECT
725CPP_MM
726CROSS_COMPILING
727STRIP
728AWK
729FGREP
730EGREP
731GREP
732CPP
733OBJEXT
734EXEEXT
735ac_ct_CC
736CPPFLAGS
737LDFLAGS
738CFLAGS
739CC
740SET_MAKE
741target_alias
742host_alias
743build_alias
744LIBS
745ECHO_T
746ECHO_N
747ECHO_C
748DEFS
749mandir
750localedir
751libdir
752psdir
753pdfdir
754dvidir
755htmldir
756infodir
757docdir
758oldincludedir
759includedir
760runstatedir
761localstatedir
762sharedstatedir
763sysconfdir
764datadir
765datarootdir
766libexecdir
767sbindir
768bindir
769program_transform_name
770prefix
771exec_prefix
772PACKAGE_URL
773PACKAGE_BUGREPORT
774PACKAGE_STRING
775PACKAGE_VERSION
776PACKAGE_TARNAME
777PACKAGE_NAME
778PATH_SEPARATOR
779SHELL'
780ac_subst_files=''
781ac_user_opts='
782enable_option_checking
783enable_fail_if_missing
784enable_darwin
785with_mac_arch
786with_developer_dir
787with_local_dir
788with_vim_name
789with_ex_name
790with_view_name
791with_global_runtime
792with_modified_by
793enable_smack
794enable_selinux
795with_features
796with_compiledby
797enable_xsmp
798enable_xsmp_interact
799enable_luainterp
800with_lua_prefix
801with_luajit
802enable_mzschemeinterp
803with_plthome
804enable_perlinterp
805enable_pythoninterp
806with_python_config_dir
807enable_python3interp
808with_python3_config_dir
809enable_tclinterp
810with_tclsh
811enable_rubyinterp
812with_ruby_command
813enable_cscope
814enable_workshop
815enable_netbeans
816enable_channel
817enable_multibyte
818enable_hangulinput
819enable_xim
820enable_fontset
821with_x
822enable_gui
823enable_gtk2_check
824enable_gnome_check
825enable_gtk3_check
826enable_motif_check
827enable_athena_check
828enable_nextaw_check
829enable_carbon_check
830enable_gtktest
831with_gnome_includes
832with_gnome_libs
833with_gnome
834enable_icon_cache_update
835enable_desktop_database_update
836with_motif_lib
837with_tlib
838enable_largefile
839enable_acl
840enable_gpm
841enable_sysmouse
842enable_nls
843'
844      ac_precious_vars='build_alias
845host_alias
846target_alias
847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
852CPP
853XMKMF'
854
855
856# Initialize some variables set by options.
857ac_init_help=
858ac_init_version=false
859ac_unrecognized_opts=
860ac_unrecognized_sep=
861# The variables have the same names as the options, with
862# dashes changed to underlines.
863cache_file=/dev/null
864exec_prefix=NONE
865no_create=
866no_recursion=
867prefix=NONE
868program_prefix=NONE
869program_suffix=NONE
870program_transform_name=s,x,x,
871silent=
872site=
873srcdir=
874verbose=
875x_includes=NONE
876x_libraries=NONE
877
878# Installation directory options.
879# These are left unexpanded so users can "make install exec_prefix=/foo"
880# and all the variables that are supposed to be based on exec_prefix
881# by default will actually change.
882# Use braces instead of parens because sh, perl, etc. also accept them.
883# (The list follows the same order as the GNU Coding Standards.)
884bindir='${exec_prefix}/bin'
885sbindir='${exec_prefix}/sbin'
886libexecdir='${exec_prefix}/libexec'
887datarootdir='${prefix}/share'
888datadir='${datarootdir}'
889sysconfdir='${prefix}/etc'
890sharedstatedir='${prefix}/com'
891localstatedir='${prefix}/var'
892runstatedir='${localstatedir}/run'
893includedir='${prefix}/include'
894oldincludedir='/usr/include'
895docdir='${datarootdir}/doc/${PACKAGE}'
896infodir='${datarootdir}/info'
897htmldir='${docdir}'
898dvidir='${docdir}'
899pdfdir='${docdir}'
900psdir='${docdir}'
901libdir='${exec_prefix}/lib'
902localedir='${datarootdir}/locale'
903mandir='${datarootdir}/man'
904
905ac_prev=
906ac_dashdash=
907for ac_option
908do
909  # If the previous option needs an argument, assign it.
910  if test -n "$ac_prev"; then
911    eval $ac_prev=\$ac_option
912    ac_prev=
913    continue
914  fi
915
916  case $ac_option in
917  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918  *=)   ac_optarg= ;;
919  *)    ac_optarg=yes ;;
920  esac
921
922  # Accept the important Cygnus configure options, so we can diagnose typos.
923
924  case $ac_dashdash$ac_option in
925  --)
926    ac_dashdash=yes ;;
927
928  -bindir | --bindir | --bindi | --bind | --bin | --bi)
929    ac_prev=bindir ;;
930  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
931    bindir=$ac_optarg ;;
932
933  -build | --build | --buil | --bui | --bu)
934    ac_prev=build_alias ;;
935  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
936    build_alias=$ac_optarg ;;
937
938  -cache-file | --cache-file | --cache-fil | --cache-fi \
939  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
940    ac_prev=cache_file ;;
941  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
942  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
943    cache_file=$ac_optarg ;;
944
945  --config-cache | -C)
946    cache_file=config.cache ;;
947
948  -datadir | --datadir | --datadi | --datad)
949    ac_prev=datadir ;;
950  -datadir=* | --datadir=* | --datadi=* | --datad=*)
951    datadir=$ac_optarg ;;
952
953  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
954  | --dataroo | --dataro | --datar)
955    ac_prev=datarootdir ;;
956  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
957  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
958    datarootdir=$ac_optarg ;;
959
960  -disable-* | --disable-*)
961    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
962    # Reject names that are not valid shell variable names.
963    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
964      as_fn_error $? "invalid feature name: $ac_useropt"
965    ac_useropt_orig=$ac_useropt
966    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967    case $ac_user_opts in
968      *"
969"enable_$ac_useropt"
970"*) ;;
971      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
972	 ac_unrecognized_sep=', ';;
973    esac
974    eval enable_$ac_useropt=no ;;
975
976  -docdir | --docdir | --docdi | --doc | --do)
977    ac_prev=docdir ;;
978  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
979    docdir=$ac_optarg ;;
980
981  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
982    ac_prev=dvidir ;;
983  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
984    dvidir=$ac_optarg ;;
985
986  -enable-* | --enable-*)
987    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
988    # Reject names that are not valid shell variable names.
989    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
990      as_fn_error $? "invalid feature name: $ac_useropt"
991    ac_useropt_orig=$ac_useropt
992    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993    case $ac_user_opts in
994      *"
995"enable_$ac_useropt"
996"*) ;;
997      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
998	 ac_unrecognized_sep=', ';;
999    esac
1000    eval enable_$ac_useropt=\$ac_optarg ;;
1001
1002  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1003  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1004  | --exec | --exe | --ex)
1005    ac_prev=exec_prefix ;;
1006  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1007  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1008  | --exec=* | --exe=* | --ex=*)
1009    exec_prefix=$ac_optarg ;;
1010
1011  -gas | --gas | --ga | --g)
1012    # Obsolete; use --with-gas.
1013    with_gas=yes ;;
1014
1015  -help | --help | --hel | --he | -h)
1016    ac_init_help=long ;;
1017  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1018    ac_init_help=recursive ;;
1019  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1020    ac_init_help=short ;;
1021
1022  -host | --host | --hos | --ho)
1023    ac_prev=host_alias ;;
1024  -host=* | --host=* | --hos=* | --ho=*)
1025    host_alias=$ac_optarg ;;
1026
1027  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1028    ac_prev=htmldir ;;
1029  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1030  | --ht=*)
1031    htmldir=$ac_optarg ;;
1032
1033  -includedir | --includedir | --includedi | --included | --include \
1034  | --includ | --inclu | --incl | --inc)
1035    ac_prev=includedir ;;
1036  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1037  | --includ=* | --inclu=* | --incl=* | --inc=*)
1038    includedir=$ac_optarg ;;
1039
1040  -infodir | --infodir | --infodi | --infod | --info | --inf)
1041    ac_prev=infodir ;;
1042  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1043    infodir=$ac_optarg ;;
1044
1045  -libdir | --libdir | --libdi | --libd)
1046    ac_prev=libdir ;;
1047  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1048    libdir=$ac_optarg ;;
1049
1050  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1051  | --libexe | --libex | --libe)
1052    ac_prev=libexecdir ;;
1053  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1054  | --libexe=* | --libex=* | --libe=*)
1055    libexecdir=$ac_optarg ;;
1056
1057  -localedir | --localedir | --localedi | --localed | --locale)
1058    ac_prev=localedir ;;
1059  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1060    localedir=$ac_optarg ;;
1061
1062  -localstatedir | --localstatedir | --localstatedi | --localstated \
1063  | --localstate | --localstat | --localsta | --localst | --locals)
1064    ac_prev=localstatedir ;;
1065  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1066  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1067    localstatedir=$ac_optarg ;;
1068
1069  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1070    ac_prev=mandir ;;
1071  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1072    mandir=$ac_optarg ;;
1073
1074  -nfp | --nfp | --nf)
1075    # Obsolete; use --without-fp.
1076    with_fp=no ;;
1077
1078  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1079  | --no-cr | --no-c | -n)
1080    no_create=yes ;;
1081
1082  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1083  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1084    no_recursion=yes ;;
1085
1086  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1087  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1088  | --oldin | --oldi | --old | --ol | --o)
1089    ac_prev=oldincludedir ;;
1090  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1091  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1092  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1093    oldincludedir=$ac_optarg ;;
1094
1095  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1096    ac_prev=prefix ;;
1097  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1098    prefix=$ac_optarg ;;
1099
1100  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1101  | --program-pre | --program-pr | --program-p)
1102    ac_prev=program_prefix ;;
1103  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1104  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1105    program_prefix=$ac_optarg ;;
1106
1107  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1108  | --program-suf | --program-su | --program-s)
1109    ac_prev=program_suffix ;;
1110  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1111  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1112    program_suffix=$ac_optarg ;;
1113
1114  -program-transform-name | --program-transform-name \
1115  | --program-transform-nam | --program-transform-na \
1116  | --program-transform-n | --program-transform- \
1117  | --program-transform | --program-transfor \
1118  | --program-transfo | --program-transf \
1119  | --program-trans | --program-tran \
1120  | --progr-tra | --program-tr | --program-t)
1121    ac_prev=program_transform_name ;;
1122  -program-transform-name=* | --program-transform-name=* \
1123  | --program-transform-nam=* | --program-transform-na=* \
1124  | --program-transform-n=* | --program-transform-=* \
1125  | --program-transform=* | --program-transfor=* \
1126  | --program-transfo=* | --program-transf=* \
1127  | --program-trans=* | --program-tran=* \
1128  | --progr-tra=* | --program-tr=* | --program-t=*)
1129    program_transform_name=$ac_optarg ;;
1130
1131  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1132    ac_prev=pdfdir ;;
1133  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1134    pdfdir=$ac_optarg ;;
1135
1136  -psdir | --psdir | --psdi | --psd | --ps)
1137    ac_prev=psdir ;;
1138  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1139    psdir=$ac_optarg ;;
1140
1141  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1142  | -silent | --silent | --silen | --sile | --sil)
1143    silent=yes ;;
1144
1145  -runstatedir | --runstatedir | --runstatedi | --runstated \
1146  | --runstate | --runstat | --runsta | --runst | --runs \
1147  | --run | --ru | --r)
1148    ac_prev=runstatedir ;;
1149  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1150  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1151  | --run=* | --ru=* | --r=*)
1152    runstatedir=$ac_optarg ;;
1153
1154  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155    ac_prev=sbindir ;;
1156  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157  | --sbi=* | --sb=*)
1158    sbindir=$ac_optarg ;;
1159
1160  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162  | --sharedst | --shareds | --shared | --share | --shar \
1163  | --sha | --sh)
1164    ac_prev=sharedstatedir ;;
1165  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168  | --sha=* | --sh=*)
1169    sharedstatedir=$ac_optarg ;;
1170
1171  -site | --site | --sit)
1172    ac_prev=site ;;
1173  -site=* | --site=* | --sit=*)
1174    site=$ac_optarg ;;
1175
1176  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177    ac_prev=srcdir ;;
1178  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1179    srcdir=$ac_optarg ;;
1180
1181  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182  | --syscon | --sysco | --sysc | --sys | --sy)
1183    ac_prev=sysconfdir ;;
1184  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1186    sysconfdir=$ac_optarg ;;
1187
1188  -target | --target | --targe | --targ | --tar | --ta | --t)
1189    ac_prev=target_alias ;;
1190  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1191    target_alias=$ac_optarg ;;
1192
1193  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194    verbose=yes ;;
1195
1196  -version | --version | --versio | --versi | --vers | -V)
1197    ac_init_version=: ;;
1198
1199  -with-* | --with-*)
1200    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1201    # Reject names that are not valid shell variable names.
1202    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1203      as_fn_error $? "invalid package name: $ac_useropt"
1204    ac_useropt_orig=$ac_useropt
1205    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206    case $ac_user_opts in
1207      *"
1208"with_$ac_useropt"
1209"*) ;;
1210      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211	 ac_unrecognized_sep=', ';;
1212    esac
1213    eval with_$ac_useropt=\$ac_optarg ;;
1214
1215  -without-* | --without-*)
1216    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1217    # Reject names that are not valid shell variable names.
1218    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1219      as_fn_error $? "invalid package name: $ac_useropt"
1220    ac_useropt_orig=$ac_useropt
1221    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222    case $ac_user_opts in
1223      *"
1224"with_$ac_useropt"
1225"*) ;;
1226      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227	 ac_unrecognized_sep=', ';;
1228    esac
1229    eval with_$ac_useropt=no ;;
1230
1231  --x)
1232    # Obsolete; use --with-x.
1233    with_x=yes ;;
1234
1235  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236  | --x-incl | --x-inc | --x-in | --x-i)
1237    ac_prev=x_includes ;;
1238  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1240    x_includes=$ac_optarg ;;
1241
1242  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244    ac_prev=x_libraries ;;
1245  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1247    x_libraries=$ac_optarg ;;
1248
1249  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1250Try \`$0 --help' for more information"
1251    ;;
1252
1253  *=*)
1254    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255    # Reject names that are not valid shell variable names.
1256    case $ac_envvar in #(
1257      '' | [0-9]* | *[!_$as_cr_alnum]* )
1258      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1259    esac
1260    eval $ac_envvar=\$ac_optarg
1261    export $ac_envvar ;;
1262
1263  *)
1264    # FIXME: should be removed in autoconf 3.0.
1265    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1266    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1267      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1268    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1269    ;;
1270
1271  esac
1272done
1273
1274if test -n "$ac_prev"; then
1275  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1276  as_fn_error $? "missing argument to $ac_option"
1277fi
1278
1279if test -n "$ac_unrecognized_opts"; then
1280  case $enable_option_checking in
1281    no) ;;
1282    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1283    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1284  esac
1285fi
1286
1287# Check all directory arguments for consistency.
1288for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1289		datadir sysconfdir sharedstatedir localstatedir includedir \
1290		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1291		libdir localedir mandir runstatedir
1292do
1293  eval ac_val=\$$ac_var
1294  # Remove trailing slashes.
1295  case $ac_val in
1296    */ )
1297      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1298      eval $ac_var=\$ac_val;;
1299  esac
1300  # Be sure to have absolute directory names.
1301  case $ac_val in
1302    [\\/$]* | ?:[\\/]* )  continue;;
1303    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1304  esac
1305  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1306done
1307
1308# There might be people who depend on the old broken behavior: `$host'
1309# used to hold the argument of --host etc.
1310# FIXME: To remove some day.
1311build=$build_alias
1312host=$host_alias
1313target=$target_alias
1314
1315# FIXME: To remove some day.
1316if test "x$host_alias" != x; then
1317  if test "x$build_alias" = x; then
1318    cross_compiling=maybe
1319  elif test "x$build_alias" != "x$host_alias"; then
1320    cross_compiling=yes
1321  fi
1322fi
1323
1324ac_tool_prefix=
1325test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327test "$silent" = yes && exec 6>/dev/null
1328
1329
1330ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331ac_ls_di=`ls -di .` &&
1332ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1333  as_fn_error $? "working directory cannot be determined"
1334test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1335  as_fn_error $? "pwd does not report name of working directory"
1336
1337
1338# Find the source files, if location was not specified.
1339if test -z "$srcdir"; then
1340  ac_srcdir_defaulted=yes
1341  # Try the directory containing this script, then the parent directory.
1342  ac_confdir=`$as_dirname -- "$as_myself" ||
1343$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1344	 X"$as_myself" : 'X\(//\)[^/]' \| \
1345	 X"$as_myself" : 'X\(//\)$' \| \
1346	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1347$as_echo X"$as_myself" |
1348    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1349	    s//\1/
1350	    q
1351	  }
1352	  /^X\(\/\/\)[^/].*/{
1353	    s//\1/
1354	    q
1355	  }
1356	  /^X\(\/\/\)$/{
1357	    s//\1/
1358	    q
1359	  }
1360	  /^X\(\/\).*/{
1361	    s//\1/
1362	    q
1363	  }
1364	  s/.*/./; q'`
1365  srcdir=$ac_confdir
1366  if test ! -r "$srcdir/$ac_unique_file"; then
1367    srcdir=..
1368  fi
1369else
1370  ac_srcdir_defaulted=no
1371fi
1372if test ! -r "$srcdir/$ac_unique_file"; then
1373  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1374  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1375fi
1376ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1377ac_abs_confdir=`(
1378	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1379	pwd)`
1380# When building in place, set srcdir=.
1381if test "$ac_abs_confdir" = "$ac_pwd"; then
1382  srcdir=.
1383fi
1384# Remove unnecessary trailing slashes from srcdir.
1385# Double slashes in file names in object file debugging info
1386# mess up M-x gdb in Emacs.
1387case $srcdir in
1388*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1389esac
1390for ac_var in $ac_precious_vars; do
1391  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1392  eval ac_env_${ac_var}_value=\$${ac_var}
1393  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1394  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1395done
1396
1397#
1398# Report the --help message.
1399#
1400if test "$ac_init_help" = "long"; then
1401  # Omit some internal or obsolete options to make the list less imposing.
1402  # This message is too long to be a string in the A/UX 3.1 sh.
1403  cat <<_ACEOF
1404\`configure' configures this package to adapt to many kinds of systems.
1405
1406Usage: $0 [OPTION]... [VAR=VALUE]...
1407
1408To assign environment variables (e.g., CC, CFLAGS...), specify them as
1409VAR=VALUE.  See below for descriptions of some of the useful variables.
1410
1411Defaults for the options are specified in brackets.
1412
1413Configuration:
1414  -h, --help              display this help and exit
1415      --help=short        display options specific to this package
1416      --help=recursive    display the short help of all the included packages
1417  -V, --version           display version information and exit
1418  -q, --quiet, --silent   do not print \`checking ...' messages
1419      --cache-file=FILE   cache test results in FILE [disabled]
1420  -C, --config-cache      alias for \`--cache-file=config.cache'
1421  -n, --no-create         do not create output files
1422      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1423
1424Installation directories:
1425  --prefix=PREFIX         install architecture-independent files in PREFIX
1426                          [$ac_default_prefix]
1427  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1428                          [PREFIX]
1429
1430By default, \`make install' will install all the files in
1431\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1432an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1433for instance \`--prefix=\$HOME'.
1434
1435For better control, use the options below.
1436
1437Fine tuning of the installation directories:
1438  --bindir=DIR            user executables [EPREFIX/bin]
1439  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1440  --libexecdir=DIR        program executables [EPREFIX/libexec]
1441  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1442  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1443  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1444  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1445  --libdir=DIR            object code libraries [EPREFIX/lib]
1446  --includedir=DIR        C header files [PREFIX/include]
1447  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1448  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1449  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1450  --infodir=DIR           info documentation [DATAROOTDIR/info]
1451  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1452  --mandir=DIR            man documentation [DATAROOTDIR/man]
1453  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1454  --htmldir=DIR           html documentation [DOCDIR]
1455  --dvidir=DIR            dvi documentation [DOCDIR]
1456  --pdfdir=DIR            pdf documentation [DOCDIR]
1457  --psdir=DIR             ps documentation [DOCDIR]
1458_ACEOF
1459
1460  cat <<\_ACEOF
1461
1462X features:
1463  --x-includes=DIR    X include files are in DIR
1464  --x-libraries=DIR   X library files are in DIR
1465_ACEOF
1466fi
1467
1468if test -n "$ac_init_help"; then
1469
1470  cat <<\_ACEOF
1471
1472Optional Features:
1473  --disable-option-checking  ignore unrecognized --enable/--with options
1474  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1475  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1476  --enable-fail-if-missing    Fail if dependencies on additional features
1477     specified on the command line are missing.
1478  --disable-darwin        Disable Darwin (Mac OS X) support.
1479  --disable-smack	  Do not check for Smack support.
1480  --disable-selinux	  Do not check for SELinux support.
1481  --disable-xsmp          Disable XSMP session management
1482  --disable-xsmp-interact Disable XSMP interaction
1483  --enable-luainterp=OPTS     Include Lua interpreter.  default=no OPTS=no/yes/dynamic
1484  --enable-mzschemeinterp   Include MzScheme interpreter.
1485  --enable-perlinterp=OPTS     Include Perl interpreter.  default=no OPTS=no/yes/dynamic
1486  --enable-pythoninterp=OPTS   Include Python interpreter. default=no OPTS=no/yes/dynamic
1487  --enable-python3interp=OPTS   Include Python3 interpreter. default=no OPTS=no/yes/dynamic
1488  --enable-tclinterp=OPTS      Include Tcl interpreter. default=no OPTS=no/yes/dynamic
1489  --enable-rubyinterp=OPTS     Include Ruby interpreter.  default=no OPTS=no/yes/dynamic
1490  --enable-cscope         Include cscope interface.
1491  --enable-workshop       Include Sun Visual Workshop support.
1492  --disable-netbeans      Disable NetBeans integration support.
1493  --disable-channel      Disable process communication support.
1494  --enable-multibyte      Include multibyte editing support.
1495  --enable-hangulinput    Include Hangul input support.
1496  --enable-xim            Include XIM input support.
1497  --enable-fontset        Include X fontset output support.
1498  --enable-gui=OPTS     X11 GUI default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon
1499  --enable-gtk2-check     If auto-select GUI, check for GTK+ 2 default=yes
1500  --enable-gnome-check    If GTK GUI, check for GNOME default=no
1501  --enable-gtk3-check     If auto-select GUI, check for GTK+ 3 default=yes
1502  --enable-motif-check    If auto-select GUI, check for Motif default=yes
1503  --enable-athena-check   If auto-select GUI, check for Athena default=yes
1504  --enable-nextaw-check   If auto-select GUI, check for neXtaw default=yes
1505  --enable-carbon-check   If auto-select GUI, check for Carbon default=yes
1506  --disable-gtktest       Do not try to compile and run a test GTK program
1507  --disable-icon-cache-update        update disabled
1508  --disable-desktop-database-update  update disabled
1509  --disable-largefile     omit support for large files
1510  --disable-acl           Don't check for ACL support.
1511  --disable-gpm           Don't use gpm (Linux mouse daemon).
1512  --disable-sysmouse    Don't use sysmouse (mouse in *BSD console).
1513  --disable-nls           Don't support NLS (gettext()).
1514
1515Optional Packages:
1516  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1517  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1518  --with-mac-arch=ARCH    current, intel, ppc or both
1519  --with-developer-dir=PATH    use PATH as location for Xcode developer tools
1520  --with-local-dir=PATH   search PATH instead of /usr/local for local libraries.
1521  --without-local-dir     do not search /usr/local for local libraries.
1522  --with-vim-name=NAME    what to call the Vim executable
1523  --with-ex-name=NAME     what to call the Ex executable
1524  --with-view-name=NAME   what to call the View executable
1525  --with-global-runtime=DIR    global runtime directory in 'runtimepath'
1526  --with-modified-by=NAME       name of who modified a release version
1527  --with-features=TYPE    tiny, small, normal, big or huge (default: huge)
1528  --with-compiledby=NAME  name to show in :version message
1529  --with-lua-prefix=PFX   Prefix where Lua is installed.
1530  --with-luajit           Link with LuaJIT instead of Lua.
1531  --with-plthome=PLTHOME   Use PLTHOME.
1532  --with-python-config-dir=PATH  Python's config directory
1533  --with-python3-config-dir=PATH  Python's config directory
1534  --with-tclsh=PATH       which tclsh to use (default: tclsh8.0)
1535  --with-ruby-command=RUBY  name of the Ruby command (default: ruby)
1536  --with-x                use the X Window System
1537  --with-gnome-includes=DIR Specify location of GNOME headers
1538  --with-gnome-libs=DIR   Specify location of GNOME libs
1539  --with-gnome            Specify prefix for GNOME files
1540  --with-motif-lib=STRING   Library for Motif
1541  --with-tlib=library     terminal library to be used
1542
1543Some influential environment variables:
1544  CC          C compiler command
1545  CFLAGS      C compiler flags
1546  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1547              nonstandard directory <lib dir>
1548  LIBS        libraries to pass to the linker, e.g. -l<library>
1549  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1550              you have headers in a nonstandard directory <include dir>
1551  CPP         C preprocessor
1552  XMKMF       Path to xmkmf, Makefile generator for X Window System
1553
1554Use these variables to override the choices made by `configure' or to help
1555it to find libraries and programs with nonstandard names/locations.
1556
1557Report bugs to the package provider.
1558_ACEOF
1559ac_status=$?
1560fi
1561
1562if test "$ac_init_help" = "recursive"; then
1563  # If there are subdirs, report their specific --help.
1564  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1565    test -d "$ac_dir" ||
1566      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1567      continue
1568    ac_builddir=.
1569
1570case "$ac_dir" in
1571.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1572*)
1573  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1574  # A ".." for each directory in $ac_dir_suffix.
1575  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1576  case $ac_top_builddir_sub in
1577  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1578  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1579  esac ;;
1580esac
1581ac_abs_top_builddir=$ac_pwd
1582ac_abs_builddir=$ac_pwd$ac_dir_suffix
1583# for backward compatibility:
1584ac_top_builddir=$ac_top_build_prefix
1585
1586case $srcdir in
1587  .)  # We are building in place.
1588    ac_srcdir=.
1589    ac_top_srcdir=$ac_top_builddir_sub
1590    ac_abs_top_srcdir=$ac_pwd ;;
1591  [\\/]* | ?:[\\/]* )  # Absolute name.
1592    ac_srcdir=$srcdir$ac_dir_suffix;
1593    ac_top_srcdir=$srcdir
1594    ac_abs_top_srcdir=$srcdir ;;
1595  *) # Relative name.
1596    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1597    ac_top_srcdir=$ac_top_build_prefix$srcdir
1598    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1599esac
1600ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1601
1602    cd "$ac_dir" || { ac_status=$?; continue; }
1603    # Check for guested configure.
1604    if test -f "$ac_srcdir/configure.gnu"; then
1605      echo &&
1606      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1607    elif test -f "$ac_srcdir/configure"; then
1608      echo &&
1609      $SHELL "$ac_srcdir/configure" --help=recursive
1610    else
1611      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1612    fi || ac_status=$?
1613    cd "$ac_pwd" || { ac_status=$?; break; }
1614  done
1615fi
1616
1617test -n "$ac_init_help" && exit $ac_status
1618if $ac_init_version; then
1619  cat <<\_ACEOF
1620configure
1621generated by GNU Autoconf 2.69
1622
1623Copyright (C) 2012 Free Software Foundation, Inc.
1624This configure script is free software; the Free Software Foundation
1625gives unlimited permission to copy, distribute and modify it.
1626_ACEOF
1627  exit
1628fi
1629
1630## ------------------------ ##
1631## Autoconf initialization. ##
1632## ------------------------ ##
1633
1634# ac_fn_c_try_compile LINENO
1635# --------------------------
1636# Try to compile conftest.$ac_ext, and return whether this succeeded.
1637ac_fn_c_try_compile ()
1638{
1639  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1640  rm -f conftest.$ac_objext
1641  if { { ac_try="$ac_compile"
1642case "(($ac_try" in
1643  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1644  *) ac_try_echo=$ac_try;;
1645esac
1646eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1647$as_echo "$ac_try_echo"; } >&5
1648  (eval "$ac_compile") 2>conftest.err
1649  ac_status=$?
1650  if test -s conftest.err; then
1651    grep -v '^ *+' conftest.err >conftest.er1
1652    cat conftest.er1 >&5
1653    mv -f conftest.er1 conftest.err
1654  fi
1655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1656  test $ac_status = 0; } && {
1657	 test -z "$ac_c_werror_flag" ||
1658	 test ! -s conftest.err
1659       } && test -s conftest.$ac_objext; then :
1660  ac_retval=0
1661else
1662  $as_echo "$as_me: failed program was:" >&5
1663sed 's/^/| /' conftest.$ac_ext >&5
1664
1665	ac_retval=1
1666fi
1667  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1668  as_fn_set_status $ac_retval
1669
1670} # ac_fn_c_try_compile
1671
1672# ac_fn_c_try_cpp LINENO
1673# ----------------------
1674# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1675ac_fn_c_try_cpp ()
1676{
1677  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1678  if { { ac_try="$ac_cpp conftest.$ac_ext"
1679case "(($ac_try" in
1680  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1681  *) ac_try_echo=$ac_try;;
1682esac
1683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1684$as_echo "$ac_try_echo"; } >&5
1685  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1686  ac_status=$?
1687  if test -s conftest.err; then
1688    grep -v '^ *+' conftest.err >conftest.er1
1689    cat conftest.er1 >&5
1690    mv -f conftest.er1 conftest.err
1691  fi
1692  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1693  test $ac_status = 0; } > conftest.i && {
1694	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1695	 test ! -s conftest.err
1696       }; then :
1697  ac_retval=0
1698else
1699  $as_echo "$as_me: failed program was:" >&5
1700sed 's/^/| /' conftest.$ac_ext >&5
1701
1702    ac_retval=1
1703fi
1704  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1705  as_fn_set_status $ac_retval
1706
1707} # ac_fn_c_try_cpp
1708
1709# ac_fn_c_try_link LINENO
1710# -----------------------
1711# Try to link conftest.$ac_ext, and return whether this succeeded.
1712ac_fn_c_try_link ()
1713{
1714  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1715  rm -f conftest.$ac_objext conftest$ac_exeext
1716  if { { ac_try="$ac_link"
1717case "(($ac_try" in
1718  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1719  *) ac_try_echo=$ac_try;;
1720esac
1721eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1722$as_echo "$ac_try_echo"; } >&5
1723  (eval "$ac_link") 2>conftest.err
1724  ac_status=$?
1725  if test -s conftest.err; then
1726    grep -v '^ *+' conftest.err >conftest.er1
1727    cat conftest.er1 >&5
1728    mv -f conftest.er1 conftest.err
1729  fi
1730  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1731  test $ac_status = 0; } && {
1732	 test -z "$ac_c_werror_flag" ||
1733	 test ! -s conftest.err
1734       } && test -s conftest$ac_exeext && {
1735	 test "$cross_compiling" = yes ||
1736	 test -x conftest$ac_exeext
1737       }; then :
1738  ac_retval=0
1739else
1740  $as_echo "$as_me: failed program was:" >&5
1741sed 's/^/| /' conftest.$ac_ext >&5
1742
1743	ac_retval=1
1744fi
1745  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1746  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1747  # interfere with the next link command; also delete a directory that is
1748  # left behind by Apple's compiler.  We do this before executing the actions.
1749  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1750  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1751  as_fn_set_status $ac_retval
1752
1753} # ac_fn_c_try_link
1754
1755# ac_fn_c_try_run LINENO
1756# ----------------------
1757# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1758# that executables *can* be run.
1759ac_fn_c_try_run ()
1760{
1761  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762  if { { ac_try="$ac_link"
1763case "(($ac_try" in
1764  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765  *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1768$as_echo "$ac_try_echo"; } >&5
1769  (eval "$ac_link") 2>&5
1770  ac_status=$?
1771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1772  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1773  { { case "(($ac_try" in
1774  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775  *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779  (eval "$ac_try") 2>&5
1780  ac_status=$?
1781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782  test $ac_status = 0; }; }; then :
1783  ac_retval=0
1784else
1785  $as_echo "$as_me: program exited with status $ac_status" >&5
1786       $as_echo "$as_me: failed program was:" >&5
1787sed 's/^/| /' conftest.$ac_ext >&5
1788
1789       ac_retval=$ac_status
1790fi
1791  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1792  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1793  as_fn_set_status $ac_retval
1794
1795} # ac_fn_c_try_run
1796
1797# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1798# -------------------------------------------------------
1799# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1800# the include files in INCLUDES and setting the cache variable VAR
1801# accordingly.
1802ac_fn_c_check_header_mongrel ()
1803{
1804  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805  if eval \${$3+:} false; then :
1806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807$as_echo_n "checking for $2... " >&6; }
1808if eval \${$3+:} false; then :
1809  $as_echo_n "(cached) " >&6
1810fi
1811eval ac_res=\$$3
1812	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1813$as_echo "$ac_res" >&6; }
1814else
1815  # Is the header compilable?
1816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1817$as_echo_n "checking $2 usability... " >&6; }
1818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h.  */
1820$4
1821#include <$2>
1822_ACEOF
1823if ac_fn_c_try_compile "$LINENO"; then :
1824  ac_header_compiler=yes
1825else
1826  ac_header_compiler=no
1827fi
1828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1830$as_echo "$ac_header_compiler" >&6; }
1831
1832# Is the header present?
1833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1834$as_echo_n "checking $2 presence... " >&6; }
1835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836/* end confdefs.h.  */
1837#include <$2>
1838_ACEOF
1839if ac_fn_c_try_cpp "$LINENO"; then :
1840  ac_header_preproc=yes
1841else
1842  ac_header_preproc=no
1843fi
1844rm -f conftest.err conftest.i conftest.$ac_ext
1845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1846$as_echo "$ac_header_preproc" >&6; }
1847
1848# So?  What about this header?
1849case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1850  yes:no: )
1851    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1852$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1853    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855    ;;
1856  no:yes:* )
1857    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1858$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1859    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1860$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1861    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1862$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1863    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1864$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&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    ;;
1868esac
1869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1870$as_echo_n "checking for $2... " >&6; }
1871if eval \${$3+:} false; then :
1872  $as_echo_n "(cached) " >&6
1873else
1874  eval "$3=\$ac_header_compiler"
1875fi
1876eval ac_res=\$$3
1877	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
1879fi
1880  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1881
1882} # ac_fn_c_check_header_mongrel
1883
1884# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1885# -------------------------------------------------------
1886# Tests whether HEADER exists and can be compiled using the include files in
1887# INCLUDES, setting the cache variable VAR accordingly.
1888ac_fn_c_check_header_compile ()
1889{
1890  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1892$as_echo_n "checking for $2... " >&6; }
1893if eval \${$3+:} false; then :
1894  $as_echo_n "(cached) " >&6
1895else
1896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h.  */
1898$4
1899#include <$2>
1900_ACEOF
1901if ac_fn_c_try_compile "$LINENO"; then :
1902  eval "$3=yes"
1903else
1904  eval "$3=no"
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907fi
1908eval ac_res=\$$3
1909	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910$as_echo "$ac_res" >&6; }
1911  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1912
1913} # ac_fn_c_check_header_compile
1914
1915# ac_fn_c_check_func LINENO FUNC VAR
1916# ----------------------------------
1917# Tests whether FUNC exists, setting the cache variable VAR accordingly
1918ac_fn_c_check_func ()
1919{
1920  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1922$as_echo_n "checking for $2... " >&6; }
1923if eval \${$3+:} false; then :
1924  $as_echo_n "(cached) " >&6
1925else
1926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927/* end confdefs.h.  */
1928/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1929   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1930#define $2 innocuous_$2
1931
1932/* System header to define __stub macros and hopefully few prototypes,
1933    which can conflict with char $2 (); below.
1934    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1935    <limits.h> exists even on freestanding compilers.  */
1936
1937#ifdef __STDC__
1938# include <limits.h>
1939#else
1940# include <assert.h>
1941#endif
1942
1943#undef $2
1944
1945/* Override any GCC internal prototype to avoid an error.
1946   Use char because int might match the return type of a GCC
1947   builtin and then its argument prototype would still apply.  */
1948#ifdef __cplusplus
1949extern "C"
1950#endif
1951char $2 ();
1952/* The GNU C library defines this for functions which it implements
1953    to always fail with ENOSYS.  Some functions are actually named
1954    something starting with __ and the normal name is an alias.  */
1955#if defined __stub_$2 || defined __stub___$2
1956choke me
1957#endif
1958
1959int
1960main ()
1961{
1962return $2 ();
1963  ;
1964  return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_link "$LINENO"; then :
1968  eval "$3=yes"
1969else
1970  eval "$3=no"
1971fi
1972rm -f core conftest.err conftest.$ac_objext \
1973    conftest$ac_exeext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
1978  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1979
1980} # ac_fn_c_check_func
1981
1982# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1983# -------------------------------------------
1984# Tests whether TYPE exists after having included INCLUDES, setting cache
1985# variable VAR accordingly.
1986ac_fn_c_check_type ()
1987{
1988  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1990$as_echo_n "checking for $2... " >&6; }
1991if eval \${$3+:} false; then :
1992  $as_echo_n "(cached) " >&6
1993else
1994  eval "$3=no"
1995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h.  */
1997$4
1998int
1999main ()
2000{
2001if (sizeof ($2))
2002	 return 0;
2003  ;
2004  return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h.  */
2010$4
2011int
2012main ()
2013{
2014if (sizeof (($2)))
2015	    return 0;
2016  ;
2017  return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021
2022else
2023  eval "$3=yes"
2024fi
2025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028fi
2029eval ac_res=\$$3
2030	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2031$as_echo "$ac_res" >&6; }
2032  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2033
2034} # ac_fn_c_check_type
2035
2036# ac_fn_c_find_uintX_t LINENO BITS VAR
2037# ------------------------------------
2038# Finds an unsigned integer type with width BITS, setting cache variable VAR
2039# accordingly.
2040ac_fn_c_find_uintX_t ()
2041{
2042  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2044$as_echo_n "checking for uint$2_t... " >&6; }
2045if eval \${$3+:} false; then :
2046  $as_echo_n "(cached) " >&6
2047else
2048  eval "$3=no"
2049     # Order is important - never check a type that is potentially smaller
2050     # than half of the expected target width.
2051     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2052	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2053       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h.  */
2055$ac_includes_default
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2060test_array [0] = 0;
2061return test_array [0];
2062
2063  ;
2064  return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068  case $ac_type in #(
2069  uint$2_t) :
2070    eval "$3=yes" ;; #(
2071  *) :
2072    eval "$3=\$ac_type" ;;
2073esac
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076       if eval test \"x\$"$3"\" = x"no"; then :
2077
2078else
2079  break
2080fi
2081     done
2082fi
2083eval ac_res=\$$3
2084	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2085$as_echo "$ac_res" >&6; }
2086  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2087
2088} # ac_fn_c_find_uintX_t
2089
2090# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2091# --------------------------------------------
2092# Tries to find the compile-time value of EXPR in a program that includes
2093# INCLUDES, setting VAR accordingly. Returns whether the value could be
2094# computed
2095ac_fn_c_compute_int ()
2096{
2097  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2098  if test "$cross_compiling" = yes; then
2099    # Depending upon the size, compute the lo and hi bounds.
2100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h.  */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) >= 0)];
2107test_array [0] = 0;
2108return test_array [0];
2109
2110  ;
2111  return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115  ac_lo=0 ac_mid=0
2116  while :; do
2117    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h.  */
2119$4
2120int
2121main ()
2122{
2123static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2124test_array [0] = 0;
2125return test_array [0];
2126
2127  ;
2128  return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_compile "$LINENO"; then :
2132  ac_hi=$ac_mid; break
2133else
2134  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2135			if test $ac_lo -le $ac_mid; then
2136			  ac_lo= ac_hi=
2137			  break
2138			fi
2139			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2140fi
2141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142  done
2143else
2144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145/* end confdefs.h.  */
2146$4
2147int
2148main ()
2149{
2150static int test_array [1 - 2 * !(($2) < 0)];
2151test_array [0] = 0;
2152return test_array [0];
2153
2154  ;
2155  return 0;
2156}
2157_ACEOF
2158if ac_fn_c_try_compile "$LINENO"; then :
2159  ac_hi=-1 ac_mid=-1
2160  while :; do
2161    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h.  */
2163$4
2164int
2165main ()
2166{
2167static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2168test_array [0] = 0;
2169return test_array [0];
2170
2171  ;
2172  return 0;
2173}
2174_ACEOF
2175if ac_fn_c_try_compile "$LINENO"; then :
2176  ac_lo=$ac_mid; break
2177else
2178  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2179			if test $ac_mid -le $ac_hi; then
2180			  ac_lo= ac_hi=
2181			  break
2182			fi
2183			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2184fi
2185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186  done
2187else
2188  ac_lo= ac_hi=
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191fi
2192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193# Binary search between lo and hi bounds.
2194while test "x$ac_lo" != "x$ac_hi"; do
2195  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h.  */
2198$4
2199int
2200main ()
2201{
2202static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2203test_array [0] = 0;
2204return test_array [0];
2205
2206  ;
2207  return 0;
2208}
2209_ACEOF
2210if ac_fn_c_try_compile "$LINENO"; then :
2211  ac_hi=$ac_mid
2212else
2213  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2214fi
2215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216done
2217case $ac_lo in #((
2218?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2219'') ac_retval=1 ;;
2220esac
2221  else
2222    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2223/* end confdefs.h.  */
2224$4
2225static long int longval () { return $2; }
2226static unsigned long int ulongval () { return $2; }
2227#include <stdio.h>
2228#include <stdlib.h>
2229int
2230main ()
2231{
2232
2233  FILE *f = fopen ("conftest.val", "w");
2234  if (! f)
2235    return 1;
2236  if (($2) < 0)
2237    {
2238      long int i = longval ();
2239      if (i != ($2))
2240	return 1;
2241      fprintf (f, "%ld", i);
2242    }
2243  else
2244    {
2245      unsigned long int i = ulongval ();
2246      if (i != ($2))
2247	return 1;
2248      fprintf (f, "%lu", i);
2249    }
2250  /* Do not output a trailing newline, as this causes \r\n confusion
2251     on some platforms.  */
2252  return ferror (f) || fclose (f) != 0;
2253
2254  ;
2255  return 0;
2256}
2257_ACEOF
2258if ac_fn_c_try_run "$LINENO"; then :
2259  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2260else
2261  ac_retval=1
2262fi
2263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2264  conftest.$ac_objext conftest.beam conftest.$ac_ext
2265rm -f conftest.val
2266
2267  fi
2268  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2269  as_fn_set_status $ac_retval
2270
2271} # ac_fn_c_compute_int
2272cat >auto/config.log <<_ACEOF
2273This file contains any messages produced by compilers while
2274running configure, to aid debugging if configure makes a mistake.
2275
2276It was created by $as_me, which was
2277generated by GNU Autoconf 2.69.  Invocation command line was
2278
2279  $ $0 $@
2280
2281_ACEOF
2282exec 5>>auto/config.log
2283{
2284cat <<_ASUNAME
2285## --------- ##
2286## Platform. ##
2287## --------- ##
2288
2289hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2290uname -m = `(uname -m) 2>/dev/null || echo unknown`
2291uname -r = `(uname -r) 2>/dev/null || echo unknown`
2292uname -s = `(uname -s) 2>/dev/null || echo unknown`
2293uname -v = `(uname -v) 2>/dev/null || echo unknown`
2294
2295/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2296/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2297
2298/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2299/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2300/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2301/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2302/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2303/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2304/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2305
2306_ASUNAME
2307
2308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2309for as_dir in $PATH
2310do
2311  IFS=$as_save_IFS
2312  test -z "$as_dir" && as_dir=.
2313    $as_echo "PATH: $as_dir"
2314  done
2315IFS=$as_save_IFS
2316
2317} >&5
2318
2319cat >&5 <<_ACEOF
2320
2321
2322## ----------- ##
2323## Core tests. ##
2324## ----------- ##
2325
2326_ACEOF
2327
2328
2329# Keep a trace of the command line.
2330# Strip out --no-create and --no-recursion so they do not pile up.
2331# Strip out --silent because we don't want to record it for future runs.
2332# Also quote any args containing shell meta-characters.
2333# Make two passes to allow for proper duplicate-argument suppression.
2334ac_configure_args=
2335ac_configure_args0=
2336ac_configure_args1=
2337ac_must_keep_next=false
2338for ac_pass in 1 2
2339do
2340  for ac_arg
2341  do
2342    case $ac_arg in
2343    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2344    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2345    | -silent | --silent | --silen | --sile | --sil)
2346      continue ;;
2347    *\'*)
2348      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2349    esac
2350    case $ac_pass in
2351    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2352    2)
2353      as_fn_append ac_configure_args1 " '$ac_arg'"
2354      if test $ac_must_keep_next = true; then
2355	ac_must_keep_next=false # Got value, back to normal.
2356      else
2357	case $ac_arg in
2358	  *=* | --config-cache | -C | -disable-* | --disable-* \
2359	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2360	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2361	  | -with-* | --with-* | -without-* | --without-* | --x)
2362	    case "$ac_configure_args0 " in
2363	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2364	    esac
2365	    ;;
2366	  -* ) ac_must_keep_next=true ;;
2367	esac
2368      fi
2369      as_fn_append ac_configure_args " '$ac_arg'"
2370      ;;
2371    esac
2372  done
2373done
2374{ ac_configure_args0=; unset ac_configure_args0;}
2375{ ac_configure_args1=; unset ac_configure_args1;}
2376
2377# When interrupted or exit'd, cleanup temporary files, and complete
2378# config.log.  We remove comments because anyway the quotes in there
2379# would cause problems or look ugly.
2380# WARNING: Use '\'' to represent an apostrophe within the trap.
2381# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2382trap 'exit_status=$?
2383  # Save into config.log some information that might help in debugging.
2384  {
2385    echo
2386
2387    $as_echo "## ---------------- ##
2388## Cache variables. ##
2389## ---------------- ##"
2390    echo
2391    # The following way of writing the cache mishandles newlines in values,
2392(
2393  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2394    eval ac_val=\$$ac_var
2395    case $ac_val in #(
2396    *${as_nl}*)
2397      case $ac_var in #(
2398      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2399$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2400      esac
2401      case $ac_var in #(
2402      _ | IFS | as_nl) ;; #(
2403      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2404      *) { eval $ac_var=; unset $ac_var;} ;;
2405      esac ;;
2406    esac
2407  done
2408  (set) 2>&1 |
2409    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2410    *${as_nl}ac_space=\ *)
2411      sed -n \
2412	"s/'\''/'\''\\\\'\'''\''/g;
2413	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2414      ;; #(
2415    *)
2416      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2417      ;;
2418    esac |
2419    sort
2420)
2421    echo
2422
2423    $as_echo "## ----------------- ##
2424## Output variables. ##
2425## ----------------- ##"
2426    echo
2427    for ac_var in $ac_subst_vars
2428    do
2429      eval ac_val=\$$ac_var
2430      case $ac_val in
2431      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2432      esac
2433      $as_echo "$ac_var='\''$ac_val'\''"
2434    done | sort
2435    echo
2436
2437    if test -n "$ac_subst_files"; then
2438      $as_echo "## ------------------- ##
2439## File substitutions. ##
2440## ------------------- ##"
2441      echo
2442      for ac_var in $ac_subst_files
2443      do
2444	eval ac_val=\$$ac_var
2445	case $ac_val in
2446	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2447	esac
2448	$as_echo "$ac_var='\''$ac_val'\''"
2449      done | sort
2450      echo
2451    fi
2452
2453    if test -s confdefs.h; then
2454      $as_echo "## ----------- ##
2455## confdefs.h. ##
2456## ----------- ##"
2457      echo
2458      cat confdefs.h
2459      echo
2460    fi
2461    test "$ac_signal" != 0 &&
2462      $as_echo "$as_me: caught signal $ac_signal"
2463    $as_echo "$as_me: exit $exit_status"
2464  } >&5
2465  rm -f core *.core core.conftest.* &&
2466    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2467    exit $exit_status
2468' 0
2469for ac_signal in 1 2 13 15; do
2470  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2471done
2472ac_signal=0
2473
2474# confdefs.h avoids OS command line length limits that DEFS can exceed.
2475rm -f -r conftest* confdefs.h
2476
2477$as_echo "/* confdefs.h */" > confdefs.h
2478
2479# Predefined preprocessor variables.
2480
2481cat >>confdefs.h <<_ACEOF
2482#define PACKAGE_NAME "$PACKAGE_NAME"
2483_ACEOF
2484
2485cat >>confdefs.h <<_ACEOF
2486#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2487_ACEOF
2488
2489cat >>confdefs.h <<_ACEOF
2490#define PACKAGE_VERSION "$PACKAGE_VERSION"
2491_ACEOF
2492
2493cat >>confdefs.h <<_ACEOF
2494#define PACKAGE_STRING "$PACKAGE_STRING"
2495_ACEOF
2496
2497cat >>confdefs.h <<_ACEOF
2498#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2499_ACEOF
2500
2501cat >>confdefs.h <<_ACEOF
2502#define PACKAGE_URL "$PACKAGE_URL"
2503_ACEOF
2504
2505
2506# Let the site file select an alternate cache file if it wants to.
2507# Prefer an explicitly selected file to automatically selected ones.
2508ac_site_file1=NONE
2509ac_site_file2=NONE
2510if test -n "$CONFIG_SITE"; then
2511  # We do not want a PATH search for config.site.
2512  case $CONFIG_SITE in #((
2513    -*)  ac_site_file1=./$CONFIG_SITE;;
2514    */*) ac_site_file1=$CONFIG_SITE;;
2515    *)   ac_site_file1=./$CONFIG_SITE;;
2516  esac
2517elif test "x$prefix" != xNONE; then
2518  ac_site_file1=$prefix/share/config.site
2519  ac_site_file2=$prefix/etc/config.site
2520else
2521  ac_site_file1=$ac_default_prefix/share/config.site
2522  ac_site_file2=$ac_default_prefix/etc/config.site
2523fi
2524for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2525do
2526  test "x$ac_site_file" = xNONE && continue
2527  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2528    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2529$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2530    sed 's/^/| /' "$ac_site_file" >&5
2531    . "$ac_site_file" \
2532      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2534as_fn_error $? "failed to load site script $ac_site_file
2535See \`config.log' for more details" "$LINENO" 5; }
2536  fi
2537done
2538
2539if test -r "$cache_file"; then
2540  # Some versions of bash will fail to source /dev/null (special files
2541  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2542  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2543    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2544$as_echo "$as_me: loading cache $cache_file" >&6;}
2545    case $cache_file in
2546      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2547      *)                      . "./$cache_file";;
2548    esac
2549  fi
2550else
2551  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2552$as_echo "$as_me: creating cache $cache_file" >&6;}
2553  >$cache_file
2554fi
2555
2556# Check that the precious variables saved in the cache have kept the same
2557# value.
2558ac_cache_corrupted=false
2559for ac_var in $ac_precious_vars; do
2560  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2561  eval ac_new_set=\$ac_env_${ac_var}_set
2562  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2563  eval ac_new_val=\$ac_env_${ac_var}_value
2564  case $ac_old_set,$ac_new_set in
2565    set,)
2566      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2567$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2568      ac_cache_corrupted=: ;;
2569    ,set)
2570      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2571$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2572      ac_cache_corrupted=: ;;
2573    ,);;
2574    *)
2575      if test "x$ac_old_val" != "x$ac_new_val"; then
2576	# differences in whitespace do not lead to failure.
2577	ac_old_val_w=`echo x $ac_old_val`
2578	ac_new_val_w=`echo x $ac_new_val`
2579	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2580	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2581$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2582	  ac_cache_corrupted=:
2583	else
2584	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2585$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2586	  eval $ac_var=\$ac_old_val
2587	fi
2588	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2589$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2590	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2591$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2592      fi;;
2593  esac
2594  # Pass precious variables to config.status.
2595  if test "$ac_new_set" = set; then
2596    case $ac_new_val in
2597    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2598    *) ac_arg=$ac_var=$ac_new_val ;;
2599    esac
2600    case " $ac_configure_args " in
2601      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2602      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2603    esac
2604  fi
2605done
2606if $ac_cache_corrupted; then
2607  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2610$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2611  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2612fi
2613## -------------------- ##
2614## Main body of script. ##
2615## -------------------- ##
2616
2617ac_ext=c
2618ac_cpp='$CPP $CPPFLAGS'
2619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2621ac_compiler_gnu=$ac_cv_c_compiler_gnu
2622
2623
2624ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2625
2626
2627$as_echo "#define UNIX 1" >>confdefs.h
2628
2629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2630$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2631set x ${MAKE-make}
2632ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2633if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2634  $as_echo_n "(cached) " >&6
2635else
2636  cat >conftest.make <<\_ACEOF
2637SHELL = /bin/sh
2638all:
2639	@echo '@@@%%%=$(MAKE)=@@@%%%'
2640_ACEOF
2641# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2642case `${MAKE-make} -f conftest.make 2>/dev/null` in
2643  *@@@%%%=?*=@@@%%%*)
2644    eval ac_cv_prog_make_${ac_make}_set=yes;;
2645  *)
2646    eval ac_cv_prog_make_${ac_make}_set=no;;
2647esac
2648rm -f conftest.make
2649fi
2650if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2652$as_echo "yes" >&6; }
2653  SET_MAKE=
2654else
2655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2656$as_echo "no" >&6; }
2657  SET_MAKE="MAKE=${MAKE-make}"
2658fi
2659
2660
2661ac_ext=c
2662ac_cpp='$CPP $CPPFLAGS'
2663ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2664ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2665ac_compiler_gnu=$ac_cv_c_compiler_gnu
2666if test -n "$ac_tool_prefix"; then
2667  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2668set dummy ${ac_tool_prefix}gcc; ac_word=$2
2669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2670$as_echo_n "checking for $ac_word... " >&6; }
2671if ${ac_cv_prog_CC+:} false; then :
2672  $as_echo_n "(cached) " >&6
2673else
2674  if test -n "$CC"; then
2675  ac_cv_prog_CC="$CC" # Let the user override the test.
2676else
2677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2678for as_dir in $PATH
2679do
2680  IFS=$as_save_IFS
2681  test -z "$as_dir" && as_dir=.
2682    for ac_exec_ext in '' $ac_executable_extensions; do
2683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2684    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2686    break 2
2687  fi
2688done
2689  done
2690IFS=$as_save_IFS
2691
2692fi
2693fi
2694CC=$ac_cv_prog_CC
2695if test -n "$CC"; then
2696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2697$as_echo "$CC" >&6; }
2698else
2699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2700$as_echo "no" >&6; }
2701fi
2702
2703
2704fi
2705if test -z "$ac_cv_prog_CC"; then
2706  ac_ct_CC=$CC
2707  # Extract the first word of "gcc", so it can be a program name with args.
2708set dummy gcc; ac_word=$2
2709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2710$as_echo_n "checking for $ac_word... " >&6; }
2711if ${ac_cv_prog_ac_ct_CC+:} false; then :
2712  $as_echo_n "(cached) " >&6
2713else
2714  if test -n "$ac_ct_CC"; then
2715  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2716else
2717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2718for as_dir in $PATH
2719do
2720  IFS=$as_save_IFS
2721  test -z "$as_dir" && as_dir=.
2722    for ac_exec_ext in '' $ac_executable_extensions; do
2723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2724    ac_cv_prog_ac_ct_CC="gcc"
2725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2726    break 2
2727  fi
2728done
2729  done
2730IFS=$as_save_IFS
2731
2732fi
2733fi
2734ac_ct_CC=$ac_cv_prog_ac_ct_CC
2735if test -n "$ac_ct_CC"; then
2736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2737$as_echo "$ac_ct_CC" >&6; }
2738else
2739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2740$as_echo "no" >&6; }
2741fi
2742
2743  if test "x$ac_ct_CC" = x; then
2744    CC=""
2745  else
2746    case $cross_compiling:$ac_tool_warned in
2747yes:)
2748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2750ac_tool_warned=yes ;;
2751esac
2752    CC=$ac_ct_CC
2753  fi
2754else
2755  CC="$ac_cv_prog_CC"
2756fi
2757
2758if test -z "$CC"; then
2759          if test -n "$ac_tool_prefix"; then
2760    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2761set dummy ${ac_tool_prefix}cc; ac_word=$2
2762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2763$as_echo_n "checking for $ac_word... " >&6; }
2764if ${ac_cv_prog_CC+:} false; then :
2765  $as_echo_n "(cached) " >&6
2766else
2767  if test -n "$CC"; then
2768  ac_cv_prog_CC="$CC" # Let the user override the test.
2769else
2770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2771for as_dir in $PATH
2772do
2773  IFS=$as_save_IFS
2774  test -z "$as_dir" && as_dir=.
2775    for ac_exec_ext in '' $ac_executable_extensions; do
2776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2777    ac_cv_prog_CC="${ac_tool_prefix}cc"
2778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2779    break 2
2780  fi
2781done
2782  done
2783IFS=$as_save_IFS
2784
2785fi
2786fi
2787CC=$ac_cv_prog_CC
2788if test -n "$CC"; then
2789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2790$as_echo "$CC" >&6; }
2791else
2792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793$as_echo "no" >&6; }
2794fi
2795
2796
2797  fi
2798fi
2799if test -z "$CC"; then
2800  # Extract the first word of "cc", so it can be a program name with args.
2801set dummy cc; ac_word=$2
2802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2803$as_echo_n "checking for $ac_word... " >&6; }
2804if ${ac_cv_prog_CC+:} false; then :
2805  $as_echo_n "(cached) " >&6
2806else
2807  if test -n "$CC"; then
2808  ac_cv_prog_CC="$CC" # Let the user override the test.
2809else
2810  ac_prog_rejected=no
2811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2812for as_dir in $PATH
2813do
2814  IFS=$as_save_IFS
2815  test -z "$as_dir" && as_dir=.
2816    for ac_exec_ext in '' $ac_executable_extensions; do
2817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2818    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2819       ac_prog_rejected=yes
2820       continue
2821     fi
2822    ac_cv_prog_CC="cc"
2823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2824    break 2
2825  fi
2826done
2827  done
2828IFS=$as_save_IFS
2829
2830if test $ac_prog_rejected = yes; then
2831  # We found a bogon in the path, so make sure we never use it.
2832  set dummy $ac_cv_prog_CC
2833  shift
2834  if test $# != 0; then
2835    # We chose a different compiler from the bogus one.
2836    # However, it has the same basename, so the bogon will be chosen
2837    # first if we set CC to just the basename; use the full file name.
2838    shift
2839    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2840  fi
2841fi
2842fi
2843fi
2844CC=$ac_cv_prog_CC
2845if test -n "$CC"; then
2846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2847$as_echo "$CC" >&6; }
2848else
2849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2850$as_echo "no" >&6; }
2851fi
2852
2853
2854fi
2855if test -z "$CC"; then
2856  if test -n "$ac_tool_prefix"; then
2857  for ac_prog in cl.exe
2858  do
2859    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2860set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2862$as_echo_n "checking for $ac_word... " >&6; }
2863if ${ac_cv_prog_CC+:} false; then :
2864  $as_echo_n "(cached) " >&6
2865else
2866  if test -n "$CC"; then
2867  ac_cv_prog_CC="$CC" # Let the user override the test.
2868else
2869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2870for as_dir in $PATH
2871do
2872  IFS=$as_save_IFS
2873  test -z "$as_dir" && as_dir=.
2874    for ac_exec_ext in '' $ac_executable_extensions; do
2875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2876    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2878    break 2
2879  fi
2880done
2881  done
2882IFS=$as_save_IFS
2883
2884fi
2885fi
2886CC=$ac_cv_prog_CC
2887if test -n "$CC"; then
2888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2889$as_echo "$CC" >&6; }
2890else
2891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2892$as_echo "no" >&6; }
2893fi
2894
2895
2896    test -n "$CC" && break
2897  done
2898fi
2899if test -z "$CC"; then
2900  ac_ct_CC=$CC
2901  for ac_prog in cl.exe
2902do
2903  # Extract the first word of "$ac_prog", so it can be a program name with args.
2904set dummy $ac_prog; ac_word=$2
2905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2906$as_echo_n "checking for $ac_word... " >&6; }
2907if ${ac_cv_prog_ac_ct_CC+:} false; then :
2908  $as_echo_n "(cached) " >&6
2909else
2910  if test -n "$ac_ct_CC"; then
2911  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2912else
2913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2914for as_dir in $PATH
2915do
2916  IFS=$as_save_IFS
2917  test -z "$as_dir" && as_dir=.
2918    for ac_exec_ext in '' $ac_executable_extensions; do
2919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2920    ac_cv_prog_ac_ct_CC="$ac_prog"
2921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2922    break 2
2923  fi
2924done
2925  done
2926IFS=$as_save_IFS
2927
2928fi
2929fi
2930ac_ct_CC=$ac_cv_prog_ac_ct_CC
2931if test -n "$ac_ct_CC"; then
2932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2933$as_echo "$ac_ct_CC" >&6; }
2934else
2935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2936$as_echo "no" >&6; }
2937fi
2938
2939
2940  test -n "$ac_ct_CC" && break
2941done
2942
2943  if test "x$ac_ct_CC" = x; then
2944    CC=""
2945  else
2946    case $cross_compiling:$ac_tool_warned in
2947yes:)
2948{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2949$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2950ac_tool_warned=yes ;;
2951esac
2952    CC=$ac_ct_CC
2953  fi
2954fi
2955
2956fi
2957
2958
2959test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2961as_fn_error $? "no acceptable C compiler found in \$PATH
2962See \`config.log' for more details" "$LINENO" 5; }
2963
2964# Provide some information about the compiler.
2965$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2966set X $ac_compile
2967ac_compiler=$2
2968for ac_option in --version -v -V -qversion; do
2969  { { ac_try="$ac_compiler $ac_option >&5"
2970case "(($ac_try" in
2971  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2972  *) ac_try_echo=$ac_try;;
2973esac
2974eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2975$as_echo "$ac_try_echo"; } >&5
2976  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2977  ac_status=$?
2978  if test -s conftest.err; then
2979    sed '10a\
2980... rest of stderr output deleted ...
2981         10q' conftest.err >conftest.er1
2982    cat conftest.er1 >&5
2983  fi
2984  rm -f conftest.er1 conftest.err
2985  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2986  test $ac_status = 0; }
2987done
2988
2989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2990/* end confdefs.h.  */
2991
2992int
2993main ()
2994{
2995
2996  ;
2997  return 0;
2998}
2999_ACEOF
3000ac_clean_files_save=$ac_clean_files
3001ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3002# Try to create an executable without -o first, disregard a.out.
3003# It will help us diagnose broken compilers, and finding out an intuition
3004# of exeext.
3005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3006$as_echo_n "checking whether the C compiler works... " >&6; }
3007ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3008
3009# The possible output files:
3010ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3011
3012ac_rmfiles=
3013for ac_file in $ac_files
3014do
3015  case $ac_file in
3016    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3017    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3018  esac
3019done
3020rm -f $ac_rmfiles
3021
3022if { { ac_try="$ac_link_default"
3023case "(($ac_try" in
3024  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3025  *) ac_try_echo=$ac_try;;
3026esac
3027eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3028$as_echo "$ac_try_echo"; } >&5
3029  (eval "$ac_link_default") 2>&5
3030  ac_status=$?
3031  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3032  test $ac_status = 0; }; then :
3033  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3034# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3035# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3036# so that the user can short-circuit this test for compilers unknown to
3037# Autoconf.
3038for ac_file in $ac_files ''
3039do
3040  test -f "$ac_file" || continue
3041  case $ac_file in
3042    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3043	;;
3044    [ab].out )
3045	# We found the default executable, but exeext='' is most
3046	# certainly right.
3047	break;;
3048    *.* )
3049	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3050	then :; else
3051	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3052	fi
3053	# We set ac_cv_exeext here because the later test for it is not
3054	# safe: cross compilers may not add the suffix if given an `-o'
3055	# argument, so we may need to know it at that point already.
3056	# Even if this section looks crufty: it has the advantage of
3057	# actually working.
3058	break;;
3059    * )
3060	break;;
3061  esac
3062done
3063test "$ac_cv_exeext" = no && ac_cv_exeext=
3064
3065else
3066  ac_file=''
3067fi
3068if test -z "$ac_file"; then :
3069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3070$as_echo "no" >&6; }
3071$as_echo "$as_me: failed program was:" >&5
3072sed 's/^/| /' conftest.$ac_ext >&5
3073
3074{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3076as_fn_error 77 "C compiler cannot create executables
3077See \`config.log' for more details" "$LINENO" 5; }
3078else
3079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3080$as_echo "yes" >&6; }
3081fi
3082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3083$as_echo_n "checking for C compiler default output file name... " >&6; }
3084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3085$as_echo "$ac_file" >&6; }
3086ac_exeext=$ac_cv_exeext
3087
3088rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3089ac_clean_files=$ac_clean_files_save
3090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3091$as_echo_n "checking for suffix of executables... " >&6; }
3092if { { ac_try="$ac_link"
3093case "(($ac_try" in
3094  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3095  *) ac_try_echo=$ac_try;;
3096esac
3097eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3098$as_echo "$ac_try_echo"; } >&5
3099  (eval "$ac_link") 2>&5
3100  ac_status=$?
3101  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3102  test $ac_status = 0; }; then :
3103  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3104# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3105# work properly (i.e., refer to `conftest.exe'), while it won't with
3106# `rm'.
3107for ac_file in conftest.exe conftest conftest.*; do
3108  test -f "$ac_file" || continue
3109  case $ac_file in
3110    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3111    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3112	  break;;
3113    * ) break;;
3114  esac
3115done
3116else
3117  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3119as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3120See \`config.log' for more details" "$LINENO" 5; }
3121fi
3122rm -f conftest conftest$ac_cv_exeext
3123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3124$as_echo "$ac_cv_exeext" >&6; }
3125
3126rm -f conftest.$ac_ext
3127EXEEXT=$ac_cv_exeext
3128ac_exeext=$EXEEXT
3129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3130/* end confdefs.h.  */
3131#include <stdio.h>
3132int
3133main ()
3134{
3135FILE *f = fopen ("conftest.out", "w");
3136 return ferror (f) || fclose (f) != 0;
3137
3138  ;
3139  return 0;
3140}
3141_ACEOF
3142ac_clean_files="$ac_clean_files conftest.out"
3143# Check that the compiler produces executables we can run.  If not, either
3144# the compiler is broken, or we cross compile.
3145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3146$as_echo_n "checking whether we are cross compiling... " >&6; }
3147if test "$cross_compiling" != yes; then
3148  { { ac_try="$ac_link"
3149case "(($ac_try" in
3150  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151  *) ac_try_echo=$ac_try;;
3152esac
3153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154$as_echo "$ac_try_echo"; } >&5
3155  (eval "$ac_link") 2>&5
3156  ac_status=$?
3157  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158  test $ac_status = 0; }
3159  if { ac_try='./conftest$ac_cv_exeext'
3160  { { case "(($ac_try" in
3161  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3162  *) ac_try_echo=$ac_try;;
3163esac
3164eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3165$as_echo "$ac_try_echo"; } >&5
3166  (eval "$ac_try") 2>&5
3167  ac_status=$?
3168  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3169  test $ac_status = 0; }; }; then
3170    cross_compiling=no
3171  else
3172    if test "$cross_compiling" = maybe; then
3173	cross_compiling=yes
3174    else
3175	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3177as_fn_error $? "cannot run C compiled programs.
3178If you meant to cross compile, use \`--host'.
3179See \`config.log' for more details" "$LINENO" 5; }
3180    fi
3181  fi
3182fi
3183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3184$as_echo "$cross_compiling" >&6; }
3185
3186rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3187ac_clean_files=$ac_clean_files_save
3188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3189$as_echo_n "checking for suffix of object files... " >&6; }
3190if ${ac_cv_objext+:} false; then :
3191  $as_echo_n "(cached) " >&6
3192else
3193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3194/* end confdefs.h.  */
3195
3196int
3197main ()
3198{
3199
3200  ;
3201  return 0;
3202}
3203_ACEOF
3204rm -f conftest.o conftest.obj
3205if { { ac_try="$ac_compile"
3206case "(($ac_try" in
3207  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3208  *) ac_try_echo=$ac_try;;
3209esac
3210eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3211$as_echo "$ac_try_echo"; } >&5
3212  (eval "$ac_compile") 2>&5
3213  ac_status=$?
3214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3215  test $ac_status = 0; }; then :
3216  for ac_file in conftest.o conftest.obj conftest.*; do
3217  test -f "$ac_file" || continue;
3218  case $ac_file in
3219    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3220    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3221       break;;
3222  esac
3223done
3224else
3225  $as_echo "$as_me: failed program was:" >&5
3226sed 's/^/| /' conftest.$ac_ext >&5
3227
3228{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3230as_fn_error $? "cannot compute suffix of object files: cannot compile
3231See \`config.log' for more details" "$LINENO" 5; }
3232fi
3233rm -f conftest.$ac_cv_objext conftest.$ac_ext
3234fi
3235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3236$as_echo "$ac_cv_objext" >&6; }
3237OBJEXT=$ac_cv_objext
3238ac_objext=$OBJEXT
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3240$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3241if ${ac_cv_c_compiler_gnu+:} false; then :
3242  $as_echo_n "(cached) " >&6
3243else
3244  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3245/* end confdefs.h.  */
3246
3247int
3248main ()
3249{
3250#ifndef __GNUC__
3251       choke me
3252#endif
3253
3254  ;
3255  return 0;
3256}
3257_ACEOF
3258if ac_fn_c_try_compile "$LINENO"; then :
3259  ac_compiler_gnu=yes
3260else
3261  ac_compiler_gnu=no
3262fi
3263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3264ac_cv_c_compiler_gnu=$ac_compiler_gnu
3265
3266fi
3267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3268$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3269if test $ac_compiler_gnu = yes; then
3270  GCC=yes
3271else
3272  GCC=
3273fi
3274ac_test_CFLAGS=${CFLAGS+set}
3275ac_save_CFLAGS=$CFLAGS
3276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3277$as_echo_n "checking whether $CC accepts -g... " >&6; }
3278if ${ac_cv_prog_cc_g+:} false; then :
3279  $as_echo_n "(cached) " >&6
3280else
3281  ac_save_c_werror_flag=$ac_c_werror_flag
3282   ac_c_werror_flag=yes
3283   ac_cv_prog_cc_g=no
3284   CFLAGS="-g"
3285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3286/* end confdefs.h.  */
3287
3288int
3289main ()
3290{
3291
3292  ;
3293  return 0;
3294}
3295_ACEOF
3296if ac_fn_c_try_compile "$LINENO"; then :
3297  ac_cv_prog_cc_g=yes
3298else
3299  CFLAGS=""
3300      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3301/* end confdefs.h.  */
3302
3303int
3304main ()
3305{
3306
3307  ;
3308  return 0;
3309}
3310_ACEOF
3311if ac_fn_c_try_compile "$LINENO"; then :
3312
3313else
3314  ac_c_werror_flag=$ac_save_c_werror_flag
3315	 CFLAGS="-g"
3316	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3317/* end confdefs.h.  */
3318
3319int
3320main ()
3321{
3322
3323  ;
3324  return 0;
3325}
3326_ACEOF
3327if ac_fn_c_try_compile "$LINENO"; then :
3328  ac_cv_prog_cc_g=yes
3329fi
3330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3331fi
3332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3333fi
3334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3335   ac_c_werror_flag=$ac_save_c_werror_flag
3336fi
3337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3338$as_echo "$ac_cv_prog_cc_g" >&6; }
3339if test "$ac_test_CFLAGS" = set; then
3340  CFLAGS=$ac_save_CFLAGS
3341elif test $ac_cv_prog_cc_g = yes; then
3342  if test "$GCC" = yes; then
3343    CFLAGS="-g -O2"
3344  else
3345    CFLAGS="-g"
3346  fi
3347else
3348  if test "$GCC" = yes; then
3349    CFLAGS="-O2"
3350  else
3351    CFLAGS=
3352  fi
3353fi
3354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3355$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3356if ${ac_cv_prog_cc_c89+:} false; then :
3357  $as_echo_n "(cached) " >&6
3358else
3359  ac_cv_prog_cc_c89=no
3360ac_save_CC=$CC
3361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3362/* end confdefs.h.  */
3363#include <stdarg.h>
3364#include <stdio.h>
3365struct stat;
3366/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3367struct buf { int x; };
3368FILE * (*rcsopen) (struct buf *, struct stat *, int);
3369static char *e (p, i)
3370     char **p;
3371     int i;
3372{
3373  return p[i];
3374}
3375static char *f (char * (*g) (char **, int), char **p, ...)
3376{
3377  char *s;
3378  va_list v;
3379  va_start (v,p);
3380  s = g (p, va_arg (v,int));
3381  va_end (v);
3382  return s;
3383}
3384
3385/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3386   function prototypes and stuff, but not '\xHH' hex character constants.
3387   These don't provoke an error unfortunately, instead are silently treated
3388   as 'x'.  The following induces an error, until -std is added to get
3389   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3390   array size at least.  It's necessary to write '\x00'==0 to get something
3391   that's true only with -std.  */
3392int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3393
3394/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3395   inside strings and character constants.  */
3396#define FOO(x) 'x'
3397int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3398
3399int test (int i, double x);
3400struct s1 {int (*f) (int a);};
3401struct s2 {int (*f) (double a);};
3402int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3403int argc;
3404char **argv;
3405int
3406main ()
3407{
3408return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3409  ;
3410  return 0;
3411}
3412_ACEOF
3413for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3414	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3415do
3416  CC="$ac_save_CC $ac_arg"
3417  if ac_fn_c_try_compile "$LINENO"; then :
3418  ac_cv_prog_cc_c89=$ac_arg
3419fi
3420rm -f core conftest.err conftest.$ac_objext
3421  test "x$ac_cv_prog_cc_c89" != "xno" && break
3422done
3423rm -f conftest.$ac_ext
3424CC=$ac_save_CC
3425
3426fi
3427# AC_CACHE_VAL
3428case "x$ac_cv_prog_cc_c89" in
3429  x)
3430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3431$as_echo "none needed" >&6; } ;;
3432  xno)
3433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3434$as_echo "unsupported" >&6; } ;;
3435  *)
3436    CC="$CC $ac_cv_prog_cc_c89"
3437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3438$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3439esac
3440if test "x$ac_cv_prog_cc_c89" != xno; then :
3441
3442fi
3443
3444ac_ext=c
3445ac_cpp='$CPP $CPPFLAGS'
3446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3448ac_compiler_gnu=$ac_cv_c_compiler_gnu
3449	ac_ext=c
3450ac_cpp='$CPP $CPPFLAGS'
3451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3453ac_compiler_gnu=$ac_cv_c_compiler_gnu
3454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3455$as_echo_n "checking how to run the C preprocessor... " >&6; }
3456# On Suns, sometimes $CPP names a directory.
3457if test -n "$CPP" && test -d "$CPP"; then
3458  CPP=
3459fi
3460if test -z "$CPP"; then
3461  if ${ac_cv_prog_CPP+:} false; then :
3462  $as_echo_n "(cached) " >&6
3463else
3464      # Double quotes because CPP needs to be expanded
3465    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3466    do
3467      ac_preproc_ok=false
3468for ac_c_preproc_warn_flag in '' yes
3469do
3470  # Use a header file that comes with gcc, so configuring glibc
3471  # with a fresh cross-compiler works.
3472  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3473  # <limits.h> exists even on freestanding compilers.
3474  # On the NeXT, cc -E runs the code through the compiler's parser,
3475  # not just through cpp. "Syntax error" is here to catch this case.
3476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3477/* end confdefs.h.  */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
3483		     Syntax error
3484_ACEOF
3485if ac_fn_c_try_cpp "$LINENO"; then :
3486
3487else
3488  # Broken: fails on valid input.
3489continue
3490fi
3491rm -f conftest.err conftest.i conftest.$ac_ext
3492
3493  # OK, works on sane cases.  Now check whether nonexistent headers
3494  # can be detected and how.
3495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3496/* end confdefs.h.  */
3497#include <ac_nonexistent.h>
3498_ACEOF
3499if ac_fn_c_try_cpp "$LINENO"; then :
3500  # Broken: success on invalid input.
3501continue
3502else
3503  # Passes both tests.
3504ac_preproc_ok=:
3505break
3506fi
3507rm -f conftest.err conftest.i conftest.$ac_ext
3508
3509done
3510# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3511rm -f conftest.i conftest.err conftest.$ac_ext
3512if $ac_preproc_ok; then :
3513  break
3514fi
3515
3516    done
3517    ac_cv_prog_CPP=$CPP
3518
3519fi
3520  CPP=$ac_cv_prog_CPP
3521else
3522  ac_cv_prog_CPP=$CPP
3523fi
3524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3525$as_echo "$CPP" >&6; }
3526ac_preproc_ok=false
3527for ac_c_preproc_warn_flag in '' yes
3528do
3529  # Use a header file that comes with gcc, so configuring glibc
3530  # with a fresh cross-compiler works.
3531  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3532  # <limits.h> exists even on freestanding compilers.
3533  # On the NeXT, cc -E runs the code through the compiler's parser,
3534  # not just through cpp. "Syntax error" is here to catch this case.
3535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3536/* end confdefs.h.  */
3537#ifdef __STDC__
3538# include <limits.h>
3539#else
3540# include <assert.h>
3541#endif
3542		     Syntax error
3543_ACEOF
3544if ac_fn_c_try_cpp "$LINENO"; then :
3545
3546else
3547  # Broken: fails on valid input.
3548continue
3549fi
3550rm -f conftest.err conftest.i conftest.$ac_ext
3551
3552  # OK, works on sane cases.  Now check whether nonexistent headers
3553  # can be detected and how.
3554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3555/* end confdefs.h.  */
3556#include <ac_nonexistent.h>
3557_ACEOF
3558if ac_fn_c_try_cpp "$LINENO"; then :
3559  # Broken: success on invalid input.
3560continue
3561else
3562  # Passes both tests.
3563ac_preproc_ok=:
3564break
3565fi
3566rm -f conftest.err conftest.i conftest.$ac_ext
3567
3568done
3569# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3570rm -f conftest.i conftest.err conftest.$ac_ext
3571if $ac_preproc_ok; then :
3572
3573else
3574  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3576as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3577See \`config.log' for more details" "$LINENO" 5; }
3578fi
3579
3580ac_ext=c
3581ac_cpp='$CPP $CPPFLAGS'
3582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3584ac_compiler_gnu=$ac_cv_c_compiler_gnu
3585
3586
3587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3588$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3589if ${ac_cv_path_GREP+:} false; then :
3590  $as_echo_n "(cached) " >&6
3591else
3592  if test -z "$GREP"; then
3593  ac_path_GREP_found=false
3594  # Loop through the user's path and test for each of PROGNAME-LIST
3595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3597do
3598  IFS=$as_save_IFS
3599  test -z "$as_dir" && as_dir=.
3600    for ac_prog in grep ggrep; do
3601    for ac_exec_ext in '' $ac_executable_extensions; do
3602      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3603      as_fn_executable_p "$ac_path_GREP" || continue
3604# Check for GNU ac_path_GREP and select it if it is found.
3605  # Check for GNU $ac_path_GREP
3606case `"$ac_path_GREP" --version 2>&1` in
3607*GNU*)
3608  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3609*)
3610  ac_count=0
3611  $as_echo_n 0123456789 >"conftest.in"
3612  while :
3613  do
3614    cat "conftest.in" "conftest.in" >"conftest.tmp"
3615    mv "conftest.tmp" "conftest.in"
3616    cp "conftest.in" "conftest.nl"
3617    $as_echo 'GREP' >> "conftest.nl"
3618    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3619    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3620    as_fn_arith $ac_count + 1 && ac_count=$as_val
3621    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3622      # Best one so far, save it but keep looking for a better one
3623      ac_cv_path_GREP="$ac_path_GREP"
3624      ac_path_GREP_max=$ac_count
3625    fi
3626    # 10*(2^10) chars as input seems more than enough
3627    test $ac_count -gt 10 && break
3628  done
3629  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3630esac
3631
3632      $ac_path_GREP_found && break 3
3633    done
3634  done
3635  done
3636IFS=$as_save_IFS
3637  if test -z "$ac_cv_path_GREP"; then
3638    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3639  fi
3640else
3641  ac_cv_path_GREP=$GREP
3642fi
3643
3644fi
3645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3646$as_echo "$ac_cv_path_GREP" >&6; }
3647 GREP="$ac_cv_path_GREP"
3648
3649
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3651$as_echo_n "checking for egrep... " >&6; }
3652if ${ac_cv_path_EGREP+:} false; then :
3653  $as_echo_n "(cached) " >&6
3654else
3655  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3656   then ac_cv_path_EGREP="$GREP -E"
3657   else
3658     if test -z "$EGREP"; then
3659  ac_path_EGREP_found=false
3660  # Loop through the user's path and test for each of PROGNAME-LIST
3661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3663do
3664  IFS=$as_save_IFS
3665  test -z "$as_dir" && as_dir=.
3666    for ac_prog in egrep; do
3667    for ac_exec_ext in '' $ac_executable_extensions; do
3668      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3669      as_fn_executable_p "$ac_path_EGREP" || continue
3670# Check for GNU ac_path_EGREP and select it if it is found.
3671  # Check for GNU $ac_path_EGREP
3672case `"$ac_path_EGREP" --version 2>&1` in
3673*GNU*)
3674  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3675*)
3676  ac_count=0
3677  $as_echo_n 0123456789 >"conftest.in"
3678  while :
3679  do
3680    cat "conftest.in" "conftest.in" >"conftest.tmp"
3681    mv "conftest.tmp" "conftest.in"
3682    cp "conftest.in" "conftest.nl"
3683    $as_echo 'EGREP' >> "conftest.nl"
3684    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3685    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3686    as_fn_arith $ac_count + 1 && ac_count=$as_val
3687    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3688      # Best one so far, save it but keep looking for a better one
3689      ac_cv_path_EGREP="$ac_path_EGREP"
3690      ac_path_EGREP_max=$ac_count
3691    fi
3692    # 10*(2^10) chars as input seems more than enough
3693    test $ac_count -gt 10 && break
3694  done
3695  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3696esac
3697
3698      $ac_path_EGREP_found && break 3
3699    done
3700  done
3701  done
3702IFS=$as_save_IFS
3703  if test -z "$ac_cv_path_EGREP"; then
3704    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3705  fi
3706else
3707  ac_cv_path_EGREP=$EGREP
3708fi
3709
3710   fi
3711fi
3712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3713$as_echo "$ac_cv_path_EGREP" >&6; }
3714 EGREP="$ac_cv_path_EGREP"
3715
3716
3717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3718/* end confdefs.h.  */
3719
3720_ACEOF
3721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3722  $EGREP "" >/dev/null 2>&1; then :
3723
3724fi
3725rm -f conftest*
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
3727$as_echo_n "checking for fgrep... " >&6; }
3728if ${ac_cv_path_FGREP+:} false; then :
3729  $as_echo_n "(cached) " >&6
3730else
3731  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3732   then ac_cv_path_FGREP="$GREP -F"
3733   else
3734     if test -z "$FGREP"; then
3735  ac_path_FGREP_found=false
3736  # Loop through the user's path and test for each of PROGNAME-LIST
3737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3739do
3740  IFS=$as_save_IFS
3741  test -z "$as_dir" && as_dir=.
3742    for ac_prog in fgrep; do
3743    for ac_exec_ext in '' $ac_executable_extensions; do
3744      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
3745      as_fn_executable_p "$ac_path_FGREP" || continue
3746# Check for GNU ac_path_FGREP and select it if it is found.
3747  # Check for GNU $ac_path_FGREP
3748case `"$ac_path_FGREP" --version 2>&1` in
3749*GNU*)
3750  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
3751*)
3752  ac_count=0
3753  $as_echo_n 0123456789 >"conftest.in"
3754  while :
3755  do
3756    cat "conftest.in" "conftest.in" >"conftest.tmp"
3757    mv "conftest.tmp" "conftest.in"
3758    cp "conftest.in" "conftest.nl"
3759    $as_echo 'FGREP' >> "conftest.nl"
3760    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
3761    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3762    as_fn_arith $ac_count + 1 && ac_count=$as_val
3763    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
3764      # Best one so far, save it but keep looking for a better one
3765      ac_cv_path_FGREP="$ac_path_FGREP"
3766      ac_path_FGREP_max=$ac_count
3767    fi
3768    # 10*(2^10) chars as input seems more than enough
3769    test $ac_count -gt 10 && break
3770  done
3771  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3772esac
3773
3774      $ac_path_FGREP_found && break 3
3775    done
3776  done
3777  done
3778IFS=$as_save_IFS
3779  if test -z "$ac_cv_path_FGREP"; then
3780    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3781  fi
3782else
3783  ac_cv_path_FGREP=$FGREP
3784fi
3785
3786   fi
3787fi
3788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
3789$as_echo "$ac_cv_path_FGREP" >&6; }
3790 FGREP="$ac_cv_path_FGREP"
3791
3792	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
3793$as_echo_n "checking for library containing strerror... " >&6; }
3794if ${ac_cv_search_strerror+:} false; then :
3795  $as_echo_n "(cached) " >&6
3796else
3797  ac_func_search_save_LIBS=$LIBS
3798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3799/* end confdefs.h.  */
3800
3801/* Override any GCC internal prototype to avoid an error.
3802   Use char because int might match the return type of a GCC
3803   builtin and then its argument prototype would still apply.  */
3804#ifdef __cplusplus
3805extern "C"
3806#endif
3807char strerror ();
3808int
3809main ()
3810{
3811return strerror ();
3812  ;
3813  return 0;
3814}
3815_ACEOF
3816for ac_lib in '' cposix; do
3817  if test -z "$ac_lib"; then
3818    ac_res="none required"
3819  else
3820    ac_res=-l$ac_lib
3821    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
3822  fi
3823  if ac_fn_c_try_link "$LINENO"; then :
3824  ac_cv_search_strerror=$ac_res
3825fi
3826rm -f core conftest.err conftest.$ac_objext \
3827    conftest$ac_exeext
3828  if ${ac_cv_search_strerror+:} false; then :
3829  break
3830fi
3831done
3832if ${ac_cv_search_strerror+:} false; then :
3833
3834else
3835  ac_cv_search_strerror=no
3836fi
3837rm conftest.$ac_ext
3838LIBS=$ac_func_search_save_LIBS
3839fi
3840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
3841$as_echo "$ac_cv_search_strerror" >&6; }
3842ac_res=$ac_cv_search_strerror
3843if test "$ac_res" != no; then :
3844  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3845
3846fi
3847	for ac_prog in gawk mawk nawk awk
3848do
3849  # Extract the first word of "$ac_prog", so it can be a program name with args.
3850set dummy $ac_prog; ac_word=$2
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852$as_echo_n "checking for $ac_word... " >&6; }
3853if ${ac_cv_prog_AWK+:} false; then :
3854  $as_echo_n "(cached) " >&6
3855else
3856  if test -n "$AWK"; then
3857  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3858else
3859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860for as_dir in $PATH
3861do
3862  IFS=$as_save_IFS
3863  test -z "$as_dir" && as_dir=.
3864    for ac_exec_ext in '' $ac_executable_extensions; do
3865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3866    ac_cv_prog_AWK="$ac_prog"
3867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3868    break 2
3869  fi
3870done
3871  done
3872IFS=$as_save_IFS
3873
3874fi
3875fi
3876AWK=$ac_cv_prog_AWK
3877if test -n "$AWK"; then
3878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3879$as_echo "$AWK" >&6; }
3880else
3881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3882$as_echo "no" >&6; }
3883fi
3884
3885
3886  test -n "$AWK" && break
3887done
3888
3889# Extract the first word of "strip", so it can be a program name with args.
3890set dummy strip; ac_word=$2
3891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3892$as_echo_n "checking for $ac_word... " >&6; }
3893if ${ac_cv_prog_STRIP+:} false; then :
3894  $as_echo_n "(cached) " >&6
3895else
3896  if test -n "$STRIP"; then
3897  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3898else
3899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3900for as_dir in $PATH
3901do
3902  IFS=$as_save_IFS
3903  test -z "$as_dir" && as_dir=.
3904    for ac_exec_ext in '' $ac_executable_extensions; do
3905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3906    ac_cv_prog_STRIP="strip"
3907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3908    break 2
3909  fi
3910done
3911  done
3912IFS=$as_save_IFS
3913
3914  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
3915fi
3916fi
3917STRIP=$ac_cv_prog_STRIP
3918if test -n "$STRIP"; then
3919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3920$as_echo "$STRIP" >&6; }
3921else
3922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3923$as_echo "no" >&6; }
3924fi
3925
3926
3927
3928
3929
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3931$as_echo_n "checking for ANSI C header files... " >&6; }
3932if ${ac_cv_header_stdc+:} false; then :
3933  $as_echo_n "(cached) " >&6
3934else
3935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3936/* end confdefs.h.  */
3937#include <stdlib.h>
3938#include <stdarg.h>
3939#include <string.h>
3940#include <float.h>
3941
3942int
3943main ()
3944{
3945
3946  ;
3947  return 0;
3948}
3949_ACEOF
3950if ac_fn_c_try_compile "$LINENO"; then :
3951  ac_cv_header_stdc=yes
3952else
3953  ac_cv_header_stdc=no
3954fi
3955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3956
3957if test $ac_cv_header_stdc = yes; then
3958  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960/* end confdefs.h.  */
3961#include <string.h>
3962
3963_ACEOF
3964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3965  $EGREP "memchr" >/dev/null 2>&1; then :
3966
3967else
3968  ac_cv_header_stdc=no
3969fi
3970rm -f conftest*
3971
3972fi
3973
3974if test $ac_cv_header_stdc = yes; then
3975  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3977/* end confdefs.h.  */
3978#include <stdlib.h>
3979
3980_ACEOF
3981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3982  $EGREP "free" >/dev/null 2>&1; then :
3983
3984else
3985  ac_cv_header_stdc=no
3986fi
3987rm -f conftest*
3988
3989fi
3990
3991if test $ac_cv_header_stdc = yes; then
3992  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3993  if test "$cross_compiling" = yes; then :
3994  :
3995else
3996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997/* end confdefs.h.  */
3998#include <ctype.h>
3999#include <stdlib.h>
4000#if ((' ' & 0x0FF) == 0x020)
4001# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4002# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4003#else
4004# define ISLOWER(c) \
4005		   (('a' <= (c) && (c) <= 'i') \
4006		     || ('j' <= (c) && (c) <= 'r') \
4007		     || ('s' <= (c) && (c) <= 'z'))
4008# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4009#endif
4010
4011#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4012int
4013main ()
4014{
4015  int i;
4016  for (i = 0; i < 256; i++)
4017    if (XOR (islower (i), ISLOWER (i))
4018	|| toupper (i) != TOUPPER (i))
4019      return 2;
4020  return 0;
4021}
4022_ACEOF
4023if ac_fn_c_try_run "$LINENO"; then :
4024
4025else
4026  ac_cv_header_stdc=no
4027fi
4028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4029  conftest.$ac_objext conftest.beam conftest.$ac_ext
4030fi
4031
4032fi
4033fi
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4035$as_echo "$ac_cv_header_stdc" >&6; }
4036if test $ac_cv_header_stdc = yes; then
4037
4038$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4039
4040fi
4041
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4043$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4044if ${ac_cv_header_sys_wait_h+:} false; then :
4045  $as_echo_n "(cached) " >&6
4046else
4047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4048/* end confdefs.h.  */
4049#include <sys/types.h>
4050#include <sys/wait.h>
4051#ifndef WEXITSTATUS
4052# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4053#endif
4054#ifndef WIFEXITED
4055# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4056#endif
4057
4058int
4059main ()
4060{
4061  int s;
4062  wait (&s);
4063  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4064  ;
4065  return 0;
4066}
4067_ACEOF
4068if ac_fn_c_try_compile "$LINENO"; then :
4069  ac_cv_header_sys_wait_h=yes
4070else
4071  ac_cv_header_sys_wait_h=no
4072fi
4073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4074fi
4075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4076$as_echo "$ac_cv_header_sys_wait_h" >&6; }
4077if test $ac_cv_header_sys_wait_h = yes; then
4078
4079$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
4080
4081fi
4082
4083
4084
4085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4086$as_echo_n "checking --enable-fail-if-missing argument... " >&6; }
4087# Check whether --enable-fail_if_missing was given.
4088if test "${enable_fail_if_missing+set}" = set; then :
4089  enableval=$enable_fail_if_missing; fail_if_missing="yes"
4090else
4091  fail_if_missing="no"
4092fi
4093
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4095$as_echo "$fail_if_missing" >&6; }
4096
4097if test -z "$CFLAGS"; then
4098  CFLAGS="-O"
4099  test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
4100fi
4101if test "$GCC" = yes; then
4102    gccversion=`$CC -dumpversion`
4103  if test "x$gccversion" = "x"; then
4104        gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
4105  fi
4106    if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
4107    echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4108    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4109  else
4110    if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4111      echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4112      CFLAGS="$CFLAGS -fno-strength-reduce"
4113    fi
4114  fi
4115fi
4116
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent clang version" >&5
4118$as_echo_n "checking for recent clang version... " >&6; }
4119CLANG_VERSION_STRING=`$CC --version 2>/dev/null | sed  -n -e 's/^.*clang.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
4120if test x"$CLANG_VERSION_STRING" != x"" ; then
4121  CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4122  CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4123  CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4124  CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
4125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4126$as_echo "$CLANG_VERSION" >&6; }
4127          if test "$CLANG_VERSION" -ge 500002075 ; then
4128    CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'`
4129  fi
4130else
4131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4132$as_echo "no" >&6; }
4133fi
4134
4135CROSS_COMPILING=
4136if test "$cross_compiling" = yes; then
4137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4138$as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
4139  CROSS_COMPILING=1
4140fi
4141
4142
4143test "$GCC" = yes && CPP_MM=M;
4144
4145if test -f ./toolcheck; then
4146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy tools..." >&5
4147$as_echo "$as_me: checking for buggy tools..." >&6;}
4148  sh ./toolcheck 1>&6
4149fi
4150
4151OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4152
4153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BeOS" >&5
4154$as_echo_n "checking for BeOS... " >&6; }
4155case `uname` in
4156    BeOS)	OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
4157		BEOS=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4158$as_echo "yes" >&6; };;
4159    *)		BEOS=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4160$as_echo "no" >&6; };;
4161esac
4162
4163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4164$as_echo_n "checking for QNX... " >&6; }
4165case `uname` in
4166    QNX)	OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4167		test -z "$with_x" && with_x=no
4168		QNX=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4169$as_echo "yes" >&6; };;
4170    *)		QNX=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4171$as_echo "no" >&6; };;
4172esac
4173
4174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4175$as_echo_n "checking for Darwin (Mac OS X)... " >&6; }
4176if test "`(uname) 2>/dev/null`" = Darwin; then
4177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4178$as_echo "yes" >&6; }
4179
4180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4181$as_echo_n "checking --disable-darwin argument... " >&6; }
4182  # Check whether --enable-darwin was given.
4183if test "${enable_darwin+set}" = set; then :
4184  enableval=$enable_darwin;
4185else
4186  enable_darwin="yes"
4187fi
4188
4189  if test "$enable_darwin" = "yes"; then
4190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4191$as_echo "no" >&6; }
4192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4193$as_echo_n "checking if Darwin files are there... " >&6; }
4194    if test -f os_macosx.m; then
4195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4196$as_echo "yes" >&6; }
4197    else
4198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4199$as_echo "no, Darwin support disabled" >&6; }
4200      enable_darwin=no
4201    fi
4202  else
4203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4204$as_echo "yes, Darwin support excluded" >&6; }
4205  fi
4206
4207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4208$as_echo_n "checking --with-mac-arch argument... " >&6; }
4209
4210# Check whether --with-mac-arch was given.
4211if test "${with_mac_arch+set}" = set; then :
4212  withval=$with_mac_arch; MACARCH="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4213$as_echo "$MACARCH" >&6; }
4214else
4215  MACARCH="current"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4216$as_echo "defaulting to $MACARCH" >&6; }
4217fi
4218
4219
4220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4221$as_echo_n "checking --with-developer-dir argument... " >&6; }
4222
4223# Check whether --with-developer-dir was given.
4224if test "${with_developer_dir+set}" = set; then :
4225  withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4226$as_echo "$DEVELOPER_DIR" >&6; }
4227else
4228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4229$as_echo "not present" >&6; }
4230fi
4231
4232
4233  if test "x$DEVELOPER_DIR" = "x"; then
4234    # Extract the first word of "xcode-select", so it can be a program name with args.
4235set dummy xcode-select; ac_word=$2
4236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4237$as_echo_n "checking for $ac_word... " >&6; }
4238if ${ac_cv_path_XCODE_SELECT+:} false; then :
4239  $as_echo_n "(cached) " >&6
4240else
4241  case $XCODE_SELECT in
4242  [\\/]* | ?:[\\/]*)
4243  ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4244  ;;
4245  *)
4246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249  IFS=$as_save_IFS
4250  test -z "$as_dir" && as_dir=.
4251    for ac_exec_ext in '' $ac_executable_extensions; do
4252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4253    ac_cv_path_XCODE_SELECT="$as_dir/$ac_word$ac_exec_ext"
4254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4255    break 2
4256  fi
4257done
4258  done
4259IFS=$as_save_IFS
4260
4261  ;;
4262esac
4263fi
4264XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4265if test -n "$XCODE_SELECT"; then
4266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4267$as_echo "$XCODE_SELECT" >&6; }
4268else
4269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4270$as_echo "no" >&6; }
4271fi
4272
4273
4274    if test "x$XCODE_SELECT" != "x"; then
4275      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4276$as_echo_n "checking for developer dir using xcode-select... " >&6; }
4277      DEVELOPER_DIR=`$XCODE_SELECT -print-path`
4278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4279$as_echo "$DEVELOPER_DIR" >&6; }
4280    else
4281      DEVELOPER_DIR=/Developer
4282    fi
4283  fi
4284
4285  if test "x$MACARCH" = "xboth"; then
4286    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4287$as_echo_n "checking for 10.4 universal SDK... " >&6; }
4288                            save_cppflags="$CPPFLAGS"
4289    save_cflags="$CFLAGS"
4290    save_ldflags="$LDFLAGS"
4291    CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
4292    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293/* end confdefs.h.  */
4294
4295int
4296main ()
4297{
4298
4299  ;
4300  return 0;
4301}
4302_ACEOF
4303if ac_fn_c_try_link "$LINENO"; then :
4304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
4305$as_echo "found" >&6; }
4306else
4307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4308$as_echo "not found" >&6; }
4309	CFLAGS="$save_cflags"
4310	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4311$as_echo_n "checking if Intel architecture is supported... " >&6; }
4312	CPPFLAGS="$CPPFLAGS -arch i386"
4313	LDFLAGS="$save_ldflags -arch i386"
4314	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4315/* end confdefs.h.  */
4316
4317int
4318main ()
4319{
4320
4321  ;
4322  return 0;
4323}
4324_ACEOF
4325if ac_fn_c_try_link "$LINENO"; then :
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4327$as_echo "yes" >&6; }; MACARCH="intel"
4328else
4329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4330$as_echo "no" >&6; }
4331		MACARCH="ppc"
4332		CPPFLAGS="$save_cppflags -arch ppc"
4333		LDFLAGS="$save_ldflags -arch ppc"
4334fi
4335rm -f core conftest.err conftest.$ac_objext \
4336    conftest$ac_exeext conftest.$ac_ext
4337fi
4338rm -f core conftest.err conftest.$ac_objext \
4339    conftest$ac_exeext conftest.$ac_ext
4340  elif test "x$MACARCH" = "xintel"; then
4341    CPPFLAGS="$CPPFLAGS -arch intel"
4342    LDFLAGS="$LDFLAGS -arch intel"
4343  elif test "x$MACARCH" = "xppc"; then
4344    CPPFLAGS="$CPPFLAGS -arch ppc"
4345    LDFLAGS="$LDFLAGS -arch ppc"
4346  fi
4347
4348  if test "$enable_darwin" = "yes"; then
4349    MACOSX=yes
4350    OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
4351    OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
4352            CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX"
4353
4354                # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4355for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4356		  inttypes.h stdint.h unistd.h
4357do :
4358  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4359ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4360"
4361if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4362  cat >>confdefs.h <<_ACEOF
4363#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4364_ACEOF
4365
4366fi
4367
4368done
4369
4370
4371ac_fn_c_check_header_mongrel "$LINENO" "Carbon/Carbon.h" "ac_cv_header_Carbon_Carbon_h" "$ac_includes_default"
4372if test "x$ac_cv_header_Carbon_Carbon_h" = xyes; then :
4373  CARBON=yes
4374fi
4375
4376
4377    if test "x$CARBON" = "xyes"; then
4378      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
4379	with_x=no
4380      fi
4381    fi
4382  fi
4383
4384        if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
4385    CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
4386  fi
4387
4388else
4389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4390$as_echo "no" >&6; }
4391fi
4392
4393for ac_header in AvailabilityMacros.h
4394do :
4395  ac_fn_c_check_header_mongrel "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
4396if test "x$ac_cv_header_AvailabilityMacros_h" = xyes; then :
4397  cat >>confdefs.h <<_ACEOF
4398#define HAVE_AVAILABILITYMACROS_H 1
4399_ACEOF
4400
4401fi
4402
4403done
4404
4405
4406
4407
4408
4409if test "$cross_compiling" = no; then
4410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
4411$as_echo_n "checking --with-local-dir argument... " >&6; }
4412  have_local_include=''
4413  have_local_lib=''
4414
4415# Check whether --with-local-dir was given.
4416if test "${with_local_dir+set}" = set; then :
4417  withval=$with_local_dir;
4418    local_dir="$withval"
4419    case "$withval" in
4420    */*) ;;
4421    no)
4422      # avoid adding local dir to LDFLAGS and CPPFLAGS
4423      have_local_include=yes
4424      have_local_lib=yes
4425      ;;
4426    *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
4427    esac
4428	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
4429$as_echo "$local_dir" >&6; }
4430
4431else
4432
4433    local_dir=/usr/local
4434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
4435$as_echo "Defaulting to $local_dir" >&6; }
4436
4437fi
4438
4439  if test "$GCC" = yes -a "$local_dir" != no; then
4440    echo 'void f(){}' > conftest.c
4441        have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
4442    have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
4443    rm -f conftest.c conftest.o
4444  fi
4445  if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
4446    tt=`echo "$LDFLAGS" | sed -e "s+-L${local_dir}/lib ++g" -e "s+-L${local_dir}/lib$++g"`
4447    if test "$tt" = "$LDFLAGS"; then
4448      LDFLAGS="$LDFLAGS -L${local_dir}/lib"
4449    fi
4450  fi
4451  if test -z "$have_local_include" -a -d "${local_dir}/include"; then
4452    tt=`echo "$CPPFLAGS" | sed -e "s+-I${local_dir}/include ++g" -e "s+-I${local_dir}/include$++g"`
4453    if test "$tt" = "$CPPFLAGS"; then
4454      CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
4455    fi
4456  fi
4457fi
4458
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
4460$as_echo_n "checking --with-vim-name argument... " >&6; }
4461
4462# Check whether --with-vim-name was given.
4463if test "${with_vim_name+set}" = set; then :
4464  withval=$with_vim_name; VIMNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
4465$as_echo "$VIMNAME" >&6; }
4466else
4467  VIMNAME="vim"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
4468$as_echo "Defaulting to $VIMNAME" >&6; }
4469fi
4470
4471
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
4473$as_echo_n "checking --with-ex-name argument... " >&6; }
4474
4475# Check whether --with-ex-name was given.
4476if test "${with_ex_name+set}" = set; then :
4477  withval=$with_ex_name; EXNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
4478$as_echo "$EXNAME" >&6; }
4479else
4480  EXNAME="ex"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
4481$as_echo "Defaulting to ex" >&6; }
4482fi
4483
4484
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
4486$as_echo_n "checking --with-view-name argument... " >&6; }
4487
4488# Check whether --with-view-name was given.
4489if test "${with_view_name+set}" = set; then :
4490  withval=$with_view_name; VIEWNAME="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
4491$as_echo "$VIEWNAME" >&6; }
4492else
4493  VIEWNAME="view"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
4494$as_echo "Defaulting to view" >&6; }
4495fi
4496
4497
4498
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
4500$as_echo_n "checking --with-global-runtime argument... " >&6; }
4501
4502# Check whether --with-global-runtime was given.
4503if test "${with_global_runtime+set}" = set; then :
4504  withval=$with_global_runtime; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4505$as_echo "$withval" >&6; }; cat >>confdefs.h <<_ACEOF
4506#define RUNTIME_GLOBAL "$withval"
4507_ACEOF
4508
4509else
4510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511$as_echo "no" >&6; }
4512fi
4513
4514
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
4516$as_echo_n "checking --with-modified-by argument... " >&6; }
4517
4518# Check whether --with-modified-by was given.
4519if test "${with_modified_by+set}" = set; then :
4520  withval=$with_modified_by; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4521$as_echo "$withval" >&6; }; cat >>confdefs.h <<_ACEOF
4522#define MODIFIED_BY "$withval"
4523_ACEOF
4524
4525else
4526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527$as_echo "no" >&6; }
4528fi
4529
4530
4531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
4532$as_echo_n "checking if character set is EBCDIC... " >&6; }
4533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4534/* end confdefs.h.  */
4535
4536int
4537main ()
4538{
4539 /* TryCompile function for CharSet.
4540   Treat any failure as ASCII for compatibility with existing art.
4541   Use compile-time rather than run-time tests for cross-compiler
4542   tolerance.  */
4543#if '0'!=240
4544make an error "Character set is not EBCDIC"
4545#endif
4546  ;
4547  return 0;
4548}
4549_ACEOF
4550if ac_fn_c_try_compile "$LINENO"; then :
4551   # TryCompile action if true
4552cf_cv_ebcdic=yes
4553else
4554   # TryCompile action if false
4555cf_cv_ebcdic=no
4556fi
4557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4558# end of TryCompile ])
4559# end of CacheVal CvEbcdic
4560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
4561$as_echo "$cf_cv_ebcdic" >&6; }
4562case "$cf_cv_ebcdic" in  #(vi
4563    yes)	$as_echo "#define EBCDIC 1" >>confdefs.h
4564
4565		line_break='"\\n"'
4566		;;
4567    *)		line_break='"\\012"';;
4568esac
4569
4570
4571if test "$cf_cv_ebcdic" = "yes"; then
4572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
4573$as_echo_n "checking for z/OS Unix... " >&6; }
4574case `uname` in
4575    OS/390)	zOSUnix="yes";
4576										if test "$CC" = "cc"; then
4577		  ccm="$_CC_CCMODE"
4578		  ccn="CC"
4579		else
4580		  if test "$CC" = "c89"; then
4581		    ccm="$_CC_C89MODE"
4582		    ccn="C89"
4583		  else
4584		    ccm=1
4585		  fi
4586		fi
4587		if test "$ccm" != "1"; then
4588		  echo ""
4589		  echo "------------------------------------------"
4590		  echo " On z/OS Unix, the environment variable"
4591		  echo " _CC_${ccn}MODE must be set to \"1\"!"
4592		  echo " Do:"
4593		  echo "    export _CC_${ccn}MODE=1"
4594		  echo " and then call configure again."
4595		  echo "------------------------------------------"
4596		  exit 1
4597		fi
4598		# Set CFLAGS for configure process.
4599		# This will be reset later for config.mk.
4600		# Use haltonmsg to force error for missing H files.
4601		CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
4602		LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
4603		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4604$as_echo "yes" >&6; }
4605		;;
4606    *)		zOSUnix="no";
4607		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4608$as_echo "no" >&6; }
4609		;;
4610esac
4611fi
4612
4613if test "$zOSUnix" = "yes"; then
4614    QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/'"
4615else
4616    QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/'"
4617fi
4618
4619
4620
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
4622$as_echo_n "checking --disable-smack argument... " >&6; }
4623# Check whether --enable-smack was given.
4624if test "${enable_smack+set}" = set; then :
4625  enableval=$enable_smack;
4626else
4627  enable_smack="yes"
4628fi
4629
4630if test "$enable_smack" = "yes"; then
4631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4632$as_echo "no" >&6; }
4633  ac_fn_c_check_header_mongrel "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
4634if test "x$ac_cv_header_linux_xattr_h" = xyes; then :
4635  true
4636else
4637  enable_smack="no"
4638fi
4639
4640
4641else
4642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4643$as_echo "yes" >&6; }
4644fi
4645if test "$enable_smack" = "yes"; then
4646  ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
4647if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
4648  true
4649else
4650  enable_smack="no"
4651fi
4652
4653
4654fi
4655if test "$enable_smack" = "yes"; then
4656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
4657$as_echo_n "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
4658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4659/* end confdefs.h.  */
4660#include <linux/xattr.h>
4661_ACEOF
4662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4663  $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1; then :
4664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4665$as_echo "yes" >&6; }
4666else
4667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4668$as_echo "no" >&6; }; enable_smack="no"
4669fi
4670rm -f conftest*
4671
4672fi
4673if test "$enable_smack" = "yes"; then
4674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
4675$as_echo_n "checking for setxattr in -lattr... " >&6; }
4676if ${ac_cv_lib_attr_setxattr+:} false; then :
4677  $as_echo_n "(cached) " >&6
4678else
4679  ac_check_lib_save_LIBS=$LIBS
4680LIBS="-lattr  $LIBS"
4681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4682/* end confdefs.h.  */
4683
4684/* Override any GCC internal prototype to avoid an error.
4685   Use char because int might match the return type of a GCC
4686   builtin and then its argument prototype would still apply.  */
4687#ifdef __cplusplus
4688extern "C"
4689#endif
4690char setxattr ();
4691int
4692main ()
4693{
4694return setxattr ();
4695  ;
4696  return 0;
4697}
4698_ACEOF
4699if ac_fn_c_try_link "$LINENO"; then :
4700  ac_cv_lib_attr_setxattr=yes
4701else
4702  ac_cv_lib_attr_setxattr=no
4703fi
4704rm -f core conftest.err conftest.$ac_objext \
4705    conftest$ac_exeext conftest.$ac_ext
4706LIBS=$ac_check_lib_save_LIBS
4707fi
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
4709$as_echo "$ac_cv_lib_attr_setxattr" >&6; }
4710if test "x$ac_cv_lib_attr_setxattr" = xyes; then :
4711  LIBS="$LIBS -lattr"
4712	   found_smack="yes"
4713	   $as_echo "#define HAVE_SMACK 1" >>confdefs.h
4714
4715fi
4716
4717fi
4718
4719if test "x$found_smack" = "x"; then
4720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
4721$as_echo_n "checking --disable-selinux argument... " >&6; }
4722  # Check whether --enable-selinux was given.
4723if test "${enable_selinux+set}" = set; then :
4724  enableval=$enable_selinux;
4725else
4726  enable_selinux="yes"
4727fi
4728
4729  if test "$enable_selinux" = "yes"; then
4730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
4733$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
4734if ${ac_cv_lib_selinux_is_selinux_enabled+:} false; then :
4735  $as_echo_n "(cached) " >&6
4736else
4737  ac_check_lib_save_LIBS=$LIBS
4738LIBS="-lselinux  $LIBS"
4739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4740/* end confdefs.h.  */
4741
4742/* Override any GCC internal prototype to avoid an error.
4743   Use char because int might match the return type of a GCC
4744   builtin and then its argument prototype would still apply.  */
4745#ifdef __cplusplus
4746extern "C"
4747#endif
4748char is_selinux_enabled ();
4749int
4750main ()
4751{
4752return is_selinux_enabled ();
4753  ;
4754  return 0;
4755}
4756_ACEOF
4757if ac_fn_c_try_link "$LINENO"; then :
4758  ac_cv_lib_selinux_is_selinux_enabled=yes
4759else
4760  ac_cv_lib_selinux_is_selinux_enabled=no
4761fi
4762rm -f core conftest.err conftest.$ac_objext \
4763    conftest$ac_exeext conftest.$ac_ext
4764LIBS=$ac_check_lib_save_LIBS
4765fi
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
4767$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
4768if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes; then :
4769  LIBS="$LIBS -lselinux"
4770	     $as_echo "#define HAVE_SELINUX 1" >>confdefs.h
4771
4772fi
4773
4774  else
4775     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4776$as_echo "yes" >&6; }
4777  fi
4778fi
4779
4780
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
4782$as_echo_n "checking --with-features argument... " >&6; }
4783
4784# Check whether --with-features was given.
4785if test "${with_features+set}" = set; then :
4786  withval=$with_features; features="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $features" >&5
4787$as_echo "$features" >&6; }
4788else
4789  features="huge"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
4790$as_echo "Defaulting to huge" >&6; }
4791fi
4792
4793
4794dovimdiff=""
4795dogvimdiff=""
4796case "$features" in
4797  tiny)		$as_echo "#define FEAT_TINY 1" >>confdefs.h
4798 ;;
4799  small)	$as_echo "#define FEAT_SMALL 1" >>confdefs.h
4800 ;;
4801  normal)	$as_echo "#define FEAT_NORMAL 1" >>confdefs.h
4802 dovimdiff="installvimdiff";
4803			dogvimdiff="installgvimdiff" ;;
4804  big)		$as_echo "#define FEAT_BIG 1" >>confdefs.h
4805 dovimdiff="installvimdiff";
4806			dogvimdiff="installgvimdiff" ;;
4807  huge)		$as_echo "#define FEAT_HUGE 1" >>confdefs.h
4808 dovimdiff="installvimdiff";
4809			dogvimdiff="installgvimdiff" ;;
4810  *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
4811$as_echo "Sorry, $features is not supported" >&6; } ;;
4812esac
4813
4814
4815
4816
4817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
4818$as_echo_n "checking --with-compiledby argument... " >&6; }
4819
4820# Check whether --with-compiledby was given.
4821if test "${with_compiledby+set}" = set; then :
4822  withval=$with_compiledby; compiledby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
4823$as_echo "$withval" >&6; }
4824else
4825  compiledby=""; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826$as_echo "no" >&6; }
4827fi
4828
4829
4830
4831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
4832$as_echo_n "checking --disable-xsmp argument... " >&6; }
4833# Check whether --enable-xsmp was given.
4834if test "${enable_xsmp+set}" = set; then :
4835  enableval=$enable_xsmp;
4836else
4837  enable_xsmp="yes"
4838fi
4839
4840
4841if test "$enable_xsmp" = "yes"; then
4842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4843$as_echo "no" >&6; }
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
4845$as_echo_n "checking --disable-xsmp-interact argument... " >&6; }
4846  # Check whether --enable-xsmp-interact was given.
4847if test "${enable_xsmp_interact+set}" = set; then :
4848  enableval=$enable_xsmp_interact;
4849else
4850  enable_xsmp_interact="yes"
4851fi
4852
4853  if test "$enable_xsmp_interact" = "yes"; then
4854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856    $as_echo "#define USE_XSMP_INTERACT 1" >>confdefs.h
4857
4858  else
4859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4860$as_echo "yes" >&6; }
4861  fi
4862else
4863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4864$as_echo "yes" >&6; }
4865fi
4866
4867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
4868$as_echo_n "checking --enable-luainterp argument... " >&6; }
4869# Check whether --enable-luainterp was given.
4870if test "${enable_luainterp+set}" = set; then :
4871  enableval=$enable_luainterp;
4872else
4873  enable_luainterp="no"
4874fi
4875
4876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
4877$as_echo "$enable_luainterp" >&6; }
4878
4879if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
4880  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
4881    as_fn_error $? "cannot use Lua with tiny or small features" "$LINENO" 5
4882  fi
4883
4884
4885
4886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
4887$as_echo_n "checking --with-lua-prefix argument... " >&6; }
4888
4889# Check whether --with-lua_prefix was given.
4890if test "${with_lua_prefix+set}" = set; then :
4891  withval=$with_lua_prefix; with_lua_prefix="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
4892$as_echo "$with_lua_prefix" >&6; }
4893else
4894  with_lua_prefix="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4895$as_echo "no" >&6; }
4896fi
4897
4898
4899  if test "X$with_lua_prefix" != "X"; then
4900       vi_cv_path_lua_pfx="$with_lua_prefix"
4901  else
4902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
4903$as_echo_n "checking LUA_PREFIX environment var... " >&6; }
4904    if test "X$LUA_PREFIX" != "X"; then
4905	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
4906$as_echo "\"$LUA_PREFIX\"" >&6; }
4907	vi_cv_path_lua_pfx="$LUA_PREFIX"
4908    else
4909	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
4910$as_echo "not set, default to /usr" >&6; }
4911	vi_cv_path_lua_pfx="/usr"
4912    fi
4913  fi
4914
4915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
4916$as_echo_n "checking --with-luajit... " >&6; }
4917
4918# Check whether --with-luajit was given.
4919if test "${with_luajit+set}" = set; then :
4920  withval=$with_luajit; vi_cv_with_luajit="$withval"
4921else
4922  vi_cv_with_luajit="no"
4923fi
4924
4925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
4926$as_echo "$vi_cv_with_luajit" >&6; }
4927
4928  LUA_INC=
4929  if test "X$vi_cv_path_lua_pfx" != "X"; then
4930    if test "x$vi_cv_with_luajit" != "xno"; then
4931            # Extract the first word of "luajit", so it can be a program name with args.
4932set dummy luajit; ac_word=$2
4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934$as_echo_n "checking for $ac_word... " >&6; }
4935if ${ac_cv_path_vi_cv_path_luajit+:} false; then :
4936  $as_echo_n "(cached) " >&6
4937else
4938  case $vi_cv_path_luajit in
4939  [\\/]* | ?:[\\/]*)
4940  ac_cv_path_vi_cv_path_luajit="$vi_cv_path_luajit" # Let the user override the test with a path.
4941  ;;
4942  *)
4943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944for as_dir in $PATH
4945do
4946  IFS=$as_save_IFS
4947  test -z "$as_dir" && as_dir=.
4948    for ac_exec_ext in '' $ac_executable_extensions; do
4949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4950    ac_cv_path_vi_cv_path_luajit="$as_dir/$ac_word$ac_exec_ext"
4951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952    break 2
4953  fi
4954done
4955  done
4956IFS=$as_save_IFS
4957
4958  ;;
4959esac
4960fi
4961vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
4962if test -n "$vi_cv_path_luajit"; then
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
4964$as_echo "$vi_cv_path_luajit" >&6; }
4965else
4966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
4968fi
4969
4970
4971      if test "X$vi_cv_path_luajit" != "X"; then
4972		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
4973$as_echo_n "checking LuaJIT version... " >&6; }
4974if ${vi_cv_version_luajit+:} false; then :
4975  $as_echo_n "(cached) " >&6
4976else
4977   vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-[a-z0-9]*\)* .*/\1/'`
4978fi
4979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
4980$as_echo "$vi_cv_version_luajit" >&6; }
4981	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
4982$as_echo_n "checking Lua version of LuaJIT... " >&6; }
4983if ${vi_cv_version_lua_luajit+:} false; then :
4984  $as_echo_n "(cached) " >&6
4985else
4986   vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
4987fi
4988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
4989$as_echo "$vi_cv_version_lua_luajit" >&6; }
4990	vi_cv_path_lua="$vi_cv_path_luajit"
4991	vi_cv_version_lua="$vi_cv_version_lua_luajit"
4992      fi
4993    else
4994            # Extract the first word of "lua", so it can be a program name with args.
4995set dummy lua; ac_word=$2
4996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4997$as_echo_n "checking for $ac_word... " >&6; }
4998if ${ac_cv_path_vi_cv_path_plain_lua+:} false; then :
4999  $as_echo_n "(cached) " >&6
5000else
5001  case $vi_cv_path_plain_lua in
5002  [\\/]* | ?:[\\/]*)
5003  ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5004  ;;
5005  *)
5006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007for as_dir in $PATH
5008do
5009  IFS=$as_save_IFS
5010  test -z "$as_dir" && as_dir=.
5011    for ac_exec_ext in '' $ac_executable_extensions; do
5012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5013    ac_cv_path_vi_cv_path_plain_lua="$as_dir/$ac_word$ac_exec_ext"
5014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5015    break 2
5016  fi
5017done
5018  done
5019IFS=$as_save_IFS
5020
5021  ;;
5022esac
5023fi
5024vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5025if test -n "$vi_cv_path_plain_lua"; then
5026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5027$as_echo "$vi_cv_path_plain_lua" >&6; }
5028else
5029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5030$as_echo "no" >&6; }
5031fi
5032
5033
5034      if test "X$vi_cv_path_plain_lua" != "X"; then
5035		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5036$as_echo_n "checking Lua version... " >&6; }
5037if ${vi_cv_version_plain_lua+:} false; then :
5038  $as_echo_n "(cached) " >&6
5039else
5040   vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5041fi
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5043$as_echo "$vi_cv_version_plain_lua" >&6; }
5044      fi
5045      vi_cv_path_lua="$vi_cv_path_plain_lua"
5046      vi_cv_version_lua="$vi_cv_version_plain_lua"
5047    fi
5048    if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
5049      { $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
5050$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit... " >&6; }
5051      if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
5052	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5053$as_echo "yes" >&6; }
5054	LUA_INC=/luajit-$vi_cv_version_luajit
5055      fi
5056    fi
5057    if test "X$LUA_INC" = "X"; then
5058      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5059$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
5060      if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
5061	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5062$as_echo "yes" >&6; }
5063      else
5064	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065$as_echo "no" >&6; }
5066	{ $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
5067$as_echo_n "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
5068	if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
5069	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5070$as_echo "yes" >&6; }
5071	  LUA_INC=/lua$vi_cv_version_lua
5072	else
5073	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5074$as_echo "no" >&6; }
5075	  vi_cv_path_lua_pfx=
5076	fi
5077      fi
5078    fi
5079  fi
5080
5081  if test "X$vi_cv_path_lua_pfx" != "X"; then
5082    if test "x$vi_cv_with_luajit" != "xno"; then
5083      multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5084      if test "X$multiarch" != "X"; then
5085	lib_multiarch="lib/${multiarch}"
5086      else
5087	lib_multiarch="lib"
5088      fi
5089      if test "X$vi_cv_version_lua" = "X"; then
5090	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5091      else
5092	LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5093      fi
5094    else
5095      if test "X$LUA_INC" != "X"; then
5096		LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua$vi_cv_version_lua"
5097      else
5098	LUA_LIBS="-L${vi_cv_path_lua_pfx}/lib -llua"
5099      fi
5100    fi
5101    if test "$enable_luainterp" = "dynamic"; then
5102      lua_ok="yes"
5103    else
5104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5105$as_echo_n "checking if link with ${LUA_LIBS} is sane... " >&6; }
5106      libs_save=$LIBS
5107      LIBS="$LIBS $LUA_LIBS"
5108      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5109/* end confdefs.h.  */
5110
5111int
5112main ()
5113{
5114
5115  ;
5116  return 0;
5117}
5118_ACEOF
5119if ac_fn_c_try_link "$LINENO"; then :
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5121$as_echo "yes" >&6; }; lua_ok="yes"
5122else
5123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5124$as_echo "no" >&6; }; lua_ok="no"; LUA_LIBS=""
5125fi
5126rm -f core conftest.err conftest.$ac_objext \
5127    conftest$ac_exeext conftest.$ac_ext
5128      LIBS=$libs_save
5129    fi
5130    if test "x$lua_ok" = "xyes"; then
5131      LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5132      LUA_SRC="if_lua.c"
5133      LUA_OBJ="objects/if_lua.o"
5134      LUA_PRO="if_lua.pro"
5135      $as_echo "#define FEAT_LUA 1" >>confdefs.h
5136
5137    fi
5138    if test "$enable_luainterp" = "dynamic"; then
5139      if test "x$vi_cv_with_luajit" != "xno"; then
5140	luajit="jit"
5141      fi
5142      if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5143	vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5144      else
5145	if test "x$MACOSX" = "xyes"; then
5146	  ext="dylib"
5147	  indexes=""
5148	else
5149	  ext="so"
5150	  indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5151	  multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5152	  if test "X$multiarch" != "X"; then
5153	    lib_multiarch="lib/${multiarch}"
5154	  fi
5155	fi
5156			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5157$as_echo_n "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
5158	for subdir in "${lib_multiarch}" lib64 lib; do
5159	  if test -z "$subdir"; then
5160	    continue
5161	  fi
5162	  for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5163	    ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5164	    for i in $indexes ""; do
5165	      if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
5166		sover2="$i"
5167		break 3
5168	      fi
5169	    done
5170	  done
5171	  sover=""
5172	done
5173	if test "X$sover" = "X"; then
5174	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175$as_echo "no" >&6; }
5176	  lua_ok="no"
5177	  vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5178	else
5179	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5180$as_echo "yes" >&6; }
5181	  lua_ok="yes"
5182	  vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5183	fi
5184      fi
5185      $as_echo "#define DYNAMIC_LUA 1" >>confdefs.h
5186
5187      LUA_LIBS=""
5188      LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
5189    fi
5190    if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
5191       test "x$MACOSX" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
5192       test "`(uname -m) 2>/dev/null`" = "x86_64"; then
5193            LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5194    fi
5195  fi
5196  if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
5197    as_fn_error $? "could not configure lua" "$LINENO" 5
5198  fi
5199
5200
5201
5202
5203
5204fi
5205
5206
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5208$as_echo_n "checking --enable-mzschemeinterp argument... " >&6; }
5209# Check whether --enable-mzschemeinterp was given.
5210if test "${enable_mzschemeinterp+set}" = set; then :
5211  enableval=$enable_mzschemeinterp;
5212else
5213  enable_mzschemeinterp="no"
5214fi
5215
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5217$as_echo "$enable_mzschemeinterp" >&6; }
5218
5219if test "$enable_mzschemeinterp" = "yes"; then
5220
5221
5222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5223$as_echo_n "checking --with-plthome argument... " >&6; }
5224
5225# Check whether --with-plthome was given.
5226if test "${with_plthome+set}" = set; then :
5227  withval=$with_plthome; with_plthome="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5228$as_echo "$with_plthome" >&6; }
5229else
5230  with_plthome="";{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5231$as_echo "\"no\"" >&6; }
5232fi
5233
5234
5235  if test "X$with_plthome" != "X"; then
5236       vi_cv_path_mzscheme_pfx="$with_plthome"
5237       vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5238  else
5239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5240$as_echo_n "checking PLTHOME environment var... " >&6; }
5241    if test "X$PLTHOME" != "X"; then
5242	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5243$as_echo "\"$PLTHOME\"" >&6; }
5244	vi_cv_path_mzscheme_pfx="$PLTHOME"
5245	vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
5246    else
5247	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5248$as_echo "not set" >&6; }
5249		# Extract the first word of "mzscheme", so it can be a program name with args.
5250set dummy mzscheme; ac_word=$2
5251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5252$as_echo_n "checking for $ac_word... " >&6; }
5253if ${ac_cv_path_vi_cv_path_mzscheme+:} false; then :
5254  $as_echo_n "(cached) " >&6
5255else
5256  case $vi_cv_path_mzscheme in
5257  [\\/]* | ?:[\\/]*)
5258  ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
5259  ;;
5260  *)
5261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5262for as_dir in $PATH
5263do
5264  IFS=$as_save_IFS
5265  test -z "$as_dir" && as_dir=.
5266    for ac_exec_ext in '' $ac_executable_extensions; do
5267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5268    ac_cv_path_vi_cv_path_mzscheme="$as_dir/$ac_word$ac_exec_ext"
5269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5270    break 2
5271  fi
5272done
5273  done
5274IFS=$as_save_IFS
5275
5276  ;;
5277esac
5278fi
5279vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
5280if test -n "$vi_cv_path_mzscheme"; then
5281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
5282$as_echo "$vi_cv_path_mzscheme" >&6; }
5283else
5284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5285$as_echo "no" >&6; }
5286fi
5287
5288
5289
5290			if test "X$vi_cv_path_mzscheme" != "X"; then
5291	  lsout=`ls -l $vi_cv_path_mzscheme`
5292	  if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
5293	    vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
5294	  fi
5295	fi
5296
5297	if test "X$vi_cv_path_mzscheme" != "X"; then
5298	    	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
5299$as_echo_n "checking MzScheme install prefix... " >&6; }
5300if ${vi_cv_path_mzscheme_pfx+:} false; then :
5301  $as_echo_n "(cached) " >&6
5302else
5303  	    	    echo "(display (simplify-path		\
5304	       (build-path (call-with-values	\
5305		(lambda () (split-path (find-system-path (quote exec-file)))) \
5306		(lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
5307	    	     vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
5308		sed -e 's+/$++'`
5309fi
5310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
5311$as_echo "$vi_cv_path_mzscheme_pfx" >&6; }
5312	    rm -f mzdirs.scm
5313	fi
5314    fi
5315  fi
5316
5317  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
5319$as_echo_n "checking for racket include directory... " >&6; }
5320    SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
5321    if test "X$SCHEME_INC" != "X"; then
5322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
5323$as_echo "${SCHEME_INC}" >&6; }
5324    else
5325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5326$as_echo "not found" >&6; }
5327      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
5328$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
5329      if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
5330	SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
5331	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5332$as_echo "yes" >&6; }
5333      else
5334	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
5337$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
5338	if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
5339	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5340$as_echo "yes" >&6; }
5341	  SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
5342	else
5343	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5344$as_echo "no" >&6; }
5345	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
5346$as_echo_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
5347	  if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
5348	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5349$as_echo "yes" >&6; }
5350	    SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
5351	  else
5352	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
5355$as_echo_n "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
5356	    if test -f /usr/include/plt/scheme.h; then
5357	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5358$as_echo "yes" >&6; }
5359	      SCHEME_INC=/usr/include/plt
5360	    else
5361	      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5362$as_echo "no" >&6; }
5363	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
5364$as_echo_n "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
5365	      if test -f /usr/include/racket/scheme.h; then
5366		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5367$as_echo "yes" >&6; }
5368		SCHEME_INC=/usr/include/racket
5369	      else
5370		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5371$as_echo "no" >&6; }
5372		vi_cv_path_mzscheme_pfx=
5373	      fi
5374	    fi
5375	  fi
5376	fi
5377      fi
5378    fi
5379  fi
5380
5381  if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
5382
5383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
5384$as_echo_n "checking for racket lib directory... " >&6; }
5385    SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
5386    if test "X$SCHEME_LIB" != "X"; then
5387      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
5388$as_echo "${SCHEME_LIB}" >&6; }
5389    else
5390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5391$as_echo "not found" >&6; }
5392    fi
5393
5394    for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
5395      if test "X$path" != "X"; then
5396	if test "x$MACOSX" = "xyes"; then
5397	  MZSCHEME_LIBS="-framework Racket"
5398	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5399	elif test -f "${path}/libmzscheme3m.a"; then
5400	  MZSCHEME_LIBS="${path}/libmzscheme3m.a"
5401	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5402	elif test -f "${path}/libracket3m.a"; then
5403	  MZSCHEME_LIBS="${path}/libracket3m.a"
5404	  MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5405	elif test -f "${path}/libracket.a"; then
5406	  MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
5407	elif test -f "${path}/libmzscheme.a"; then
5408	  MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
5409	else
5410	  	  if test -f "${path}/libmzscheme3m.so"; then
5411	    MZSCHEME_LIBS="-L${path} -lmzscheme3m"
5412	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5413	  elif test -f "${path}/libracket3m.so"; then
5414	    MZSCHEME_LIBS="-L${path} -lracket3m"
5415	    MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
5416	  elif test -f "${path}/libracket.so"; then
5417	    MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
5418	  else
5419	    	    if test "$path" != "$SCHEME_LIB"; then
5420	      continue
5421	    fi
5422	    MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
5423	  fi
5424	  if test "$GCC" = yes; then
5425	    	    	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
5426	  elif test "`(uname) 2>/dev/null`" = SunOS &&
5427				   uname -r | grep '^5' >/dev/null; then
5428	    MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
5429	  fi
5430	fi
5431      fi
5432      if test "X$MZSCHEME_LIBS" != "X"; then
5433	break
5434      fi
5435    done
5436
5437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
5438$as_echo_n "checking if racket requires -pthread... " >&6; }
5439    if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
5440      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5441$as_echo "yes" >&6; }
5442      MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
5443      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
5444    else
5445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5446$as_echo "no" >&6; }
5447    fi
5448
5449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
5450$as_echo_n "checking for racket config directory... " >&6; }
5451    SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
5452    if test "X$SCHEME_CONFIGDIR" != "X"; then
5453      MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
5454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
5455$as_echo "${SCHEME_CONFIGDIR}" >&6; }
5456    else
5457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5458$as_echo "not found" >&6; }
5459    fi
5460
5461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
5462$as_echo_n "checking for racket collects directory... " >&6; }
5463    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))))'`
5464    if test "X$SCHEME_COLLECTS" = "X"; then
5465      if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
5466	SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
5467      else
5468	if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
5469	  SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
5470	else
5471	  if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
5472	    SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
5473	  else
5474	    if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
5475	      SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
5476	    fi
5477	  fi
5478	fi
5479      fi
5480    fi
5481    if test "X$SCHEME_COLLECTS" != "X" ; then
5482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
5483$as_echo "${SCHEME_COLLECTS}" >&6; }
5484    else
5485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5486$as_echo "not found" >&6; }
5487    fi
5488
5489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
5490$as_echo_n "checking for mzscheme_base.c... " >&6; }
5491    if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
5492      MZSCHEME_EXTRA="mzscheme_base.c"
5493      MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5494      MZSCHEME_MOD="++lib scheme/base"
5495    else
5496      if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
5497	MZSCHEME_EXTRA="mzscheme_base.c"
5498	MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
5499	MZSCHEME_MOD="++lib scheme/base"
5500      else
5501	if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
5502	  MZSCHEME_EXTRA="mzscheme_base.c"
5503	  MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
5504	  MZSCHEME_MOD=""
5505	fi
5506      fi
5507    fi
5508    if test "X$MZSCHEME_EXTRA" != "X" ; then
5509            MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
5510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: needed" >&5
5511$as_echo "needed" >&6; }
5512    else
5513      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
5514$as_echo "not needed" >&6; }
5515    fi
5516
5517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
5518$as_echo_n "checking for ffi_type_void in -lffi... " >&6; }
5519if ${ac_cv_lib_ffi_ffi_type_void+:} false; then :
5520  $as_echo_n "(cached) " >&6
5521else
5522  ac_check_lib_save_LIBS=$LIBS
5523LIBS="-lffi  $LIBS"
5524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5525/* end confdefs.h.  */
5526
5527/* Override any GCC internal prototype to avoid an error.
5528   Use char because int might match the return type of a GCC
5529   builtin and then its argument prototype would still apply.  */
5530#ifdef __cplusplus
5531extern "C"
5532#endif
5533char ffi_type_void ();
5534int
5535main ()
5536{
5537return ffi_type_void ();
5538  ;
5539  return 0;
5540}
5541_ACEOF
5542if ac_fn_c_try_link "$LINENO"; then :
5543  ac_cv_lib_ffi_ffi_type_void=yes
5544else
5545  ac_cv_lib_ffi_ffi_type_void=no
5546fi
5547rm -f core conftest.err conftest.$ac_objext \
5548    conftest$ac_exeext conftest.$ac_ext
5549LIBS=$ac_check_lib_save_LIBS
5550fi
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
5552$as_echo "$ac_cv_lib_ffi_ffi_type_void" >&6; }
5553if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes; then :
5554  MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
5555fi
5556
5557
5558    MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
5559      -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
5560
5561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
5562$as_echo_n "checking if compile and link flags for MzScheme are sane... " >&6; }
5563    cflags_save=$CFLAGS
5564    libs_save=$LIBS
5565    CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
5566    LIBS="$LIBS $MZSCHEME_LIBS"
5567    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5568/* end confdefs.h.  */
5569
5570int
5571main ()
5572{
5573
5574  ;
5575  return 0;
5576}
5577_ACEOF
5578if ac_fn_c_try_link "$LINENO"; then :
5579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5580$as_echo "yes" >&6; }; mzs_ok=yes
5581else
5582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
5583$as_echo "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
5584fi
5585rm -f core conftest.err conftest.$ac_objext \
5586    conftest$ac_exeext conftest.$ac_ext
5587    CFLAGS=$cflags_save
5588    LIBS=$libs_save
5589    if test $mzs_ok = yes; then
5590      MZSCHEME_SRC="if_mzsch.c"
5591      MZSCHEME_OBJ="objects/if_mzsch.o"
5592      MZSCHEME_PRO="if_mzsch.pro"
5593      $as_echo "#define FEAT_MZSCHEME 1" >>confdefs.h
5594
5595    else
5596      MZSCHEME_CFLAGS=
5597      MZSCHEME_LIBS=
5598      MZSCHEME_EXTRA=
5599      MZSCHEME_MZC=
5600    fi
5601  fi
5602
5603
5604
5605
5606
5607
5608
5609fi
5610
5611
5612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
5613$as_echo_n "checking --enable-perlinterp argument... " >&6; }
5614# Check whether --enable-perlinterp was given.
5615if test "${enable_perlinterp+set}" = set; then :
5616  enableval=$enable_perlinterp;
5617else
5618  enable_perlinterp="no"
5619fi
5620
5621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
5622$as_echo "$enable_perlinterp" >&6; }
5623if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
5624  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
5625    as_fn_error $? "cannot use Perl with tiny or small features" "$LINENO" 5
5626  fi
5627
5628  # Extract the first word of "perl", so it can be a program name with args.
5629set dummy perl; ac_word=$2
5630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5631$as_echo_n "checking for $ac_word... " >&6; }
5632if ${ac_cv_path_vi_cv_path_perl+:} false; then :
5633  $as_echo_n "(cached) " >&6
5634else
5635  case $vi_cv_path_perl in
5636  [\\/]* | ?:[\\/]*)
5637  ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
5638  ;;
5639  *)
5640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643  IFS=$as_save_IFS
5644  test -z "$as_dir" && as_dir=.
5645    for ac_exec_ext in '' $ac_executable_extensions; do
5646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5647    ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext"
5648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5649    break 2
5650  fi
5651done
5652  done
5653IFS=$as_save_IFS
5654
5655  ;;
5656esac
5657fi
5658vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
5659if test -n "$vi_cv_path_perl"; then
5660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
5661$as_echo "$vi_cv_path_perl" >&6; }
5662else
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5664$as_echo "no" >&6; }
5665fi
5666
5667
5668  if test "X$vi_cv_path_perl" != "X"; then
5669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
5670$as_echo_n "checking Perl version... " >&6; }
5671    if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
5672     eval `$vi_cv_path_perl -V:usethreads`
5673     eval `$vi_cv_path_perl -V:libperl`
5674     if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
5675       badthreads=no
5676     else
5677       if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
5678	 eval `$vi_cv_path_perl -V:use5005threads`
5679	 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
5680	   badthreads=no
5681	 else
5682	   badthreads=yes
5683	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
5684$as_echo ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
5685	 fi
5686       else
5687	 badthreads=yes
5688	 { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
5689$as_echo ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
5690       fi
5691     fi
5692     if test $badthreads = no; then
5693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
5694$as_echo "OK" >&6; }
5695      eval `$vi_cv_path_perl -V:shrpenv`
5696      if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
5697	shrpenv=""
5698      fi
5699      vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
5700
5701      vi_cv_perl_extutils=unknown_perl_extutils_path
5702      for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
5703	xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
5704	if test -f "$xsubpp_path"; then
5705	  vi_cv_perl_xsubpp="$xsubpp_path"
5706	fi
5707      done
5708
5709                  perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
5710	      -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
5711			-e 's/-fdebug-prefix-map[^ ]*//g'`
5712            perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
5713		sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
5714			-e 's/-bE:perl.exp//' -e 's/-lc //'`
5715                  perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
5716		-e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
5717
5718                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
5719$as_echo_n "checking if compile and link flags for Perl are sane... " >&6; }
5720      cflags_save=$CFLAGS
5721      libs_save=$LIBS
5722      ldflags_save=$LDFLAGS
5723      CFLAGS="$CFLAGS $perlcppflags"
5724      LIBS="$LIBS $perllibs"
5725      perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
5726      LDFLAGS="$perlldflags $LDFLAGS"
5727      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5728/* end confdefs.h.  */
5729
5730int
5731main ()
5732{
5733
5734  ;
5735  return 0;
5736}
5737_ACEOF
5738if ac_fn_c_try_link "$LINENO"; then :
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5740$as_echo "yes" >&6; }; perl_ok=yes
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
5743$as_echo "no: PERL DISABLED" >&6; }; perl_ok=no
5744fi
5745rm -f core conftest.err conftest.$ac_objext \
5746    conftest$ac_exeext conftest.$ac_ext
5747      CFLAGS=$cflags_save
5748      LIBS=$libs_save
5749      LDFLAGS=$ldflags_save
5750      if test $perl_ok = yes; then
5751	if test "X$perlcppflags" != "X"; then
5752	  	  PERL_CFLAGS=`echo "$perlcppflags" | sed -e 's/-pipe //' -e 's/-W[^ ]*//'`
5753	fi
5754	if test "X$perlldflags" != "X"; then
5755	  if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
5756	    LDFLAGS="$perlldflags $LDFLAGS"
5757	  fi
5758	fi
5759	PERL_LIBS=$perllibs
5760	PERL_SRC="auto/if_perl.c if_perlsfio.c"
5761	PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
5762	PERL_PRO="if_perl.pro if_perlsfio.pro"
5763	$as_echo "#define FEAT_PERL 1" >>confdefs.h
5764
5765      fi
5766     fi
5767    else
5768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
5769$as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
5770    fi
5771  fi
5772
5773  if test "x$MACOSX" = "xyes"; then
5774        dir=/System/Library/Perl
5775    darwindir=$dir/darwin
5776    if test -d $darwindir; then
5777      PERL=/usr/bin/perl
5778    else
5779            dir=/System/Library/Perl/5.8.1
5780      darwindir=$dir/darwin-thread-multi-2level
5781      if test -d $darwindir; then
5782	PERL=/usr/bin/perl
5783      fi
5784    fi
5785    if test -n "$PERL"; then
5786      PERL_DIR="$dir"
5787      PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
5788      PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
5789      PERL_LIBS="-L$darwindir/CORE -lperl"
5790    fi
5791                PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
5792    PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
5793  fi
5794  if test "$enable_perlinterp" = "dynamic"; then
5795    if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
5796      $as_echo "#define DYNAMIC_PERL 1" >>confdefs.h
5797
5798      PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
5799    fi
5800  fi
5801
5802  if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
5803    as_fn_error $? "could not configure perl" "$LINENO" 5
5804  fi
5805fi
5806
5807
5808
5809
5810
5811
5812
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
5814$as_echo_n "checking --enable-pythoninterp argument... " >&6; }
5815# Check whether --enable-pythoninterp was given.
5816if test "${enable_pythoninterp+set}" = set; then :
5817  enableval=$enable_pythoninterp;
5818else
5819  enable_pythoninterp="no"
5820fi
5821
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
5823$as_echo "$enable_pythoninterp" >&6; }
5824if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
5825  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
5826    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
5827  fi
5828
5829    for ac_prog in python2 python
5830do
5831  # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if ${ac_cv_path_vi_cv_path_python+:} false; then :
5836  $as_echo_n "(cached) " >&6
5837else
5838  case $vi_cv_path_python in
5839  [\\/]* | ?:[\\/]*)
5840  ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
5841  ;;
5842  *)
5843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844for as_dir in $PATH
5845do
5846  IFS=$as_save_IFS
5847  test -z "$as_dir" && as_dir=.
5848    for ac_exec_ext in '' $ac_executable_extensions; do
5849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5850    ac_cv_path_vi_cv_path_python="$as_dir/$ac_word$ac_exec_ext"
5851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5852    break 2
5853  fi
5854done
5855  done
5856IFS=$as_save_IFS
5857
5858  ;;
5859esac
5860fi
5861vi_cv_path_python=$ac_cv_path_vi_cv_path_python
5862if test -n "$vi_cv_path_python"; then
5863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
5864$as_echo "$vi_cv_path_python" >&6; }
5865else
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871  test -n "$vi_cv_path_python" && break
5872done
5873
5874  if test "X$vi_cv_path_python" != "X"; then
5875
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
5877$as_echo_n "checking Python version... " >&6; }
5878if ${vi_cv_var_python_version+:} false; then :
5879  $as_echo_n "(cached) " >&6
5880else
5881  vi_cv_var_python_version=`
5882	    ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
5883
5884fi
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
5886$as_echo "$vi_cv_var_python_version" >&6; }
5887
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
5889$as_echo_n "checking Python is 2.3 or better... " >&6; }
5890    if ${vi_cv_path_python} -c \
5891	"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
5892    then
5893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
5894$as_echo "yep" >&6; }
5895
5896            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
5897$as_echo_n "checking Python's install prefix... " >&6; }
5898if ${vi_cv_path_python_pfx+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901   vi_cv_path_python_pfx=`
5902	    ${vi_cv_path_python} -c \
5903		"import sys; print sys.prefix"`
5904fi
5905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
5906$as_echo "$vi_cv_path_python_pfx" >&6; }
5907
5908            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
5909$as_echo_n "checking Python's execution prefix... " >&6; }
5910if ${vi_cv_path_python_epfx+:} false; then :
5911  $as_echo_n "(cached) " >&6
5912else
5913   vi_cv_path_python_epfx=`
5914	    ${vi_cv_path_python} -c \
5915		"import sys; print sys.exec_prefix"`
5916fi
5917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
5918$as_echo "$vi_cv_path_python_epfx" >&6; }
5919
5920
5921      if ${vi_cv_path_pythonpath+:} false; then :
5922  $as_echo_n "(cached) " >&6
5923else
5924   vi_cv_path_pythonpath=`
5925	    unset PYTHONPATH;
5926	    ${vi_cv_path_python} -c \
5927		"import sys, string; print string.join(sys.path,':')"`
5928fi
5929
5930
5931
5932
5933# Check whether --with-python-config-dir was given.
5934if test "${with_python_config_dir+set}" = set; then :
5935  withval=$with_python_config_dir;  vi_cv_path_python_conf="${withval}"
5936fi
5937
5938
5939      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
5940$as_echo_n "checking Python's configuration directory... " >&6; }
5941if ${vi_cv_path_python_conf+:} false; then :
5942  $as_echo_n "(cached) " >&6
5943else
5944
5945	vi_cv_path_python_conf=
5946	d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
5947	if test -d "$d" && test -f "$d/config.c"; then
5948	  vi_cv_path_python_conf="$d"
5949	else
5950	  for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
5951	    for subdir in lib64 lib share; do
5952	      d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
5953	      if test -d "$d" && test -f "$d/config.c"; then
5954		vi_cv_path_python_conf="$d"
5955	      fi
5956	    done
5957	  done
5958	fi
5959
5960fi
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
5962$as_echo "$vi_cv_path_python_conf" >&6; }
5963
5964      PYTHON_CONFDIR="${vi_cv_path_python_conf}"
5965
5966      if test "X$PYTHON_CONFDIR" = "X"; then
5967	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
5968$as_echo "can't find it!" >&6; }
5969      else
5970
5971			if ${vi_cv_path_python_plibs+:} false; then :
5972  $as_echo_n "(cached) " >&6
5973else
5974
5975	    pwd=`pwd`
5976	    tmp_mkf="$pwd/config-PyMake$$"
5977	    cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
5978__:
5979	@echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
5980	@echo "python_LIBS='$(LIBS)'"
5981	@echo "python_SYSLIBS='$(SYSLIBS)'"
5982	@echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
5983	@echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
5984	@echo "python_INSTSONAME='$(INSTSONAME)'"
5985	@echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
5986	@echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
5987	@echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
5988eof
5989	    	    eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
5990	    rm -f -- "${tmp_mkf}"
5991	    if test "x$MACOSX" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
5992		"import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
5993	      vi_cv_path_python_plibs="-framework Python"
5994	      if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
5995		  vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
5996	      fi
5997	    else
5998	      if test "${vi_cv_var_python_version}" = "1.4"; then
5999		  vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
6000	      else
6001		  vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
6002	      fi
6003	      	      	      	      if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6004	        python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6005		python_link_path=`echo ${python_LINKFORSHARED} |   sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6006	        if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6007	          		  	          python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6008		  if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6009		    		    python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6010	            	            		  fi
6011	          python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6012	        fi
6013	      fi
6014	      vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
6015	      	      vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6016	    fi
6017
6018fi
6019
6020	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6021$as_echo_n "checking Python's dll name... " >&6; }
6022if ${vi_cv_dll_name_python+:} false; then :
6023  $as_echo_n "(cached) " >&6
6024else
6025
6026	  if test "X$python_DLLLIBRARY" != "X"; then
6027	    vi_cv_dll_name_python="$python_DLLLIBRARY"
6028	  else
6029	    vi_cv_dll_name_python="$python_INSTSONAME"
6030	  fi
6031
6032fi
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6034$as_echo "$vi_cv_dll_name_python" >&6; }
6035
6036	PYTHON_LIBS="${vi_cv_path_python_plibs}"
6037	if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
6038	  PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6039	else
6040	  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} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6041	fi
6042	PYTHON_SRC="if_python.c"
6043	PYTHON_OBJ="objects/if_python.o"
6044	if test "${vi_cv_var_python_version}" = "1.4"; then
6045	   PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
6046	fi
6047    PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
6048
6049								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6050$as_echo_n "checking if -pthread should be used... " >&6; }
6051	threadsafe_flag=
6052	thread_lib=
6053	        if test "`(uname) 2>/dev/null`" != Darwin; then
6054	  test "$GCC" = yes && threadsafe_flag="-pthread"
6055	  if test "`(uname) 2>/dev/null`" = FreeBSD; then
6056	    threadsafe_flag="-D_THREAD_SAFE"
6057	    thread_lib="-pthread"
6058	  fi
6059	  if test "`(uname) 2>/dev/null`" = SunOS; then
6060	    threadsafe_flag="-pthreads"
6061	  fi
6062	fi
6063	libs_save_old=$LIBS
6064	if test -n "$threadsafe_flag"; then
6065	  cflags_save=$CFLAGS
6066	  CFLAGS="$CFLAGS $threadsafe_flag"
6067	  LIBS="$LIBS $thread_lib"
6068	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6069/* end confdefs.h.  */
6070
6071int
6072main ()
6073{
6074
6075  ;
6076  return 0;
6077}
6078_ACEOF
6079if ac_fn_c_try_link "$LINENO"; then :
6080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6081$as_echo "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6082else
6083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }; LIBS=$libs_save_old
6085
6086fi
6087rm -f core conftest.err conftest.$ac_objext \
6088    conftest$ac_exeext conftest.$ac_ext
6089	  CFLAGS=$cflags_save
6090	else
6091	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6092$as_echo "no" >&6; }
6093	fi
6094
6095			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6096$as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
6097	cflags_save=$CFLAGS
6098	libs_save=$LIBS
6099	CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6100	LIBS="$LIBS $PYTHON_LIBS"
6101	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6102/* end confdefs.h.  */
6103
6104int
6105main ()
6106{
6107
6108  ;
6109  return 0;
6110}
6111_ACEOF
6112if ac_fn_c_try_link "$LINENO"; then :
6113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6114$as_echo "yes" >&6; }; python_ok=yes
6115else
6116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6117$as_echo "no: PYTHON DISABLED" >&6; }; python_ok=no
6118fi
6119rm -f core conftest.err conftest.$ac_objext \
6120    conftest$ac_exeext conftest.$ac_ext
6121	CFLAGS=$cflags_save
6122	LIBS=$libs_save
6123	if test $python_ok = yes; then
6124	  $as_echo "#define FEAT_PYTHON 1" >>confdefs.h
6125
6126	else
6127	  LIBS=$libs_save_old
6128	  PYTHON_SRC=
6129	  PYTHON_OBJ=
6130	  PYTHON_LIBS=
6131	  PYTHON_CFLAGS=
6132	fi
6133      fi
6134    else
6135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6136$as_echo "too old" >&6; }
6137    fi
6138  fi
6139
6140  if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
6141    as_fn_error $? "could not configure python" "$LINENO" 5
6142  fi
6143fi
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6154$as_echo_n "checking --enable-python3interp argument... " >&6; }
6155# Check whether --enable-python3interp was given.
6156if test "${enable_python3interp+set}" = set; then :
6157  enableval=$enable_python3interp;
6158else
6159  enable_python3interp="no"
6160fi
6161
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6163$as_echo "$enable_python3interp" >&6; }
6164if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
6165  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
6166    as_fn_error $? "cannot use Python with tiny or small features" "$LINENO" 5
6167  fi
6168
6169    for ac_prog in python3 python
6170do
6171  # Extract the first word of "$ac_prog", so it can be a program name with args.
6172set dummy $ac_prog; ac_word=$2
6173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6174$as_echo_n "checking for $ac_word... " >&6; }
6175if ${ac_cv_path_vi_cv_path_python3+:} false; then :
6176  $as_echo_n "(cached) " >&6
6177else
6178  case $vi_cv_path_python3 in
6179  [\\/]* | ?:[\\/]*)
6180  ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
6181  ;;
6182  *)
6183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6184for as_dir in $PATH
6185do
6186  IFS=$as_save_IFS
6187  test -z "$as_dir" && as_dir=.
6188    for ac_exec_ext in '' $ac_executable_extensions; do
6189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6190    ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext"
6191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6192    break 2
6193  fi
6194done
6195  done
6196IFS=$as_save_IFS
6197
6198  ;;
6199esac
6200fi
6201vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
6202if test -n "$vi_cv_path_python3"; then
6203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
6204$as_echo "$vi_cv_path_python3" >&6; }
6205else
6206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6207$as_echo "no" >&6; }
6208fi
6209
6210
6211  test -n "$vi_cv_path_python3" && break
6212done
6213
6214  if test "X$vi_cv_path_python3" != "X"; then
6215
6216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6217$as_echo_n "checking Python version... " >&6; }
6218if ${vi_cv_var_python3_version+:} false; then :
6219  $as_echo_n "(cached) " >&6
6220else
6221  vi_cv_var_python3_version=`
6222          ${vi_cv_path_python3} -c 'import sys; print(sys.version[:3])'`
6223
6224fi
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
6226$as_echo "$vi_cv_var_python3_version" >&6; }
6227
6228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
6229$as_echo_n "checking Python is 3.0 or better... " >&6; }
6230    if ${vi_cv_path_python3} -c \
6231      "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
6232    then
6233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6234$as_echo "yep" >&6; }
6235
6236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
6237$as_echo_n "checking Python's abiflags... " >&6; }
6238if ${vi_cv_var_python3_abiflags+:} false; then :
6239  $as_echo_n "(cached) " >&6
6240else
6241
6242       vi_cv_var_python3_abiflags=
6243       if ${vi_cv_path_python3} -c \
6244           "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
6245       then
6246         vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
6247           "import sys; print(sys.abiflags)"`
6248       fi
6249fi
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
6251$as_echo "$vi_cv_var_python3_abiflags" >&6; }
6252
6253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6254$as_echo_n "checking Python's install prefix... " >&6; }
6255if ${vi_cv_path_python3_pfx+:} false; then :
6256  $as_echo_n "(cached) " >&6
6257else
6258   vi_cv_path_python3_pfx=`
6259       ${vi_cv_path_python3} -c \
6260       "import sys; print(sys.prefix)"`
6261fi
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
6263$as_echo "$vi_cv_path_python3_pfx" >&6; }
6264
6265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6266$as_echo_n "checking Python's execution prefix... " >&6; }
6267if ${vi_cv_path_python3_epfx+:} false; then :
6268  $as_echo_n "(cached) " >&6
6269else
6270   vi_cv_path_python3_epfx=`
6271       ${vi_cv_path_python3} -c \
6272       "import sys; print(sys.exec_prefix)"`
6273fi
6274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
6275$as_echo "$vi_cv_path_python3_epfx" >&6; }
6276
6277
6278      if ${vi_cv_path_python3path+:} false; then :
6279  $as_echo_n "(cached) " >&6
6280else
6281   vi_cv_path_python3path=`
6282       unset PYTHONPATH;
6283       ${vi_cv_path_python3} -c \
6284       "import sys, string; print(':'.join(sys.path))"`
6285fi
6286
6287
6288
6289
6290# Check whether --with-python3-config-dir was given.
6291if test "${with_python3_config_dir+set}" = set; then :
6292  withval=$with_python3_config_dir;  vi_cv_path_python3_conf="${withval}"
6293fi
6294
6295
6296      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6297$as_echo_n "checking Python's configuration directory... " >&6; }
6298if ${vi_cv_path_python3_conf+:} false; then :
6299  $as_echo_n "(cached) " >&6
6300else
6301
6302       vi_cv_path_python3_conf=
6303       config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6304       d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
6305       if test -d "$d" && test -f "$d/config.c"; then
6306         vi_cv_path_python3_conf="$d"
6307       else
6308         for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
6309	   for subdir in lib64 lib share; do
6310	     d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
6311	     if test -d "$d" && test -f "$d/config.c"; then
6312	       vi_cv_path_python3_conf="$d"
6313	     fi
6314	   done
6315         done
6316       fi
6317
6318fi
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
6320$as_echo "$vi_cv_path_python3_conf" >&6; }
6321
6322      PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
6323
6324      if test "X$PYTHON3_CONFDIR" = "X"; then
6325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6326$as_echo "can't find it!" >&6; }
6327      else
6328
6329                        if ${vi_cv_path_python3_plibs+:} false; then :
6330  $as_echo_n "(cached) " >&6
6331else
6332
6333            pwd=`pwd`
6334            tmp_mkf="$pwd/config-PyMake$$"
6335            cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
6336__:
6337	@echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
6338	@echo "python3_LIBS='$(LIBS)'"
6339	@echo "python3_SYSLIBS='$(SYSLIBS)'"
6340	@echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
6341	@echo "python3_INSTSONAME='$(INSTSONAME)'"
6342eof
6343	    	    eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6344	    rm -f -- "${tmp_mkf}"
6345	    vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
6346	    vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
6347	    	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
6348	    vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
6349
6350fi
6351
6352	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
6353$as_echo_n "checking Python3's dll name... " >&6; }
6354if ${vi_cv_dll_name_python3+:} false; then :
6355  $as_echo_n "(cached) " >&6
6356else
6357
6358	  if test "X$python3_DLLLIBRARY" != "X"; then
6359	    vi_cv_dll_name_python3="$python3_DLLLIBRARY"
6360	  else
6361	    vi_cv_dll_name_python3="$python3_INSTSONAME"
6362	  fi
6363
6364fi
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
6366$as_echo "$vi_cv_dll_name_python3" >&6; }
6367
6368        PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
6369        if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
6370          PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
6371        else
6372          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} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
6373        fi
6374        PYTHON3_SRC="if_python3.c"
6375        PYTHON3_OBJ="objects/if_python3.o"
6376
6377                                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6378$as_echo_n "checking if -pthread should be used... " >&6; }
6379        threadsafe_flag=
6380        thread_lib=
6381                if test "`(uname) 2>/dev/null`" != Darwin; then
6382          test "$GCC" = yes && threadsafe_flag="-pthread"
6383          if test "`(uname) 2>/dev/null`" = FreeBSD; then
6384            threadsafe_flag="-D_THREAD_SAFE"
6385            thread_lib="-pthread"
6386          fi
6387          if test "`(uname) 2>/dev/null`" = SunOS; then
6388            threadsafe_flag="-pthreads"
6389          fi
6390        fi
6391        libs_save_old=$LIBS
6392        if test -n "$threadsafe_flag"; then
6393          cflags_save=$CFLAGS
6394          CFLAGS="$CFLAGS $threadsafe_flag"
6395          LIBS="$LIBS $thread_lib"
6396          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397/* end confdefs.h.  */
6398
6399int
6400main ()
6401{
6402
6403  ;
6404  return 0;
6405}
6406_ACEOF
6407if ac_fn_c_try_link "$LINENO"; then :
6408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6409$as_echo "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
6410else
6411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; }; LIBS=$libs_save_old
6413
6414fi
6415rm -f core conftest.err conftest.$ac_objext \
6416    conftest$ac_exeext conftest.$ac_ext
6417          CFLAGS=$cflags_save
6418        else
6419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; }
6421        fi
6422
6423                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
6424$as_echo_n "checking if compile and link flags for Python 3 are sane... " >&6; }
6425        cflags_save=$CFLAGS
6426        libs_save=$LIBS
6427        CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
6428        LIBS="$LIBS $PYTHON3_LIBS"
6429        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6430/* end confdefs.h.  */
6431
6432int
6433main ()
6434{
6435
6436  ;
6437  return 0;
6438}
6439_ACEOF
6440if ac_fn_c_try_link "$LINENO"; then :
6441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6442$as_echo "yes" >&6; }; python3_ok=yes
6443else
6444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
6445$as_echo "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
6446fi
6447rm -f core conftest.err conftest.$ac_objext \
6448    conftest$ac_exeext conftest.$ac_ext
6449        CFLAGS=$cflags_save
6450        LIBS=$libs_save
6451        if test "$python3_ok" = yes; then
6452          $as_echo "#define FEAT_PYTHON3 1" >>confdefs.h
6453
6454        else
6455          LIBS=$libs_save_old
6456          PYTHON3_SRC=
6457          PYTHON3_OBJ=
6458          PYTHON3_LIBS=
6459          PYTHON3_CFLAGS=
6460        fi
6461      fi
6462    else
6463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6464$as_echo "too old" >&6; }
6465    fi
6466  fi
6467  if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
6468    as_fn_error $? "could not configure python3" "$LINENO" 5
6469  fi
6470fi
6471
6472
6473
6474
6475
6476
6477
6478if test "$python_ok" = yes && test "$python3_ok" = yes; then
6479  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
6480
6481  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
6482
6483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
6484$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
6485  cflags_save=$CFLAGS
6486  CFLAGS="$CFLAGS $PYTHON_CFLAGS"
6487  libs_save=$LIBS
6488    LIBS="-ldl $LIBS"
6489  if test "$cross_compiling" = yes; then :
6490  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6492as_fn_error $? "cannot run test program while cross compiling
6493See \`config.log' for more details" "$LINENO" 5; }
6494else
6495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6496/* end confdefs.h.  */
6497
6498    #include <dlfcn.h>
6499    /* If this program fails, then RTLD_GLOBAL is needed.
6500     * RTLD_GLOBAL will be used and then it is not possible to
6501     * have both python versions enabled in the same vim instance.
6502     * Only the first python version used will be switched on.
6503     */
6504
6505    int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
6506    {
6507      int needed = 0;
6508      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
6509      if (pylib != 0)
6510      {
6511          void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
6512          void (*init)(void) = dlsym(pylib, "Py_Initialize");
6513          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
6514          void (*final)(void) = dlsym(pylib, "Py_Finalize");
6515          (*pfx)(prefix);
6516          (*init)();
6517          needed = (*simple)("import termios") == -1;
6518          (*final)();
6519          dlclose(pylib);
6520      }
6521      return !needed;
6522    }
6523
6524    int main(int argc, char** argv)
6525    {
6526      int not_needed = 0;
6527      if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
6528            not_needed = 1;
6529      return !not_needed;
6530    }
6531_ACEOF
6532if ac_fn_c_try_run "$LINENO"; then :
6533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6534$as_echo "yes" >&6; };$as_echo "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
6535
6536else
6537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539fi
6540rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6541  conftest.$ac_objext conftest.beam conftest.$ac_ext
6542fi
6543
6544
6545  CFLAGS=$cflags_save
6546  LIBS=$libs_save
6547
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
6549$as_echo_n "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
6550  cflags_save=$CFLAGS
6551  CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
6552  libs_save=$LIBS
6553    LIBS="-ldl $LIBS"
6554  if test "$cross_compiling" = yes; then :
6555  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6557as_fn_error $? "cannot run test program while cross compiling
6558See \`config.log' for more details" "$LINENO" 5; }
6559else
6560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6561/* end confdefs.h.  */
6562
6563    #include <dlfcn.h>
6564    #include <wchar.h>
6565    /* If this program fails, then RTLD_GLOBAL is needed.
6566     * RTLD_GLOBAL will be used and then it is not possible to
6567     * have both python versions enabled in the same vim instance.
6568     * Only the first python version used will be switched on.
6569     */
6570
6571    int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
6572    {
6573      int needed = 0;
6574      void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
6575      if (pylib != 0)
6576      {
6577          void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
6578          void (*init)(void) = dlsym(pylib, "Py_Initialize");
6579          int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
6580          void (*final)(void) = dlsym(pylib, "Py_Finalize");
6581          (*pfx)(prefix);
6582          (*init)();
6583          needed = (*simple)("import termios") == -1;
6584          (*final)();
6585          dlclose(pylib);
6586      }
6587      return !needed;
6588    }
6589
6590    int main(int argc, char** argv)
6591    {
6592      int not_needed = 0;
6593      if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
6594            not_needed = 1;
6595      return !not_needed;
6596    }
6597_ACEOF
6598if ac_fn_c_try_run "$LINENO"; then :
6599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6600$as_echo "yes" >&6; };$as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
6601
6602else
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604$as_echo "no" >&6; }
6605fi
6606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6607  conftest.$ac_objext conftest.beam conftest.$ac_ext
6608fi
6609
6610
6611  CFLAGS=$cflags_save
6612  LIBS=$libs_save
6613
6614  PYTHON_SRC="if_python.c"
6615  PYTHON_OBJ="objects/if_python.o"
6616  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
6617  PYTHON_LIBS=
6618  PYTHON3_SRC="if_python3.c"
6619  PYTHON3_OBJ="objects/if_python3.o"
6620  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
6621  PYTHON3_LIBS=
6622elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
6623  $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
6624
6625  PYTHON_SRC="if_python.c"
6626  PYTHON_OBJ="objects/if_python.o"
6627  PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
6628  PYTHON_LIBS=
6629elif test "$python_ok" = yes; then
6630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
6631$as_echo_n "checking if -fPIE can be added for Python... " >&6; }
6632  cflags_save=$CFLAGS
6633  libs_save=$LIBS
6634  CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
6635  LIBS="$LIBS $PYTHON_LIBS"
6636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6637/* end confdefs.h.  */
6638
6639int
6640main ()
6641{
6642
6643  ;
6644  return 0;
6645}
6646_ACEOF
6647if ac_fn_c_try_link "$LINENO"; then :
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6649$as_echo "yes" >&6; }; fpie_ok=yes
6650else
6651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6652$as_echo "no" >&6; }; fpie_ok=no
6653fi
6654rm -f core conftest.err conftest.$ac_objext \
6655    conftest$ac_exeext conftest.$ac_ext
6656  CFLAGS=$cflags_save
6657  LIBS=$libs_save
6658  if test $fpie_ok = yes; then
6659    PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
6660  fi
6661elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
6662  $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
6663
6664  PYTHON3_SRC="if_python3.c"
6665  PYTHON3_OBJ="objects/if_python3.o"
6666  PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
6667  PYTHON3_LIBS=
6668elif test "$python3_ok" = yes; then
6669      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
6670$as_echo_n "checking if -fPIE can be added for Python3... " >&6; }
6671  cflags_save=$CFLAGS
6672  libs_save=$LIBS
6673  CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
6674  LIBS="$LIBS $PYTHON3_LIBS"
6675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6676/* end confdefs.h.  */
6677
6678int
6679main ()
6680{
6681
6682  ;
6683  return 0;
6684}
6685_ACEOF
6686if ac_fn_c_try_link "$LINENO"; then :
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6688$as_echo "yes" >&6; }; fpie_ok=yes
6689else
6690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6691$as_echo "no" >&6; }; fpie_ok=no
6692fi
6693rm -f core conftest.err conftest.$ac_objext \
6694    conftest$ac_exeext conftest.$ac_ext
6695  CFLAGS=$cflags_save
6696  LIBS=$libs_save
6697  if test $fpie_ok = yes; then
6698    PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
6699  fi
6700fi
6701
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
6703$as_echo_n "checking --enable-tclinterp argument... " >&6; }
6704# Check whether --enable-tclinterp was given.
6705if test "${enable_tclinterp+set}" = set; then :
6706  enableval=$enable_tclinterp;
6707else
6708  enable_tclinterp="no"
6709fi
6710
6711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
6712$as_echo "$enable_tclinterp" >&6; }
6713
6714if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
6715
6716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
6717$as_echo_n "checking --with-tclsh argument... " >&6; }
6718
6719# Check whether --with-tclsh was given.
6720if test "${with_tclsh+set}" = set; then :
6721  withval=$with_tclsh; tclsh_name="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
6722$as_echo "$tclsh_name" >&6; }
6723else
6724  tclsh_name="tclsh8.5"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725$as_echo "no" >&6; }
6726fi
6727
6728  # Extract the first word of "$tclsh_name", so it can be a program name with args.
6729set dummy $tclsh_name; ac_word=$2
6730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6731$as_echo_n "checking for $ac_word... " >&6; }
6732if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
6733  $as_echo_n "(cached) " >&6
6734else
6735  case $vi_cv_path_tcl in
6736  [\\/]* | ?:[\\/]*)
6737  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
6738  ;;
6739  *)
6740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6741for as_dir in $PATH
6742do
6743  IFS=$as_save_IFS
6744  test -z "$as_dir" && as_dir=.
6745    for ac_exec_ext in '' $ac_executable_extensions; do
6746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6747    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
6748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6749    break 2
6750  fi
6751done
6752  done
6753IFS=$as_save_IFS
6754
6755  ;;
6756esac
6757fi
6758vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
6759if test -n "$vi_cv_path_tcl"; then
6760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
6761$as_echo "$vi_cv_path_tcl" >&6; }
6762else
6763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6764$as_echo "no" >&6; }
6765fi
6766
6767
6768
6769
6770    if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
6771    tclsh_name="tclsh8.4"
6772    # Extract the first word of "$tclsh_name", so it can be a program name with args.
6773set dummy $tclsh_name; ac_word=$2
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775$as_echo_n "checking for $ac_word... " >&6; }
6776if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  case $vi_cv_path_tcl in
6780  [\\/]* | ?:[\\/]*)
6781  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
6782  ;;
6783  *)
6784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785for as_dir in $PATH
6786do
6787  IFS=$as_save_IFS
6788  test -z "$as_dir" && as_dir=.
6789    for ac_exec_ext in '' $ac_executable_extensions; do
6790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
6792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793    break 2
6794  fi
6795done
6796  done
6797IFS=$as_save_IFS
6798
6799  ;;
6800esac
6801fi
6802vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
6803if test -n "$vi_cv_path_tcl"; then
6804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
6805$as_echo "$vi_cv_path_tcl" >&6; }
6806else
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808$as_echo "no" >&6; }
6809fi
6810
6811
6812  fi
6813  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
6814    tclsh_name="tclsh8.2"
6815    # Extract the first word of "$tclsh_name", so it can be a program name with args.
6816set dummy $tclsh_name; ac_word=$2
6817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6818$as_echo_n "checking for $ac_word... " >&6; }
6819if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
6820  $as_echo_n "(cached) " >&6
6821else
6822  case $vi_cv_path_tcl in
6823  [\\/]* | ?:[\\/]*)
6824  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
6825  ;;
6826  *)
6827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6828for as_dir in $PATH
6829do
6830  IFS=$as_save_IFS
6831  test -z "$as_dir" && as_dir=.
6832    for ac_exec_ext in '' $ac_executable_extensions; do
6833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6834    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
6835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6836    break 2
6837  fi
6838done
6839  done
6840IFS=$as_save_IFS
6841
6842  ;;
6843esac
6844fi
6845vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
6846if test -n "$vi_cv_path_tcl"; then
6847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
6848$as_echo "$vi_cv_path_tcl" >&6; }
6849else
6850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6851$as_echo "no" >&6; }
6852fi
6853
6854
6855  fi
6856  if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
6857    tclsh_name="tclsh8.0"
6858    # Extract the first word of "$tclsh_name", so it can be a program name with args.
6859set dummy $tclsh_name; ac_word=$2
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861$as_echo_n "checking for $ac_word... " >&6; }
6862if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  case $vi_cv_path_tcl in
6866  [\\/]* | ?:[\\/]*)
6867  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
6868  ;;
6869  *)
6870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875    for ac_exec_ext in '' $ac_executable_extensions; do
6876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6877    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
6878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6879    break 2
6880  fi
6881done
6882  done
6883IFS=$as_save_IFS
6884
6885  ;;
6886esac
6887fi
6888vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
6889if test -n "$vi_cv_path_tcl"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
6891$as_echo "$vi_cv_path_tcl" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896
6897
6898  fi
6899    if test "X$vi_cv_path_tcl" = "X"; then
6900    tclsh_name="tclsh"
6901    # Extract the first word of "$tclsh_name", so it can be a program name with args.
6902set dummy $tclsh_name; ac_word=$2
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6904$as_echo_n "checking for $ac_word... " >&6; }
6905if ${ac_cv_path_vi_cv_path_tcl+:} false; then :
6906  $as_echo_n "(cached) " >&6
6907else
6908  case $vi_cv_path_tcl in
6909  [\\/]* | ?:[\\/]*)
6910  ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
6911  ;;
6912  *)
6913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6914for as_dir in $PATH
6915do
6916  IFS=$as_save_IFS
6917  test -z "$as_dir" && as_dir=.
6918    for ac_exec_ext in '' $ac_executable_extensions; do
6919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6920    ac_cv_path_vi_cv_path_tcl="$as_dir/$ac_word$ac_exec_ext"
6921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6922    break 2
6923  fi
6924done
6925  done
6926IFS=$as_save_IFS
6927
6928  ;;
6929esac
6930fi
6931vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
6932if test -n "$vi_cv_path_tcl"; then
6933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
6934$as_echo "$vi_cv_path_tcl" >&6; }
6935else
6936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6937$as_echo "no" >&6; }
6938fi
6939
6940
6941  fi
6942  if test "X$vi_cv_path_tcl" != "X"; then
6943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
6944$as_echo_n "checking Tcl version... " >&6; }
6945    if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
6946      tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
6947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
6948$as_echo "$tclver - OK" >&6; };
6949      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 -`
6950      tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
6951
6952      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
6953$as_echo_n "checking for location of Tcl include... " >&6; }
6954      if test "x$MACOSX" != "xyes"; then
6955	tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
6956      else
6957		tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
6958      fi
6959      TCL_INC=
6960      for try in $tclinc; do
6961	if test -f "$try/tcl.h"; then
6962	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
6963$as_echo "$try/tcl.h" >&6; }
6964	  TCL_INC=$try
6965	  break
6966	fi
6967      done
6968      if test -z "$TCL_INC"; then
6969	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
6970$as_echo "<not found>" >&6; }
6971	SKIP_TCL=YES
6972      fi
6973      if test -z "$SKIP_TCL"; then
6974	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
6975$as_echo_n "checking for location of tclConfig.sh script... " >&6; }
6976	if test "x$MACOSX" != "xyes"; then
6977	  tclcnf=`echo $tclinc | sed s/include/lib/g`
6978	  tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
6979	else
6980	  	  tclcnf="/System/Library/Frameworks/Tcl.framework"
6981	fi
6982	for try in $tclcnf; do
6983	  if test -f "$try/tclConfig.sh"; then
6984	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
6985$as_echo "$try/tclConfig.sh" >&6; }
6986	    . "$try/tclConfig.sh"
6987	    	    if test "$enable_tclinterp" = "dynamic"; then
6988	      TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
6989	    else
6990	      TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
6991	    fi
6992	    	    	    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'`
6993	    break
6994	  fi
6995	done
6996	if test -z "$TCL_LIBS"; then
6997	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
6998$as_echo "<not found>" >&6; }
6999	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7000$as_echo_n "checking for Tcl library by myself... " >&6; }
7001	  tcllib=`echo $tclinc | sed s/include/lib/g`
7002	  tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
7003	  for ext in .so .a ; do
7004	    for ver in "" $tclver ; do
7005	      for try in $tcllib ; do
7006		trylib=tcl$ver$ext
7007		if test -f "$try/lib$trylib" ; then
7008		  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7009$as_echo "$try/lib$trylib" >&6; }
7010		  TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
7011		  if test "`(uname) 2>/dev/null`" = SunOS &&
7012					 uname -r | grep '^5' >/dev/null; then
7013		    TCL_LIBS="$TCL_LIBS -R $try"
7014		  fi
7015		  break 3
7016		fi
7017	      done
7018	    done
7019	  done
7020	  if test -z "$TCL_LIBS"; then
7021	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7022$as_echo "<not found>" >&6; }
7023	    SKIP_TCL=YES
7024	  fi
7025	fi
7026	if test -z "$SKIP_TCL"; then
7027	  $as_echo "#define FEAT_TCL 1" >>confdefs.h
7028
7029	  TCL_SRC=if_tcl.c
7030	  TCL_OBJ=objects/if_tcl.o
7031	  TCL_PRO=if_tcl.pro
7032	  TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7033	fi
7034      fi
7035    else
7036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
7037$as_echo "too old; need Tcl version 8.0 or later" >&6; }
7038    fi
7039  fi
7040  if test "$enable_tclinterp" = "dynamic"; then
7041    if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
7042      $as_echo "#define DYNAMIC_TCL 1" >>confdefs.h
7043
7044      TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
7045    fi
7046  fi
7047  if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
7048    as_fn_error $? "could not configure Tcl" "$LINENO" 5
7049  fi
7050fi
7051
7052
7053
7054
7055
7056
7057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
7058$as_echo_n "checking --enable-rubyinterp argument... " >&6; }
7059# Check whether --enable-rubyinterp was given.
7060if test "${enable_rubyinterp+set}" = set; then :
7061  enableval=$enable_rubyinterp;
7062else
7063  enable_rubyinterp="no"
7064fi
7065
7066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
7067$as_echo "$enable_rubyinterp" >&6; }
7068if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
7069  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7070    as_fn_error $? "cannot use Ruby with tiny or small features" "$LINENO" 5
7071  fi
7072
7073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
7074$as_echo_n "checking --with-ruby-command argument... " >&6; }
7075
7076
7077# Check whether --with-ruby-command was given.
7078if test "${with_ruby_command+set}" = set; then :
7079  withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
7080$as_echo "$RUBY_CMD" >&6; }
7081else
7082  RUBY_CMD="ruby"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
7083$as_echo "defaulting to $RUBY_CMD" >&6; }
7084fi
7085
7086  # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
7087set dummy $RUBY_CMD; ac_word=$2
7088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7089$as_echo_n "checking for $ac_word... " >&6; }
7090if ${ac_cv_path_vi_cv_path_ruby+:} false; then :
7091  $as_echo_n "(cached) " >&6
7092else
7093  case $vi_cv_path_ruby in
7094  [\\/]* | ?:[\\/]*)
7095  ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
7096  ;;
7097  *)
7098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7099for as_dir in $PATH
7100do
7101  IFS=$as_save_IFS
7102  test -z "$as_dir" && as_dir=.
7103    for ac_exec_ext in '' $ac_executable_extensions; do
7104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7105    ac_cv_path_vi_cv_path_ruby="$as_dir/$ac_word$ac_exec_ext"
7106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7107    break 2
7108  fi
7109done
7110  done
7111IFS=$as_save_IFS
7112
7113  ;;
7114esac
7115fi
7116vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
7117if test -n "$vi_cv_path_ruby"; then
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
7119$as_echo "$vi_cv_path_ruby" >&6; }
7120else
7121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7122$as_echo "no" >&6; }
7123fi
7124
7125
7126  if test "X$vi_cv_path_ruby" != "X"; then
7127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
7128$as_echo_n "checking Ruby version... " >&6; }
7129    if $vi_cv_path_ruby -e '(VERSION rescue RUBY_VERSION) >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
7130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
7131$as_echo "OK" >&6; }
7132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
7133$as_echo_n "checking Ruby rbconfig... " >&6; }
7134      ruby_rbconfig="RbConfig"
7135      if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
7136	ruby_rbconfig="Config"
7137      fi
7138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
7139$as_echo "$ruby_rbconfig" >&6; }
7140      { $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
7141$as_echo_n "checking Ruby header files... " >&6; }
7142      rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
7143      if test "X$rubyhdrdir" != "X"; then
7144	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
7145$as_echo "$rubyhdrdir" >&6; }
7146	RUBY_CFLAGS="-I$rubyhdrdir"
7147        rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
7148        if test -d "$rubyarchdir"; then
7149          RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
7150        fi
7151        rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
7152	if test "X$rubyversion" = "X"; then
7153	  rubyversion=`$vi_cv_path_ruby -e "print ((VERSION rescue RUBY_VERSION)).gsub(/\./, '')[0,2]"`
7154	fi
7155        RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
7156	rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
7157	if test "X$rubylibs" != "X"; then
7158	  RUBY_LIBS="$rubylibs"
7159	fi
7160	librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
7161	librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
7162	rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
7163	if test -f "$rubylibdir/$librubya"; then
7164	  librubyarg="$librubyarg"
7165	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7166	elif test "$librubyarg" = "libruby.a"; then
7167	  	  librubyarg="-lruby"
7168	  RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
7169	fi
7170
7171	if test "X$librubyarg" != "X"; then
7172	  RUBY_LIBS="$librubyarg $RUBY_LIBS"
7173	fi
7174	rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LDFLAGS']"`
7175	if test "X$rubyldflags" != "X"; then
7176	  	  	  	  rubyldflags=`echo "$rubyldflags" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
7177	  if test "X$rubyldflags" != "X"; then
7178	    if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$rubyldflags\"`" = "X"; then
7179	      LDFLAGS="$rubyldflags $LDFLAGS"
7180	    fi
7181	  fi
7182	fi
7183	RUBY_SRC="if_ruby.c"
7184	RUBY_OBJ="objects/if_ruby.o"
7185	RUBY_PRO="if_ruby.pro"
7186	$as_echo "#define FEAT_RUBY 1" >>confdefs.h
7187
7188	if test "$enable_rubyinterp" = "dynamic"; then
7189	  libruby=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
7190	  $as_echo "#define DYNAMIC_RUBY 1" >>confdefs.h
7191
7192	  RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby\\\" -DDYNAMIC_RUBY_VER=$rubyversion $RUBY_CFLAGS"
7193	  RUBY_LIBS=
7194	fi
7195      else
7196	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
7197$as_echo "not found; disabling Ruby" >&6; }
7198      fi
7199    else
7200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.6.0 or later" >&5
7201$as_echo "too old; need Ruby version 1.6.0 or later" >&6; }
7202    fi
7203  fi
7204
7205  if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
7206    as_fn_error $? "could not configure Ruby" "$LINENO" 5
7207  fi
7208fi
7209
7210
7211
7212
7213
7214
7215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
7216$as_echo_n "checking --enable-cscope argument... " >&6; }
7217# Check whether --enable-cscope was given.
7218if test "${enable_cscope+set}" = set; then :
7219  enableval=$enable_cscope;
7220else
7221  enable_cscope="no"
7222fi
7223
7224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
7225$as_echo "$enable_cscope" >&6; }
7226if test "$enable_cscope" = "yes"; then
7227  $as_echo "#define FEAT_CSCOPE 1" >>confdefs.h
7228
7229fi
7230
7231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-workshop argument" >&5
7232$as_echo_n "checking --enable-workshop argument... " >&6; }
7233# Check whether --enable-workshop was given.
7234if test "${enable_workshop+set}" = set; then :
7235  enableval=$enable_workshop;
7236else
7237  enable_workshop="no"
7238fi
7239
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_workshop" >&5
7241$as_echo "$enable_workshop" >&6; }
7242if test "$enable_workshop" = "yes"; then
7243  $as_echo "#define FEAT_SUN_WORKSHOP 1" >>confdefs.h
7244
7245  WORKSHOP_SRC="workshop.c integration.c"
7246
7247  WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
7248
7249  if test "${enable_gui-xxx}" = xxx; then
7250    enable_gui=motif
7251  fi
7252fi
7253
7254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
7255$as_echo_n "checking --disable-netbeans argument... " >&6; }
7256# Check whether --enable-netbeans was given.
7257if test "${enable_netbeans+set}" = set; then :
7258  enableval=$enable_netbeans;
7259else
7260  enable_netbeans="yes"
7261fi
7262
7263if test "$enable_netbeans" = "yes"; then
7264  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny or small features" >&5
7266$as_echo "cannot use NetBeans with tiny or small features" >&6; }
7267    enable_netbeans="no"
7268  else
7269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270$as_echo "no" >&6; }
7271  fi
7272else
7273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7274$as_echo "yes" >&6; }
7275fi
7276
7277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
7278$as_echo_n "checking --disable-channel argument... " >&6; }
7279# Check whether --enable-channel was given.
7280if test "${enable_channel+set}" = set; then :
7281  enableval=$enable_channel;
7282else
7283  enable_channel="yes"
7284fi
7285
7286if test "$enable_channel" = "yes"; then
7287  if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
7288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny or small features" >&5
7289$as_echo "cannot use channels with tiny or small features" >&6; }
7290    enable_channel="no"
7291  else
7292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7293$as_echo "no" >&6; }
7294  fi
7295else
7296  if test "$enable_netbeans" = "yes"; then
7297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
7298$as_echo "yes, netbeans also disabled" >&6; }
7299    enable_netbeans="no"
7300  else
7301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7302$as_echo "yes" >&6; }
7303  fi
7304fi
7305
7306if test "$enable_channel" = "yes"; then
7307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
7308$as_echo_n "checking for socket in -lsocket... " >&6; }
7309if ${ac_cv_lib_socket_socket+:} false; then :
7310  $as_echo_n "(cached) " >&6
7311else
7312  ac_check_lib_save_LIBS=$LIBS
7313LIBS="-lsocket  $LIBS"
7314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7315/* end confdefs.h.  */
7316
7317/* Override any GCC internal prototype to avoid an error.
7318   Use char because int might match the return type of a GCC
7319   builtin and then its argument prototype would still apply.  */
7320#ifdef __cplusplus
7321extern "C"
7322#endif
7323char socket ();
7324int
7325main ()
7326{
7327return socket ();
7328  ;
7329  return 0;
7330}
7331_ACEOF
7332if ac_fn_c_try_link "$LINENO"; then :
7333  ac_cv_lib_socket_socket=yes
7334else
7335  ac_cv_lib_socket_socket=no
7336fi
7337rm -f core conftest.err conftest.$ac_objext \
7338    conftest$ac_exeext conftest.$ac_ext
7339LIBS=$ac_check_lib_save_LIBS
7340fi
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
7342$as_echo "$ac_cv_lib_socket_socket" >&6; }
7343if test "x$ac_cv_lib_socket_socket" = xyes; then :
7344  cat >>confdefs.h <<_ACEOF
7345#define HAVE_LIBSOCKET 1
7346_ACEOF
7347
7348  LIBS="-lsocket $LIBS"
7349
7350fi
7351
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
7353$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7354if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
7355  $as_echo_n "(cached) " >&6
7356else
7357  ac_check_lib_save_LIBS=$LIBS
7358LIBS="-lnsl  $LIBS"
7359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7360/* end confdefs.h.  */
7361
7362/* Override any GCC internal prototype to avoid an error.
7363   Use char because int might match the return type of a GCC
7364   builtin and then its argument prototype would still apply.  */
7365#ifdef __cplusplus
7366extern "C"
7367#endif
7368char gethostbyname ();
7369int
7370main ()
7371{
7372return gethostbyname ();
7373  ;
7374  return 0;
7375}
7376_ACEOF
7377if ac_fn_c_try_link "$LINENO"; then :
7378  ac_cv_lib_nsl_gethostbyname=yes
7379else
7380  ac_cv_lib_nsl_gethostbyname=no
7381fi
7382rm -f core conftest.err conftest.$ac_objext \
7383    conftest$ac_exeext conftest.$ac_ext
7384LIBS=$ac_check_lib_save_LIBS
7385fi
7386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
7387$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7388if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
7389  cat >>confdefs.h <<_ACEOF
7390#define HAVE_LIBNSL 1
7391_ACEOF
7392
7393  LIBS="-lnsl $LIBS"
7394
7395fi
7396
7397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling with process communication is possible" >&5
7398$as_echo_n "checking whether compiling with process communication is possible... " >&6; }
7399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7400/* end confdefs.h.  */
7401
7402#include <stdio.h>
7403#include <stdlib.h>
7404#include <stdarg.h>
7405#include <fcntl.h>
7406#include <netdb.h>
7407#include <netinet/in.h>
7408#include <errno.h>
7409#include <sys/types.h>
7410#include <sys/socket.h>
7411	/* Check bitfields */
7412	struct nbbuf {
7413	unsigned int  initDone:1;
7414	unsigned short signmaplen;
7415	};
7416
7417int
7418main ()
7419{
7420
7421		/* Check creating a socket. */
7422		struct sockaddr_in server;
7423		(void)socket(AF_INET, SOCK_STREAM, 0);
7424		(void)htons(100);
7425		(void)gethostbyname("microsoft.com");
7426		if (errno == ECONNREFUSED)
7427		  (void)connect(1, (struct sockaddr *)&server, sizeof(server));
7428
7429  ;
7430  return 0;
7431}
7432_ACEOF
7433if ac_fn_c_try_link "$LINENO"; then :
7434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7435$as_echo "yes" >&6; }
7436else
7437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7438$as_echo "no" >&6; }; enable_netbeans="no"; enable_channel="no"
7439fi
7440rm -f core conftest.err conftest.$ac_objext \
7441    conftest$ac_exeext conftest.$ac_ext
7442fi
7443if test "$enable_netbeans" = "yes"; then
7444  $as_echo "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
7445
7446  NETBEANS_SRC="netbeans.c"
7447
7448  NETBEANS_OBJ="objects/netbeans.o"
7449
7450fi
7451if test "$enable_channel" = "yes"; then
7452  $as_echo "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
7453
7454  CHANNEL_SRC="channel.c"
7455
7456  CHANNEL_OBJ="objects/channel.o"
7457
7458fi
7459
7460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
7461$as_echo_n "checking --enable-multibyte argument... " >&6; }
7462# Check whether --enable-multibyte was given.
7463if test "${enable_multibyte+set}" = set; then :
7464  enableval=$enable_multibyte;
7465else
7466  enable_multibyte="no"
7467fi
7468
7469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
7470$as_echo "$enable_multibyte" >&6; }
7471if test "$enable_multibyte" = "yes"; then
7472  $as_echo "#define FEAT_MBYTE 1" >>confdefs.h
7473
7474fi
7475
7476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-hangulinput argument" >&5
7477$as_echo_n "checking --enable-hangulinput argument... " >&6; }
7478# Check whether --enable-hangulinput was given.
7479if test "${enable_hangulinput+set}" = set; then :
7480  enableval=$enable_hangulinput;
7481else
7482  enable_hangulinput="no"
7483fi
7484
7485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_hangulinput" >&5
7486$as_echo "$enable_hangulinput" >&6; }
7487
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
7489$as_echo_n "checking --enable-xim argument... " >&6; }
7490# Check whether --enable-xim was given.
7491if test "${enable_xim+set}" = set; then :
7492  enableval=$enable_xim; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
7493$as_echo "$enable_xim" >&6; }
7494else
7495  enable_xim="auto"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
7496$as_echo "defaulting to auto" >&6; }
7497fi
7498
7499
7500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
7501$as_echo_n "checking --enable-fontset argument... " >&6; }
7502# Check whether --enable-fontset was given.
7503if test "${enable_fontset+set}" = set; then :
7504  enableval=$enable_fontset;
7505else
7506  enable_fontset="no"
7507fi
7508
7509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
7510$as_echo "$enable_fontset" >&6; }
7511
7512test -z "$with_x" && with_x=yes
7513test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
7514if test "$with_x" = no; then
7515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
7516$as_echo "defaulting to: don't HAVE_X11" >&6; }
7517else
7518
7519  # Extract the first word of "xmkmf", so it can be a program name with args.
7520set dummy xmkmf; 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_xmkmfpath+:} false; then :
7524  $as_echo_n "(cached) " >&6
7525else
7526  case $xmkmfpath in
7527  [\\/]* | ?:[\\/]*)
7528  ac_cv_path_xmkmfpath="$xmkmfpath" # 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_xmkmfpath="$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
7549xmkmfpath=$ac_cv_path_xmkmfpath
7550if test -n "$xmkmfpath"; then
7551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
7552$as_echo "$xmkmfpath" >&6; }
7553else
7554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7555$as_echo "no" >&6; }
7556fi
7557
7558
7559
7560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7561$as_echo_n "checking for X... " >&6; }
7562
7563
7564# Check whether --with-x was given.
7565if test "${with_x+set}" = set; then :
7566  withval=$with_x;
7567fi
7568
7569# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7570if test "x$with_x" = xno; then
7571  # The user explicitly disabled X.
7572  have_x=disabled
7573else
7574  case $x_includes,$x_libraries in #(
7575    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
7576    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
7577  $as_echo_n "(cached) " >&6
7578else
7579  # One or both of the vars are not set, and there is no cached value.
7580ac_x_includes=no ac_x_libraries=no
7581rm -f -r conftest.dir
7582if mkdir conftest.dir; then
7583  cd conftest.dir
7584  cat >Imakefile <<'_ACEOF'
7585incroot:
7586	@echo incroot='${INCROOT}'
7587usrlibdir:
7588	@echo usrlibdir='${USRLIBDIR}'
7589libdir:
7590	@echo libdir='${LIBDIR}'
7591_ACEOF
7592  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
7593    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
7594    for ac_var in incroot usrlibdir libdir; do
7595      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7596    done
7597    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7598    for ac_extension in a so sl dylib la dll; do
7599      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7600	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7601	ac_im_usrlibdir=$ac_im_libdir; break
7602      fi
7603    done
7604    # Screen out bogus values from the imake configuration.  They are
7605    # bogus both because they are the default anyway, and because
7606    # using them would break gcc on systems where it needs fixed includes.
7607    case $ac_im_incroot in
7608	/usr/include) ac_x_includes= ;;
7609	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7610    esac
7611    case $ac_im_usrlibdir in
7612	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
7613	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7614    esac
7615  fi
7616  cd ..
7617  rm -f -r conftest.dir
7618fi
7619
7620# Standard set of common directories for X headers.
7621# Check X11 before X11Rn because it is often a symlink to the current release.
7622ac_x_header_dirs='
7623/usr/X11/include
7624/usr/X11R7/include
7625/usr/X11R6/include
7626/usr/X11R5/include
7627/usr/X11R4/include
7628
7629/usr/include/X11
7630/usr/include/X11R7
7631/usr/include/X11R6
7632/usr/include/X11R5
7633/usr/include/X11R4
7634
7635/usr/local/X11/include
7636/usr/local/X11R7/include
7637/usr/local/X11R6/include
7638/usr/local/X11R5/include
7639/usr/local/X11R4/include
7640
7641/usr/local/include/X11
7642/usr/local/include/X11R7
7643/usr/local/include/X11R6
7644/usr/local/include/X11R5
7645/usr/local/include/X11R4
7646
7647/usr/X386/include
7648/usr/x386/include
7649/usr/XFree86/include/X11
7650
7651/usr/include
7652/usr/local/include
7653/usr/unsupported/include
7654/usr/athena/include
7655/usr/local/x11r5/include
7656/usr/lpp/Xamples/include
7657
7658/usr/openwin/include
7659/usr/openwin/share/include'
7660
7661if test "$ac_x_includes" = no; then
7662  # Guess where to find include files, by looking for Xlib.h.
7663  # First, try using that file with no special directory specified.
7664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7665/* end confdefs.h.  */
7666#include <X11/Xlib.h>
7667_ACEOF
7668if ac_fn_c_try_cpp "$LINENO"; then :
7669  # We can compile using X headers with no special include directory.
7670ac_x_includes=
7671else
7672  for ac_dir in $ac_x_header_dirs; do
7673  if test -r "$ac_dir/X11/Xlib.h"; then
7674    ac_x_includes=$ac_dir
7675    break
7676  fi
7677done
7678fi
7679rm -f conftest.err conftest.i conftest.$ac_ext
7680fi # $ac_x_includes = no
7681
7682if test "$ac_x_libraries" = no; then
7683  # Check for the libraries.
7684  # See if we find them without any special options.
7685  # Don't add to $LIBS permanently.
7686  ac_save_LIBS=$LIBS
7687  LIBS="-lX11 $LIBS"
7688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7689/* end confdefs.h.  */
7690#include <X11/Xlib.h>
7691int
7692main ()
7693{
7694XrmInitialize ()
7695  ;
7696  return 0;
7697}
7698_ACEOF
7699if ac_fn_c_try_link "$LINENO"; then :
7700  LIBS=$ac_save_LIBS
7701# We can link X programs with no special library path.
7702ac_x_libraries=
7703else
7704  LIBS=$ac_save_LIBS
7705for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7706do
7707  # Don't even attempt the hair of trying to link an X program!
7708  for ac_extension in a so sl dylib la dll; do
7709    if test -r "$ac_dir/libX11.$ac_extension"; then
7710      ac_x_libraries=$ac_dir
7711      break 2
7712    fi
7713  done
7714done
7715fi
7716rm -f core conftest.err conftest.$ac_objext \
7717    conftest$ac_exeext conftest.$ac_ext
7718fi # $ac_x_libraries = no
7719
7720case $ac_x_includes,$ac_x_libraries in #(
7721  no,* | *,no | *\'*)
7722    # Didn't find X, or a directory has "'" in its name.
7723    ac_cv_have_x="have_x=no";; #(
7724  *)
7725    # Record where we found X for the cache.
7726    ac_cv_have_x="have_x=yes\
7727	ac_x_includes='$ac_x_includes'\
7728	ac_x_libraries='$ac_x_libraries'"
7729esac
7730fi
7731;; #(
7732    *) have_x=yes;;
7733  esac
7734  eval "$ac_cv_have_x"
7735fi # $with_x != no
7736
7737if test "$have_x" != yes; then
7738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7739$as_echo "$have_x" >&6; }
7740  no_x=yes
7741else
7742  # If each of the values was on the command line, it overrides each guess.
7743  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7744  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7745  # Update the cache value to reflect the command line values.
7746  ac_cv_have_x="have_x=yes\
7747	ac_x_includes='$x_includes'\
7748	ac_x_libraries='$x_libraries'"
7749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7750$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
7751fi
7752
7753if test "$no_x" = yes; then
7754  # Not all programs may use this symbol, but it does not hurt to define it.
7755
7756$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
7757
7758  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7759else
7760  if test -n "$x_includes"; then
7761    X_CFLAGS="$X_CFLAGS -I$x_includes"
7762  fi
7763
7764  # It would also be nice to do this for all -L options, not just this one.
7765  if test -n "$x_libraries"; then
7766    X_LIBS="$X_LIBS -L$x_libraries"
7767    # For Solaris; some versions of Sun CC require a space after -R and
7768    # others require no space.  Words are not sufficient . . . .
7769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
7770$as_echo_n "checking whether -R must be followed by a space... " >&6; }
7771    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
7772    ac_xsave_c_werror_flag=$ac_c_werror_flag
7773    ac_c_werror_flag=yes
7774    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7775/* end confdefs.h.  */
7776
7777int
7778main ()
7779{
7780
7781  ;
7782  return 0;
7783}
7784_ACEOF
7785if ac_fn_c_try_link "$LINENO"; then :
7786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7787$as_echo "no" >&6; }
7788       X_LIBS="$X_LIBS -R$x_libraries"
7789else
7790  LIBS="$ac_xsave_LIBS -R $x_libraries"
7791       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7792/* end confdefs.h.  */
7793
7794int
7795main ()
7796{
7797
7798  ;
7799  return 0;
7800}
7801_ACEOF
7802if ac_fn_c_try_link "$LINENO"; then :
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7804$as_echo "yes" >&6; }
7805	  X_LIBS="$X_LIBS -R $x_libraries"
7806else
7807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
7808$as_echo "neither works" >&6; }
7809fi
7810rm -f core conftest.err conftest.$ac_objext \
7811    conftest$ac_exeext conftest.$ac_ext
7812fi
7813rm -f core conftest.err conftest.$ac_objext \
7814    conftest$ac_exeext conftest.$ac_ext
7815    ac_c_werror_flag=$ac_xsave_c_werror_flag
7816    LIBS=$ac_xsave_LIBS
7817  fi
7818
7819  # Check for system-dependent libraries X programs must link with.
7820  # Do this before checking for the system-independent R6 libraries
7821  # (-lICE), since we may need -lsocket or whatever for X linking.
7822
7823  if test "$ISC" = yes; then
7824    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
7825  else
7826    # Martyn Johnson says this is needed for Ultrix, if the X
7827    # libraries were built with DECnet support.  And Karl Berry says
7828    # the Alpha needs dnet_stub (dnet does not exist).
7829    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
7830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831/* end confdefs.h.  */
7832
7833/* Override any GCC internal prototype to avoid an error.
7834   Use char because int might match the return type of a GCC
7835   builtin and then its argument prototype would still apply.  */
7836#ifdef __cplusplus
7837extern "C"
7838#endif
7839char XOpenDisplay ();
7840int
7841main ()
7842{
7843return XOpenDisplay ();
7844  ;
7845  return 0;
7846}
7847_ACEOF
7848if ac_fn_c_try_link "$LINENO"; then :
7849
7850else
7851  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7852$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7853if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
7854  $as_echo_n "(cached) " >&6
7855else
7856  ac_check_lib_save_LIBS=$LIBS
7857LIBS="-ldnet  $LIBS"
7858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7859/* end confdefs.h.  */
7860
7861/* Override any GCC internal prototype to avoid an error.
7862   Use char because int might match the return type of a GCC
7863   builtin and then its argument prototype would still apply.  */
7864#ifdef __cplusplus
7865extern "C"
7866#endif
7867char dnet_ntoa ();
7868int
7869main ()
7870{
7871return dnet_ntoa ();
7872  ;
7873  return 0;
7874}
7875_ACEOF
7876if ac_fn_c_try_link "$LINENO"; then :
7877  ac_cv_lib_dnet_dnet_ntoa=yes
7878else
7879  ac_cv_lib_dnet_dnet_ntoa=no
7880fi
7881rm -f core conftest.err conftest.$ac_objext \
7882    conftest$ac_exeext conftest.$ac_ext
7883LIBS=$ac_check_lib_save_LIBS
7884fi
7885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7886$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7887if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
7888  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7889fi
7890
7891    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7892      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
7893$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
7894if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
7895  $as_echo_n "(cached) " >&6
7896else
7897  ac_check_lib_save_LIBS=$LIBS
7898LIBS="-ldnet_stub  $LIBS"
7899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7900/* end confdefs.h.  */
7901
7902/* Override any GCC internal prototype to avoid an error.
7903   Use char because int might match the return type of a GCC
7904   builtin and then its argument prototype would still apply.  */
7905#ifdef __cplusplus
7906extern "C"
7907#endif
7908char dnet_ntoa ();
7909int
7910main ()
7911{
7912return dnet_ntoa ();
7913  ;
7914  return 0;
7915}
7916_ACEOF
7917if ac_fn_c_try_link "$LINENO"; then :
7918  ac_cv_lib_dnet_stub_dnet_ntoa=yes
7919else
7920  ac_cv_lib_dnet_stub_dnet_ntoa=no
7921fi
7922rm -f core conftest.err conftest.$ac_objext \
7923    conftest$ac_exeext conftest.$ac_ext
7924LIBS=$ac_check_lib_save_LIBS
7925fi
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7927$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
7928if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
7929  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7930fi
7931
7932    fi
7933fi
7934rm -f core conftest.err conftest.$ac_objext \
7935    conftest$ac_exeext conftest.$ac_ext
7936    LIBS="$ac_xsave_LIBS"
7937
7938    # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
7939    # to get the SysV transport functions.
7940    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7941    # needs -lnsl.
7942    # The nsl library prevents programs from opening the X display
7943    # on Irix 5.2, according to T.E. Dickey.
7944    # The functions gethostbyname, getservbyname, and inet_addr are
7945    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7946    ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
7947if test "x$ac_cv_func_gethostbyname" = xyes; then :
7948
7949fi
7950
7951    if test $ac_cv_func_gethostbyname = no; then
7952      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
7953$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
7954if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
7955  $as_echo_n "(cached) " >&6
7956else
7957  ac_check_lib_save_LIBS=$LIBS
7958LIBS="-lnsl  $LIBS"
7959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7960/* end confdefs.h.  */
7961
7962/* Override any GCC internal prototype to avoid an error.
7963   Use char because int might match the return type of a GCC
7964   builtin and then its argument prototype would still apply.  */
7965#ifdef __cplusplus
7966extern "C"
7967#endif
7968char gethostbyname ();
7969int
7970main ()
7971{
7972return gethostbyname ();
7973  ;
7974  return 0;
7975}
7976_ACEOF
7977if ac_fn_c_try_link "$LINENO"; then :
7978  ac_cv_lib_nsl_gethostbyname=yes
7979else
7980  ac_cv_lib_nsl_gethostbyname=no
7981fi
7982rm -f core conftest.err conftest.$ac_objext \
7983    conftest$ac_exeext conftest.$ac_ext
7984LIBS=$ac_check_lib_save_LIBS
7985fi
7986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
7987$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
7988if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
7989  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7990fi
7991
7992      if test $ac_cv_lib_nsl_gethostbyname = no; then
7993	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
7994$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
7995if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
7996  $as_echo_n "(cached) " >&6
7997else
7998  ac_check_lib_save_LIBS=$LIBS
7999LIBS="-lbsd  $LIBS"
8000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8001/* end confdefs.h.  */
8002
8003/* Override any GCC internal prototype to avoid an error.
8004   Use char because int might match the return type of a GCC
8005   builtin and then its argument prototype would still apply.  */
8006#ifdef __cplusplus
8007extern "C"
8008#endif
8009char gethostbyname ();
8010int
8011main ()
8012{
8013return gethostbyname ();
8014  ;
8015  return 0;
8016}
8017_ACEOF
8018if ac_fn_c_try_link "$LINENO"; then :
8019  ac_cv_lib_bsd_gethostbyname=yes
8020else
8021  ac_cv_lib_bsd_gethostbyname=no
8022fi
8023rm -f core conftest.err conftest.$ac_objext \
8024    conftest$ac_exeext conftest.$ac_ext
8025LIBS=$ac_check_lib_save_LIBS
8026fi
8027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
8028$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
8029if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
8030  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8031fi
8032
8033      fi
8034    fi
8035
8036    # [email protected] says without -lsocket,
8037    # socket/setsockopt and other routines are undefined under SCO ODT
8038    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8039    # on later versions), says Simon Leinen: it contains gethostby*
8040    # variants that don't use the name server (or something).  -lsocket
8041    # must be given before -lnsl if both are needed.  We assume that
8042    # if connect needs -lnsl, so does gethostbyname.
8043    ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
8044if test "x$ac_cv_func_connect" = xyes; then :
8045
8046fi
8047
8048    if test $ac_cv_func_connect = no; then
8049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
8050$as_echo_n "checking for connect in -lsocket... " >&6; }
8051if ${ac_cv_lib_socket_connect+:} false; then :
8052  $as_echo_n "(cached) " >&6
8053else
8054  ac_check_lib_save_LIBS=$LIBS
8055LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057/* end confdefs.h.  */
8058
8059/* Override any GCC internal prototype to avoid an error.
8060   Use char because int might match the return type of a GCC
8061   builtin and then its argument prototype would still apply.  */
8062#ifdef __cplusplus
8063extern "C"
8064#endif
8065char connect ();
8066int
8067main ()
8068{
8069return connect ();
8070  ;
8071  return 0;
8072}
8073_ACEOF
8074if ac_fn_c_try_link "$LINENO"; then :
8075  ac_cv_lib_socket_connect=yes
8076else
8077  ac_cv_lib_socket_connect=no
8078fi
8079rm -f core conftest.err conftest.$ac_objext \
8080    conftest$ac_exeext conftest.$ac_ext
8081LIBS=$ac_check_lib_save_LIBS
8082fi
8083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
8084$as_echo "$ac_cv_lib_socket_connect" >&6; }
8085if test "x$ac_cv_lib_socket_connect" = xyes; then :
8086  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8087fi
8088
8089    fi
8090
8091    # Guillermo Gomez says -lposix is necessary on A/UX.
8092    ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
8093if test "x$ac_cv_func_remove" = xyes; then :
8094
8095fi
8096
8097    if test $ac_cv_func_remove = no; then
8098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
8099$as_echo_n "checking for remove in -lposix... " >&6; }
8100if ${ac_cv_lib_posix_remove+:} false; then :
8101  $as_echo_n "(cached) " >&6
8102else
8103  ac_check_lib_save_LIBS=$LIBS
8104LIBS="-lposix  $LIBS"
8105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8106/* end confdefs.h.  */
8107
8108/* Override any GCC internal prototype to avoid an error.
8109   Use char because int might match the return type of a GCC
8110   builtin and then its argument prototype would still apply.  */
8111#ifdef __cplusplus
8112extern "C"
8113#endif
8114char remove ();
8115int
8116main ()
8117{
8118return remove ();
8119  ;
8120  return 0;
8121}
8122_ACEOF
8123if ac_fn_c_try_link "$LINENO"; then :
8124  ac_cv_lib_posix_remove=yes
8125else
8126  ac_cv_lib_posix_remove=no
8127fi
8128rm -f core conftest.err conftest.$ac_objext \
8129    conftest$ac_exeext conftest.$ac_ext
8130LIBS=$ac_check_lib_save_LIBS
8131fi
8132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
8133$as_echo "$ac_cv_lib_posix_remove" >&6; }
8134if test "x$ac_cv_lib_posix_remove" = xyes; then :
8135  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8136fi
8137
8138    fi
8139
8140    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8141    ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
8142if test "x$ac_cv_func_shmat" = xyes; then :
8143
8144fi
8145
8146    if test $ac_cv_func_shmat = no; then
8147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
8148$as_echo_n "checking for shmat in -lipc... " >&6; }
8149if ${ac_cv_lib_ipc_shmat+:} false; then :
8150  $as_echo_n "(cached) " >&6
8151else
8152  ac_check_lib_save_LIBS=$LIBS
8153LIBS="-lipc  $LIBS"
8154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8155/* end confdefs.h.  */
8156
8157/* Override any GCC internal prototype to avoid an error.
8158   Use char because int might match the return type of a GCC
8159   builtin and then its argument prototype would still apply.  */
8160#ifdef __cplusplus
8161extern "C"
8162#endif
8163char shmat ();
8164int
8165main ()
8166{
8167return shmat ();
8168  ;
8169  return 0;
8170}
8171_ACEOF
8172if ac_fn_c_try_link "$LINENO"; then :
8173  ac_cv_lib_ipc_shmat=yes
8174else
8175  ac_cv_lib_ipc_shmat=no
8176fi
8177rm -f core conftest.err conftest.$ac_objext \
8178    conftest$ac_exeext conftest.$ac_ext
8179LIBS=$ac_check_lib_save_LIBS
8180fi
8181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
8182$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
8183if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
8184  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8185fi
8186
8187    fi
8188  fi
8189
8190  # Check for libraries that X11R6 Xt/Xaw programs need.
8191  ac_save_LDFLAGS=$LDFLAGS
8192  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8193  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8194  # check for ICE first), but we must link in the order -lSM -lICE or
8195  # we get undefined symbols.  So assume we have SM if we have ICE.
8196  # These have to be linked with before -lX11, unlike the other
8197  # libraries we check for below, so use a different variable.
8198  # John Interrante, Karl Berry
8199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
8200$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
8201if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
8202  $as_echo_n "(cached) " >&6
8203else
8204  ac_check_lib_save_LIBS=$LIBS
8205LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8207/* end confdefs.h.  */
8208
8209/* Override any GCC internal prototype to avoid an error.
8210   Use char because int might match the return type of a GCC
8211   builtin and then its argument prototype would still apply.  */
8212#ifdef __cplusplus
8213extern "C"
8214#endif
8215char IceConnectionNumber ();
8216int
8217main ()
8218{
8219return IceConnectionNumber ();
8220  ;
8221  return 0;
8222}
8223_ACEOF
8224if ac_fn_c_try_link "$LINENO"; then :
8225  ac_cv_lib_ICE_IceConnectionNumber=yes
8226else
8227  ac_cv_lib_ICE_IceConnectionNumber=no
8228fi
8229rm -f core conftest.err conftest.$ac_objext \
8230    conftest$ac_exeext conftest.$ac_ext
8231LIBS=$ac_check_lib_save_LIBS
8232fi
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8234$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
8235if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
8236  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8237fi
8238
8239  LDFLAGS=$ac_save_LDFLAGS
8240
8241fi
8242
8243
8244        if test "$zOSUnix" = "yes"; then
8245    CFLAGS="$CFLAGS -W c,dll"
8246    LDFLAGS="$LDFLAGS -W l,dll"
8247    X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
8248  fi
8249
8250
8251  if test -d "$x_includes" && test ! -d "$x_libraries"; then
8252    x_libraries=`echo "$x_includes" | sed s/include/lib/`
8253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
8254$as_echo "Corrected X libraries to $x_libraries" >&6; }
8255    X_LIBS="$X_LIBS -L$x_libraries"
8256    if test "`(uname) 2>/dev/null`" = SunOS &&
8257					 uname -r | grep '^5' >/dev/null; then
8258      X_LIBS="$X_LIBS -R $x_libraries"
8259    fi
8260  fi
8261
8262  if test -d "$x_libraries" && test ! -d "$x_includes"; then
8263    x_includes=`echo "$x_libraries" | sed s/lib/include/`
8264    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
8265$as_echo "Corrected X includes to $x_includes" >&6; }
8266    X_CFLAGS="$X_CFLAGS -I$x_includes"
8267  fi
8268
8269    X_CFLAGS="`echo $X_CFLAGS\  | sed 's%-I/usr/include %%'`"
8270    X_LIBS="`echo $X_LIBS\  | sed 's%-L/usr/lib %%'`"
8271    X_LIBS="`echo $X_LIBS\  | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
8272
8273
8274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
8275$as_echo_n "checking if X11 header files can be found... " >&6; }
8276  cflags_save=$CFLAGS
8277  CFLAGS="$CFLAGS $X_CFLAGS"
8278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8279/* end confdefs.h.  */
8280#include <X11/Xlib.h>
8281#include <X11/Intrinsic.h>
8282int
8283main ()
8284{
8285
8286  ;
8287  return 0;
8288}
8289_ACEOF
8290if ac_fn_c_try_compile "$LINENO"; then :
8291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8292$as_echo "yes" >&6; }
8293else
8294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8295$as_echo "no" >&6; }; no_x=yes
8296fi
8297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8298  CFLAGS=$cflags_save
8299
8300  if test "${no_x-no}" = yes; then
8301    with_x=no
8302  else
8303    $as_echo "#define HAVE_X11 1" >>confdefs.h
8304
8305    X_LIB="-lXt -lX11";
8306
8307
8308    ac_save_LDFLAGS="$LDFLAGS"
8309    LDFLAGS="-L$x_libraries $LDFLAGS"
8310
8311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
8312$as_echo_n "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
8313if ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+:} false; then :
8314  $as_echo_n "(cached) " >&6
8315else
8316  ac_check_lib_save_LIBS=$LIBS
8317LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
8318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8319/* end confdefs.h.  */
8320
8321/* Override any GCC internal prototype to avoid an error.
8322   Use char because int might match the return type of a GCC
8323   builtin and then its argument prototype would still apply.  */
8324#ifdef __cplusplus
8325extern "C"
8326#endif
8327char _XdmcpAuthDoIt ();
8328int
8329main ()
8330{
8331return _XdmcpAuthDoIt ();
8332  ;
8333  return 0;
8334}
8335_ACEOF
8336if ac_fn_c_try_link "$LINENO"; then :
8337  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
8338else
8339  ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
8340fi
8341rm -f core conftest.err conftest.$ac_objext \
8342    conftest$ac_exeext conftest.$ac_ext
8343LIBS=$ac_check_lib_save_LIBS
8344fi
8345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
8346$as_echo "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
8347if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes; then :
8348  X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
8349fi
8350
8351
8352                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
8353$as_echo_n "checking for IceOpenConnection in -lICE... " >&6; }
8354if ${ac_cv_lib_ICE_IceOpenConnection+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  ac_check_lib_save_LIBS=$LIBS
8358LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8360/* end confdefs.h.  */
8361
8362/* Override any GCC internal prototype to avoid an error.
8363   Use char because int might match the return type of a GCC
8364   builtin and then its argument prototype would still apply.  */
8365#ifdef __cplusplus
8366extern "C"
8367#endif
8368char IceOpenConnection ();
8369int
8370main ()
8371{
8372return IceOpenConnection ();
8373  ;
8374  return 0;
8375}
8376_ACEOF
8377if ac_fn_c_try_link "$LINENO"; then :
8378  ac_cv_lib_ICE_IceOpenConnection=yes
8379else
8380  ac_cv_lib_ICE_IceOpenConnection=no
8381fi
8382rm -f core conftest.err conftest.$ac_objext \
8383    conftest$ac_exeext conftest.$ac_ext
8384LIBS=$ac_check_lib_save_LIBS
8385fi
8386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
8387$as_echo "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
8388if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes; then :
8389  X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
8390fi
8391
8392
8393        LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
8394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
8395$as_echo_n "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
8396if ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+:} false; then :
8397  $as_echo_n "(cached) " >&6
8398else
8399  ac_check_lib_save_LIBS=$LIBS
8400LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
8401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8402/* end confdefs.h.  */
8403
8404/* Override any GCC internal prototype to avoid an error.
8405   Use char because int might match the return type of a GCC
8406   builtin and then its argument prototype would still apply.  */
8407#ifdef __cplusplus
8408extern "C"
8409#endif
8410char XpmCreatePixmapFromData ();
8411int
8412main ()
8413{
8414return XpmCreatePixmapFromData ();
8415  ;
8416  return 0;
8417}
8418_ACEOF
8419if ac_fn_c_try_link "$LINENO"; then :
8420  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
8421else
8422  ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
8423fi
8424rm -f core conftest.err conftest.$ac_objext \
8425    conftest$ac_exeext conftest.$ac_ext
8426LIBS=$ac_check_lib_save_LIBS
8427fi
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
8429$as_echo "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
8430if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes; then :
8431  X_PRE_LIBS="$X_PRE_LIBS -lXpm"
8432fi
8433
8434
8435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
8436$as_echo_n "checking if X11 header files implicitly declare return values... " >&6; }
8437    cflags_save=$CFLAGS
8438        if test "$GCC" = yes; then
8439      CFLAGS="$CFLAGS $X_CFLAGS -Werror"
8440    else
8441      CFLAGS="$CFLAGS $X_CFLAGS"
8442    fi
8443    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8444/* end confdefs.h.  */
8445#include <X11/Xlib.h>
8446int
8447main ()
8448{
8449
8450  ;
8451  return 0;
8452}
8453_ACEOF
8454if ac_fn_c_try_compile "$LINENO"; then :
8455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8456$as_echo "no" >&6; }
8457else
8458  CFLAGS="$CFLAGS -Wno-implicit-int"
8459	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8460/* end confdefs.h.  */
8461#include <X11/Xlib.h>
8462int
8463main ()
8464{
8465
8466  ;
8467  return 0;
8468}
8469_ACEOF
8470if ac_fn_c_try_compile "$LINENO"; then :
8471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8472$as_echo "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
8473else
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
8475$as_echo "test failed" >&6; }
8476
8477fi
8478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8479
8480fi
8481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8482    CFLAGS=$cflags_save
8483
8484    LDFLAGS="$ac_save_LDFLAGS"
8485
8486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t is 2 bytes" >&5
8487$as_echo_n "checking size of wchar_t is 2 bytes... " >&6; }
8488    if ${ac_cv_small_wchar_t+:} false; then :
8489  $as_echo_n "(cached) " >&6
8490else
8491  if test "$cross_compiling" = yes; then :
8492  as_fn_error $? "failed to compile test program" "$LINENO" 5
8493else
8494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8495/* end confdefs.h.  */
8496
8497#include <X11/Xlib.h>
8498#if STDC_HEADERS
8499# include <stdlib.h>
8500# include <stddef.h>
8501#endif
8502		main()
8503		{
8504		  if (sizeof(wchar_t) <= 2)
8505		    exit(1);
8506		  exit(0);
8507		}
8508_ACEOF
8509if ac_fn_c_try_run "$LINENO"; then :
8510  ac_cv_small_wchar_t="no"
8511else
8512  ac_cv_small_wchar_t="yes"
8513fi
8514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8515  conftest.$ac_objext conftest.beam conftest.$ac_ext
8516fi
8517
8518fi
8519
8520    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_small_wchar_t" >&5
8521$as_echo "$ac_cv_small_wchar_t" >&6; }
8522    if test "x$ac_cv_small_wchar_t" = "xyes" ; then
8523      $as_echo "#define SMALL_WCHAR_T 1" >>confdefs.h
8524
8525    fi
8526
8527  fi
8528fi
8529
8530test "x$with_x" = xno -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
8531
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
8533$as_echo_n "checking --enable-gui argument... " >&6; }
8534# Check whether --enable-gui was given.
8535if test "${enable_gui+set}" = set; then :
8536  enableval=$enable_gui;
8537else
8538  enable_gui="auto"
8539fi
8540
8541
8542enable_gui_canon=`echo "_$enable_gui" | \
8543	sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8544
8545SKIP_GTK2=YES
8546SKIP_GTK3=YES
8547SKIP_GNOME=YES
8548SKIP_MOTIF=YES
8549SKIP_ATHENA=YES
8550SKIP_NEXTAW=YES
8551SKIP_PHOTON=YES
8552SKIP_CARBON=YES
8553GUITYPE=NONE
8554
8555if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
8556  SKIP_PHOTON=
8557  case "$enable_gui_canon" in
8558    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
8559$as_echo "no GUI support" >&6; }
8560		SKIP_PHOTON=YES ;;
8561    yes|"")	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
8562$as_echo "yes - automatic GUI support" >&6; } ;;
8563    auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
8564$as_echo "auto - automatic GUI support" >&6; } ;;
8565    photon)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
8566$as_echo "Photon GUI support" >&6; } ;;
8567    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
8568$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
8569		SKIP_PHOTON=YES ;;
8570  esac
8571
8572elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
8573  SKIP_CARBON=
8574  case "$enable_gui_canon" in
8575    no)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
8576$as_echo "no GUI support" >&6; }
8577		SKIP_CARBON=YES ;;
8578    yes|"")	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
8579$as_echo "yes - automatic GUI support" >&6; } ;;
8580    auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - Carbon GUI is outdated - disable GUI support" >&5
8581$as_echo "auto - Carbon GUI is outdated - disable GUI support" >&6; }
8582		SKIP_CARBON=YES ;;
8583    carbon)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Carbon GUI support" >&5
8584$as_echo "Carbon GUI support" >&6; } ;;
8585    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
8586$as_echo "Sorry, $enable_gui GUI is not supported" >&6; }
8587		SKIP_CARBON=YES ;;
8588  esac
8589
8590else
8591
8592  case "$enable_gui_canon" in
8593    no|none)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
8594$as_echo "no GUI support" >&6; } ;;
8595    yes|""|auto)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
8596$as_echo "yes/auto - automatic GUI support" >&6; }
8597		SKIP_GTK2=
8598		SKIP_GNOME=
8599		SKIP_MOTIF=
8600		SKIP_ATHENA=
8601		SKIP_NEXTAW=
8602		SKIP_CARBON=;;
8603    gtk2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
8604$as_echo "GTK+ 2.x GUI support" >&6; }
8605		SKIP_GTK2=;;
8606    gnome2)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
8607$as_echo "GNOME 2.x GUI support" >&6; }
8608		SKIP_GNOME=
8609		SKIP_GTK2=;;
8610    gtk3)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
8611$as_echo "GTK+ 3.x GUI support" >&6; }
8612		SKIP_GTK3=;;
8613    motif)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
8614$as_echo "Motif GUI support" >&6; }
8615		SKIP_MOTIF=;;
8616    athena)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Athena GUI support" >&5
8617$as_echo "Athena GUI support" >&6; }
8618		SKIP_ATHENA=;;
8619    nextaw)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: neXtaw GUI support" >&5
8620$as_echo "neXtaw GUI support" >&6; }
8621		SKIP_NEXTAW=;;
8622    *)		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
8623$as_echo "Sorry, $enable_gui GUI is not supported" >&6; } ;;
8624  esac
8625
8626fi
8627
8628if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
8629				-a "$enable_gui_canon" != "gnome2"; then
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
8631$as_echo_n "checking whether or not to look for GTK+ 2... " >&6; }
8632  # Check whether --enable-gtk2-check was given.
8633if test "${enable_gtk2_check+set}" = set; then :
8634  enableval=$enable_gtk2_check;
8635else
8636  enable_gtk2_check="yes"
8637fi
8638
8639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
8640$as_echo "$enable_gtk2_check" >&6; }
8641  if test "x$enable_gtk2_check" = "xno"; then
8642    SKIP_GTK2=YES
8643    SKIP_GNOME=YES
8644  fi
8645fi
8646
8647if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
8648  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
8649$as_echo_n "checking whether or not to look for GNOME... " >&6; }
8650  # Check whether --enable-gnome-check was given.
8651if test "${enable_gnome_check+set}" = set; then :
8652  enableval=$enable_gnome_check;
8653else
8654  enable_gnome_check="no"
8655fi
8656
8657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
8658$as_echo "$enable_gnome_check" >&6; }
8659  if test "x$enable_gnome_check" = "xno"; then
8660    SKIP_GNOME=YES
8661  fi
8662fi
8663
8664if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
8666$as_echo_n "checking whether or not to look for GTK+ 3... " >&6; }
8667  # Check whether --enable-gtk3-check was given.
8668if test "${enable_gtk3_check+set}" = set; then :
8669  enableval=$enable_gtk3_check;
8670else
8671  enable_gtk3_check="yes"
8672fi
8673
8674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
8675$as_echo "$enable_gtk3_check" >&6; }
8676  if test "x$enable_gtk3_check" = "xno"; then
8677    SKIP_GTK3=YES
8678  fi
8679fi
8680
8681if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
8682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
8683$as_echo_n "checking whether or not to look for Motif... " >&6; }
8684  # Check whether --enable-motif-check was given.
8685if test "${enable_motif_check+set}" = set; then :
8686  enableval=$enable_motif_check;
8687else
8688  enable_motif_check="yes"
8689fi
8690
8691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
8692$as_echo "$enable_motif_check" >&6; }
8693  if test "x$enable_motif_check" = "xno"; then
8694    SKIP_MOTIF=YES
8695  fi
8696fi
8697
8698if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
8699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Athena" >&5
8700$as_echo_n "checking whether or not to look for Athena... " >&6; }
8701  # Check whether --enable-athena-check was given.
8702if test "${enable_athena_check+set}" = set; then :
8703  enableval=$enable_athena_check;
8704else
8705  enable_athena_check="yes"
8706fi
8707
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_athena_check" >&5
8709$as_echo "$enable_athena_check" >&6; }
8710  if test "x$enable_athena_check" = "xno"; then
8711    SKIP_ATHENA=YES
8712  fi
8713fi
8714
8715if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
8716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for neXtaw" >&5
8717$as_echo_n "checking whether or not to look for neXtaw... " >&6; }
8718  # Check whether --enable-nextaw-check was given.
8719if test "${enable_nextaw_check+set}" = set; then :
8720  enableval=$enable_nextaw_check;
8721else
8722  enable_nextaw_check="yes"
8723fi
8724
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nextaw_check" >&5
8726$as_echo "$enable_nextaw_check" >&6; };
8727  if test "x$enable_nextaw_check" = "xno"; then
8728    SKIP_NEXTAW=YES
8729  fi
8730fi
8731
8732if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
8733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Carbon" >&5
8734$as_echo_n "checking whether or not to look for Carbon... " >&6; }
8735  # Check whether --enable-carbon-check was given.
8736if test "${enable_carbon_check+set}" = set; then :
8737  enableval=$enable_carbon_check;
8738else
8739  enable_carbon_check="yes"
8740fi
8741
8742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_carbon_check" >&5
8743$as_echo "$enable_carbon_check" >&6; };
8744  if test "x$enable_carbon_check" = "xno"; then
8745    SKIP_CARBON=YES
8746  fi
8747fi
8748
8749
8750if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
8751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Carbon GUI" >&5
8752$as_echo_n "checking for Carbon GUI... " >&6; }
8753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8754$as_echo "yes" >&6; };
8755  GUITYPE=CARBONGUI
8756  if test "$VIMNAME" = "vim"; then
8757    VIMNAME=Vim
8758  fi
8759
8760  if test "x$MACARCH" = "xboth"; then
8761    CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
8762  else
8763    CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
8764  fi
8765
8766    if test x$prefix = xNONE; then
8767    prefix=/Applications
8768  fi
8769
8770    datadir='${prefix}/Vim.app/Contents/Resources'
8771
8772    SKIP_GTK2=YES;
8773  SKIP_GNOME=YES;
8774  SKIP_MOTIF=YES;
8775  SKIP_ATHENA=YES;
8776  SKIP_NEXTAW=YES;
8777  SKIP_PHOTON=YES;
8778  SKIP_CARBON=YES
8779fi
8780
8781
8782
8783
8784
8785
8786
8787
8788if test -z "$SKIP_GTK2"; then
8789
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
8791$as_echo_n "checking --disable-gtktest argument... " >&6; }
8792  # Check whether --enable-gtktest was given.
8793if test "${enable_gtktest+set}" = set; then :
8794  enableval=$enable_gtktest;
8795else
8796  enable_gtktest=yes
8797fi
8798
8799  if test "x$enable_gtktest" = "xyes" ; then
8800    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
8801$as_echo "gtk test enabled" >&6; }
8802  else
8803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
8804$as_echo "gtk test disabled" >&6; }
8805  fi
8806
8807  if test "X$PKG_CONFIG" = "X"; then
8808    # Extract the first word of "pkg-config", so it can be a program name with args.
8809set dummy pkg-config; ac_word=$2
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8811$as_echo_n "checking for $ac_word... " >&6; }
8812if ${ac_cv_path_PKG_CONFIG+:} false; then :
8813  $as_echo_n "(cached) " >&6
8814else
8815  case $PKG_CONFIG in
8816  [\\/]* | ?:[\\/]*)
8817  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8818  ;;
8819  *)
8820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821for as_dir in $PATH
8822do
8823  IFS=$as_save_IFS
8824  test -z "$as_dir" && as_dir=.
8825    for ac_exec_ext in '' $ac_executable_extensions; do
8826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8829    break 2
8830  fi
8831done
8832  done
8833IFS=$as_save_IFS
8834
8835  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8836  ;;
8837esac
8838fi
8839PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8840if test -n "$PKG_CONFIG"; then
8841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8842$as_echo "$PKG_CONFIG" >&6; }
8843else
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8845$as_echo "no" >&6; }
8846fi
8847
8848
8849  fi
8850
8851  if test "x$PKG_CONFIG" != "xno"; then
8852
8853  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
8854  {
8855    no_gtk=""
8856    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
8857	  && $PKG_CONFIG --exists gtk+-2.0; then
8858    {
8859      min_gtk_version=2.2.0
8860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
8861$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
8862                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
8863      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
8864      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
8865      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
8866	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
8867      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
8868	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
8869      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
8870	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
8871    }
8872    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
8873	  && $PKG_CONFIG --exists gtk+-3.0; then
8874    {
8875      min_gtk_version=2.2.0
8876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
8877$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
8878
8879      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
8880      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
8881      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
8882      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
8883	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
8884      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
8885	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
8886      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
8887	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
8888    }
8889    else
8890      no_gtk=yes
8891    fi
8892
8893    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
8894    {
8895      ac_save_CFLAGS="$CFLAGS"
8896      ac_save_LIBS="$LIBS"
8897      CFLAGS="$CFLAGS $GTK_CFLAGS"
8898      LIBS="$LIBS $GTK_LIBS"
8899
8900                        rm -f conf.gtktest
8901      if test "$cross_compiling" = yes; then :
8902  echo $ac_n "cross compiling; assumed OK... $ac_c"
8903else
8904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8905/* end confdefs.h.  */
8906
8907#include <gtk/gtk.h>
8908#include <stdio.h>
8909#if STDC_HEADERS
8910# include <stdlib.h>
8911# include <stddef.h>
8912#endif
8913
8914int
8915main ()
8916{
8917int major, minor, micro;
8918char *tmp_version;
8919
8920system ("touch conf.gtktest");
8921
8922/* HP/UX 9 (%@#!) writes to sscanf strings */
8923tmp_version = g_strdup("$min_gtk_version");
8924if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
8925   printf("%s, bad version string\n", "$min_gtk_version");
8926   exit(1);
8927 }
8928
8929if ((gtk_major_version > major) ||
8930    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
8931    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
8932				     (gtk_micro_version >= micro)))
8933{
8934    return 0;
8935}
8936return 1;
8937}
8938
8939_ACEOF
8940if ac_fn_c_try_run "$LINENO"; then :
8941
8942else
8943  no_gtk=yes
8944fi
8945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8946  conftest.$ac_objext conftest.beam conftest.$ac_ext
8947fi
8948
8949      CFLAGS="$ac_save_CFLAGS"
8950      LIBS="$ac_save_LIBS"
8951    }
8952    fi
8953    if test "x$no_gtk" = x ; then
8954      if test "x$enable_gtktest" = "xyes"; then
8955	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
8956$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
8957      else
8958	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
8959$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
8960      fi
8961      GUI_LIB_LOC="$GTK_LIBDIR"
8962		 GTK_LIBNAME="$GTK_LIBS"
8963		GUI_INC_LOC="$GTK_CFLAGS"
8964    else
8965    {
8966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8967$as_echo "no" >&6; }
8968      GTK_CFLAGS=""
8969      GTK_LIBS=""
8970      :
8971    }
8972    fi
8973  }
8974  else
8975    GTK_CFLAGS=""
8976    GTK_LIBS=""
8977    :
8978  fi
8979
8980
8981  rm -f conf.gtktest
8982
8983    if test "x$GTK_CFLAGS" != "x"; then
8984      SKIP_GTK3=YES
8985      SKIP_ATHENA=YES
8986      SKIP_NEXTAW=YES
8987      SKIP_MOTIF=YES
8988      GUITYPE=GTK
8989
8990    fi
8991  fi
8992  if test "x$GUITYPE" = "xGTK"; then
8993    if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
8994	|| test "0$gtk_minor_version" -ge 2; then
8995      $as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h
8996
8997    fi
8998                if test -z "$SKIP_GNOME"; then
8999    {
9000
9001
9002
9003
9004
9005
9006# Check whether --with-gnome-includes was given.
9007if test "${with_gnome_includes+set}" = set; then :
9008  withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
9009
9010fi
9011
9012
9013
9014# Check whether --with-gnome-libs was given.
9015if test "${with_gnome_libs+set}" = set; then :
9016  withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
9017
9018fi
9019
9020
9021
9022# Check whether --with-gnome was given.
9023if test "${with_gnome+set}" = set; then :
9024  withval=$with_gnome; if test x$withval = xyes; then
9025      want_gnome=yes
9026      have_gnome=yes
9027    else
9028      if test "x$withval" = xno; then
9029	want_gnome=no
9030      else
9031	want_gnome=yes
9032	LDFLAGS="$LDFLAGS -L$withval/lib"
9033	CFLAGS="$CFLAGS -I$withval/include"
9034	gnome_prefix=$withval/lib
9035      fi
9036    fi
9037else
9038  want_gnome=yes
9039fi
9040
9041
9042  if test "x$want_gnome" = xyes; then
9043  {
9044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
9045$as_echo_n "checking for libgnomeui-2.0... " >&6; }
9046    if $PKG_CONFIG --exists libgnomeui-2.0; then
9047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9048$as_echo "yes" >&6; }
9049      GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
9050      GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
9051      GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
9052
9053                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
9054$as_echo_n "checking for FreeBSD... " >&6; }
9055      if test "`(uname) 2>/dev/null`" = FreeBSD; then
9056	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9057$as_echo "yes" >&6; }
9058	GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
9059	GNOME_LIBS="$GNOME_LIBS -pthread"
9060      else
9061	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9062$as_echo "no" >&6; }
9063      fi
9064      have_gnome=yes
9065    else
9066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9067$as_echo "not found" >&6; }
9068      if test "x" = xfail; then
9069	as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
9070      fi
9071    fi
9072  }
9073  fi
9074
9075      if test "x$have_gnome" = xyes ; then
9076	$as_echo "#define FEAT_GUI_GNOME 1" >>confdefs.h
9077
9078	GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
9079	GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
9080      fi
9081    }
9082    fi
9083  fi
9084fi
9085
9086
9087if test -z "$SKIP_GTK3"; then
9088
9089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
9090$as_echo_n "checking --disable-gtktest argument... " >&6; }
9091  # Check whether --enable-gtktest was given.
9092if test "${enable_gtktest+set}" = set; then :
9093  enableval=$enable_gtktest;
9094else
9095  enable_gtktest=yes
9096fi
9097
9098  if test "x$enable_gtktest" = "xyes" ; then
9099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
9100$as_echo "gtk test enabled" >&6; }
9101  else
9102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
9103$as_echo "gtk test disabled" >&6; }
9104  fi
9105
9106  if test "X$PKG_CONFIG" = "X"; then
9107    # Extract the first word of "pkg-config", so it can be a program name with args.
9108set dummy pkg-config; ac_word=$2
9109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9110$as_echo_n "checking for $ac_word... " >&6; }
9111if ${ac_cv_path_PKG_CONFIG+:} false; then :
9112  $as_echo_n "(cached) " >&6
9113else
9114  case $PKG_CONFIG in
9115  [\\/]* | ?:[\\/]*)
9116  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9117  ;;
9118  *)
9119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9120for as_dir in $PATH
9121do
9122  IFS=$as_save_IFS
9123  test -z "$as_dir" && as_dir=.
9124    for ac_exec_ext in '' $ac_executable_extensions; do
9125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9126    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9128    break 2
9129  fi
9130done
9131  done
9132IFS=$as_save_IFS
9133
9134  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9135  ;;
9136esac
9137fi
9138PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9139if test -n "$PKG_CONFIG"; then
9140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9141$as_echo "$PKG_CONFIG" >&6; }
9142else
9143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9144$as_echo "no" >&6; }
9145fi
9146
9147
9148  fi
9149
9150  if test "x$PKG_CONFIG" != "xno"; then
9151
9152  if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
9153  {
9154    no_gtk=""
9155    if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9156	  && $PKG_CONFIG --exists gtk+-2.0; then
9157    {
9158      min_gtk_version=3.0.0
9159      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9160$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9161                        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
9162      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
9163      GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
9164      gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9165	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9166      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9167	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9168      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
9169	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9170    }
9171    elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
9172	  && $PKG_CONFIG --exists gtk+-3.0; then
9173    {
9174      min_gtk_version=3.0.0
9175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
9176$as_echo_n "checking for GTK - version >= $min_gtk_version... " >&6; }
9177
9178      GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
9179      GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
9180      GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
9181      gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9182	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
9183      gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9184	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
9185      gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
9186	     sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
9187    }
9188    else
9189      no_gtk=yes
9190    fi
9191
9192    if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
9193    {
9194      ac_save_CFLAGS="$CFLAGS"
9195      ac_save_LIBS="$LIBS"
9196      CFLAGS="$CFLAGS $GTK_CFLAGS"
9197      LIBS="$LIBS $GTK_LIBS"
9198
9199                        rm -f conf.gtktest
9200      if test "$cross_compiling" = yes; then :
9201  echo $ac_n "cross compiling; assumed OK... $ac_c"
9202else
9203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9204/* end confdefs.h.  */
9205
9206#include <gtk/gtk.h>
9207#include <stdio.h>
9208#if STDC_HEADERS
9209# include <stdlib.h>
9210# include <stddef.h>
9211#endif
9212
9213int
9214main ()
9215{
9216int major, minor, micro;
9217char *tmp_version;
9218
9219system ("touch conf.gtktest");
9220
9221/* HP/UX 9 (%@#!) writes to sscanf strings */
9222tmp_version = g_strdup("$min_gtk_version");
9223if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
9224   printf("%s, bad version string\n", "$min_gtk_version");
9225   exit(1);
9226 }
9227
9228if ((gtk_major_version > major) ||
9229    ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
9230    ((gtk_major_version == major) && (gtk_minor_version == minor) &&
9231				     (gtk_micro_version >= micro)))
9232{
9233    return 0;
9234}
9235return 1;
9236}
9237
9238_ACEOF
9239if ac_fn_c_try_run "$LINENO"; then :
9240
9241else
9242  no_gtk=yes
9243fi
9244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9245  conftest.$ac_objext conftest.beam conftest.$ac_ext
9246fi
9247
9248      CFLAGS="$ac_save_CFLAGS"
9249      LIBS="$ac_save_LIBS"
9250    }
9251    fi
9252    if test "x$no_gtk" = x ; then
9253      if test "x$enable_gtktest" = "xyes"; then
9254	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9255$as_echo "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9256      else
9257	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
9258$as_echo "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
9259      fi
9260      GUI_LIB_LOC="$GTK_LIBDIR"
9261		 GTK_LIBNAME="$GTK_LIBS"
9262		GUI_INC_LOC="$GTK_CFLAGS"
9263    else
9264    {
9265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9266$as_echo "no" >&6; }
9267      GTK_CFLAGS=""
9268      GTK_LIBS=""
9269      :
9270    }
9271    fi
9272  }
9273  else
9274    GTK_CFLAGS=""
9275    GTK_LIBS=""
9276    :
9277  fi
9278
9279
9280  rm -f conf.gtktest
9281
9282    if test "x$GTK_CFLAGS" != "x"; then
9283      SKIP_GTK2=YES
9284      SKIP_GNOME=YES
9285      SKIP_ATHENA=YES
9286      SKIP_NEXTAW=YES
9287      SKIP_MOTIF=YES
9288      GUITYPE=GTK
9289
9290      $as_echo "#define HAVE_GTK_MULTIHEAD 1" >>confdefs.h
9291
9292      $as_echo "#define USE_GTK3 1" >>confdefs.h
9293
9294    fi
9295  fi
9296fi
9297
9298if test "x$GUITYPE" = "xGTK"; then
9299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
9300$as_echo_n "checking version of Gdk-Pixbuf... " >&6; }
9301  gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
9302  if test "x$gdk_pixbuf_version" != x ; then
9303    gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
9304      sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
9305    if test "x$gdk_pixbuf_version_minor" != x -a \
9306	$gdk_pixbuf_version_minor -ge 31 ; then
9307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK." >&5
9308$as_echo "OK." >&6; }
9309      # Extract the first word of "glib-compile-resources", so it can be a program name with args.
9310set dummy glib-compile-resources; ac_word=$2
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9312$as_echo_n "checking for $ac_word... " >&6; }
9313if ${ac_cv_path_GLIB_COMPILE_RESOURCES+:} false; then :
9314  $as_echo_n "(cached) " >&6
9315else
9316  case $GLIB_COMPILE_RESOURCES in
9317  [\\/]* | ?:[\\/]*)
9318  ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
9319  ;;
9320  *)
9321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9322for as_dir in $PATH
9323do
9324  IFS=$as_save_IFS
9325  test -z "$as_dir" && as_dir=.
9326    for ac_exec_ext in '' $ac_executable_extensions; do
9327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9328    ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir/$ac_word$ac_exec_ext"
9329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9330    break 2
9331  fi
9332done
9333  done
9334IFS=$as_save_IFS
9335
9336  test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
9337  ;;
9338esac
9339fi
9340GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
9341if test -n "$GLIB_COMPILE_RESOURCES"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
9343$as_echo "$GLIB_COMPILE_RESOURCES" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350      { $as_echo "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
9351$as_echo_n "checking glib-compile-resources... " >&6; }
9352      if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
9353	GLIB_COMPILE_RESOURCES=""
9354	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
9355$as_echo "cannot be found in PATH." >&6; }
9356      else
9357	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: usable." >&5
9358$as_echo "usable." >&6; }
9359	$as_echo "#define USE_GRESOURCE 1" >>confdefs.h
9360
9361	GRESOURCE_SRC="auto/gui_gtk_gresources.c"
9362	GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
9363      fi
9364    else
9365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
9366$as_echo "not usable." >&6; }
9367    fi
9368  else
9369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
9370$as_echo "cannot obtain from pkg_config." >&6; }
9371  fi
9372
9373  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
9374$as_echo_n "checking --disable-icon-cache-update argument... " >&6; }
9375  # Check whether --enable-icon_cache_update was given.
9376if test "${enable_icon_cache_update+set}" = set; then :
9377  enableval=$enable_icon_cache_update;
9378else
9379  enable_icon_cache_update="yes"
9380fi
9381
9382  if test "$enable_icon_cache_update" = "yes"; then
9383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
9384$as_echo "not set" >&6; }
9385    # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
9386set dummy gtk-update-icon-cache; ac_word=$2
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388$as_echo_n "checking for $ac_word... " >&6; }
9389if ${ac_cv_path_GTK_UPDATE_ICON_CACHE+:} false; then :
9390  $as_echo_n "(cached) " >&6
9391else
9392  case $GTK_UPDATE_ICON_CACHE in
9393  [\\/]* | ?:[\\/]*)
9394  ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
9395  ;;
9396  *)
9397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398for as_dir in $PATH
9399do
9400  IFS=$as_save_IFS
9401  test -z "$as_dir" && as_dir=.
9402    for ac_exec_ext in '' $ac_executable_extensions; do
9403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404    ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir/$ac_word$ac_exec_ext"
9405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406    break 2
9407  fi
9408done
9409  done
9410IFS=$as_save_IFS
9411
9412  test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
9413  ;;
9414esac
9415fi
9416GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
9417if test -n "$GTK_UPDATE_ICON_CACHE"; then
9418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
9419$as_echo "$GTK_UPDATE_ICON_CACHE" >&6; }
9420else
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9422$as_echo "no" >&6; }
9423fi
9424
9425
9426    if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
9427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
9428$as_echo "not found in PATH." >&6; }
9429    fi
9430  else
9431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
9432$as_echo "update disabled" >&6; }
9433  fi
9434
9435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
9436$as_echo_n "checking --disable-desktop-database-update argument... " >&6; }
9437  # Check whether --enable-desktop_database_update was given.
9438if test "${enable_desktop_database_update+set}" = set; then :
9439  enableval=$enable_desktop_database_update;
9440else
9441  enable_desktop_database_update="yes"
9442fi
9443
9444  if test "$enable_desktop_database_update" = "yes"; then
9445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
9446$as_echo "not set" >&6; }
9447    # Extract the first word of "update-desktop-database", so it can be a program name with args.
9448set dummy update-desktop-database; ac_word=$2
9449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9450$as_echo_n "checking for $ac_word... " >&6; }
9451if ${ac_cv_path_UPDATE_DESKTOP_DATABASE+:} false; then :
9452  $as_echo_n "(cached) " >&6
9453else
9454  case $UPDATE_DESKTOP_DATABASE in
9455  [\\/]* | ?:[\\/]*)
9456  ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
9457  ;;
9458  *)
9459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462  IFS=$as_save_IFS
9463  test -z "$as_dir" && as_dir=.
9464    for ac_exec_ext in '' $ac_executable_extensions; do
9465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9466    ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir/$ac_word$ac_exec_ext"
9467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468    break 2
9469  fi
9470done
9471  done
9472IFS=$as_save_IFS
9473
9474  test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
9475  ;;
9476esac
9477fi
9478UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
9479if test -n "$UPDATE_DESKTOP_DATABASE"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
9481$as_echo "$UPDATE_DESKTOP_DATABASE" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488    if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
9489      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
9490$as_echo "not found in PATH." >&6; }
9491    fi
9492  else
9493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
9494$as_echo "update disabled" >&6; }
9495  fi
9496fi
9497
9498
9499
9500
9501
9502
9503
9504if test -z "$SKIP_MOTIF"; then
9505  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"
9506    GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
9507
9508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
9509$as_echo_n "checking for location of Motif GUI includes... " >&6; }
9510  gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
9511  GUI_INC_LOC=
9512  for try in $gui_includes; do
9513    if test -f "$try/Xm/Xm.h"; then
9514      GUI_INC_LOC=$try
9515    fi
9516  done
9517  if test -n "$GUI_INC_LOC"; then
9518    if test "$GUI_INC_LOC" = /usr/include; then
9519      GUI_INC_LOC=
9520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
9521$as_echo "in default path" >&6; }
9522    else
9523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
9524$as_echo "$GUI_INC_LOC" >&6; }
9525    fi
9526  else
9527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
9528$as_echo "<not found>" >&6; }
9529    SKIP_MOTIF=YES
9530  fi
9531fi
9532
9533
9534if test -z "$SKIP_MOTIF"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
9536$as_echo_n "checking --with-motif-lib argument... " >&6; }
9537
9538# Check whether --with-motif-lib was given.
9539if test "${with_motif_lib+set}" = set; then :
9540  withval=$with_motif_lib;  MOTIF_LIBNAME="${withval}"
9541fi
9542
9543
9544  if test -n "$MOTIF_LIBNAME"; then
9545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
9546$as_echo "$MOTIF_LIBNAME" >&6; }
9547    GUI_LIB_LOC=
9548  else
9549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550$as_echo "no" >&6; }
9551
9552        GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
9553
9554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
9555$as_echo_n "checking for location of Motif GUI libs... " >&6; }
9556    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"
9557    GUI_LIB_LOC=
9558    for try in $gui_libs; do
9559      for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
9560	if test -f "$libtry"; then
9561	  GUI_LIB_LOC=$try
9562	fi
9563      done
9564    done
9565    if test -n "$GUI_LIB_LOC"; then
9566            if test "$GUI_LIB_LOC" = /usr/lib \
9567	   -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
9568	   -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
9569	GUI_LIB_LOC=
9570	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
9571$as_echo "in default path" >&6; }
9572      else
9573	if test -n "$GUI_LIB_LOC"; then
9574	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
9575$as_echo "$GUI_LIB_LOC" >&6; }
9576	  if test "`(uname) 2>/dev/null`" = SunOS &&
9577					 uname -r | grep '^5' >/dev/null; then
9578	    GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
9579	  fi
9580	fi
9581      fi
9582      MOTIF_LIBNAME=-lXm
9583    else
9584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
9585$as_echo "<not found>" >&6; }
9586      SKIP_MOTIF=YES
9587    fi
9588  fi
9589fi
9590
9591if test -z "$SKIP_MOTIF"; then
9592  SKIP_ATHENA=YES
9593  SKIP_NEXTAW=YES
9594  GUITYPE=MOTIF
9595
9596fi
9597
9598
9599GUI_X_LIBS=
9600
9601if test -z "$SKIP_ATHENA"; then
9602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Athena header files can be found" >&5
9603$as_echo_n "checking if Athena header files can be found... " >&6; }
9604  cflags_save=$CFLAGS
9605  CFLAGS="$CFLAGS $X_CFLAGS"
9606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9607/* end confdefs.h.  */
9608
9609#include <X11/Intrinsic.h>
9610#include <X11/Xaw/Paned.h>
9611int
9612main ()
9613{
9614
9615  ;
9616  return 0;
9617}
9618_ACEOF
9619if ac_fn_c_try_compile "$LINENO"; then :
9620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9621$as_echo "yes" >&6; }
9622else
9623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9624$as_echo "no" >&6; }; SKIP_ATHENA=YES
9625fi
9626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9627  CFLAGS=$cflags_save
9628fi
9629
9630if test -z "$SKIP_ATHENA"; then
9631  GUITYPE=ATHENA
9632fi
9633
9634if test -z "$SKIP_NEXTAW"; then
9635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if neXtaw header files can be found" >&5
9636$as_echo_n "checking if neXtaw header files can be found... " >&6; }
9637  cflags_save=$CFLAGS
9638  CFLAGS="$CFLAGS $X_CFLAGS"
9639  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9640/* end confdefs.h.  */
9641
9642#include <X11/Intrinsic.h>
9643#include <X11/neXtaw/Paned.h>
9644int
9645main ()
9646{
9647
9648  ;
9649  return 0;
9650}
9651_ACEOF
9652if ac_fn_c_try_compile "$LINENO"; then :
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9654$as_echo "yes" >&6; }
9655else
9656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9657$as_echo "no" >&6; }; SKIP_NEXTAW=YES
9658fi
9659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9660  CFLAGS=$cflags_save
9661fi
9662
9663if test -z "$SKIP_NEXTAW"; then
9664  GUITYPE=NEXTAW
9665fi
9666
9667if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
9668      if test -n "$GUI_INC_LOC"; then
9669    GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
9670  fi
9671  if test -n "$GUI_LIB_LOC"; then
9672    GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
9673  fi
9674
9675    ldflags_save=$LDFLAGS
9676  LDFLAGS="$X_LIBS $LDFLAGS"
9677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9678$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9679if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then :
9680  $as_echo_n "(cached) " >&6
9681else
9682  ac_check_lib_save_LIBS=$LIBS
9683LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
9684cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9685/* end confdefs.h.  */
9686
9687/* Override any GCC internal prototype to avoid an error.
9688   Use char because int might match the return type of a GCC
9689   builtin and then its argument prototype would still apply.  */
9690#ifdef __cplusplus
9691extern "C"
9692#endif
9693char XShapeQueryExtension ();
9694int
9695main ()
9696{
9697return XShapeQueryExtension ();
9698  ;
9699  return 0;
9700}
9701_ACEOF
9702if ac_fn_c_try_link "$LINENO"; then :
9703  ac_cv_lib_Xext_XShapeQueryExtension=yes
9704else
9705  ac_cv_lib_Xext_XShapeQueryExtension=no
9706fi
9707rm -f core conftest.err conftest.$ac_objext \
9708    conftest$ac_exeext conftest.$ac_ext
9709LIBS=$ac_check_lib_save_LIBS
9710fi
9711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9712$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9713if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then :
9714  GUI_X_LIBS="-lXext"
9715fi
9716
9717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
9718$as_echo_n "checking for wslen in -lw... " >&6; }
9719if ${ac_cv_lib_w_wslen+:} false; then :
9720  $as_echo_n "(cached) " >&6
9721else
9722  ac_check_lib_save_LIBS=$LIBS
9723LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
9724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9725/* end confdefs.h.  */
9726
9727/* Override any GCC internal prototype to avoid an error.
9728   Use char because int might match the return type of a GCC
9729   builtin and then its argument prototype would still apply.  */
9730#ifdef __cplusplus
9731extern "C"
9732#endif
9733char wslen ();
9734int
9735main ()
9736{
9737return wslen ();
9738  ;
9739  return 0;
9740}
9741_ACEOF
9742if ac_fn_c_try_link "$LINENO"; then :
9743  ac_cv_lib_w_wslen=yes
9744else
9745  ac_cv_lib_w_wslen=no
9746fi
9747rm -f core conftest.err conftest.$ac_objext \
9748    conftest$ac_exeext conftest.$ac_ext
9749LIBS=$ac_check_lib_save_LIBS
9750fi
9751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
9752$as_echo "$ac_cv_lib_w_wslen" >&6; }
9753if test "x$ac_cv_lib_w_wslen" = xyes; then :
9754  X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
9755fi
9756
9757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
9758$as_echo_n "checking for dlsym in -ldl... " >&6; }
9759if ${ac_cv_lib_dl_dlsym+:} false; then :
9760  $as_echo_n "(cached) " >&6
9761else
9762  ac_check_lib_save_LIBS=$LIBS
9763LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
9764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9765/* end confdefs.h.  */
9766
9767/* Override any GCC internal prototype to avoid an error.
9768   Use char because int might match the return type of a GCC
9769   builtin and then its argument prototype would still apply.  */
9770#ifdef __cplusplus
9771extern "C"
9772#endif
9773char dlsym ();
9774int
9775main ()
9776{
9777return dlsym ();
9778  ;
9779  return 0;
9780}
9781_ACEOF
9782if ac_fn_c_try_link "$LINENO"; then :
9783  ac_cv_lib_dl_dlsym=yes
9784else
9785  ac_cv_lib_dl_dlsym=no
9786fi
9787rm -f core conftest.err conftest.$ac_objext \
9788    conftest$ac_exeext conftest.$ac_ext
9789LIBS=$ac_check_lib_save_LIBS
9790fi
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
9792$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
9793if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
9794  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
9795fi
9796
9797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
9798$as_echo_n "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
9799if ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+:} false; then :
9800  $as_echo_n "(cached) " >&6
9801else
9802  ac_check_lib_save_LIBS=$LIBS
9803LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
9804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805/* end confdefs.h.  */
9806
9807/* Override any GCC internal prototype to avoid an error.
9808   Use char because int might match the return type of a GCC
9809   builtin and then its argument prototype would still apply.  */
9810#ifdef __cplusplus
9811extern "C"
9812#endif
9813char XmuCreateStippledPixmap ();
9814int
9815main ()
9816{
9817return XmuCreateStippledPixmap ();
9818  ;
9819  return 0;
9820}
9821_ACEOF
9822if ac_fn_c_try_link "$LINENO"; then :
9823  ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
9824else
9825  ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
9826fi
9827rm -f core conftest.err conftest.$ac_objext \
9828    conftest$ac_exeext conftest.$ac_ext
9829LIBS=$ac_check_lib_save_LIBS
9830fi
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
9832$as_echo "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
9833if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes; then :
9834  GUI_X_LIBS="-lXmu $GUI_X_LIBS"
9835fi
9836
9837  if test -z "$SKIP_MOTIF"; then
9838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
9839$as_echo_n "checking for XpEndJob in -lXp... " >&6; }
9840if ${ac_cv_lib_Xp_XpEndJob+:} false; then :
9841  $as_echo_n "(cached) " >&6
9842else
9843  ac_check_lib_save_LIBS=$LIBS
9844LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
9845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9846/* end confdefs.h.  */
9847
9848/* Override any GCC internal prototype to avoid an error.
9849   Use char because int might match the return type of a GCC
9850   builtin and then its argument prototype would still apply.  */
9851#ifdef __cplusplus
9852extern "C"
9853#endif
9854char XpEndJob ();
9855int
9856main ()
9857{
9858return XpEndJob ();
9859  ;
9860  return 0;
9861}
9862_ACEOF
9863if ac_fn_c_try_link "$LINENO"; then :
9864  ac_cv_lib_Xp_XpEndJob=yes
9865else
9866  ac_cv_lib_Xp_XpEndJob=no
9867fi
9868rm -f core conftest.err conftest.$ac_objext \
9869    conftest$ac_exeext conftest.$ac_ext
9870LIBS=$ac_check_lib_save_LIBS
9871fi
9872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
9873$as_echo "$ac_cv_lib_Xp_XpEndJob" >&6; }
9874if test "x$ac_cv_lib_Xp_XpEndJob" = xyes; then :
9875  GUI_X_LIBS="-lXp $GUI_X_LIBS"
9876fi
9877
9878  fi
9879  LDFLAGS=$ldflags_save
9880
9881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
9882$as_echo_n "checking for extra X11 defines... " >&6; }
9883  NARROW_PROTO=
9884  rm -fr conftestdir
9885  if mkdir conftestdir; then
9886    cd conftestdir
9887    cat > Imakefile <<'EOF'
9888acfindx:
9889	@echo 'NARROW_PROTO="${PROTO_DEFINES}"'
9890EOF
9891    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9892      eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9893    fi
9894    cd ..
9895    rm -fr conftestdir
9896  fi
9897  if test -z "$NARROW_PROTO"; then
9898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899$as_echo "no" >&6; }
9900  else
9901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
9902$as_echo "$NARROW_PROTO" >&6; }
9903  fi
9904
9905fi
9906
9907if test "$enable_xsmp" = "yes"; then
9908  cppflags_save=$CPPFLAGS
9909  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9910  for ac_header in X11/SM/SMlib.h
9911do :
9912  ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
9913if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then :
9914  cat >>confdefs.h <<_ACEOF
9915#define HAVE_X11_SM_SMLIB_H 1
9916_ACEOF
9917
9918fi
9919
9920done
9921
9922  CPPFLAGS=$cppflags_save
9923fi
9924
9925
9926if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
9927    cppflags_save=$CPPFLAGS
9928  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9929  for ac_header in X11/xpm.h X11/Sunkeysym.h
9930do :
9931  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9932ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9933if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9934  cat >>confdefs.h <<_ACEOF
9935#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9936_ACEOF
9937
9938fi
9939
9940done
9941
9942
9943    if test ! "$enable_xim" = "no"; then
9944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
9945$as_echo_n "checking for XIMText in X11/Xlib.h... " >&6; }
9946    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9947/* end confdefs.h.  */
9948#include <X11/Xlib.h>
9949_ACEOF
9950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9951  $EGREP "XIMText" >/dev/null 2>&1; then :
9952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9953$as_echo "yes" >&6; }
9954else
9955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
9956$as_echo "no; xim has been disabled" >&6; }; enable_xim="no"
9957fi
9958rm -f conftest*
9959
9960  fi
9961  CPPFLAGS=$cppflags_save
9962
9963    if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
9964		-a "x$GUITYPE" != "xNONE" ; then
9965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
9966$as_echo "X GUI selected; xim has been enabled" >&6; }
9967    enable_xim="yes"
9968  fi
9969fi
9970
9971if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
9972  cppflags_save=$CPPFLAGS
9973  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
9975$as_echo_n "checking for X11/Xmu/Editres.h... " >&6; }
9976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9977/* end confdefs.h.  */
9978
9979#include <X11/Intrinsic.h>
9980#include <X11/Xmu/Editres.h>
9981int
9982main ()
9983{
9984int i; i = 0;
9985  ;
9986  return 0;
9987}
9988_ACEOF
9989if ac_fn_c_try_compile "$LINENO"; then :
9990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9991$as_echo "yes" >&6; }
9992		      $as_echo "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
9993
9994else
9995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
9997fi
9998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9999  CPPFLAGS=$cppflags_save
10000fi
10001
10002if test -z "$SKIP_MOTIF"; then
10003  cppflags_save=$CPPFLAGS
10004  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10005  if test "$zOSUnix" = "yes"; then
10006	xmheader="Xm/Xm.h"
10007  else
10008	xmheader="Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h
10009	   Xm/UnhighlightT.h Xm/Notebook.h"
10010  fi
10011  for ac_header in $xmheader
10012do :
10013  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10014ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10015if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10016  cat >>confdefs.h <<_ACEOF
10017#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10018_ACEOF
10019
10020fi
10021
10022done
10023
10024
10025  if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
10026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
10027$as_echo_n "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
10028    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10029/* end confdefs.h.  */
10030#include <Xm/XpmP.h>
10031int
10032main ()
10033{
10034XpmAttributes_21 attr;
10035  ;
10036  return 0;
10037}
10038_ACEOF
10039if ac_fn_c_try_compile "$LINENO"; then :
10040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10041$as_echo "yes" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
10042
10043else
10044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045$as_echo "no" >&6; }; $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10046
10047
10048fi
10049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10050  else
10051    $as_echo "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
10052
10053  fi
10054  CPPFLAGS=$cppflags_save
10055fi
10056
10057if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
10059$as_echo "no GUI selected; xim has been disabled" >&6; }
10060  enable_xim="no"
10061fi
10062if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
10063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
10064$as_echo "no GUI selected; fontset has been disabled" >&6; }
10065  enable_fontset="no"
10066fi
10067if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
10069$as_echo "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
10070  enable_fontset="no"
10071fi
10072
10073if test -z "$SKIP_PHOTON"; then
10074  GUITYPE=PHOTONGUI
10075fi
10076
10077
10078
10079
10080
10081
10082if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
10083  as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
10084fi
10085
10086if test "$enable_xim" = "yes"; then
10087  $as_echo "#define FEAT_XIM 1" >>confdefs.h
10088
10089fi
10090if test "$enable_fontset" = "yes"; then
10091  $as_echo "#define FEAT_XFONTSET 1" >>confdefs.h
10092
10093fi
10094
10095
10096
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
10098$as_echo_n "checking for CYGWIN or MSYS environment... " >&6; }
10099case `uname` in
10100    CYGWIN*|MSYS*)    CYGWIN=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10101$as_echo "yes" >&6; }
10102                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
10103$as_echo_n "checking for CYGWIN clipboard support... " >&6; }
10104                if test "x$with_x" = "xno" ; then
10105                  OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
10106                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10107$as_echo "yes" >&6; }
10108                  $as_echo "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
10109
10110                else
10111                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
10112$as_echo "no - using X11" >&6; }
10113                fi ;;
10114
10115    *)          CYGWIN=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10116$as_echo "no" >&6; };;
10117esac
10118
10119if test "$enable_hangulinput" = "yes"; then
10120  if test "x$GUITYPE" = "xNONE"; then
10121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI selected; hangul input has been disabled" >&5
10122$as_echo "no GUI selected; hangul input has been disabled" >&6; }
10123    enable_hangulinput=no
10124  else
10125    $as_echo "#define FEAT_HANGULIN 1" >>confdefs.h
10126
10127    HANGULIN_SRC=hangulin.c
10128
10129    HANGULIN_OBJ=objects/hangulin.o
10130
10131  fi
10132fi
10133
10134
10135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
10136$as_echo_n "checking whether toupper is broken... " >&6; }
10137if ${vim_cv_toupper_broken+:} false; then :
10138  $as_echo_n "(cached) " >&6
10139else
10140
10141    if test "$cross_compiling" = yes; then :
10142
10143    as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
10144
10145else
10146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10147/* end confdefs.h.  */
10148
10149#include "confdefs.h"
10150#include <ctype.h>
10151#if STDC_HEADERS
10152# include <stdlib.h>
10153# include <stddef.h>
10154#endif
10155main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
10156
10157_ACEOF
10158if ac_fn_c_try_run "$LINENO"; then :
10159
10160    vim_cv_toupper_broken=yes
10161
10162else
10163
10164    vim_cv_toupper_broken=no
10165
10166fi
10167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10168  conftest.$ac_objext conftest.beam conftest.$ac_ext
10169fi
10170
10171fi
10172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
10173$as_echo "$vim_cv_toupper_broken" >&6; }
10174
10175if test "x$vim_cv_toupper_broken" = "xyes" ; then
10176  $as_echo "#define BROKEN_TOUPPER 1" >>confdefs.h
10177
10178fi
10179
10180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
10181$as_echo_n "checking whether __DATE__ and __TIME__ work... " >&6; }
10182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10183/* end confdefs.h.  */
10184#include <stdio.h>
10185int
10186main ()
10187{
10188printf("(" __DATE__ " " __TIME__ ")");
10189  ;
10190  return 0;
10191}
10192_ACEOF
10193if ac_fn_c_try_compile "$LINENO"; then :
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10195$as_echo "yes" >&6; }; $as_echo "#define HAVE_DATE_TIME 1" >>confdefs.h
10196
10197else
10198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10199$as_echo "no" >&6; }
10200fi
10201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10202
10203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
10204$as_echo_n "checking whether __attribute__((unused)) is allowed... " >&6; }
10205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10206/* end confdefs.h.  */
10207#include <stdio.h>
10208int
10209main ()
10210{
10211int x __attribute__((unused));
10212  ;
10213  return 0;
10214}
10215_ACEOF
10216if ac_fn_c_try_compile "$LINENO"; then :
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10218$as_echo "yes" >&6; }; $as_echo "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
10219
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10225
10226ac_fn_c_check_header_mongrel "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
10227if test "x$ac_cv_header_elf_h" = xyes; then :
10228  HAS_ELF=1
10229fi
10230
10231
10232if test "$HAS_ELF" = 1; then
10233  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
10234$as_echo_n "checking for main in -lelf... " >&6; }
10235if ${ac_cv_lib_elf_main+:} false; then :
10236  $as_echo_n "(cached) " >&6
10237else
10238  ac_check_lib_save_LIBS=$LIBS
10239LIBS="-lelf  $LIBS"
10240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10241/* end confdefs.h.  */
10242
10243
10244int
10245main ()
10246{
10247return main ();
10248  ;
10249  return 0;
10250}
10251_ACEOF
10252if ac_fn_c_try_link "$LINENO"; then :
10253  ac_cv_lib_elf_main=yes
10254else
10255  ac_cv_lib_elf_main=no
10256fi
10257rm -f core conftest.err conftest.$ac_objext \
10258    conftest$ac_exeext conftest.$ac_ext
10259LIBS=$ac_check_lib_save_LIBS
10260fi
10261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
10262$as_echo "$ac_cv_lib_elf_main" >&6; }
10263if test "x$ac_cv_lib_elf_main" = xyes; then :
10264  cat >>confdefs.h <<_ACEOF
10265#define HAVE_LIBELF 1
10266_ACEOF
10267
10268  LIBS="-lelf $LIBS"
10269
10270fi
10271
10272fi
10273
10274ac_header_dirent=no
10275for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10276  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
10278$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
10279if eval \${$as_ac_Header+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10283/* end confdefs.h.  */
10284#include <sys/types.h>
10285#include <$ac_hdr>
10286
10287int
10288main ()
10289{
10290if ((DIR *) 0)
10291return 0;
10292  ;
10293  return 0;
10294}
10295_ACEOF
10296if ac_fn_c_try_compile "$LINENO"; then :
10297  eval "$as_ac_Header=yes"
10298else
10299  eval "$as_ac_Header=no"
10300fi
10301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10302fi
10303eval ac_res=\$$as_ac_Header
10304	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10305$as_echo "$ac_res" >&6; }
10306if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10307  cat >>confdefs.h <<_ACEOF
10308#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10309_ACEOF
10310
10311ac_header_dirent=$ac_hdr; break
10312fi
10313
10314done
10315# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10316if test $ac_header_dirent = dirent.h; then
10317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10318$as_echo_n "checking for library containing opendir... " >&6; }
10319if ${ac_cv_search_opendir+:} false; then :
10320  $as_echo_n "(cached) " >&6
10321else
10322  ac_func_search_save_LIBS=$LIBS
10323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10324/* end confdefs.h.  */
10325
10326/* Override any GCC internal prototype to avoid an error.
10327   Use char because int might match the return type of a GCC
10328   builtin and then its argument prototype would still apply.  */
10329#ifdef __cplusplus
10330extern "C"
10331#endif
10332char opendir ();
10333int
10334main ()
10335{
10336return opendir ();
10337  ;
10338  return 0;
10339}
10340_ACEOF
10341for ac_lib in '' dir; do
10342  if test -z "$ac_lib"; then
10343    ac_res="none required"
10344  else
10345    ac_res=-l$ac_lib
10346    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10347  fi
10348  if ac_fn_c_try_link "$LINENO"; then :
10349  ac_cv_search_opendir=$ac_res
10350fi
10351rm -f core conftest.err conftest.$ac_objext \
10352    conftest$ac_exeext
10353  if ${ac_cv_search_opendir+:} false; then :
10354  break
10355fi
10356done
10357if ${ac_cv_search_opendir+:} false; then :
10358
10359else
10360  ac_cv_search_opendir=no
10361fi
10362rm conftest.$ac_ext
10363LIBS=$ac_func_search_save_LIBS
10364fi
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
10366$as_echo "$ac_cv_search_opendir" >&6; }
10367ac_res=$ac_cv_search_opendir
10368if test "$ac_res" != no; then :
10369  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10370
10371fi
10372
10373else
10374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
10375$as_echo_n "checking for library containing opendir... " >&6; }
10376if ${ac_cv_search_opendir+:} false; then :
10377  $as_echo_n "(cached) " >&6
10378else
10379  ac_func_search_save_LIBS=$LIBS
10380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10381/* end confdefs.h.  */
10382
10383/* Override any GCC internal prototype to avoid an error.
10384   Use char because int might match the return type of a GCC
10385   builtin and then its argument prototype would still apply.  */
10386#ifdef __cplusplus
10387extern "C"
10388#endif
10389char opendir ();
10390int
10391main ()
10392{
10393return opendir ();
10394  ;
10395  return 0;
10396}
10397_ACEOF
10398for ac_lib in '' x; do
10399  if test -z "$ac_lib"; then
10400    ac_res="none required"
10401  else
10402    ac_res=-l$ac_lib
10403    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10404  fi
10405  if ac_fn_c_try_link "$LINENO"; then :
10406  ac_cv_search_opendir=$ac_res
10407fi
10408rm -f core conftest.err conftest.$ac_objext \
10409    conftest$ac_exeext
10410  if ${ac_cv_search_opendir+:} false; then :
10411  break
10412fi
10413done
10414if ${ac_cv_search_opendir+:} false; then :
10415
10416else
10417  ac_cv_search_opendir=no
10418fi
10419rm conftest.$ac_ext
10420LIBS=$ac_func_search_save_LIBS
10421fi
10422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
10423$as_echo "$ac_cv_search_opendir" >&6; }
10424ac_res=$ac_cv_search_opendir
10425if test "$ac_res" != no; then :
10426  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10427
10428fi
10429
10430fi
10431
10432
10433if test $ac_cv_header_sys_wait_h = no; then
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
10435$as_echo_n "checking for sys/wait.h that defines union wait... " >&6; }
10436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10437/* end confdefs.h.  */
10438#include <sys/wait.h>
10439int
10440main ()
10441{
10442union wait xx, yy; xx = yy
10443  ;
10444  return 0;
10445}
10446_ACEOF
10447if ac_fn_c_try_compile "$LINENO"; then :
10448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10449$as_echo "yes" >&6; }
10450			$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
10451
10452			$as_echo "#define HAVE_UNION_WAIT 1" >>confdefs.h
10453
10454else
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10456$as_echo "no" >&6; }
10457fi
10458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10459fi
10460
10461for ac_header in stdint.h stdlib.h string.h \
10462	sys/select.h sys/utsname.h termcap.h fcntl.h \
10463	sgtty.h sys/ioctl.h sys/time.h sys/types.h \
10464	termio.h iconv.h inttypes.h langinfo.h math.h \
10465	unistd.h stropts.h errno.h sys/resource.h \
10466	sys/systeminfo.h locale.h sys/stream.h termios.h \
10467	libc.h sys/statfs.h poll.h sys/poll.h pwd.h \
10468	utime.h sys/param.h libintl.h libgen.h \
10469	util/debug.h util/msg18n.h frame.h sys/acl.h \
10470	sys/access.h sys/sysinfo.h wchar.h wctype.h
10471do :
10472  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10473ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10474if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
10475  cat >>confdefs.h <<_ACEOF
10476#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
10477_ACEOF
10478
10479fi
10480
10481done
10482
10483
10484for ac_header in sys/ptem.h
10485do :
10486  ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "#if defined HAVE_SYS_STREAM_H
10487#  include <sys/stream.h>
10488#endif
10489"
10490if test "x$ac_cv_header_sys_ptem_h" = xyes; then :
10491  cat >>confdefs.h <<_ACEOF
10492#define HAVE_SYS_PTEM_H 1
10493_ACEOF
10494
10495fi
10496
10497done
10498
10499
10500for ac_header in sys/sysctl.h
10501do :
10502  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if defined HAVE_SYS_PARAM_H
10503#  include <sys/param.h>
10504#endif
10505"
10506if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
10507  cat >>confdefs.h <<_ACEOF
10508#define HAVE_SYS_SYSCTL_H 1
10509_ACEOF
10510
10511fi
10512
10513done
10514
10515
10516
10517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
10518$as_echo_n "checking for pthread_np.h... " >&6; }
10519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10520/* end confdefs.h.  */
10521
10522#include <pthread.h>
10523#include <pthread_np.h>
10524int
10525main ()
10526{
10527int i; i = 0;
10528  ;
10529  return 0;
10530}
10531_ACEOF
10532if ac_fn_c_try_compile "$LINENO"; then :
10533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10534$as_echo "yes" >&6; }
10535		      $as_echo "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
10536
10537else
10538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10539$as_echo "no" >&6; }
10540fi
10541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10542
10543for ac_header in strings.h
10544do :
10545  ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
10546if test "x$ac_cv_header_strings_h" = xyes; then :
10547  cat >>confdefs.h <<_ACEOF
10548#define HAVE_STRINGS_H 1
10549_ACEOF
10550
10551fi
10552
10553done
10554
10555if test "x$MACOSX" = "xyes"; then
10556    $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
10557
10558else
10559
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
10561$as_echo_n "checking if strings.h can be included after string.h... " >&6; }
10562cppflags_save=$CPPFLAGS
10563CPPFLAGS="$CPPFLAGS $X_CFLAGS"
10564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10565/* end confdefs.h.  */
10566
10567#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
10568# define _NO_PROTO	/* like in os_unix.h, causes conflict for AIX (Winn) */
10569			/* but don't do it on AIX 5.1 (Uribarri) */
10570#endif
10571#ifdef HAVE_XM_XM_H
10572# include <Xm/Xm.h>	/* This breaks it for HP-UX 11 (Squassabia) */
10573#endif
10574#ifdef HAVE_STRING_H
10575# include <string.h>
10576#endif
10577#if defined(HAVE_STRINGS_H)
10578# include <strings.h>
10579#endif
10580
10581int
10582main ()
10583{
10584int i; i = 0;
10585  ;
10586  return 0;
10587}
10588_ACEOF
10589if ac_fn_c_try_compile "$LINENO"; then :
10590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10591$as_echo "yes" >&6; }
10592else
10593  $as_echo "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
10594
10595		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
10597fi
10598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10599CPPFLAGS=$cppflags_save
10600fi
10601
10602if test $ac_cv_c_compiler_gnu = yes; then
10603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
10604$as_echo_n "checking whether $CC needs -traditional... " >&6; }
10605if ${ac_cv_prog_gcc_traditional+:} false; then :
10606  $as_echo_n "(cached) " >&6
10607else
10608    ac_pattern="Autoconf.*'x'"
10609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10610/* end confdefs.h.  */
10611#include <sgtty.h>
10612Autoconf TIOCGETP
10613_ACEOF
10614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10615  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
10616  ac_cv_prog_gcc_traditional=yes
10617else
10618  ac_cv_prog_gcc_traditional=no
10619fi
10620rm -f conftest*
10621
10622
10623  if test $ac_cv_prog_gcc_traditional = no; then
10624    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10625/* end confdefs.h.  */
10626#include <termio.h>
10627Autoconf TCGETA
10628_ACEOF
10629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10630  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
10631  ac_cv_prog_gcc_traditional=yes
10632fi
10633rm -f conftest*
10634
10635  fi
10636fi
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
10638$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
10639  if test $ac_cv_prog_gcc_traditional = yes; then
10640    CC="$CC -traditional"
10641  fi
10642fi
10643
10644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
10645$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
10646if ${ac_cv_c_const+:} false; then :
10647  $as_echo_n "(cached) " >&6
10648else
10649  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10650/* end confdefs.h.  */
10651
10652int
10653main ()
10654{
10655
10656#ifndef __cplusplus
10657  /* Ultrix mips cc rejects this sort of thing.  */
10658  typedef int charset[2];
10659  const charset cs = { 0, 0 };
10660  /* SunOS 4.1.1 cc rejects this.  */
10661  char const *const *pcpcc;
10662  char **ppc;
10663  /* NEC SVR4.0.2 mips cc rejects this.  */
10664  struct point {int x, y;};
10665  static struct point const zero = {0,0};
10666  /* AIX XL C 1.02.0.0 rejects this.
10667     It does not let you subtract one const X* pointer from another in
10668     an arm of an if-expression whose if-part is not a constant
10669     expression */
10670  const char *g = "string";
10671  pcpcc = &g + (g ? g-g : 0);
10672  /* HPUX 7.0 cc rejects these. */
10673  ++pcpcc;
10674  ppc = (char**) pcpcc;
10675  pcpcc = (char const *const *) ppc;
10676  { /* SCO 3.2v4 cc rejects this sort of thing.  */
10677    char tx;
10678    char *t = &tx;
10679    char const *s = 0 ? (char *) 0 : (char const *) 0;
10680
10681    *t++ = 0;
10682    if (s) return 0;
10683  }
10684  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10685    int x[] = {25, 17};
10686    const int *foo = &x[0];
10687    ++foo;
10688  }
10689  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10690    typedef const int *iptr;
10691    iptr p = 0;
10692    ++p;
10693  }
10694  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
10695       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10696    struct s { int j; const int *ap[3]; } bx;
10697    struct s *b = &bx; b->j = 5;
10698  }
10699  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10700    const int foo = 10;
10701    if (!foo) return 0;
10702  }
10703  return !cs[0] && !zero.x;
10704#endif
10705
10706  ;
10707  return 0;
10708}
10709_ACEOF
10710if ac_fn_c_try_compile "$LINENO"; then :
10711  ac_cv_c_const=yes
10712else
10713  ac_cv_c_const=no
10714fi
10715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10716fi
10717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
10718$as_echo "$ac_cv_c_const" >&6; }
10719if test $ac_cv_c_const = no; then
10720
10721$as_echo "#define const /**/" >>confdefs.h
10722
10723fi
10724
10725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
10726$as_echo_n "checking for working volatile... " >&6; }
10727if ${ac_cv_c_volatile+:} false; then :
10728  $as_echo_n "(cached) " >&6
10729else
10730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10731/* end confdefs.h.  */
10732
10733int
10734main ()
10735{
10736
10737volatile int x;
10738int * volatile y = (int *) 0;
10739return !x && !y;
10740  ;
10741  return 0;
10742}
10743_ACEOF
10744if ac_fn_c_try_compile "$LINENO"; then :
10745  ac_cv_c_volatile=yes
10746else
10747  ac_cv_c_volatile=no
10748fi
10749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10750fi
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
10752$as_echo "$ac_cv_c_volatile" >&6; }
10753if test $ac_cv_c_volatile = no; then
10754
10755$as_echo "#define volatile /**/" >>confdefs.h
10756
10757fi
10758
10759ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10760if test "x$ac_cv_type_mode_t" = xyes; then :
10761
10762else
10763
10764cat >>confdefs.h <<_ACEOF
10765#define mode_t int
10766_ACEOF
10767
10768fi
10769
10770ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
10771if test "x$ac_cv_type_off_t" = xyes; then :
10772
10773else
10774
10775cat >>confdefs.h <<_ACEOF
10776#define off_t long int
10777_ACEOF
10778
10779fi
10780
10781ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10782if test "x$ac_cv_type_pid_t" = xyes; then :
10783
10784else
10785
10786cat >>confdefs.h <<_ACEOF
10787#define pid_t int
10788_ACEOF
10789
10790fi
10791
10792ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
10793if test "x$ac_cv_type_size_t" = xyes; then :
10794
10795else
10796
10797cat >>confdefs.h <<_ACEOF
10798#define size_t unsigned int
10799_ACEOF
10800
10801fi
10802
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10804$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
10805if ${ac_cv_type_uid_t+:} false; then :
10806  $as_echo_n "(cached) " >&6
10807else
10808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10809/* end confdefs.h.  */
10810#include <sys/types.h>
10811
10812_ACEOF
10813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10814  $EGREP "uid_t" >/dev/null 2>&1; then :
10815  ac_cv_type_uid_t=yes
10816else
10817  ac_cv_type_uid_t=no
10818fi
10819rm -f conftest*
10820
10821fi
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10823$as_echo "$ac_cv_type_uid_t" >&6; }
10824if test $ac_cv_type_uid_t = no; then
10825
10826$as_echo "#define uid_t int" >>confdefs.h
10827
10828
10829$as_echo "#define gid_t int" >>confdefs.h
10830
10831fi
10832
10833ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
10834case $ac_cv_c_uint32_t in #(
10835  no|yes) ;; #(
10836  *)
10837
10838$as_echo "#define _UINT32_T 1" >>confdefs.h
10839
10840
10841cat >>confdefs.h <<_ACEOF
10842#define uint32_t $ac_cv_c_uint32_t
10843_ACEOF
10844;;
10845  esac
10846
10847
10848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
10849$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
10850if ${ac_cv_header_time+:} false; then :
10851  $as_echo_n "(cached) " >&6
10852else
10853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10854/* end confdefs.h.  */
10855#include <sys/types.h>
10856#include <sys/time.h>
10857#include <time.h>
10858
10859int
10860main ()
10861{
10862if ((struct tm *) 0)
10863return 0;
10864  ;
10865  return 0;
10866}
10867_ACEOF
10868if ac_fn_c_try_compile "$LINENO"; then :
10869  ac_cv_header_time=yes
10870else
10871  ac_cv_header_time=no
10872fi
10873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10874fi
10875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
10876$as_echo "$ac_cv_header_time" >&6; }
10877if test $ac_cv_header_time = yes; then
10878
10879$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
10880
10881fi
10882
10883ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
10884if test "x$ac_cv_type_ino_t" = xyes; then :
10885
10886else
10887
10888cat >>confdefs.h <<_ACEOF
10889#define ino_t long
10890_ACEOF
10891
10892fi
10893
10894ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
10895if test "x$ac_cv_type_dev_t" = xyes; then :
10896
10897else
10898
10899cat >>confdefs.h <<_ACEOF
10900#define dev_t unsigned
10901_ACEOF
10902
10903fi
10904
10905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
10906$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
10907if ${ac_cv_c_bigendian+:} false; then :
10908  $as_echo_n "(cached) " >&6
10909else
10910  ac_cv_c_bigendian=unknown
10911    # See if we're dealing with a universal compiler.
10912    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913/* end confdefs.h.  */
10914#ifndef __APPLE_CC__
10915	       not a universal capable compiler
10916	     #endif
10917	     typedef int dummy;
10918
10919_ACEOF
10920if ac_fn_c_try_compile "$LINENO"; then :
10921
10922	# Check for potential -arch flags.  It is not universal unless
10923	# there are at least two -arch flags with different values.
10924	ac_arch=
10925	ac_prev=
10926	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
10927	 if test -n "$ac_prev"; then
10928	   case $ac_word in
10929	     i?86 | x86_64 | ppc | ppc64)
10930	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
10931		 ac_arch=$ac_word
10932	       else
10933		 ac_cv_c_bigendian=universal
10934		 break
10935	       fi
10936	       ;;
10937	   esac
10938	   ac_prev=
10939	 elif test "x$ac_word" = "x-arch"; then
10940	   ac_prev=arch
10941	 fi
10942       done
10943fi
10944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10945    if test $ac_cv_c_bigendian = unknown; then
10946      # See if sys/param.h defines the BYTE_ORDER macro.
10947      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10948/* end confdefs.h.  */
10949#include <sys/types.h>
10950	     #include <sys/param.h>
10951
10952int
10953main ()
10954{
10955#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
10956		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
10957		     && LITTLE_ENDIAN)
10958	      bogus endian macros
10959	     #endif
10960
10961  ;
10962  return 0;
10963}
10964_ACEOF
10965if ac_fn_c_try_compile "$LINENO"; then :
10966  # It does; now see whether it defined to BIG_ENDIAN or not.
10967	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10968/* end confdefs.h.  */
10969#include <sys/types.h>
10970		#include <sys/param.h>
10971
10972int
10973main ()
10974{
10975#if BYTE_ORDER != BIG_ENDIAN
10976		 not big endian
10977		#endif
10978
10979  ;
10980  return 0;
10981}
10982_ACEOF
10983if ac_fn_c_try_compile "$LINENO"; then :
10984  ac_cv_c_bigendian=yes
10985else
10986  ac_cv_c_bigendian=no
10987fi
10988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10989fi
10990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10991    fi
10992    if test $ac_cv_c_bigendian = unknown; then
10993      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
10994      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10995/* end confdefs.h.  */
10996#include <limits.h>
10997
10998int
10999main ()
11000{
11001#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11002	      bogus endian macros
11003	     #endif
11004
11005  ;
11006  return 0;
11007}
11008_ACEOF
11009if ac_fn_c_try_compile "$LINENO"; then :
11010  # It does; now see whether it defined to _BIG_ENDIAN or not.
11011	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11012/* end confdefs.h.  */
11013#include <limits.h>
11014
11015int
11016main ()
11017{
11018#ifndef _BIG_ENDIAN
11019		 not big endian
11020		#endif
11021
11022  ;
11023  return 0;
11024}
11025_ACEOF
11026if ac_fn_c_try_compile "$LINENO"; then :
11027  ac_cv_c_bigendian=yes
11028else
11029  ac_cv_c_bigendian=no
11030fi
11031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11032fi
11033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11034    fi
11035    if test $ac_cv_c_bigendian = unknown; then
11036      # Compile a test program.
11037      if test "$cross_compiling" = yes; then :
11038  # Try to guess by grepping values from an object file.
11039	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11040/* end confdefs.h.  */
11041short int ascii_mm[] =
11042		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11043		short int ascii_ii[] =
11044		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11045		int use_ascii (int i) {
11046		  return ascii_mm[i] + ascii_ii[i];
11047		}
11048		short int ebcdic_ii[] =
11049		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11050		short int ebcdic_mm[] =
11051		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11052		int use_ebcdic (int i) {
11053		  return ebcdic_mm[i] + ebcdic_ii[i];
11054		}
11055		extern int foo;
11056
11057int
11058main ()
11059{
11060return use_ascii (foo) == use_ebcdic (foo);
11061  ;
11062  return 0;
11063}
11064_ACEOF
11065if ac_fn_c_try_compile "$LINENO"; then :
11066  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
11067	      ac_cv_c_bigendian=yes
11068	    fi
11069	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
11070	      if test "$ac_cv_c_bigendian" = unknown; then
11071		ac_cv_c_bigendian=no
11072	      else
11073		# finding both strings is unlikely to happen, but who knows?
11074		ac_cv_c_bigendian=unknown
11075	      fi
11076	    fi
11077fi
11078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11079else
11080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081/* end confdefs.h.  */
11082$ac_includes_default
11083int
11084main ()
11085{
11086
11087	     /* Are we little or big endian?  From Harbison&Steele.  */
11088	     union
11089	     {
11090	       long int l;
11091	       char c[sizeof (long int)];
11092	     } u;
11093	     u.l = 1;
11094	     return u.c[sizeof (long int) - 1] == 1;
11095
11096  ;
11097  return 0;
11098}
11099_ACEOF
11100if ac_fn_c_try_run "$LINENO"; then :
11101  ac_cv_c_bigendian=no
11102else
11103  ac_cv_c_bigendian=yes
11104fi
11105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11106  conftest.$ac_objext conftest.beam conftest.$ac_ext
11107fi
11108
11109    fi
11110fi
11111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
11112$as_echo "$ac_cv_c_bigendian" >&6; }
11113 case $ac_cv_c_bigendian in #(
11114   yes)
11115     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
11116;; #(
11117   no)
11118      ;; #(
11119   universal)
11120
11121$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
11122
11123     ;; #(
11124   *)
11125     as_fn_error $? "unknown endianness
11126 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
11127 esac
11128
11129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11130$as_echo_n "checking for inline... " >&6; }
11131if ${ac_cv_c_inline+:} false; then :
11132  $as_echo_n "(cached) " >&6
11133else
11134  ac_cv_c_inline=no
11135for ac_kw in inline __inline__ __inline; do
11136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11137/* end confdefs.h.  */
11138#ifndef __cplusplus
11139typedef int foo_t;
11140static $ac_kw foo_t static_foo () {return 0; }
11141$ac_kw foo_t foo () {return 0; }
11142#endif
11143
11144_ACEOF
11145if ac_fn_c_try_compile "$LINENO"; then :
11146  ac_cv_c_inline=$ac_kw
11147fi
11148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11149  test "$ac_cv_c_inline" != no && break
11150done
11151
11152fi
11153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11154$as_echo "$ac_cv_c_inline" >&6; }
11155
11156case $ac_cv_c_inline in
11157  inline | yes) ;;
11158  *)
11159    case $ac_cv_c_inline in
11160      no) ac_val=;;
11161      *) ac_val=$ac_cv_c_inline;;
11162    esac
11163    cat >>confdefs.h <<_ACEOF
11164#ifndef __cplusplus
11165#define inline $ac_val
11166#endif
11167_ACEOF
11168    ;;
11169esac
11170
11171
11172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
11173$as_echo_n "checking for rlim_t... " >&6; }
11174if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
11175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
11176$as_echo "(cached) $ac_cv_type_rlim_t" >&6; }
11177else
11178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11179/* end confdefs.h.  */
11180
11181#include <sys/types.h>
11182#if STDC_HEADERS
11183# include <stdlib.h>
11184# include <stddef.h>
11185#endif
11186#ifdef HAVE_SYS_RESOURCE_H
11187# include <sys/resource.h>
11188#endif
11189
11190_ACEOF
11191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11192  $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then :
11193  ac_cv_type_rlim_t=yes
11194else
11195  ac_cv_type_rlim_t=no
11196fi
11197rm -f conftest*
11198
11199	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
11200$as_echo "$ac_cv_type_rlim_t" >&6; }
11201fi
11202if test $ac_cv_type_rlim_t = no; then
11203  cat >> confdefs.h <<\EOF
11204#define rlim_t unsigned long
11205EOF
11206fi
11207
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
11209$as_echo_n "checking for stack_t... " >&6; }
11210if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
11211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
11212$as_echo "(cached) $ac_cv_type_stack_t" >&6; }
11213else
11214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11215/* end confdefs.h.  */
11216
11217#include <sys/types.h>
11218#if STDC_HEADERS
11219# include <stdlib.h>
11220# include <stddef.h>
11221#endif
11222#include <signal.h>
11223
11224_ACEOF
11225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11226  $EGREP "stack_t" >/dev/null 2>&1; then :
11227  ac_cv_type_stack_t=yes
11228else
11229  ac_cv_type_stack_t=no
11230fi
11231rm -f conftest*
11232
11233	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
11234$as_echo "$ac_cv_type_stack_t" >&6; }
11235fi
11236if test $ac_cv_type_stack_t = no; then
11237  cat >> confdefs.h <<\EOF
11238#define stack_t struct sigaltstack
11239EOF
11240fi
11241
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
11243$as_echo_n "checking whether stack_t has an ss_base field... " >&6; }
11244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245/* end confdefs.h.  */
11246
11247#include <sys/types.h>
11248#if STDC_HEADERS
11249# include <stdlib.h>
11250# include <stddef.h>
11251#endif
11252#include <signal.h>
11253#include "confdefs.h"
11254
11255int
11256main ()
11257{
11258stack_t sigstk; sigstk.ss_base = 0;
11259  ;
11260  return 0;
11261}
11262_ACEOF
11263if ac_fn_c_try_compile "$LINENO"; then :
11264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11265$as_echo "yes" >&6; }; $as_echo "#define HAVE_SS_BASE 1" >>confdefs.h
11266
11267else
11268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11269$as_echo "no" >&6; }
11270fi
11271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272
11273olibs="$LIBS"
11274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
11275$as_echo_n "checking --with-tlib argument... " >&6; }
11276
11277# Check whether --with-tlib was given.
11278if test "${with_tlib+set}" = set; then :
11279  withval=$with_tlib;
11280fi
11281
11282if test -n "$with_tlib"; then
11283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
11284$as_echo "$with_tlib" >&6; }
11285  LIBS="$LIBS -l$with_tlib"
11286  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
11287$as_echo_n "checking for linking with $with_tlib library... " >&6; }
11288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11289/* end confdefs.h.  */
11290
11291int
11292main ()
11293{
11294
11295  ;
11296  return 0;
11297}
11298_ACEOF
11299if ac_fn_c_try_link "$LINENO"; then :
11300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
11301$as_echo "OK" >&6; }
11302else
11303  as_fn_error $? "FAILED" "$LINENO" 5
11304fi
11305rm -f core conftest.err conftest.$ac_objext \
11306    conftest$ac_exeext conftest.$ac_ext
11307    olibs="$LIBS"
11308else
11309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
11310$as_echo "empty: automatic terminal library selection" >&6; }
11311                case "`uname -s 2>/dev/null`" in
11312	OSF1|SCO_SV)	tlibs="tinfo ncurses curses termlib termcap";;
11313	*)	tlibs="tinfo ncurses termlib termcap curses";;
11314  esac
11315  for libname in $tlibs; do
11316    as_ac_Lib=`$as_echo "ac_cv_lib_${libname}''_tgetent" | $as_tr_sh`
11317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
11318$as_echo_n "checking for tgetent in -l${libname}... " >&6; }
11319if eval \${$as_ac_Lib+:} false; then :
11320  $as_echo_n "(cached) " >&6
11321else
11322  ac_check_lib_save_LIBS=$LIBS
11323LIBS="-l${libname}  $LIBS"
11324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11325/* end confdefs.h.  */
11326
11327/* Override any GCC internal prototype to avoid an error.
11328   Use char because int might match the return type of a GCC
11329   builtin and then its argument prototype would still apply.  */
11330#ifdef __cplusplus
11331extern "C"
11332#endif
11333char tgetent ();
11334int
11335main ()
11336{
11337return tgetent ();
11338  ;
11339  return 0;
11340}
11341_ACEOF
11342if ac_fn_c_try_link "$LINENO"; then :
11343  eval "$as_ac_Lib=yes"
11344else
11345  eval "$as_ac_Lib=no"
11346fi
11347rm -f core conftest.err conftest.$ac_objext \
11348    conftest$ac_exeext conftest.$ac_ext
11349LIBS=$ac_check_lib_save_LIBS
11350fi
11351eval ac_res=\$$as_ac_Lib
11352	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11353$as_echo "$ac_res" >&6; }
11354if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
11355  cat >>confdefs.h <<_ACEOF
11356#define `$as_echo "HAVE_LIB${libname}" | $as_tr_cpp` 1
11357_ACEOF
11358
11359  LIBS="-l${libname} $LIBS"
11360
11361fi
11362
11363    if test "x$olibs" != "x$LIBS"; then
11364                        if test "$cross_compiling" = yes; then :
11365  res="FAIL"
11366else
11367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11368/* end confdefs.h.  */
11369
11370#ifdef HAVE_TERMCAP_H
11371# include <termcap.h>
11372#endif
11373#if STDC_HEADERS
11374# include <stdlib.h>
11375# include <stddef.h>
11376#endif
11377main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
11378_ACEOF
11379if ac_fn_c_try_run "$LINENO"; then :
11380  res="OK"
11381else
11382  res="FAIL"
11383fi
11384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11385  conftest.$ac_objext conftest.beam conftest.$ac_ext
11386fi
11387
11388      if test "$res" = "OK"; then
11389	break
11390      fi
11391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
11392$as_echo "$libname library is not usable" >&6; }
11393      LIBS="$olibs"
11394    fi
11395  done
11396  if test "x$olibs" = "x$LIBS"; then
11397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
11398$as_echo "no terminal library found" >&6; }
11399  fi
11400fi
11401
11402if test "x$olibs" = "x$LIBS"; then
11403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
11404$as_echo_n "checking for tgetent()... " >&6; }
11405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11406/* end confdefs.h.  */
11407
11408int
11409main ()
11410{
11411char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
11412  ;
11413  return 0;
11414}
11415_ACEOF
11416if ac_fn_c_try_link "$LINENO"; then :
11417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11418$as_echo "yes" >&6; }
11419else
11420  as_fn_error $? "NOT FOUND!
11421      You need to install a terminal library; for example ncurses.
11422      Or specify the name of the library with --with-tlib." "$LINENO" 5
11423fi
11424rm -f core conftest.err conftest.$ac_objext \
11425    conftest$ac_exeext conftest.$ac_ext
11426fi
11427
11428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
11429$as_echo_n "checking whether we talk terminfo... " >&6; }
11430if ${vim_cv_terminfo+:} false; then :
11431  $as_echo_n "(cached) " >&6
11432else
11433
11434    if test "$cross_compiling" = yes; then :
11435
11436      as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
11437
11438else
11439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11440/* end confdefs.h.  */
11441
11442#include "confdefs.h"
11443#ifdef HAVE_TERMCAP_H
11444# include <termcap.h>
11445#endif
11446#ifdef HAVE_STRING_H
11447# include <string.h>
11448#endif
11449#if STDC_HEADERS
11450# include <stdlib.h>
11451# include <stddef.h>
11452#endif
11453main()
11454{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
11455
11456_ACEOF
11457if ac_fn_c_try_run "$LINENO"; then :
11458
11459      vim_cv_terminfo=no
11460
11461else
11462
11463      vim_cv_terminfo=yes
11464
11465fi
11466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11467  conftest.$ac_objext conftest.beam conftest.$ac_ext
11468fi
11469
11470
11471fi
11472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
11473$as_echo "$vim_cv_terminfo" >&6; }
11474
11475if test "x$vim_cv_terminfo" = "xyes" ; then
11476  $as_echo "#define TERMINFO 1" >>confdefs.h
11477
11478fi
11479
11480if test "x$olibs" != "x$LIBS"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
11482$as_echo_n "checking what tgetent() returns for an unknown terminal... " >&6; }
11483if ${vim_cv_tgent+:} false; then :
11484  $as_echo_n "(cached) " >&6
11485else
11486
11487      if test "$cross_compiling" = yes; then :
11488
11489	as_fn_error $? "failed to compile test program." "$LINENO" 5
11490
11491else
11492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11493/* end confdefs.h.  */
11494
11495#include "confdefs.h"
11496#ifdef HAVE_TERMCAP_H
11497# include <termcap.h>
11498#endif
11499#if STDC_HEADERS
11500# include <stdlib.h>
11501# include <stddef.h>
11502#endif
11503main()
11504{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
11505
11506_ACEOF
11507if ac_fn_c_try_run "$LINENO"; then :
11508
11509	vim_cv_tgent=zero
11510
11511else
11512
11513	vim_cv_tgent=non-zero
11514
11515fi
11516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11517  conftest.$ac_objext conftest.beam conftest.$ac_ext
11518fi
11519
11520
11521fi
11522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgent" >&5
11523$as_echo "$vim_cv_tgent" >&6; }
11524
11525  if test "x$vim_cv_tgent" = "xzero" ; then
11526    $as_echo "#define TGETENT_ZERO_ERR 0" >>confdefs.h
11527
11528  fi
11529fi
11530
11531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
11532$as_echo_n "checking whether termcap.h contains ospeed... " >&6; }
11533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11534/* end confdefs.h.  */
11535
11536#ifdef HAVE_TERMCAP_H
11537# include <termcap.h>
11538#endif
11539
11540int
11541main ()
11542{
11543ospeed = 20000
11544  ;
11545  return 0;
11546}
11547_ACEOF
11548if ac_fn_c_try_link "$LINENO"; then :
11549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11550$as_echo "yes" >&6; }; $as_echo "#define HAVE_OSPEED 1" >>confdefs.h
11551
11552else
11553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
11555	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
11556$as_echo_n "checking whether ospeed can be extern... " >&6; }
11557	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558/* end confdefs.h.  */
11559
11560#ifdef HAVE_TERMCAP_H
11561# include <termcap.h>
11562#endif
11563extern short ospeed;
11564
11565int
11566main ()
11567{
11568ospeed = 20000
11569  ;
11570  return 0;
11571}
11572_ACEOF
11573if ac_fn_c_try_link "$LINENO"; then :
11574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11575$as_echo "yes" >&6; }; $as_echo "#define OSPEED_EXTERN 1" >>confdefs.h
11576
11577else
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
11580fi
11581rm -f core conftest.err conftest.$ac_objext \
11582    conftest$ac_exeext conftest.$ac_ext
11583
11584fi
11585rm -f core conftest.err conftest.$ac_objext \
11586    conftest$ac_exeext conftest.$ac_ext
11587
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
11589$as_echo_n "checking whether termcap.h contains UP, BC and PC... " >&6; }
11590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11591/* end confdefs.h.  */
11592
11593#ifdef HAVE_TERMCAP_H
11594# include <termcap.h>
11595#endif
11596
11597int
11598main ()
11599{
11600if (UP == 0 && BC == 0) PC = 1
11601  ;
11602  return 0;
11603}
11604_ACEOF
11605if ac_fn_c_try_link "$LINENO"; then :
11606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11607$as_echo "yes" >&6; }; $as_echo "#define HAVE_UP_BC_PC 1" >>confdefs.h
11608
11609else
11610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11611$as_echo "no" >&6; }
11612	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
11613$as_echo_n "checking whether UP, BC and PC can be extern... " >&6; }
11614	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11615/* end confdefs.h.  */
11616
11617#ifdef HAVE_TERMCAP_H
11618# include <termcap.h>
11619#endif
11620extern char *UP, *BC, PC;
11621
11622int
11623main ()
11624{
11625if (UP == 0 && BC == 0) PC = 1
11626  ;
11627  return 0;
11628}
11629_ACEOF
11630if ac_fn_c_try_link "$LINENO"; then :
11631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11632$as_echo "yes" >&6; }; $as_echo "#define UP_BC_PC_EXTERN 1" >>confdefs.h
11633
11634else
11635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11636$as_echo "no" >&6; }
11637fi
11638rm -f core conftest.err conftest.$ac_objext \
11639    conftest$ac_exeext conftest.$ac_ext
11640
11641fi
11642rm -f core conftest.err conftest.$ac_objext \
11643    conftest$ac_exeext conftest.$ac_ext
11644
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
11646$as_echo_n "checking whether tputs() uses outfuntype... " >&6; }
11647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11648/* end confdefs.h.  */
11649
11650#ifdef HAVE_TERMCAP_H
11651# include <termcap.h>
11652#endif
11653
11654int
11655main ()
11656{
11657extern int xx(); tputs("test", 1, (outfuntype)xx)
11658  ;
11659  return 0;
11660}
11661_ACEOF
11662if ac_fn_c_try_compile "$LINENO"; then :
11663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11664$as_echo "yes" >&6; }; $as_echo "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
11665
11666else
11667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11668$as_echo "no" >&6; }
11669fi
11670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11671
11672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11673$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11675/* end confdefs.h.  */
11676
11677#include <sys/types.h>
11678#include <sys/time.h>
11679#include <sys/select.h>
11680int
11681main ()
11682{
11683
11684  ;
11685  return 0;
11686}
11687_ACEOF
11688if ac_fn_c_try_compile "$LINENO"; then :
11689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11690$as_echo "yes" >&6; }
11691			$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
11692
11693else
11694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11695$as_echo "no" >&6; }
11696fi
11697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11698
11699
11700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
11701$as_echo_n "checking for /dev/ptc... " >&6; }
11702if test -r /dev/ptc; then
11703  $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
11704
11705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11706$as_echo "yes" >&6; }
11707else
11708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11709$as_echo "no" >&6; }
11710fi
11711
11712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
11713$as_echo_n "checking for SVR4 ptys... " >&6; }
11714if test -c /dev/ptmx ; then
11715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716/* end confdefs.h.  */
11717
11718int
11719main ()
11720{
11721ptsname(0);grantpt(0);unlockpt(0);
11722  ;
11723  return 0;
11724}
11725_ACEOF
11726if ac_fn_c_try_link "$LINENO"; then :
11727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11728$as_echo "yes" >&6; }; $as_echo "#define HAVE_SVR4_PTYS 1" >>confdefs.h
11729
11730else
11731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11732$as_echo "no" >&6; }
11733fi
11734rm -f core conftest.err conftest.$ac_objext \
11735    conftest$ac_exeext conftest.$ac_ext
11736else
11737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11738$as_echo "no" >&6; }
11739fi
11740
11741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
11742$as_echo_n "checking for ptyranges... " >&6; }
11743if test -d /dev/ptym ; then
11744  pdir='/dev/ptym'
11745else
11746  pdir='/dev'
11747fi
11748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11749/* end confdefs.h.  */
11750#ifdef M_UNIX
11751   yes;
11752#endif
11753
11754_ACEOF
11755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11756  $EGREP "yes" >/dev/null 2>&1; then :
11757  ptys=`echo /dev/ptyp??`
11758else
11759  ptys=`echo $pdir/pty??`
11760fi
11761rm -f conftest*
11762
11763if test "$ptys" != "$pdir/pty??" ; then
11764  p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
11765  p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\012'`
11766  cat >>confdefs.h <<_ACEOF
11767#define PTYRANGE0 "$p0"
11768_ACEOF
11769
11770  cat >>confdefs.h <<_ACEOF
11771#define PTYRANGE1 "$p1"
11772_ACEOF
11773
11774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
11775$as_echo "$p0 / $p1" >&6; }
11776else
11777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
11778$as_echo "don't know" >&6; }
11779fi
11780
11781rm -f conftest_grp
11782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5
11783$as_echo_n "checking default tty permissions/group... " >&6; }
11784if ${vim_cv_tty_group+:} false; then :
11785  $as_echo_n "(cached) " >&6
11786else
11787
11788    if test "$cross_compiling" = yes; then :
11789
11790      as_fn_error $? "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5
11791
11792else
11793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11794/* end confdefs.h.  */
11795
11796#include "confdefs.h"
11797#include <sys/types.h>
11798#if STDC_HEADERS
11799# include <stdlib.h>
11800# include <stddef.h>
11801#endif
11802#ifdef HAVE_UNISTD_H
11803#include <unistd.h>
11804#endif
11805#include <sys/stat.h>
11806#include <stdio.h>
11807main()
11808{
11809  struct stat sb;
11810  char *x,*ttyname();
11811  int om, m;
11812  FILE *fp;
11813
11814  if (!(x = ttyname(0))) exit(1);
11815  if (stat(x, &sb)) exit(1);
11816  om = sb.st_mode;
11817  if (om & 002) exit(0);
11818  m = system("mesg y");
11819  if (m == -1 || m == 127) exit(1);
11820  if (stat(x, &sb)) exit(1);
11821  m = sb.st_mode;
11822  if (chmod(x, om)) exit(1);
11823  if (m & 002) exit(0);
11824  if (sb.st_gid == getgid()) exit(1);
11825  if (!(fp=fopen("conftest_grp", "w")))
11826    exit(1);
11827  fprintf(fp, "%d\n", sb.st_gid);
11828  fclose(fp);
11829  exit(0);
11830}
11831
11832_ACEOF
11833if ac_fn_c_try_run "$LINENO"; then :
11834
11835      if test -f conftest_grp; then
11836	vim_cv_tty_group=`cat conftest_grp`
11837	if test "x$vim_cv_tty_mode" = "x" ; then
11838	  vim_cv_tty_mode=0620
11839	fi
11840	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&5
11841$as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; }
11842      else
11843	vim_cv_tty_group=world
11844	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ptys are world accessible" >&5
11845$as_echo "ptys are world accessible" >&6; }
11846      fi
11847
11848else
11849
11850      vim_cv_tty_group=world
11851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't determine - assume ptys are world accessible" >&5
11852$as_echo "can't determine - assume ptys are world accessible" >&6; }
11853
11854fi
11855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11856  conftest.$ac_objext conftest.beam conftest.$ac_ext
11857fi
11858
11859
11860fi
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tty_group" >&5
11862$as_echo "$vim_cv_tty_group" >&6; }
11863rm -f conftest_grp
11864
11865if test "x$vim_cv_tty_group" != "xworld" ; then
11866  cat >>confdefs.h <<_ACEOF
11867#define PTYGROUP $vim_cv_tty_group
11868_ACEOF
11869
11870  if test "x$vim_cv_tty_mode" = "x" ; then
11871    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
11872  else
11873    $as_echo "#define PTYMODE 0620" >>confdefs.h
11874
11875  fi
11876fi
11877
11878
11879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
11880$as_echo_n "checking return type of signal handlers... " >&6; }
11881if ${ac_cv_type_signal+:} false; then :
11882  $as_echo_n "(cached) " >&6
11883else
11884  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11885/* end confdefs.h.  */
11886#include <sys/types.h>
11887#include <signal.h>
11888
11889int
11890main ()
11891{
11892return *(signal (0, 0)) (0) == 1;
11893  ;
11894  return 0;
11895}
11896_ACEOF
11897if ac_fn_c_try_compile "$LINENO"; then :
11898  ac_cv_type_signal=int
11899else
11900  ac_cv_type_signal=void
11901fi
11902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11903fi
11904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
11905$as_echo "$ac_cv_type_signal" >&6; }
11906
11907cat >>confdefs.h <<_ACEOF
11908#define RETSIGTYPE $ac_cv_type_signal
11909_ACEOF
11910
11911
11912
11913if test $ac_cv_type_signal = void; then
11914  $as_echo "#define SIGRETURN return" >>confdefs.h
11915
11916else
11917  $as_echo "#define SIGRETURN return 0" >>confdefs.h
11918
11919fi
11920
11921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
11922$as_echo_n "checking for struct sigcontext... " >&6; }
11923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11924/* end confdefs.h.  */
11925
11926#include <signal.h>
11927test_sig()
11928{
11929    struct sigcontext *scont;
11930    scont = (struct sigcontext *)0;
11931    return 1;
11932}
11933int
11934main ()
11935{
11936
11937  ;
11938  return 0;
11939}
11940_ACEOF
11941if ac_fn_c_try_compile "$LINENO"; then :
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11943$as_echo "yes" >&6; }
11944		$as_echo "#define HAVE_SIGCONTEXT 1" >>confdefs.h
11945
11946else
11947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948$as_echo "no" >&6; }
11949fi
11950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11951
11952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
11953$as_echo_n "checking getcwd implementation is broken... " >&6; }
11954if ${vim_cv_getcwd_broken+:} false; then :
11955  $as_echo_n "(cached) " >&6
11956else
11957
11958    if test "$cross_compiling" = yes; then :
11959
11960      as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
11961
11962else
11963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964/* end confdefs.h.  */
11965
11966#include "confdefs.h"
11967#ifdef HAVE_UNISTD_H
11968#include <unistd.h>
11969#endif
11970char *dagger[] = { "IFS=pwd", 0 };
11971main()
11972{
11973  char buffer[500];
11974  extern char **environ;
11975  environ = dagger;
11976  return getcwd(buffer, 500) ? 0 : 1;
11977}
11978
11979_ACEOF
11980if ac_fn_c_try_run "$LINENO"; then :
11981
11982      vim_cv_getcwd_broken=no
11983
11984else
11985
11986      vim_cv_getcwd_broken=yes
11987
11988fi
11989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11990  conftest.$ac_objext conftest.beam conftest.$ac_ext
11991fi
11992
11993
11994fi
11995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
11996$as_echo "$vim_cv_getcwd_broken" >&6; }
11997
11998if test "x$vim_cv_getcwd_broken" = "xyes" ; then
11999  $as_echo "#define BAD_GETCWD 1" >>confdefs.h
12000
12001fi
12002
12003for ac_func in fchdir fchown fsync getcwd getpseudotty \
12004	getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
12005	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
12006	setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
12007	sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
12008	strnicmp strpbrk strtol tgetent towlower towupper iswupper \
12009	usleep utime utimes
12010do :
12011  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12012ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12013if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12014  cat >>confdefs.h <<_ACEOF
12015#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12016_ACEOF
12017
12018fi
12019done
12020
12021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12022$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12023if ${ac_cv_sys_largefile_source+:} false; then :
12024  $as_echo_n "(cached) " >&6
12025else
12026  while :; do
12027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12028/* end confdefs.h.  */
12029#include <sys/types.h> /* for off_t */
12030     #include <stdio.h>
12031int
12032main ()
12033{
12034int (*fp) (FILE *, off_t, int) = fseeko;
12035     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12036  ;
12037  return 0;
12038}
12039_ACEOF
12040if ac_fn_c_try_link "$LINENO"; then :
12041  ac_cv_sys_largefile_source=no; break
12042fi
12043rm -f core conftest.err conftest.$ac_objext \
12044    conftest$ac_exeext conftest.$ac_ext
12045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046/* end confdefs.h.  */
12047#define _LARGEFILE_SOURCE 1
12048#include <sys/types.h> /* for off_t */
12049     #include <stdio.h>
12050int
12051main ()
12052{
12053int (*fp) (FILE *, off_t, int) = fseeko;
12054     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
12055  ;
12056  return 0;
12057}
12058_ACEOF
12059if ac_fn_c_try_link "$LINENO"; then :
12060  ac_cv_sys_largefile_source=1; break
12061fi
12062rm -f core conftest.err conftest.$ac_objext \
12063    conftest$ac_exeext conftest.$ac_ext
12064  ac_cv_sys_largefile_source=unknown
12065  break
12066done
12067fi
12068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12069$as_echo "$ac_cv_sys_largefile_source" >&6; }
12070case $ac_cv_sys_largefile_source in #(
12071  no | unknown) ;;
12072  *)
12073cat >>confdefs.h <<_ACEOF
12074#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12075_ACEOF
12076;;
12077esac
12078rm -rf conftest*
12079
12080# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12081# in glibc 2.1.3, but that breaks too many other things.
12082# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12083if test $ac_cv_sys_largefile_source != unknown; then
12084
12085$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
12086
12087fi
12088
12089
12090# Check whether --enable-largefile was given.
12091if test "${enable_largefile+set}" = set; then :
12092  enableval=$enable_largefile;
12093fi
12094
12095if test "$enable_largefile" != no; then
12096
12097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
12098$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
12099if ${ac_cv_sys_largefile_CC+:} false; then :
12100  $as_echo_n "(cached) " >&6
12101else
12102  ac_cv_sys_largefile_CC=no
12103     if test "$GCC" != yes; then
12104       ac_save_CC=$CC
12105       while :; do
12106	 # IRIX 6.2 and later do not support large files by default,
12107	 # so use the C compiler's -n32 option if that helps.
12108	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12109/* end confdefs.h.  */
12110#include <sys/types.h>
12111 /* Check that off_t can represent 2**63 - 1 correctly.
12112    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12113    since some C++ compilers masquerading as C compilers
12114    incorrectly reject 9223372036854775807.  */
12115#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12116  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12117		       && LARGE_OFF_T % 2147483647 == 1)
12118		      ? 1 : -1];
12119int
12120main ()
12121{
12122
12123  ;
12124  return 0;
12125}
12126_ACEOF
12127	 if ac_fn_c_try_compile "$LINENO"; then :
12128  break
12129fi
12130rm -f core conftest.err conftest.$ac_objext
12131	 CC="$CC -n32"
12132	 if ac_fn_c_try_compile "$LINENO"; then :
12133  ac_cv_sys_largefile_CC=' -n32'; break
12134fi
12135rm -f core conftest.err conftest.$ac_objext
12136	 break
12137       done
12138       CC=$ac_save_CC
12139       rm -f conftest.$ac_ext
12140    fi
12141fi
12142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
12143$as_echo "$ac_cv_sys_largefile_CC" >&6; }
12144  if test "$ac_cv_sys_largefile_CC" != no; then
12145    CC=$CC$ac_cv_sys_largefile_CC
12146  fi
12147
12148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12149$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
12150if ${ac_cv_sys_file_offset_bits+:} false; then :
12151  $as_echo_n "(cached) " >&6
12152else
12153  while :; do
12154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12155/* end confdefs.h.  */
12156#include <sys/types.h>
12157 /* Check that off_t can represent 2**63 - 1 correctly.
12158    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12159    since some C++ compilers masquerading as C compilers
12160    incorrectly reject 9223372036854775807.  */
12161#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12162  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12163		       && LARGE_OFF_T % 2147483647 == 1)
12164		      ? 1 : -1];
12165int
12166main ()
12167{
12168
12169  ;
12170  return 0;
12171}
12172_ACEOF
12173if ac_fn_c_try_compile "$LINENO"; then :
12174  ac_cv_sys_file_offset_bits=no; break
12175fi
12176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12178/* end confdefs.h.  */
12179#define _FILE_OFFSET_BITS 64
12180#include <sys/types.h>
12181 /* Check that off_t can represent 2**63 - 1 correctly.
12182    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12183    since some C++ compilers masquerading as C compilers
12184    incorrectly reject 9223372036854775807.  */
12185#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12186  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12187		       && LARGE_OFF_T % 2147483647 == 1)
12188		      ? 1 : -1];
12189int
12190main ()
12191{
12192
12193  ;
12194  return 0;
12195}
12196_ACEOF
12197if ac_fn_c_try_compile "$LINENO"; then :
12198  ac_cv_sys_file_offset_bits=64; break
12199fi
12200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12201  ac_cv_sys_file_offset_bits=unknown
12202  break
12203done
12204fi
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
12206$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
12207case $ac_cv_sys_file_offset_bits in #(
12208  no | unknown) ;;
12209  *)
12210cat >>confdefs.h <<_ACEOF
12211#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12212_ACEOF
12213;;
12214esac
12215rm -rf conftest*
12216  if test $ac_cv_sys_file_offset_bits = unknown; then
12217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
12218$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
12219if ${ac_cv_sys_large_files+:} false; then :
12220  $as_echo_n "(cached) " >&6
12221else
12222  while :; do
12223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224/* end confdefs.h.  */
12225#include <sys/types.h>
12226 /* Check that off_t can represent 2**63 - 1 correctly.
12227    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12228    since some C++ compilers masquerading as C compilers
12229    incorrectly reject 9223372036854775807.  */
12230#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12231  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12232		       && LARGE_OFF_T % 2147483647 == 1)
12233		      ? 1 : -1];
12234int
12235main ()
12236{
12237
12238  ;
12239  return 0;
12240}
12241_ACEOF
12242if ac_fn_c_try_compile "$LINENO"; then :
12243  ac_cv_sys_large_files=no; break
12244fi
12245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12246  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247/* end confdefs.h.  */
12248#define _LARGE_FILES 1
12249#include <sys/types.h>
12250 /* Check that off_t can represent 2**63 - 1 correctly.
12251    We can't simply define LARGE_OFF_T to be 9223372036854775807,
12252    since some C++ compilers masquerading as C compilers
12253    incorrectly reject 9223372036854775807.  */
12254#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
12255  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12256		       && LARGE_OFF_T % 2147483647 == 1)
12257		      ? 1 : -1];
12258int
12259main ()
12260{
12261
12262  ;
12263  return 0;
12264}
12265_ACEOF
12266if ac_fn_c_try_compile "$LINENO"; then :
12267  ac_cv_sys_large_files=1; break
12268fi
12269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12270  ac_cv_sys_large_files=unknown
12271  break
12272done
12273fi
12274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
12275$as_echo "$ac_cv_sys_large_files" >&6; }
12276case $ac_cv_sys_large_files in #(
12277  no | unknown) ;;
12278  *)
12279cat >>confdefs.h <<_ACEOF
12280#define _LARGE_FILES $ac_cv_sys_large_files
12281_ACEOF
12282;;
12283esac
12284rm -rf conftest*
12285  fi
12286
12287
12288fi
12289
12290
12291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
12292$as_echo_n "checking for st_blksize... " >&6; }
12293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12294/* end confdefs.h.  */
12295#include <sys/types.h>
12296#include <sys/stat.h>
12297int
12298main ()
12299{
12300	struct stat st;
12301	int n;
12302
12303	stat("/", &st);
12304	n = (int)st.st_blksize;
12305  ;
12306  return 0;
12307}
12308_ACEOF
12309if ac_fn_c_try_compile "$LINENO"; then :
12310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12311$as_echo "yes" >&6; }; $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
12312
12313else
12314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12315$as_echo "no" >&6; }
12316fi
12317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12318
12319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
12320$as_echo_n "checking whether stat() ignores a trailing slash... " >&6; }
12321if ${vim_cv_stat_ignores_slash+:} false; then :
12322  $as_echo_n "(cached) " >&6
12323else
12324
12325    if test "$cross_compiling" = yes; then :
12326
12327      as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
12328
12329else
12330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331/* end confdefs.h.  */
12332
12333#include "confdefs.h"
12334#if STDC_HEADERS
12335# include <stdlib.h>
12336# include <stddef.h>
12337#endif
12338#include <sys/types.h>
12339#include <sys/stat.h>
12340main() {struct stat st;  exit(stat("configure/", &st) != 0); }
12341
12342_ACEOF
12343if ac_fn_c_try_run "$LINENO"; then :
12344
12345      vim_cv_stat_ignores_slash=yes
12346
12347else
12348
12349      vim_cv_stat_ignores_slash=no
12350
12351fi
12352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12353  conftest.$ac_objext conftest.beam conftest.$ac_ext
12354fi
12355
12356
12357fi
12358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
12359$as_echo "$vim_cv_stat_ignores_slash" >&6; }
12360
12361if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
12362  $as_echo "#define STAT_IGNORES_SLASH 1" >>confdefs.h
12363
12364fi
12365
12366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
12367$as_echo_n "checking for iconv_open()... " >&6; }
12368save_LIBS="$LIBS"
12369LIBS="$LIBS -liconv"
12370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371/* end confdefs.h.  */
12372
12373#ifdef HAVE_ICONV_H
12374# include <iconv.h>
12375#endif
12376
12377int
12378main ()
12379{
12380iconv_open("fr", "to");
12381  ;
12382  return 0;
12383}
12384_ACEOF
12385if ac_fn_c_try_link "$LINENO"; then :
12386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
12387$as_echo "yes; with -liconv" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
12388
12389else
12390  LIBS="$save_LIBS"
12391    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392/* end confdefs.h.  */
12393
12394#ifdef HAVE_ICONV_H
12395# include <iconv.h>
12396#endif
12397
12398int
12399main ()
12400{
12401iconv_open("fr", "to");
12402  ;
12403  return 0;
12404}
12405_ACEOF
12406if ac_fn_c_try_link "$LINENO"; then :
12407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12408$as_echo "yes" >&6; }; $as_echo "#define HAVE_ICONV 1" >>confdefs.h
12409
12410else
12411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12412$as_echo "no" >&6; }
12413fi
12414rm -f core conftest.err conftest.$ac_objext \
12415    conftest$ac_exeext conftest.$ac_ext
12416fi
12417rm -f core conftest.err conftest.$ac_objext \
12418    conftest$ac_exeext conftest.$ac_ext
12419
12420
12421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
12422$as_echo_n "checking for nl_langinfo(CODESET)... " >&6; }
12423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12424/* end confdefs.h.  */
12425
12426#ifdef HAVE_LANGINFO_H
12427# include <langinfo.h>
12428#endif
12429
12430int
12431main ()
12432{
12433char *cs = nl_langinfo(CODESET);
12434  ;
12435  return 0;
12436}
12437_ACEOF
12438if ac_fn_c_try_link "$LINENO"; then :
12439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12440$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
12441
12442else
12443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12444$as_echo "no" >&6; }
12445fi
12446rm -f core conftest.err conftest.$ac_objext \
12447    conftest$ac_exeext conftest.$ac_ext
12448
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
12450$as_echo_n "checking for strtod in -lm... " >&6; }
12451if ${ac_cv_lib_m_strtod+:} false; then :
12452  $as_echo_n "(cached) " >&6
12453else
12454  ac_check_lib_save_LIBS=$LIBS
12455LIBS="-lm  $LIBS"
12456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457/* end confdefs.h.  */
12458
12459/* Override any GCC internal prototype to avoid an error.
12460   Use char because int might match the return type of a GCC
12461   builtin and then its argument prototype would still apply.  */
12462#ifdef __cplusplus
12463extern "C"
12464#endif
12465char strtod ();
12466int
12467main ()
12468{
12469return strtod ();
12470  ;
12471  return 0;
12472}
12473_ACEOF
12474if ac_fn_c_try_link "$LINENO"; then :
12475  ac_cv_lib_m_strtod=yes
12476else
12477  ac_cv_lib_m_strtod=no
12478fi
12479rm -f core conftest.err conftest.$ac_objext \
12480    conftest$ac_exeext conftest.$ac_ext
12481LIBS=$ac_check_lib_save_LIBS
12482fi
12483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
12484$as_echo "$ac_cv_lib_m_strtod" >&6; }
12485if test "x$ac_cv_lib_m_strtod" = xyes; then :
12486  cat >>confdefs.h <<_ACEOF
12487#define HAVE_LIBM 1
12488_ACEOF
12489
12490  LIBS="-lm $LIBS"
12491
12492fi
12493
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtod() and other floating point functions" >&5
12495$as_echo_n "checking for strtod() and other floating point functions... " >&6; }
12496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12497/* end confdefs.h.  */
12498
12499#ifdef HAVE_MATH_H
12500# include <math.h>
12501#endif
12502#if STDC_HEADERS
12503# include <stdlib.h>
12504# include <stddef.h>
12505#endif
12506
12507int
12508main ()
12509{
12510char *s; double d;
12511    d = strtod("1.1", &s);
12512    d = fabs(1.11);
12513    d = ceil(1.11);
12514    d = floor(1.11);
12515    d = log10(1.11);
12516    d = pow(1.11, 2.22);
12517    d = sqrt(1.11);
12518    d = sin(1.11);
12519    d = cos(1.11);
12520    d = atan(1.11);
12521
12522  ;
12523  return 0;
12524}
12525_ACEOF
12526if ac_fn_c_try_link "$LINENO"; then :
12527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12528$as_echo "yes" >&6; }; $as_echo "#define HAVE_FLOAT_FUNCS 1" >>confdefs.h
12529
12530else
12531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12532$as_echo "no" >&6; }
12533fi
12534rm -f core conftest.err conftest.$ac_objext \
12535    conftest$ac_exeext conftest.$ac_ext
12536
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
12538$as_echo_n "checking for isinf()... " >&6; }
12539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12540/* end confdefs.h.  */
12541
12542#ifdef HAVE_MATH_H
12543# include <math.h>
12544#endif
12545#if STDC_HEADERS
12546# include <stdlib.h>
12547# include <stddef.h>
12548#endif
12549
12550int
12551main ()
12552{
12553int r = isinf(1.11);
12554  ;
12555  return 0;
12556}
12557_ACEOF
12558if ac_fn_c_try_link "$LINENO"; then :
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12560$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISINF 1" >>confdefs.h
12561
12562else
12563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12564$as_echo "no" >&6; }
12565fi
12566rm -f core conftest.err conftest.$ac_objext \
12567    conftest$ac_exeext conftest.$ac_ext
12568
12569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
12570$as_echo_n "checking for isnan()... " >&6; }
12571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12572/* end confdefs.h.  */
12573
12574#ifdef HAVE_MATH_H
12575# include <math.h>
12576#endif
12577#if STDC_HEADERS
12578# include <stdlib.h>
12579# include <stddef.h>
12580#endif
12581
12582int
12583main ()
12584{
12585int r = isnan(1.11);
12586  ;
12587  return 0;
12588}
12589_ACEOF
12590if ac_fn_c_try_link "$LINENO"; then :
12591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12592$as_echo "yes" >&6; }; $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
12593
12594else
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596$as_echo "no" >&6; }
12597fi
12598rm -f core conftest.err conftest.$ac_objext \
12599    conftest$ac_exeext conftest.$ac_ext
12600
12601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
12602$as_echo_n "checking --disable-acl argument... " >&6; }
12603# Check whether --enable-acl was given.
12604if test "${enable_acl+set}" = set; then :
12605  enableval=$enable_acl;
12606else
12607  enable_acl="yes"
12608fi
12609
12610if test "$enable_acl" = "yes"; then
12611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
12613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
12614$as_echo_n "checking for acl_get_file in -lposix1e... " >&6; }
12615if ${ac_cv_lib_posix1e_acl_get_file+:} false; then :
12616  $as_echo_n "(cached) " >&6
12617else
12618  ac_check_lib_save_LIBS=$LIBS
12619LIBS="-lposix1e  $LIBS"
12620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12621/* end confdefs.h.  */
12622
12623/* Override any GCC internal prototype to avoid an error.
12624   Use char because int might match the return type of a GCC
12625   builtin and then its argument prototype would still apply.  */
12626#ifdef __cplusplus
12627extern "C"
12628#endif
12629char acl_get_file ();
12630int
12631main ()
12632{
12633return acl_get_file ();
12634  ;
12635  return 0;
12636}
12637_ACEOF
12638if ac_fn_c_try_link "$LINENO"; then :
12639  ac_cv_lib_posix1e_acl_get_file=yes
12640else
12641  ac_cv_lib_posix1e_acl_get_file=no
12642fi
12643rm -f core conftest.err conftest.$ac_objext \
12644    conftest$ac_exeext conftest.$ac_ext
12645LIBS=$ac_check_lib_save_LIBS
12646fi
12647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
12648$as_echo "$ac_cv_lib_posix1e_acl_get_file" >&6; }
12649if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes; then :
12650  LIBS="$LIBS -lposix1e"
12651else
12652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
12653$as_echo_n "checking for acl_get_file in -lacl... " >&6; }
12654if ${ac_cv_lib_acl_acl_get_file+:} false; then :
12655  $as_echo_n "(cached) " >&6
12656else
12657  ac_check_lib_save_LIBS=$LIBS
12658LIBS="-lacl  $LIBS"
12659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12660/* end confdefs.h.  */
12661
12662/* Override any GCC internal prototype to avoid an error.
12663   Use char because int might match the return type of a GCC
12664   builtin and then its argument prototype would still apply.  */
12665#ifdef __cplusplus
12666extern "C"
12667#endif
12668char acl_get_file ();
12669int
12670main ()
12671{
12672return acl_get_file ();
12673  ;
12674  return 0;
12675}
12676_ACEOF
12677if ac_fn_c_try_link "$LINENO"; then :
12678  ac_cv_lib_acl_acl_get_file=yes
12679else
12680  ac_cv_lib_acl_acl_get_file=no
12681fi
12682rm -f core conftest.err conftest.$ac_objext \
12683    conftest$ac_exeext conftest.$ac_ext
12684LIBS=$ac_check_lib_save_LIBS
12685fi
12686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
12687$as_echo "$ac_cv_lib_acl_acl_get_file" >&6; }
12688if test "x$ac_cv_lib_acl_acl_get_file" = xyes; then :
12689  LIBS="$LIBS -lacl"
12690		  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
12691$as_echo_n "checking for fgetxattr in -lattr... " >&6; }
12692if ${ac_cv_lib_attr_fgetxattr+:} false; then :
12693  $as_echo_n "(cached) " >&6
12694else
12695  ac_check_lib_save_LIBS=$LIBS
12696LIBS="-lattr  $LIBS"
12697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12698/* end confdefs.h.  */
12699
12700/* Override any GCC internal prototype to avoid an error.
12701   Use char because int might match the return type of a GCC
12702   builtin and then its argument prototype would still apply.  */
12703#ifdef __cplusplus
12704extern "C"
12705#endif
12706char fgetxattr ();
12707int
12708main ()
12709{
12710return fgetxattr ();
12711  ;
12712  return 0;
12713}
12714_ACEOF
12715if ac_fn_c_try_link "$LINENO"; then :
12716  ac_cv_lib_attr_fgetxattr=yes
12717else
12718  ac_cv_lib_attr_fgetxattr=no
12719fi
12720rm -f core conftest.err conftest.$ac_objext \
12721    conftest$ac_exeext conftest.$ac_ext
12722LIBS=$ac_check_lib_save_LIBS
12723fi
12724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
12725$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
12726if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
12727  LIBS="$LIBS -lattr"
12728fi
12729
12730fi
12731
12732fi
12733
12734
12735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
12736$as_echo_n "checking for POSIX ACL support... " >&6; }
12737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738/* end confdefs.h.  */
12739
12740#include <sys/types.h>
12741#ifdef HAVE_SYS_ACL_H
12742# include <sys/acl.h>
12743#endif
12744acl_t acl;
12745int
12746main ()
12747{
12748acl = acl_get_file("foo", ACL_TYPE_ACCESS);
12749	acl_set_file("foo", ACL_TYPE_ACCESS, acl);
12750	acl_free(acl);
12751  ;
12752  return 0;
12753}
12754_ACEOF
12755if ac_fn_c_try_link "$LINENO"; then :
12756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12757$as_echo "yes" >&6; }; $as_echo "#define HAVE_POSIX_ACL 1" >>confdefs.h
12758
12759else
12760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12761$as_echo "no" >&6; }
12762fi
12763rm -f core conftest.err conftest.$ac_objext \
12764    conftest$ac_exeext conftest.$ac_ext
12765
12766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
12767$as_echo_n "checking for acl_get in -lsec... " >&6; }
12768if ${ac_cv_lib_sec_acl_get+:} false; then :
12769  $as_echo_n "(cached) " >&6
12770else
12771  ac_check_lib_save_LIBS=$LIBS
12772LIBS="-lsec  $LIBS"
12773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12774/* end confdefs.h.  */
12775
12776/* Override any GCC internal prototype to avoid an error.
12777   Use char because int might match the return type of a GCC
12778   builtin and then its argument prototype would still apply.  */
12779#ifdef __cplusplus
12780extern "C"
12781#endif
12782char acl_get ();
12783int
12784main ()
12785{
12786return acl_get ();
12787  ;
12788  return 0;
12789}
12790_ACEOF
12791if ac_fn_c_try_link "$LINENO"; then :
12792  ac_cv_lib_sec_acl_get=yes
12793else
12794  ac_cv_lib_sec_acl_get=no
12795fi
12796rm -f core conftest.err conftest.$ac_objext \
12797    conftest$ac_exeext conftest.$ac_ext
12798LIBS=$ac_check_lib_save_LIBS
12799fi
12800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
12801$as_echo "$ac_cv_lib_sec_acl_get" >&6; }
12802if test "x$ac_cv_lib_sec_acl_get" = xyes; then :
12803  LIBS="$LIBS -lsec"; $as_echo "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
12804
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
12807$as_echo_n "checking for Solaris ACL support... " >&6; }
12808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12809/* end confdefs.h.  */
12810
12811#ifdef HAVE_SYS_ACL_H
12812# include <sys/acl.h>
12813#endif
12814int
12815main ()
12816{
12817acl("foo", GETACLCNT, 0, NULL);
12818
12819  ;
12820  return 0;
12821}
12822_ACEOF
12823if ac_fn_c_try_link "$LINENO"; then :
12824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12825$as_echo "yes" >&6; }; $as_echo "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
12826
12827else
12828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12829$as_echo "no" >&6; }
12830fi
12831rm -f core conftest.err conftest.$ac_objext \
12832    conftest$ac_exeext conftest.$ac_ext
12833fi
12834
12835
12836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
12837$as_echo_n "checking for AIX ACL support... " >&6; }
12838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12839/* end confdefs.h.  */
12840
12841#if STDC_HEADERS
12842# include <stdlib.h>
12843# include <stddef.h>
12844#endif
12845#ifdef HAVE_SYS_ACL_H
12846# include <sys/acl.h>
12847#endif
12848#ifdef HAVE_SYS_ACCESS_H
12849# include <sys/access.h>
12850#endif
12851#define _ALL_SOURCE
12852
12853#include <sys/stat.h>
12854
12855int aclsize;
12856struct acl *aclent;
12857int
12858main ()
12859{
12860aclsize = sizeof(struct acl);
12861	aclent = (void *)malloc(aclsize);
12862	statacl("foo", STX_NORMAL, aclent, aclsize);
12863
12864  ;
12865  return 0;
12866}
12867_ACEOF
12868if ac_fn_c_try_link "$LINENO"; then :
12869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12870$as_echo "yes" >&6; }; $as_echo "#define HAVE_AIX_ACL 1" >>confdefs.h
12871
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876rm -f core conftest.err conftest.$ac_objext \
12877    conftest$ac_exeext conftest.$ac_ext
12878else
12879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12880$as_echo "yes" >&6; }
12881fi
12882
12883if test "x$GTK_CFLAGS" != "x"; then
12884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
12885$as_echo_n "checking for pango_shape_full... " >&6; }
12886  ac_save_CFLAGS="$CFLAGS"
12887  ac_save_LIBS="$LIBS"
12888  CFLAGS="$CFLAGS $GTK_CFLAGS"
12889  LIBS="$LIBS $GTK_LIBS"
12890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12891/* end confdefs.h.  */
12892#include <gtk/gtk.h>
12893int
12894main ()
12895{
12896 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
12897  ;
12898  return 0;
12899}
12900_ACEOF
12901if ac_fn_c_try_link "$LINENO"; then :
12902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12903$as_echo "yes" >&6; }; $as_echo "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
12904
12905else
12906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12907$as_echo "no" >&6; }
12908fi
12909rm -f core conftest.err conftest.$ac_objext \
12910    conftest$ac_exeext conftest.$ac_ext
12911  CFLAGS="$ac_save_CFLAGS"
12912  LIBS="$ac_save_LIBS"
12913fi
12914
12915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-gpm argument" >&5
12916$as_echo_n "checking --disable-gpm argument... " >&6; }
12917# Check whether --enable-gpm was given.
12918if test "${enable_gpm+set}" = set; then :
12919  enableval=$enable_gpm;
12920else
12921  enable_gpm="yes"
12922fi
12923
12924
12925if test "$enable_gpm" = "yes"; then
12926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12927$as_echo "no" >&6; }
12928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
12929$as_echo_n "checking for gpm... " >&6; }
12930if ${vi_cv_have_gpm+:} false; then :
12931  $as_echo_n "(cached) " >&6
12932else
12933  olibs="$LIBS" ; LIBS="-lgpm"
12934	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12935/* end confdefs.h.  */
12936#include <gpm.h>
12937	    #include <linux/keyboard.h>
12938int
12939main ()
12940{
12941Gpm_GetLibVersion(NULL);
12942  ;
12943  return 0;
12944}
12945_ACEOF
12946if ac_fn_c_try_link "$LINENO"; then :
12947  	    	    vi_cv_have_gpm=yes
12948else
12949  vi_cv_have_gpm=no
12950fi
12951rm -f core conftest.err conftest.$ac_objext \
12952    conftest$ac_exeext conftest.$ac_ext
12953	LIBS="$olibs"
12954
12955fi
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
12957$as_echo "$vi_cv_have_gpm" >&6; }
12958  if test $vi_cv_have_gpm = yes; then
12959    LIBS="$LIBS -lgpm"
12960    $as_echo "#define HAVE_GPM 1" >>confdefs.h
12961
12962  fi
12963else
12964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12965$as_echo "yes" >&6; }
12966fi
12967
12968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
12969$as_echo_n "checking --disable-sysmouse argument... " >&6; }
12970# Check whether --enable-sysmouse was given.
12971if test "${enable_sysmouse+set}" = set; then :
12972  enableval=$enable_sysmouse;
12973else
12974  enable_sysmouse="yes"
12975fi
12976
12977
12978if test "$enable_sysmouse" = "yes"; then
12979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12980$as_echo "no" >&6; }
12981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
12982$as_echo_n "checking for sysmouse... " >&6; }
12983if ${vi_cv_have_sysmouse+:} false; then :
12984  $as_echo_n "(cached) " >&6
12985else
12986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12987/* end confdefs.h.  */
12988#include <sys/consio.h>
12989	     #include <signal.h>
12990	     #include <sys/fbio.h>
12991int
12992main ()
12993{
12994struct mouse_info   mouse;
12995	     mouse.operation = MOUSE_MODE;
12996	     mouse.operation = MOUSE_SHOW;
12997	     mouse.u.mode.mode = 0;
12998	     mouse.u.mode.signal = SIGUSR2;
12999  ;
13000  return 0;
13001}
13002_ACEOF
13003if ac_fn_c_try_link "$LINENO"; then :
13004  vi_cv_have_sysmouse=yes
13005else
13006  vi_cv_have_sysmouse=no
13007fi
13008rm -f core conftest.err conftest.$ac_objext \
13009    conftest$ac_exeext conftest.$ac_ext
13010
13011fi
13012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
13013$as_echo "$vi_cv_have_sysmouse" >&6; }
13014  if test $vi_cv_have_sysmouse = yes; then
13015    $as_echo "#define HAVE_SYSMOUSE 1" >>confdefs.h
13016
13017  fi
13018else
13019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13020$as_echo "yes" >&6; }
13021fi
13022
13023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
13024$as_echo_n "checking for FD_CLOEXEC... " >&6; }
13025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13026/* end confdefs.h.  */
13027#if HAVE_FCNTL_H
13028# include <fcntl.h>
13029#endif
13030int
13031main ()
13032{
13033	int flag = FD_CLOEXEC;
13034  ;
13035  return 0;
13036}
13037_ACEOF
13038if ac_fn_c_try_compile "$LINENO"; then :
13039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13040$as_echo "yes" >&6; }; $as_echo "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
13041
13042else
13043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13044$as_echo "not usable" >&6; }
13045fi
13046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13047
13048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
13049$as_echo_n "checking for rename... " >&6; }
13050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051/* end confdefs.h.  */
13052#include <stdio.h>
13053int
13054main ()
13055{
13056rename("this", "that")
13057  ;
13058  return 0;
13059}
13060_ACEOF
13061if ac_fn_c_try_link "$LINENO"; then :
13062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13063$as_echo "yes" >&6; }; $as_echo "#define HAVE_RENAME 1" >>confdefs.h
13064
13065else
13066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13067$as_echo "no" >&6; }
13068fi
13069rm -f core conftest.err conftest.$ac_objext \
13070    conftest$ac_exeext conftest.$ac_ext
13071
13072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
13073$as_echo_n "checking for sysctl... " >&6; }
13074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13075/* end confdefs.h.  */
13076#include <sys/types.h>
13077#include <sys/sysctl.h>
13078int
13079main ()
13080{
13081	int mib[2], r;
13082	size_t len;
13083
13084	mib[0] = CTL_HW;
13085	mib[1] = HW_USERMEM;
13086	len = sizeof(r);
13087	(void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
13088
13089  ;
13090  return 0;
13091}
13092_ACEOF
13093if ac_fn_c_try_compile "$LINENO"; then :
13094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13095$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCTL 1" >>confdefs.h
13096
13097else
13098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13099$as_echo "not usable" >&6; }
13100fi
13101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13102
13103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
13104$as_echo_n "checking for sysinfo... " >&6; }
13105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106/* end confdefs.h.  */
13107#include <sys/types.h>
13108#include <sys/sysinfo.h>
13109int
13110main ()
13111{
13112	struct sysinfo sinfo;
13113	int t;
13114
13115	(void)sysinfo(&sinfo);
13116	t = sinfo.totalram;
13117
13118  ;
13119  return 0;
13120}
13121_ACEOF
13122if ac_fn_c_try_compile "$LINENO"; then :
13123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13124$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO 1" >>confdefs.h
13125
13126else
13127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13128$as_echo "not usable" >&6; }
13129fi
13130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13131
13132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
13133$as_echo_n "checking for sysinfo.mem_unit... " >&6; }
13134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13135/* end confdefs.h.  */
13136#include <sys/types.h>
13137#include <sys/sysinfo.h>
13138int
13139main ()
13140{
13141	struct sysinfo sinfo;
13142	sinfo.mem_unit = 1;
13143
13144  ;
13145  return 0;
13146}
13147_ACEOF
13148if ac_fn_c_try_compile "$LINENO"; then :
13149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13150$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
13151
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13157
13158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
13159$as_echo_n "checking for sysconf... " >&6; }
13160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13161/* end confdefs.h.  */
13162#include <unistd.h>
13163int
13164main ()
13165{
13166	(void)sysconf(_SC_PAGESIZE);
13167	(void)sysconf(_SC_PHYS_PAGES);
13168
13169  ;
13170  return 0;
13171}
13172_ACEOF
13173if ac_fn_c_try_compile "$LINENO"; then :
13174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13175$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSCONF 1" >>confdefs.h
13176
13177else
13178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
13179$as_echo "not usable" >&6; }
13180fi
13181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13182
13183# The cast to long int works around a bug in the HP C Compiler
13184# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13185# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13186# This bug is HP SR number 8606223364.
13187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
13188$as_echo_n "checking size of int... " >&6; }
13189if ${ac_cv_sizeof_int+:} false; then :
13190  $as_echo_n "(cached) " >&6
13191else
13192  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
13193
13194else
13195  if test "$ac_cv_type_int" = yes; then
13196     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13197$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13198as_fn_error 77 "cannot compute sizeof (int)
13199See \`config.log' for more details" "$LINENO" 5; }
13200   else
13201     ac_cv_sizeof_int=0
13202   fi
13203fi
13204
13205fi
13206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
13207$as_echo "$ac_cv_sizeof_int" >&6; }
13208
13209
13210
13211cat >>confdefs.h <<_ACEOF
13212#define SIZEOF_INT $ac_cv_sizeof_int
13213_ACEOF
13214
13215
13216# The cast to long int works around a bug in the HP C Compiler
13217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13219# This bug is HP SR number 8606223364.
13220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
13221$as_echo_n "checking size of long... " >&6; }
13222if ${ac_cv_sizeof_long+:} false; then :
13223  $as_echo_n "(cached) " >&6
13224else
13225  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
13226
13227else
13228  if test "$ac_cv_type_long" = yes; then
13229     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13230$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13231as_fn_error 77 "cannot compute sizeof (long)
13232See \`config.log' for more details" "$LINENO" 5; }
13233   else
13234     ac_cv_sizeof_long=0
13235   fi
13236fi
13237
13238fi
13239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
13240$as_echo "$ac_cv_sizeof_long" >&6; }
13241
13242
13243
13244cat >>confdefs.h <<_ACEOF
13245#define SIZEOF_LONG $ac_cv_sizeof_long
13246_ACEOF
13247
13248
13249# The cast to long int works around a bug in the HP C Compiler
13250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13252# This bug is HP SR number 8606223364.
13253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
13254$as_echo_n "checking size of time_t... " >&6; }
13255if ${ac_cv_sizeof_time_t+:} false; then :
13256  $as_echo_n "(cached) " >&6
13257else
13258  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
13259
13260else
13261  if test "$ac_cv_type_time_t" = yes; then
13262     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13264as_fn_error 77 "cannot compute sizeof (time_t)
13265See \`config.log' for more details" "$LINENO" 5; }
13266   else
13267     ac_cv_sizeof_time_t=0
13268   fi
13269fi
13270
13271fi
13272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
13273$as_echo "$ac_cv_sizeof_time_t" >&6; }
13274
13275
13276
13277cat >>confdefs.h <<_ACEOF
13278#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
13279_ACEOF
13280
13281
13282# The cast to long int works around a bug in the HP C Compiler
13283# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13284# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13285# This bug is HP SR number 8606223364.
13286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
13287$as_echo_n "checking size of off_t... " >&6; }
13288if ${ac_cv_sizeof_off_t+:} false; then :
13289  $as_echo_n "(cached) " >&6
13290else
13291  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :
13292
13293else
13294  if test "$ac_cv_type_off_t" = yes; then
13295     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13297as_fn_error 77 "cannot compute sizeof (off_t)
13298See \`config.log' for more details" "$LINENO" 5; }
13299   else
13300     ac_cv_sizeof_off_t=0
13301   fi
13302fi
13303
13304fi
13305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
13306$as_echo "$ac_cv_sizeof_off_t" >&6; }
13307
13308
13309
13310cat >>confdefs.h <<_ACEOF
13311#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
13312_ACEOF
13313
13314
13315
13316cat >>confdefs.h <<_ACEOF
13317#define VIM_SIZEOF_INT $ac_cv_sizeof_int
13318_ACEOF
13319
13320cat >>confdefs.h <<_ACEOF
13321#define VIM_SIZEOF_LONG $ac_cv_sizeof_long
13322_ACEOF
13323
13324
13325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
13326$as_echo_n "checking uint32_t is 32 bits... " >&6; }
13327if test "$cross_compiling" = yes; then :
13328  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
13329$as_echo "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
13330else
13331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13332/* end confdefs.h.  */
13333
13334#ifdef HAVE_STDINT_H
13335# include <stdint.h>
13336#endif
13337#ifdef HAVE_INTTYPES_H
13338# include <inttypes.h>
13339#endif
13340main() {
13341  uint32_t nr1 = (uint32_t)-1;
13342  uint32_t nr2 = (uint32_t)0xffffffffUL;
13343  if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) exit(1);
13344  exit(0);
13345}
13346_ACEOF
13347if ac_fn_c_try_run "$LINENO"; then :
13348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
13349$as_echo "ok" >&6; }
13350else
13351  as_fn_error $? "WRONG!  uint32_t not defined correctly." "$LINENO" 5
13352fi
13353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13354  conftest.$ac_objext conftest.beam conftest.$ac_ext
13355fi
13356
13357
13358
13359bcopy_test_prog='
13360#include "confdefs.h"
13361#ifdef HAVE_STRING_H
13362# include <string.h>
13363#endif
13364#if STDC_HEADERS
13365# include <stdlib.h>
13366# include <stddef.h>
13367#endif
13368main() {
13369  char buf[10];
13370  strcpy(buf, "abcdefghi");
13371  mch_memmove(buf, buf + 2, 3);
13372  if (strncmp(buf, "ababcf", 6))
13373    exit(1);
13374  strcpy(buf, "abcdefghi");
13375  mch_memmove(buf + 2, buf, 3);
13376  if (strncmp(buf, "cdedef", 6))
13377    exit(1);
13378  exit(0); /* libc version works properly.  */
13379}'
13380
13381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
13382$as_echo_n "checking whether memmove handles overlaps... " >&6; }
13383if ${vim_cv_memmove_handles_overlap+:} false; then :
13384  $as_echo_n "(cached) " >&6
13385else
13386
13387    if test "$cross_compiling" = yes; then :
13388
13389	as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
13390
13391else
13392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13393/* end confdefs.h.  */
13394#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
13395_ACEOF
13396if ac_fn_c_try_run "$LINENO"; then :
13397
13398	vim_cv_memmove_handles_overlap=yes
13399
13400else
13401
13402	vim_cv_memmove_handles_overlap=no
13403
13404fi
13405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13406  conftest.$ac_objext conftest.beam conftest.$ac_ext
13407fi
13408
13409
13410fi
13411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
13412$as_echo "$vim_cv_memmove_handles_overlap" >&6; }
13413
13414if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
13415  $as_echo "#define USEMEMMOVE 1" >>confdefs.h
13416
13417else
13418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
13419$as_echo_n "checking whether bcopy handles overlaps... " >&6; }
13420if ${vim_cv_bcopy_handles_overlap+:} false; then :
13421  $as_echo_n "(cached) " >&6
13422else
13423
13424      if test "$cross_compiling" = yes; then :
13425
13426	as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
13427
13428else
13429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13430/* end confdefs.h.  */
13431#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
13432_ACEOF
13433if ac_fn_c_try_run "$LINENO"; then :
13434
13435	vim_cv_bcopy_handles_overlap=yes
13436
13437else
13438
13439	vim_cv_bcopy_handles_overlap=no
13440
13441fi
13442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13443  conftest.$ac_objext conftest.beam conftest.$ac_ext
13444fi
13445
13446
13447fi
13448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
13449$as_echo "$vim_cv_bcopy_handles_overlap" >&6; }
13450
13451  if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
13452    $as_echo "#define USEBCOPY 1" >>confdefs.h
13453
13454  else
13455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
13456$as_echo_n "checking whether memcpy handles overlaps... " >&6; }
13457if ${vim_cv_memcpy_handles_overlap+:} false; then :
13458  $as_echo_n "(cached) " >&6
13459else
13460
13461	if test "$cross_compiling" = yes; then :
13462
13463	    as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
13464
13465else
13466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13467/* end confdefs.h.  */
13468#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
13469_ACEOF
13470if ac_fn_c_try_run "$LINENO"; then :
13471
13472	    vim_cv_memcpy_handles_overlap=yes
13473
13474else
13475
13476	    vim_cv_memcpy_handles_overlap=no
13477
13478fi
13479rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13480  conftest.$ac_objext conftest.beam conftest.$ac_ext
13481fi
13482
13483
13484fi
13485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
13486$as_echo "$vim_cv_memcpy_handles_overlap" >&6; }
13487
13488    if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
13489      $as_echo "#define USEMEMCPY 1" >>confdefs.h
13490
13491    fi
13492  fi
13493fi
13494
13495
13496if test "x$with_x" = "xyes"; then
13497  cflags_save=$CFLAGS
13498  libs_save=$LIBS
13499  LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
13500  CFLAGS="$CFLAGS $X_CFLAGS"
13501
13502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
13503$as_echo_n "checking whether X_LOCALE needed... " >&6; }
13504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505/* end confdefs.h.  */
13506#include <X11/Xlocale.h>
13507int
13508main ()
13509{
13510
13511  ;
13512  return 0;
13513}
13514_ACEOF
13515if ac_fn_c_try_compile "$LINENO"; then :
13516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13517/* end confdefs.h.  */
13518
13519/* Override any GCC internal prototype to avoid an error.
13520   Use char because int might match the return type of a GCC
13521   builtin and then its argument prototype would still apply.  */
13522#ifdef __cplusplus
13523extern "C"
13524#endif
13525char _Xsetlocale ();
13526int
13527main ()
13528{
13529return _Xsetlocale ();
13530  ;
13531  return 0;
13532}
13533_ACEOF
13534if ac_fn_c_try_link "$LINENO"; then :
13535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13536$as_echo "yes" >&6; }
13537	      $as_echo "#define X_LOCALE 1" >>confdefs.h
13538
13539else
13540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13541$as_echo "no" >&6; }
13542fi
13543rm -f core conftest.err conftest.$ac_objext \
13544    conftest$ac_exeext conftest.$ac_ext
13545else
13546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13547$as_echo "no" >&6; }
13548fi
13549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13550
13551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
13552$as_echo_n "checking whether Xutf8SetWMProperties() can be used... " >&6; }
13553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13554/* end confdefs.h.  */
13555
13556/* Override any GCC internal prototype to avoid an error.
13557   Use char because int might match the return type of a GCC
13558   builtin and then its argument prototype would still apply.  */
13559#ifdef __cplusplus
13560extern "C"
13561#endif
13562char Xutf8SetWMProperties ();
13563int
13564main ()
13565{
13566return Xutf8SetWMProperties ();
13567  ;
13568  return 0;
13569}
13570_ACEOF
13571if ac_fn_c_try_link "$LINENO"; then :
13572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13573$as_echo "yes" >&6; }
13574	      $as_echo "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
13575
13576else
13577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13578$as_echo "no" >&6; }
13579fi
13580rm -f core conftest.err conftest.$ac_objext \
13581    conftest$ac_exeext conftest.$ac_ext
13582
13583  CFLAGS=$cflags_save
13584  LIBS=$libs_save
13585fi
13586
13587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
13588$as_echo_n "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
13589if ${ac_cv_lib_xpg4__xpg4_setrunelocale+:} false; then :
13590  $as_echo_n "(cached) " >&6
13591else
13592  ac_check_lib_save_LIBS=$LIBS
13593LIBS="-lxpg4  $LIBS"
13594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595/* end confdefs.h.  */
13596
13597/* Override any GCC internal prototype to avoid an error.
13598   Use char because int might match the return type of a GCC
13599   builtin and then its argument prototype would still apply.  */
13600#ifdef __cplusplus
13601extern "C"
13602#endif
13603char _xpg4_setrunelocale ();
13604int
13605main ()
13606{
13607return _xpg4_setrunelocale ();
13608  ;
13609  return 0;
13610}
13611_ACEOF
13612if ac_fn_c_try_link "$LINENO"; then :
13613  ac_cv_lib_xpg4__xpg4_setrunelocale=yes
13614else
13615  ac_cv_lib_xpg4__xpg4_setrunelocale=no
13616fi
13617rm -f core conftest.err conftest.$ac_objext \
13618    conftest$ac_exeext conftest.$ac_ext
13619LIBS=$ac_check_lib_save_LIBS
13620fi
13621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
13622$as_echo "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
13623if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes; then :
13624  LIBS="$LIBS -lxpg4"
13625fi
13626
13627
13628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
13629$as_echo_n "checking how to create tags... " >&6; }
13630test -f tags && mv tags tags.save
13631if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
13632  TAGPRG="ctags -I INIT+ --fields=+S"
13633elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
13634  TAGPRG="exctags -I INIT+ --fields=+S"
13635elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
13636  TAGPRG="exuberant-ctags -I INIT+ --fields=+S"
13637else
13638  TAGPRG="ctags"
13639  (eval etags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
13640  (eval etags -c   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
13641  (eval ctags	   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
13642  (eval ctags -t   /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
13643  (eval ctags -ts  /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
13644  (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
13645  (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
13646fi
13647test -f tags.save && mv tags.save tags
13648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
13649$as_echo "$TAGPRG" >&6; }
13650
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
13652$as_echo_n "checking how to run man with a section nr... " >&6; }
13653MANDEF="man"
13654(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
13655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
13656$as_echo "$MANDEF" >&6; }
13657if test "$MANDEF" = "man -s"; then
13658  $as_echo "#define USEMAN_S 1" >>confdefs.h
13659
13660fi
13661
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
13663$as_echo_n "checking --disable-nls argument... " >&6; }
13664# Check whether --enable-nls was given.
13665if test "${enable_nls+set}" = set; then :
13666  enableval=$enable_nls;
13667else
13668  enable_nls="yes"
13669fi
13670
13671
13672if test "$enable_nls" = "yes"; then
13673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13674$as_echo "no" >&6; }
13675
13676  INSTALL_LANGS=install-languages
13677
13678  INSTALL_TOOL_LANGS=install-tool-languages
13679
13680
13681  # Extract the first word of "msgfmt", so it can be a program name with args.
13682set dummy msgfmt; ac_word=$2
13683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13684$as_echo_n "checking for $ac_word... " >&6; }
13685if ${ac_cv_prog_MSGFMT+:} false; then :
13686  $as_echo_n "(cached) " >&6
13687else
13688  if test -n "$MSGFMT"; then
13689  ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
13690else
13691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13692for as_dir in $PATH
13693do
13694  IFS=$as_save_IFS
13695  test -z "$as_dir" && as_dir=.
13696    for ac_exec_ext in '' $ac_executable_extensions; do
13697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13698    ac_cv_prog_MSGFMT="msgfmt"
13699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13700    break 2
13701  fi
13702done
13703  done
13704IFS=$as_save_IFS
13705
13706fi
13707fi
13708MSGFMT=$ac_cv_prog_MSGFMT
13709if test -n "$MSGFMT"; then
13710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
13711$as_echo "$MSGFMT" >&6; }
13712else
13713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13714$as_echo "no" >&6; }
13715fi
13716
13717
13718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
13719$as_echo_n "checking for NLS... " >&6; }
13720  if test -f po/Makefile; then
13721    have_gettext="no"
13722    if test -n "$MSGFMT"; then
13723      olibs=$LIBS
13724      LIBS=""
13725      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13726/* end confdefs.h.  */
13727#include <libintl.h>
13728int
13729main ()
13730{
13731gettext("Test");
13732  ;
13733  return 0;
13734}
13735_ACEOF
13736if ac_fn_c_try_link "$LINENO"; then :
13737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
13738$as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
13739else
13740  LIBS="-lintl"
13741	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13742/* end confdefs.h.  */
13743#include <libintl.h>
13744int
13745main ()
13746{
13747gettext("Test");
13748  ;
13749  return 0;
13750}
13751_ACEOF
13752if ac_fn_c_try_link "$LINENO"; then :
13753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
13754$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
13755	      LIBS="$olibs -lintl"
13756else
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
13758$as_echo "gettext() doesn't work" >&6; };
13759	      LIBS=$olibs
13760fi
13761rm -f core conftest.err conftest.$ac_objext \
13762    conftest$ac_exeext conftest.$ac_ext
13763fi
13764rm -f core conftest.err conftest.$ac_objext \
13765    conftest$ac_exeext conftest.$ac_ext
13766    else
13767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
13768$as_echo "msgfmt not found - disabled" >&6; };
13769    fi
13770    if test $have_gettext = "yes" -a "x$features" != "xtiny" -a "x$features" != "xsmall"; then
13771      $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
13772
13773      MAKEMO=yes
13774
13775            for ac_func in bind_textdomain_codeset
13776do :
13777  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
13778if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
13779  cat >>confdefs.h <<_ACEOF
13780#define HAVE_BIND_TEXTDOMAIN_CODESET 1
13781_ACEOF
13782
13783fi
13784done
13785
13786            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
13787$as_echo_n "checking for _nl_msg_cat_cntr... " >&6; }
13788      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13789/* end confdefs.h.  */
13790#include <libintl.h>
13791		extern int _nl_msg_cat_cntr;
13792int
13793main ()
13794{
13795++_nl_msg_cat_cntr;
13796  ;
13797  return 0;
13798}
13799_ACEOF
13800if ac_fn_c_try_link "$LINENO"; then :
13801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13802$as_echo "yes" >&6; }; $as_echo "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
13803
13804else
13805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13806$as_echo "no" >&6; }
13807fi
13808rm -f core conftest.err conftest.$ac_objext \
13809    conftest$ac_exeext conftest.$ac_ext
13810    fi
13811  else
13812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
13813$as_echo "no \"po/Makefile\" - disabled" >&6; };
13814  fi
13815else
13816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13817$as_echo "yes" >&6; }
13818fi
13819
13820ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
13821if test "x$ac_cv_header_dlfcn_h" = xyes; then :
13822  DLL=dlfcn.h
13823else
13824  ac_fn_c_check_header_mongrel "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
13825if test "x$ac_cv_header_dl_h" = xyes; then :
13826  DLL=dl.h
13827fi
13828
13829
13830fi
13831
13832
13833if test x${DLL} = xdlfcn.h; then
13834
13835$as_echo "#define HAVE_DLFCN_H 1" >>confdefs.h
13836
13837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
13838$as_echo_n "checking for dlopen()... " >&6; }
13839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13840/* end confdefs.h.  */
13841
13842int
13843main ()
13844{
13845
13846		extern void* dlopen();
13847		dlopen();
13848
13849  ;
13850  return 0;
13851}
13852_ACEOF
13853if ac_fn_c_try_link "$LINENO"; then :
13854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13855$as_echo "yes" >&6; };
13856
13857$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
13858
13859else
13860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13861$as_echo "no" >&6; };
13862	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
13863$as_echo_n "checking for dlopen() in -ldl... " >&6; }
13864	      olibs=$LIBS
13865	      LIBS="$LIBS -ldl"
13866	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867/* end confdefs.h.  */
13868
13869int
13870main ()
13871{
13872
13873				extern void* dlopen();
13874				dlopen();
13875
13876  ;
13877  return 0;
13878}
13879_ACEOF
13880if ac_fn_c_try_link "$LINENO"; then :
13881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13882$as_echo "yes" >&6; };
13883
13884$as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
13885
13886else
13887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13888$as_echo "no" >&6; };
13889			  LIBS=$olibs
13890fi
13891rm -f core conftest.err conftest.$ac_objext \
13892    conftest$ac_exeext conftest.$ac_ext
13893fi
13894rm -f core conftest.err conftest.$ac_objext \
13895    conftest$ac_exeext conftest.$ac_ext
13896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
13897$as_echo_n "checking for dlsym()... " >&6; }
13898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13899/* end confdefs.h.  */
13900
13901int
13902main ()
13903{
13904
13905		extern void* dlsym();
13906		dlsym();
13907
13908  ;
13909  return 0;
13910}
13911_ACEOF
13912if ac_fn_c_try_link "$LINENO"; then :
13913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13914$as_echo "yes" >&6; };
13915
13916$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
13917
13918else
13919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13920$as_echo "no" >&6; };
13921	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
13922$as_echo_n "checking for dlsym() in -ldl... " >&6; }
13923	      olibs=$LIBS
13924	      LIBS="$LIBS -ldl"
13925	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13926/* end confdefs.h.  */
13927
13928int
13929main ()
13930{
13931
13932				extern void* dlsym();
13933				dlsym();
13934
13935  ;
13936  return 0;
13937}
13938_ACEOF
13939if ac_fn_c_try_link "$LINENO"; then :
13940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13941$as_echo "yes" >&6; };
13942
13943$as_echo "#define HAVE_DLSYM 1" >>confdefs.h
13944
13945else
13946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13947$as_echo "no" >&6; };
13948			  LIBS=$olibs
13949fi
13950rm -f core conftest.err conftest.$ac_objext \
13951    conftest$ac_exeext conftest.$ac_ext
13952fi
13953rm -f core conftest.err conftest.$ac_objext \
13954    conftest$ac_exeext conftest.$ac_ext
13955elif test x${DLL} = xdl.h; then
13956
13957$as_echo "#define HAVE_DL_H 1" >>confdefs.h
13958
13959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
13960$as_echo_n "checking for shl_load()... " >&6; }
13961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13962/* end confdefs.h.  */
13963
13964int
13965main ()
13966{
13967
13968		extern void* shl_load();
13969		shl_load();
13970
13971  ;
13972  return 0;
13973}
13974_ACEOF
13975if ac_fn_c_try_link "$LINENO"; then :
13976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13977$as_echo "yes" >&6; };
13978
13979$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
13980
13981else
13982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13983$as_echo "no" >&6; };
13984	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
13985$as_echo_n "checking for shl_load() in -ldld... " >&6; }
13986	  olibs=$LIBS
13987	  LIBS="$LIBS -ldld"
13988	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989/* end confdefs.h.  */
13990
13991int
13992main ()
13993{
13994
13995			extern void* shl_load();
13996			shl_load();
13997
13998  ;
13999  return 0;
14000}
14001_ACEOF
14002if ac_fn_c_try_link "$LINENO"; then :
14003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14004$as_echo "yes" >&6; };
14005
14006$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
14007
14008else
14009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14010$as_echo "no" >&6; };
14011		  LIBS=$olibs
14012fi
14013rm -f core conftest.err conftest.$ac_objext \
14014    conftest$ac_exeext conftest.$ac_ext
14015fi
14016rm -f core conftest.err conftest.$ac_objext \
14017    conftest$ac_exeext conftest.$ac_ext
14018fi
14019for ac_header in setjmp.h
14020do :
14021  ac_fn_c_check_header_mongrel "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
14022if test "x$ac_cv_header_setjmp_h" = xyes; then :
14023  cat >>confdefs.h <<_ACEOF
14024#define HAVE_SETJMP_H 1
14025_ACEOF
14026
14027fi
14028
14029done
14030
14031
14032if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
14033    if echo $LIBS | grep -e '-ldl' >/dev/null; then
14034    LIBS=`echo $LIBS | sed s/-ldl//`
14035    PERL_LIBS="$PERL_LIBS -ldl"
14036  fi
14037fi
14038
14039if test "x$MACOSX" = "xyes"; then
14040  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -framework Cocoa" >&5
14041$as_echo_n "checking whether we need -framework Cocoa... " >&6; }
14042      if test "x$features" != "xtiny" || test "x$enable_multibyte" = "xyes"; then
14043    LIBS=$"$LIBS -framework Cocoa"
14044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14045$as_echo "yes" >&6; }
14046  else
14047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14048$as_echo "no" >&6; }
14049  fi
14050        if test "x$features" = "xtiny"; then
14051    OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
14052    OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
14053  fi
14054fi
14055if test "x$MACARCH" = "xboth" && test "x$GUITYPE" = "xCARBONGUI"; then
14056  LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
14057fi
14058
14059DEPEND_CFLAGS_FILTER=
14060if test "$GCC" = yes; then
14061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
14062$as_echo_n "checking for GCC 3 or later... " >&6; }
14063  gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9]\)\..*$/\1/g'`
14064  if test "$gccmajor" -gt "2"; then
14065    DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14067$as_echo "yes" >&6; }
14068  else
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14070$as_echo "no" >&6; }
14071  fi
14072          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
14073$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
14074  if test "$gccmajor" -gt "3"; then
14075    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/'`
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14077$as_echo "yes" >&6; }
14078  else
14079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14080$as_echo "no" >&6; }
14081  fi
14082fi
14083
14084
14085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
14086$as_echo_n "checking linker --as-needed support... " >&6; }
14087LINK_AS_NEEDED=
14088# Check if linker supports --as-needed and --no-as-needed options
14089if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
14090  LDFLAGS=`echo "$LDFLAGS" | sed -e 's/ *-Wl,--as-needed//g' | sed -e 's/$/ -Wl,--as-needed/'`
14091  LINK_AS_NEEDED=yes
14092fi
14093if test "$LINK_AS_NEEDED" = yes; then
14094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14095$as_echo "yes" >&6; }
14096else
14097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14098$as_echo "no" >&6; }
14099fi
14100
14101
14102# IBM z/OS reset CFLAGS for config.mk
14103if test "$zOSUnix" = "yes"; then
14104	CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
14105fi
14106
14107ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
14108
14109cat >confcache <<\_ACEOF
14110# This file is a shell script that caches the results of configure
14111# tests run on this system so they can be shared between configure
14112# scripts and configure runs, see configure's option --config-cache.
14113# It is not useful on other systems.  If it contains results you don't
14114# want to keep, you may remove or edit it.
14115#
14116# config.status only pays attention to the cache file if you give it
14117# the --recheck option to rerun configure.
14118#
14119# `ac_cv_env_foo' variables (set or unset) will be overridden when
14120# loading this file, other *unset* `ac_cv_foo' will be assigned the
14121# following values.
14122
14123_ACEOF
14124
14125# The following way of writing the cache mishandles newlines in values,
14126# but we know of no workaround that is simple, portable, and efficient.
14127# So, we kill variables containing newlines.
14128# Ultrix sh set writes to stderr and can't be redirected directly,
14129# and sets the high bit in the cache file unless we assign to the vars.
14130(
14131  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14132    eval ac_val=\$$ac_var
14133    case $ac_val in #(
14134    *${as_nl}*)
14135      case $ac_var in #(
14136      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14137$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14138      esac
14139      case $ac_var in #(
14140      _ | IFS | as_nl) ;; #(
14141      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14142      *) { eval $ac_var=; unset $ac_var;} ;;
14143      esac ;;
14144    esac
14145  done
14146
14147  (set) 2>&1 |
14148    case $as_nl`(ac_space=' '; set) 2>&1` in #(
14149    *${as_nl}ac_space=\ *)
14150      # `set' does not quote correctly, so add quotes: double-quote
14151      # substitution turns \\\\ into \\, and sed turns \\ into \.
14152      sed -n \
14153	"s/'/'\\\\''/g;
14154	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14155      ;; #(
14156    *)
14157      # `set' quotes correctly as required by POSIX, so do not add quotes.
14158      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14159      ;;
14160    esac |
14161    sort
14162) |
14163  sed '
14164     /^ac_cv_env_/b end
14165     t clear
14166     :clear
14167     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14168     t end
14169     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14170     :end' >>confcache
14171if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14172  if test -w "$cache_file"; then
14173    if test "x$cache_file" != "x/dev/null"; then
14174      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14175$as_echo "$as_me: updating cache $cache_file" >&6;}
14176      if test ! -f "$cache_file" || test -h "$cache_file"; then
14177	cat confcache >"$cache_file"
14178      else
14179        case $cache_file in #(
14180        */* | ?:*)
14181	  mv -f confcache "$cache_file"$$ &&
14182	  mv -f "$cache_file"$$ "$cache_file" ;; #(
14183        *)
14184	  mv -f confcache "$cache_file" ;;
14185	esac
14186      fi
14187    fi
14188  else
14189    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14190$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14191  fi
14192fi
14193rm -f confcache
14194
14195test "x$prefix" = xNONE && prefix=$ac_default_prefix
14196# Let make expand exec_prefix.
14197test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14198
14199DEFS=-DHAVE_CONFIG_H
14200
14201ac_libobjs=
14202ac_ltlibobjs=
14203U=
14204for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14205  # 1. Remove the extension, and $U if already installed.
14206  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14207  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14208  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14209  #    will be set to the directory where LIBOBJS objects are built.
14210  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14211  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14212done
14213LIBOBJS=$ac_libobjs
14214
14215LTLIBOBJS=$ac_ltlibobjs
14216
14217
14218
14219
14220: "${CONFIG_STATUS=./config.status}"
14221ac_write_fail=0
14222ac_clean_files_save=$ac_clean_files
14223ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14225$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14226as_write_fail=0
14227cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14228#! $SHELL
14229# Generated by $as_me.
14230# Run this file to recreate the current configuration.
14231# Compiler output produced by configure, useful for debugging
14232# configure, is in config.log if it exists.
14233
14234debug=false
14235ac_cs_recheck=false
14236ac_cs_silent=false
14237
14238SHELL=\${CONFIG_SHELL-$SHELL}
14239export SHELL
14240_ASEOF
14241cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14242## -------------------- ##
14243## M4sh Initialization. ##
14244## -------------------- ##
14245
14246# Be more Bourne compatible
14247DUALCASE=1; export DUALCASE # for MKS sh
14248if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14249  emulate sh
14250  NULLCMD=:
14251  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14252  # is contrary to our usage.  Disable this feature.
14253  alias -g '${1+"$@"}'='"$@"'
14254  setopt NO_GLOB_SUBST
14255else
14256  case `(set -o) 2>/dev/null` in #(
14257  *posix*) :
14258    set -o posix ;; #(
14259  *) :
14260     ;;
14261esac
14262fi
14263
14264
14265as_nl='
14266'
14267export as_nl
14268# Printing a long string crashes Solaris 7 /usr/bin/printf.
14269as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14270as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14271as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14272# Prefer a ksh shell builtin over an external printf program on Solaris,
14273# but without wasting forks for bash or zsh.
14274if test -z "$BASH_VERSION$ZSH_VERSION" \
14275    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14276  as_echo='print -r --'
14277  as_echo_n='print -rn --'
14278elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14279  as_echo='printf %s\n'
14280  as_echo_n='printf %s'
14281else
14282  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14283    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14284    as_echo_n='/usr/ucb/echo -n'
14285  else
14286    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14287    as_echo_n_body='eval
14288      arg=$1;
14289      case $arg in #(
14290      *"$as_nl"*)
14291	expr "X$arg" : "X\\(.*\\)$as_nl";
14292	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14293      esac;
14294      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14295    '
14296    export as_echo_n_body
14297    as_echo_n='sh -c $as_echo_n_body as_echo'
14298  fi
14299  export as_echo_body
14300  as_echo='sh -c $as_echo_body as_echo'
14301fi
14302
14303# The user is always right.
14304if test "${PATH_SEPARATOR+set}" != set; then
14305  PATH_SEPARATOR=:
14306  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14307    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14308      PATH_SEPARATOR=';'
14309  }
14310fi
14311
14312
14313# IFS
14314# We need space, tab and new line, in precisely that order.  Quoting is
14315# there to prevent editors from complaining about space-tab.
14316# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14317# splitting by setting IFS to empty value.)
14318IFS=" ""	$as_nl"
14319
14320# Find who we are.  Look in the path if we contain no directory separator.
14321as_myself=
14322case $0 in #((
14323  *[\\/]* ) as_myself=$0 ;;
14324  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14325for as_dir in $PATH
14326do
14327  IFS=$as_save_IFS
14328  test -z "$as_dir" && as_dir=.
14329    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14330  done
14331IFS=$as_save_IFS
14332
14333     ;;
14334esac
14335# We did not find ourselves, most probably we were run as `sh COMMAND'
14336# in which case we are not to be found in the path.
14337if test "x$as_myself" = x; then
14338  as_myself=$0
14339fi
14340if test ! -f "$as_myself"; then
14341  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14342  exit 1
14343fi
14344
14345# Unset variables that we do not need and which cause bugs (e.g. in
14346# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14347# suppresses any "Segmentation fault" message there.  '((' could
14348# trigger a bug in pdksh 5.2.14.
14349for as_var in BASH_ENV ENV MAIL MAILPATH
14350do eval test x\${$as_var+set} = xset \
14351  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14352done
14353PS1='$ '
14354PS2='> '
14355PS4='+ '
14356
14357# NLS nuisances.
14358LC_ALL=C
14359export LC_ALL
14360LANGUAGE=C
14361export LANGUAGE
14362
14363# CDPATH.
14364(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14365
14366
14367# as_fn_error STATUS ERROR [LINENO LOG_FD]
14368# ----------------------------------------
14369# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14370# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14371# script with STATUS, using 1 if that was 0.
14372as_fn_error ()
14373{
14374  as_status=$1; test $as_status -eq 0 && as_status=1
14375  if test "$4"; then
14376    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14377    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14378  fi
14379  $as_echo "$as_me: error: $2" >&2
14380  as_fn_exit $as_status
14381} # as_fn_error
14382
14383
14384# as_fn_set_status STATUS
14385# -----------------------
14386# Set $? to STATUS, without forking.
14387as_fn_set_status ()
14388{
14389  return $1
14390} # as_fn_set_status
14391
14392# as_fn_exit STATUS
14393# -----------------
14394# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14395as_fn_exit ()
14396{
14397  set +e
14398  as_fn_set_status $1
14399  exit $1
14400} # as_fn_exit
14401
14402# as_fn_unset VAR
14403# ---------------
14404# Portably unset VAR.
14405as_fn_unset ()
14406{
14407  { eval $1=; unset $1;}
14408}
14409as_unset=as_fn_unset
14410# as_fn_append VAR VALUE
14411# ----------------------
14412# Append the text in VALUE to the end of the definition contained in VAR. Take
14413# advantage of any shell optimizations that allow amortized linear growth over
14414# repeated appends, instead of the typical quadratic growth present in naive
14415# implementations.
14416if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14417  eval 'as_fn_append ()
14418  {
14419    eval $1+=\$2
14420  }'
14421else
14422  as_fn_append ()
14423  {
14424    eval $1=\$$1\$2
14425  }
14426fi # as_fn_append
14427
14428# as_fn_arith ARG...
14429# ------------------
14430# Perform arithmetic evaluation on the ARGs, and store the result in the
14431# global $as_val. Take advantage of shells that can avoid forks. The arguments
14432# must be portable across $(()) and expr.
14433if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14434  eval 'as_fn_arith ()
14435  {
14436    as_val=$(( $* ))
14437  }'
14438else
14439  as_fn_arith ()
14440  {
14441    as_val=`expr "$@" || test $? -eq 1`
14442  }
14443fi # as_fn_arith
14444
14445
14446if expr a : '\(a\)' >/dev/null 2>&1 &&
14447   test "X`expr 00001 : '.*\(...\)'`" = X001; then
14448  as_expr=expr
14449else
14450  as_expr=false
14451fi
14452
14453if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14454  as_basename=basename
14455else
14456  as_basename=false
14457fi
14458
14459if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14460  as_dirname=dirname
14461else
14462  as_dirname=false
14463fi
14464
14465as_me=`$as_basename -- "$0" ||
14466$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14467	 X"$0" : 'X\(//\)$' \| \
14468	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14469$as_echo X/"$0" |
14470    sed '/^.*\/\([^/][^/]*\)\/*$/{
14471	    s//\1/
14472	    q
14473	  }
14474	  /^X\/\(\/\/\)$/{
14475	    s//\1/
14476	    q
14477	  }
14478	  /^X\/\(\/\).*/{
14479	    s//\1/
14480	    q
14481	  }
14482	  s/.*/./; q'`
14483
14484# Avoid depending upon Character Ranges.
14485as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14486as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14487as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14488as_cr_digits='0123456789'
14489as_cr_alnum=$as_cr_Letters$as_cr_digits
14490
14491ECHO_C= ECHO_N= ECHO_T=
14492case `echo -n x` in #(((((
14493-n*)
14494  case `echo 'xy\c'` in
14495  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
14496  xy)  ECHO_C='\c';;
14497  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
14498       ECHO_T='	';;
14499  esac;;
14500*)
14501  ECHO_N='-n';;
14502esac
14503
14504rm -f conf$$ conf$$.exe conf$$.file
14505if test -d conf$$.dir; then
14506  rm -f conf$$.dir/conf$$.file
14507else
14508  rm -f conf$$.dir
14509  mkdir conf$$.dir 2>/dev/null
14510fi
14511if (echo >conf$$.file) 2>/dev/null; then
14512  if ln -s conf$$.file conf$$ 2>/dev/null; then
14513    as_ln_s='ln -s'
14514    # ... but there are two gotchas:
14515    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14516    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14517    # In both cases, we have to default to `cp -pR'.
14518    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14519      as_ln_s='cp -pR'
14520  elif ln conf$$.file conf$$ 2>/dev/null; then
14521    as_ln_s=ln
14522  else
14523    as_ln_s='cp -pR'
14524  fi
14525else
14526  as_ln_s='cp -pR'
14527fi
14528rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14529rmdir conf$$.dir 2>/dev/null
14530
14531
14532# as_fn_mkdir_p
14533# -------------
14534# Create "$as_dir" as a directory, including parents if necessary.
14535as_fn_mkdir_p ()
14536{
14537
14538  case $as_dir in #(
14539  -*) as_dir=./$as_dir;;
14540  esac
14541  test -d "$as_dir" || eval $as_mkdir_p || {
14542    as_dirs=
14543    while :; do
14544      case $as_dir in #(
14545      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14546      *) as_qdir=$as_dir;;
14547      esac
14548      as_dirs="'$as_qdir' $as_dirs"
14549      as_dir=`$as_dirname -- "$as_dir" ||
14550$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14551	 X"$as_dir" : 'X\(//\)[^/]' \| \
14552	 X"$as_dir" : 'X\(//\)$' \| \
14553	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14554$as_echo X"$as_dir" |
14555    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14556	    s//\1/
14557	    q
14558	  }
14559	  /^X\(\/\/\)[^/].*/{
14560	    s//\1/
14561	    q
14562	  }
14563	  /^X\(\/\/\)$/{
14564	    s//\1/
14565	    q
14566	  }
14567	  /^X\(\/\).*/{
14568	    s//\1/
14569	    q
14570	  }
14571	  s/.*/./; q'`
14572      test -d "$as_dir" && break
14573    done
14574    test -z "$as_dirs" || eval "mkdir $as_dirs"
14575  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14576
14577
14578} # as_fn_mkdir_p
14579if mkdir -p . 2>/dev/null; then
14580  as_mkdir_p='mkdir -p "$as_dir"'
14581else
14582  test -d ./-p && rmdir ./-p
14583  as_mkdir_p=false
14584fi
14585
14586
14587# as_fn_executable_p FILE
14588# -----------------------
14589# Test if FILE is an executable regular file.
14590as_fn_executable_p ()
14591{
14592  test -f "$1" && test -x "$1"
14593} # as_fn_executable_p
14594as_test_x='test -x'
14595as_executable_p=as_fn_executable_p
14596
14597# Sed expression to map a string onto a valid CPP name.
14598as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14599
14600# Sed expression to map a string onto a valid variable name.
14601as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14602
14603
14604exec 6>&1
14605## ----------------------------------- ##
14606## Main body of $CONFIG_STATUS script. ##
14607## ----------------------------------- ##
14608_ASEOF
14609test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14610
14611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14612# Save the log message, to keep $0 and so on meaningful, and to
14613# report actual input values of CONFIG_FILES etc. instead of their
14614# values after options handling.
14615ac_log="
14616This file was extended by $as_me, which was
14617generated by GNU Autoconf 2.69.  Invocation command line was
14618
14619  CONFIG_FILES    = $CONFIG_FILES
14620  CONFIG_HEADERS  = $CONFIG_HEADERS
14621  CONFIG_LINKS    = $CONFIG_LINKS
14622  CONFIG_COMMANDS = $CONFIG_COMMANDS
14623  $ $0 $@
14624
14625on `(hostname || uname -n) 2>/dev/null | sed 1q`
14626"
14627
14628_ACEOF
14629
14630case $ac_config_files in *"
14631"*) set x $ac_config_files; shift; ac_config_files=$*;;
14632esac
14633
14634case $ac_config_headers in *"
14635"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14636esac
14637
14638
14639cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14640# Files that config.status was made for.
14641config_files="$ac_config_files"
14642config_headers="$ac_config_headers"
14643
14644_ACEOF
14645
14646cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14647ac_cs_usage="\
14648\`$as_me' instantiates files and other configuration actions
14649from templates according to the current configuration.  Unless the files
14650and actions are specified as TAGs, all are instantiated by default.
14651
14652Usage: $0 [OPTION]... [TAG]...
14653
14654  -h, --help       print this help, then exit
14655  -V, --version    print version number and configuration settings, then exit
14656      --config     print configuration, then exit
14657  -q, --quiet, --silent
14658                   do not print progress messages
14659  -d, --debug      don't remove temporary files
14660      --recheck    update $as_me by reconfiguring in the same conditions
14661      --file=FILE[:TEMPLATE]
14662                   instantiate the configuration file FILE
14663      --header=FILE[:TEMPLATE]
14664                   instantiate the configuration header FILE
14665
14666Configuration files:
14667$config_files
14668
14669Configuration headers:
14670$config_headers
14671
14672Report bugs to the package provider."
14673
14674_ACEOF
14675cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14676ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14677ac_cs_version="\\
14678config.status
14679configured by $0, generated by GNU Autoconf 2.69,
14680  with options \\"\$ac_cs_config\\"
14681
14682Copyright (C) 2012 Free Software Foundation, Inc.
14683This config.status script is free software; the Free Software Foundation
14684gives unlimited permission to copy, distribute and modify it."
14685
14686ac_pwd='$ac_pwd'
14687srcdir='$srcdir'
14688AWK='$AWK'
14689test -n "\$AWK" || AWK=awk
14690_ACEOF
14691
14692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14693# The default lists apply if the user does not specify any file.
14694ac_need_defaults=:
14695while test $# != 0
14696do
14697  case $1 in
14698  --*=?*)
14699    ac_option=`expr "X$1" : 'X\([^=]*\)='`
14700    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14701    ac_shift=:
14702    ;;
14703  --*=)
14704    ac_option=`expr "X$1" : 'X\([^=]*\)='`
14705    ac_optarg=
14706    ac_shift=:
14707    ;;
14708  *)
14709    ac_option=$1
14710    ac_optarg=$2
14711    ac_shift=shift
14712    ;;
14713  esac
14714
14715  case $ac_option in
14716  # Handling of the options.
14717  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14718    ac_cs_recheck=: ;;
14719  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14720    $as_echo "$ac_cs_version"; exit ;;
14721  --config | --confi | --conf | --con | --co | --c )
14722    $as_echo "$ac_cs_config"; exit ;;
14723  --debug | --debu | --deb | --de | --d | -d )
14724    debug=: ;;
14725  --file | --fil | --fi | --f )
14726    $ac_shift
14727    case $ac_optarg in
14728    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14729    '') as_fn_error $? "missing file argument" ;;
14730    esac
14731    as_fn_append CONFIG_FILES " '$ac_optarg'"
14732    ac_need_defaults=false;;
14733  --header | --heade | --head | --hea )
14734    $ac_shift
14735    case $ac_optarg in
14736    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14737    esac
14738    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14739    ac_need_defaults=false;;
14740  --he | --h)
14741    # Conflict between --help and --header
14742    as_fn_error $? "ambiguous option: \`$1'
14743Try \`$0 --help' for more information.";;
14744  --help | --hel | -h )
14745    $as_echo "$ac_cs_usage"; exit ;;
14746  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14747  | -silent | --silent | --silen | --sile | --sil | --si | --s)
14748    ac_cs_silent=: ;;
14749
14750  # This is an error.
14751  -*) as_fn_error $? "unrecognized option: \`$1'
14752Try \`$0 --help' for more information." ;;
14753
14754  *) as_fn_append ac_config_targets " $1"
14755     ac_need_defaults=false ;;
14756
14757  esac
14758  shift
14759done
14760
14761ac_configure_extra_args=
14762
14763if $ac_cs_silent; then
14764  exec 6>/dev/null
14765  ac_configure_extra_args="$ac_configure_extra_args --silent"
14766fi
14767
14768_ACEOF
14769cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14770if \$ac_cs_recheck; then
14771  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14772  shift
14773  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14774  CONFIG_SHELL='$SHELL'
14775  export CONFIG_SHELL
14776  exec "\$@"
14777fi
14778
14779_ACEOF
14780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14781exec 5>>auto/config.log
14782{
14783  echo
14784  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14785## Running $as_me. ##
14786_ASBOX
14787  $as_echo "$ac_log"
14788} >&5
14789
14790_ACEOF
14791cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14792_ACEOF
14793
14794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14795
14796# Handling of arguments.
14797for ac_config_target in $ac_config_targets
14798do
14799  case $ac_config_target in
14800    "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
14801    "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
14802
14803  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
14804  esac
14805done
14806
14807
14808# If the user did not use the arguments to specify the items to instantiate,
14809# then the envvar interface is used.  Set only those that are not.
14810# We use the long form for the default assignment because of an extremely
14811# bizarre bug on SunOS 4.1.3.
14812if $ac_need_defaults; then
14813  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14814  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14815fi
14816
14817# Have a temporary directory for convenience.  Make it in the build tree
14818# simply because there is no reason against having it here, and in addition,
14819# creating and moving files from /tmp can sometimes cause problems.
14820# Hook for its removal unless debugging.
14821# Note that there is a small window in which the directory will not be cleaned:
14822# after its creation but before its name has been assigned to `$tmp'.
14823$debug ||
14824{
14825  tmp= ac_tmp=
14826  trap 'exit_status=$?
14827  : "${ac_tmp:=$tmp}"
14828  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
14829' 0
14830  trap 'as_fn_exit 1' 1 2 13 15
14831}
14832# Create a (secure) tmp directory for tmp files.
14833
14834{
14835  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14836  test -d "$tmp"
14837}  ||
14838{
14839  tmp=./conf$$-$RANDOM
14840  (umask 077 && mkdir "$tmp")
14841} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14842ac_tmp=$tmp
14843
14844# Set up the scripts for CONFIG_FILES section.
14845# No need to generate them if there are no CONFIG_FILES.
14846# This happens for instance with `./config.status config.h'.
14847if test -n "$CONFIG_FILES"; then
14848
14849
14850ac_cr=`echo X | tr X '\015'`
14851# On cygwin, bash can eat \r inside `` if the user requested igncr.
14852# But we know of no other shell where ac_cr would be empty at this
14853# point, so we can use a bashism as a fallback.
14854if test "x$ac_cr" = x; then
14855  eval ac_cr=\$\'\\r\'
14856fi
14857ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14858if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14859  ac_cs_awk_cr='\\r'
14860else
14861  ac_cs_awk_cr=$ac_cr
14862fi
14863
14864echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
14865_ACEOF
14866
14867
14868{
14869  echo "cat >conf$$subs.awk <<_ACEOF" &&
14870  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14871  echo "_ACEOF"
14872} >conf$$subs.sh ||
14873  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14874ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
14875ac_delim='%!_!# '
14876for ac_last_try in false false false false false :; do
14877  . ./conf$$subs.sh ||
14878    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14879
14880  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14881  if test $ac_delim_n = $ac_delim_num; then
14882    break
14883  elif $ac_last_try; then
14884    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14885  else
14886    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14887  fi
14888done
14889rm -f conf$$subs.sh
14890
14891cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14892cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
14893_ACEOF
14894sed -n '
14895h
14896s/^/S["/; s/!.*/"]=/
14897p
14898g
14899s/^[^!]*!//
14900:repl
14901t repl
14902s/'"$ac_delim"'$//
14903t delim
14904:nl
14905h
14906s/\(.\{148\}\)..*/\1/
14907t more1
14908s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14909p
14910n
14911b repl
14912:more1
14913s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14914p
14915g
14916s/.\{148\}//
14917t nl
14918:delim
14919h
14920s/\(.\{148\}\)..*/\1/
14921t more2
14922s/["\\]/\\&/g; s/^/"/; s/$/"/
14923p
14924b
14925:more2
14926s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14927p
14928g
14929s/.\{148\}//
14930t delim
14931' <conf$$subs.awk | sed '
14932/^[^""]/{
14933  N
14934  s/\n//
14935}
14936' >>$CONFIG_STATUS || ac_write_fail=1
14937rm -f conf$$subs.awk
14938cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14939_ACAWK
14940cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
14941  for (key in S) S_is_set[key] = 1
14942  FS = ""
14943
14944}
14945{
14946  line = $ 0
14947  nfields = split(line, field, "@")
14948  substed = 0
14949  len = length(field[1])
14950  for (i = 2; i < nfields; i++) {
14951    key = field[i]
14952    keylen = length(key)
14953    if (S_is_set[key]) {
14954      value = S[key]
14955      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14956      len += length(value) + length(field[++i])
14957      substed = 1
14958    } else
14959      len += 1 + keylen
14960  }
14961
14962  print line
14963}
14964
14965_ACAWK
14966_ACEOF
14967cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14968if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14969  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14970else
14971  cat
14972fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14973  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14974_ACEOF
14975
14976# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14977# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14978# trailing colons and then remove the whole line if VPATH becomes empty
14979# (actually we leave an empty line to preserve line numbers).
14980if test "x$srcdir" = x.; then
14981  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
14982h
14983s///
14984s/^/:/
14985s/[	 ]*$/:/
14986s/:\$(srcdir):/:/g
14987s/:\${srcdir}:/:/g
14988s/:@srcdir@:/:/g
14989s/^:*//
14990s/:*$//
14991x
14992s/\(=[	 ]*\).*/\1/
14993G
14994s/\n//
14995s/^[^=]*=[	 ]*$//
14996}'
14997fi
14998
14999cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15000fi # test -n "$CONFIG_FILES"
15001
15002# Set up the scripts for CONFIG_HEADERS section.
15003# No need to generate them if there are no CONFIG_HEADERS.
15004# This happens for instance with `./config.status Makefile'.
15005if test -n "$CONFIG_HEADERS"; then
15006cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
15007BEGIN {
15008_ACEOF
15009
15010# Transform confdefs.h into an awk script `defines.awk', embedded as
15011# here-document in config.status, that substitutes the proper values into
15012# config.h.in to produce config.h.
15013
15014# Create a delimiter string that does not exist in confdefs.h, to ease
15015# handling of long lines.
15016ac_delim='%!_!# '
15017for ac_last_try in false false :; do
15018  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15019  if test -z "$ac_tt"; then
15020    break
15021  elif $ac_last_try; then
15022    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
15023  else
15024    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15025  fi
15026done
15027
15028# For the awk script, D is an array of macro values keyed by name,
15029# likewise P contains macro parameters if any.  Preserve backslash
15030# newline sequences.
15031
15032ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15033sed -n '
15034s/.\{148\}/&'"$ac_delim"'/g
15035t rset
15036:rset
15037s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
15038t def
15039d
15040:def
15041s/\\$//
15042t bsnl
15043s/["\\]/\\&/g
15044s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15045D["\1"]=" \3"/p
15046s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
15047d
15048:bsnl
15049s/["\\]/\\&/g
15050s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
15051D["\1"]=" \3\\\\\\n"\\/p
15052t cont
15053s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15054t cont
15055d
15056:cont
15057n
15058s/.\{148\}/&'"$ac_delim"'/g
15059t clear
15060:clear
15061s/\\$//
15062t bsnlc
15063s/["\\]/\\&/g; s/^/"/; s/$/"/p
15064d
15065:bsnlc
15066s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15067b cont
15068' <confdefs.h | sed '
15069s/'"$ac_delim"'/"\\\
15070"/g' >>$CONFIG_STATUS || ac_write_fail=1
15071
15072cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15073  for (key in D) D_is_set[key] = 1
15074  FS = ""
15075}
15076/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15077  line = \$ 0
15078  split(line, arg, " ")
15079  if (arg[1] == "#") {
15080    defundef = arg[2]
15081    mac1 = arg[3]
15082  } else {
15083    defundef = substr(arg[1], 2)
15084    mac1 = arg[2]
15085  }
15086  split(mac1, mac2, "(") #)
15087  macro = mac2[1]
15088  prefix = substr(line, 1, index(line, defundef) - 1)
15089  if (D_is_set[macro]) {
15090    # Preserve the white space surrounding the "#".
15091    print prefix "define", macro P[macro] D[macro]
15092    next
15093  } else {
15094    # Replace #undef with comments.  This is necessary, for example,
15095    # in the case of _POSIX_SOURCE, which is predefined and required
15096    # on some systems where configure will not decide to define it.
15097    if (defundef == "undef") {
15098      print "/*", prefix defundef, macro, "*/"
15099      next
15100    }
15101  }
15102}
15103{ print }
15104_ACAWK
15105_ACEOF
15106cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15107  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
15108fi # test -n "$CONFIG_HEADERS"
15109
15110
15111eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
15112shift
15113for ac_tag
15114do
15115  case $ac_tag in
15116  :[FHLC]) ac_mode=$ac_tag; continue;;
15117  esac
15118  case $ac_mode$ac_tag in
15119  :[FHL]*:*);;
15120  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
15121  :[FH]-) ac_tag=-:-;;
15122  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15123  esac
15124  ac_save_IFS=$IFS
15125  IFS=:
15126  set x $ac_tag
15127  IFS=$ac_save_IFS
15128  shift
15129  ac_file=$1
15130  shift
15131
15132  case $ac_mode in
15133  :L) ac_source=$1;;
15134  :[FH])
15135    ac_file_inputs=
15136    for ac_f
15137    do
15138      case $ac_f in
15139      -) ac_f="$ac_tmp/stdin";;
15140      *) # Look for the file first in the build tree, then in the source tree
15141	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
15142	 # because $ac_f cannot contain `:'.
15143	 test -f "$ac_f" ||
15144	   case $ac_f in
15145	   [\\/$]*) false;;
15146	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15147	   esac ||
15148	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
15149      esac
15150      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15151      as_fn_append ac_file_inputs " '$ac_f'"
15152    done
15153
15154    # Let's still pretend it is `configure' which instantiates (i.e., don't
15155    # use $as_me), people would be surprised to read:
15156    #    /* config.h.  Generated by config.status.  */
15157    configure_input='Generated from '`
15158	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15159	`' by configure.'
15160    if test x"$ac_file" != x-; then
15161      configure_input="$ac_file.  $configure_input"
15162      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15163$as_echo "$as_me: creating $ac_file" >&6;}
15164    fi
15165    # Neutralize special characters interpreted by sed in replacement strings.
15166    case $configure_input in #(
15167    *\&* | *\|* | *\\* )
15168       ac_sed_conf_input=`$as_echo "$configure_input" |
15169       sed 's/[\\\\&|]/\\\\&/g'`;; #(
15170    *) ac_sed_conf_input=$configure_input;;
15171    esac
15172
15173    case $ac_tag in
15174    *:-:* | *:-) cat >"$ac_tmp/stdin" \
15175      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15176    esac
15177    ;;
15178  esac
15179
15180  ac_dir=`$as_dirname -- "$ac_file" ||
15181$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15182	 X"$ac_file" : 'X\(//\)[^/]' \| \
15183	 X"$ac_file" : 'X\(//\)$' \| \
15184	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15185$as_echo X"$ac_file" |
15186    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15187	    s//\1/
15188	    q
15189	  }
15190	  /^X\(\/\/\)[^/].*/{
15191	    s//\1/
15192	    q
15193	  }
15194	  /^X\(\/\/\)$/{
15195	    s//\1/
15196	    q
15197	  }
15198	  /^X\(\/\).*/{
15199	    s//\1/
15200	    q
15201	  }
15202	  s/.*/./; q'`
15203  as_dir="$ac_dir"; as_fn_mkdir_p
15204  ac_builddir=.
15205
15206case "$ac_dir" in
15207.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15208*)
15209  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15210  # A ".." for each directory in $ac_dir_suffix.
15211  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15212  case $ac_top_builddir_sub in
15213  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15214  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15215  esac ;;
15216esac
15217ac_abs_top_builddir=$ac_pwd
15218ac_abs_builddir=$ac_pwd$ac_dir_suffix
15219# for backward compatibility:
15220ac_top_builddir=$ac_top_build_prefix
15221
15222case $srcdir in
15223  .)  # We are building in place.
15224    ac_srcdir=.
15225    ac_top_srcdir=$ac_top_builddir_sub
15226    ac_abs_top_srcdir=$ac_pwd ;;
15227  [\\/]* | ?:[\\/]* )  # Absolute name.
15228    ac_srcdir=$srcdir$ac_dir_suffix;
15229    ac_top_srcdir=$srcdir
15230    ac_abs_top_srcdir=$srcdir ;;
15231  *) # Relative name.
15232    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15233    ac_top_srcdir=$ac_top_build_prefix$srcdir
15234    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15235esac
15236ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15237
15238
15239  case $ac_mode in
15240  :F)
15241  #
15242  # CONFIG_FILE
15243  #
15244
15245_ACEOF
15246
15247cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15248# If the template does not know about datarootdir, expand it.
15249# FIXME: This hack should be removed a few years after 2.60.
15250ac_datarootdir_hack=; ac_datarootdir_seen=
15251ac_sed_dataroot='
15252/datarootdir/ {
15253  p
15254  q
15255}
15256/@datadir@/p
15257/@docdir@/p
15258/@infodir@/p
15259/@localedir@/p
15260/@mandir@/p'
15261case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15262*datarootdir*) ac_datarootdir_seen=yes;;
15263*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15264  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15265$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15266_ACEOF
15267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15268  ac_datarootdir_hack='
15269  s&@datadir@&$datadir&g
15270  s&@docdir@&$docdir&g
15271  s&@infodir@&$infodir&g
15272  s&@localedir@&$localedir&g
15273  s&@mandir@&$mandir&g
15274  s&\\\${datarootdir}&$datarootdir&g' ;;
15275esac
15276_ACEOF
15277
15278# Neutralize VPATH when `$srcdir' = `.'.
15279# Shell code in configure.ac might set extrasub.
15280# FIXME: do we really want to maintain this feature?
15281cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15282ac_sed_extra="$ac_vpsub
15283$extrasub
15284_ACEOF
15285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15286:t
15287/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15288s|@configure_input@|$ac_sed_conf_input|;t t
15289s&@top_builddir@&$ac_top_builddir_sub&;t t
15290s&@top_build_prefix@&$ac_top_build_prefix&;t t
15291s&@srcdir@&$ac_srcdir&;t t
15292s&@abs_srcdir@&$ac_abs_srcdir&;t t
15293s&@top_srcdir@&$ac_top_srcdir&;t t
15294s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15295s&@builddir@&$ac_builddir&;t t
15296s&@abs_builddir@&$ac_abs_builddir&;t t
15297s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15298$ac_datarootdir_hack
15299"
15300eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15301  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15302
15303test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15304  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15305  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
15306      "$ac_tmp/out"`; test -z "$ac_out"; } &&
15307  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15308which seems to be undefined.  Please make sure it is defined" >&5
15309$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15310which seems to be undefined.  Please make sure it is defined" >&2;}
15311
15312  rm -f "$ac_tmp/stdin"
15313  case $ac_file in
15314  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15315  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15316  esac \
15317  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15318 ;;
15319  :H)
15320  #
15321  # CONFIG_HEADER
15322  #
15323  if test x"$ac_file" != x-; then
15324    {
15325      $as_echo "/* $configure_input  */" \
15326      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15327    } >"$ac_tmp/config.h" \
15328      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15329    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15330      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15331$as_echo "$as_me: $ac_file is unchanged" >&6;}
15332    else
15333      rm -f "$ac_file"
15334      mv "$ac_tmp/config.h" "$ac_file" \
15335	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
15336    fi
15337  else
15338    $as_echo "/* $configure_input  */" \
15339      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15340      || as_fn_error $? "could not create -" "$LINENO" 5
15341  fi
15342 ;;
15343
15344
15345  esac
15346
15347done # for ac_tag
15348
15349
15350as_fn_exit 0
15351_ACEOF
15352ac_clean_files=$ac_clean_files_save
15353
15354test $ac_write_fail = 0 ||
15355  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15356
15357
15358# configure is writing to config.log, and then calls config.status.
15359# config.status does its own redirection, appending to config.log.
15360# Unfortunately, on DOS this fails, as config.log is still kept open
15361# by configure, so config.status won't be able to write to it; its
15362# output is simply discarded.  So we exec the FD to /dev/null,
15363# effectively closing config.log, so it can be properly (re)opened and
15364# appended to by config.status.  When coming back to configure, we
15365# need to make the FD available again.
15366if test "$no_create" != yes; then
15367  ac_cs_success=:
15368  ac_config_status_args=
15369  test "$silent" = yes &&
15370    ac_config_status_args="$ac_config_status_args --quiet"
15371  exec 5>/dev/null
15372  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15373  exec 5>>auto/config.log
15374  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15375  # would make configure fail if this is the last instruction.
15376  $ac_cs_success || as_fn_exit 1
15377fi
15378if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15379  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15380$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15381fi
15382
15383
15384