164ce7165Smrg#! /bin/sh
264ce7165Smrg# Guess values for system-dependent variables and create Makefiles.
3b71ad168Smrg# Generated by GNU Autoconf 2.71 for xhost 1.0.9.
464ce7165Smrg#
5b71ad168Smrg# Report bugs to <https://gitlab.freedesktop.org/xorg/app/xhost/-/issues>.
664ce7165Smrg#
7169a0819Smrg#
8b71ad168Smrg# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9b71ad168Smrg# Inc.
10169a0819Smrg#
11169a0819Smrg#
1264ce7165Smrg# This configure script is free software; the Free Software Foundation
1364ce7165Smrg# gives unlimited permission to copy, distribute and modify it.
14169a0819Smrg## -------------------- ##
15169a0819Smrg## M4sh Initialization. ##
16169a0819Smrg## -------------------- ##
1764ce7165Smrg
1864ce7165Smrg# Be more Bourne compatible
1964ce7165SmrgDUALCASE=1; export DUALCASE # for MKS sh
20b71ad168Smrgas_nop=:
21b71ad168Smrgif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22b71ad168Smrgthen :
2364ce7165Smrg  emulate sh
2464ce7165Smrg  NULLCMD=:
25fb23d3a8Smrg  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2664ce7165Smrg  # is contrary to our usage.  Disable this feature.
2764ce7165Smrg  alias -g '${1+"$@"}'='"$@"'
2864ce7165Smrg  setopt NO_GLOB_SUBST
29b71ad168Smrgelse $as_nop
30169a0819Smrg  case `(set -o) 2>/dev/null` in #(
31169a0819Smrg  *posix*) :
32169a0819Smrg    set -o posix ;; #(
33169a0819Smrg  *) :
34169a0819Smrg     ;;
3564ce7165Smrgesac
3664ce7165Smrgfi
3764ce7165Smrg
3864ce7165Smrg
39b71ad168Smrg
40b71ad168Smrg# Reset variables that may have inherited troublesome values from
41b71ad168Smrg# the environment.
42b71ad168Smrg
43b71ad168Smrg# IFS needs to be set, to space, tab, and newline, in precisely that order.
44b71ad168Smrg# (If _AS_PATH_WALK were called with IFS unset, it would have the
45b71ad168Smrg# side effect of setting IFS to empty, thus disabling word splitting.)
46b71ad168Smrg# Quoting is to prevent editors from complaining about space-tab.
47fb23d3a8Smrgas_nl='
48fb23d3a8Smrg'
49fb23d3a8Smrgexport as_nl
50b71ad168SmrgIFS=" ""	$as_nl"
51b71ad168Smrg
52b71ad168SmrgPS1='$ '
53b71ad168SmrgPS2='> '
54b71ad168SmrgPS4='+ '
55b71ad168Smrg
56b71ad168Smrg# Ensure predictable behavior from utilities with locale-dependent output.
57b71ad168SmrgLC_ALL=C
58b71ad168Smrgexport LC_ALL
59b71ad168SmrgLANGUAGE=C
60b71ad168Smrgexport LANGUAGE
61b71ad168Smrg
62b71ad168Smrg# We cannot yet rely on "unset" to work, but we need these variables
63b71ad168Smrg# to be unset--not just set to an empty or harmless value--now, to
64b71ad168Smrg# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
65b71ad168Smrg# also avoids known problems related to "unset" and subshell syntax
66b71ad168Smrg# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67b71ad168Smrgfor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68b71ad168Smrgdo eval test \${$as_var+y} \
69b71ad168Smrg  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70b71ad168Smrgdone
71b71ad168Smrg
72b71ad168Smrg# Ensure that fds 0, 1, and 2 are open.
73b71ad168Smrgif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74b71ad168Smrgif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75b71ad168Smrgif (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
76fb23d3a8Smrg
77fb23d3a8Smrg# The user is always right.
78b71ad168Smrgif ${PATH_SEPARATOR+false} :; then
79fb23d3a8Smrg  PATH_SEPARATOR=:
80fb23d3a8Smrg  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81fb23d3a8Smrg    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82fb23d3a8Smrg      PATH_SEPARATOR=';'
83fb23d3a8Smrg  }
8464ce7165Smrgfi
8564ce7165Smrg
8664ce7165Smrg
8764ce7165Smrg# Find who we are.  Look in the path if we contain no directory separator.
88169a0819Smrgas_myself=
89169a0819Smrgcase $0 in #((
9064ce7165Smrg  *[\\/]* ) as_myself=$0 ;;
9164ce7165Smrg  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9264ce7165Smrgfor as_dir in $PATH
9364ce7165Smrgdo
9464ce7165Smrg  IFS=$as_save_IFS
95b71ad168Smrg  case $as_dir in #(((
96b71ad168Smrg    '') as_dir=./ ;;
97b71ad168Smrg    */) ;;
98b71ad168Smrg    *) as_dir=$as_dir/ ;;
99b71ad168Smrg  esac
100b71ad168Smrg    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101169a0819Smrg  done
10264ce7165SmrgIFS=$as_save_IFS
10364ce7165Smrg
10464ce7165Smrg     ;;
10564ce7165Smrgesac
10664ce7165Smrg# We did not find ourselves, most probably we were run as `sh COMMAND'
10764ce7165Smrg# in which case we are not to be found in the path.
10864ce7165Smrgif test "x$as_myself" = x; then
10964ce7165Smrg  as_myself=$0
11064ce7165Smrgfi
11164ce7165Smrgif test ! -f "$as_myself"; then
112b71ad168Smrg  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113169a0819Smrg  exit 1
11464ce7165Smrgfi
11564ce7165Smrg
116169a0819Smrg
11795fdd44cSmrg# Use a proper internal environment variable to ensure we don't fall
11895fdd44cSmrg  # into an infinite loop, continuously re-executing ourselves.
11995fdd44cSmrg  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
12095fdd44cSmrg    _as_can_reexec=no; export _as_can_reexec;
12195fdd44cSmrg    # We cannot yet assume a decent shell, so we have to provide a
12295fdd44cSmrg# neutralization value for shells without unset; and this also
12395fdd44cSmrg# works around shells that cannot unset nonexistent variables.
12495fdd44cSmrg# Preserve -v and -x to the replacement shell.
12595fdd44cSmrgBASH_ENV=/dev/null
12695fdd44cSmrgENV=/dev/null
12795fdd44cSmrg(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
12895fdd44cSmrgcase $- in # ((((
12995fdd44cSmrg  *v*x* | *x*v* ) as_opts=-vx ;;
13095fdd44cSmrg  *v* ) as_opts=-v ;;
13195fdd44cSmrg  *x* ) as_opts=-x ;;
13295fdd44cSmrg  * ) as_opts= ;;
13395fdd44cSmrgesac
13495fdd44cSmrgexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
13595fdd44cSmrg# Admittedly, this is quite paranoid, since all the known shells bail
13695fdd44cSmrg# out after a failed `exec'.
137b71ad168Smrgprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138b71ad168Smrgexit 255
13995fdd44cSmrg  fi
14095fdd44cSmrg  # We don't want this to propagate to other subprocesses.
14195fdd44cSmrg          { _as_can_reexec=; unset _as_can_reexec;}
142169a0819Smrgif test "x$CONFIG_SHELL" = x; then
143b71ad168Smrg  as_bourne_compatible="as_nop=:
144b71ad168Smrgif test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145b71ad168Smrgthen :
146169a0819Smrg  emulate sh
147169a0819Smrg  NULLCMD=:
148169a0819Smrg  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149169a0819Smrg  # is contrary to our usage.  Disable this feature.
150169a0819Smrg  alias -g '\${1+\"\$@\"}'='\"\$@\"'
151169a0819Smrg  setopt NO_GLOB_SUBST
152b71ad168Smrgelse \$as_nop
153169a0819Smrg  case \`(set -o) 2>/dev/null\` in #(
154169a0819Smrg  *posix*) :
155169a0819Smrg    set -o posix ;; #(
156169a0819Smrg  *) :
157169a0819Smrg     ;;
158169a0819Smrgesac
159169a0819Smrgfi
160169a0819Smrg"
161169a0819Smrg  as_required="as_fn_return () { (exit \$1); }
162169a0819Smrgas_fn_success () { as_fn_return 0; }
163169a0819Smrgas_fn_failure () { as_fn_return 1; }
164169a0819Smrgas_fn_ret_success () { return 0; }
165169a0819Smrgas_fn_ret_failure () { return 1; }
166169a0819Smrg
167169a0819Smrgexitcode=0
168169a0819Smrgas_fn_success || { exitcode=1; echo as_fn_success failed.; }
169169a0819Smrgas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170169a0819Smrgas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171169a0819Smrgas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172b71ad168Smrgif ( set x; as_fn_ret_success y && test x = \"\$1\" )
173b71ad168Smrgthen :
174169a0819Smrg
175b71ad168Smrgelse \$as_nop
176169a0819Smrg  exitcode=1; echo positional parameters were not saved.
177169a0819Smrgfi
17895fdd44cSmrgtest x\$exitcode = x0 || exit 1
179b71ad168Smrgblah=\$(echo \$(echo blah))
180b71ad168Smrgtest x\"\$blah\" = xblah || exit 1
18195fdd44cSmrgtest -x / || exit 1"
182169a0819Smrg  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183169a0819Smrg  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184169a0819Smrg  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185169a0819Smrg  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186169a0819Smrgtest \$(( 1 + 1 )) = 2 || exit 1"
187b71ad168Smrg  if (eval "$as_required") 2>/dev/null
188b71ad168Smrgthen :
189169a0819Smrg  as_have_required=yes
190b71ad168Smrgelse $as_nop
191169a0819Smrg  as_have_required=no
192169a0819Smrgfi
193b71ad168Smrg  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194b71ad168Smrgthen :
195169a0819Smrg
196b71ad168Smrgelse $as_nop
197169a0819Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198169a0819Smrgas_found=false
199169a0819Smrgfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200169a0819Smrgdo
201169a0819Smrg  IFS=$as_save_IFS
202b71ad168Smrg  case $as_dir in #(((
203b71ad168Smrg    '') as_dir=./ ;;
204b71ad168Smrg    */) ;;
205b71ad168Smrg    *) as_dir=$as_dir/ ;;
206b71ad168Smrg  esac
207169a0819Smrg  as_found=:
208169a0819Smrg  case $as_dir in #(
209169a0819Smrg	 /*)
210169a0819Smrg	   for as_base in sh bash ksh sh5; do
211169a0819Smrg	     # Try only shells that exist, to save several forks.
212b71ad168Smrg	     as_shell=$as_dir$as_base
213169a0819Smrg	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
214b71ad168Smrg		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215b71ad168Smrgthen :
216169a0819Smrg  CONFIG_SHELL=$as_shell as_have_required=yes
217b71ad168Smrg		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218b71ad168Smrgthen :
219169a0819Smrg  break 2
220169a0819Smrgfi
221169a0819Smrgfi
222169a0819Smrg	   done;;
223169a0819Smrg       esac
224169a0819Smrg  as_found=false
225169a0819Smrgdone
226169a0819SmrgIFS=$as_save_IFS
227b71ad168Smrgif $as_found
228b71ad168Smrgthen :
229b71ad168Smrg
230b71ad168Smrgelse $as_nop
231b71ad168Smrg  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232b71ad168Smrg	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233b71ad168Smrgthen :
234b71ad168Smrg  CONFIG_SHELL=$SHELL as_have_required=yes
235b71ad168Smrgfi
236b71ad168Smrgfi
237169a0819Smrg
238169a0819Smrg
239b71ad168Smrg      if test "x$CONFIG_SHELL" != x
240b71ad168Smrgthen :
24195fdd44cSmrg  export CONFIG_SHELL
24295fdd44cSmrg             # We cannot yet assume a decent shell, so we have to provide a
24395fdd44cSmrg# neutralization value for shells without unset; and this also
24495fdd44cSmrg# works around shells that cannot unset nonexistent variables.
24595fdd44cSmrg# Preserve -v and -x to the replacement shell.
24695fdd44cSmrgBASH_ENV=/dev/null
24795fdd44cSmrgENV=/dev/null
24895fdd44cSmrg(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
24995fdd44cSmrgcase $- in # ((((
25095fdd44cSmrg  *v*x* | *x*v* ) as_opts=-vx ;;
25195fdd44cSmrg  *v* ) as_opts=-v ;;
25295fdd44cSmrg  *x* ) as_opts=-x ;;
25395fdd44cSmrg  * ) as_opts= ;;
25495fdd44cSmrgesac
25595fdd44cSmrgexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
25695fdd44cSmrg# Admittedly, this is quite paranoid, since all the known shells bail
25795fdd44cSmrg# out after a failed `exec'.
258b71ad168Smrgprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
25995fdd44cSmrgexit 255
260169a0819Smrgfi
261169a0819Smrg
262b71ad168Smrg    if test x$as_have_required = xno
263b71ad168Smrgthen :
264b71ad168Smrg  printf "%s\n" "$0: This script requires a shell more modern than all"
265b71ad168Smrg  printf "%s\n" "$0: the shells that I found on your system."
266b71ad168Smrg  if test ${ZSH_VERSION+y} ; then
267b71ad168Smrg    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268b71ad168Smrg    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
269169a0819Smrg  else
270b71ad168Smrg    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
271b71ad168Smrg$0: https://gitlab.freedesktop.org/xorg/app/xhost/-/issues
272169a0819Smrg$0: about your system, including any error possibly output
273169a0819Smrg$0: before this message. Then install a modern shell, or
274169a0819Smrg$0: manually run the script under such a shell if you do
275169a0819Smrg$0: have one."
276169a0819Smrg  fi
277169a0819Smrg  exit 1
278169a0819Smrgfi
279169a0819Smrgfi
280169a0819Smrgfi
281169a0819SmrgSHELL=${CONFIG_SHELL-/bin/sh}
282169a0819Smrgexport SHELL
283169a0819Smrg# Unset more variables known to interfere with behavior of common tools.
284169a0819SmrgCLICOLOR_FORCE= GREP_OPTIONS=
285169a0819Smrgunset CLICOLOR_FORCE GREP_OPTIONS
286169a0819Smrg
287169a0819Smrg## --------------------- ##
288169a0819Smrg## M4sh Shell Functions. ##
289169a0819Smrg## --------------------- ##
290169a0819Smrg# as_fn_unset VAR
291169a0819Smrg# ---------------
292169a0819Smrg# Portably unset VAR.
293169a0819Smrgas_fn_unset ()
294169a0819Smrg{
295169a0819Smrg  { eval $1=; unset $1;}
296169a0819Smrg}
297169a0819Smrgas_unset=as_fn_unset
298169a0819Smrg
299b71ad168Smrg
300169a0819Smrg# as_fn_set_status STATUS
301169a0819Smrg# -----------------------
302169a0819Smrg# Set $? to STATUS, without forking.
303169a0819Smrgas_fn_set_status ()
304169a0819Smrg{
305169a0819Smrg  return $1
306169a0819Smrg} # as_fn_set_status
307169a0819Smrg
308169a0819Smrg# as_fn_exit STATUS
309169a0819Smrg# -----------------
310169a0819Smrg# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
311169a0819Smrgas_fn_exit ()
312169a0819Smrg{
313169a0819Smrg  set +e
314169a0819Smrg  as_fn_set_status $1
315169a0819Smrg  exit $1
316169a0819Smrg} # as_fn_exit
317b71ad168Smrg# as_fn_nop
318b71ad168Smrg# ---------
319b71ad168Smrg# Do nothing but, unlike ":", preserve the value of $?.
320b71ad168Smrgas_fn_nop ()
321b71ad168Smrg{
322b71ad168Smrg  return $?
323b71ad168Smrg}
324b71ad168Smrgas_nop=as_fn_nop
325169a0819Smrg
326169a0819Smrg# as_fn_mkdir_p
327169a0819Smrg# -------------
328169a0819Smrg# Create "$as_dir" as a directory, including parents if necessary.
329169a0819Smrgas_fn_mkdir_p ()
330169a0819Smrg{
331169a0819Smrg
332169a0819Smrg  case $as_dir in #(
333169a0819Smrg  -*) as_dir=./$as_dir;;
334169a0819Smrg  esac
335169a0819Smrg  test -d "$as_dir" || eval $as_mkdir_p || {
336169a0819Smrg    as_dirs=
337169a0819Smrg    while :; do
338169a0819Smrg      case $as_dir in #(
339b71ad168Smrg      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
340169a0819Smrg      *) as_qdir=$as_dir;;
341169a0819Smrg      esac
342169a0819Smrg      as_dirs="'$as_qdir' $as_dirs"
343169a0819Smrg      as_dir=`$as_dirname -- "$as_dir" ||
344169a0819Smrg$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
345169a0819Smrg	 X"$as_dir" : 'X\(//\)[^/]' \| \
346169a0819Smrg	 X"$as_dir" : 'X\(//\)$' \| \
347169a0819Smrg	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
348b71ad168Smrgprintf "%s\n" X"$as_dir" |
349169a0819Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
350169a0819Smrg	    s//\1/
351169a0819Smrg	    q
352169a0819Smrg	  }
353169a0819Smrg	  /^X\(\/\/\)[^/].*/{
354169a0819Smrg	    s//\1/
355169a0819Smrg	    q
356169a0819Smrg	  }
357169a0819Smrg	  /^X\(\/\/\)$/{
358169a0819Smrg	    s//\1/
359169a0819Smrg	    q
360169a0819Smrg	  }
361169a0819Smrg	  /^X\(\/\).*/{
362169a0819Smrg	    s//\1/
363169a0819Smrg	    q
364169a0819Smrg	  }
365169a0819Smrg	  s/.*/./; q'`
366169a0819Smrg      test -d "$as_dir" && break
367169a0819Smrg    done
368169a0819Smrg    test -z "$as_dirs" || eval "mkdir $as_dirs"
369169a0819Smrg  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
370169a0819Smrg
371169a0819Smrg
372169a0819Smrg} # as_fn_mkdir_p
37395fdd44cSmrg
37495fdd44cSmrg# as_fn_executable_p FILE
37595fdd44cSmrg# -----------------------
37695fdd44cSmrg# Test if FILE is an executable regular file.
37795fdd44cSmrgas_fn_executable_p ()
37895fdd44cSmrg{
37995fdd44cSmrg  test -f "$1" && test -x "$1"
38095fdd44cSmrg} # as_fn_executable_p
381169a0819Smrg# as_fn_append VAR VALUE
382169a0819Smrg# ----------------------
383169a0819Smrg# Append the text in VALUE to the end of the definition contained in VAR. Take
384169a0819Smrg# advantage of any shell optimizations that allow amortized linear growth over
385169a0819Smrg# repeated appends, instead of the typical quadratic growth present in naive
386169a0819Smrg# implementations.
387b71ad168Smrgif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
388b71ad168Smrgthen :
389169a0819Smrg  eval 'as_fn_append ()
390169a0819Smrg  {
391169a0819Smrg    eval $1+=\$2
392169a0819Smrg  }'
393b71ad168Smrgelse $as_nop
394169a0819Smrg  as_fn_append ()
395169a0819Smrg  {
396169a0819Smrg    eval $1=\$$1\$2
397169a0819Smrg  }
398169a0819Smrgfi # as_fn_append
399169a0819Smrg
400169a0819Smrg# as_fn_arith ARG...
401169a0819Smrg# ------------------
402169a0819Smrg# Perform arithmetic evaluation on the ARGs, and store the result in the
403169a0819Smrg# global $as_val. Take advantage of shells that can avoid forks. The arguments
404169a0819Smrg# must be portable across $(()) and expr.
405b71ad168Smrgif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
406b71ad168Smrgthen :
407169a0819Smrg  eval 'as_fn_arith ()
408169a0819Smrg  {
409169a0819Smrg    as_val=$(( $* ))
410169a0819Smrg  }'
411b71ad168Smrgelse $as_nop
412169a0819Smrg  as_fn_arith ()
413169a0819Smrg  {
414169a0819Smrg    as_val=`expr "$@" || test $? -eq 1`
415169a0819Smrg  }
416169a0819Smrgfi # as_fn_arith
417169a0819Smrg
418b71ad168Smrg# as_fn_nop
419b71ad168Smrg# ---------
420b71ad168Smrg# Do nothing but, unlike ":", preserve the value of $?.
421b71ad168Smrgas_fn_nop ()
422b71ad168Smrg{
423b71ad168Smrg  return $?
424b71ad168Smrg}
425b71ad168Smrgas_nop=as_fn_nop
426169a0819Smrg
427169a0819Smrg# as_fn_error STATUS ERROR [LINENO LOG_FD]
428169a0819Smrg# ----------------------------------------
429169a0819Smrg# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
430169a0819Smrg# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
431169a0819Smrg# script with STATUS, using 1 if that was 0.
432169a0819Smrgas_fn_error ()
433169a0819Smrg{
434169a0819Smrg  as_status=$1; test $as_status -eq 0 && as_status=1
435169a0819Smrg  if test "$4"; then
436169a0819Smrg    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
437b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
438169a0819Smrg  fi
439b71ad168Smrg  printf "%s\n" "$as_me: error: $2" >&2
440169a0819Smrg  as_fn_exit $as_status
441169a0819Smrg} # as_fn_error
442169a0819Smrg
44364ce7165Smrgif expr a : '\(a\)' >/dev/null 2>&1 &&
44464ce7165Smrg   test "X`expr 00001 : '.*\(...\)'`" = X001; then
44564ce7165Smrg  as_expr=expr
44664ce7165Smrgelse
44764ce7165Smrg  as_expr=false
44864ce7165Smrgfi
44964ce7165Smrg
45064ce7165Smrgif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
45164ce7165Smrg  as_basename=basename
45264ce7165Smrgelse
45364ce7165Smrg  as_basename=false
45464ce7165Smrgfi
45564ce7165Smrg
456169a0819Smrgif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
457169a0819Smrg  as_dirname=dirname
458169a0819Smrgelse
459169a0819Smrg  as_dirname=false
460169a0819Smrgfi
46164ce7165Smrg
46264ce7165Smrgas_me=`$as_basename -- "$0" ||
46364ce7165Smrg$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
46464ce7165Smrg	 X"$0" : 'X\(//\)$' \| \
46564ce7165Smrg	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
466b71ad168Smrgprintf "%s\n" X/"$0" |
46764ce7165Smrg    sed '/^.*\/\([^/][^/]*\)\/*$/{
46864ce7165Smrg	    s//\1/
46964ce7165Smrg	    q
47064ce7165Smrg	  }
47164ce7165Smrg	  /^X\/\(\/\/\)$/{
47264ce7165Smrg	    s//\1/
47364ce7165Smrg	    q
47464ce7165Smrg	  }
47564ce7165Smrg	  /^X\/\(\/\).*/{
47664ce7165Smrg	    s//\1/
47764ce7165Smrg	    q
47864ce7165Smrg	  }
47964ce7165Smrg	  s/.*/./; q'`
48064ce7165Smrg
481169a0819Smrg# Avoid depending upon Character Ranges.
482169a0819Smrgas_cr_letters='abcdefghijklmnopqrstuvwxyz'
483169a0819Smrgas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
484169a0819Smrgas_cr_Letters=$as_cr_letters$as_cr_LETTERS
485169a0819Smrgas_cr_digits='0123456789'
486169a0819Smrgas_cr_alnum=$as_cr_Letters$as_cr_digits
48764ce7165Smrg
48864ce7165Smrg
489169a0819Smrg  as_lineno_1=$LINENO as_lineno_1a=$LINENO
490169a0819Smrg  as_lineno_2=$LINENO as_lineno_2a=$LINENO
491169a0819Smrg  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
492169a0819Smrg  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
493169a0819Smrg  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
494169a0819Smrg  sed -n '
495169a0819Smrg    p
496169a0819Smrg    /[$]LINENO/=
497169a0819Smrg  ' <$as_myself |
498169a0819Smrg    sed '
499169a0819Smrg      s/[$]LINENO.*/&-/
500169a0819Smrg      t lineno
501169a0819Smrg      b
502169a0819Smrg      :lineno
503169a0819Smrg      N
504169a0819Smrg      :loop
505169a0819Smrg      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
506169a0819Smrg      t loop
507169a0819Smrg      s/-\n.*//
508169a0819Smrg    ' >$as_me.lineno &&
509169a0819Smrg  chmod +x "$as_me.lineno" ||
510b71ad168Smrg    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
51164ce7165Smrg
51295fdd44cSmrg  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
51395fdd44cSmrg  # already done that, so ensure we don't try to do so again and fall
51495fdd44cSmrg  # in an infinite loop.  This has already happened in practice.
51595fdd44cSmrg  _as_can_reexec=no; export _as_can_reexec
516169a0819Smrg  # Don't try to exec as it changes $[0], causing all sort of problems
517169a0819Smrg  # (the dirname of $[0] is not the place where we might find the
518169a0819Smrg  # original and so on.  Autoconf is especially sensitive to this).
519169a0819Smrg  . "./$as_me.lineno"
520169a0819Smrg  # Exit status is that of the last command.
521169a0819Smrg  exit
52264ce7165Smrg}
52364ce7165Smrg
524b71ad168Smrg
525b71ad168Smrg# Determine whether it's possible to make 'echo' print without a newline.
526b71ad168Smrg# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
527b71ad168Smrg# for compatibility with existing Makefiles.
528169a0819SmrgECHO_C= ECHO_N= ECHO_T=
529169a0819Smrgcase `echo -n x` in #(((((
530169a0819Smrg-n*)
531169a0819Smrg  case `echo 'xy\c'` in
532169a0819Smrg  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
533169a0819Smrg  xy)  ECHO_C='\c';;
534169a0819Smrg  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
535169a0819Smrg       ECHO_T='	';;
536169a0819Smrg  esac;;
537169a0819Smrg*)
538169a0819Smrg  ECHO_N='-n';;
539169a0819Smrgesac
54064ce7165Smrg
541b71ad168Smrg# For backward compatibility with old third-party macros, we provide
542b71ad168Smrg# the shell variables $as_echo and $as_echo_n.  New code should use
543b71ad168Smrg# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
544b71ad168Smrgas_echo='printf %s\n'
545b71ad168Smrgas_echo_n='printf %s'
546b71ad168Smrg
547b71ad168Smrg
548169a0819Smrgrm -f conf$$ conf$$.exe conf$$.file
549169a0819Smrgif test -d conf$$.dir; then
550169a0819Smrg  rm -f conf$$.dir/conf$$.file
551169a0819Smrgelse
552169a0819Smrg  rm -f conf$$.dir
553169a0819Smrg  mkdir conf$$.dir 2>/dev/null
55464ce7165Smrgfi
555169a0819Smrgif (echo >conf$$.file) 2>/dev/null; then
556169a0819Smrg  if ln -s conf$$.file conf$$ 2>/dev/null; then
557169a0819Smrg    as_ln_s='ln -s'
558169a0819Smrg    # ... but there are two gotchas:
559169a0819Smrg    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
560169a0819Smrg    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
56195fdd44cSmrg    # In both cases, we have to default to `cp -pR'.
562169a0819Smrg    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
56395fdd44cSmrg      as_ln_s='cp -pR'
564169a0819Smrg  elif ln conf$$.file conf$$ 2>/dev/null; then
565169a0819Smrg    as_ln_s=ln
566169a0819Smrg  else
56795fdd44cSmrg    as_ln_s='cp -pR'
568169a0819Smrg  fi
56964ce7165Smrgelse
57095fdd44cSmrg  as_ln_s='cp -pR'
57164ce7165Smrgfi
572169a0819Smrgrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
573169a0819Smrgrmdir conf$$.dir 2>/dev/null
57464ce7165Smrg
575169a0819Smrgif mkdir -p . 2>/dev/null; then
576169a0819Smrg  as_mkdir_p='mkdir -p "$as_dir"'
577169a0819Smrgelse
578169a0819Smrg  test -d ./-p && rmdir ./-p
579169a0819Smrg  as_mkdir_p=false
58064ce7165Smrgfi
58164ce7165Smrg
58295fdd44cSmrgas_test_x='test -x'
58395fdd44cSmrgas_executable_p=as_fn_executable_p
58464ce7165Smrg
585169a0819Smrg# Sed expression to map a string onto a valid CPP name.
586169a0819Smrgas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
58764ce7165Smrg
588169a0819Smrg# Sed expression to map a string onto a valid variable name.
589169a0819Smrgas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
59064ce7165Smrg
59164ce7165Smrg
592169a0819Smrgtest -n "$DJDIR" || exec 7<&0 </dev/null
593169a0819Smrgexec 6>&1
59464ce7165Smrg
59564ce7165Smrg# Name of the host.
596169a0819Smrg# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
59764ce7165Smrg# so uname gets run too.
59864ce7165Smrgac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
59964ce7165Smrg
60064ce7165Smrg#
60164ce7165Smrg# Initializations.
60264ce7165Smrg#
60364ce7165Smrgac_default_prefix=/usr/local
60464ce7165Smrgac_clean_files=
60564ce7165Smrgac_config_libobj_dir=.
60664ce7165SmrgLIBOBJS=
60764ce7165Smrgcross_compiling=no
60864ce7165Smrgsubdirs=
60964ce7165SmrgMFLAGS=
61064ce7165SmrgMAKEFLAGS=
61164ce7165Smrg
61264ce7165Smrg# Identity of this package.
61364ce7165SmrgPACKAGE_NAME='xhost'
61464ce7165SmrgPACKAGE_TARNAME='xhost'
615b71ad168SmrgPACKAGE_VERSION='1.0.9'
616b71ad168SmrgPACKAGE_STRING='xhost 1.0.9'
617b71ad168SmrgPACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/app/xhost/-/issues'
618169a0819SmrgPACKAGE_URL=''
61964ce7165Smrg
6203544ea2eSmrgac_unique_file="Makefile.am"
621fb23d3a8Smrg# Factoring default headers for most tests.
622fb23d3a8Smrgac_includes_default="\
623b71ad168Smrg#include <stddef.h>
624b71ad168Smrg#ifdef HAVE_STDIO_H
625b71ad168Smrg# include <stdio.h>
626fb23d3a8Smrg#endif
627b71ad168Smrg#ifdef HAVE_STDLIB_H
628fb23d3a8Smrg# include <stdlib.h>
629fb23d3a8Smrg#endif
630fb23d3a8Smrg#ifdef HAVE_STRING_H
631fb23d3a8Smrg# include <string.h>
632fb23d3a8Smrg#endif
633fb23d3a8Smrg#ifdef HAVE_INTTYPES_H
634fb23d3a8Smrg# include <inttypes.h>
635fb23d3a8Smrg#endif
636fb23d3a8Smrg#ifdef HAVE_STDINT_H
637fb23d3a8Smrg# include <stdint.h>
638fb23d3a8Smrg#endif
639b71ad168Smrg#ifdef HAVE_STRINGS_H
640b71ad168Smrg# include <strings.h>
641b71ad168Smrg#endif
642b71ad168Smrg#ifdef HAVE_SYS_TYPES_H
643b71ad168Smrg# include <sys/types.h>
644b71ad168Smrg#endif
645b71ad168Smrg#ifdef HAVE_SYS_STAT_H
646b71ad168Smrg# include <sys/stat.h>
647b71ad168Smrg#endif
648fb23d3a8Smrg#ifdef HAVE_UNISTD_H
649fb23d3a8Smrg# include <unistd.h>
650fb23d3a8Smrg#endif"
651fb23d3a8Smrg
652b71ad168Smrgac_header_c_list=
653fb23d3a8Smrgac_subst_vars='am__EXEEXT_FALSE
654fb23d3a8Smrgam__EXEEXT_TRUE
655fb23d3a8SmrgLTLIBOBJS
656fb23d3a8SmrgLIBOBJS
657b71ad168SmrgUSE_GETTEXT_FALSE
658b71ad168SmrgUSE_GETTEXT_TRUE
659b71ad168SmrgLOCALEDIR
6603544ea2eSmrgXAU_LIBS
6613544ea2eSmrgXAU_CFLAGS
66264ce7165SmrgXHOST_LIBS
663fb23d3a8SmrgXHOST_CFLAGS
664169a0819SmrgMAN_SUBSTS
665169a0819SmrgXORG_MAN_PAGE
66664ce7165SmrgADMIN_MAN_DIR
667fb23d3a8SmrgDRIVER_MAN_DIR
668fb23d3a8SmrgMISC_MAN_DIR
669fb23d3a8SmrgFILE_MAN_DIR
670fb23d3a8SmrgLIB_MAN_DIR
671fb23d3a8SmrgAPP_MAN_DIR
672fb23d3a8SmrgADMIN_MAN_SUFFIX
673fb23d3a8SmrgDRIVER_MAN_SUFFIX
674fb23d3a8SmrgMISC_MAN_SUFFIX
675fb23d3a8SmrgFILE_MAN_SUFFIX
676fb23d3a8SmrgLIB_MAN_SUFFIX
677fb23d3a8SmrgAPP_MAN_SUFFIX
678169a0819SmrgSED
679fb23d3a8Smrghost_os
680fb23d3a8Smrghost_vendor
681fb23d3a8Smrghost_cpu
682fb23d3a8Smrghost
683fb23d3a8Smrgbuild_os
684fb23d3a8Smrgbuild_vendor
685fb23d3a8Smrgbuild_cpu
686fb23d3a8Smrgbuild
687169a0819SmrgINSTALL_CMD
688aadd013eSmrgPKG_CONFIG_LIBDIR
689aadd013eSmrgPKG_CONFIG_PATH
690169a0819SmrgPKG_CONFIG
691fb23d3a8SmrgCHANGELOG_CMD
6923544ea2eSmrgSTRICT_CFLAGS
693fb23d3a8SmrgCWARNFLAGS
6943544ea2eSmrgBASE_CFLAGS
695fb23d3a8Smrgam__fastdepCC_FALSE
696fb23d3a8Smrgam__fastdepCC_TRUE
697fb23d3a8SmrgCCDEPMODE
69881440437Smrgam__nodep
699fb23d3a8SmrgAMDEPBACKSLASH
700fb23d3a8SmrgAMDEP_FALSE
701fb23d3a8SmrgAMDEP_TRUE
702fb23d3a8Smrgam__include
703fb23d3a8SmrgDEPDIR
704fb23d3a8SmrgOBJEXT
705fb23d3a8SmrgEXEEXT
706fb23d3a8Smrgac_ct_CC
707fb23d3a8SmrgCPPFLAGS
708fb23d3a8SmrgLDFLAGS
709fb23d3a8SmrgCFLAGS
710fb23d3a8SmrgCC
71181440437SmrgAM_BACKSLASH
71281440437SmrgAM_DEFAULT_VERBOSITY
71381440437SmrgAM_DEFAULT_V
71481440437SmrgAM_V
715b71ad168SmrgCSCOPE
716b71ad168SmrgETAGS
717b71ad168SmrgCTAGS
718fb23d3a8Smrgam__untar
719fb23d3a8Smrgam__tar
720fb23d3a8SmrgAMTAR
721fb23d3a8Smrgam__leading_dot
722fb23d3a8SmrgSET_MAKE
723fb23d3a8SmrgAWK
724fb23d3a8Smrgmkdir_p
725fb23d3a8SmrgMKDIR_P
726fb23d3a8SmrgINSTALL_STRIP_PROGRAM
727fb23d3a8SmrgSTRIP
728fb23d3a8Smrginstall_sh
729fb23d3a8SmrgMAKEINFO
730fb23d3a8SmrgAUTOHEADER
731fb23d3a8SmrgAUTOMAKE
732fb23d3a8SmrgAUTOCONF
733fb23d3a8SmrgACLOCAL
734fb23d3a8SmrgVERSION
735fb23d3a8SmrgPACKAGE
736fb23d3a8SmrgCYGPATH_W
737fb23d3a8Smrgam__isrc
738fb23d3a8SmrgINSTALL_DATA
739fb23d3a8SmrgINSTALL_SCRIPT
740fb23d3a8SmrgINSTALL_PROGRAM
741fb23d3a8Smrgtarget_alias
742fb23d3a8Smrghost_alias
743fb23d3a8Smrgbuild_alias
744fb23d3a8SmrgLIBS
745fb23d3a8SmrgECHO_T
746fb23d3a8SmrgECHO_N
747fb23d3a8SmrgECHO_C
748fb23d3a8SmrgDEFS
749fb23d3a8Smrgmandir
750fb23d3a8Smrglocaledir
751fb23d3a8Smrglibdir
752fb23d3a8Smrgpsdir
753fb23d3a8Smrgpdfdir
754fb23d3a8Smrgdvidir
755fb23d3a8Smrghtmldir
756fb23d3a8Smrginfodir
757fb23d3a8Smrgdocdir
758fb23d3a8Smrgoldincludedir
759fb23d3a8Smrgincludedir
760b71ad168Smrgrunstatedir
761fb23d3a8Smrglocalstatedir
762fb23d3a8Smrgsharedstatedir
763fb23d3a8Smrgsysconfdir
764fb23d3a8Smrgdatadir
765fb23d3a8Smrgdatarootdir
766fb23d3a8Smrglibexecdir
767fb23d3a8Smrgsbindir
768fb23d3a8Smrgbindir
769fb23d3a8Smrgprogram_transform_name
770fb23d3a8Smrgprefix
771fb23d3a8Smrgexec_prefix
772169a0819SmrgPACKAGE_URL
773fb23d3a8SmrgPACKAGE_BUGREPORT
774fb23d3a8SmrgPACKAGE_STRING
775fb23d3a8SmrgPACKAGE_VERSION
776fb23d3a8SmrgPACKAGE_TARNAME
777fb23d3a8SmrgPACKAGE_NAME
778fb23d3a8SmrgPATH_SEPARATOR
779b71ad168SmrgSHELL
780b71ad168Smrgam__quote'
78164ce7165Smrgac_subst_files=''
782fb23d3a8Smrgac_user_opts='
783fb23d3a8Smrgenable_option_checking
78481440437Smrgenable_silent_rules
785fb23d3a8Smrgenable_dependency_tracking
7863544ea2eSmrgenable_selective_werror
787fb23d3a8Smrgenable_strict_compilation
788fb23d3a8Smrgenable_unix_transport
789fb23d3a8Smrgenable_tcp_transport
790fb23d3a8Smrgenable_ipv6
791fb23d3a8Smrgenable_local_transport
792fb23d3a8Smrgenable_secure_rpc
793b71ad168Smrgwith_localedir
794fb23d3a8Smrg'
79564ce7165Smrg      ac_precious_vars='build_alias
79664ce7165Smrghost_alias
79764ce7165Smrgtarget_alias
79864ce7165SmrgCC
79964ce7165SmrgCFLAGS
80064ce7165SmrgLDFLAGS
80164ce7165SmrgLIBS
80264ce7165SmrgCPPFLAGS
80364ce7165SmrgPKG_CONFIG
804aadd013eSmrgPKG_CONFIG_PATH
805aadd013eSmrgPKG_CONFIG_LIBDIR
80664ce7165SmrgXHOST_CFLAGS
8073544ea2eSmrgXHOST_LIBS
8083544ea2eSmrgXAU_CFLAGS
8093544ea2eSmrgXAU_LIBS'
81064ce7165Smrg
81164ce7165Smrg
81264ce7165Smrg# Initialize some variables set by options.
81364ce7165Smrgac_init_help=
81464ce7165Smrgac_init_version=false
815fb23d3a8Smrgac_unrecognized_opts=
816fb23d3a8Smrgac_unrecognized_sep=
81764ce7165Smrg# The variables have the same names as the options, with
81864ce7165Smrg# dashes changed to underlines.
81964ce7165Smrgcache_file=/dev/null
82064ce7165Smrgexec_prefix=NONE
82164ce7165Smrgno_create=
82264ce7165Smrgno_recursion=
82364ce7165Smrgprefix=NONE
82464ce7165Smrgprogram_prefix=NONE
82564ce7165Smrgprogram_suffix=NONE
82664ce7165Smrgprogram_transform_name=s,x,x,
82764ce7165Smrgsilent=
82864ce7165Smrgsite=
82964ce7165Smrgsrcdir=
83064ce7165Smrgverbose=
83164ce7165Smrgx_includes=NONE
83264ce7165Smrgx_libraries=NONE
83364ce7165Smrg
83464ce7165Smrg# Installation directory options.
83564ce7165Smrg# These are left unexpanded so users can "make install exec_prefix=/foo"
83664ce7165Smrg# and all the variables that are supposed to be based on exec_prefix
83764ce7165Smrg# by default will actually change.
83864ce7165Smrg# Use braces instead of parens because sh, perl, etc. also accept them.
83964ce7165Smrg# (The list follows the same order as the GNU Coding Standards.)
84064ce7165Smrgbindir='${exec_prefix}/bin'
84164ce7165Smrgsbindir='${exec_prefix}/sbin'
84264ce7165Smrglibexecdir='${exec_prefix}/libexec'
84364ce7165Smrgdatarootdir='${prefix}/share'
84464ce7165Smrgdatadir='${datarootdir}'
84564ce7165Smrgsysconfdir='${prefix}/etc'
84664ce7165Smrgsharedstatedir='${prefix}/com'
84764ce7165Smrglocalstatedir='${prefix}/var'
848b71ad168Smrgrunstatedir='${localstatedir}/run'
84964ce7165Smrgincludedir='${prefix}/include'
85064ce7165Smrgoldincludedir='/usr/include'
85164ce7165Smrgdocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
85264ce7165Smrginfodir='${datarootdir}/info'
85364ce7165Smrghtmldir='${docdir}'
85464ce7165Smrgdvidir='${docdir}'
85564ce7165Smrgpdfdir='${docdir}'
85664ce7165Smrgpsdir='${docdir}'
85764ce7165Smrglibdir='${exec_prefix}/lib'
85864ce7165Smrglocaledir='${datarootdir}/locale'
85964ce7165Smrgmandir='${datarootdir}/man'
86064ce7165Smrg
86164ce7165Smrgac_prev=
86264ce7165Smrgac_dashdash=
86364ce7165Smrgfor ac_option
86464ce7165Smrgdo
86564ce7165Smrg  # If the previous option needs an argument, assign it.
86664ce7165Smrg  if test -n "$ac_prev"; then
86764ce7165Smrg    eval $ac_prev=\$ac_option
86864ce7165Smrg    ac_prev=
86964ce7165Smrg    continue
87064ce7165Smrg  fi
87164ce7165Smrg
87264ce7165Smrg  case $ac_option in
873169a0819Smrg  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
874169a0819Smrg  *=)   ac_optarg= ;;
875169a0819Smrg  *)    ac_optarg=yes ;;
87664ce7165Smrg  esac
87764ce7165Smrg
87864ce7165Smrg  case $ac_dashdash$ac_option in
87964ce7165Smrg  --)
88064ce7165Smrg    ac_dashdash=yes ;;
88164ce7165Smrg
88264ce7165Smrg  -bindir | --bindir | --bindi | --bind | --bin | --bi)
88364ce7165Smrg    ac_prev=bindir ;;
88464ce7165Smrg  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
88564ce7165Smrg    bindir=$ac_optarg ;;
88664ce7165Smrg
88764ce7165Smrg  -build | --build | --buil | --bui | --bu)
88864ce7165Smrg    ac_prev=build_alias ;;
88964ce7165Smrg  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
89064ce7165Smrg    build_alias=$ac_optarg ;;
89164ce7165Smrg
89264ce7165Smrg  -cache-file | --cache-file | --cache-fil | --cache-fi \
89364ce7165Smrg  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89464ce7165Smrg    ac_prev=cache_file ;;
89564ce7165Smrg  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
89664ce7165Smrg  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
89764ce7165Smrg    cache_file=$ac_optarg ;;
89864ce7165Smrg
89964ce7165Smrg  --config-cache | -C)
90064ce7165Smrg    cache_file=config.cache ;;
90164ce7165Smrg
90264ce7165Smrg  -datadir | --datadir | --datadi | --datad)
90364ce7165Smrg    ac_prev=datadir ;;
90464ce7165Smrg  -datadir=* | --datadir=* | --datadi=* | --datad=*)
90564ce7165Smrg    datadir=$ac_optarg ;;
90664ce7165Smrg
90764ce7165Smrg  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
90864ce7165Smrg  | --dataroo | --dataro | --datar)
90964ce7165Smrg    ac_prev=datarootdir ;;
91064ce7165Smrg  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
91164ce7165Smrg  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
91264ce7165Smrg    datarootdir=$ac_optarg ;;
91364ce7165Smrg
91464ce7165Smrg  -disable-* | --disable-*)
915fb23d3a8Smrg    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
91664ce7165Smrg    # Reject names that are not valid shell variable names.
917fb23d3a8Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
918b71ad168Smrg      as_fn_error $? "invalid feature name: \`$ac_useropt'"
919fb23d3a8Smrg    ac_useropt_orig=$ac_useropt
920b71ad168Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
921fb23d3a8Smrg    case $ac_user_opts in
922fb23d3a8Smrg      *"
923fb23d3a8Smrg"enable_$ac_useropt"
924fb23d3a8Smrg"*) ;;
925fb23d3a8Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
926fb23d3a8Smrg	 ac_unrecognized_sep=', ';;
927fb23d3a8Smrg    esac
928fb23d3a8Smrg    eval enable_$ac_useropt=no ;;
92964ce7165Smrg
93064ce7165Smrg  -docdir | --docdir | --docdi | --doc | --do)
93164ce7165Smrg    ac_prev=docdir ;;
93264ce7165Smrg  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
93364ce7165Smrg    docdir=$ac_optarg ;;
93464ce7165Smrg
93564ce7165Smrg  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
93664ce7165Smrg    ac_prev=dvidir ;;
93764ce7165Smrg  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
93864ce7165Smrg    dvidir=$ac_optarg ;;
93964ce7165Smrg
94064ce7165Smrg  -enable-* | --enable-*)
941fb23d3a8Smrg    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
94264ce7165Smrg    # Reject names that are not valid shell variable names.
943fb23d3a8Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
944b71ad168Smrg      as_fn_error $? "invalid feature name: \`$ac_useropt'"
945fb23d3a8Smrg    ac_useropt_orig=$ac_useropt
946b71ad168Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
947fb23d3a8Smrg    case $ac_user_opts in
948fb23d3a8Smrg      *"
949fb23d3a8Smrg"enable_$ac_useropt"
950fb23d3a8Smrg"*) ;;
951fb23d3a8Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
952fb23d3a8Smrg	 ac_unrecognized_sep=', ';;
953fb23d3a8Smrg    esac
954fb23d3a8Smrg    eval enable_$ac_useropt=\$ac_optarg ;;
95564ce7165Smrg
95664ce7165Smrg  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
95764ce7165Smrg  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
95864ce7165Smrg  | --exec | --exe | --ex)
95964ce7165Smrg    ac_prev=exec_prefix ;;
96064ce7165Smrg  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
96164ce7165Smrg  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
96264ce7165Smrg  | --exec=* | --exe=* | --ex=*)
96364ce7165Smrg    exec_prefix=$ac_optarg ;;
96464ce7165Smrg
96564ce7165Smrg  -gas | --gas | --ga | --g)
96664ce7165Smrg    # Obsolete; use --with-gas.
96764ce7165Smrg    with_gas=yes ;;
96864ce7165Smrg
96964ce7165Smrg  -help | --help | --hel | --he | -h)
97064ce7165Smrg    ac_init_help=long ;;
97164ce7165Smrg  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
97264ce7165Smrg    ac_init_help=recursive ;;
97364ce7165Smrg  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
97464ce7165Smrg    ac_init_help=short ;;
97564ce7165Smrg
97664ce7165Smrg  -host | --host | --hos | --ho)
97764ce7165Smrg    ac_prev=host_alias ;;
97864ce7165Smrg  -host=* | --host=* | --hos=* | --ho=*)
97964ce7165Smrg    host_alias=$ac_optarg ;;
98064ce7165Smrg
98164ce7165Smrg  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
98264ce7165Smrg    ac_prev=htmldir ;;
98364ce7165Smrg  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
98464ce7165Smrg  | --ht=*)
98564ce7165Smrg    htmldir=$ac_optarg ;;
98664ce7165Smrg
98764ce7165Smrg  -includedir | --includedir | --includedi | --included | --include \
98864ce7165Smrg  | --includ | --inclu | --incl | --inc)
98964ce7165Smrg    ac_prev=includedir ;;
99064ce7165Smrg  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
99164ce7165Smrg  | --includ=* | --inclu=* | --incl=* | --inc=*)
99264ce7165Smrg    includedir=$ac_optarg ;;
99364ce7165Smrg
99464ce7165Smrg  -infodir | --infodir | --infodi | --infod | --info | --inf)
99564ce7165Smrg    ac_prev=infodir ;;
99664ce7165Smrg  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
99764ce7165Smrg    infodir=$ac_optarg ;;
99864ce7165Smrg
99964ce7165Smrg  -libdir | --libdir | --libdi | --libd)
100064ce7165Smrg    ac_prev=libdir ;;
100164ce7165Smrg  -libdir=* | --libdir=* | --libdi=* | --libd=*)
100264ce7165Smrg    libdir=$ac_optarg ;;
100364ce7165Smrg
100464ce7165Smrg  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
100564ce7165Smrg  | --libexe | --libex | --libe)
100664ce7165Smrg    ac_prev=libexecdir ;;
100764ce7165Smrg  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
100864ce7165Smrg  | --libexe=* | --libex=* | --libe=*)
100964ce7165Smrg    libexecdir=$ac_optarg ;;
101064ce7165Smrg
101164ce7165Smrg  -localedir | --localedir | --localedi | --localed | --locale)
101264ce7165Smrg    ac_prev=localedir ;;
101364ce7165Smrg  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
101464ce7165Smrg    localedir=$ac_optarg ;;
101564ce7165Smrg
101664ce7165Smrg  -localstatedir | --localstatedir | --localstatedi | --localstated \
101764ce7165Smrg  | --localstate | --localstat | --localsta | --localst | --locals)
101864ce7165Smrg    ac_prev=localstatedir ;;
101964ce7165Smrg  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
102064ce7165Smrg  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
102164ce7165Smrg    localstatedir=$ac_optarg ;;
102264ce7165Smrg
102364ce7165Smrg  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
102464ce7165Smrg    ac_prev=mandir ;;
102564ce7165Smrg  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
102664ce7165Smrg    mandir=$ac_optarg ;;
102764ce7165Smrg
102864ce7165Smrg  -nfp | --nfp | --nf)
102964ce7165Smrg    # Obsolete; use --without-fp.
103064ce7165Smrg    with_fp=no ;;
103164ce7165Smrg
103264ce7165Smrg  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
103364ce7165Smrg  | --no-cr | --no-c | -n)
103464ce7165Smrg    no_create=yes ;;
103564ce7165Smrg
103664ce7165Smrg  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
103764ce7165Smrg  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
103864ce7165Smrg    no_recursion=yes ;;
103964ce7165Smrg
104064ce7165Smrg  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
104164ce7165Smrg  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
104264ce7165Smrg  | --oldin | --oldi | --old | --ol | --o)
104364ce7165Smrg    ac_prev=oldincludedir ;;
104464ce7165Smrg  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
104564ce7165Smrg  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
104664ce7165Smrg  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
104764ce7165Smrg    oldincludedir=$ac_optarg ;;
104864ce7165Smrg
104964ce7165Smrg  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
105064ce7165Smrg    ac_prev=prefix ;;
105164ce7165Smrg  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
105264ce7165Smrg    prefix=$ac_optarg ;;
105364ce7165Smrg
105464ce7165Smrg  -program-prefix | --program-prefix | --program-prefi | --program-pref \
105564ce7165Smrg  | --program-pre | --program-pr | --program-p)
105664ce7165Smrg    ac_prev=program_prefix ;;
105764ce7165Smrg  -program-prefix=* | --program-prefix=* | --program-prefi=* \
105864ce7165Smrg  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
105964ce7165Smrg    program_prefix=$ac_optarg ;;
106064ce7165Smrg
106164ce7165Smrg  -program-suffix | --program-suffix | --program-suffi | --program-suff \
106264ce7165Smrg  | --program-suf | --program-su | --program-s)
106364ce7165Smrg    ac_prev=program_suffix ;;
106464ce7165Smrg  -program-suffix=* | --program-suffix=* | --program-suffi=* \
106564ce7165Smrg  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
106664ce7165Smrg    program_suffix=$ac_optarg ;;
106764ce7165Smrg
106864ce7165Smrg  -program-transform-name | --program-transform-name \
106964ce7165Smrg  | --program-transform-nam | --program-transform-na \
107064ce7165Smrg  | --program-transform-n | --program-transform- \
107164ce7165Smrg  | --program-transform | --program-transfor \
107264ce7165Smrg  | --program-transfo | --program-transf \
107364ce7165Smrg  | --program-trans | --program-tran \
107464ce7165Smrg  | --progr-tra | --program-tr | --program-t)
107564ce7165Smrg    ac_prev=program_transform_name ;;
107664ce7165Smrg  -program-transform-name=* | --program-transform-name=* \
107764ce7165Smrg  | --program-transform-nam=* | --program-transform-na=* \
107864ce7165Smrg  | --program-transform-n=* | --program-transform-=* \
107964ce7165Smrg  | --program-transform=* | --program-transfor=* \
108064ce7165Smrg  | --program-transfo=* | --program-transf=* \
108164ce7165Smrg  | --program-trans=* | --program-tran=* \
108264ce7165Smrg  | --progr-tra=* | --program-tr=* | --program-t=*)
108364ce7165Smrg    program_transform_name=$ac_optarg ;;
108464ce7165Smrg
108564ce7165Smrg  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
108664ce7165Smrg    ac_prev=pdfdir ;;
108764ce7165Smrg  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
108864ce7165Smrg    pdfdir=$ac_optarg ;;
108964ce7165Smrg
109064ce7165Smrg  -psdir | --psdir | --psdi | --psd | --ps)
109164ce7165Smrg    ac_prev=psdir ;;
109264ce7165Smrg  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
109364ce7165Smrg    psdir=$ac_optarg ;;
109464ce7165Smrg
109564ce7165Smrg  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
109664ce7165Smrg  | -silent | --silent | --silen | --sile | --sil)
109764ce7165Smrg    silent=yes ;;
109864ce7165Smrg
1099b71ad168Smrg  -runstatedir | --runstatedir | --runstatedi | --runstated \
1100b71ad168Smrg  | --runstate | --runstat | --runsta | --runst | --runs \
1101b71ad168Smrg  | --run | --ru | --r)
1102b71ad168Smrg    ac_prev=runstatedir ;;
1103b71ad168Smrg  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1104b71ad168Smrg  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1105b71ad168Smrg  | --run=* | --ru=* | --r=*)
1106b71ad168Smrg    runstatedir=$ac_optarg ;;
1107b71ad168Smrg
110864ce7165Smrg  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
110964ce7165Smrg    ac_prev=sbindir ;;
111064ce7165Smrg  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
111164ce7165Smrg  | --sbi=* | --sb=*)
111264ce7165Smrg    sbindir=$ac_optarg ;;
111364ce7165Smrg
111464ce7165Smrg  -sharedstatedir | --sharedstatedir | --sharedstatedi \
111564ce7165Smrg  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
111664ce7165Smrg  | --sharedst | --shareds | --shared | --share | --shar \
111764ce7165Smrg  | --sha | --sh)
111864ce7165Smrg    ac_prev=sharedstatedir ;;
111964ce7165Smrg  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
112064ce7165Smrg  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
112164ce7165Smrg  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
112264ce7165Smrg  | --sha=* | --sh=*)
112364ce7165Smrg    sharedstatedir=$ac_optarg ;;
112464ce7165Smrg
112564ce7165Smrg  -site | --site | --sit)
112664ce7165Smrg    ac_prev=site ;;
112764ce7165Smrg  -site=* | --site=* | --sit=*)
112864ce7165Smrg    site=$ac_optarg ;;
112964ce7165Smrg
113064ce7165Smrg  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
113164ce7165Smrg    ac_prev=srcdir ;;
113264ce7165Smrg  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
113364ce7165Smrg    srcdir=$ac_optarg ;;
113464ce7165Smrg
113564ce7165Smrg  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
113664ce7165Smrg  | --syscon | --sysco | --sysc | --sys | --sy)
113764ce7165Smrg    ac_prev=sysconfdir ;;
113864ce7165Smrg  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
113964ce7165Smrg  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
114064ce7165Smrg    sysconfdir=$ac_optarg ;;
114164ce7165Smrg
114264ce7165Smrg  -target | --target | --targe | --targ | --tar | --ta | --t)
114364ce7165Smrg    ac_prev=target_alias ;;
114464ce7165Smrg  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
114564ce7165Smrg    target_alias=$ac_optarg ;;
114664ce7165Smrg
114764ce7165Smrg  -v | -verbose | --verbose | --verbos | --verbo | --verb)
114864ce7165Smrg    verbose=yes ;;
114964ce7165Smrg
115064ce7165Smrg  -version | --version | --versio | --versi | --vers | -V)
115164ce7165Smrg    ac_init_version=: ;;
115264ce7165Smrg
115364ce7165Smrg  -with-* | --with-*)
1154fb23d3a8Smrg    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
115564ce7165Smrg    # Reject names that are not valid shell variable names.
1156fb23d3a8Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1157b71ad168Smrg      as_fn_error $? "invalid package name: \`$ac_useropt'"
1158fb23d3a8Smrg    ac_useropt_orig=$ac_useropt
1159b71ad168Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1160fb23d3a8Smrg    case $ac_user_opts in
1161fb23d3a8Smrg      *"
1162fb23d3a8Smrg"with_$ac_useropt"
1163fb23d3a8Smrg"*) ;;
1164fb23d3a8Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1165fb23d3a8Smrg	 ac_unrecognized_sep=', ';;
1166fb23d3a8Smrg    esac
1167fb23d3a8Smrg    eval with_$ac_useropt=\$ac_optarg ;;
116864ce7165Smrg
116964ce7165Smrg  -without-* | --without-*)
1170fb23d3a8Smrg    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
117164ce7165Smrg    # Reject names that are not valid shell variable names.
1172fb23d3a8Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1173b71ad168Smrg      as_fn_error $? "invalid package name: \`$ac_useropt'"
1174fb23d3a8Smrg    ac_useropt_orig=$ac_useropt
1175b71ad168Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1176fb23d3a8Smrg    case $ac_user_opts in
1177fb23d3a8Smrg      *"
1178fb23d3a8Smrg"with_$ac_useropt"
1179fb23d3a8Smrg"*) ;;
1180fb23d3a8Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1181fb23d3a8Smrg	 ac_unrecognized_sep=', ';;
1182fb23d3a8Smrg    esac
1183fb23d3a8Smrg    eval with_$ac_useropt=no ;;
118464ce7165Smrg
118564ce7165Smrg  --x)
118664ce7165Smrg    # Obsolete; use --with-x.
118764ce7165Smrg    with_x=yes ;;
118864ce7165Smrg
118964ce7165Smrg  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
119064ce7165Smrg  | --x-incl | --x-inc | --x-in | --x-i)
119164ce7165Smrg    ac_prev=x_includes ;;
119264ce7165Smrg  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
119364ce7165Smrg  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
119464ce7165Smrg    x_includes=$ac_optarg ;;
119564ce7165Smrg
119664ce7165Smrg  -x-libraries | --x-libraries | --x-librarie | --x-librari \
119764ce7165Smrg  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
119864ce7165Smrg    ac_prev=x_libraries ;;
119964ce7165Smrg  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
120064ce7165Smrg  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
120164ce7165Smrg    x_libraries=$ac_optarg ;;
120264ce7165Smrg
1203169a0819Smrg  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1204169a0819SmrgTry \`$0 --help' for more information"
120564ce7165Smrg    ;;
120664ce7165Smrg
120764ce7165Smrg  *=*)
120864ce7165Smrg    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
120964ce7165Smrg    # Reject names that are not valid shell variable names.
1210169a0819Smrg    case $ac_envvar in #(
1211169a0819Smrg      '' | [0-9]* | *[!_$as_cr_alnum]* )
1212169a0819Smrg      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1213169a0819Smrg    esac
121464ce7165Smrg    eval $ac_envvar=\$ac_optarg
121564ce7165Smrg    export $ac_envvar ;;
121664ce7165Smrg
121764ce7165Smrg  *)
121864ce7165Smrg    # FIXME: should be removed in autoconf 3.0.
1219b71ad168Smrg    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
122064ce7165Smrg    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1221b71ad168Smrg      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1222169a0819Smrg    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
122364ce7165Smrg    ;;
122464ce7165Smrg
122564ce7165Smrg  esac
122664ce7165Smrgdone
122764ce7165Smrg
122864ce7165Smrgif test -n "$ac_prev"; then
122964ce7165Smrg  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1230169a0819Smrg  as_fn_error $? "missing argument to $ac_option"
123164ce7165Smrgfi
123264ce7165Smrg
1233fb23d3a8Smrgif test -n "$ac_unrecognized_opts"; then
1234fb23d3a8Smrg  case $enable_option_checking in
1235fb23d3a8Smrg    no) ;;
1236169a0819Smrg    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1237b71ad168Smrg    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1238fb23d3a8Smrg  esac
1239fb23d3a8Smrgfi
1240fb23d3a8Smrg
1241fb23d3a8Smrg# Check all directory arguments for consistency.
124264ce7165Smrgfor ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
124364ce7165Smrg		datadir sysconfdir sharedstatedir localstatedir includedir \
124464ce7165Smrg		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1245b71ad168Smrg		libdir localedir mandir runstatedir
124664ce7165Smrgdo
124764ce7165Smrg  eval ac_val=\$$ac_var
1248fb23d3a8Smrg  # Remove trailing slashes.
1249fb23d3a8Smrg  case $ac_val in
1250fb23d3a8Smrg    */ )
1251fb23d3a8Smrg      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1252fb23d3a8Smrg      eval $ac_var=\$ac_val;;
1253fb23d3a8Smrg  esac
1254fb23d3a8Smrg  # Be sure to have absolute directory names.
125564ce7165Smrg  case $ac_val in
125664ce7165Smrg    [\\/$]* | ?:[\\/]* )  continue;;
125764ce7165Smrg    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
125864ce7165Smrg  esac
1259169a0819Smrg  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
126064ce7165Smrgdone
126164ce7165Smrg
126264ce7165Smrg# There might be people who depend on the old broken behavior: `$host'
126364ce7165Smrg# used to hold the argument of --host etc.
126464ce7165Smrg# FIXME: To remove some day.
126564ce7165Smrgbuild=$build_alias
126664ce7165Smrghost=$host_alias
126764ce7165Smrgtarget=$target_alias
126864ce7165Smrg
126964ce7165Smrg# FIXME: To remove some day.
127064ce7165Smrgif test "x$host_alias" != x; then
127164ce7165Smrg  if test "x$build_alias" = x; then
127264ce7165Smrg    cross_compiling=maybe
127364ce7165Smrg  elif test "x$build_alias" != "x$host_alias"; then
127464ce7165Smrg    cross_compiling=yes
127564ce7165Smrg  fi
127664ce7165Smrgfi
127764ce7165Smrg
127864ce7165Smrgac_tool_prefix=
127964ce7165Smrgtest -n "$host_alias" && ac_tool_prefix=$host_alias-
128064ce7165Smrg
128164ce7165Smrgtest "$silent" = yes && exec 6>/dev/null
128264ce7165Smrg
128364ce7165Smrg
128464ce7165Smrgac_pwd=`pwd` && test -n "$ac_pwd" &&
128564ce7165Smrgac_ls_di=`ls -di .` &&
128664ce7165Smrgac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1287169a0819Smrg  as_fn_error $? "working directory cannot be determined"
128864ce7165Smrgtest "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1289169a0819Smrg  as_fn_error $? "pwd does not report name of working directory"
129064ce7165Smrg
129164ce7165Smrg
129264ce7165Smrg# Find the source files, if location was not specified.
129364ce7165Smrgif test -z "$srcdir"; then
129464ce7165Smrg  ac_srcdir_defaulted=yes
129564ce7165Smrg  # Try the directory containing this script, then the parent directory.
1296fb23d3a8Smrg  ac_confdir=`$as_dirname -- "$as_myself" ||
1297fb23d3a8Smrg$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1298fb23d3a8Smrg	 X"$as_myself" : 'X\(//\)[^/]' \| \
1299fb23d3a8Smrg	 X"$as_myself" : 'X\(//\)$' \| \
1300fb23d3a8Smrg	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1301b71ad168Smrgprintf "%s\n" X"$as_myself" |
130264ce7165Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
130364ce7165Smrg	    s//\1/
130464ce7165Smrg	    q
130564ce7165Smrg	  }
130664ce7165Smrg	  /^X\(\/\/\)[^/].*/{
130764ce7165Smrg	    s//\1/
130864ce7165Smrg	    q
130964ce7165Smrg	  }
131064ce7165Smrg	  /^X\(\/\/\)$/{
131164ce7165Smrg	    s//\1/
131264ce7165Smrg	    q
131364ce7165Smrg	  }
131464ce7165Smrg	  /^X\(\/\).*/{
131564ce7165Smrg	    s//\1/
131664ce7165Smrg	    q
131764ce7165Smrg	  }
131864ce7165Smrg	  s/.*/./; q'`
131964ce7165Smrg  srcdir=$ac_confdir
132064ce7165Smrg  if test ! -r "$srcdir/$ac_unique_file"; then
132164ce7165Smrg    srcdir=..
132264ce7165Smrg  fi
132364ce7165Smrgelse
132464ce7165Smrg  ac_srcdir_defaulted=no
132564ce7165Smrgfi
132664ce7165Smrgif test ! -r "$srcdir/$ac_unique_file"; then
132764ce7165Smrg  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1328169a0819Smrg  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
132964ce7165Smrgfi
133064ce7165Smrgac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
133164ce7165Smrgac_abs_confdir=`(
1332169a0819Smrg	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
133364ce7165Smrg	pwd)`
133464ce7165Smrg# When building in place, set srcdir=.
133564ce7165Smrgif test "$ac_abs_confdir" = "$ac_pwd"; then
133664ce7165Smrg  srcdir=.
133764ce7165Smrgfi
133864ce7165Smrg# Remove unnecessary trailing slashes from srcdir.
133964ce7165Smrg# Double slashes in file names in object file debugging info
134064ce7165Smrg# mess up M-x gdb in Emacs.
134164ce7165Smrgcase $srcdir in
134264ce7165Smrg*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
134364ce7165Smrgesac
134464ce7165Smrgfor ac_var in $ac_precious_vars; do
134564ce7165Smrg  eval ac_env_${ac_var}_set=\${${ac_var}+set}
134664ce7165Smrg  eval ac_env_${ac_var}_value=\$${ac_var}
134764ce7165Smrg  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
134864ce7165Smrg  eval ac_cv_env_${ac_var}_value=\$${ac_var}
134964ce7165Smrgdone
135064ce7165Smrg
135164ce7165Smrg#
135264ce7165Smrg# Report the --help message.
135364ce7165Smrg#
135464ce7165Smrgif test "$ac_init_help" = "long"; then
135564ce7165Smrg  # Omit some internal or obsolete options to make the list less imposing.
135664ce7165Smrg  # This message is too long to be a string in the A/UX 3.1 sh.
135764ce7165Smrg  cat <<_ACEOF
1358b71ad168Smrg\`configure' configures xhost 1.0.9 to adapt to many kinds of systems.
135964ce7165Smrg
136064ce7165SmrgUsage: $0 [OPTION]... [VAR=VALUE]...
136164ce7165Smrg
136264ce7165SmrgTo assign environment variables (e.g., CC, CFLAGS...), specify them as
136364ce7165SmrgVAR=VALUE.  See below for descriptions of some of the useful variables.
136464ce7165Smrg
136564ce7165SmrgDefaults for the options are specified in brackets.
136664ce7165Smrg
136764ce7165SmrgConfiguration:
136864ce7165Smrg  -h, --help              display this help and exit
136964ce7165Smrg      --help=short        display options specific to this package
137064ce7165Smrg      --help=recursive    display the short help of all the included packages
137164ce7165Smrg  -V, --version           display version information and exit
1372169a0819Smrg  -q, --quiet, --silent   do not print \`checking ...' messages
137364ce7165Smrg      --cache-file=FILE   cache test results in FILE [disabled]
137464ce7165Smrg  -C, --config-cache      alias for \`--cache-file=config.cache'
137564ce7165Smrg  -n, --no-create         do not create output files
137664ce7165Smrg      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
137764ce7165Smrg
137864ce7165SmrgInstallation directories:
137964ce7165Smrg  --prefix=PREFIX         install architecture-independent files in PREFIX
1380fb23d3a8Smrg                          [$ac_default_prefix]
138164ce7165Smrg  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1382fb23d3a8Smrg                          [PREFIX]
138364ce7165Smrg
138464ce7165SmrgBy default, \`make install' will install all the files in
138564ce7165Smrg\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
138664ce7165Smrgan installation prefix other than \`$ac_default_prefix' using \`--prefix',
138764ce7165Smrgfor instance \`--prefix=\$HOME'.
138864ce7165Smrg
138964ce7165SmrgFor better control, use the options below.
139064ce7165Smrg
139164ce7165SmrgFine tuning of the installation directories:
1392fb23d3a8Smrg  --bindir=DIR            user executables [EPREFIX/bin]
1393fb23d3a8Smrg  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1394fb23d3a8Smrg  --libexecdir=DIR        program executables [EPREFIX/libexec]
1395fb23d3a8Smrg  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1396fb23d3a8Smrg  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1397fb23d3a8Smrg  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1398b71ad168Smrg  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1399fb23d3a8Smrg  --libdir=DIR            object code libraries [EPREFIX/lib]
1400fb23d3a8Smrg  --includedir=DIR        C header files [PREFIX/include]
1401fb23d3a8Smrg  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1402fb23d3a8Smrg  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1403fb23d3a8Smrg  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1404fb23d3a8Smrg  --infodir=DIR           info documentation [DATAROOTDIR/info]
1405fb23d3a8Smrg  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1406fb23d3a8Smrg  --mandir=DIR            man documentation [DATAROOTDIR/man]
1407fb23d3a8Smrg  --docdir=DIR            documentation root [DATAROOTDIR/doc/xhost]
1408fb23d3a8Smrg  --htmldir=DIR           html documentation [DOCDIR]
1409fb23d3a8Smrg  --dvidir=DIR            dvi documentation [DOCDIR]
1410fb23d3a8Smrg  --pdfdir=DIR            pdf documentation [DOCDIR]
1411fb23d3a8Smrg  --psdir=DIR             ps documentation [DOCDIR]
141264ce7165Smrg_ACEOF
141364ce7165Smrg
141464ce7165Smrg  cat <<\_ACEOF
141564ce7165Smrg
141664ce7165SmrgProgram names:
141764ce7165Smrg  --program-prefix=PREFIX            prepend PREFIX to installed program names
141864ce7165Smrg  --program-suffix=SUFFIX            append SUFFIX to installed program names
141964ce7165Smrg  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
142064ce7165Smrg
142164ce7165SmrgSystem types:
142264ce7165Smrg  --build=BUILD     configure for building on BUILD [guessed]
142364ce7165Smrg  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
142464ce7165Smrg_ACEOF
142564ce7165Smrgfi
142664ce7165Smrg
142764ce7165Smrgif test -n "$ac_init_help"; then
142864ce7165Smrg  case $ac_init_help in
1429b71ad168Smrg     short | recursive ) echo "Configuration of xhost 1.0.9:";;
143064ce7165Smrg   esac
143164ce7165Smrg  cat <<\_ACEOF
143264ce7165Smrg
143364ce7165SmrgOptional Features:
1434fb23d3a8Smrg  --disable-option-checking  ignore unrecognized --enable/--with options
143564ce7165Smrg  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
143664ce7165Smrg  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
143781440437Smrg  --enable-silent-rules   less verbose build output (undo: "make V=1")
143881440437Smrg  --disable-silent-rules  verbose build output (undo: "make V=0")
143981440437Smrg  --enable-dependency-tracking
144081440437Smrg                          do not reject slow dependency extractors
144181440437Smrg  --disable-dependency-tracking
144281440437Smrg                          speeds up one-time build
14433544ea2eSmrg  --disable-selective-werror
14443544ea2eSmrg                          Turn off selective compiler errors. (default:
14453544ea2eSmrg                          enabled)
1446fb23d3a8Smrg  --enable-strict-compilation
1447fb23d3a8Smrg                          Enable all warnings from compiler and make them
1448fb23d3a8Smrg                          errors (default: disabled)
144964ce7165Smrg  --enable-unix-transport Enable UNIX domain socket transport
145064ce7165Smrg  --enable-tcp-transport  Enable TCP socket transport
1451fb23d3a8Smrg  --enable-ipv6           Enable IPv6 support
145264ce7165Smrg  --enable-local-transport
145364ce7165Smrg                          Enable os-specific local transport
145464ce7165Smrg  --enable-secure-rpc     Enable Secure RPC
145564ce7165Smrg
1456b71ad168SmrgOptional Packages:
1457b71ad168Smrg  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1458b71ad168Smrg  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1459b71ad168Smrg  --with-localedir=<path> Path to install message files in (default:
1460b71ad168Smrg                          datadir/locale)
1461b71ad168Smrg
146264ce7165SmrgSome influential environment variables:
146364ce7165Smrg  CC          C compiler command
146464ce7165Smrg  CFLAGS      C compiler flags
146564ce7165Smrg  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
146664ce7165Smrg              nonstandard directory <lib dir>
146764ce7165Smrg  LIBS        libraries to pass to the linker, e.g. -l<library>
1468169a0819Smrg  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
146964ce7165Smrg              you have headers in a nonstandard directory <include dir>
147064ce7165Smrg  PKG_CONFIG  path to pkg-config utility
1471aadd013eSmrg  PKG_CONFIG_PATH
1472aadd013eSmrg              directories to add to pkg-config's search path
1473aadd013eSmrg  PKG_CONFIG_LIBDIR
1474aadd013eSmrg              path overriding pkg-config's built-in search path
147564ce7165Smrg  XHOST_CFLAGS
147664ce7165Smrg              C compiler flags for XHOST, overriding pkg-config
147764ce7165Smrg  XHOST_LIBS  linker flags for XHOST, overriding pkg-config
14783544ea2eSmrg  XAU_CFLAGS  C compiler flags for XAU, overriding pkg-config
14793544ea2eSmrg  XAU_LIBS    linker flags for XAU, overriding pkg-config
148064ce7165Smrg
148164ce7165SmrgUse these variables to override the choices made by `configure' or to help
148264ce7165Smrgit to find libraries and programs with nonstandard names/locations.
148364ce7165Smrg
1484b71ad168SmrgReport bugs to <https://gitlab.freedesktop.org/xorg/app/xhost/-/issues>.
148564ce7165Smrg_ACEOF
148664ce7165Smrgac_status=$?
148764ce7165Smrgfi
148864ce7165Smrg
148964ce7165Smrgif test "$ac_init_help" = "recursive"; then
149064ce7165Smrg  # If there are subdirs, report their specific --help.
149164ce7165Smrg  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1492fb23d3a8Smrg    test -d "$ac_dir" ||
1493fb23d3a8Smrg      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1494fb23d3a8Smrg      continue
149564ce7165Smrg    ac_builddir=.
149664ce7165Smrg
149764ce7165Smrgcase "$ac_dir" in
149864ce7165Smrg.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
149964ce7165Smrg*)
1500b71ad168Smrg  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
150164ce7165Smrg  # A ".." for each directory in $ac_dir_suffix.
1502b71ad168Smrg  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
150364ce7165Smrg  case $ac_top_builddir_sub in
150464ce7165Smrg  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
150564ce7165Smrg  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
150664ce7165Smrg  esac ;;
150764ce7165Smrgesac
150864ce7165Smrgac_abs_top_builddir=$ac_pwd
150964ce7165Smrgac_abs_builddir=$ac_pwd$ac_dir_suffix
151064ce7165Smrg# for backward compatibility:
151164ce7165Smrgac_top_builddir=$ac_top_build_prefix
151264ce7165Smrg
151364ce7165Smrgcase $srcdir in
151464ce7165Smrg  .)  # We are building in place.
151564ce7165Smrg    ac_srcdir=.
151664ce7165Smrg    ac_top_srcdir=$ac_top_builddir_sub
151764ce7165Smrg    ac_abs_top_srcdir=$ac_pwd ;;
151864ce7165Smrg  [\\/]* | ?:[\\/]* )  # Absolute name.
151964ce7165Smrg    ac_srcdir=$srcdir$ac_dir_suffix;
152064ce7165Smrg    ac_top_srcdir=$srcdir
152164ce7165Smrg    ac_abs_top_srcdir=$srcdir ;;
152264ce7165Smrg  *) # Relative name.
152364ce7165Smrg    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
152464ce7165Smrg    ac_top_srcdir=$ac_top_build_prefix$srcdir
152564ce7165Smrg    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
152664ce7165Smrgesac
152764ce7165Smrgac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
152864ce7165Smrg
152964ce7165Smrg    cd "$ac_dir" || { ac_status=$?; continue; }
1530b71ad168Smrg    # Check for configure.gnu first; this name is used for a wrapper for
1531b71ad168Smrg    # Metaconfig's "Configure" on case-insensitive file systems.
153264ce7165Smrg    if test -f "$ac_srcdir/configure.gnu"; then
153364ce7165Smrg      echo &&
153464ce7165Smrg      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
153564ce7165Smrg    elif test -f "$ac_srcdir/configure"; then
153664ce7165Smrg      echo &&
153764ce7165Smrg      $SHELL "$ac_srcdir/configure" --help=recursive
153864ce7165Smrg    else
1539b71ad168Smrg      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
154064ce7165Smrg    fi || ac_status=$?
154164ce7165Smrg    cd "$ac_pwd" || { ac_status=$?; break; }
154264ce7165Smrg  done
154364ce7165Smrgfi
154464ce7165Smrg
154564ce7165Smrgtest -n "$ac_init_help" && exit $ac_status
154664ce7165Smrgif $ac_init_version; then
154764ce7165Smrg  cat <<\_ACEOF
1548b71ad168Smrgxhost configure 1.0.9
1549b71ad168Smrggenerated by GNU Autoconf 2.71
155064ce7165Smrg
1551b71ad168SmrgCopyright (C) 2021 Free Software Foundation, Inc.
155264ce7165SmrgThis configure script is free software; the Free Software Foundation
155364ce7165Smrggives unlimited permission to copy, distribute and modify it.
155464ce7165Smrg_ACEOF
155564ce7165Smrg  exit
155664ce7165Smrgfi
155764ce7165Smrg
1558169a0819Smrg## ------------------------ ##
1559169a0819Smrg## Autoconf initialization. ##
1560169a0819Smrg## ------------------------ ##
156164ce7165Smrg
1562169a0819Smrg# ac_fn_c_try_compile LINENO
1563169a0819Smrg# --------------------------
1564169a0819Smrg# Try to compile conftest.$ac_ext, and return whether this succeeded.
1565169a0819Smrgac_fn_c_try_compile ()
156664ce7165Smrg{
1567169a0819Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1568b71ad168Smrg  rm -f conftest.$ac_objext conftest.beam
1569169a0819Smrg  if { { ac_try="$ac_compile"
1570169a0819Smrgcase "(($ac_try" in
1571169a0819Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1572169a0819Smrg  *) ac_try_echo=$ac_try;;
1573169a0819Smrgesac
1574169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1575b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
1576169a0819Smrg  (eval "$ac_compile") 2>conftest.err
1577169a0819Smrg  ac_status=$?
1578169a0819Smrg  if test -s conftest.err; then
1579169a0819Smrg    grep -v '^ *+' conftest.err >conftest.er1
1580169a0819Smrg    cat conftest.er1 >&5
1581169a0819Smrg    mv -f conftest.er1 conftest.err
1582169a0819Smrg  fi
1583b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1584169a0819Smrg  test $ac_status = 0; } && {
1585169a0819Smrg	 test -z "$ac_c_werror_flag" ||
1586169a0819Smrg	 test ! -s conftest.err
1587b71ad168Smrg       } && test -s conftest.$ac_objext
1588b71ad168Smrgthen :
1589169a0819Smrg  ac_retval=0
1590b71ad168Smrgelse $as_nop
1591b71ad168Smrg  printf "%s\n" "$as_me: failed program was:" >&5
1592169a0819Smrgsed 's/^/| /' conftest.$ac_ext >&5
159364ce7165Smrg
1594169a0819Smrg	ac_retval=1
1595169a0819Smrgfi
1596169a0819Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1597169a0819Smrg  as_fn_set_status $ac_retval
159864ce7165Smrg
1599169a0819Smrg} # ac_fn_c_try_compile
160064ce7165Smrg
1601169a0819Smrg# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1602169a0819Smrg# -------------------------------------------------------
1603169a0819Smrg# Tests whether HEADER exists and can be compiled using the include files in
1604169a0819Smrg# INCLUDES, setting the cache variable VAR accordingly.
1605169a0819Smrgac_fn_c_check_header_compile ()
1606169a0819Smrg{
1607169a0819Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1608b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1609b71ad168Smrgprintf %s "checking for $2... " >&6; }
1610b71ad168Smrgif eval test \${$3+y}
1611b71ad168Smrgthen :
1612b71ad168Smrg  printf %s "(cached) " >&6
1613b71ad168Smrgelse $as_nop
1614169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1615169a0819Smrg/* end confdefs.h.  */
1616169a0819Smrg$4
1617169a0819Smrg#include <$2>
1618169a0819Smrg_ACEOF
1619b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
1620b71ad168Smrgthen :
1621169a0819Smrg  eval "$3=yes"
1622b71ad168Smrgelse $as_nop
1623169a0819Smrg  eval "$3=no"
1624169a0819Smrgfi
1625b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1626169a0819Smrgfi
1627169a0819Smrgeval ac_res=\$$3
1628b71ad168Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1629b71ad168Smrgprintf "%s\n" "$ac_res" >&6; }
1630169a0819Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1631169a0819Smrg
1632169a0819Smrg} # ac_fn_c_check_header_compile
1633169a0819Smrg
1634b71ad168Smrg# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
1635b71ad168Smrg# ------------------------------------------------------------------
163695fdd44cSmrg# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1637b71ad168Smrg# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
1638b71ad168Smrgac_fn_check_decl ()
163995fdd44cSmrg{
164095fdd44cSmrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
164195fdd44cSmrg  as_decl_name=`echo $2|sed 's/ *(.*//'`
1642b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1643b71ad168Smrgprintf %s "checking whether $as_decl_name is declared... " >&6; }
1644b71ad168Smrgif eval test \${$3+y}
1645b71ad168Smrgthen :
1646b71ad168Smrg  printf %s "(cached) " >&6
1647b71ad168Smrgelse $as_nop
164895fdd44cSmrg  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1649b71ad168Smrg  eval ac_save_FLAGS=\$$6
1650b71ad168Smrg  as_fn_append $6 " $5"
165195fdd44cSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
165295fdd44cSmrg/* end confdefs.h.  */
165395fdd44cSmrg$4
165495fdd44cSmrgint
1655b71ad168Smrgmain (void)
165695fdd44cSmrg{
165795fdd44cSmrg#ifndef $as_decl_name
165895fdd44cSmrg#ifdef __cplusplus
165995fdd44cSmrg  (void) $as_decl_use;
166095fdd44cSmrg#else
166195fdd44cSmrg  (void) $as_decl_name;
166295fdd44cSmrg#endif
166395fdd44cSmrg#endif
166495fdd44cSmrg
166595fdd44cSmrg  ;
166695fdd44cSmrg  return 0;
166795fdd44cSmrg}
166895fdd44cSmrg_ACEOF
1669b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
1670b71ad168Smrgthen :
167195fdd44cSmrg  eval "$3=yes"
1672b71ad168Smrgelse $as_nop
167395fdd44cSmrg  eval "$3=no"
167495fdd44cSmrgfi
1675b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1676b71ad168Smrg  eval $6=\$ac_save_FLAGS
1677b71ad168Smrg
167895fdd44cSmrgfi
167995fdd44cSmrgeval ac_res=\$$3
1680b71ad168Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1681b71ad168Smrgprintf "%s\n" "$ac_res" >&6; }
168295fdd44cSmrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
168395fdd44cSmrg
1684b71ad168Smrg} # ac_fn_check_decl
168595fdd44cSmrg
1686169a0819Smrg# ac_fn_c_try_link LINENO
1687169a0819Smrg# -----------------------
1688169a0819Smrg# Try to link conftest.$ac_ext, and return whether this succeeded.
1689169a0819Smrgac_fn_c_try_link ()
1690169a0819Smrg{
1691169a0819Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692b71ad168Smrg  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1693169a0819Smrg  if { { ac_try="$ac_link"
1694169a0819Smrgcase "(($ac_try" in
1695169a0819Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696169a0819Smrg  *) ac_try_echo=$ac_try;;
1697169a0819Smrgesac
1698169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
1700169a0819Smrg  (eval "$ac_link") 2>conftest.err
1701169a0819Smrg  ac_status=$?
1702169a0819Smrg  if test -s conftest.err; then
1703169a0819Smrg    grep -v '^ *+' conftest.err >conftest.er1
1704169a0819Smrg    cat conftest.er1 >&5
1705169a0819Smrg    mv -f conftest.er1 conftest.err
1706169a0819Smrg  fi
1707b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708169a0819Smrg  test $ac_status = 0; } && {
1709169a0819Smrg	 test -z "$ac_c_werror_flag" ||
1710169a0819Smrg	 test ! -s conftest.err
1711169a0819Smrg       } && test -s conftest$ac_exeext && {
1712169a0819Smrg	 test "$cross_compiling" = yes ||
171395fdd44cSmrg	 test -x conftest$ac_exeext
1714b71ad168Smrg       }
1715b71ad168Smrgthen :
1716169a0819Smrg  ac_retval=0
1717b71ad168Smrgelse $as_nop
1718b71ad168Smrg  printf "%s\n" "$as_me: failed program was:" >&5
1719169a0819Smrgsed 's/^/| /' conftest.$ac_ext >&5
1720169a0819Smrg
1721169a0819Smrg	ac_retval=1
1722169a0819Smrgfi
1723169a0819Smrg  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1724169a0819Smrg  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1725169a0819Smrg  # interfere with the next link command; also delete a directory that is
1726169a0819Smrg  # left behind by Apple's compiler.  We do this before executing the actions.
1727169a0819Smrg  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1728169a0819Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1729169a0819Smrg  as_fn_set_status $ac_retval
1730169a0819Smrg
1731169a0819Smrg} # ac_fn_c_try_link
1732169a0819Smrg
1733169a0819Smrg# ac_fn_c_check_func LINENO FUNC VAR
1734169a0819Smrg# ----------------------------------
1735169a0819Smrg# Tests whether FUNC exists, setting the cache variable VAR accordingly
1736169a0819Smrgac_fn_c_check_func ()
1737169a0819Smrg{
1738169a0819Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1739b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1740b71ad168Smrgprintf %s "checking for $2... " >&6; }
1741b71ad168Smrgif eval test \${$3+y}
1742b71ad168Smrgthen :
1743b71ad168Smrg  printf %s "(cached) " >&6
1744b71ad168Smrgelse $as_nop
1745169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1746169a0819Smrg/* end confdefs.h.  */
1747169a0819Smrg/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1748169a0819Smrg   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1749169a0819Smrg#define $2 innocuous_$2
1750169a0819Smrg
1751169a0819Smrg/* System header to define __stub macros and hopefully few prototypes,
1752b71ad168Smrg   which can conflict with char $2 (); below.  */
1753169a0819Smrg
1754b71ad168Smrg#include <limits.h>
1755169a0819Smrg#undef $2
1756169a0819Smrg
1757169a0819Smrg/* Override any GCC internal prototype to avoid an error.
1758169a0819Smrg   Use char because int might match the return type of a GCC
1759169a0819Smrg   builtin and then its argument prototype would still apply.  */
1760169a0819Smrg#ifdef __cplusplus
1761169a0819Smrgextern "C"
1762169a0819Smrg#endif
1763169a0819Smrgchar $2 ();
1764169a0819Smrg/* The GNU C library defines this for functions which it implements
1765169a0819Smrg    to always fail with ENOSYS.  Some functions are actually named
1766169a0819Smrg    something starting with __ and the normal name is an alias.  */
1767169a0819Smrg#if defined __stub_$2 || defined __stub___$2
1768169a0819Smrgchoke me
1769169a0819Smrg#endif
1770169a0819Smrg
1771169a0819Smrgint
1772b71ad168Smrgmain (void)
1773169a0819Smrg{
1774169a0819Smrgreturn $2 ();
1775169a0819Smrg  ;
1776169a0819Smrg  return 0;
1777169a0819Smrg}
1778169a0819Smrg_ACEOF
1779b71ad168Smrgif ac_fn_c_try_link "$LINENO"
1780b71ad168Smrgthen :
1781169a0819Smrg  eval "$3=yes"
1782b71ad168Smrgelse $as_nop
1783169a0819Smrg  eval "$3=no"
1784169a0819Smrgfi
1785b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1786169a0819Smrg    conftest$ac_exeext conftest.$ac_ext
1787169a0819Smrgfi
1788169a0819Smrgeval ac_res=\$$3
1789b71ad168Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1790b71ad168Smrgprintf "%s\n" "$ac_res" >&6; }
1791169a0819Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1792169a0819Smrg
1793169a0819Smrg} # ac_fn_c_check_func
1794169a0819Smrg
1795169a0819Smrg# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1796169a0819Smrg# ----------------------------------------------------
1797169a0819Smrg# Tries to find if the field MEMBER exists in type AGGR, after including
1798169a0819Smrg# INCLUDES, setting cache variable VAR accordingly.
1799169a0819Smrgac_fn_c_check_member ()
1800169a0819Smrg{
1801169a0819Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1802b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1803b71ad168Smrgprintf %s "checking for $2.$3... " >&6; }
1804b71ad168Smrgif eval test \${$4+y}
1805b71ad168Smrgthen :
1806b71ad168Smrg  printf %s "(cached) " >&6
1807b71ad168Smrgelse $as_nop
1808169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809169a0819Smrg/* end confdefs.h.  */
1810169a0819Smrg$5
1811169a0819Smrgint
1812b71ad168Smrgmain (void)
1813169a0819Smrg{
1814169a0819Smrgstatic $2 ac_aggr;
1815169a0819Smrgif (ac_aggr.$3)
1816169a0819Smrgreturn 0;
1817169a0819Smrg  ;
1818169a0819Smrg  return 0;
1819169a0819Smrg}
1820169a0819Smrg_ACEOF
1821b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
1822b71ad168Smrgthen :
1823169a0819Smrg  eval "$4=yes"
1824b71ad168Smrgelse $as_nop
1825169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1826169a0819Smrg/* end confdefs.h.  */
1827169a0819Smrg$5
1828169a0819Smrgint
1829b71ad168Smrgmain (void)
1830169a0819Smrg{
1831169a0819Smrgstatic $2 ac_aggr;
1832169a0819Smrgif (sizeof ac_aggr.$3)
1833169a0819Smrgreturn 0;
1834169a0819Smrg  ;
1835169a0819Smrg  return 0;
1836169a0819Smrg}
1837169a0819Smrg_ACEOF
1838b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
1839b71ad168Smrgthen :
1840169a0819Smrg  eval "$4=yes"
1841b71ad168Smrgelse $as_nop
1842169a0819Smrg  eval "$4=no"
1843169a0819Smrgfi
1844b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1845169a0819Smrgfi
1846b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1847169a0819Smrgfi
1848169a0819Smrgeval ac_res=\$$4
1849b71ad168Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1850b71ad168Smrgprintf "%s\n" "$ac_res" >&6; }
1851169a0819Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1852169a0819Smrg
1853169a0819Smrg} # ac_fn_c_check_member
1854169a0819Smrg
1855169a0819Smrg# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1856169a0819Smrg# -------------------------------------------
1857169a0819Smrg# Tests whether TYPE exists after having included INCLUDES, setting cache
1858169a0819Smrg# variable VAR accordingly.
1859169a0819Smrgac_fn_c_check_type ()
1860169a0819Smrg{
1861169a0819Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863b71ad168Smrgprintf %s "checking for $2... " >&6; }
1864b71ad168Smrgif eval test \${$3+y}
1865b71ad168Smrgthen :
1866b71ad168Smrg  printf %s "(cached) " >&6
1867b71ad168Smrgelse $as_nop
1868169a0819Smrg  eval "$3=no"
1869169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1870169a0819Smrg/* end confdefs.h.  */
1871169a0819Smrg$4
1872169a0819Smrgint
1873b71ad168Smrgmain (void)
1874169a0819Smrg{
1875169a0819Smrgif (sizeof ($2))
1876169a0819Smrg	 return 0;
1877169a0819Smrg  ;
1878169a0819Smrg  return 0;
1879169a0819Smrg}
1880169a0819Smrg_ACEOF
1881b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
1882b71ad168Smrgthen :
1883169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1884169a0819Smrg/* end confdefs.h.  */
1885169a0819Smrg$4
1886169a0819Smrgint
1887b71ad168Smrgmain (void)
1888169a0819Smrg{
1889169a0819Smrgif (sizeof (($2)))
1890169a0819Smrg	    return 0;
1891169a0819Smrg  ;
1892169a0819Smrg  return 0;
1893169a0819Smrg}
1894169a0819Smrg_ACEOF
1895b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
1896b71ad168Smrgthen :
1897169a0819Smrg
1898b71ad168Smrgelse $as_nop
1899169a0819Smrg  eval "$3=yes"
1900169a0819Smrgfi
1901b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1902169a0819Smrgfi
1903b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1904169a0819Smrgfi
1905169a0819Smrgeval ac_res=\$$3
1906b71ad168Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907b71ad168Smrgprintf "%s\n" "$ac_res" >&6; }
1908169a0819Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1909169a0819Smrg
1910169a0819Smrg} # ac_fn_c_check_type
1911b71ad168Smrgac_configure_args_raw=
1912b71ad168Smrgfor ac_arg
1913b71ad168Smrgdo
1914b71ad168Smrg  case $ac_arg in
1915b71ad168Smrg  *\'*)
1916b71ad168Smrg    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1917b71ad168Smrg  esac
1918b71ad168Smrg  as_fn_append ac_configure_args_raw " '$ac_arg'"
1919b71ad168Smrgdone
1920b71ad168Smrg
1921b71ad168Smrgcase $ac_configure_args_raw in
1922b71ad168Smrg  *$as_nl*)
1923b71ad168Smrg    ac_safe_unquote= ;;
1924b71ad168Smrg  *)
1925b71ad168Smrg    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
1926b71ad168Smrg    ac_unsafe_a="$ac_unsafe_z#~"
1927b71ad168Smrg    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
1928b71ad168Smrg    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
1929b71ad168Smrgesac
1930b71ad168Smrg
1931169a0819Smrgcat >config.log <<_ACEOF
1932169a0819SmrgThis file contains any messages produced by compilers while
1933169a0819Smrgrunning configure, to aid debugging if configure makes a mistake.
1934169a0819Smrg
1935b71ad168SmrgIt was created by xhost $as_me 1.0.9, which was
1936b71ad168Smrggenerated by GNU Autoconf 2.71.  Invocation command line was
1937169a0819Smrg
1938b71ad168Smrg  $ $0$ac_configure_args_raw
1939169a0819Smrg
1940169a0819Smrg_ACEOF
1941169a0819Smrgexec 5>>config.log
1942169a0819Smrg{
1943169a0819Smrgcat <<_ASUNAME
1944169a0819Smrg## --------- ##
1945169a0819Smrg## Platform. ##
1946169a0819Smrg## --------- ##
1947169a0819Smrg
1948169a0819Smrghostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1949169a0819Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
1950169a0819Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
1951169a0819Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
1952169a0819Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
1953169a0819Smrg
1954169a0819Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1955169a0819Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1956169a0819Smrg
1957169a0819Smrg/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1958169a0819Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1959169a0819Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1960169a0819Smrg/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1961169a0819Smrg/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1962169a0819Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1963169a0819Smrg/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1964169a0819Smrg
1965169a0819Smrg_ASUNAME
1966169a0819Smrg
1967169a0819Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196864ce7165Smrgfor as_dir in $PATH
196964ce7165Smrgdo
197064ce7165Smrg  IFS=$as_save_IFS
1971b71ad168Smrg  case $as_dir in #(((
1972b71ad168Smrg    '') as_dir=./ ;;
1973b71ad168Smrg    */) ;;
1974b71ad168Smrg    *) as_dir=$as_dir/ ;;
1975b71ad168Smrg  esac
1976b71ad168Smrg    printf "%s\n" "PATH: $as_dir"
1977169a0819Smrg  done
197864ce7165SmrgIFS=$as_save_IFS
197964ce7165Smrg
198064ce7165Smrg} >&5
198164ce7165Smrg
198264ce7165Smrgcat >&5 <<_ACEOF
198364ce7165Smrg
198464ce7165Smrg
198564ce7165Smrg## ----------- ##
198664ce7165Smrg## Core tests. ##
198764ce7165Smrg## ----------- ##
198864ce7165Smrg
198964ce7165Smrg_ACEOF
199064ce7165Smrg
199164ce7165Smrg
199264ce7165Smrg# Keep a trace of the command line.
199364ce7165Smrg# Strip out --no-create and --no-recursion so they do not pile up.
199464ce7165Smrg# Strip out --silent because we don't want to record it for future runs.
199564ce7165Smrg# Also quote any args containing shell meta-characters.
199664ce7165Smrg# Make two passes to allow for proper duplicate-argument suppression.
199764ce7165Smrgac_configure_args=
199864ce7165Smrgac_configure_args0=
199964ce7165Smrgac_configure_args1=
200064ce7165Smrgac_must_keep_next=false
200164ce7165Smrgfor ac_pass in 1 2
200264ce7165Smrgdo
200364ce7165Smrg  for ac_arg
200464ce7165Smrg  do
200564ce7165Smrg    case $ac_arg in
200664ce7165Smrg    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
200764ce7165Smrg    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
200864ce7165Smrg    | -silent | --silent | --silen | --sile | --sil)
200964ce7165Smrg      continue ;;
201064ce7165Smrg    *\'*)
2011b71ad168Smrg      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
201264ce7165Smrg    esac
201364ce7165Smrg    case $ac_pass in
2014169a0819Smrg    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
201564ce7165Smrg    2)
2016169a0819Smrg      as_fn_append ac_configure_args1 " '$ac_arg'"
201764ce7165Smrg      if test $ac_must_keep_next = true; then
201864ce7165Smrg	ac_must_keep_next=false # Got value, back to normal.
201964ce7165Smrg      else
202064ce7165Smrg	case $ac_arg in
202164ce7165Smrg	  *=* | --config-cache | -C | -disable-* | --disable-* \
202264ce7165Smrg	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
202364ce7165Smrg	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
202464ce7165Smrg	  | -with-* | --with-* | -without-* | --without-* | --x)
202564ce7165Smrg	    case "$ac_configure_args0 " in
202664ce7165Smrg	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
202764ce7165Smrg	    esac
202864ce7165Smrg	    ;;
202964ce7165Smrg	  -* ) ac_must_keep_next=true ;;
203064ce7165Smrg	esac
203164ce7165Smrg      fi
2032169a0819Smrg      as_fn_append ac_configure_args " '$ac_arg'"
203364ce7165Smrg      ;;
203464ce7165Smrg    esac
203564ce7165Smrg  done
203664ce7165Smrgdone
2037169a0819Smrg{ ac_configure_args0=; unset ac_configure_args0;}
2038169a0819Smrg{ ac_configure_args1=; unset ac_configure_args1;}
203964ce7165Smrg
204064ce7165Smrg# When interrupted or exit'd, cleanup temporary files, and complete
204164ce7165Smrg# config.log.  We remove comments because anyway the quotes in there
204264ce7165Smrg# would cause problems or look ugly.
204364ce7165Smrg# WARNING: Use '\'' to represent an apostrophe within the trap.
204464ce7165Smrg# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
204564ce7165Smrgtrap 'exit_status=$?
2046b71ad168Smrg  # Sanitize IFS.
2047b71ad168Smrg  IFS=" ""	$as_nl"
204864ce7165Smrg  # Save into config.log some information that might help in debugging.
204964ce7165Smrg  {
205064ce7165Smrg    echo
205164ce7165Smrg
2052b71ad168Smrg    printf "%s\n" "## ---------------- ##
205364ce7165Smrg## Cache variables. ##
2054169a0819Smrg## ---------------- ##"
205564ce7165Smrg    echo
205664ce7165Smrg    # The following way of writing the cache mishandles newlines in values,
205764ce7165Smrg(
205864ce7165Smrg  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
205964ce7165Smrg    eval ac_val=\$$ac_var
206064ce7165Smrg    case $ac_val in #(
206164ce7165Smrg    *${as_nl}*)
206264ce7165Smrg      case $ac_var in #(
2063b71ad168Smrg      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2064b71ad168Smrgprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
206564ce7165Smrg      esac
206664ce7165Smrg      case $ac_var in #(
206764ce7165Smrg      _ | IFS | as_nl) ;; #(
2068fb23d3a8Smrg      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2069169a0819Smrg      *) { eval $ac_var=; unset $ac_var;} ;;
207064ce7165Smrg      esac ;;
207164ce7165Smrg    esac
207264ce7165Smrg  done
207364ce7165Smrg  (set) 2>&1 |
207464ce7165Smrg    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
207564ce7165Smrg    *${as_nl}ac_space=\ *)
207664ce7165Smrg      sed -n \
207764ce7165Smrg	"s/'\''/'\''\\\\'\'''\''/g;
207864ce7165Smrg	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
207964ce7165Smrg      ;; #(
208064ce7165Smrg    *)
208164ce7165Smrg      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
208264ce7165Smrg      ;;
208364ce7165Smrg    esac |
208464ce7165Smrg    sort
208564ce7165Smrg)
208664ce7165Smrg    echo
208764ce7165Smrg
2088b71ad168Smrg    printf "%s\n" "## ----------------- ##
208964ce7165Smrg## Output variables. ##
2090169a0819Smrg## ----------------- ##"
209164ce7165Smrg    echo
209264ce7165Smrg    for ac_var in $ac_subst_vars
209364ce7165Smrg    do
209464ce7165Smrg      eval ac_val=\$$ac_var
209564ce7165Smrg      case $ac_val in
2096b71ad168Smrg      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
209764ce7165Smrg      esac
2098b71ad168Smrg      printf "%s\n" "$ac_var='\''$ac_val'\''"
209964ce7165Smrg    done | sort
210064ce7165Smrg    echo
210164ce7165Smrg
210264ce7165Smrg    if test -n "$ac_subst_files"; then
2103b71ad168Smrg      printf "%s\n" "## ------------------- ##
210464ce7165Smrg## File substitutions. ##
2105169a0819Smrg## ------------------- ##"
210664ce7165Smrg      echo
210764ce7165Smrg      for ac_var in $ac_subst_files
210864ce7165Smrg      do
210964ce7165Smrg	eval ac_val=\$$ac_var
211064ce7165Smrg	case $ac_val in
2111b71ad168Smrg	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
211264ce7165Smrg	esac
2113b71ad168Smrg	printf "%s\n" "$ac_var='\''$ac_val'\''"
211464ce7165Smrg      done | sort
211564ce7165Smrg      echo
211664ce7165Smrg    fi
211764ce7165Smrg
211864ce7165Smrg    if test -s confdefs.h; then
2119b71ad168Smrg      printf "%s\n" "## ----------- ##
212064ce7165Smrg## confdefs.h. ##
2121169a0819Smrg## ----------- ##"
212264ce7165Smrg      echo
212364ce7165Smrg      cat confdefs.h
212464ce7165Smrg      echo
212564ce7165Smrg    fi
212664ce7165Smrg    test "$ac_signal" != 0 &&
2127b71ad168Smrg      printf "%s\n" "$as_me: caught signal $ac_signal"
2128b71ad168Smrg    printf "%s\n" "$as_me: exit $exit_status"
212964ce7165Smrg  } >&5
213064ce7165Smrg  rm -f core *.core core.conftest.* &&
213164ce7165Smrg    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
213264ce7165Smrg    exit $exit_status
213364ce7165Smrg' 0
213464ce7165Smrgfor ac_signal in 1 2 13 15; do
2135169a0819Smrg  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
213664ce7165Smrgdone
213764ce7165Smrgac_signal=0
213864ce7165Smrg
213964ce7165Smrg# confdefs.h avoids OS command line length limits that DEFS can exceed.
214064ce7165Smrgrm -f -r conftest* confdefs.h
214164ce7165Smrg
2142b71ad168Smrgprintf "%s\n" "/* confdefs.h */" > confdefs.h
2143169a0819Smrg
214464ce7165Smrg# Predefined preprocessor variables.
214564ce7165Smrg
2146b71ad168Smrgprintf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
214764ce7165Smrg
2148b71ad168Smrgprintf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
214964ce7165Smrg
2150b71ad168Smrgprintf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
215164ce7165Smrg
2152b71ad168Smrgprintf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
215364ce7165Smrg
2154b71ad168Smrgprintf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
215564ce7165Smrg
2156b71ad168Smrgprintf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2157169a0819Smrg
215864ce7165Smrg
215964ce7165Smrg# Let the site file select an alternate cache file if it wants to.
2160fb23d3a8Smrg# Prefer an explicitly selected file to automatically selected ones.
216164ce7165Smrgif test -n "$CONFIG_SITE"; then
2162b71ad168Smrg  ac_site_files="$CONFIG_SITE"
216364ce7165Smrgelif test "x$prefix" != xNONE; then
2164b71ad168Smrg  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
216564ce7165Smrgelse
2166b71ad168Smrg  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
216764ce7165Smrgfi
2168b71ad168Smrg
2169b71ad168Smrgfor ac_site_file in $ac_site_files
217064ce7165Smrgdo
2171b71ad168Smrg  case $ac_site_file in #(
2172b71ad168Smrg  */*) :
2173b71ad168Smrg     ;; #(
2174b71ad168Smrg  *) :
2175b71ad168Smrg    ac_site_file=./$ac_site_file ;;
2176b71ad168Smrgesac
2177b71ad168Smrg  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2178b71ad168Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2179b71ad168Smrgprintf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
218064ce7165Smrg    sed 's/^/| /' "$ac_site_file" >&5
2181169a0819Smrg    . "$ac_site_file" \
2182b71ad168Smrg      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2183b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2184169a0819Smrgas_fn_error $? "failed to load site script $ac_site_file
2185169a0819SmrgSee \`config.log' for more details" "$LINENO" 5; }
218664ce7165Smrg  fi
218764ce7165Smrgdone
218864ce7165Smrg
218964ce7165Smrgif test -r "$cache_file"; then
2190169a0819Smrg  # Some versions of bash will fail to source /dev/null (special files
2191169a0819Smrg  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2192169a0819Smrg  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2193b71ad168Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2194b71ad168Smrgprintf "%s\n" "$as_me: loading cache $cache_file" >&6;}
219564ce7165Smrg    case $cache_file in
219664ce7165Smrg      [\\/]* | ?:[\\/]* ) . "$cache_file";;
219764ce7165Smrg      *)                      . "./$cache_file";;
219864ce7165Smrg    esac
219964ce7165Smrg  fi
220064ce7165Smrgelse
2201b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2202b71ad168Smrgprintf "%s\n" "$as_me: creating cache $cache_file" >&6;}
220364ce7165Smrg  >$cache_file
220464ce7165Smrgfi
220564ce7165Smrg
2206b71ad168Smrgas_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2207b71ad168Smrg# Test code for whether the C compiler supports C89 (global declarations)
2208b71ad168Smrgac_c_conftest_c89_globals='
2209b71ad168Smrg/* Does the compiler advertise C89 conformance?
2210b71ad168Smrg   Do not test the value of __STDC__, because some compilers set it to 0
2211b71ad168Smrg   while being otherwise adequately conformant. */
2212b71ad168Smrg#if !defined __STDC__
2213b71ad168Smrg# error "Compiler does not advertise C89 conformance"
2214b71ad168Smrg#endif
22153544ea2eSmrg
2216b71ad168Smrg#include <stddef.h>
2217b71ad168Smrg#include <stdarg.h>
2218b71ad168Smrgstruct stat;
2219b71ad168Smrg/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2220b71ad168Smrgstruct buf { int x; };
2221b71ad168Smrgstruct buf * (*rcsopen) (struct buf *, struct stat *, int);
2222b71ad168Smrgstatic char *e (p, i)
2223b71ad168Smrg     char **p;
2224b71ad168Smrg     int i;
2225b71ad168Smrg{
2226b71ad168Smrg  return p[i];
2227b71ad168Smrg}
2228b71ad168Smrgstatic char *f (char * (*g) (char **, int), char **p, ...)
2229b71ad168Smrg{
2230b71ad168Smrg  char *s;
2231b71ad168Smrg  va_list v;
2232b71ad168Smrg  va_start (v,p);
2233b71ad168Smrg  s = g (p, va_arg (v,int));
2234b71ad168Smrg  va_end (v);
2235b71ad168Smrg  return s;
2236b71ad168Smrg}
223764ce7165Smrg
2238b71ad168Smrg/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2239b71ad168Smrg   function prototypes and stuff, but not \xHH hex character constants.
2240b71ad168Smrg   These do not provoke an error unfortunately, instead are silently treated
2241b71ad168Smrg   as an "x".  The following induces an error, until -std is added to get
2242b71ad168Smrg   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2243b71ad168Smrg   array size at least.  It is necessary to write \x00 == 0 to get something
2244b71ad168Smrg   that is true only with -std.  */
2245b71ad168Smrgint osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2246b71ad168Smrg
2247b71ad168Smrg/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2248b71ad168Smrg   inside strings and character constants.  */
2249b71ad168Smrg#define FOO(x) '\''x'\''
2250b71ad168Smrgint xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2251b71ad168Smrg
2252b71ad168Smrgint test (int i, double x);
2253b71ad168Smrgstruct s1 {int (*f) (int a);};
2254b71ad168Smrgstruct s2 {int (*f) (double a);};
2255b71ad168Smrgint pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2256b71ad168Smrg               int, int);'
2257b71ad168Smrg
2258b71ad168Smrg# Test code for whether the C compiler supports C89 (body of main).
2259b71ad168Smrgac_c_conftest_c89_main='
2260b71ad168Smrgok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2261b71ad168Smrg'
2262b71ad168Smrg
2263b71ad168Smrg# Test code for whether the C compiler supports C99 (global declarations)
2264b71ad168Smrgac_c_conftest_c99_globals='
2265b71ad168Smrg// Does the compiler advertise C99 conformance?
2266b71ad168Smrg#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2267b71ad168Smrg# error "Compiler does not advertise C99 conformance"
2268b71ad168Smrg#endif
2269b71ad168Smrg
2270b71ad168Smrg#include <stdbool.h>
2271b71ad168Smrgextern int puts (const char *);
2272b71ad168Smrgextern int printf (const char *, ...);
2273b71ad168Smrgextern int dprintf (int, const char *, ...);
2274b71ad168Smrgextern void *malloc (size_t);
2275b71ad168Smrg
2276b71ad168Smrg// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2277b71ad168Smrg// dprintf is used instead of fprintf to avoid needing to declare
2278b71ad168Smrg// FILE and stderr.
2279b71ad168Smrg#define debug(...) dprintf (2, __VA_ARGS__)
2280b71ad168Smrg#define showlist(...) puts (#__VA_ARGS__)
2281b71ad168Smrg#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2282b71ad168Smrgstatic void
2283b71ad168Smrgtest_varargs_macros (void)
2284b71ad168Smrg{
2285b71ad168Smrg  int x = 1234;
2286b71ad168Smrg  int y = 5678;
2287b71ad168Smrg  debug ("Flag");
2288b71ad168Smrg  debug ("X = %d\n", x);
2289b71ad168Smrg  showlist (The first, second, and third items.);
2290b71ad168Smrg  report (x>y, "x is %d but y is %d", x, y);
2291b71ad168Smrg}
2292b71ad168Smrg
2293b71ad168Smrg// Check long long types.
2294b71ad168Smrg#define BIG64 18446744073709551615ull
2295b71ad168Smrg#define BIG32 4294967295ul
2296b71ad168Smrg#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2297b71ad168Smrg#if !BIG_OK
2298b71ad168Smrg  #error "your preprocessor is broken"
2299b71ad168Smrg#endif
2300b71ad168Smrg#if BIG_OK
2301b71ad168Smrg#else
2302b71ad168Smrg  #error "your preprocessor is broken"
2303b71ad168Smrg#endif
2304b71ad168Smrgstatic long long int bignum = -9223372036854775807LL;
2305b71ad168Smrgstatic unsigned long long int ubignum = BIG64;
2306b71ad168Smrg
2307b71ad168Smrgstruct incomplete_array
2308b71ad168Smrg{
2309b71ad168Smrg  int datasize;
2310b71ad168Smrg  double data[];
2311b71ad168Smrg};
2312b71ad168Smrg
2313b71ad168Smrgstruct named_init {
2314b71ad168Smrg  int number;
2315b71ad168Smrg  const wchar_t *name;
2316b71ad168Smrg  double average;
2317b71ad168Smrg};
2318b71ad168Smrg
2319b71ad168Smrgtypedef const char *ccp;
2320b71ad168Smrg
2321b71ad168Smrgstatic inline int
2322b71ad168Smrgtest_restrict (ccp restrict text)
2323b71ad168Smrg{
2324b71ad168Smrg  // See if C++-style comments work.
2325b71ad168Smrg  // Iterate through items via the restricted pointer.
2326b71ad168Smrg  // Also check for declarations in for loops.
2327b71ad168Smrg  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2328b71ad168Smrg    continue;
2329b71ad168Smrg  return 0;
2330b71ad168Smrg}
2331b71ad168Smrg
2332b71ad168Smrg// Check varargs and va_copy.
2333b71ad168Smrgstatic bool
2334b71ad168Smrgtest_varargs (const char *format, ...)
2335b71ad168Smrg{
2336b71ad168Smrg  va_list args;
2337b71ad168Smrg  va_start (args, format);
2338b71ad168Smrg  va_list args_copy;
2339b71ad168Smrg  va_copy (args_copy, args);
2340b71ad168Smrg
2341b71ad168Smrg  const char *str = "";
2342b71ad168Smrg  int number = 0;
2343b71ad168Smrg  float fnumber = 0;
2344b71ad168Smrg
2345b71ad168Smrg  while (*format)
2346b71ad168Smrg    {
2347b71ad168Smrg      switch (*format++)
2348b71ad168Smrg	{
2349b71ad168Smrg	case '\''s'\'': // string
2350b71ad168Smrg	  str = va_arg (args_copy, const char *);
2351b71ad168Smrg	  break;
2352b71ad168Smrg	case '\''d'\'': // int
2353b71ad168Smrg	  number = va_arg (args_copy, int);
2354b71ad168Smrg	  break;
2355b71ad168Smrg	case '\''f'\'': // float
2356b71ad168Smrg	  fnumber = va_arg (args_copy, double);
2357b71ad168Smrg	  break;
2358b71ad168Smrg	default:
2359b71ad168Smrg	  break;
2360b71ad168Smrg	}
2361b71ad168Smrg    }
2362b71ad168Smrg  va_end (args_copy);
2363b71ad168Smrg  va_end (args);
2364b71ad168Smrg
2365b71ad168Smrg  return *str && number && fnumber;
2366b71ad168Smrg}
2367b71ad168Smrg'
2368b71ad168Smrg
2369b71ad168Smrg# Test code for whether the C compiler supports C99 (body of main).
2370b71ad168Smrgac_c_conftest_c99_main='
2371b71ad168Smrg  // Check bool.
2372b71ad168Smrg  _Bool success = false;
2373b71ad168Smrg  success |= (argc != 0);
2374b71ad168Smrg
2375b71ad168Smrg  // Check restrict.
2376b71ad168Smrg  if (test_restrict ("String literal") == 0)
2377b71ad168Smrg    success = true;
2378b71ad168Smrg  char *restrict newvar = "Another string";
2379b71ad168Smrg
2380b71ad168Smrg  // Check varargs.
2381b71ad168Smrg  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2382b71ad168Smrg  test_varargs_macros ();
2383b71ad168Smrg
2384b71ad168Smrg  // Check flexible array members.
2385b71ad168Smrg  struct incomplete_array *ia =
2386b71ad168Smrg    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2387b71ad168Smrg  ia->datasize = 10;
2388b71ad168Smrg  for (int i = 0; i < ia->datasize; ++i)
2389b71ad168Smrg    ia->data[i] = i * 1.234;
2390b71ad168Smrg
2391b71ad168Smrg  // Check named initializers.
2392b71ad168Smrg  struct named_init ni = {
2393b71ad168Smrg    .number = 34,
2394b71ad168Smrg    .name = L"Test wide string",
2395b71ad168Smrg    .average = 543.34343,
2396b71ad168Smrg  };
2397b71ad168Smrg
2398b71ad168Smrg  ni.number = 58;
2399b71ad168Smrg
2400b71ad168Smrg  int dynamic_array[ni.number];
2401b71ad168Smrg  dynamic_array[0] = argv[0][0];
2402b71ad168Smrg  dynamic_array[ni.number - 1] = 543;
2403b71ad168Smrg
2404b71ad168Smrg  // work around unused variable warnings
2405b71ad168Smrg  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2406b71ad168Smrg	 || dynamic_array[ni.number - 1] != 543);
2407b71ad168Smrg'
2408b71ad168Smrg
2409b71ad168Smrg# Test code for whether the C compiler supports C11 (global declarations)
2410b71ad168Smrgac_c_conftest_c11_globals='
2411b71ad168Smrg// Does the compiler advertise C11 conformance?
2412b71ad168Smrg#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2413b71ad168Smrg# error "Compiler does not advertise C11 conformance"
2414b71ad168Smrg#endif
2415b71ad168Smrg
2416b71ad168Smrg// Check _Alignas.
2417b71ad168Smrgchar _Alignas (double) aligned_as_double;
2418b71ad168Smrgchar _Alignas (0) no_special_alignment;
2419b71ad168Smrgextern char aligned_as_int;
2420b71ad168Smrgchar _Alignas (0) _Alignas (int) aligned_as_int;
2421b71ad168Smrg
2422b71ad168Smrg// Check _Alignof.
2423b71ad168Smrgenum
2424b71ad168Smrg{
2425b71ad168Smrg  int_alignment = _Alignof (int),
2426b71ad168Smrg  int_array_alignment = _Alignof (int[100]),
2427b71ad168Smrg  char_alignment = _Alignof (char)
2428b71ad168Smrg};
2429b71ad168Smrg_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2430b71ad168Smrg
2431b71ad168Smrg// Check _Noreturn.
2432b71ad168Smrgint _Noreturn does_not_return (void) { for (;;) continue; }
2433b71ad168Smrg
2434b71ad168Smrg// Check _Static_assert.
2435b71ad168Smrgstruct test_static_assert
2436b71ad168Smrg{
2437b71ad168Smrg  int x;
2438b71ad168Smrg  _Static_assert (sizeof (int) <= sizeof (long int),
2439b71ad168Smrg                  "_Static_assert does not work in struct");
2440b71ad168Smrg  long int y;
2441b71ad168Smrg};
2442b71ad168Smrg
2443b71ad168Smrg// Check UTF-8 literals.
2444b71ad168Smrg#define u8 syntax error!
2445b71ad168Smrgchar const utf8_literal[] = u8"happens to be ASCII" "another string";
2446b71ad168Smrg
2447b71ad168Smrg// Check duplicate typedefs.
2448b71ad168Smrgtypedef long *long_ptr;
2449b71ad168Smrgtypedef long int *long_ptr;
2450b71ad168Smrgtypedef long_ptr long_ptr;
2451b71ad168Smrg
2452b71ad168Smrg// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2453b71ad168Smrgstruct anonymous
2454b71ad168Smrg{
2455b71ad168Smrg  union {
2456b71ad168Smrg    struct { int i; int j; };
2457b71ad168Smrg    struct { int k; long int l; } w;
2458b71ad168Smrg  };
2459b71ad168Smrg  int m;
2460b71ad168Smrg} v1;
2461b71ad168Smrg'
2462b71ad168Smrg
2463b71ad168Smrg# Test code for whether the C compiler supports C11 (body of main).
2464b71ad168Smrgac_c_conftest_c11_main='
2465b71ad168Smrg  _Static_assert ((offsetof (struct anonymous, i)
2466b71ad168Smrg		   == offsetof (struct anonymous, w.k)),
2467b71ad168Smrg		  "Anonymous union alignment botch");
2468b71ad168Smrg  v1.i = 2;
2469b71ad168Smrg  v1.w.k = 5;
2470b71ad168Smrg  ok |= v1.i != 5;
2471b71ad168Smrg'
2472b71ad168Smrg
2473b71ad168Smrg# Test code for whether the C compiler supports C11 (complete).
2474b71ad168Smrgac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2475b71ad168Smrg${ac_c_conftest_c99_globals}
2476b71ad168Smrg${ac_c_conftest_c11_globals}
2477b71ad168Smrg
2478b71ad168Smrgint
2479b71ad168Smrgmain (int argc, char **argv)
2480b71ad168Smrg{
2481b71ad168Smrg  int ok = 0;
2482b71ad168Smrg  ${ac_c_conftest_c89_main}
2483b71ad168Smrg  ${ac_c_conftest_c99_main}
2484b71ad168Smrg  ${ac_c_conftest_c11_main}
2485b71ad168Smrg  return ok;
2486b71ad168Smrg}
2487b71ad168Smrg"
2488b71ad168Smrg
2489b71ad168Smrg# Test code for whether the C compiler supports C99 (complete).
2490b71ad168Smrgac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2491b71ad168Smrg${ac_c_conftest_c99_globals}
2492b71ad168Smrg
2493b71ad168Smrgint
2494b71ad168Smrgmain (int argc, char **argv)
2495b71ad168Smrg{
2496b71ad168Smrg  int ok = 0;
2497b71ad168Smrg  ${ac_c_conftest_c89_main}
2498b71ad168Smrg  ${ac_c_conftest_c99_main}
2499b71ad168Smrg  return ok;
2500b71ad168Smrg}
2501b71ad168Smrg"
2502b71ad168Smrg
2503b71ad168Smrg# Test code for whether the C compiler supports C89 (complete).
2504b71ad168Smrgac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2505b71ad168Smrg
2506b71ad168Smrgint
2507b71ad168Smrgmain (int argc, char **argv)
2508b71ad168Smrg{
2509b71ad168Smrg  int ok = 0;
2510b71ad168Smrg  ${ac_c_conftest_c89_main}
2511b71ad168Smrg  return ok;
2512b71ad168Smrg}
2513b71ad168Smrg"
2514b71ad168Smrg
2515b71ad168Smrgas_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2516b71ad168Smrgas_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2517b71ad168Smrgas_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2518b71ad168Smrgas_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2519b71ad168Smrgas_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2520b71ad168Smrgas_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2521b71ad168Smrgas_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2522b71ad168Smrgas_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2523b71ad168Smrgas_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
2524b71ad168Smrgas_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
2525b71ad168Smrg
2526b71ad168Smrg# Auxiliary files required by this configure script.
2527b71ad168Smrgac_aux_files="config.guess config.sub compile missing install-sh"
2528b71ad168Smrg
2529b71ad168Smrg# Locations in which to look for auxiliary files.
2530b71ad168Smrgac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2531b71ad168Smrg
2532b71ad168Smrg# Search for a directory containing all of the required auxiliary files,
2533b71ad168Smrg# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2534b71ad168Smrg# If we don't find one directory that contains all the files we need,
2535b71ad168Smrg# we report the set of missing files from the *first* directory in
2536b71ad168Smrg# $ac_aux_dir_candidates and give up.
2537b71ad168Smrgac_missing_aux_files=""
2538b71ad168Smrgac_first_candidate=:
2539b71ad168Smrgprintf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2540b71ad168Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2541b71ad168Smrgas_found=false
2542b71ad168Smrgfor as_dir in $ac_aux_dir_candidates
2543b71ad168Smrgdo
2544b71ad168Smrg  IFS=$as_save_IFS
2545b71ad168Smrg  case $as_dir in #(((
2546b71ad168Smrg    '') as_dir=./ ;;
2547b71ad168Smrg    */) ;;
2548b71ad168Smrg    *) as_dir=$as_dir/ ;;
2549b71ad168Smrg  esac
2550b71ad168Smrg  as_found=:
2551b71ad168Smrg
2552b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
2553b71ad168Smrg  ac_aux_dir_found=yes
2554b71ad168Smrg  ac_install_sh=
2555b71ad168Smrg  for ac_aux in $ac_aux_files
2556b71ad168Smrg  do
2557b71ad168Smrg    # As a special case, if "install-sh" is required, that requirement
2558b71ad168Smrg    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
2559b71ad168Smrg    # and $ac_install_sh is set appropriately for whichever one is found.
2560b71ad168Smrg    if test x"$ac_aux" = x"install-sh"
2561b71ad168Smrg    then
2562b71ad168Smrg      if test -f "${as_dir}install-sh"; then
2563b71ad168Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
2564b71ad168Smrg        ac_install_sh="${as_dir}install-sh -c"
2565b71ad168Smrg      elif test -f "${as_dir}install.sh"; then
2566b71ad168Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
2567b71ad168Smrg        ac_install_sh="${as_dir}install.sh -c"
2568b71ad168Smrg      elif test -f "${as_dir}shtool"; then
2569b71ad168Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
2570b71ad168Smrg        ac_install_sh="${as_dir}shtool install -c"
2571b71ad168Smrg      else
2572b71ad168Smrg        ac_aux_dir_found=no
2573b71ad168Smrg        if $ac_first_candidate; then
2574b71ad168Smrg          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
2575b71ad168Smrg        else
2576b71ad168Smrg          break
2577b71ad168Smrg        fi
2578b71ad168Smrg      fi
2579b71ad168Smrg    else
2580b71ad168Smrg      if test -f "${as_dir}${ac_aux}"; then
2581b71ad168Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
2582b71ad168Smrg      else
2583b71ad168Smrg        ac_aux_dir_found=no
2584b71ad168Smrg        if $ac_first_candidate; then
2585b71ad168Smrg          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
2586b71ad168Smrg        else
2587b71ad168Smrg          break
2588b71ad168Smrg        fi
2589b71ad168Smrg      fi
2590b71ad168Smrg    fi
2591b71ad168Smrg  done
2592b71ad168Smrg  if test "$ac_aux_dir_found" = yes; then
2593b71ad168Smrg    ac_aux_dir="$as_dir"
259464ce7165Smrg    break
259564ce7165Smrg  fi
2596b71ad168Smrg  ac_first_candidate=false
2597b71ad168Smrg
2598b71ad168Smrg  as_found=false
259964ce7165Smrgdone
2600b71ad168SmrgIFS=$as_save_IFS
2601b71ad168Smrgif $as_found
2602b71ad168Smrgthen :
2603b71ad168Smrg
2604b71ad168Smrgelse $as_nop
2605b71ad168Smrg  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
260664ce7165Smrgfi
260764ce7165Smrg
2608b71ad168Smrg
260964ce7165Smrg# These three variables are undocumented and unsupported,
261064ce7165Smrg# and are intended to be withdrawn in a future Autoconf release.
261164ce7165Smrg# They can cause serious problems if a builder's source tree is in a directory
261264ce7165Smrg# whose full name contains unusual characters.
2613b71ad168Smrgif test -f "${ac_aux_dir}config.guess"; then
2614b71ad168Smrg  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
2615b71ad168Smrgfi
2616b71ad168Smrgif test -f "${ac_aux_dir}config.sub"; then
2617b71ad168Smrg  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
2618b71ad168Smrgfi
2619b71ad168Smrgif test -f "$ac_aux_dir/configure"; then
2620b71ad168Smrg  ac_configure="$SHELL ${ac_aux_dir}configure"
2621b71ad168Smrgfi
2622b71ad168Smrg
2623b71ad168Smrg# Check that the precious variables saved in the cache have kept the same
2624b71ad168Smrg# value.
2625b71ad168Smrgac_cache_corrupted=false
2626b71ad168Smrgfor ac_var in $ac_precious_vars; do
2627b71ad168Smrg  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628b71ad168Smrg  eval ac_new_set=\$ac_env_${ac_var}_set
2629b71ad168Smrg  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630b71ad168Smrg  eval ac_new_val=\$ac_env_${ac_var}_value
2631b71ad168Smrg  case $ac_old_set,$ac_new_set in
2632b71ad168Smrg    set,)
2633b71ad168Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634b71ad168Smrgprintf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2635b71ad168Smrg      ac_cache_corrupted=: ;;
2636b71ad168Smrg    ,set)
2637b71ad168Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638b71ad168Smrgprintf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2639b71ad168Smrg      ac_cache_corrupted=: ;;
2640b71ad168Smrg    ,);;
2641b71ad168Smrg    *)
2642b71ad168Smrg      if test "x$ac_old_val" != "x$ac_new_val"; then
2643b71ad168Smrg	# differences in whitespace do not lead to failure.
2644b71ad168Smrg	ac_old_val_w=`echo x $ac_old_val`
2645b71ad168Smrg	ac_new_val_w=`echo x $ac_new_val`
2646b71ad168Smrg	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647b71ad168Smrg	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648b71ad168Smrgprintf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649b71ad168Smrg	  ac_cache_corrupted=:
2650b71ad168Smrg	else
2651b71ad168Smrg	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652b71ad168Smrgprintf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653b71ad168Smrg	  eval $ac_var=\$ac_old_val
2654b71ad168Smrg	fi
2655b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2656b71ad168Smrgprintf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
2657b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2658b71ad168Smrgprintf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
2659b71ad168Smrg      fi;;
2660b71ad168Smrg  esac
2661b71ad168Smrg  # Pass precious variables to config.status.
2662b71ad168Smrg  if test "$ac_new_set" = set; then
2663b71ad168Smrg    case $ac_new_val in
2664b71ad168Smrg    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2665b71ad168Smrg    *) ac_arg=$ac_var=$ac_new_val ;;
2666b71ad168Smrg    esac
2667b71ad168Smrg    case " $ac_configure_args " in
2668b71ad168Smrg      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2669b71ad168Smrg      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2670b71ad168Smrg    esac
2671b71ad168Smrg  fi
2672b71ad168Smrgdone
2673b71ad168Smrgif $ac_cache_corrupted; then
2674b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2676b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677b71ad168Smrgprintf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2678b71ad168Smrg  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2679b71ad168Smrg	    and start over" "$LINENO" 5
2680b71ad168Smrgfi
2681b71ad168Smrg## -------------------- ##
2682b71ad168Smrg## Main body of script. ##
2683b71ad168Smrg## -------------------- ##
2684b71ad168Smrg
2685b71ad168Smrgac_ext=c
2686b71ad168Smrgac_cpp='$CPP $CPPFLAGS'
2687b71ad168Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688b71ad168Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689b71ad168Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
2690b71ad168Smrg
2691b71ad168Smrg
2692b71ad168Smrg
2693b71ad168Smrgac_config_headers="$ac_config_headers config.h"
2694b71ad168Smrg
2695b71ad168Smrg
2696b71ad168Smrg# Initialize Automake
2697b71ad168Smrgam__api_version='1.16'
269864ce7165Smrg
269964ce7165Smrg
2700b71ad168Smrg
2701b71ad168Smrg  # Find a good install program.  We prefer a C program (faster),
270264ce7165Smrg# so one script is as good as another.  But avoid the broken or
270364ce7165Smrg# incompatible versions:
270464ce7165Smrg# SysV /etc/install, /usr/sbin/install
270564ce7165Smrg# SunOS /usr/etc/install
270664ce7165Smrg# IRIX /sbin/install
270764ce7165Smrg# AIX /bin/install
270864ce7165Smrg# AmigaOS /C/install, which installs bootblocks on floppy discs
270964ce7165Smrg# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
271064ce7165Smrg# AFS /usr/afsws/bin/install, which mishandles nonexistent args
271164ce7165Smrg# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
271264ce7165Smrg# OS/2's system install, which has a completely different semantic
271364ce7165Smrg# ./install, which can be erroneously created by make from ./install.sh.
2714fb23d3a8Smrg# Reject install programs that cannot install multiple files.
2715b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2716b71ad168Smrgprintf %s "checking for a BSD-compatible install... " >&6; }
271764ce7165Smrgif test -z "$INSTALL"; then
2718b71ad168Smrgif test ${ac_cv_path_install+y}
2719b71ad168Smrgthen :
2720b71ad168Smrg  printf %s "(cached) " >&6
2721b71ad168Smrgelse $as_nop
272264ce7165Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
272364ce7165Smrgfor as_dir in $PATH
272464ce7165Smrgdo
272564ce7165Smrg  IFS=$as_save_IFS
2726b71ad168Smrg  case $as_dir in #(((
2727b71ad168Smrg    '') as_dir=./ ;;
2728b71ad168Smrg    */) ;;
2729b71ad168Smrg    *) as_dir=$as_dir/ ;;
2730b71ad168Smrg  esac
2731b71ad168Smrg    # Account for fact that we put trailing slashes in our PATH walk.
2732b71ad168Smrgcase $as_dir in #((
2733b71ad168Smrg  ./ | /[cC]/* | \
273464ce7165Smrg  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2735169a0819Smrg  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
273664ce7165Smrg  /usr/ucb/* ) ;;
273764ce7165Smrg  *)
273864ce7165Smrg    # OSF1 and SCO ODT 3.0 have their own names for install.
273964ce7165Smrg    # Don't use installbsd from OSF since it installs stuff as root
274064ce7165Smrg    # by default.
274164ce7165Smrg    for ac_prog in ginstall scoinst install; do
274264ce7165Smrg      for ac_exec_ext in '' $ac_executable_extensions; do
2743b71ad168Smrg	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
274464ce7165Smrg	  if test $ac_prog = install &&
2745b71ad168Smrg	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
274664ce7165Smrg	    # AIX install.  It has an incompatible calling convention.
274764ce7165Smrg	    :
274864ce7165Smrg	  elif test $ac_prog = install &&
2749b71ad168Smrg	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
275064ce7165Smrg	    # program-specific install script used by HP pwplus--don't use.
275164ce7165Smrg	    :
275264ce7165Smrg	  else
2753fb23d3a8Smrg	    rm -rf conftest.one conftest.two conftest.dir
2754fb23d3a8Smrg	    echo one > conftest.one
2755fb23d3a8Smrg	    echo two > conftest.two
2756fb23d3a8Smrg	    mkdir conftest.dir
2757b71ad168Smrg	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
2758fb23d3a8Smrg	      test -s conftest.one && test -s conftest.two &&
2759fb23d3a8Smrg	      test -s conftest.dir/conftest.one &&
2760fb23d3a8Smrg	      test -s conftest.dir/conftest.two
2761fb23d3a8Smrg	    then
2762b71ad168Smrg	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
2763fb23d3a8Smrg	      break 3
2764fb23d3a8Smrg	    fi
276564ce7165Smrg	  fi
276664ce7165Smrg	fi
276764ce7165Smrg      done
276864ce7165Smrg    done
276964ce7165Smrg    ;;
277064ce7165Smrgesac
2771fb23d3a8Smrg
2772169a0819Smrg  done
277364ce7165SmrgIFS=$as_save_IFS
277464ce7165Smrg
2775fb23d3a8Smrgrm -rf conftest.one conftest.two conftest.dir
277664ce7165Smrg
277764ce7165Smrgfi
2778b71ad168Smrg  if test ${ac_cv_path_install+y}; then
277964ce7165Smrg    INSTALL=$ac_cv_path_install
278064ce7165Smrg  else
278164ce7165Smrg    # As a last resort, use the slow shell script.  Don't cache a
278264ce7165Smrg    # value for INSTALL within a source directory, because that will
278364ce7165Smrg    # break other packages using the cache if that directory is
278464ce7165Smrg    # removed, or if the value is a relative name.
278564ce7165Smrg    INSTALL=$ac_install_sh
278664ce7165Smrg  fi
278764ce7165Smrgfi
2788b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2789b71ad168Smrgprintf "%s\n" "$INSTALL" >&6; }
279064ce7165Smrg
279164ce7165Smrg# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
279264ce7165Smrg# It thinks the first close brace ends the variable substitution.
279364ce7165Smrgtest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
279464ce7165Smrg
279564ce7165Smrgtest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
279664ce7165Smrg
279764ce7165Smrgtest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
279864ce7165Smrg
2799b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2800b71ad168Smrgprintf %s "checking whether build environment is sane... " >&6; }
2801fb23d3a8Smrg# Reject unsafe characters in $srcdir or the absolute working directory
2802fb23d3a8Smrg# name.  Accept space and tab only in the latter.
2803fb23d3a8Smrgam_lf='
2804fb23d3a8Smrg'
2805fb23d3a8Smrgcase `pwd` in
2806fb23d3a8Smrg  *[\\\"\#\$\&\'\`$am_lf]*)
2807169a0819Smrg    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2808fb23d3a8Smrgesac
2809fb23d3a8Smrgcase $srcdir in
2810fb23d3a8Smrg  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
281181440437Smrg    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2812fb23d3a8Smrgesac
2813fb23d3a8Smrg
281481440437Smrg# Do 'set' in a subshell so we don't clobber the current shell's
281564ce7165Smrg# arguments.  Must try -L first in case configure is actually a
281664ce7165Smrg# symlink; some systems play weird games with the mod time of symlinks
281764ce7165Smrg# (eg FreeBSD returns the mod time of the symlink's containing
281864ce7165Smrg# directory).
281964ce7165Smrgif (
282081440437Smrg   am_has_slept=no
282181440437Smrg   for am_try in 1 2; do
282281440437Smrg     echo "timestamp, slept: $am_has_slept" > conftest.file
282381440437Smrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
282481440437Smrg     if test "$*" = "X"; then
282581440437Smrg	# -L didn't work.
282681440437Smrg	set X `ls -t "$srcdir/configure" conftest.file`
282781440437Smrg     fi
282881440437Smrg     if test "$*" != "X $srcdir/configure conftest.file" \
282981440437Smrg	&& test "$*" != "X conftest.file $srcdir/configure"; then
283081440437Smrg
283181440437Smrg	# If neither matched, then we have a broken ls.  This can happen
283281440437Smrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
283381440437Smrg	# broken ls alias from the environment.  This has actually
283481440437Smrg	# happened.  Such a system could not be considered "sane".
283581440437Smrg	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
283681440437Smrg  alias in your environment" "$LINENO" 5
283781440437Smrg     fi
283881440437Smrg     if test "$2" = conftest.file || test $am_try -eq 2; then
283981440437Smrg       break
284081440437Smrg     fi
284181440437Smrg     # Just in case.
284281440437Smrg     sleep 1
284381440437Smrg     am_has_slept=yes
284481440437Smrg   done
284564ce7165Smrg   test "$2" = conftest.file
284664ce7165Smrg   )
284764ce7165Smrgthen
284864ce7165Smrg   # Ok.
284964ce7165Smrg   :
285064ce7165Smrgelse
2851169a0819Smrg   as_fn_error $? "newly created file is older than distributed files!
2852169a0819SmrgCheck your system clock" "$LINENO" 5
285364ce7165Smrgfi
2854b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2855b71ad168Smrgprintf "%s\n" "yes" >&6; }
285681440437Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and
285781440437Smrg# generated files are strictly newer.
285881440437Smrgam_sleep_pid=
285981440437Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
286081440437Smrg  ( sleep 1 ) &
286181440437Smrg  am_sleep_pid=$!
286281440437Smrgfi
286381440437Smrg
286481440437Smrgrm -f conftest.file
286581440437Smrg
286664ce7165Smrgtest "$program_prefix" != NONE &&
286764ce7165Smrg  program_transform_name="s&^&$program_prefix&;$program_transform_name"
286864ce7165Smrg# Use a double $ so make ignores it.
286964ce7165Smrgtest "$program_suffix" != NONE &&
287064ce7165Smrg  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2871fb23d3a8Smrg# Double any \ or $.
287264ce7165Smrg# By default was `s,x,x', remove it if useless.
2873fb23d3a8Smrgac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2874b71ad168Smrgprogram_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
2875b71ad168Smrg
287664ce7165Smrg
287795fdd44cSmrg# Expand $ac_aux_dir to an absolute path.
287895fdd44cSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
287964ce7165Smrg
2880b71ad168Smrg
2881b71ad168Smrg  if test x"${MISSING+set}" != xset; then
2882b71ad168Smrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
2883fb23d3a8Smrgfi
288464ce7165Smrg# Use eval to expand $SHELL
288581440437Smrgif eval "$MISSING --is-lightweight"; then
288681440437Smrg  am_missing_run="$MISSING "
288764ce7165Smrgelse
288864ce7165Smrg  am_missing_run=
2889b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2890b71ad168Smrgprintf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
289164ce7165Smrgfi
289264ce7165Smrg
289395fdd44cSmrgif test x"${install_sh+set}" != xset; then
2894fb23d3a8Smrg  case $am_aux_dir in
2895fb23d3a8Smrg  *\ * | *\	*)
2896fb23d3a8Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2897fb23d3a8Smrg  *)
2898fb23d3a8Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
2899fb23d3a8Smrg  esac
2900fb23d3a8Smrgfi
2901fb23d3a8Smrg
290281440437Smrg# Installed binaries are usually stripped using 'strip' when the user
290381440437Smrg# run "make install-strip".  However 'strip' might not be the right
2904fb23d3a8Smrg# tool to use in cross-compilation environments, therefore Automake
290581440437Smrg# will honor the 'STRIP' environment variable to overrule this program.
2906fb23d3a8Smrgif test "$cross_compiling" != no; then
2907fb23d3a8Smrg  if test -n "$ac_tool_prefix"; then
2908fb23d3a8Smrg  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2909fb23d3a8Smrgset dummy ${ac_tool_prefix}strip; ac_word=$2
2910b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2911b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
2912b71ad168Smrgif test ${ac_cv_prog_STRIP+y}
2913b71ad168Smrgthen :
2914b71ad168Smrg  printf %s "(cached) " >&6
2915b71ad168Smrgelse $as_nop
2916fb23d3a8Smrg  if test -n "$STRIP"; then
2917fb23d3a8Smrg  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2918fb23d3a8Smrgelse
2919fb23d3a8Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2920fb23d3a8Smrgfor as_dir in $PATH
2921fb23d3a8Smrgdo
2922fb23d3a8Smrg  IFS=$as_save_IFS
2923b71ad168Smrg  case $as_dir in #(((
2924b71ad168Smrg    '') as_dir=./ ;;
2925b71ad168Smrg    */) ;;
2926b71ad168Smrg    *) as_dir=$as_dir/ ;;
2927b71ad168Smrg  esac
2928169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
2929b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2930fb23d3a8Smrg    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2931b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2932fb23d3a8Smrg    break 2
2933fb23d3a8Smrg  fi
2934fb23d3a8Smrgdone
2935169a0819Smrg  done
2936fb23d3a8SmrgIFS=$as_save_IFS
2937fb23d3a8Smrg
2938fb23d3a8Smrgfi
2939fb23d3a8Smrgfi
2940fb23d3a8SmrgSTRIP=$ac_cv_prog_STRIP
2941fb23d3a8Smrgif test -n "$STRIP"; then
2942b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2943b71ad168Smrgprintf "%s\n" "$STRIP" >&6; }
2944fb23d3a8Smrgelse
2945b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2946b71ad168Smrgprintf "%s\n" "no" >&6; }
2947fb23d3a8Smrgfi
2948fb23d3a8Smrg
2949fb23d3a8Smrg
2950fb23d3a8Smrgfi
2951fb23d3a8Smrgif test -z "$ac_cv_prog_STRIP"; then
2952fb23d3a8Smrg  ac_ct_STRIP=$STRIP
2953fb23d3a8Smrg  # Extract the first word of "strip", so it can be a program name with args.
2954fb23d3a8Smrgset dummy strip; ac_word=$2
2955b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2956b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
2957b71ad168Smrgif test ${ac_cv_prog_ac_ct_STRIP+y}
2958b71ad168Smrgthen :
2959b71ad168Smrg  printf %s "(cached) " >&6
2960b71ad168Smrgelse $as_nop
2961fb23d3a8Smrg  if test -n "$ac_ct_STRIP"; then
2962fb23d3a8Smrg  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2963fb23d3a8Smrgelse
2964fb23d3a8Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2965fb23d3a8Smrgfor as_dir in $PATH
2966fb23d3a8Smrgdo
2967fb23d3a8Smrg  IFS=$as_save_IFS
2968b71ad168Smrg  case $as_dir in #(((
2969b71ad168Smrg    '') as_dir=./ ;;
2970b71ad168Smrg    */) ;;
2971b71ad168Smrg    *) as_dir=$as_dir/ ;;
2972b71ad168Smrg  esac
2973169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
2974b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
2975fb23d3a8Smrg    ac_cv_prog_ac_ct_STRIP="strip"
2976b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
2977fb23d3a8Smrg    break 2
2978fb23d3a8Smrg  fi
2979fb23d3a8Smrgdone
2980169a0819Smrg  done
2981fb23d3a8SmrgIFS=$as_save_IFS
2982fb23d3a8Smrg
2983fb23d3a8Smrgfi
2984fb23d3a8Smrgfi
2985fb23d3a8Smrgac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2986fb23d3a8Smrgif test -n "$ac_ct_STRIP"; then
2987b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2988b71ad168Smrgprintf "%s\n" "$ac_ct_STRIP" >&6; }
2989fb23d3a8Smrgelse
2990b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2991b71ad168Smrgprintf "%s\n" "no" >&6; }
2992fb23d3a8Smrgfi
2993fb23d3a8Smrg
2994fb23d3a8Smrg  if test "x$ac_ct_STRIP" = x; then
2995fb23d3a8Smrg    STRIP=":"
2996fb23d3a8Smrg  else
2997fb23d3a8Smrg    case $cross_compiling:$ac_tool_warned in
2998fb23d3a8Smrgyes:)
2999b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3000b71ad168Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3001fb23d3a8Smrgac_tool_warned=yes ;;
3002fb23d3a8Smrgesac
3003fb23d3a8Smrg    STRIP=$ac_ct_STRIP
3004fb23d3a8Smrg  fi
3005fb23d3a8Smrgelse
3006fb23d3a8Smrg  STRIP="$ac_cv_prog_STRIP"
3007fb23d3a8Smrgfi
3008fb23d3a8Smrg
3009fb23d3a8Smrgfi
3010fb23d3a8SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3011fb23d3a8Smrg
3012b71ad168Smrg
3013b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
3014b71ad168Smrgprintf %s "checking for a race-free mkdir -p... " >&6; }
3015fb23d3a8Smrgif test -z "$MKDIR_P"; then
3016b71ad168Smrg  if test ${ac_cv_path_mkdir+y}
3017b71ad168Smrgthen :
3018b71ad168Smrg  printf %s "(cached) " >&6
3019b71ad168Smrgelse $as_nop
302064ce7165Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
302164ce7165Smrgfor as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
302264ce7165Smrgdo
302364ce7165Smrg  IFS=$as_save_IFS
3024b71ad168Smrg  case $as_dir in #(((
3025b71ad168Smrg    '') as_dir=./ ;;
3026b71ad168Smrg    */) ;;
3027b71ad168Smrg    *) as_dir=$as_dir/ ;;
3028b71ad168Smrg  esac
3029169a0819Smrg    for ac_prog in mkdir gmkdir; do
303064ce7165Smrg	 for ac_exec_ext in '' $ac_executable_extensions; do
3031b71ad168Smrg	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3032b71ad168Smrg	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3033b71ad168Smrg	     'mkdir ('*'coreutils) '* | \
3034b71ad168Smrg	     'BusyBox '* | \
303564ce7165Smrg	     'mkdir (fileutils) '4.1*)
3036b71ad168Smrg	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
303764ce7165Smrg	       break 3;;
303864ce7165Smrg	   esac
303964ce7165Smrg	 done
304064ce7165Smrg       done
3041169a0819Smrg  done
304264ce7165SmrgIFS=$as_save_IFS
304364ce7165Smrg
304464ce7165Smrgfi
304564ce7165Smrg
3046169a0819Smrg  test -d ./--version && rmdir ./--version
3047b71ad168Smrg  if test ${ac_cv_path_mkdir+y}; then
304864ce7165Smrg    MKDIR_P="$ac_cv_path_mkdir -p"
304964ce7165Smrg  else
305064ce7165Smrg    # As a last resort, use the slow shell script.  Don't cache a
305164ce7165Smrg    # value for MKDIR_P within a source directory, because that will
305264ce7165Smrg    # break other packages using the cache if that directory is
305364ce7165Smrg    # removed, or if the value is a relative name.
305464ce7165Smrg    MKDIR_P="$ac_install_sh -d"
305564ce7165Smrg  fi
305664ce7165Smrgfi
3057b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3058b71ad168Smrgprintf "%s\n" "$MKDIR_P" >&6; }
305964ce7165Smrg
306064ce7165Smrgfor ac_prog in gawk mawk nawk awk
306164ce7165Smrgdo
306264ce7165Smrg  # Extract the first word of "$ac_prog", so it can be a program name with args.
306364ce7165Smrgset dummy $ac_prog; ac_word=$2
3064b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3065b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3066b71ad168Smrgif test ${ac_cv_prog_AWK+y}
3067b71ad168Smrgthen :
3068b71ad168Smrg  printf %s "(cached) " >&6
3069b71ad168Smrgelse $as_nop
307064ce7165Smrg  if test -n "$AWK"; then
307164ce7165Smrg  ac_cv_prog_AWK="$AWK" # Let the user override the test.
307264ce7165Smrgelse
307364ce7165Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
307464ce7165Smrgfor as_dir in $PATH
307564ce7165Smrgdo
307664ce7165Smrg  IFS=$as_save_IFS
3077b71ad168Smrg  case $as_dir in #(((
3078b71ad168Smrg    '') as_dir=./ ;;
3079b71ad168Smrg    */) ;;
3080b71ad168Smrg    *) as_dir=$as_dir/ ;;
3081b71ad168Smrg  esac
3082169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3083b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
308464ce7165Smrg    ac_cv_prog_AWK="$ac_prog"
3085b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
308664ce7165Smrg    break 2
308764ce7165Smrg  fi
308864ce7165Smrgdone
3089169a0819Smrg  done
309064ce7165SmrgIFS=$as_save_IFS
309164ce7165Smrg
309264ce7165Smrgfi
309364ce7165Smrgfi
309464ce7165SmrgAWK=$ac_cv_prog_AWK
309564ce7165Smrgif test -n "$AWK"; then
3096b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3097b71ad168Smrgprintf "%s\n" "$AWK" >&6; }
309864ce7165Smrgelse
3099b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3100b71ad168Smrgprintf "%s\n" "no" >&6; }
310164ce7165Smrgfi
310264ce7165Smrg
310364ce7165Smrg
310464ce7165Smrg  test -n "$AWK" && break
310564ce7165Smrgdone
310664ce7165Smrg
3107b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3108b71ad168Smrgprintf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3109fb23d3a8Smrgset x ${MAKE-make}
3110b71ad168Smrgac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3111b71ad168Smrgif eval test \${ac_cv_prog_make_${ac_make}_set+y}
3112b71ad168Smrgthen :
3113b71ad168Smrg  printf %s "(cached) " >&6
3114b71ad168Smrgelse $as_nop
311564ce7165Smrg  cat >conftest.make <<\_ACEOF
311664ce7165SmrgSHELL = /bin/sh
311764ce7165Smrgall:
311864ce7165Smrg	@echo '@@@%%%=$(MAKE)=@@@%%%'
311964ce7165Smrg_ACEOF
3120169a0819Smrg# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
312164ce7165Smrgcase `${MAKE-make} -f conftest.make 2>/dev/null` in
312264ce7165Smrg  *@@@%%%=?*=@@@%%%*)
312364ce7165Smrg    eval ac_cv_prog_make_${ac_make}_set=yes;;
312464ce7165Smrg  *)
312564ce7165Smrg    eval ac_cv_prog_make_${ac_make}_set=no;;
312664ce7165Smrgesac
312764ce7165Smrgrm -f conftest.make
312864ce7165Smrgfi
312964ce7165Smrgif eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3130b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3131b71ad168Smrgprintf "%s\n" "yes" >&6; }
313264ce7165Smrg  SET_MAKE=
313364ce7165Smrgelse
3134b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3135b71ad168Smrgprintf "%s\n" "no" >&6; }
313664ce7165Smrg  SET_MAKE="MAKE=${MAKE-make}"
313764ce7165Smrgfi
313864ce7165Smrg
313964ce7165Smrgrm -rf .tst 2>/dev/null
314064ce7165Smrgmkdir .tst 2>/dev/null
314164ce7165Smrgif test -d .tst; then
314264ce7165Smrg  am__leading_dot=.
314364ce7165Smrgelse
314464ce7165Smrg  am__leading_dot=_
314564ce7165Smrgfi
314664ce7165Smrgrmdir .tst 2>/dev/null
314764ce7165Smrg
314881440437Smrg# Check whether --enable-silent-rules was given.
3149b71ad168Smrgif test ${enable_silent_rules+y}
3150b71ad168Smrgthen :
315181440437Smrg  enableval=$enable_silent_rules;
315281440437Smrgfi
315381440437Smrg
315481440437Smrgcase $enable_silent_rules in # (((
315581440437Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
315681440437Smrg   no) AM_DEFAULT_VERBOSITY=1;;
315781440437Smrg    *) AM_DEFAULT_VERBOSITY=1;;
315881440437Smrgesac
315981440437Smrgam_make=${MAKE-make}
3160b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3161b71ad168Smrgprintf %s "checking whether $am_make supports nested variables... " >&6; }
3162b71ad168Smrgif test ${am_cv_make_support_nested_variables+y}
3163b71ad168Smrgthen :
3164b71ad168Smrg  printf %s "(cached) " >&6
3165b71ad168Smrgelse $as_nop
3166b71ad168Smrg  if printf "%s\n" 'TRUE=$(BAR$(V))
316781440437SmrgBAR0=false
316881440437SmrgBAR1=true
316981440437SmrgV=1
317081440437Smrgam__doit:
317181440437Smrg	@$(TRUE)
317281440437Smrg.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
317381440437Smrg  am_cv_make_support_nested_variables=yes
317481440437Smrgelse
317581440437Smrg  am_cv_make_support_nested_variables=no
317681440437Smrgfi
317781440437Smrgfi
3178b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3179b71ad168Smrgprintf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
318081440437Smrgif test $am_cv_make_support_nested_variables = yes; then
318181440437Smrg    AM_V='$(V)'
318281440437Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
318381440437Smrgelse
318481440437Smrg  AM_V=$AM_DEFAULT_VERBOSITY
318581440437Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
318681440437Smrgfi
318781440437SmrgAM_BACKSLASH='\'
318881440437Smrg
318964ce7165Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
319064ce7165Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
319164ce7165Smrg  # is not polluted with repeated "-I."
319264ce7165Smrg  am__isrc=' -I$(srcdir)'
319364ce7165Smrg  # test to see if srcdir already configured
319464ce7165Smrg  if test -f $srcdir/config.status; then
3195169a0819Smrg    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
319664ce7165Smrg  fi
319764ce7165Smrgfi
319864ce7165Smrg
319964ce7165Smrg# test whether we have cygpath
320064ce7165Smrgif test -z "$CYGPATH_W"; then
320164ce7165Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
320264ce7165Smrg    CYGPATH_W='cygpath -w'
320364ce7165Smrg  else
320464ce7165Smrg    CYGPATH_W=echo
320564ce7165Smrg  fi
320664ce7165Smrgfi
320764ce7165Smrg
320864ce7165Smrg
320964ce7165Smrg# Define the identity of the package.
321064ce7165Smrg PACKAGE='xhost'
3211b71ad168Smrg VERSION='1.0.9'
321264ce7165Smrg
321364ce7165Smrg
3214b71ad168Smrgprintf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
321564ce7165Smrg
321664ce7165Smrg
3217b71ad168Smrgprintf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
321864ce7165Smrg
321964ce7165Smrg# Some tools Automake needs.
322064ce7165Smrg
322164ce7165SmrgACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
322264ce7165Smrg
322364ce7165Smrg
322464ce7165SmrgAUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
322564ce7165Smrg
322664ce7165Smrg
322764ce7165SmrgAUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
322864ce7165Smrg
322964ce7165Smrg
323064ce7165SmrgAUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
323164ce7165Smrg
323264ce7165Smrg
323364ce7165SmrgMAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
323464ce7165Smrg
323581440437Smrg# For better backward compatibility.  To be removed once Automake 1.9.x
323681440437Smrg# dies out for good.  For more background, see:
3237b71ad168Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3238b71ad168Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
323981440437Smrgmkdir_p='$(MKDIR_P)'
324081440437Smrg
324195fdd44cSmrg# We need awk for the "check" target (and possibly the TAP driver).  The
324295fdd44cSmrg# system "awk" is bad on some platforms.
324381440437Smrg# Always define AMTAR for backward compatibility.  Yes, it's still used
324481440437Smrg# in the wild :-(  We should find a proper way to deprecate it ...
324581440437SmrgAMTAR='$${TAR-tar}'
324681440437Smrg
324764ce7165Smrg
324881440437Smrg# We'll loop over all known methods to create a tar archive until one works.
324981440437Smrg_am_tools='gnutar  pax cpio none'
325064ce7165Smrg
325181440437Smrgam__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
325264ce7165Smrg
325364ce7165Smrg
325464ce7165Smrg
325564ce7165Smrg
325664ce7165Smrg
3257b71ad168Smrg# Variables for tags utilities; see am/tags.am
3258b71ad168Smrgif test -z "$CTAGS"; then
3259b71ad168Smrg  CTAGS=ctags
3260b71ad168Smrgfi
3261b71ad168Smrg
3262b71ad168Smrgif test -z "$ETAGS"; then
3263b71ad168Smrg  ETAGS=etags
3264b71ad168Smrgfi
3265b71ad168Smrg
3266b71ad168Smrgif test -z "$CSCOPE"; then
3267b71ad168Smrg  CSCOPE=cscope
3268b71ad168Smrgfi
3269b71ad168Smrg
3270b71ad168Smrg
3271fb23d3a8Smrg
327281440437Smrg# POSIX will say in a future version that running "rm -f" with no argument
327381440437Smrg# is OK; and we want to be able to make that assumption in our Makefile
327481440437Smrg# recipes.  So use an aggressive probe to check that the usage we want is
327581440437Smrg# actually supported "in the wild" to an acceptable degree.
327681440437Smrg# See automake bug#10828.
327781440437Smrg# To make any issue more visible, cause the running configure to be aborted
327881440437Smrg# by default if the 'rm' program in use doesn't match our expectations; the
327981440437Smrg# user can still override this though.
328081440437Smrgif rm -f && rm -fr && rm -rf; then : OK; else
328181440437Smrg  cat >&2 <<'END'
328281440437SmrgOops!
328381440437Smrg
328481440437SmrgYour 'rm' program seems unable to run without file operands specified
328581440437Smrgon the command line, even when the '-f' option is present.  This is contrary
328681440437Smrgto the behaviour of most rm programs out there, and not conforming with
328781440437Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
328881440437Smrg
328981440437SmrgPlease tell bug-automake@gnu.org about your system, including the value
329081440437Smrgof your $PATH and any error possibly output before this message.  This
329181440437Smrgcan help us improve future automake versions.
329281440437Smrg
329381440437SmrgEND
329481440437Smrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
329581440437Smrg    echo 'Configuration will proceed anyway, since you have set the' >&2
329681440437Smrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
329781440437Smrg    echo >&2
329881440437Smrg  else
329981440437Smrg    cat >&2 <<'END'
330081440437SmrgAborting the configuration process, to ensure you take notice of the issue.
330181440437Smrg
330281440437SmrgYou can download and install GNU coreutils to get an 'rm' implementation
3303b71ad168Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
330481440437Smrg
330581440437SmrgIf you want to complete the configuration process using your problematic
330681440437Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
330781440437Smrgto "yes", and re-run configure.
330881440437Smrg
330981440437SmrgEND
331081440437Smrg    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
331181440437Smrg  fi
331281440437Smrgfi
331381440437Smrg
3314fb23d3a8Smrg
331595fdd44cSmrg# Set common system defines for POSIX extensions, such as _GNU_SOURCE
331695fdd44cSmrg# Must be called before any macros that run the compiler (like
331795fdd44cSmrg# XORG_DEFAULT_OPTIONS) to avoid autoconf errors.
3318b71ad168Smrg
3319b71ad168Smrg
3320b71ad168Smrg
3321b71ad168Smrg
3322b71ad168Smrg
3323b71ad168Smrg
3324b71ad168Smrg
3325b71ad168Smrg
3326b71ad168Smrg
3327169a0819SmrgDEPDIR="${am__leading_dot}deps"
3328169a0819Smrg
3329169a0819Smrgac_config_commands="$ac_config_commands depfiles"
3330169a0819Smrg
3331b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
3332b71ad168Smrgprintf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
3333b71ad168Smrgcat > confinc.mk << 'END'
3334169a0819Smrgam__doit:
3335b71ad168Smrg	@echo this is the am__doit target >confinc.out
3336169a0819Smrg.PHONY: am__doit
3337169a0819SmrgEND
3338169a0819Smrgam__include="#"
3339169a0819Smrgam__quote=
3340b71ad168Smrg# BSD make does it like this.
3341b71ad168Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD
3342b71ad168Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
3343b71ad168Smrgecho 'include confinc.mk # ignored' > confmf.GNU
3344b71ad168Smrg_am_result=no
3345b71ad168Smrgfor s in GNU BSD; do
3346b71ad168Smrg  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
3347b71ad168Smrg   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
3348b71ad168Smrg   ac_status=$?
3349b71ad168Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3350b71ad168Smrg   (exit $ac_status); }
3351b71ad168Smrg  case $?:`cat confinc.out 2>/dev/null` in #(
3352b71ad168Smrg  '0:this is the am__doit target') :
3353b71ad168Smrg    case $s in #(
3354b71ad168Smrg  BSD) :
3355b71ad168Smrg    am__include='.include' am__quote='"' ;; #(
3356b71ad168Smrg  *) :
3357b71ad168Smrg    am__include='include' am__quote='' ;;
3358b71ad168Smrgesac ;; #(
3359b71ad168Smrg  *) :
3360169a0819Smrg     ;;
3361b71ad168Smrgesac
3362b71ad168Smrg  if test "$am__include" != "#"; then
3363b71ad168Smrg    _am_result="yes ($s style)"
3364b71ad168Smrg    break
3365b71ad168Smrg  fi
3366b71ad168Smrgdone
3367b71ad168Smrgrm -f confinc.* confmf.*
3368b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
3369b71ad168Smrgprintf "%s\n" "${_am_result}" >&6; }
3370169a0819Smrg
3371169a0819Smrg# Check whether --enable-dependency-tracking was given.
3372b71ad168Smrgif test ${enable_dependency_tracking+y}
3373b71ad168Smrgthen :
3374169a0819Smrg  enableval=$enable_dependency_tracking;
3375169a0819Smrgfi
3376169a0819Smrg
3377169a0819Smrgif test "x$enable_dependency_tracking" != xno; then
3378169a0819Smrg  am_depcomp="$ac_aux_dir/depcomp"
3379169a0819Smrg  AMDEPBACKSLASH='\'
338081440437Smrg  am__nodep='_no'
3381169a0819Smrgfi
3382169a0819Smrg if test "x$enable_dependency_tracking" != xno; then
3383169a0819Smrg  AMDEP_TRUE=
3384169a0819Smrg  AMDEP_FALSE='#'
3385169a0819Smrgelse
3386169a0819Smrg  AMDEP_TRUE='#'
3387169a0819Smrg  AMDEP_FALSE=
3388169a0819Smrgfi
3389169a0819Smrg
3390169a0819Smrg
339164ce7165Smrgac_ext=c
339264ce7165Smrgac_cpp='$CPP $CPPFLAGS'
339364ce7165Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
339464ce7165Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
339564ce7165Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
339664ce7165Smrgif test -n "$ac_tool_prefix"; then
339764ce7165Smrg  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
339864ce7165Smrgset dummy ${ac_tool_prefix}gcc; ac_word=$2
3399b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3400b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3401b71ad168Smrgif test ${ac_cv_prog_CC+y}
3402b71ad168Smrgthen :
3403b71ad168Smrg  printf %s "(cached) " >&6
3404b71ad168Smrgelse $as_nop
340564ce7165Smrg  if test -n "$CC"; then
340664ce7165Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
340764ce7165Smrgelse
340864ce7165Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
340964ce7165Smrgfor as_dir in $PATH
341064ce7165Smrgdo
341164ce7165Smrg  IFS=$as_save_IFS
3412b71ad168Smrg  case $as_dir in #(((
3413b71ad168Smrg    '') as_dir=./ ;;
3414b71ad168Smrg    */) ;;
3415b71ad168Smrg    *) as_dir=$as_dir/ ;;
3416b71ad168Smrg  esac
3417169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3418b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
341964ce7165Smrg    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3420b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
342164ce7165Smrg    break 2
342264ce7165Smrg  fi
342364ce7165Smrgdone
3424169a0819Smrg  done
342564ce7165SmrgIFS=$as_save_IFS
342664ce7165Smrg
342764ce7165Smrgfi
342864ce7165Smrgfi
342964ce7165SmrgCC=$ac_cv_prog_CC
343064ce7165Smrgif test -n "$CC"; then
3431b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3432b71ad168Smrgprintf "%s\n" "$CC" >&6; }
343364ce7165Smrgelse
3434b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3435b71ad168Smrgprintf "%s\n" "no" >&6; }
343664ce7165Smrgfi
343764ce7165Smrg
343864ce7165Smrg
343964ce7165Smrgfi
344064ce7165Smrgif test -z "$ac_cv_prog_CC"; then
344164ce7165Smrg  ac_ct_CC=$CC
344264ce7165Smrg  # Extract the first word of "gcc", so it can be a program name with args.
344364ce7165Smrgset dummy gcc; ac_word=$2
3444b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3445b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3446b71ad168Smrgif test ${ac_cv_prog_ac_ct_CC+y}
3447b71ad168Smrgthen :
3448b71ad168Smrg  printf %s "(cached) " >&6
3449b71ad168Smrgelse $as_nop
345064ce7165Smrg  if test -n "$ac_ct_CC"; then
345164ce7165Smrg  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
345264ce7165Smrgelse
345364ce7165Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
345464ce7165Smrgfor as_dir in $PATH
345564ce7165Smrgdo
345664ce7165Smrg  IFS=$as_save_IFS
3457b71ad168Smrg  case $as_dir in #(((
3458b71ad168Smrg    '') as_dir=./ ;;
3459b71ad168Smrg    */) ;;
3460b71ad168Smrg    *) as_dir=$as_dir/ ;;
3461b71ad168Smrg  esac
3462169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3463b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
346464ce7165Smrg    ac_cv_prog_ac_ct_CC="gcc"
3465b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
346664ce7165Smrg    break 2
346764ce7165Smrg  fi
346864ce7165Smrgdone
3469169a0819Smrg  done
347064ce7165SmrgIFS=$as_save_IFS
347164ce7165Smrg
347264ce7165Smrgfi
347364ce7165Smrgfi
347464ce7165Smrgac_ct_CC=$ac_cv_prog_ac_ct_CC
347564ce7165Smrgif test -n "$ac_ct_CC"; then
3476b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3477b71ad168Smrgprintf "%s\n" "$ac_ct_CC" >&6; }
347864ce7165Smrgelse
3479b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3480b71ad168Smrgprintf "%s\n" "no" >&6; }
348164ce7165Smrgfi
348264ce7165Smrg
348364ce7165Smrg  if test "x$ac_ct_CC" = x; then
348464ce7165Smrg    CC=""
348564ce7165Smrg  else
348664ce7165Smrg    case $cross_compiling:$ac_tool_warned in
348764ce7165Smrgyes:)
3488b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3489b71ad168Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
349064ce7165Smrgac_tool_warned=yes ;;
349164ce7165Smrgesac
349264ce7165Smrg    CC=$ac_ct_CC
349364ce7165Smrg  fi
349464ce7165Smrgelse
349564ce7165Smrg  CC="$ac_cv_prog_CC"
349664ce7165Smrgfi
349764ce7165Smrg
349864ce7165Smrgif test -z "$CC"; then
349964ce7165Smrg          if test -n "$ac_tool_prefix"; then
350064ce7165Smrg    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
350164ce7165Smrgset dummy ${ac_tool_prefix}cc; ac_word=$2
3502b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3503b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3504b71ad168Smrgif test ${ac_cv_prog_CC+y}
3505b71ad168Smrgthen :
3506b71ad168Smrg  printf %s "(cached) " >&6
3507b71ad168Smrgelse $as_nop
350864ce7165Smrg  if test -n "$CC"; then
350964ce7165Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
351064ce7165Smrgelse
351164ce7165Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
351264ce7165Smrgfor as_dir in $PATH
351364ce7165Smrgdo
351464ce7165Smrg  IFS=$as_save_IFS
3515b71ad168Smrg  case $as_dir in #(((
3516b71ad168Smrg    '') as_dir=./ ;;
3517b71ad168Smrg    */) ;;
3518b71ad168Smrg    *) as_dir=$as_dir/ ;;
3519b71ad168Smrg  esac
3520169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3521b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
352264ce7165Smrg    ac_cv_prog_CC="${ac_tool_prefix}cc"
3523b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
352464ce7165Smrg    break 2
352564ce7165Smrg  fi
352664ce7165Smrgdone
3527169a0819Smrg  done
352864ce7165SmrgIFS=$as_save_IFS
352964ce7165Smrg
353064ce7165Smrgfi
353164ce7165Smrgfi
353264ce7165SmrgCC=$ac_cv_prog_CC
353364ce7165Smrgif test -n "$CC"; then
3534b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3535b71ad168Smrgprintf "%s\n" "$CC" >&6; }
353664ce7165Smrgelse
3537b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3538b71ad168Smrgprintf "%s\n" "no" >&6; }
353964ce7165Smrgfi
354064ce7165Smrg
354164ce7165Smrg
354264ce7165Smrg  fi
354364ce7165Smrgfi
354464ce7165Smrgif test -z "$CC"; then
354564ce7165Smrg  # Extract the first word of "cc", so it can be a program name with args.
354664ce7165Smrgset dummy cc; ac_word=$2
3547b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3548b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3549b71ad168Smrgif test ${ac_cv_prog_CC+y}
3550b71ad168Smrgthen :
3551b71ad168Smrg  printf %s "(cached) " >&6
3552b71ad168Smrgelse $as_nop
355364ce7165Smrg  if test -n "$CC"; then
355464ce7165Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
355564ce7165Smrgelse
355664ce7165Smrg  ac_prog_rejected=no
355764ce7165Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
355864ce7165Smrgfor as_dir in $PATH
355964ce7165Smrgdo
356064ce7165Smrg  IFS=$as_save_IFS
3561b71ad168Smrg  case $as_dir in #(((
3562b71ad168Smrg    '') as_dir=./ ;;
3563b71ad168Smrg    */) ;;
3564b71ad168Smrg    *) as_dir=$as_dir/ ;;
3565b71ad168Smrg  esac
3566169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3567b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3568b71ad168Smrg    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
356964ce7165Smrg       ac_prog_rejected=yes
357064ce7165Smrg       continue
357164ce7165Smrg     fi
357264ce7165Smrg    ac_cv_prog_CC="cc"
3573b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
357464ce7165Smrg    break 2
357564ce7165Smrg  fi
357664ce7165Smrgdone
3577169a0819Smrg  done
357864ce7165SmrgIFS=$as_save_IFS
357964ce7165Smrg
358064ce7165Smrgif test $ac_prog_rejected = yes; then
358164ce7165Smrg  # We found a bogon in the path, so make sure we never use it.
358264ce7165Smrg  set dummy $ac_cv_prog_CC
358364ce7165Smrg  shift
358464ce7165Smrg  if test $# != 0; then
358564ce7165Smrg    # We chose a different compiler from the bogus one.
358664ce7165Smrg    # However, it has the same basename, so the bogon will be chosen
358764ce7165Smrg    # first if we set CC to just the basename; use the full file name.
358864ce7165Smrg    shift
3589b71ad168Smrg    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3590b71ad168Smrg  fi
3591b71ad168Smrgfi
3592b71ad168Smrgfi
3593b71ad168Smrgfi
3594b71ad168SmrgCC=$ac_cv_prog_CC
3595b71ad168Smrgif test -n "$CC"; then
3596b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3597b71ad168Smrgprintf "%s\n" "$CC" >&6; }
3598b71ad168Smrgelse
3599b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600b71ad168Smrgprintf "%s\n" "no" >&6; }
3601b71ad168Smrgfi
3602b71ad168Smrg
3603b71ad168Smrg
3604b71ad168Smrgfi
3605b71ad168Smrgif test -z "$CC"; then
3606b71ad168Smrg  if test -n "$ac_tool_prefix"; then
3607b71ad168Smrg  for ac_prog in cl.exe
3608b71ad168Smrg  do
3609b71ad168Smrg    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3610b71ad168Smrgset dummy $ac_tool_prefix$ac_prog; ac_word=$2
3611b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3613b71ad168Smrgif test ${ac_cv_prog_CC+y}
3614b71ad168Smrgthen :
3615b71ad168Smrg  printf %s "(cached) " >&6
3616b71ad168Smrgelse $as_nop
3617b71ad168Smrg  if test -n "$CC"; then
3618b71ad168Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
3619b71ad168Smrgelse
3620b71ad168Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621b71ad168Smrgfor as_dir in $PATH
3622b71ad168Smrgdo
3623b71ad168Smrg  IFS=$as_save_IFS
3624b71ad168Smrg  case $as_dir in #(((
3625b71ad168Smrg    '') as_dir=./ ;;
3626b71ad168Smrg    */) ;;
3627b71ad168Smrg    *) as_dir=$as_dir/ ;;
3628b71ad168Smrg  esac
3629b71ad168Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3630b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3631b71ad168Smrg    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3632b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3633b71ad168Smrg    break 2
3634b71ad168Smrg  fi
3635b71ad168Smrgdone
3636b71ad168Smrg  done
3637b71ad168SmrgIFS=$as_save_IFS
3638b71ad168Smrg
3639b71ad168Smrgfi
3640b71ad168Smrgfi
3641b71ad168SmrgCC=$ac_cv_prog_CC
3642b71ad168Smrgif test -n "$CC"; then
3643b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3644b71ad168Smrgprintf "%s\n" "$CC" >&6; }
3645b71ad168Smrgelse
3646b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3647b71ad168Smrgprintf "%s\n" "no" >&6; }
3648b71ad168Smrgfi
3649b71ad168Smrg
3650b71ad168Smrg
3651b71ad168Smrg    test -n "$CC" && break
3652b71ad168Smrg  done
3653b71ad168Smrgfi
3654b71ad168Smrgif test -z "$CC"; then
3655b71ad168Smrg  ac_ct_CC=$CC
3656b71ad168Smrg  for ac_prog in cl.exe
3657b71ad168Smrgdo
3658b71ad168Smrg  # Extract the first word of "$ac_prog", so it can be a program name with args.
3659b71ad168Smrgset dummy $ac_prog; ac_word=$2
3660b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3661b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3662b71ad168Smrgif test ${ac_cv_prog_ac_ct_CC+y}
3663b71ad168Smrgthen :
3664b71ad168Smrg  printf %s "(cached) " >&6
3665b71ad168Smrgelse $as_nop
3666b71ad168Smrg  if test -n "$ac_ct_CC"; then
3667b71ad168Smrg  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3668b71ad168Smrgelse
3669b71ad168Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670b71ad168Smrgfor as_dir in $PATH
3671b71ad168Smrgdo
3672b71ad168Smrg  IFS=$as_save_IFS
3673b71ad168Smrg  case $as_dir in #(((
3674b71ad168Smrg    '') as_dir=./ ;;
3675b71ad168Smrg    */) ;;
3676b71ad168Smrg    *) as_dir=$as_dir/ ;;
3677b71ad168Smrg  esac
3678b71ad168Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3679b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3680b71ad168Smrg    ac_cv_prog_ac_ct_CC="$ac_prog"
3681b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3682b71ad168Smrg    break 2
368364ce7165Smrg  fi
3684b71ad168Smrgdone
3685b71ad168Smrg  done
3686b71ad168SmrgIFS=$as_save_IFS
3687b71ad168Smrg
368864ce7165Smrgfi
368964ce7165Smrgfi
3690b71ad168Smrgac_ct_CC=$ac_cv_prog_ac_ct_CC
3691b71ad168Smrgif test -n "$ac_ct_CC"; then
3692b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3693b71ad168Smrgprintf "%s\n" "$ac_ct_CC" >&6; }
369464ce7165Smrgelse
3695b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3696b71ad168Smrgprintf "%s\n" "no" >&6; }
369764ce7165Smrgfi
369864ce7165Smrg
369964ce7165Smrg
3700b71ad168Smrg  test -n "$ac_ct_CC" && break
3701b71ad168Smrgdone
3702b71ad168Smrg
3703b71ad168Smrg  if test "x$ac_ct_CC" = x; then
3704b71ad168Smrg    CC=""
3705b71ad168Smrg  else
3706b71ad168Smrg    case $cross_compiling:$ac_tool_warned in
3707b71ad168Smrgyes:)
3708b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3709b71ad168Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3710b71ad168Smrgac_tool_warned=yes ;;
3711b71ad168Smrgesac
3712b71ad168Smrg    CC=$ac_ct_CC
3713b71ad168Smrg  fi
3714b71ad168Smrgfi
3715b71ad168Smrg
371664ce7165Smrgfi
371764ce7165Smrgif test -z "$CC"; then
371864ce7165Smrg  if test -n "$ac_tool_prefix"; then
3719b71ad168Smrg  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3720b71ad168Smrgset dummy ${ac_tool_prefix}clang; ac_word=$2
3721b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3722b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3723b71ad168Smrgif test ${ac_cv_prog_CC+y}
3724b71ad168Smrgthen :
3725b71ad168Smrg  printf %s "(cached) " >&6
3726b71ad168Smrgelse $as_nop
372764ce7165Smrg  if test -n "$CC"; then
372864ce7165Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
372964ce7165Smrgelse
373064ce7165Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
373164ce7165Smrgfor as_dir in $PATH
373264ce7165Smrgdo
373364ce7165Smrg  IFS=$as_save_IFS
3734b71ad168Smrg  case $as_dir in #(((
3735b71ad168Smrg    '') as_dir=./ ;;
3736b71ad168Smrg    */) ;;
3737b71ad168Smrg    *) as_dir=$as_dir/ ;;
3738b71ad168Smrg  esac
3739169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3740b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3741b71ad168Smrg    ac_cv_prog_CC="${ac_tool_prefix}clang"
3742b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
374364ce7165Smrg    break 2
374464ce7165Smrg  fi
374564ce7165Smrgdone
3746169a0819Smrg  done
374764ce7165SmrgIFS=$as_save_IFS
374864ce7165Smrg
374964ce7165Smrgfi
375064ce7165Smrgfi
375164ce7165SmrgCC=$ac_cv_prog_CC
375264ce7165Smrgif test -n "$CC"; then
3753b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3754b71ad168Smrgprintf "%s\n" "$CC" >&6; }
375564ce7165Smrgelse
3756b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3757b71ad168Smrgprintf "%s\n" "no" >&6; }
375864ce7165Smrgfi
375964ce7165Smrg
376064ce7165Smrg
376164ce7165Smrgfi
3762b71ad168Smrgif test -z "$ac_cv_prog_CC"; then
376364ce7165Smrg  ac_ct_CC=$CC
3764b71ad168Smrg  # Extract the first word of "clang", so it can be a program name with args.
3765b71ad168Smrgset dummy clang; ac_word=$2
3766b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3767b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
3768b71ad168Smrgif test ${ac_cv_prog_ac_ct_CC+y}
3769b71ad168Smrgthen :
3770b71ad168Smrg  printf %s "(cached) " >&6
3771b71ad168Smrgelse $as_nop
377264ce7165Smrg  if test -n "$ac_ct_CC"; then
377364ce7165Smrg  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
377464ce7165Smrgelse
377564ce7165Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
377664ce7165Smrgfor as_dir in $PATH
377764ce7165Smrgdo
377864ce7165Smrg  IFS=$as_save_IFS
3779b71ad168Smrg  case $as_dir in #(((
3780b71ad168Smrg    '') as_dir=./ ;;
3781b71ad168Smrg    */) ;;
3782b71ad168Smrg    *) as_dir=$as_dir/ ;;
3783b71ad168Smrg  esac
3784169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
3785b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3786b71ad168Smrg    ac_cv_prog_ac_ct_CC="clang"
3787b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
378864ce7165Smrg    break 2
378964ce7165Smrg  fi
379064ce7165Smrgdone
3791169a0819Smrg  done
379264ce7165SmrgIFS=$as_save_IFS
379364ce7165Smrg
379464ce7165Smrgfi
379564ce7165Smrgfi
379664ce7165Smrgac_ct_CC=$ac_cv_prog_ac_ct_CC
379764ce7165Smrgif test -n "$ac_ct_CC"; then
3798b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3799b71ad168Smrgprintf "%s\n" "$ac_ct_CC" >&6; }
380064ce7165Smrgelse
3801b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802b71ad168Smrgprintf "%s\n" "no" >&6; }
380364ce7165Smrgfi
380464ce7165Smrg
380564ce7165Smrg  if test "x$ac_ct_CC" = x; then
380664ce7165Smrg    CC=""
380764ce7165Smrg  else
380864ce7165Smrg    case $cross_compiling:$ac_tool_warned in
380964ce7165Smrgyes:)
3810b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3811b71ad168Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
381264ce7165Smrgac_tool_warned=yes ;;
381364ce7165Smrgesac
381464ce7165Smrg    CC=$ac_ct_CC
381564ce7165Smrg  fi
3816b71ad168Smrgelse
3817b71ad168Smrg  CC="$ac_cv_prog_CC"
381864ce7165Smrgfi
381964ce7165Smrg
382064ce7165Smrgfi
382164ce7165Smrg
382264ce7165Smrg
3823b71ad168Smrgtest -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3824b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3825169a0819Smrgas_fn_error $? "no acceptable C compiler found in \$PATH
3826169a0819SmrgSee \`config.log' for more details" "$LINENO" 5; }
382764ce7165Smrg
382864ce7165Smrg# Provide some information about the compiler.
3829b71ad168Smrgprintf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3830fb23d3a8Smrgset X $ac_compile
3831fb23d3a8Smrgac_compiler=$2
3832b71ad168Smrgfor ac_option in --version -v -V -qversion -version; do
3833169a0819Smrg  { { ac_try="$ac_compiler $ac_option >&5"
383464ce7165Smrgcase "(($ac_try" in
383564ce7165Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
383664ce7165Smrg  *) ac_try_echo=$ac_try;;
383764ce7165Smrgesac
3838169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3839b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
3840169a0819Smrg  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
384164ce7165Smrg  ac_status=$?
3842169a0819Smrg  if test -s conftest.err; then
3843169a0819Smrg    sed '10a\
3844169a0819Smrg... rest of stderr output deleted ...
3845169a0819Smrg         10q' conftest.err >conftest.er1
3846169a0819Smrg    cat conftest.er1 >&5
3847169a0819Smrg  fi
3848169a0819Smrg  rm -f conftest.er1 conftest.err
3849b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3850169a0819Smrg  test $ac_status = 0; }
3851169a0819Smrgdone
385264ce7165Smrg
3853169a0819Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
385464ce7165Smrg/* end confdefs.h.  */
385564ce7165Smrg
385664ce7165Smrgint
3857b71ad168Smrgmain (void)
385864ce7165Smrg{
385964ce7165Smrg
386064ce7165Smrg  ;
386164ce7165Smrg  return 0;
386264ce7165Smrg}
386364ce7165Smrg_ACEOF
386464ce7165Smrgac_clean_files_save=$ac_clean_files
3865fb23d3a8Smrgac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
386664ce7165Smrg# Try to create an executable without -o first, disregard a.out.
386764ce7165Smrg# It will help us diagnose broken compilers, and finding out an intuition
386864ce7165Smrg# of exeext.
3869b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3870b71ad168Smrgprintf %s "checking whether the C compiler works... " >&6; }
3871b71ad168Smrgac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3872fb23d3a8Smrg
3873fb23d3a8Smrg# The possible output files:
3874fb23d3a8Smrgac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3875fb23d3a8Smrg
387664ce7165Smrgac_rmfiles=
387764ce7165Smrgfor ac_file in $ac_files
387864ce7165Smrgdo
387964ce7165Smrg  case $ac_file in
3880fb23d3a8Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
388164ce7165Smrg    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
388264ce7165Smrg  esac
388364ce7165Smrgdone
388464ce7165Smrgrm -f $ac_rmfiles
388564ce7165Smrg
3886169a0819Smrgif { { ac_try="$ac_link_default"
388764ce7165Smrgcase "(($ac_try" in
388864ce7165Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
388964ce7165Smrg  *) ac_try_echo=$ac_try;;
389064ce7165Smrgesac
3891169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3892b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
389364ce7165Smrg  (eval "$ac_link_default") 2>&5
389464ce7165Smrg  ac_status=$?
3895b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3896b71ad168Smrg  test $ac_status = 0; }
3897b71ad168Smrgthen :
389864ce7165Smrg  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
389964ce7165Smrg# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
390064ce7165Smrg# in a Makefile.  We should not override ac_cv_exeext if it was cached,
390164ce7165Smrg# so that the user can short-circuit this test for compilers unknown to
390264ce7165Smrg# Autoconf.
390364ce7165Smrgfor ac_file in $ac_files ''
390464ce7165Smrgdo
390564ce7165Smrg  test -f "$ac_file" || continue
390664ce7165Smrg  case $ac_file in
3907fb23d3a8Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
390864ce7165Smrg	;;
390964ce7165Smrg    [ab].out )
391064ce7165Smrg	# We found the default executable, but exeext='' is most
391164ce7165Smrg	# certainly right.
391264ce7165Smrg	break;;
391364ce7165Smrg    *.* )
3914b71ad168Smrg	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
391564ce7165Smrg	then :; else
391664ce7165Smrg	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
391764ce7165Smrg	fi
391864ce7165Smrg	# We set ac_cv_exeext here because the later test for it is not
391964ce7165Smrg	# safe: cross compilers may not add the suffix if given an `-o'
392064ce7165Smrg	# argument, so we may need to know it at that point already.
392164ce7165Smrg	# Even if this section looks crufty: it has the advantage of
392264ce7165Smrg	# actually working.
392364ce7165Smrg	break;;
392464ce7165Smrg    * )
392564ce7165Smrg	break;;
392664ce7165Smrg  esac
392764ce7165Smrgdone
392864ce7165Smrgtest "$ac_cv_exeext" = no && ac_cv_exeext=
392964ce7165Smrg
3930b71ad168Smrgelse $as_nop
393164ce7165Smrg  ac_file=''
393264ce7165Smrgfi
3933b71ad168Smrgif test -z "$ac_file"
3934b71ad168Smrgthen :
3935b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3936b71ad168Smrgprintf "%s\n" "no" >&6; }
3937b71ad168Smrgprintf "%s\n" "$as_me: failed program was:" >&5
393864ce7165Smrgsed 's/^/| /' conftest.$ac_ext >&5
393964ce7165Smrg
3940b71ad168Smrg{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3941b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3942169a0819Smrgas_fn_error 77 "C compiler cannot create executables
3943169a0819SmrgSee \`config.log' for more details" "$LINENO" 5; }
3944b71ad168Smrgelse $as_nop
3945b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3946b71ad168Smrgprintf "%s\n" "yes" >&6; }
3947b71ad168Smrgfi
3948b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3949b71ad168Smrgprintf %s "checking for C compiler default output file name... " >&6; }
3950b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3951b71ad168Smrgprintf "%s\n" "$ac_file" >&6; }
395264ce7165Smrgac_exeext=$ac_cv_exeext
395364ce7165Smrg
3954fb23d3a8Smrgrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
395564ce7165Smrgac_clean_files=$ac_clean_files_save
3956b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3957b71ad168Smrgprintf %s "checking for suffix of executables... " >&6; }
3958169a0819Smrgif { { ac_try="$ac_link"
395964ce7165Smrgcase "(($ac_try" in
396064ce7165Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
396164ce7165Smrg  *) ac_try_echo=$ac_try;;
396264ce7165Smrgesac
3963169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3964b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
396564ce7165Smrg  (eval "$ac_link") 2>&5
396664ce7165Smrg  ac_status=$?
3967b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3968b71ad168Smrg  test $ac_status = 0; }
3969b71ad168Smrgthen :
397064ce7165Smrg  # If both `conftest.exe' and `conftest' are `present' (well, observable)
397164ce7165Smrg# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
397264ce7165Smrg# work properly (i.e., refer to `conftest.exe'), while it won't with
397364ce7165Smrg# `rm'.
397464ce7165Smrgfor ac_file in conftest.exe conftest conftest.*; do
397564ce7165Smrg  test -f "$ac_file" || continue
397664ce7165Smrg  case $ac_file in
3977fb23d3a8Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
397864ce7165Smrg    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
397964ce7165Smrg	  break;;
398064ce7165Smrg    * ) break;;
398164ce7165Smrg  esac
398264ce7165Smrgdone
3983b71ad168Smrgelse $as_nop
3984b71ad168Smrg  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3986169a0819Smrgas_fn_error $? "cannot compute suffix of executables: cannot compile and link
3987169a0819SmrgSee \`config.log' for more details" "$LINENO" 5; }
398864ce7165Smrgfi
3989169a0819Smrgrm -f conftest conftest$ac_cv_exeext
3990b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3991b71ad168Smrgprintf "%s\n" "$ac_cv_exeext" >&6; }
399264ce7165Smrg
399364ce7165Smrgrm -f conftest.$ac_ext
399464ce7165SmrgEXEEXT=$ac_cv_exeext
399564ce7165Smrgac_exeext=$EXEEXT
3996169a0819Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997169a0819Smrg/* end confdefs.h.  */
3998169a0819Smrg#include <stdio.h>
3999169a0819Smrgint
4000b71ad168Smrgmain (void)
4001169a0819Smrg{
4002169a0819SmrgFILE *f = fopen ("conftest.out", "w");
4003169a0819Smrg return ferror (f) || fclose (f) != 0;
4004169a0819Smrg
4005169a0819Smrg  ;
4006169a0819Smrg  return 0;
4007169a0819Smrg}
4008169a0819Smrg_ACEOF
4009169a0819Smrgac_clean_files="$ac_clean_files conftest.out"
4010169a0819Smrg# Check that the compiler produces executables we can run.  If not, either
4011169a0819Smrg# the compiler is broken, or we cross compile.
4012b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4013b71ad168Smrgprintf %s "checking whether we are cross compiling... " >&6; }
4014169a0819Smrgif test "$cross_compiling" != yes; then
4015169a0819Smrg  { { ac_try="$ac_link"
4016169a0819Smrgcase "(($ac_try" in
4017169a0819Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018169a0819Smrg  *) ac_try_echo=$ac_try;;
4019169a0819Smrgesac
4020169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
4022169a0819Smrg  (eval "$ac_link") 2>&5
4023169a0819Smrg  ac_status=$?
4024b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025169a0819Smrg  test $ac_status = 0; }
4026169a0819Smrg  if { ac_try='./conftest$ac_cv_exeext'
4027169a0819Smrg  { { case "(($ac_try" in
4028169a0819Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029169a0819Smrg  *) ac_try_echo=$ac_try;;
4030169a0819Smrgesac
4031169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
4033169a0819Smrg  (eval "$ac_try") 2>&5
4034169a0819Smrg  ac_status=$?
4035b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036169a0819Smrg  test $ac_status = 0; }; }; then
4037169a0819Smrg    cross_compiling=no
4038169a0819Smrg  else
4039169a0819Smrg    if test "$cross_compiling" = maybe; then
4040169a0819Smrg	cross_compiling=yes
4041169a0819Smrg    else
4042b71ad168Smrg	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4044b71ad168Smrgas_fn_error 77 "cannot run C compiled programs.
4045169a0819SmrgIf you meant to cross compile, use \`--host'.
4046169a0819SmrgSee \`config.log' for more details" "$LINENO" 5; }
4047169a0819Smrg    fi
4048169a0819Smrg  fi
4049169a0819Smrgfi
4050b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4051b71ad168Smrgprintf "%s\n" "$cross_compiling" >&6; }
4052169a0819Smrg
4053169a0819Smrgrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4054169a0819Smrgac_clean_files=$ac_clean_files_save
4055b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4056b71ad168Smrgprintf %s "checking for suffix of object files... " >&6; }
4057b71ad168Smrgif test ${ac_cv_objext+y}
4058b71ad168Smrgthen :
4059b71ad168Smrg  printf %s "(cached) " >&6
4060b71ad168Smrgelse $as_nop
4061169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
406264ce7165Smrg/* end confdefs.h.  */
406364ce7165Smrg
406464ce7165Smrgint
4065b71ad168Smrgmain (void)
406664ce7165Smrg{
406764ce7165Smrg
406864ce7165Smrg  ;
406964ce7165Smrg  return 0;
407064ce7165Smrg}
407164ce7165Smrg_ACEOF
407264ce7165Smrgrm -f conftest.o conftest.obj
4073169a0819Smrgif { { ac_try="$ac_compile"
407464ce7165Smrgcase "(($ac_try" in
407564ce7165Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
407664ce7165Smrg  *) ac_try_echo=$ac_try;;
407764ce7165Smrgesac
4078169a0819Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079b71ad168Smrgprintf "%s\n" "$ac_try_echo"; } >&5
408064ce7165Smrg  (eval "$ac_compile") 2>&5
408164ce7165Smrg  ac_status=$?
4082b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083b71ad168Smrg  test $ac_status = 0; }
4084b71ad168Smrgthen :
408564ce7165Smrg  for ac_file in conftest.o conftest.obj conftest.*; do
408664ce7165Smrg  test -f "$ac_file" || continue;
408764ce7165Smrg  case $ac_file in
4088fb23d3a8Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
408964ce7165Smrg    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
409064ce7165Smrg       break;;
409164ce7165Smrg  esac
409264ce7165Smrgdone
4093b71ad168Smrgelse $as_nop
4094b71ad168Smrg  printf "%s\n" "$as_me: failed program was:" >&5
409564ce7165Smrgsed 's/^/| /' conftest.$ac_ext >&5
409664ce7165Smrg
4097b71ad168Smrg{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4099169a0819Smrgas_fn_error $? "cannot compute suffix of object files: cannot compile
4100169a0819SmrgSee \`config.log' for more details" "$LINENO" 5; }
410164ce7165Smrgfi
410264ce7165Smrgrm -f conftest.$ac_cv_objext conftest.$ac_ext
410364ce7165Smrgfi
4104b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4105b71ad168Smrgprintf "%s\n" "$ac_cv_objext" >&6; }
410664ce7165SmrgOBJEXT=$ac_cv_objext
410764ce7165Smrgac_objext=$OBJEXT
4108b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4109b71ad168Smrgprintf %s "checking whether the compiler supports GNU C... " >&6; }
4110b71ad168Smrgif test ${ac_cv_c_compiler_gnu+y}
4111b71ad168Smrgthen :
4112b71ad168Smrg  printf %s "(cached) " >&6
4113b71ad168Smrgelse $as_nop
4114169a0819Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
411564ce7165Smrg/* end confdefs.h.  */
411664ce7165Smrg
411764ce7165Smrgint
4118b71ad168Smrgmain (void)
411964ce7165Smrg{
412064ce7165Smrg#ifndef __GNUC__
412164ce7165Smrg       choke me
412264ce7165Smrg#endif
412364ce7165Smrg
412464ce7165Smrg  ;
412564ce7165Smrg  return 0;
412664ce7165Smrg}
412764ce7165Smrg_ACEOF
4128b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4129b71ad168Smrgthen :
413064ce7165Smrg  ac_compiler_gnu=yes
4131b71ad168Smrgelse $as_nop
4132169a0819Smrg  ac_compiler_gnu=no
413364ce7165Smrgfi
4134b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
413564ce7165Smrgac_cv_c_compiler_gnu=$ac_compiler_gnu
413664ce7165Smrg
413764ce7165Smrgfi
4138b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4139b71ad168Smrgprintf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4140b71ad168Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
4141b71ad168Smrg
4142fb23d3a8Smrgif test $ac_compiler_gnu = yes; then
4143fb23d3a8Smrg  GCC=yes
4144fb23d3a8Smrgelse
4145fb23d3a8Smrg  GCC=
4146fb23d3a8Smrgfi
4147b71ad168Smrgac_test_CFLAGS=${CFLAGS+y}
414864ce7165Smrgac_save_CFLAGS=$CFLAGS
4149b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4150b71ad168Smrgprintf %s "checking whether $CC accepts -g... " >&6; }
4151b71ad168Smrgif test ${ac_cv_prog_cc_g+y}
4152b71ad168Smrgthen :
4153b71ad168Smrg  printf %s "(cached) " >&6
4154b71ad168Smrgelse $as_nop
415564ce7165Smrg  ac_save_c_werror_flag=$ac_c_werror_flag
415664ce7165Smrg   ac_c_werror_flag=yes
415764ce7165Smrg   ac_cv_prog_cc_g=no
415864ce7165Smrg   CFLAGS="-g"
4159169a0819Smrg   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
416064ce7165Smrg/* end confdefs.h.  */
416164ce7165Smrg
416264ce7165Smrgint
4163b71ad168Smrgmain (void)
416464ce7165Smrg{
416564ce7165Smrg
416664ce7165Smrg  ;
416764ce7165Smrg  return 0;
416864ce7165Smrg}
416964ce7165Smrg_ACEOF
4170b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4171b71ad168Smrgthen :
417264ce7165Smrg  ac_cv_prog_cc_g=yes
4173b71ad168Smrgelse $as_nop
4174169a0819Smrg  CFLAGS=""
4175169a0819Smrg      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
417664ce7165Smrg/* end confdefs.h.  */
417764ce7165Smrg
417864ce7165Smrgint
4179b71ad168Smrgmain (void)
418064ce7165Smrg{
418164ce7165Smrg
418264ce7165Smrg  ;
418364ce7165Smrg  return 0;
418464ce7165Smrg}
418564ce7165Smrg_ACEOF
4186b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4187b71ad168Smrgthen :
418864ce7165Smrg
4189b71ad168Smrgelse $as_nop
4190169a0819Smrg  ac_c_werror_flag=$ac_save_c_werror_flag
419164ce7165Smrg	 CFLAGS="-g"
4192169a0819Smrg	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
419364ce7165Smrg/* end confdefs.h.  */
419464ce7165Smrg
419564ce7165Smrgint
4196b71ad168Smrgmain (void)
419764ce7165Smrg{
419864ce7165Smrg
419964ce7165Smrg  ;
420064ce7165Smrg  return 0;
420164ce7165Smrg}
420264ce7165Smrg_ACEOF
4203b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4204b71ad168Smrgthen :
420564ce7165Smrg  ac_cv_prog_cc_g=yes
420664ce7165Smrgfi
4207b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
420864ce7165Smrgfi
4209b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
421064ce7165Smrgfi
4211b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
421264ce7165Smrg   ac_c_werror_flag=$ac_save_c_werror_flag
421364ce7165Smrgfi
4214b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4215b71ad168Smrgprintf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4216b71ad168Smrgif test $ac_test_CFLAGS; then
421764ce7165Smrg  CFLAGS=$ac_save_CFLAGS
421864ce7165Smrgelif test $ac_cv_prog_cc_g = yes; then
421964ce7165Smrg  if test "$GCC" = yes; then
422064ce7165Smrg    CFLAGS="-g -O2"
422164ce7165Smrg  else
422264ce7165Smrg    CFLAGS="-g"
422364ce7165Smrg  fi
422464ce7165Smrgelse
422564ce7165Smrg  if test "$GCC" = yes; then
422664ce7165Smrg    CFLAGS="-O2"
422764ce7165Smrg  else
422864ce7165Smrg    CFLAGS=
422964ce7165Smrg  fi
423064ce7165Smrgfi
4231b71ad168Smrgac_prog_cc_stdc=no
4232b71ad168Smrgif test x$ac_prog_cc_stdc = xno
4233b71ad168Smrgthen :
4234b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4235b71ad168Smrgprintf %s "checking for $CC option to enable C11 features... " >&6; }
4236b71ad168Smrgif test ${ac_cv_prog_cc_c11+y}
4237b71ad168Smrgthen :
4238b71ad168Smrg  printf %s "(cached) " >&6
4239b71ad168Smrgelse $as_nop
4240b71ad168Smrg  ac_cv_prog_cc_c11=no
424164ce7165Smrgac_save_CC=$CC
4242169a0819Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
424364ce7165Smrg/* end confdefs.h.  */
4244b71ad168Smrg$ac_c_conftest_c11_program
4245b71ad168Smrg_ACEOF
4246b71ad168Smrgfor ac_arg in '' -std=gnu11
4247b71ad168Smrgdo
4248b71ad168Smrg  CC="$ac_save_CC $ac_arg"
4249b71ad168Smrg  if ac_fn_c_try_compile "$LINENO"
4250b71ad168Smrgthen :
4251b71ad168Smrg  ac_cv_prog_cc_c11=$ac_arg
4252b71ad168Smrgfi
4253b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam
4254b71ad168Smrg  test "x$ac_cv_prog_cc_c11" != "xno" && break
4255b71ad168Smrgdone
4256b71ad168Smrgrm -f conftest.$ac_ext
4257b71ad168SmrgCC=$ac_save_CC
4258b71ad168Smrgfi
425964ce7165Smrg
4260b71ad168Smrgif test "x$ac_cv_prog_cc_c11" = xno
4261b71ad168Smrgthen :
4262b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4263b71ad168Smrgprintf "%s\n" "unsupported" >&6; }
4264b71ad168Smrgelse $as_nop
4265b71ad168Smrg  if test "x$ac_cv_prog_cc_c11" = x
4266b71ad168Smrgthen :
4267b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4268b71ad168Smrgprintf "%s\n" "none needed" >&6; }
4269b71ad168Smrgelse $as_nop
4270b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4271b71ad168Smrgprintf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4272b71ad168Smrg     CC="$CC $ac_cv_prog_cc_c11"
4273b71ad168Smrgfi
4274b71ad168Smrg  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4275b71ad168Smrg  ac_prog_cc_stdc=c11
4276b71ad168Smrgfi
4277b71ad168Smrgfi
4278b71ad168Smrgif test x$ac_prog_cc_stdc = xno
4279b71ad168Smrgthen :
4280b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4281b71ad168Smrgprintf %s "checking for $CC option to enable C99 features... " >&6; }
4282b71ad168Smrgif test ${ac_cv_prog_cc_c99+y}
4283b71ad168Smrgthen :
4284b71ad168Smrg  printf %s "(cached) " >&6
4285b71ad168Smrgelse $as_nop
4286b71ad168Smrg  ac_cv_prog_cc_c99=no
4287b71ad168Smrgac_save_CC=$CC
4288b71ad168Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
4289b71ad168Smrg/* end confdefs.h.  */
4290b71ad168Smrg$ac_c_conftest_c99_program
4291b71ad168Smrg_ACEOF
4292b71ad168Smrgfor ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4293b71ad168Smrgdo
4294b71ad168Smrg  CC="$ac_save_CC $ac_arg"
4295b71ad168Smrg  if ac_fn_c_try_compile "$LINENO"
4296b71ad168Smrgthen :
4297b71ad168Smrg  ac_cv_prog_cc_c99=$ac_arg
4298b71ad168Smrgfi
4299b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam
4300b71ad168Smrg  test "x$ac_cv_prog_cc_c99" != "xno" && break
4301b71ad168Smrgdone
4302b71ad168Smrgrm -f conftest.$ac_ext
4303b71ad168SmrgCC=$ac_save_CC
4304b71ad168Smrgfi
430564ce7165Smrg
4306b71ad168Smrgif test "x$ac_cv_prog_cc_c99" = xno
4307b71ad168Smrgthen :
4308b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4309b71ad168Smrgprintf "%s\n" "unsupported" >&6; }
4310b71ad168Smrgelse $as_nop
4311b71ad168Smrg  if test "x$ac_cv_prog_cc_c99" = x
4312b71ad168Smrgthen :
4313b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4314b71ad168Smrgprintf "%s\n" "none needed" >&6; }
4315b71ad168Smrgelse $as_nop
4316b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4317b71ad168Smrgprintf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4318b71ad168Smrg     CC="$CC $ac_cv_prog_cc_c99"
4319b71ad168Smrgfi
4320b71ad168Smrg  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4321b71ad168Smrg  ac_prog_cc_stdc=c99
4322b71ad168Smrgfi
4323b71ad168Smrgfi
4324b71ad168Smrgif test x$ac_prog_cc_stdc = xno
4325b71ad168Smrgthen :
4326b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4327b71ad168Smrgprintf %s "checking for $CC option to enable C89 features... " >&6; }
4328b71ad168Smrgif test ${ac_cv_prog_cc_c89+y}
4329b71ad168Smrgthen :
4330b71ad168Smrg  printf %s "(cached) " >&6
4331b71ad168Smrgelse $as_nop
4332b71ad168Smrg  ac_cv_prog_cc_c89=no
4333b71ad168Smrgac_save_CC=$CC
4334b71ad168Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
4335b71ad168Smrg/* end confdefs.h.  */
4336b71ad168Smrg$ac_c_conftest_c89_program
433764ce7165Smrg_ACEOF
4338b71ad168Smrgfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
433964ce7165Smrgdo
434064ce7165Smrg  CC="$ac_save_CC $ac_arg"
4341b71ad168Smrg  if ac_fn_c_try_compile "$LINENO"
4342b71ad168Smrgthen :
434364ce7165Smrg  ac_cv_prog_cc_c89=$ac_arg
434464ce7165Smrgfi
4345b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam
434664ce7165Smrg  test "x$ac_cv_prog_cc_c89" != "xno" && break
434764ce7165Smrgdone
434864ce7165Smrgrm -f conftest.$ac_ext
434964ce7165SmrgCC=$ac_save_CC
435064ce7165Smrgfi
435164ce7165Smrg
4352b71ad168Smrgif test "x$ac_cv_prog_cc_c89" = xno
4353b71ad168Smrgthen :
4354b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4355b71ad168Smrgprintf "%s\n" "unsupported" >&6; }
4356b71ad168Smrgelse $as_nop
4357b71ad168Smrg  if test "x$ac_cv_prog_cc_c89" = x
4358b71ad168Smrgthen :
4359b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4360b71ad168Smrgprintf "%s\n" "none needed" >&6; }
4361b71ad168Smrgelse $as_nop
4362b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4363b71ad168Smrgprintf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4364b71ad168Smrg     CC="$CC $ac_cv_prog_cc_c89"
4365b71ad168Smrgfi
4366b71ad168Smrg  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4367b71ad168Smrg  ac_prog_cc_stdc=c89
4368b71ad168Smrgfi
4369169a0819Smrgfi
437064ce7165Smrg
437164ce7165Smrgac_ext=c
437264ce7165Smrgac_cpp='$CPP $CPPFLAGS'
437364ce7165Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
437464ce7165Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
437564ce7165Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
437664ce7165Smrg
4377b71ad168Smrg
4378b71ad168Smrg  ac_ext=c
437981440437Smrgac_cpp='$CPP $CPPFLAGS'
438081440437Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
438181440437Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
438281440437Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
4383b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4384b71ad168Smrgprintf %s "checking whether $CC understands -c and -o together... " >&6; }
4385b71ad168Smrgif test ${am_cv_prog_cc_c_o+y}
4386b71ad168Smrgthen :
4387b71ad168Smrg  printf %s "(cached) " >&6
4388b71ad168Smrgelse $as_nop
438981440437Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
439081440437Smrg/* end confdefs.h.  */
439181440437Smrg
439281440437Smrgint
4393b71ad168Smrgmain (void)
439481440437Smrg{
439581440437Smrg
439681440437Smrg  ;
439781440437Smrg  return 0;
439881440437Smrg}
439981440437Smrg_ACEOF
440081440437Smrg  # Make sure it works both with $CC and with simple cc.
440181440437Smrg  # Following AC_PROG_CC_C_O, we do the test twice because some
440281440437Smrg  # compilers refuse to overwrite an existing .o file with -o,
440381440437Smrg  # though they will create one.
440481440437Smrg  am_cv_prog_cc_c_o=yes
440581440437Smrg  for am_i in 1 2; do
440681440437Smrg    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
440781440437Smrg   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
440881440437Smrg   ac_status=$?
440981440437Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
441081440437Smrg   (exit $ac_status); } \
441181440437Smrg         && test -f conftest2.$ac_objext; then
441281440437Smrg      : OK
441381440437Smrg    else
441481440437Smrg      am_cv_prog_cc_c_o=no
441581440437Smrg      break
441681440437Smrg    fi
441781440437Smrg  done
441881440437Smrg  rm -f core conftest*
441981440437Smrg  unset am_i
442081440437Smrgfi
4421b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4422b71ad168Smrgprintf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
442381440437Smrgif test "$am_cv_prog_cc_c_o" != yes; then
442481440437Smrg   # Losing compiler, so override with the script.
442581440437Smrg   # FIXME: It is wrong to rewrite CC.
442681440437Smrg   # But if we don't then we get into trouble of one sort or another.
442781440437Smrg   # A longer-term fix would be to have automake use am__CC in this case,
442881440437Smrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
442981440437Smrg   CC="$am_aux_dir/compile $CC"
443081440437Smrgfi
443181440437Smrgac_ext=c
443281440437Smrgac_cpp='$CPP $CPPFLAGS'
443381440437Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
443481440437Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
443581440437Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
443681440437Smrg
443781440437Smrg
443864ce7165Smrgdepcc="$CC"   am_compiler_list=
443964ce7165Smrg
4440b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4441b71ad168Smrgprintf %s "checking dependency style of $depcc... " >&6; }
4442b71ad168Smrgif test ${am_cv_CC_dependencies_compiler_type+y}
4443b71ad168Smrgthen :
4444b71ad168Smrg  printf %s "(cached) " >&6
4445b71ad168Smrgelse $as_nop
444664ce7165Smrg  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
444764ce7165Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
444864ce7165Smrg  # making bogus files that we don't know about and never remove.  For
444964ce7165Smrg  # instance it was reported that on HP-UX the gcc test will end up
445081440437Smrg  # making a dummy file named 'D' -- because '-MD' means "put the output
445181440437Smrg  # in D".
445281440437Smrg  rm -rf conftest.dir
445364ce7165Smrg  mkdir conftest.dir
445464ce7165Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
445564ce7165Smrg  # using a relative directory.
445664ce7165Smrg  cp "$am_depcomp" conftest.dir
445764ce7165Smrg  cd conftest.dir
445864ce7165Smrg  # We will build objects and dependencies in a subdirectory because
445964ce7165Smrg  # it helps to detect inapplicable dependency modes.  For instance
446064ce7165Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
446164ce7165Smrg  # side effect of compilation, but ICC will put the dependencies in
446264ce7165Smrg  # the current directory while Tru64 will put them in the object
446364ce7165Smrg  # directory.
446464ce7165Smrg  mkdir sub
446564ce7165Smrg
446664ce7165Smrg  am_cv_CC_dependencies_compiler_type=none
446764ce7165Smrg  if test "$am_compiler_list" = ""; then
446864ce7165Smrg     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
446964ce7165Smrg  fi
4470fb23d3a8Smrg  am__universal=false
4471fb23d3a8Smrg  case " $depcc " in #(
4472fb23d3a8Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4473fb23d3a8Smrg     esac
4474fb23d3a8Smrg
447564ce7165Smrg  for depmode in $am_compiler_list; do
447664ce7165Smrg    # Setup a source with many dependencies, because some compilers
447764ce7165Smrg    # like to wrap large dependency lists on column 80 (with \), and
447864ce7165Smrg    # we should not choose a depcomp mode which is confused by this.
447964ce7165Smrg    #
448064ce7165Smrg    # We need to recreate these files for each test, as the compiler may
448164ce7165Smrg    # overwrite some of them when testing with obscure command lines.
448264ce7165Smrg    # This happens at least with the AIX C compiler.
448364ce7165Smrg    : > sub/conftest.c
448464ce7165Smrg    for i in 1 2 3 4 5 6; do
448564ce7165Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
448681440437Smrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
448781440437Smrg      # Solaris 10 /bin/sh.
448881440437Smrg      echo '/* dummy */' > sub/conftst$i.h
448964ce7165Smrg    done
449064ce7165Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
449164ce7165Smrg
449281440437Smrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
4493fb23d3a8Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
449481440437Smrg    # handle '-M -o', and we need to detect this.  Also, some Intel
449581440437Smrg    # versions had trouble with output in subdirs.
4496fb23d3a8Smrg    am__obj=sub/conftest.${OBJEXT-o}
4497fb23d3a8Smrg    am__minus_obj="-o $am__obj"
449864ce7165Smrg    case $depmode in
4499fb23d3a8Smrg    gcc)
4500fb23d3a8Smrg      # This depmode causes a compiler race in universal mode.
4501fb23d3a8Smrg      test "$am__universal" = false || continue
4502fb23d3a8Smrg      ;;
450364ce7165Smrg    nosideeffect)
450481440437Smrg      # After this tag, mechanisms are not by side-effect, so they'll
450581440437Smrg      # only be used when explicitly requested.
450664ce7165Smrg      if test "x$enable_dependency_tracking" = xyes; then
450764ce7165Smrg	continue
450864ce7165Smrg      else
450964ce7165Smrg	break
451064ce7165Smrg      fi
451164ce7165Smrg      ;;
451281440437Smrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
451381440437Smrg      # This compiler won't grok '-c -o', but also, the minuso test has
4514fb23d3a8Smrg      # not run yet.  These depmodes are late enough in the game, and
4515fb23d3a8Smrg      # so weak that their functioning should not be impacted.
4516fb23d3a8Smrg      am__obj=conftest.${OBJEXT-o}
4517fb23d3a8Smrg      am__minus_obj=
4518fb23d3a8Smrg      ;;
451964ce7165Smrg    none) break ;;
452064ce7165Smrg    esac
452164ce7165Smrg    if depmode=$depmode \
4522fb23d3a8Smrg       source=sub/conftest.c object=$am__obj \
452364ce7165Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4524b71ad168Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4525b71ad168Smrg         >/dev/null 2>conftest.err &&
4526b71ad168Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4527b71ad168Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4528b71ad168Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4529b71ad168Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4530b71ad168Smrg      # icc doesn't choke on unknown options, it will just issue warnings
4531b71ad168Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
4532b71ad168Smrg      # that says an option was ignored or not supported.
4533b71ad168Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
4534b71ad168Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
4535b71ad168Smrg      # The diagnosis changed in icc 8.0:
4536b71ad168Smrg      #   icc: Command line remark: option '-MP' not supported
4537b71ad168Smrg      if (grep 'ignoring option' conftest.err ||
4538b71ad168Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4539b71ad168Smrg        am_cv_CC_dependencies_compiler_type=$depmode
4540b71ad168Smrg        break
4541b71ad168Smrg      fi
4542fb23d3a8Smrg    fi
4543fb23d3a8Smrg  done
4544fb23d3a8Smrg
4545b71ad168Smrg  cd ..
4546b71ad168Smrg  rm -rf conftest.dir
4547fb23d3a8Smrgelse
4548b71ad168Smrg  am_cv_CC_dependencies_compiler_type=none
4549fb23d3a8Smrgfi
4550fb23d3a8Smrg
4551fb23d3a8Smrgfi
4552b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4553b71ad168Smrgprintf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
4554b71ad168SmrgCCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4555fb23d3a8Smrg
4556b71ad168Smrg if
4557b71ad168Smrg  test "x$enable_dependency_tracking" != xno \
4558b71ad168Smrg  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4559b71ad168Smrg  am__fastdepCC_TRUE=
4560b71ad168Smrg  am__fastdepCC_FALSE='#'
4561fb23d3a8Smrgelse
4562b71ad168Smrg  am__fastdepCC_TRUE='#'
4563b71ad168Smrg  am__fastdepCC_FALSE=
4564b71ad168Smrgfi
4565b71ad168Smrg
4566b71ad168Smrg
4567b71ad168Smrg
4568b71ad168Smrgac_header= ac_cache=
4569b71ad168Smrgfor ac_item in $ac_header_c_list
4570fb23d3a8Smrgdo
4571b71ad168Smrg  if test $ac_cache; then
4572b71ad168Smrg    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4573b71ad168Smrg    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4574b71ad168Smrg      printf "%s\n" "#define $ac_item 1" >> confdefs.h
4575fb23d3a8Smrg    fi
4576b71ad168Smrg    ac_header= ac_cache=
4577b71ad168Smrg  elif test $ac_header; then
4578b71ad168Smrg    ac_cache=$ac_item
4579b71ad168Smrg  else
4580b71ad168Smrg    ac_header=$ac_item
4581fb23d3a8Smrg  fi
4582b71ad168Smrgdone
4583fb23d3a8Smrg
4584fb23d3a8Smrg
4585fb23d3a8Smrg
4586fb23d3a8Smrg
4587fb23d3a8Smrg
4588fb23d3a8Smrg
4589fb23d3a8Smrg
4590169a0819Smrg
4591b71ad168Smrgif test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
4592b71ad168Smrgthen :
4593b71ad168Smrg
4594b71ad168Smrgprintf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
4595fb23d3a8Smrg
459695fdd44cSmrgfi
459795fdd44cSmrg
459895fdd44cSmrg
459995fdd44cSmrg
460095fdd44cSmrg
460195fdd44cSmrg
4602b71ad168Smrg
4603b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4604b71ad168Smrgprintf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4605b71ad168Smrgif test ${ac_cv_safe_to_define___extensions__+y}
4606b71ad168Smrgthen :
4607b71ad168Smrg  printf %s "(cached) " >&6
4608b71ad168Smrgelse $as_nop
460995fdd44cSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
461095fdd44cSmrg/* end confdefs.h.  */
461195fdd44cSmrg
4612b71ad168Smrg#         define __EXTENSIONS__ 1
4613b71ad168Smrg          $ac_includes_default
461495fdd44cSmrgint
4615b71ad168Smrgmain (void)
461695fdd44cSmrg{
4617b71ad168Smrg
4618b71ad168Smrg  ;
461995fdd44cSmrg  return 0;
462095fdd44cSmrg}
462195fdd44cSmrg_ACEOF
4622b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4623b71ad168Smrgthen :
4624b71ad168Smrg  ac_cv_safe_to_define___extensions__=yes
4625b71ad168Smrgelse $as_nop
4626b71ad168Smrg  ac_cv_safe_to_define___extensions__=no
462795fdd44cSmrgfi
4628b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
462995fdd44cSmrgfi
4630b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4631b71ad168Smrgprintf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
463295fdd44cSmrg
4633b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
4634b71ad168Smrgprintf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
4635b71ad168Smrgif test ${ac_cv_should_define__xopen_source+y}
4636b71ad168Smrgthen :
4637b71ad168Smrg  printf %s "(cached) " >&6
4638b71ad168Smrgelse $as_nop
4639b71ad168Smrg  ac_cv_should_define__xopen_source=no
4640b71ad168Smrg    if test $ac_cv_header_wchar_h = yes
4641b71ad168Smrgthen :
4642b71ad168Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4643b71ad168Smrg/* end confdefs.h.  */
464495fdd44cSmrg
4645b71ad168Smrg          #include <wchar.h>
4646b71ad168Smrg          mbstate_t x;
4647b71ad168Smrgint
4648b71ad168Smrgmain (void)
4649b71ad168Smrg{
465095fdd44cSmrg
4651b71ad168Smrg  ;
4652b71ad168Smrg  return 0;
4653b71ad168Smrg}
465495fdd44cSmrg_ACEOF
4655b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4656b71ad168Smrgthen :
465795fdd44cSmrg
4658b71ad168Smrgelse $as_nop
465995fdd44cSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
466095fdd44cSmrg/* end confdefs.h.  */
466195fdd44cSmrg
4662b71ad168Smrg            #define _XOPEN_SOURCE 500
4663b71ad168Smrg            #include <wchar.h>
4664b71ad168Smrg            mbstate_t x;
466595fdd44cSmrgint
4666b71ad168Smrgmain (void)
466795fdd44cSmrg{
466895fdd44cSmrg
466995fdd44cSmrg  ;
467095fdd44cSmrg  return 0;
467195fdd44cSmrg}
467295fdd44cSmrg_ACEOF
4673b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4674b71ad168Smrgthen :
4675b71ad168Smrg  ac_cv_should_define__xopen_source=yes
467695fdd44cSmrgfi
4677b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
467895fdd44cSmrgfi
4679b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4680b71ad168Smrgfi
4681b71ad168Smrgfi
4682b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
4683b71ad168Smrgprintf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
468495fdd44cSmrg
4685b71ad168Smrg  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
468695fdd44cSmrg
4687b71ad168Smrg  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
468895fdd44cSmrg
4689b71ad168Smrg  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
469095fdd44cSmrg
4691b71ad168Smrg  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
469295fdd44cSmrg
4693b71ad168Smrg  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
469495fdd44cSmrg
4695b71ad168Smrg  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
469695fdd44cSmrg
4697b71ad168Smrg  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
469895fdd44cSmrg
4699b71ad168Smrg  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
470095fdd44cSmrg
4701b71ad168Smrg  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
470295fdd44cSmrg
4703b71ad168Smrg  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
470495fdd44cSmrg
4705b71ad168Smrg  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
470695fdd44cSmrg
4707b71ad168Smrg  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
470895fdd44cSmrg
4709b71ad168Smrg  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
471095fdd44cSmrg
4711b71ad168Smrg  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
471295fdd44cSmrg
4713b71ad168Smrg  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
471495fdd44cSmrg
4715b71ad168Smrg  if test $ac_cv_header_minix_config_h = yes
4716b71ad168Smrgthen :
4717b71ad168Smrg  MINIX=yes
4718b71ad168Smrg    printf "%s\n" "#define _MINIX 1" >>confdefs.h
471995fdd44cSmrg
4720b71ad168Smrg    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
472195fdd44cSmrg
4722b71ad168Smrg    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
472395fdd44cSmrg
4724b71ad168Smrgelse $as_nop
4725b71ad168Smrg  MINIX=
4726b71ad168Smrgfi
4727b71ad168Smrg  if test $ac_cv_safe_to_define___extensions__ = yes
4728b71ad168Smrgthen :
4729b71ad168Smrg  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
473095fdd44cSmrg
4731b71ad168Smrgfi
4732b71ad168Smrg  if test $ac_cv_should_define__xopen_source = yes
4733b71ad168Smrgthen :
4734b71ad168Smrg  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
473595fdd44cSmrg
4736b71ad168Smrgfi
473795fdd44cSmrg
473895fdd44cSmrg
4739b71ad168Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
4740b71ad168Smrg
474195fdd44cSmrg
474295fdd44cSmrg
474395fdd44cSmrg
474495fdd44cSmrg
474595fdd44cSmrg
474695fdd44cSmrg
474795fdd44cSmrg
4748fb23d3a8Smrg
4749fb23d3a8Smrg
4750169a0819Smrg
4751fb23d3a8Smrg
4752b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
4753b71ad168Smrgprintf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
4754b71ad168Smrgif test ${ac_cv_c_undeclared_builtin_options+y}
4755b71ad168Smrgthen :
4756b71ad168Smrg  printf %s "(cached) " >&6
4757b71ad168Smrgelse $as_nop
4758b71ad168Smrg  ac_save_CFLAGS=$CFLAGS
4759b71ad168Smrg   ac_cv_c_undeclared_builtin_options='cannot detect'
4760b71ad168Smrg   for ac_arg in '' -fno-builtin; do
4761b71ad168Smrg     CFLAGS="$ac_save_CFLAGS $ac_arg"
4762b71ad168Smrg     # This test program should *not* compile successfully.
4763b71ad168Smrg     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4764b71ad168Smrg/* end confdefs.h.  */
4765fb23d3a8Smrg
4766b71ad168Smrgint
4767b71ad168Smrgmain (void)
4768b71ad168Smrg{
4769b71ad168Smrg(void) strchr;
4770b71ad168Smrg  ;
4771b71ad168Smrg  return 0;
4772b71ad168Smrg}
4773b71ad168Smrg_ACEOF
4774b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4775b71ad168Smrgthen :
4776fb23d3a8Smrg
4777b71ad168Smrgelse $as_nop
4778b71ad168Smrg  # This test program should compile successfully.
4779b71ad168Smrg        # No library function is consistently available on
4780b71ad168Smrg        # freestanding implementations, so test against a dummy
4781b71ad168Smrg        # declaration.  Include always-available headers on the
4782b71ad168Smrg        # off chance that they somehow elicit warnings.
4783b71ad168Smrg        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4784b71ad168Smrg/* end confdefs.h.  */
4785b71ad168Smrg#include <float.h>
4786b71ad168Smrg#include <limits.h>
4787b71ad168Smrg#include <stdarg.h>
4788b71ad168Smrg#include <stddef.h>
4789b71ad168Smrgextern void ac_decl (int, char *);
4790b71ad168Smrg
4791b71ad168Smrgint
4792b71ad168Smrgmain (void)
4793b71ad168Smrg{
4794b71ad168Smrg(void) ac_decl (0, (char *) 0);
4795b71ad168Smrg  (void) ac_decl;
479695fdd44cSmrg
479795fdd44cSmrg  ;
4798fb23d3a8Smrg  return 0;
4799fb23d3a8Smrg}
4800fb23d3a8Smrg_ACEOF
4801b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
4802b71ad168Smrgthen :
4803b71ad168Smrg  if test x"$ac_arg" = x
4804b71ad168Smrgthen :
4805b71ad168Smrg  ac_cv_c_undeclared_builtin_options='none needed'
4806b71ad168Smrgelse $as_nop
4807b71ad168Smrg  ac_cv_c_undeclared_builtin_options=$ac_arg
4808fb23d3a8Smrgfi
4809b71ad168Smrg          break
4810fb23d3a8Smrgfi
4811b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4812169a0819Smrgfi
4813b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4814b71ad168Smrg    done
4815b71ad168Smrg    CFLAGS=$ac_save_CFLAGS
4816b71ad168Smrg
4817b71ad168Smrgfi
4818b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
4819b71ad168Smrgprintf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
4820b71ad168Smrg  case $ac_cv_c_undeclared_builtin_options in #(
4821b71ad168Smrg  'cannot detect') :
4822b71ad168Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4823b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4824b71ad168Smrgas_fn_error $? "cannot make $CC report undeclared builtins
4825b71ad168SmrgSee \`config.log' for more details" "$LINENO" 5; } ;; #(
4826b71ad168Smrg  'none needed') :
4827b71ad168Smrg    ac_c_undeclared_builtin_options='' ;; #(
4828b71ad168Smrg  *) :
4829b71ad168Smrg    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
4830b71ad168Smrgesac
4831fb23d3a8Smrg
4832fb23d3a8Smrg
4833fb23d3a8Smrg
4834fb23d3a8Smrg
48353544ea2eSmrg
4836b71ad168Smrgac_fn_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
4837b71ad168Smrgif test "x$ac_cv_have_decl___clang__" = xyes
4838b71ad168Smrgthen :
48393544ea2eSmrg  CLANGCC="yes"
4840b71ad168Smrgelse $as_nop
48413544ea2eSmrg  CLANGCC="no"
48423544ea2eSmrgfi
4843b71ad168Smrgac_fn_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
4844b71ad168Smrgif test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes
4845b71ad168Smrgthen :
48463544ea2eSmrg  INTELCC="yes"
4847b71ad168Smrgelse $as_nop
48483544ea2eSmrg  INTELCC="no"
48493544ea2eSmrgfi
4850b71ad168Smrgac_fn_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
4851b71ad168Smrgif test "x$ac_cv_have_decl___SUNPRO_C" = xyes
4852b71ad168Smrgthen :
48533544ea2eSmrg  SUNCC="yes"
4854b71ad168Smrgelse $as_nop
48553544ea2eSmrg  SUNCC="no"
48563544ea2eSmrgfi
48573544ea2eSmrg
48583544ea2eSmrg
48593544ea2eSmrg
48603544ea2eSmrg
4861aadd013eSmrg
4862aadd013eSmrg
4863aadd013eSmrg
4864aadd013eSmrg
4865169a0819Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
4866169a0819Smrg	if test -n "$ac_tool_prefix"; then
4867169a0819Smrg  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4868169a0819Smrgset dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4869b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
4871b71ad168Smrgif test ${ac_cv_path_PKG_CONFIG+y}
4872b71ad168Smrgthen :
4873b71ad168Smrg  printf %s "(cached) " >&6
4874b71ad168Smrgelse $as_nop
4875169a0819Smrg  case $PKG_CONFIG in
4876169a0819Smrg  [\\/]* | ?:[\\/]*)
4877169a0819Smrg  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4878169a0819Smrg  ;;
4879169a0819Smrg  *)
4880169a0819Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4881169a0819Smrgfor as_dir in $PATH
4882169a0819Smrgdo
4883169a0819Smrg  IFS=$as_save_IFS
4884b71ad168Smrg  case $as_dir in #(((
4885b71ad168Smrg    '') as_dir=./ ;;
4886b71ad168Smrg    */) ;;
4887b71ad168Smrg    *) as_dir=$as_dir/ ;;
4888b71ad168Smrg  esac
4889169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
4890b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4891b71ad168Smrg    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
4892b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4893169a0819Smrg    break 2
4894169a0819Smrg  fi
4895169a0819Smrgdone
4896169a0819Smrg  done
4897169a0819SmrgIFS=$as_save_IFS
4898fb23d3a8Smrg
4899169a0819Smrg  ;;
4900fb23d3a8Smrgesac
4901169a0819Smrgfi
4902169a0819SmrgPKG_CONFIG=$ac_cv_path_PKG_CONFIG
4903169a0819Smrgif test -n "$PKG_CONFIG"; then
4904b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
4905b71ad168Smrgprintf "%s\n" "$PKG_CONFIG" >&6; }
4906fb23d3a8Smrgelse
4907b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908b71ad168Smrgprintf "%s\n" "no" >&6; }
4909fb23d3a8Smrgfi
4910fb23d3a8Smrg
4911fb23d3a8Smrg
4912fb23d3a8Smrgfi
4913169a0819Smrgif test -z "$ac_cv_path_PKG_CONFIG"; then
4914169a0819Smrg  ac_pt_PKG_CONFIG=$PKG_CONFIG
4915169a0819Smrg  # Extract the first word of "pkg-config", so it can be a program name with args.
4916169a0819Smrgset dummy pkg-config; ac_word=$2
4917b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918b71ad168Smrgprintf %s "checking for $ac_word... " >&6; }
4919b71ad168Smrgif test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
4920b71ad168Smrgthen :
4921b71ad168Smrg  printf %s "(cached) " >&6
4922b71ad168Smrgelse $as_nop
4923169a0819Smrg  case $ac_pt_PKG_CONFIG in
4924169a0819Smrg  [\\/]* | ?:[\\/]*)
4925169a0819Smrg  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4926169a0819Smrg  ;;
4927169a0819Smrg  *)
4928169a0819Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4929169a0819Smrgfor as_dir in $PATH
4930fb23d3a8Smrgdo
4931169a0819Smrg  IFS=$as_save_IFS
4932b71ad168Smrg  case $as_dir in #(((
4933b71ad168Smrg    '') as_dir=./ ;;
4934b71ad168Smrg    */) ;;
4935b71ad168Smrg    *) as_dir=$as_dir/ ;;
4936b71ad168Smrg  esac
4937169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
4938b71ad168Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4939b71ad168Smrg    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
4940b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4941169a0819Smrg    break 2
4942169a0819Smrg  fi
4943169a0819Smrgdone
4944169a0819Smrg  done
4945169a0819SmrgIFS=$as_save_IFS
4946169a0819Smrg
4947169a0819Smrg  ;;
4948fb23d3a8Smrgesac
4949169a0819Smrgfi
4950169a0819Smrgac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4951169a0819Smrgif test -n "$ac_pt_PKG_CONFIG"; then
4952b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
4953b71ad168Smrgprintf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
4954fb23d3a8Smrgelse
4955b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956b71ad168Smrgprintf "%s\n" "no" >&6; }
4957fb23d3a8Smrgfi
4958fb23d3a8Smrg
4959169a0819Smrg  if test "x$ac_pt_PKG_CONFIG" = x; then
4960169a0819Smrg    PKG_CONFIG=""
4961169a0819Smrg  else
4962169a0819Smrg    case $cross_compiling:$ac_tool_warned in
4963169a0819Smrgyes:)
4964b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4965b71ad168Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4966169a0819Smrgac_tool_warned=yes ;;
4967fb23d3a8Smrgesac
4968169a0819Smrg    PKG_CONFIG=$ac_pt_PKG_CONFIG
4969169a0819Smrg  fi
4970169a0819Smrgelse
4971169a0819Smrg  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4972169a0819Smrgfi
4973fb23d3a8Smrg
4974169a0819Smrgfi
4975169a0819Smrgif test -n "$PKG_CONFIG"; then
4976169a0819Smrg	_pkg_min_version=0.9.0
4977b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
4978b71ad168Smrgprintf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
4979169a0819Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
4980b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4981b71ad168Smrgprintf "%s\n" "yes" >&6; }
4982169a0819Smrg	else
4983b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984b71ad168Smrgprintf "%s\n" "no" >&6; }
4985169a0819Smrg		PKG_CONFIG=""
4986169a0819Smrg	fi
4987169a0819Smrgfi
4988fb23d3a8Smrg
4989b71ad168Smrg
4990b71ad168Smrg  # Make sure we can run config.sub.
4991b71ad168Smrg$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
4992b71ad168Smrg  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
4993b71ad168Smrg
4994b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4995b71ad168Smrgprintf %s "checking build system type... " >&6; }
4996b71ad168Smrgif test ${ac_cv_build+y}
4997b71ad168Smrgthen :
4998b71ad168Smrg  printf %s "(cached) " >&6
4999b71ad168Smrgelse $as_nop
5000fb23d3a8Smrg  ac_build_alias=$build_alias
5001fb23d3a8Smrgtest "x$ac_build_alias" = x &&
5002b71ad168Smrg  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
5003fb23d3a8Smrgtest "x$ac_build_alias" = x &&
5004169a0819Smrg  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5005b71ad168Smrgac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
5006b71ad168Smrg  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
5007fb23d3a8Smrg
5008fb23d3a8Smrgfi
5009b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5010b71ad168Smrgprintf "%s\n" "$ac_cv_build" >&6; }
5011fb23d3a8Smrgcase $ac_cv_build in
5012fb23d3a8Smrg*-*-*) ;;
5013169a0819Smrg*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5014fb23d3a8Smrgesac
5015fb23d3a8Smrgbuild=$ac_cv_build
5016fb23d3a8Smrgac_save_IFS=$IFS; IFS='-'
5017fb23d3a8Smrgset x $ac_cv_build
5018fb23d3a8Smrgshift
5019fb23d3a8Smrgbuild_cpu=$1
5020fb23d3a8Smrgbuild_vendor=$2
5021fb23d3a8Smrgshift; shift
5022fb23d3a8Smrg# Remember, the first character of IFS is used to create $*,
5023fb23d3a8Smrg# except with old shells:
5024fb23d3a8Smrgbuild_os=$*
5025fb23d3a8SmrgIFS=$ac_save_IFS
5026fb23d3a8Smrgcase $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5027fb23d3a8Smrg
5028fb23d3a8Smrg
5029b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5030b71ad168Smrgprintf %s "checking host system type... " >&6; }
5031b71ad168Smrgif test ${ac_cv_host+y}
5032b71ad168Smrgthen :
5033b71ad168Smrg  printf %s "(cached) " >&6
5034b71ad168Smrgelse $as_nop
5035fb23d3a8Smrg  if test "x$host_alias" = x; then
5036fb23d3a8Smrg  ac_cv_host=$ac_cv_build
5037fb23d3a8Smrgelse
5038b71ad168Smrg  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
5039b71ad168Smrg    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
5040fb23d3a8Smrgfi
5041fb23d3a8Smrg
5042fb23d3a8Smrgfi
5043b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5044b71ad168Smrgprintf "%s\n" "$ac_cv_host" >&6; }
5045fb23d3a8Smrgcase $ac_cv_host in
5046fb23d3a8Smrg*-*-*) ;;
5047169a0819Smrg*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5048fb23d3a8Smrgesac
5049fb23d3a8Smrghost=$ac_cv_host
5050fb23d3a8Smrgac_save_IFS=$IFS; IFS='-'
5051fb23d3a8Smrgset x $ac_cv_host
5052fb23d3a8Smrgshift
5053fb23d3a8Smrghost_cpu=$1
5054fb23d3a8Smrghost_vendor=$2
5055fb23d3a8Smrgshift; shift
5056fb23d3a8Smrg# Remember, the first character of IFS is used to create $*,
5057fb23d3a8Smrg# except with old shells:
5058fb23d3a8Smrghost_os=$*
5059fb23d3a8SmrgIFS=$ac_save_IFS
5060fb23d3a8Smrgcase $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5061fb23d3a8Smrg
5062fb23d3a8Smrg
5063b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5064b71ad168Smrgprintf %s "checking for a sed that does not truncate output... " >&6; }
5065b71ad168Smrgif test ${ac_cv_path_SED+y}
5066b71ad168Smrgthen :
5067b71ad168Smrg  printf %s "(cached) " >&6
5068b71ad168Smrgelse $as_nop
5069169a0819Smrg            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5070169a0819Smrg     for ac_i in 1 2 3 4 5 6 7; do
5071169a0819Smrg       ac_script="$ac_script$as_nl$ac_script"
5072169a0819Smrg     done
5073169a0819Smrg     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5074169a0819Smrg     { ac_script=; unset ac_script;}
5075169a0819Smrg     if test -z "$SED"; then
5076169a0819Smrg  ac_path_SED_found=false
5077169a0819Smrg  # Loop through the user's path and test for each of PROGNAME-LIST
5078169a0819Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079169a0819Smrgfor as_dir in $PATH
5080169a0819Smrgdo
5081169a0819Smrg  IFS=$as_save_IFS
5082b71ad168Smrg  case $as_dir in #(((
5083b71ad168Smrg    '') as_dir=./ ;;
5084b71ad168Smrg    */) ;;
5085b71ad168Smrg    *) as_dir=$as_dir/ ;;
5086b71ad168Smrg  esac
5087b71ad168Smrg    for ac_prog in sed gsed
5088b71ad168Smrg   do
5089169a0819Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
5090b71ad168Smrg      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
509195fdd44cSmrg      as_fn_executable_p "$ac_path_SED" || continue
5092169a0819Smrg# Check for GNU ac_path_SED and select it if it is found.
5093169a0819Smrg  # Check for GNU $ac_path_SED
5094169a0819Smrgcase `"$ac_path_SED" --version 2>&1` in
5095169a0819Smrg*GNU*)
5096169a0819Smrg  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5097169a0819Smrg*)
5098169a0819Smrg  ac_count=0
5099b71ad168Smrg  printf %s 0123456789 >"conftest.in"
5100169a0819Smrg  while :
5101169a0819Smrg  do
5102169a0819Smrg    cat "conftest.in" "conftest.in" >"conftest.tmp"
5103169a0819Smrg    mv "conftest.tmp" "conftest.in"
5104169a0819Smrg    cp "conftest.in" "conftest.nl"
5105b71ad168Smrg    printf "%s\n" '' >> "conftest.nl"
5106169a0819Smrg    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5107169a0819Smrg    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5108169a0819Smrg    as_fn_arith $ac_count + 1 && ac_count=$as_val
5109169a0819Smrg    if test $ac_count -gt ${ac_path_SED_max-0}; then
5110169a0819Smrg      # Best one so far, save it but keep looking for a better one
5111169a0819Smrg      ac_cv_path_SED="$ac_path_SED"
5112169a0819Smrg      ac_path_SED_max=$ac_count
5113169a0819Smrg    fi
5114169a0819Smrg    # 10*(2^10) chars as input seems more than enough
5115169a0819Smrg    test $ac_count -gt 10 && break
5116169a0819Smrg  done
5117169a0819Smrg  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5118fb23d3a8Smrgesac
5119169a0819Smrg
5120169a0819Smrg      $ac_path_SED_found && break 3
5121169a0819Smrg    done
5122169a0819Smrg  done
5123169a0819Smrg  done
5124169a0819SmrgIFS=$as_save_IFS
5125169a0819Smrg  if test -z "$ac_cv_path_SED"; then
5126169a0819Smrg    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5127169a0819Smrg  fi
5128fb23d3a8Smrgelse
5129169a0819Smrg  ac_cv_path_SED=$SED
5130fb23d3a8Smrgfi
5131fb23d3a8Smrg
5132fb23d3a8Smrgfi
5133b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5134b71ad168Smrgprintf "%s\n" "$ac_cv_path_SED" >&6; }
5135169a0819Smrg SED="$ac_cv_path_SED"
5136169a0819Smrg  rm -f conftest.sed
5137169a0819Smrg
5138169a0819Smrg
5139169a0819Smrg
5140169a0819Smrg
5141169a0819Smrg
51423544ea2eSmrg
51433544ea2eSmrg# Check whether --enable-selective-werror was given.
5144b71ad168Smrgif test ${enable_selective_werror+y}
5145b71ad168Smrgthen :
51463544ea2eSmrg  enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval
5147b71ad168Smrgelse $as_nop
51483544ea2eSmrg  SELECTIVE_WERROR=yes
5149fb23d3a8Smrgfi
5150fb23d3a8Smrg
51513544ea2eSmrg
51523544ea2eSmrg
51533544ea2eSmrg
51543544ea2eSmrg
51553544ea2eSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
51563544ea2eSmrgif test "x$SUNCC" = "xyes"; then
51573544ea2eSmrg    BASE_CFLAGS="-v"
51583544ea2eSmrgelse
51593544ea2eSmrg    BASE_CFLAGS=""
5160fb23d3a8Smrgfi
5161fb23d3a8Smrg
51623544ea2eSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
5163fb23d3a8Smrg
5164fb23d3a8Smrg
5165fb23d3a8Smrg
5166fb23d3a8Smrg
5167fb23d3a8Smrg
5168fb23d3a8Smrg
5169fb23d3a8Smrg
51703544ea2eSmrg
51713544ea2eSmrg
51723544ea2eSmrg
51733544ea2eSmrg
51743544ea2eSmrg
51753544ea2eSmrg
51763544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
51773544ea2eSmrg
51783544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
51793544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5180b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
5181b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
5182b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
5183b71ad168Smrgthen :
5184b71ad168Smrg  printf %s "(cached) " >&6
5185b71ad168Smrgelse $as_nop
51863544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51873544ea2eSmrg/* end confdefs.h.  */
51883544ea2eSmrgint i;
51893544ea2eSmrg_ACEOF
5190b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5191b71ad168Smrgthen :
51923544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
5193b71ad168Smrgelse $as_nop
51943544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
51953544ea2eSmrgfi
5196b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
51973544ea2eSmrgfi
5198b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
5199b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
52003544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
52013544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
5202fb23d3a8Smrgfi
5203fb23d3a8Smrg
52043544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
52053544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
52063544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5207fb23d3a8Smrg	fi
52083544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
5209b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
5210b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
5211b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
5212b71ad168Smrgthen :
5213b71ad168Smrg  printf %s "(cached) " >&6
5214b71ad168Smrgelse $as_nop
52153544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52163544ea2eSmrg/* end confdefs.h.  */
52173544ea2eSmrgint i;
52183544ea2eSmrg_ACEOF
5219b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5220b71ad168Smrgthen :
52213544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
5222b71ad168Smrgelse $as_nop
52233544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
52243544ea2eSmrgfi
5225b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
52263544ea2eSmrgfi
5227b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
5228b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
52293544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
52303544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
5231fb23d3a8Smrgfi
5232fb23d3a8Smrg
52333544ea2eSmrgfound="no"
5234fb23d3a8Smrg
52353544ea2eSmrg	if test $found = "no" ; then
523695fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
52373544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
52383544ea2eSmrg		fi
5239fb23d3a8Smrg
524095fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
52413544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
52423544ea2eSmrg		fi
5243fb23d3a8Smrg
52443544ea2eSmrg		CFLAGS="$CFLAGS -Wall"
5245fb23d3a8Smrg
5246b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
5247b71ad168Smrgprintf %s "checking if $CC supports -Wall... " >&6; }
52483544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wall
5249b71ad168Smrg		if eval test \${$cacheid+y}
5250b71ad168Smrgthen :
5251b71ad168Smrg  printf %s "(cached) " >&6
5252b71ad168Smrgelse $as_nop
52533544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52543544ea2eSmrg/* end confdefs.h.  */
52553544ea2eSmrgint i;
52563544ea2eSmrgint
5257b71ad168Smrgmain (void)
52583544ea2eSmrg{
5259fb23d3a8Smrg
52603544ea2eSmrg  ;
52613544ea2eSmrg  return 0;
52623544ea2eSmrg}
5263fb23d3a8Smrg_ACEOF
5264b71ad168Smrgif ac_fn_c_try_link "$LINENO"
5265b71ad168Smrgthen :
52663544ea2eSmrg  eval $cacheid=yes
5267b71ad168Smrgelse $as_nop
52683544ea2eSmrg  eval $cacheid=no
52693544ea2eSmrgfi
5270b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
52713544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
52723544ea2eSmrgfi
5273fb23d3a8Smrg
52743544ea2eSmrg
52753544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
52763544ea2eSmrg
52773544ea2eSmrg		eval supported=\$$cacheid
5278b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
5279b71ad168Smrgprintf "%s\n" "$supported" >&6; }
52803544ea2eSmrg		if test "$supported" = "yes" ; then
52813544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wall"
52823544ea2eSmrg			found="yes"
52833544ea2eSmrg		fi
5284fb23d3a8Smrg	fi
5285fb23d3a8Smrg
5286fb23d3a8Smrg
5287fb23d3a8Smrg
5288fb23d3a8Smrg
5289fb23d3a8Smrg
5290169a0819Smrg
5291169a0819Smrg
5292169a0819Smrg
5293169a0819Smrg
5294fb23d3a8Smrg
5295fb23d3a8Smrg
5296fb23d3a8Smrg
5297fb23d3a8Smrg
5298fb23d3a8Smrg
5299fb23d3a8Smrg
53003544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
5301fb23d3a8Smrg
53023544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
53033544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5304b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
5305b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
5306b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
5307b71ad168Smrgthen :
5308b71ad168Smrg  printf %s "(cached) " >&6
5309b71ad168Smrgelse $as_nop
53103544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53113544ea2eSmrg/* end confdefs.h.  */
53123544ea2eSmrgint i;
53133544ea2eSmrg_ACEOF
5314b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5315b71ad168Smrgthen :
53163544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
5317b71ad168Smrgelse $as_nop
53183544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
5319fb23d3a8Smrgfi
5320b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5321fb23d3a8Smrgfi
5322b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
5323b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
53243544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
53253544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
5326fb23d3a8Smrgfi
5327fb23d3a8Smrg
53283544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
53293544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
53303544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
53313544ea2eSmrg	fi
53323544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
5333b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
5334b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
5335b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
5336b71ad168Smrgthen :
5337b71ad168Smrg  printf %s "(cached) " >&6
5338b71ad168Smrgelse $as_nop
53393544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53403544ea2eSmrg/* end confdefs.h.  */
53413544ea2eSmrgint i;
53423544ea2eSmrg_ACEOF
5343b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5344b71ad168Smrgthen :
53453544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
5346b71ad168Smrgelse $as_nop
53473544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
5348fb23d3a8Smrgfi
5349b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
53503544ea2eSmrgfi
5351b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
5352b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
53533544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
53543544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
5355fb23d3a8Smrgfi
5356fb23d3a8Smrg
53573544ea2eSmrgfound="no"
53583544ea2eSmrg
53593544ea2eSmrg	if test $found = "no" ; then
536095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
53613544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
53623544ea2eSmrg		fi
53633544ea2eSmrg
536495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
53653544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
53663544ea2eSmrg		fi
53673544ea2eSmrg
53683544ea2eSmrg		CFLAGS="$CFLAGS -Wpointer-arith"
53693544ea2eSmrg
5370b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
5371b71ad168Smrgprintf %s "checking if $CC supports -Wpointer-arith... " >&6; }
53723544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wpointer_arith
5373b71ad168Smrg		if eval test \${$cacheid+y}
5374b71ad168Smrgthen :
5375b71ad168Smrg  printf %s "(cached) " >&6
5376b71ad168Smrgelse $as_nop
53773544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53783544ea2eSmrg/* end confdefs.h.  */
53793544ea2eSmrgint i;
53803544ea2eSmrgint
5381b71ad168Smrgmain (void)
53823544ea2eSmrg{
53833544ea2eSmrg
53843544ea2eSmrg  ;
53853544ea2eSmrg  return 0;
53863544ea2eSmrg}
53873544ea2eSmrg_ACEOF
5388b71ad168Smrgif ac_fn_c_try_link "$LINENO"
5389b71ad168Smrgthen :
53903544ea2eSmrg  eval $cacheid=yes
5391b71ad168Smrgelse $as_nop
53923544ea2eSmrg  eval $cacheid=no
5393fb23d3a8Smrgfi
5394b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
53953544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
5396fb23d3a8Smrgfi
5397fb23d3a8Smrg
5398fb23d3a8Smrg
53993544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
5400fb23d3a8Smrg
54013544ea2eSmrg		eval supported=\$$cacheid
5402b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
5403b71ad168Smrgprintf "%s\n" "$supported" >&6; }
54043544ea2eSmrg		if test "$supported" = "yes" ; then
54053544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith"
54063544ea2eSmrg			found="yes"
54073544ea2eSmrg		fi
54083544ea2eSmrg	fi
5409fb23d3a8Smrg
5410fb23d3a8Smrg
5411fb23d3a8Smrg
5412fb23d3a8Smrg
5413fb23d3a8Smrg
5414fb23d3a8Smrg
5415fb23d3a8Smrg
5416fb23d3a8Smrg
5417fb23d3a8Smrg
5418fb23d3a8Smrg
5419fb23d3a8Smrg
5420fb23d3a8Smrg
5421fb23d3a8Smrg
54223544ea2eSmrg
54233544ea2eSmrg
54243544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
54253544ea2eSmrg
54263544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
54273544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5428b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
5429b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
5430b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
5431b71ad168Smrgthen :
5432b71ad168Smrg  printf %s "(cached) " >&6
5433b71ad168Smrgelse $as_nop
54343544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54353544ea2eSmrg/* end confdefs.h.  */
54363544ea2eSmrgint i;
54373544ea2eSmrg_ACEOF
5438b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5439b71ad168Smrgthen :
54403544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
5441b71ad168Smrgelse $as_nop
54423544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
54433544ea2eSmrgfi
5444b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
54453544ea2eSmrgfi
5446b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
5447b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
54483544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
54493544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
54503544ea2eSmrgfi
54513544ea2eSmrg
54523544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
54533544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
54543544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
54553544ea2eSmrg	fi
54563544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
5457b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
5458b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
5459b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
5460b71ad168Smrgthen :
5461b71ad168Smrg  printf %s "(cached) " >&6
5462b71ad168Smrgelse $as_nop
54633544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54643544ea2eSmrg/* end confdefs.h.  */
54653544ea2eSmrgint i;
54663544ea2eSmrg_ACEOF
5467b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5468b71ad168Smrgthen :
54693544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
5470b71ad168Smrgelse $as_nop
54713544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
54723544ea2eSmrgfi
5473b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
54743544ea2eSmrgfi
5475b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
5476b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
54773544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
54783544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
54793544ea2eSmrgfi
54803544ea2eSmrg
54813544ea2eSmrgfound="no"
54823544ea2eSmrg
54833544ea2eSmrg	if test $found = "no" ; then
548495fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
54853544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
54863544ea2eSmrg		fi
54873544ea2eSmrg
548895fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
54893544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
54903544ea2eSmrg		fi
54913544ea2eSmrg
54923544ea2eSmrg		CFLAGS="$CFLAGS -Wmissing-declarations"
54933544ea2eSmrg
5494b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5
5495b71ad168Smrgprintf %s "checking if $CC supports -Wmissing-declarations... " >&6; }
54963544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wmissing_declarations
5497b71ad168Smrg		if eval test \${$cacheid+y}
5498b71ad168Smrgthen :
5499b71ad168Smrg  printf %s "(cached) " >&6
5500b71ad168Smrgelse $as_nop
55013544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55023544ea2eSmrg/* end confdefs.h.  */
55033544ea2eSmrgint i;
55043544ea2eSmrgint
5505b71ad168Smrgmain (void)
55063544ea2eSmrg{
55073544ea2eSmrg
55083544ea2eSmrg  ;
55093544ea2eSmrg  return 0;
55103544ea2eSmrg}
55113544ea2eSmrg_ACEOF
5512b71ad168Smrgif ac_fn_c_try_link "$LINENO"
5513b71ad168Smrgthen :
55143544ea2eSmrg  eval $cacheid=yes
5515b71ad168Smrgelse $as_nop
55163544ea2eSmrg  eval $cacheid=no
55173544ea2eSmrgfi
5518b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
55193544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
55203544ea2eSmrgfi
55213544ea2eSmrg
55223544ea2eSmrg
55233544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
55243544ea2eSmrg
55253544ea2eSmrg		eval supported=\$$cacheid
5526b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
5527b71ad168Smrgprintf "%s\n" "$supported" >&6; }
55283544ea2eSmrg		if test "$supported" = "yes" ; then
55293544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations"
55303544ea2eSmrg			found="yes"
55313544ea2eSmrg		fi
55323544ea2eSmrg	fi
55333544ea2eSmrg
55343544ea2eSmrg
55353544ea2eSmrg
55363544ea2eSmrg
55373544ea2eSmrg
55383544ea2eSmrg
55393544ea2eSmrg
55403544ea2eSmrg
55413544ea2eSmrg
55423544ea2eSmrg
55433544ea2eSmrg
55443544ea2eSmrg
55453544ea2eSmrg
55463544ea2eSmrg
55473544ea2eSmrg
55483544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
55493544ea2eSmrg
55503544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
55513544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5552b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
5553b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
5554b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
5555b71ad168Smrgthen :
5556b71ad168Smrg  printf %s "(cached) " >&6
5557b71ad168Smrgelse $as_nop
55583544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55593544ea2eSmrg/* end confdefs.h.  */
55603544ea2eSmrgint i;
55613544ea2eSmrg_ACEOF
5562b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5563b71ad168Smrgthen :
55643544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
5565b71ad168Smrgelse $as_nop
55663544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
55673544ea2eSmrgfi
5568b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
55693544ea2eSmrgfi
5570b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
5571b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
55723544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
55733544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
55743544ea2eSmrgfi
55753544ea2eSmrg
55763544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
55773544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
55783544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
55793544ea2eSmrg	fi
55803544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
5581b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
5582b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
5583b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
5584b71ad168Smrgthen :
5585b71ad168Smrg  printf %s "(cached) " >&6
5586b71ad168Smrgelse $as_nop
55873544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55883544ea2eSmrg/* end confdefs.h.  */
55893544ea2eSmrgint i;
55903544ea2eSmrg_ACEOF
5591b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5592b71ad168Smrgthen :
55933544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
5594b71ad168Smrgelse $as_nop
55953544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
55963544ea2eSmrgfi
5597b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
55983544ea2eSmrgfi
5599b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
5600b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
56013544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
56023544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
56033544ea2eSmrgfi
56043544ea2eSmrg
56053544ea2eSmrgfound="no"
56063544ea2eSmrg
56073544ea2eSmrg	if test $found = "no" ; then
560895fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
56093544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
56103544ea2eSmrg		fi
56113544ea2eSmrg
561295fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
56133544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
56143544ea2eSmrg		fi
56153544ea2eSmrg
56163544ea2eSmrg		CFLAGS="$CFLAGS -Wformat=2"
56173544ea2eSmrg
5618b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5
5619b71ad168Smrgprintf %s "checking if $CC supports -Wformat=2... " >&6; }
562095fdd44cSmrg		cacheid=xorg_cv_cc_flag__Wformat_2
5621b71ad168Smrg		if eval test \${$cacheid+y}
5622b71ad168Smrgthen :
5623b71ad168Smrg  printf %s "(cached) " >&6
5624b71ad168Smrgelse $as_nop
56253544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56263544ea2eSmrg/* end confdefs.h.  */
56273544ea2eSmrgint i;
56283544ea2eSmrgint
5629b71ad168Smrgmain (void)
56303544ea2eSmrg{
56313544ea2eSmrg
56323544ea2eSmrg  ;
56333544ea2eSmrg  return 0;
56343544ea2eSmrg}
56353544ea2eSmrg_ACEOF
5636b71ad168Smrgif ac_fn_c_try_link "$LINENO"
5637b71ad168Smrgthen :
56383544ea2eSmrg  eval $cacheid=yes
5639b71ad168Smrgelse $as_nop
56403544ea2eSmrg  eval $cacheid=no
56413544ea2eSmrgfi
5642b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
56433544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
56443544ea2eSmrgfi
56453544ea2eSmrg
56463544ea2eSmrg
56473544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
56483544ea2eSmrg
56493544ea2eSmrg		eval supported=\$$cacheid
5650b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
5651b71ad168Smrgprintf "%s\n" "$supported" >&6; }
56523544ea2eSmrg		if test "$supported" = "yes" ; then
56533544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wformat=2"
56543544ea2eSmrg			found="yes"
56553544ea2eSmrg		fi
56563544ea2eSmrg	fi
56573544ea2eSmrg
56583544ea2eSmrg	if test $found = "no" ; then
565995fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
56603544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
56613544ea2eSmrg		fi
56623544ea2eSmrg
566395fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
56643544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
56653544ea2eSmrg		fi
56663544ea2eSmrg
56673544ea2eSmrg		CFLAGS="$CFLAGS -Wformat"
56683544ea2eSmrg
5669b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5
5670b71ad168Smrgprintf %s "checking if $CC supports -Wformat... " >&6; }
56713544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wformat
5672b71ad168Smrg		if eval test \${$cacheid+y}
5673b71ad168Smrgthen :
5674b71ad168Smrg  printf %s "(cached) " >&6
5675b71ad168Smrgelse $as_nop
56763544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56773544ea2eSmrg/* end confdefs.h.  */
56783544ea2eSmrgint i;
56793544ea2eSmrgint
5680b71ad168Smrgmain (void)
56813544ea2eSmrg{
56823544ea2eSmrg
56833544ea2eSmrg  ;
56843544ea2eSmrg  return 0;
56853544ea2eSmrg}
56863544ea2eSmrg_ACEOF
5687b71ad168Smrgif ac_fn_c_try_link "$LINENO"
5688b71ad168Smrgthen :
56893544ea2eSmrg  eval $cacheid=yes
5690b71ad168Smrgelse $as_nop
56913544ea2eSmrg  eval $cacheid=no
56923544ea2eSmrgfi
5693b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
56943544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
56953544ea2eSmrgfi
56963544ea2eSmrg
56973544ea2eSmrg
56983544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
56993544ea2eSmrg
57003544ea2eSmrg		eval supported=\$$cacheid
5701b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
5702b71ad168Smrgprintf "%s\n" "$supported" >&6; }
57033544ea2eSmrg		if test "$supported" = "yes" ; then
57043544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wformat"
57053544ea2eSmrg			found="yes"
57063544ea2eSmrg		fi
57073544ea2eSmrg	fi
57083544ea2eSmrg
57093544ea2eSmrg
57103544ea2eSmrg
57113544ea2eSmrg
57123544ea2eSmrg
57133544ea2eSmrg
57143544ea2eSmrg
57153544ea2eSmrg
57163544ea2eSmrg
57173544ea2eSmrg
57183544ea2eSmrg
57193544ea2eSmrg
57203544ea2eSmrg
57213544ea2eSmrg
57223544ea2eSmrg
57233544ea2eSmrg
57243544ea2eSmrg
57253544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
57263544ea2eSmrg
57273544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
57283544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5729b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
5730b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
5731b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
5732b71ad168Smrgthen :
5733b71ad168Smrg  printf %s "(cached) " >&6
5734b71ad168Smrgelse $as_nop
57353544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57363544ea2eSmrg/* end confdefs.h.  */
57373544ea2eSmrgint i;
57383544ea2eSmrg_ACEOF
5739b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5740b71ad168Smrgthen :
57413544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
5742b71ad168Smrgelse $as_nop
57433544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
57443544ea2eSmrgfi
5745b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
57463544ea2eSmrgfi
5747b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
5748b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
57493544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
57503544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
57513544ea2eSmrgfi
57523544ea2eSmrg
57533544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
57543544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
57553544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
57563544ea2eSmrg	fi
57573544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
5758b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
5759b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
5760b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
5761b71ad168Smrgthen :
5762b71ad168Smrg  printf %s "(cached) " >&6
5763b71ad168Smrgelse $as_nop
57643544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57653544ea2eSmrg/* end confdefs.h.  */
57663544ea2eSmrgint i;
57673544ea2eSmrg_ACEOF
5768b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5769b71ad168Smrgthen :
57703544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
5771b71ad168Smrgelse $as_nop
57723544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
57733544ea2eSmrgfi
5774b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
57753544ea2eSmrgfi
5776b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
5777b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
57783544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
57793544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
57803544ea2eSmrgfi
57813544ea2eSmrg
57823544ea2eSmrgfound="no"
57833544ea2eSmrg
57843544ea2eSmrg	if test $found = "no" ; then
578595fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
57863544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
57873544ea2eSmrg		fi
57883544ea2eSmrg
578995fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
57903544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
57913544ea2eSmrg		fi
57923544ea2eSmrg
57933544ea2eSmrg		CFLAGS="$CFLAGS -Wstrict-prototypes"
57943544ea2eSmrg
5795b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5
5796b71ad168Smrgprintf %s "checking if $CC supports -Wstrict-prototypes... " >&6; }
57973544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wstrict_prototypes
5798b71ad168Smrg		if eval test \${$cacheid+y}
5799b71ad168Smrgthen :
5800b71ad168Smrg  printf %s "(cached) " >&6
5801b71ad168Smrgelse $as_nop
58023544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58033544ea2eSmrg/* end confdefs.h.  */
58043544ea2eSmrgint i;
58053544ea2eSmrgint
5806b71ad168Smrgmain (void)
58073544ea2eSmrg{
58083544ea2eSmrg
58093544ea2eSmrg  ;
58103544ea2eSmrg  return 0;
58113544ea2eSmrg}
58123544ea2eSmrg_ACEOF
5813b71ad168Smrgif ac_fn_c_try_link "$LINENO"
5814b71ad168Smrgthen :
58153544ea2eSmrg  eval $cacheid=yes
5816b71ad168Smrgelse $as_nop
58173544ea2eSmrg  eval $cacheid=no
58183544ea2eSmrgfi
5819b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
58203544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
58213544ea2eSmrgfi
58223544ea2eSmrg
58233544ea2eSmrg
58243544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
58253544ea2eSmrg
58263544ea2eSmrg		eval supported=\$$cacheid
5827b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
5828b71ad168Smrgprintf "%s\n" "$supported" >&6; }
58293544ea2eSmrg		if test "$supported" = "yes" ; then
58303544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes"
58313544ea2eSmrg			found="yes"
58323544ea2eSmrg		fi
58333544ea2eSmrg	fi
58343544ea2eSmrg
58353544ea2eSmrg
58363544ea2eSmrg
58373544ea2eSmrg
58383544ea2eSmrg
58393544ea2eSmrg
58403544ea2eSmrg
58413544ea2eSmrg
58423544ea2eSmrg
58433544ea2eSmrg
58443544ea2eSmrg
58453544ea2eSmrg
58463544ea2eSmrg
58473544ea2eSmrg
58483544ea2eSmrg
58493544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
58503544ea2eSmrg
58513544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
58523544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5853b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
5854b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
5855b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
5856b71ad168Smrgthen :
5857b71ad168Smrg  printf %s "(cached) " >&6
5858b71ad168Smrgelse $as_nop
58593544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58603544ea2eSmrg/* end confdefs.h.  */
58613544ea2eSmrgint i;
58623544ea2eSmrg_ACEOF
5863b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5864b71ad168Smrgthen :
58653544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
5866b71ad168Smrgelse $as_nop
58673544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
58683544ea2eSmrgfi
5869b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
58703544ea2eSmrgfi
5871b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
5872b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
58733544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
58743544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
58753544ea2eSmrgfi
58763544ea2eSmrg
58773544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
58783544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
58793544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
58803544ea2eSmrg	fi
58813544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
5882b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
5883b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
5884b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
5885b71ad168Smrgthen :
5886b71ad168Smrg  printf %s "(cached) " >&6
5887b71ad168Smrgelse $as_nop
58883544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58893544ea2eSmrg/* end confdefs.h.  */
58903544ea2eSmrgint i;
58913544ea2eSmrg_ACEOF
5892b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5893b71ad168Smrgthen :
58943544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
5895b71ad168Smrgelse $as_nop
58963544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
58973544ea2eSmrgfi
5898b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
58993544ea2eSmrgfi
5900b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
5901b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
59023544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
59033544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
59043544ea2eSmrgfi
59053544ea2eSmrg
59063544ea2eSmrgfound="no"
59073544ea2eSmrg
59083544ea2eSmrg	if test $found = "no" ; then
590995fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
59103544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
59113544ea2eSmrg		fi
59123544ea2eSmrg
591395fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
59143544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
59153544ea2eSmrg		fi
59163544ea2eSmrg
59173544ea2eSmrg		CFLAGS="$CFLAGS -Wmissing-prototypes"
59183544ea2eSmrg
5919b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5
5920b71ad168Smrgprintf %s "checking if $CC supports -Wmissing-prototypes... " >&6; }
59213544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wmissing_prototypes
5922b71ad168Smrg		if eval test \${$cacheid+y}
5923b71ad168Smrgthen :
5924b71ad168Smrg  printf %s "(cached) " >&6
5925b71ad168Smrgelse $as_nop
59263544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59273544ea2eSmrg/* end confdefs.h.  */
59283544ea2eSmrgint i;
59293544ea2eSmrgint
5930b71ad168Smrgmain (void)
59313544ea2eSmrg{
59323544ea2eSmrg
59333544ea2eSmrg  ;
59343544ea2eSmrg  return 0;
59353544ea2eSmrg}
59363544ea2eSmrg_ACEOF
5937b71ad168Smrgif ac_fn_c_try_link "$LINENO"
5938b71ad168Smrgthen :
59393544ea2eSmrg  eval $cacheid=yes
5940b71ad168Smrgelse $as_nop
59413544ea2eSmrg  eval $cacheid=no
59423544ea2eSmrgfi
5943b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
59443544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
59453544ea2eSmrgfi
59463544ea2eSmrg
59473544ea2eSmrg
59483544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
59493544ea2eSmrg
59503544ea2eSmrg		eval supported=\$$cacheid
5951b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
5952b71ad168Smrgprintf "%s\n" "$supported" >&6; }
59533544ea2eSmrg		if test "$supported" = "yes" ; then
59543544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes"
59553544ea2eSmrg			found="yes"
59563544ea2eSmrg		fi
59573544ea2eSmrg	fi
59583544ea2eSmrg
59593544ea2eSmrg
59603544ea2eSmrg
59613544ea2eSmrg
59623544ea2eSmrg
59633544ea2eSmrg
59643544ea2eSmrg
59653544ea2eSmrg
59663544ea2eSmrg
59673544ea2eSmrg
59683544ea2eSmrg
59693544ea2eSmrg
59703544ea2eSmrg
59713544ea2eSmrg
59723544ea2eSmrg
59733544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
59743544ea2eSmrg
59753544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
59763544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
5977b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
5978b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
5979b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
5980b71ad168Smrgthen :
5981b71ad168Smrg  printf %s "(cached) " >&6
5982b71ad168Smrgelse $as_nop
59833544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59843544ea2eSmrg/* end confdefs.h.  */
59853544ea2eSmrgint i;
59863544ea2eSmrg_ACEOF
5987b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
5988b71ad168Smrgthen :
59893544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
5990b71ad168Smrgelse $as_nop
59913544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
59923544ea2eSmrgfi
5993b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
59943544ea2eSmrgfi
5995b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
5996b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
59973544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
59983544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
59993544ea2eSmrgfi
60003544ea2eSmrg
60013544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
60023544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
60033544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
60043544ea2eSmrg	fi
60053544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6006b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6007b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6008b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6009b71ad168Smrgthen :
6010b71ad168Smrg  printf %s "(cached) " >&6
6011b71ad168Smrgelse $as_nop
60123544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60133544ea2eSmrg/* end confdefs.h.  */
60143544ea2eSmrgint i;
60153544ea2eSmrg_ACEOF
6016b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6017b71ad168Smrgthen :
60183544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6019b71ad168Smrgelse $as_nop
60203544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
60213544ea2eSmrgfi
6022b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
60233544ea2eSmrgfi
6024b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6025b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
60263544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
60273544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
60283544ea2eSmrgfi
60293544ea2eSmrg
60303544ea2eSmrgfound="no"
60313544ea2eSmrg
60323544ea2eSmrg	if test $found = "no" ; then
603395fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
60343544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
60353544ea2eSmrg		fi
60363544ea2eSmrg
603795fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
60383544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
60393544ea2eSmrg		fi
60403544ea2eSmrg
60413544ea2eSmrg		CFLAGS="$CFLAGS -Wnested-externs"
60423544ea2eSmrg
6043b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5
6044b71ad168Smrgprintf %s "checking if $CC supports -Wnested-externs... " >&6; }
60453544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wnested_externs
6046b71ad168Smrg		if eval test \${$cacheid+y}
6047b71ad168Smrgthen :
6048b71ad168Smrg  printf %s "(cached) " >&6
6049b71ad168Smrgelse $as_nop
60503544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60513544ea2eSmrg/* end confdefs.h.  */
60523544ea2eSmrgint i;
60533544ea2eSmrgint
6054b71ad168Smrgmain (void)
60553544ea2eSmrg{
60563544ea2eSmrg
60573544ea2eSmrg  ;
60583544ea2eSmrg  return 0;
60593544ea2eSmrg}
60603544ea2eSmrg_ACEOF
6061b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6062b71ad168Smrgthen :
60633544ea2eSmrg  eval $cacheid=yes
6064b71ad168Smrgelse $as_nop
60653544ea2eSmrg  eval $cacheid=no
60663544ea2eSmrgfi
6067b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
60683544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
60693544ea2eSmrgfi
60703544ea2eSmrg
60713544ea2eSmrg
60723544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
60733544ea2eSmrg
60743544ea2eSmrg		eval supported=\$$cacheid
6075b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6076b71ad168Smrgprintf "%s\n" "$supported" >&6; }
60773544ea2eSmrg		if test "$supported" = "yes" ; then
60783544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs"
60793544ea2eSmrg			found="yes"
60803544ea2eSmrg		fi
60813544ea2eSmrg	fi
60823544ea2eSmrg
60833544ea2eSmrg
60843544ea2eSmrg
60853544ea2eSmrg
60863544ea2eSmrg
60873544ea2eSmrg
60883544ea2eSmrg
60893544ea2eSmrg
60903544ea2eSmrg
60913544ea2eSmrg
60923544ea2eSmrg
60933544ea2eSmrg
60943544ea2eSmrg
60953544ea2eSmrg
60963544ea2eSmrg
60973544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
60983544ea2eSmrg
60993544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
61003544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6101b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
6102b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
6103b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
6104b71ad168Smrgthen :
6105b71ad168Smrg  printf %s "(cached) " >&6
6106b71ad168Smrgelse $as_nop
61073544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61083544ea2eSmrg/* end confdefs.h.  */
61093544ea2eSmrgint i;
61103544ea2eSmrg_ACEOF
6111b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6112b71ad168Smrgthen :
61133544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
6114b71ad168Smrgelse $as_nop
61153544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
61163544ea2eSmrgfi
6117b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
61183544ea2eSmrgfi
6119b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
6120b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
61213544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
61223544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
61233544ea2eSmrgfi
61243544ea2eSmrg
61253544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
61263544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
61273544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
61283544ea2eSmrg	fi
61293544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6130b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6131b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6132b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6133b71ad168Smrgthen :
6134b71ad168Smrg  printf %s "(cached) " >&6
6135b71ad168Smrgelse $as_nop
61363544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61373544ea2eSmrg/* end confdefs.h.  */
61383544ea2eSmrgint i;
61393544ea2eSmrg_ACEOF
6140b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6141b71ad168Smrgthen :
61423544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6143b71ad168Smrgelse $as_nop
61443544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
61453544ea2eSmrgfi
6146b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
61473544ea2eSmrgfi
6148b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6149b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
61503544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
61513544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
61523544ea2eSmrgfi
61533544ea2eSmrg
61543544ea2eSmrgfound="no"
61553544ea2eSmrg
61563544ea2eSmrg	if test $found = "no" ; then
615795fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
61583544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
61593544ea2eSmrg		fi
61603544ea2eSmrg
616195fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
61623544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
61633544ea2eSmrg		fi
61643544ea2eSmrg
61653544ea2eSmrg		CFLAGS="$CFLAGS -Wbad-function-cast"
61663544ea2eSmrg
6167b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5
6168b71ad168Smrgprintf %s "checking if $CC supports -Wbad-function-cast... " >&6; }
61693544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wbad_function_cast
6170b71ad168Smrg		if eval test \${$cacheid+y}
6171b71ad168Smrgthen :
6172b71ad168Smrg  printf %s "(cached) " >&6
6173b71ad168Smrgelse $as_nop
61743544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61753544ea2eSmrg/* end confdefs.h.  */
61763544ea2eSmrgint i;
61773544ea2eSmrgint
6178b71ad168Smrgmain (void)
61793544ea2eSmrg{
61803544ea2eSmrg
61813544ea2eSmrg  ;
61823544ea2eSmrg  return 0;
61833544ea2eSmrg}
61843544ea2eSmrg_ACEOF
6185b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6186b71ad168Smrgthen :
61873544ea2eSmrg  eval $cacheid=yes
6188b71ad168Smrgelse $as_nop
61893544ea2eSmrg  eval $cacheid=no
61903544ea2eSmrgfi
6191b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
61923544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
61933544ea2eSmrgfi
61943544ea2eSmrg
61953544ea2eSmrg
61963544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
61973544ea2eSmrg
61983544ea2eSmrg		eval supported=\$$cacheid
6199b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6200b71ad168Smrgprintf "%s\n" "$supported" >&6; }
62013544ea2eSmrg		if test "$supported" = "yes" ; then
62023544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast"
62033544ea2eSmrg			found="yes"
62043544ea2eSmrg		fi
62053544ea2eSmrg	fi
62063544ea2eSmrg
62073544ea2eSmrg
62083544ea2eSmrg
62093544ea2eSmrg
62103544ea2eSmrg
62113544ea2eSmrg
62123544ea2eSmrg
62133544ea2eSmrg
62143544ea2eSmrg
62153544ea2eSmrg
62163544ea2eSmrg
62173544ea2eSmrg
62183544ea2eSmrg
62193544ea2eSmrg
62203544ea2eSmrg
62213544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
62223544ea2eSmrg
62233544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
62243544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6225b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
6226b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
6227b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
6228b71ad168Smrgthen :
6229b71ad168Smrg  printf %s "(cached) " >&6
6230b71ad168Smrgelse $as_nop
62313544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62323544ea2eSmrg/* end confdefs.h.  */
62333544ea2eSmrgint i;
62343544ea2eSmrg_ACEOF
6235b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6236b71ad168Smrgthen :
62373544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
6238b71ad168Smrgelse $as_nop
62393544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
62403544ea2eSmrgfi
6241b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
62423544ea2eSmrgfi
6243b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
6244b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
62453544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
62463544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
62473544ea2eSmrgfi
62483544ea2eSmrg
62493544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
62503544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
62513544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
62523544ea2eSmrg	fi
62533544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6254b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6255b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6256b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6257b71ad168Smrgthen :
6258b71ad168Smrg  printf %s "(cached) " >&6
6259b71ad168Smrgelse $as_nop
62603544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62613544ea2eSmrg/* end confdefs.h.  */
62623544ea2eSmrgint i;
62633544ea2eSmrg_ACEOF
6264b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6265b71ad168Smrgthen :
62663544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6267b71ad168Smrgelse $as_nop
62683544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
62693544ea2eSmrgfi
6270b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
62713544ea2eSmrgfi
6272b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6273b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
62743544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
62753544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
62763544ea2eSmrgfi
62773544ea2eSmrg
62783544ea2eSmrgfound="no"
62793544ea2eSmrg
62803544ea2eSmrg	if test $found = "no" ; then
628195fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
62823544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
62833544ea2eSmrg		fi
62843544ea2eSmrg
628595fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
62863544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
62873544ea2eSmrg		fi
62883544ea2eSmrg
62893544ea2eSmrg		CFLAGS="$CFLAGS -Wold-style-definition"
62903544ea2eSmrg
6291b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5
6292b71ad168Smrgprintf %s "checking if $CC supports -Wold-style-definition... " >&6; }
62933544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wold_style_definition
6294b71ad168Smrg		if eval test \${$cacheid+y}
6295b71ad168Smrgthen :
6296b71ad168Smrg  printf %s "(cached) " >&6
6297b71ad168Smrgelse $as_nop
62983544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62993544ea2eSmrg/* end confdefs.h.  */
63003544ea2eSmrgint i;
63013544ea2eSmrgint
6302b71ad168Smrgmain (void)
63033544ea2eSmrg{
63043544ea2eSmrg
63053544ea2eSmrg  ;
63063544ea2eSmrg  return 0;
63073544ea2eSmrg}
63083544ea2eSmrg_ACEOF
6309b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6310b71ad168Smrgthen :
63113544ea2eSmrg  eval $cacheid=yes
6312b71ad168Smrgelse $as_nop
63133544ea2eSmrg  eval $cacheid=no
63143544ea2eSmrgfi
6315b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
63163544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
63173544ea2eSmrgfi
63183544ea2eSmrg
63193544ea2eSmrg
63203544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
63213544ea2eSmrg
63223544ea2eSmrg		eval supported=\$$cacheid
6323b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6324b71ad168Smrgprintf "%s\n" "$supported" >&6; }
63253544ea2eSmrg		if test "$supported" = "yes" ; then
63263544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition"
63273544ea2eSmrg			found="yes"
63283544ea2eSmrg		fi
63293544ea2eSmrg	fi
63303544ea2eSmrg
633195fdd44cSmrg	if test $found = "no" ; then
633295fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
633395fdd44cSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
633495fdd44cSmrg		fi
633595fdd44cSmrg
633695fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
633795fdd44cSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
633895fdd44cSmrg		fi
633995fdd44cSmrg
634095fdd44cSmrg		CFLAGS="$CFLAGS -fd"
634195fdd44cSmrg
6342b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5
6343b71ad168Smrgprintf %s "checking if $CC supports -fd... " >&6; }
634495fdd44cSmrg		cacheid=xorg_cv_cc_flag__fd
6345b71ad168Smrg		if eval test \${$cacheid+y}
6346b71ad168Smrgthen :
6347b71ad168Smrg  printf %s "(cached) " >&6
6348b71ad168Smrgelse $as_nop
634995fdd44cSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
635095fdd44cSmrg/* end confdefs.h.  */
635195fdd44cSmrgint i;
635295fdd44cSmrgint
6353b71ad168Smrgmain (void)
635495fdd44cSmrg{
635595fdd44cSmrg
635695fdd44cSmrg  ;
635795fdd44cSmrg  return 0;
635895fdd44cSmrg}
635995fdd44cSmrg_ACEOF
6360b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6361b71ad168Smrgthen :
636295fdd44cSmrg  eval $cacheid=yes
6363b71ad168Smrgelse $as_nop
636495fdd44cSmrg  eval $cacheid=no
636595fdd44cSmrgfi
6366b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
636795fdd44cSmrg    conftest$ac_exeext conftest.$ac_ext
636895fdd44cSmrgfi
636995fdd44cSmrg
637095fdd44cSmrg
637195fdd44cSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
637295fdd44cSmrg
637395fdd44cSmrg		eval supported=\$$cacheid
6374b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6375b71ad168Smrgprintf "%s\n" "$supported" >&6; }
637695fdd44cSmrg		if test "$supported" = "yes" ; then
637795fdd44cSmrg			BASE_CFLAGS="$BASE_CFLAGS -fd"
637895fdd44cSmrg			found="yes"
637995fdd44cSmrg		fi
638095fdd44cSmrg	fi
638195fdd44cSmrg
63823544ea2eSmrg
63833544ea2eSmrg
63843544ea2eSmrg
63853544ea2eSmrg
63863544ea2eSmrg
63873544ea2eSmrg
63883544ea2eSmrg
63893544ea2eSmrg
63903544ea2eSmrg
63913544ea2eSmrg
63923544ea2eSmrg
63933544ea2eSmrg
63943544ea2eSmrg
63953544ea2eSmrg
63963544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
63973544ea2eSmrg
63983544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
63993544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6400b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
6401b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
6402b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
6403b71ad168Smrgthen :
6404b71ad168Smrg  printf %s "(cached) " >&6
6405b71ad168Smrgelse $as_nop
64063544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64073544ea2eSmrg/* end confdefs.h.  */
64083544ea2eSmrgint i;
64093544ea2eSmrg_ACEOF
6410b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6411b71ad168Smrgthen :
64123544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
6413b71ad168Smrgelse $as_nop
64143544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
64153544ea2eSmrgfi
6416b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
64173544ea2eSmrgfi
6418b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
6419b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
64203544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
64213544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
64223544ea2eSmrgfi
64233544ea2eSmrg
64243544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
64253544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
64263544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
64273544ea2eSmrg	fi
64283544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6429b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6430b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6431b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6432b71ad168Smrgthen :
6433b71ad168Smrg  printf %s "(cached) " >&6
6434b71ad168Smrgelse $as_nop
64353544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64363544ea2eSmrg/* end confdefs.h.  */
64373544ea2eSmrgint i;
64383544ea2eSmrg_ACEOF
6439b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6440b71ad168Smrgthen :
64413544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6442b71ad168Smrgelse $as_nop
64433544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
64443544ea2eSmrgfi
6445b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
64463544ea2eSmrgfi
6447b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6448b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
64493544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
64503544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
64513544ea2eSmrgfi
64523544ea2eSmrg
64533544ea2eSmrgfound="no"
64543544ea2eSmrg
64553544ea2eSmrg	if test $found = "no" ; then
645695fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
64573544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
64583544ea2eSmrg		fi
64593544ea2eSmrg
646095fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
64613544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
64623544ea2eSmrg		fi
64633544ea2eSmrg
64643544ea2eSmrg		CFLAGS="$CFLAGS -Wdeclaration-after-statement"
64653544ea2eSmrg
6466b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5
6467b71ad168Smrgprintf %s "checking if $CC supports -Wdeclaration-after-statement... " >&6; }
64683544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement
6469b71ad168Smrg		if eval test \${$cacheid+y}
6470b71ad168Smrgthen :
6471b71ad168Smrg  printf %s "(cached) " >&6
6472b71ad168Smrgelse $as_nop
64733544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64743544ea2eSmrg/* end confdefs.h.  */
64753544ea2eSmrgint i;
64763544ea2eSmrgint
6477b71ad168Smrgmain (void)
64783544ea2eSmrg{
64793544ea2eSmrg
64803544ea2eSmrg  ;
64813544ea2eSmrg  return 0;
64823544ea2eSmrg}
64833544ea2eSmrg_ACEOF
6484b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6485b71ad168Smrgthen :
64863544ea2eSmrg  eval $cacheid=yes
6487b71ad168Smrgelse $as_nop
64883544ea2eSmrg  eval $cacheid=no
64893544ea2eSmrgfi
6490b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
64913544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
64923544ea2eSmrgfi
64933544ea2eSmrg
64943544ea2eSmrg
64953544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
64963544ea2eSmrg
64973544ea2eSmrg		eval supported=\$$cacheid
6498b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6499b71ad168Smrgprintf "%s\n" "$supported" >&6; }
65003544ea2eSmrg		if test "$supported" = "yes" ; then
65013544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement"
65023544ea2eSmrg			found="yes"
65033544ea2eSmrg		fi
65043544ea2eSmrg	fi
65053544ea2eSmrg
65063544ea2eSmrg
65073544ea2eSmrg
65083544ea2eSmrg
65093544ea2eSmrg
65103544ea2eSmrg# This chunk adds additional warnings that could catch undesired effects.
65113544ea2eSmrg
65123544ea2eSmrg
65133544ea2eSmrg
65143544ea2eSmrg
65153544ea2eSmrg
65163544ea2eSmrg
65173544ea2eSmrg
65183544ea2eSmrg
65193544ea2eSmrg
65203544ea2eSmrg
65213544ea2eSmrg
65223544ea2eSmrg
65233544ea2eSmrg
65243544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
65253544ea2eSmrg
65263544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
65273544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6528b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
6529b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
6530b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
6531b71ad168Smrgthen :
6532b71ad168Smrg  printf %s "(cached) " >&6
6533b71ad168Smrgelse $as_nop
65343544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65353544ea2eSmrg/* end confdefs.h.  */
65363544ea2eSmrgint i;
65373544ea2eSmrg_ACEOF
6538b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6539b71ad168Smrgthen :
65403544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
6541b71ad168Smrgelse $as_nop
65423544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
65433544ea2eSmrgfi
6544b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
65453544ea2eSmrgfi
6546b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
6547b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
65483544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
65493544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
65503544ea2eSmrgfi
65513544ea2eSmrg
65523544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
65533544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
65543544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
65553544ea2eSmrg	fi
65563544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6557b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6558b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6559b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6560b71ad168Smrgthen :
6561b71ad168Smrg  printf %s "(cached) " >&6
6562b71ad168Smrgelse $as_nop
65633544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65643544ea2eSmrg/* end confdefs.h.  */
65653544ea2eSmrgint i;
65663544ea2eSmrg_ACEOF
6567b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6568b71ad168Smrgthen :
65693544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6570b71ad168Smrgelse $as_nop
65713544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
65723544ea2eSmrgfi
6573b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
65743544ea2eSmrgfi
6575b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6576b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
65773544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
65783544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
65793544ea2eSmrgfi
65803544ea2eSmrg
65813544ea2eSmrgfound="no"
65823544ea2eSmrg
65833544ea2eSmrg	if test $found = "no" ; then
658495fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
65853544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
65863544ea2eSmrg		fi
65873544ea2eSmrg
658895fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
65893544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
65903544ea2eSmrg		fi
65913544ea2eSmrg
65923544ea2eSmrg		CFLAGS="$CFLAGS -Wunused"
65933544ea2eSmrg
6594b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5
6595b71ad168Smrgprintf %s "checking if $CC supports -Wunused... " >&6; }
65963544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wunused
6597b71ad168Smrg		if eval test \${$cacheid+y}
6598b71ad168Smrgthen :
6599b71ad168Smrg  printf %s "(cached) " >&6
6600b71ad168Smrgelse $as_nop
66013544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66023544ea2eSmrg/* end confdefs.h.  */
66033544ea2eSmrgint i;
66043544ea2eSmrgint
6605b71ad168Smrgmain (void)
66063544ea2eSmrg{
66073544ea2eSmrg
66083544ea2eSmrg  ;
66093544ea2eSmrg  return 0;
66103544ea2eSmrg}
66113544ea2eSmrg_ACEOF
6612b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6613b71ad168Smrgthen :
66143544ea2eSmrg  eval $cacheid=yes
6615b71ad168Smrgelse $as_nop
66163544ea2eSmrg  eval $cacheid=no
66173544ea2eSmrgfi
6618b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
66193544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
66203544ea2eSmrgfi
66213544ea2eSmrg
66223544ea2eSmrg
66233544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
66243544ea2eSmrg
66253544ea2eSmrg		eval supported=\$$cacheid
6626b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6627b71ad168Smrgprintf "%s\n" "$supported" >&6; }
66283544ea2eSmrg		if test "$supported" = "yes" ; then
66293544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wunused"
66303544ea2eSmrg			found="yes"
66313544ea2eSmrg		fi
66323544ea2eSmrg	fi
66333544ea2eSmrg
66343544ea2eSmrg
66353544ea2eSmrg
66363544ea2eSmrg
66373544ea2eSmrg
66383544ea2eSmrg
66393544ea2eSmrg
66403544ea2eSmrg
66413544ea2eSmrg
66423544ea2eSmrg
66433544ea2eSmrg
66443544ea2eSmrg
66453544ea2eSmrg
66463544ea2eSmrg
66473544ea2eSmrg
66483544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
66493544ea2eSmrg
66503544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
66513544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6652b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
6653b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
6654b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
6655b71ad168Smrgthen :
6656b71ad168Smrg  printf %s "(cached) " >&6
6657b71ad168Smrgelse $as_nop
66583544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66593544ea2eSmrg/* end confdefs.h.  */
66603544ea2eSmrgint i;
66613544ea2eSmrg_ACEOF
6662b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6663b71ad168Smrgthen :
66643544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
6665b71ad168Smrgelse $as_nop
66663544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
66673544ea2eSmrgfi
6668b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
66693544ea2eSmrgfi
6670b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
6671b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
66723544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
66733544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
66743544ea2eSmrgfi
66753544ea2eSmrg
66763544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
66773544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
66783544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
66793544ea2eSmrg	fi
66803544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6681b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6682b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6683b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6684b71ad168Smrgthen :
6685b71ad168Smrg  printf %s "(cached) " >&6
6686b71ad168Smrgelse $as_nop
66873544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66883544ea2eSmrg/* end confdefs.h.  */
66893544ea2eSmrgint i;
66903544ea2eSmrg_ACEOF
6691b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6692b71ad168Smrgthen :
66933544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6694b71ad168Smrgelse $as_nop
66953544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
66963544ea2eSmrgfi
6697b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
66983544ea2eSmrgfi
6699b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6700b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
67013544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
67023544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
67033544ea2eSmrgfi
67043544ea2eSmrg
67053544ea2eSmrgfound="no"
67063544ea2eSmrg
67073544ea2eSmrg	if test $found = "no" ; then
670895fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
67093544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
67103544ea2eSmrg		fi
67113544ea2eSmrg
671295fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
67133544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
67143544ea2eSmrg		fi
67153544ea2eSmrg
67163544ea2eSmrg		CFLAGS="$CFLAGS -Wuninitialized"
67173544ea2eSmrg
6718b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
6719b71ad168Smrgprintf %s "checking if $CC supports -Wuninitialized... " >&6; }
67203544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wuninitialized
6721b71ad168Smrg		if eval test \${$cacheid+y}
6722b71ad168Smrgthen :
6723b71ad168Smrg  printf %s "(cached) " >&6
6724b71ad168Smrgelse $as_nop
67253544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67263544ea2eSmrg/* end confdefs.h.  */
67273544ea2eSmrgint i;
67283544ea2eSmrgint
6729b71ad168Smrgmain (void)
67303544ea2eSmrg{
67313544ea2eSmrg
67323544ea2eSmrg  ;
67333544ea2eSmrg  return 0;
67343544ea2eSmrg}
67353544ea2eSmrg_ACEOF
6736b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6737b71ad168Smrgthen :
67383544ea2eSmrg  eval $cacheid=yes
6739b71ad168Smrgelse $as_nop
67403544ea2eSmrg  eval $cacheid=no
67413544ea2eSmrgfi
6742b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
67433544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
67443544ea2eSmrgfi
67453544ea2eSmrg
67463544ea2eSmrg
67473544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
67483544ea2eSmrg
67493544ea2eSmrg		eval supported=\$$cacheid
6750b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6751b71ad168Smrgprintf "%s\n" "$supported" >&6; }
67523544ea2eSmrg		if test "$supported" = "yes" ; then
67533544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized"
67543544ea2eSmrg			found="yes"
67553544ea2eSmrg		fi
67563544ea2eSmrg	fi
67573544ea2eSmrg
67583544ea2eSmrg
67593544ea2eSmrg
67603544ea2eSmrg
67613544ea2eSmrg
67623544ea2eSmrg
67633544ea2eSmrg
67643544ea2eSmrg
67653544ea2eSmrg
67663544ea2eSmrg
67673544ea2eSmrg
67683544ea2eSmrg
67693544ea2eSmrg
67703544ea2eSmrg
67713544ea2eSmrg
67723544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
67733544ea2eSmrg
67743544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
67753544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6776b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
6777b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
6778b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
6779b71ad168Smrgthen :
6780b71ad168Smrg  printf %s "(cached) " >&6
6781b71ad168Smrgelse $as_nop
67823544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67833544ea2eSmrg/* end confdefs.h.  */
67843544ea2eSmrgint i;
67853544ea2eSmrg_ACEOF
6786b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6787b71ad168Smrgthen :
67883544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
6789b71ad168Smrgelse $as_nop
67903544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
67913544ea2eSmrgfi
6792b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
67933544ea2eSmrgfi
6794b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
6795b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
67963544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
67973544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
67983544ea2eSmrgfi
67993544ea2eSmrg
68003544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
68013544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
68023544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
68033544ea2eSmrg	fi
68043544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6805b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6806b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6807b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6808b71ad168Smrgthen :
6809b71ad168Smrg  printf %s "(cached) " >&6
6810b71ad168Smrgelse $as_nop
68113544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68123544ea2eSmrg/* end confdefs.h.  */
68133544ea2eSmrgint i;
68143544ea2eSmrg_ACEOF
6815b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6816b71ad168Smrgthen :
68173544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6818b71ad168Smrgelse $as_nop
68193544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
68203544ea2eSmrgfi
6821b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
68223544ea2eSmrgfi
6823b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6824b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
68253544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
68263544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
68273544ea2eSmrgfi
68283544ea2eSmrg
68293544ea2eSmrgfound="no"
68303544ea2eSmrg
68313544ea2eSmrg	if test $found = "no" ; then
683295fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
68333544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
68343544ea2eSmrg		fi
68353544ea2eSmrg
683695fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
68373544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
68383544ea2eSmrg		fi
68393544ea2eSmrg
68403544ea2eSmrg		CFLAGS="$CFLAGS -Wshadow"
68413544ea2eSmrg
6842b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5
6843b71ad168Smrgprintf %s "checking if $CC supports -Wshadow... " >&6; }
68443544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wshadow
6845b71ad168Smrg		if eval test \${$cacheid+y}
6846b71ad168Smrgthen :
6847b71ad168Smrg  printf %s "(cached) " >&6
6848b71ad168Smrgelse $as_nop
68493544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68503544ea2eSmrg/* end confdefs.h.  */
68513544ea2eSmrgint i;
68523544ea2eSmrgint
6853b71ad168Smrgmain (void)
68543544ea2eSmrg{
68553544ea2eSmrg
68563544ea2eSmrg  ;
68573544ea2eSmrg  return 0;
68583544ea2eSmrg}
68593544ea2eSmrg_ACEOF
6860b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6861b71ad168Smrgthen :
68623544ea2eSmrg  eval $cacheid=yes
6863b71ad168Smrgelse $as_nop
68643544ea2eSmrg  eval $cacheid=no
68653544ea2eSmrgfi
6866b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
68673544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
68683544ea2eSmrgfi
68693544ea2eSmrg
68703544ea2eSmrg
68713544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
68723544ea2eSmrg
68733544ea2eSmrg		eval supported=\$$cacheid
6874b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6875b71ad168Smrgprintf "%s\n" "$supported" >&6; }
68763544ea2eSmrg		if test "$supported" = "yes" ; then
68773544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wshadow"
68783544ea2eSmrg			found="yes"
68793544ea2eSmrg		fi
68803544ea2eSmrg	fi
68813544ea2eSmrg
68823544ea2eSmrg
68833544ea2eSmrg
68843544ea2eSmrg
68853544ea2eSmrg
68863544ea2eSmrg
68873544ea2eSmrg
68883544ea2eSmrg
68893544ea2eSmrg
68903544ea2eSmrg
68913544ea2eSmrg
68923544ea2eSmrg
68933544ea2eSmrg
68943544ea2eSmrg
68953544ea2eSmrg
68963544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
68973544ea2eSmrg
68983544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
68993544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6900b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
6901b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
6902b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
6903b71ad168Smrgthen :
6904b71ad168Smrg  printf %s "(cached) " >&6
6905b71ad168Smrgelse $as_nop
69063544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69073544ea2eSmrg/* end confdefs.h.  */
69083544ea2eSmrgint i;
69093544ea2eSmrg_ACEOF
6910b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6911b71ad168Smrgthen :
69123544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
6913b71ad168Smrgelse $as_nop
69143544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
69153544ea2eSmrgfi
6916b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
69173544ea2eSmrgfi
6918b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
6919b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
69203544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
69213544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
69223544ea2eSmrgfi
69233544ea2eSmrg
69243544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
69253544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
69263544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
69273544ea2eSmrg	fi
69283544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6929b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
6930b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
6931b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
6932b71ad168Smrgthen :
6933b71ad168Smrg  printf %s "(cached) " >&6
6934b71ad168Smrgelse $as_nop
69353544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69363544ea2eSmrg/* end confdefs.h.  */
69373544ea2eSmrgint i;
69383544ea2eSmrg_ACEOF
6939b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
6940b71ad168Smrgthen :
69413544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
6942b71ad168Smrgelse $as_nop
69433544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
69443544ea2eSmrgfi
6945b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
69463544ea2eSmrgfi
6947b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
6948b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
69493544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
69503544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
69513544ea2eSmrgfi
69523544ea2eSmrg
69533544ea2eSmrgfound="no"
69543544ea2eSmrg
69553544ea2eSmrg	if test $found = "no" ; then
695695fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
69573544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
69583544ea2eSmrg		fi
69593544ea2eSmrg
696095fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
69613544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
69623544ea2eSmrg		fi
69633544ea2eSmrg
696495fdd44cSmrg		CFLAGS="$CFLAGS -Wmissing-noreturn"
69653544ea2eSmrg
6966b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5
6967b71ad168Smrgprintf %s "checking if $CC supports -Wmissing-noreturn... " >&6; }
696895fdd44cSmrg		cacheid=xorg_cv_cc_flag__Wmissing_noreturn
6969b71ad168Smrg		if eval test \${$cacheid+y}
6970b71ad168Smrgthen :
6971b71ad168Smrg  printf %s "(cached) " >&6
6972b71ad168Smrgelse $as_nop
69733544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69743544ea2eSmrg/* end confdefs.h.  */
69753544ea2eSmrgint i;
69763544ea2eSmrgint
6977b71ad168Smrgmain (void)
69783544ea2eSmrg{
69793544ea2eSmrg
69803544ea2eSmrg  ;
69813544ea2eSmrg  return 0;
69823544ea2eSmrg}
69833544ea2eSmrg_ACEOF
6984b71ad168Smrgif ac_fn_c_try_link "$LINENO"
6985b71ad168Smrgthen :
69863544ea2eSmrg  eval $cacheid=yes
6987b71ad168Smrgelse $as_nop
69883544ea2eSmrg  eval $cacheid=no
69893544ea2eSmrgfi
6990b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
69913544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
69923544ea2eSmrgfi
69933544ea2eSmrg
69943544ea2eSmrg
69953544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
69963544ea2eSmrg
69973544ea2eSmrg		eval supported=\$$cacheid
6998b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
6999b71ad168Smrgprintf "%s\n" "$supported" >&6; }
70003544ea2eSmrg		if test "$supported" = "yes" ; then
700195fdd44cSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn"
70023544ea2eSmrg			found="yes"
70033544ea2eSmrg		fi
70043544ea2eSmrg	fi
70053544ea2eSmrg
70063544ea2eSmrg
70073544ea2eSmrg
70083544ea2eSmrg
70093544ea2eSmrg
70103544ea2eSmrg
70113544ea2eSmrg
70123544ea2eSmrg
70133544ea2eSmrg
70143544ea2eSmrg
70153544ea2eSmrg
70163544ea2eSmrg
70173544ea2eSmrg
70183544ea2eSmrg
70193544ea2eSmrg
70203544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
70213544ea2eSmrg
70223544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
70233544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7024b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7025b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7026b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7027b71ad168Smrgthen :
7028b71ad168Smrg  printf %s "(cached) " >&6
7029b71ad168Smrgelse $as_nop
70303544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70313544ea2eSmrg/* end confdefs.h.  */
70323544ea2eSmrgint i;
70333544ea2eSmrg_ACEOF
7034b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7035b71ad168Smrgthen :
70363544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7037b71ad168Smrgelse $as_nop
70383544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
70393544ea2eSmrgfi
7040b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
70413544ea2eSmrgfi
7042b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7043b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
70443544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
70453544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
70463544ea2eSmrgfi
70473544ea2eSmrg
70483544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
70493544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
70503544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
70513544ea2eSmrg	fi
70523544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7053b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7054b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7055b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7056b71ad168Smrgthen :
7057b71ad168Smrg  printf %s "(cached) " >&6
7058b71ad168Smrgelse $as_nop
70593544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70603544ea2eSmrg/* end confdefs.h.  */
70613544ea2eSmrgint i;
70623544ea2eSmrg_ACEOF
7063b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7064b71ad168Smrgthen :
70653544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7066b71ad168Smrgelse $as_nop
70673544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
70683544ea2eSmrgfi
7069b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
70703544ea2eSmrgfi
7071b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
7072b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
70733544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
70743544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
70753544ea2eSmrgfi
70763544ea2eSmrg
70773544ea2eSmrgfound="no"
70783544ea2eSmrg
70793544ea2eSmrg	if test $found = "no" ; then
708095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
70813544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
70823544ea2eSmrg		fi
70833544ea2eSmrg
708495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
70853544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
70863544ea2eSmrg		fi
70873544ea2eSmrg
708895fdd44cSmrg		CFLAGS="$CFLAGS -Wmissing-format-attribute"
70893544ea2eSmrg
7090b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5
7091b71ad168Smrgprintf %s "checking if $CC supports -Wmissing-format-attribute... " >&6; }
709295fdd44cSmrg		cacheid=xorg_cv_cc_flag__Wmissing_format_attribute
7093b71ad168Smrg		if eval test \${$cacheid+y}
7094b71ad168Smrgthen :
7095b71ad168Smrg  printf %s "(cached) " >&6
7096b71ad168Smrgelse $as_nop
70973544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
70983544ea2eSmrg/* end confdefs.h.  */
70993544ea2eSmrgint i;
71003544ea2eSmrgint
7101b71ad168Smrgmain (void)
71023544ea2eSmrg{
71033544ea2eSmrg
71043544ea2eSmrg  ;
71053544ea2eSmrg  return 0;
71063544ea2eSmrg}
71073544ea2eSmrg_ACEOF
7108b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7109b71ad168Smrgthen :
71103544ea2eSmrg  eval $cacheid=yes
7111b71ad168Smrgelse $as_nop
71123544ea2eSmrg  eval $cacheid=no
71133544ea2eSmrgfi
7114b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
71153544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
71163544ea2eSmrgfi
71173544ea2eSmrg
71183544ea2eSmrg
71193544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
71203544ea2eSmrg
71213544ea2eSmrg		eval supported=\$$cacheid
7122b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7123b71ad168Smrgprintf "%s\n" "$supported" >&6; }
71243544ea2eSmrg		if test "$supported" = "yes" ; then
712595fdd44cSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute"
71263544ea2eSmrg			found="yes"
71273544ea2eSmrg		fi
71283544ea2eSmrg	fi
71293544ea2eSmrg
71303544ea2eSmrg
71313544ea2eSmrg
71323544ea2eSmrg
71333544ea2eSmrg
71343544ea2eSmrg
71353544ea2eSmrg
71363544ea2eSmrg
71373544ea2eSmrg
71383544ea2eSmrg
71393544ea2eSmrg
71403544ea2eSmrg
71413544ea2eSmrg
71423544ea2eSmrg
71433544ea2eSmrg
71443544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
71453544ea2eSmrg
71463544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
71473544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7148b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7149b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7150b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7151b71ad168Smrgthen :
7152b71ad168Smrg  printf %s "(cached) " >&6
7153b71ad168Smrgelse $as_nop
71543544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71553544ea2eSmrg/* end confdefs.h.  */
71563544ea2eSmrgint i;
71573544ea2eSmrg_ACEOF
7158b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7159b71ad168Smrgthen :
71603544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7161b71ad168Smrgelse $as_nop
71623544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
71633544ea2eSmrgfi
7164b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
71653544ea2eSmrgfi
7166b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7167b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
71683544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
71693544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
71703544ea2eSmrgfi
71713544ea2eSmrg
71723544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
71733544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
71743544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
71753544ea2eSmrg	fi
71763544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7177b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7178b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7179b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7180b71ad168Smrgthen :
7181b71ad168Smrg  printf %s "(cached) " >&6
7182b71ad168Smrgelse $as_nop
71833544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
71843544ea2eSmrg/* end confdefs.h.  */
71853544ea2eSmrgint i;
71863544ea2eSmrg_ACEOF
7187b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7188b71ad168Smrgthen :
71893544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7190b71ad168Smrgelse $as_nop
71913544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
71923544ea2eSmrgfi
7193b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
71943544ea2eSmrgfi
7195b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
7196b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
71973544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
71983544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
71993544ea2eSmrgfi
72003544ea2eSmrg
72013544ea2eSmrgfound="no"
72023544ea2eSmrg
72033544ea2eSmrg	if test $found = "no" ; then
720495fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
72053544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
72063544ea2eSmrg		fi
72073544ea2eSmrg
720895fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
72093544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
72103544ea2eSmrg		fi
72113544ea2eSmrg
721295fdd44cSmrg		CFLAGS="$CFLAGS -Wredundant-decls"
72133544ea2eSmrg
7214b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5
7215b71ad168Smrgprintf %s "checking if $CC supports -Wredundant-decls... " >&6; }
721695fdd44cSmrg		cacheid=xorg_cv_cc_flag__Wredundant_decls
7217b71ad168Smrg		if eval test \${$cacheid+y}
7218b71ad168Smrgthen :
7219b71ad168Smrg  printf %s "(cached) " >&6
7220b71ad168Smrgelse $as_nop
72213544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72223544ea2eSmrg/* end confdefs.h.  */
72233544ea2eSmrgint i;
72243544ea2eSmrgint
7225b71ad168Smrgmain (void)
72263544ea2eSmrg{
72273544ea2eSmrg
72283544ea2eSmrg  ;
72293544ea2eSmrg  return 0;
72303544ea2eSmrg}
72313544ea2eSmrg_ACEOF
7232b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7233b71ad168Smrgthen :
72343544ea2eSmrg  eval $cacheid=yes
7235b71ad168Smrgelse $as_nop
72363544ea2eSmrg  eval $cacheid=no
72373544ea2eSmrgfi
7238b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
72393544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
72403544ea2eSmrgfi
72413544ea2eSmrg
72423544ea2eSmrg
72433544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
72443544ea2eSmrg
72453544ea2eSmrg		eval supported=\$$cacheid
7246b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7247b71ad168Smrgprintf "%s\n" "$supported" >&6; }
72483544ea2eSmrg		if test "$supported" = "yes" ; then
724995fdd44cSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
72503544ea2eSmrg			found="yes"
72513544ea2eSmrg		fi
72523544ea2eSmrg	fi
72533544ea2eSmrg
72543544ea2eSmrg
72553544ea2eSmrg
72563544ea2eSmrg
72573544ea2eSmrg
72583544ea2eSmrg
72593544ea2eSmrg
72603544ea2eSmrg
72613544ea2eSmrg
72623544ea2eSmrg
72633544ea2eSmrg
72643544ea2eSmrg
72653544ea2eSmrg
72663544ea2eSmrg
72673544ea2eSmrg
72683544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
72693544ea2eSmrg
72703544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
72713544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7272b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7273b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7274b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7275b71ad168Smrgthen :
7276b71ad168Smrg  printf %s "(cached) " >&6
7277b71ad168Smrgelse $as_nop
72783544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
72793544ea2eSmrg/* end confdefs.h.  */
72803544ea2eSmrgint i;
72813544ea2eSmrg_ACEOF
7282b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7283b71ad168Smrgthen :
72843544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7285b71ad168Smrgelse $as_nop
72863544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
72873544ea2eSmrgfi
7288b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
72893544ea2eSmrgfi
7290b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7291b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
72923544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
72933544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
72943544ea2eSmrgfi
72953544ea2eSmrg
72963544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
72973544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
72983544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
72993544ea2eSmrg	fi
73003544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7301b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7302b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7303b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7304b71ad168Smrgthen :
7305b71ad168Smrg  printf %s "(cached) " >&6
7306b71ad168Smrgelse $as_nop
73073544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73083544ea2eSmrg/* end confdefs.h.  */
73093544ea2eSmrgint i;
73103544ea2eSmrg_ACEOF
7311b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7312b71ad168Smrgthen :
73133544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7314b71ad168Smrgelse $as_nop
73153544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
73163544ea2eSmrgfi
7317b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
73183544ea2eSmrgfi
7319b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
7320b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
73213544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
73223544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
73233544ea2eSmrgfi
73243544ea2eSmrg
73253544ea2eSmrgfound="no"
73263544ea2eSmrg
73273544ea2eSmrg	if test $found = "no" ; then
732895fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
73293544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
73303544ea2eSmrg		fi
73313544ea2eSmrg
733295fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
73333544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
73343544ea2eSmrg		fi
73353544ea2eSmrg
733695fdd44cSmrg		CFLAGS="$CFLAGS -Wlogical-op"
73373544ea2eSmrg
7338b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5
7339b71ad168Smrgprintf %s "checking if $CC supports -Wlogical-op... " >&6; }
734095fdd44cSmrg		cacheid=xorg_cv_cc_flag__Wlogical_op
7341b71ad168Smrg		if eval test \${$cacheid+y}
7342b71ad168Smrgthen :
7343b71ad168Smrg  printf %s "(cached) " >&6
7344b71ad168Smrgelse $as_nop
73453544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
73463544ea2eSmrg/* end confdefs.h.  */
73473544ea2eSmrgint i;
73483544ea2eSmrgint
7349b71ad168Smrgmain (void)
73503544ea2eSmrg{
73513544ea2eSmrg
73523544ea2eSmrg  ;
73533544ea2eSmrg  return 0;
73543544ea2eSmrg}
73553544ea2eSmrg_ACEOF
7356b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7357b71ad168Smrgthen :
73583544ea2eSmrg  eval $cacheid=yes
7359b71ad168Smrgelse $as_nop
73603544ea2eSmrg  eval $cacheid=no
73613544ea2eSmrgfi
7362b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
73633544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
73643544ea2eSmrgfi
73653544ea2eSmrg
73663544ea2eSmrg
73673544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
73683544ea2eSmrg
73693544ea2eSmrg		eval supported=\$$cacheid
7370b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7371b71ad168Smrgprintf "%s\n" "$supported" >&6; }
73723544ea2eSmrg		if test "$supported" = "yes" ; then
737395fdd44cSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op"
73743544ea2eSmrg			found="yes"
73753544ea2eSmrg		fi
73763544ea2eSmrg	fi
73773544ea2eSmrg
73783544ea2eSmrg
73793544ea2eSmrg
73803544ea2eSmrg# These are currently disabled because they are noisy.  They will be enabled
73813544ea2eSmrg# in the future once the codebase is sufficiently modernized to silence
73823544ea2eSmrg# them.  For now, I don't want them to drown out the other warnings.
73833544ea2eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
73843544ea2eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
738595fdd44cSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
73863544ea2eSmrg
7387b71ad168Smrg# Turn some warnings into errors, so we don't accidentally get successful builds
73883544ea2eSmrg# when there are problems that should be fixed.
73893544ea2eSmrg
73903544ea2eSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
73913544ea2eSmrg
73923544ea2eSmrg
73933544ea2eSmrg
73943544ea2eSmrg
73953544ea2eSmrg
73963544ea2eSmrg
73973544ea2eSmrg
73983544ea2eSmrg
73993544ea2eSmrg
74003544ea2eSmrg
74013544ea2eSmrg
74023544ea2eSmrg
74033544ea2eSmrg
74043544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
74053544ea2eSmrg
74063544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
74073544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7408b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7409b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7410b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7411b71ad168Smrgthen :
7412b71ad168Smrg  printf %s "(cached) " >&6
7413b71ad168Smrgelse $as_nop
74143544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74153544ea2eSmrg/* end confdefs.h.  */
74163544ea2eSmrgint i;
74173544ea2eSmrg_ACEOF
7418b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7419b71ad168Smrgthen :
74203544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7421b71ad168Smrgelse $as_nop
74223544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
74233544ea2eSmrgfi
7424b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
74253544ea2eSmrgfi
7426b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7427b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
74283544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
74293544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
74303544ea2eSmrgfi
74313544ea2eSmrg
74323544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
74333544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
74343544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
74353544ea2eSmrg	fi
74363544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7437b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7438b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7439b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7440b71ad168Smrgthen :
7441b71ad168Smrg  printf %s "(cached) " >&6
7442b71ad168Smrgelse $as_nop
74433544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74443544ea2eSmrg/* end confdefs.h.  */
74453544ea2eSmrgint i;
74463544ea2eSmrg_ACEOF
7447b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7448b71ad168Smrgthen :
74493544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7450b71ad168Smrgelse $as_nop
74513544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
74523544ea2eSmrgfi
7453b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
74543544ea2eSmrgfi
7455b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
7456b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
74573544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
74583544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
74593544ea2eSmrgfi
74603544ea2eSmrg
74613544ea2eSmrgfound="no"
74623544ea2eSmrg
74633544ea2eSmrg	if test $found = "no" ; then
746495fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
74653544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
74663544ea2eSmrg		fi
74673544ea2eSmrg
746895fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
74693544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
74703544ea2eSmrg		fi
74713544ea2eSmrg
74723544ea2eSmrg		CFLAGS="$CFLAGS -Werror=implicit"
74733544ea2eSmrg
7474b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5
7475b71ad168Smrgprintf %s "checking if $CC supports -Werror=implicit... " >&6; }
747695fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_implicit
7477b71ad168Smrg		if eval test \${$cacheid+y}
7478b71ad168Smrgthen :
7479b71ad168Smrg  printf %s "(cached) " >&6
7480b71ad168Smrgelse $as_nop
74813544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
74823544ea2eSmrg/* end confdefs.h.  */
74833544ea2eSmrgint i;
74843544ea2eSmrgint
7485b71ad168Smrgmain (void)
74863544ea2eSmrg{
74873544ea2eSmrg
74883544ea2eSmrg  ;
74893544ea2eSmrg  return 0;
74903544ea2eSmrg}
74913544ea2eSmrg_ACEOF
7492b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7493b71ad168Smrgthen :
74943544ea2eSmrg  eval $cacheid=yes
7495b71ad168Smrgelse $as_nop
74963544ea2eSmrg  eval $cacheid=no
74973544ea2eSmrgfi
7498b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
74993544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
75003544ea2eSmrgfi
75013544ea2eSmrg
75023544ea2eSmrg
75033544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
75043544ea2eSmrg
75053544ea2eSmrg		eval supported=\$$cacheid
7506b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7507b71ad168Smrgprintf "%s\n" "$supported" >&6; }
75083544ea2eSmrg		if test "$supported" = "yes" ; then
75093544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit"
75103544ea2eSmrg			found="yes"
75113544ea2eSmrg		fi
75123544ea2eSmrg	fi
75133544ea2eSmrg
75143544ea2eSmrg	if test $found = "no" ; then
751595fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
75163544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
75173544ea2eSmrg		fi
75183544ea2eSmrg
751995fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
75203544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
75213544ea2eSmrg		fi
75223544ea2eSmrg
75233544ea2eSmrg		CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
75243544ea2eSmrg
7525b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5
7526b71ad168Smrgprintf %s "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; }
752795fdd44cSmrg		cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED
7528b71ad168Smrg		if eval test \${$cacheid+y}
7529b71ad168Smrgthen :
7530b71ad168Smrg  printf %s "(cached) " >&6
7531b71ad168Smrgelse $as_nop
75323544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75333544ea2eSmrg/* end confdefs.h.  */
75343544ea2eSmrgint i;
75353544ea2eSmrgint
7536b71ad168Smrgmain (void)
75373544ea2eSmrg{
75383544ea2eSmrg
75393544ea2eSmrg  ;
75403544ea2eSmrg  return 0;
75413544ea2eSmrg}
75423544ea2eSmrg_ACEOF
7543b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7544b71ad168Smrgthen :
75453544ea2eSmrg  eval $cacheid=yes
7546b71ad168Smrgelse $as_nop
75473544ea2eSmrg  eval $cacheid=no
75483544ea2eSmrgfi
7549b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
75503544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
75513544ea2eSmrgfi
75523544ea2eSmrg
75533544ea2eSmrg
75543544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
75553544ea2eSmrg
75563544ea2eSmrg		eval supported=\$$cacheid
7557b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7558b71ad168Smrgprintf "%s\n" "$supported" >&6; }
75593544ea2eSmrg		if test "$supported" = "yes" ; then
75603544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
75613544ea2eSmrg			found="yes"
75623544ea2eSmrg		fi
75633544ea2eSmrg	fi
75643544ea2eSmrg
75653544ea2eSmrg
75663544ea2eSmrg
75673544ea2eSmrg
75683544ea2eSmrg
75693544ea2eSmrg
75703544ea2eSmrg
75713544ea2eSmrg
75723544ea2eSmrg
75733544ea2eSmrg
75743544ea2eSmrg
75753544ea2eSmrg
75763544ea2eSmrg
75773544ea2eSmrg
75783544ea2eSmrg
75793544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
75803544ea2eSmrg
75813544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
75823544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7583b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7584b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7585b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7586b71ad168Smrgthen :
7587b71ad168Smrg  printf %s "(cached) " >&6
7588b71ad168Smrgelse $as_nop
75893544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
75903544ea2eSmrg/* end confdefs.h.  */
75913544ea2eSmrgint i;
75923544ea2eSmrg_ACEOF
7593b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7594b71ad168Smrgthen :
75953544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7596b71ad168Smrgelse $as_nop
75973544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
75983544ea2eSmrgfi
7599b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
76003544ea2eSmrgfi
7601b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7602b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
76033544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
76043544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
76053544ea2eSmrgfi
76063544ea2eSmrg
76073544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
76083544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
76093544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
76103544ea2eSmrg	fi
76113544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7612b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7613b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7614b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7615b71ad168Smrgthen :
7616b71ad168Smrg  printf %s "(cached) " >&6
7617b71ad168Smrgelse $as_nop
76183544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76193544ea2eSmrg/* end confdefs.h.  */
76203544ea2eSmrgint i;
76213544ea2eSmrg_ACEOF
7622b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7623b71ad168Smrgthen :
76243544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7625b71ad168Smrgelse $as_nop
76263544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
76273544ea2eSmrgfi
7628b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
76293544ea2eSmrgfi
7630b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
7631b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
76323544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
76333544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
76343544ea2eSmrgfi
76353544ea2eSmrg
76363544ea2eSmrgfound="no"
76373544ea2eSmrg
76383544ea2eSmrg	if test $found = "no" ; then
763995fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
76403544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
76413544ea2eSmrg		fi
76423544ea2eSmrg
764395fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
76443544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
76453544ea2eSmrg		fi
76463544ea2eSmrg
76473544ea2eSmrg		CFLAGS="$CFLAGS -Werror=nonnull"
76483544ea2eSmrg
7649b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5
7650b71ad168Smrgprintf %s "checking if $CC supports -Werror=nonnull... " >&6; }
765195fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_nonnull
7652b71ad168Smrg		if eval test \${$cacheid+y}
7653b71ad168Smrgthen :
7654b71ad168Smrg  printf %s "(cached) " >&6
7655b71ad168Smrgelse $as_nop
76563544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
76573544ea2eSmrg/* end confdefs.h.  */
76583544ea2eSmrgint i;
76593544ea2eSmrgint
7660b71ad168Smrgmain (void)
76613544ea2eSmrg{
76623544ea2eSmrg
76633544ea2eSmrg  ;
76643544ea2eSmrg  return 0;
76653544ea2eSmrg}
76663544ea2eSmrg_ACEOF
7667b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7668b71ad168Smrgthen :
76693544ea2eSmrg  eval $cacheid=yes
7670b71ad168Smrgelse $as_nop
76713544ea2eSmrg  eval $cacheid=no
76723544ea2eSmrgfi
7673b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
76743544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
76753544ea2eSmrgfi
76763544ea2eSmrg
76773544ea2eSmrg
76783544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
76793544ea2eSmrg
76803544ea2eSmrg		eval supported=\$$cacheid
7681b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7682b71ad168Smrgprintf "%s\n" "$supported" >&6; }
76833544ea2eSmrg		if test "$supported" = "yes" ; then
76843544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull"
76853544ea2eSmrg			found="yes"
76863544ea2eSmrg		fi
76873544ea2eSmrg	fi
76883544ea2eSmrg
76893544ea2eSmrg
76903544ea2eSmrg
76913544ea2eSmrg
76923544ea2eSmrg
76933544ea2eSmrg
76943544ea2eSmrg
76953544ea2eSmrg
76963544ea2eSmrg
76973544ea2eSmrg
76983544ea2eSmrg
76993544ea2eSmrg
77003544ea2eSmrg
77013544ea2eSmrg
77023544ea2eSmrg
77033544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
77043544ea2eSmrg
77053544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
77063544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7707b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7708b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7709b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7710b71ad168Smrgthen :
7711b71ad168Smrg  printf %s "(cached) " >&6
7712b71ad168Smrgelse $as_nop
77133544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77143544ea2eSmrg/* end confdefs.h.  */
77153544ea2eSmrgint i;
77163544ea2eSmrg_ACEOF
7717b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7718b71ad168Smrgthen :
77193544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7720b71ad168Smrgelse $as_nop
77213544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
77223544ea2eSmrgfi
7723b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
77243544ea2eSmrgfi
7725b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7726b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
77273544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
77283544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
77293544ea2eSmrgfi
77303544ea2eSmrg
77313544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
77323544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
77333544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
77343544ea2eSmrg	fi
77353544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7736b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7737b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7738b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7739b71ad168Smrgthen :
7740b71ad168Smrg  printf %s "(cached) " >&6
7741b71ad168Smrgelse $as_nop
77423544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77433544ea2eSmrg/* end confdefs.h.  */
77443544ea2eSmrgint i;
77453544ea2eSmrg_ACEOF
7746b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7747b71ad168Smrgthen :
77483544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7749b71ad168Smrgelse $as_nop
77503544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
77513544ea2eSmrgfi
7752b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
77533544ea2eSmrgfi
7754b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
7755b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
77563544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
77573544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
77583544ea2eSmrgfi
77593544ea2eSmrg
77603544ea2eSmrgfound="no"
77613544ea2eSmrg
77623544ea2eSmrg	if test $found = "no" ; then
776395fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
77643544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
77653544ea2eSmrg		fi
77663544ea2eSmrg
776795fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
77683544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
77693544ea2eSmrg		fi
77703544ea2eSmrg
77713544ea2eSmrg		CFLAGS="$CFLAGS -Werror=init-self"
77723544ea2eSmrg
7773b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5
7774b71ad168Smrgprintf %s "checking if $CC supports -Werror=init-self... " >&6; }
777595fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_init_self
7776b71ad168Smrg		if eval test \${$cacheid+y}
7777b71ad168Smrgthen :
7778b71ad168Smrg  printf %s "(cached) " >&6
7779b71ad168Smrgelse $as_nop
77803544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
77813544ea2eSmrg/* end confdefs.h.  */
77823544ea2eSmrgint i;
77833544ea2eSmrgint
7784b71ad168Smrgmain (void)
77853544ea2eSmrg{
77863544ea2eSmrg
77873544ea2eSmrg  ;
77883544ea2eSmrg  return 0;
77893544ea2eSmrg}
77903544ea2eSmrg_ACEOF
7791b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7792b71ad168Smrgthen :
77933544ea2eSmrg  eval $cacheid=yes
7794b71ad168Smrgelse $as_nop
77953544ea2eSmrg  eval $cacheid=no
77963544ea2eSmrgfi
7797b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
77983544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
77993544ea2eSmrgfi
78003544ea2eSmrg
78013544ea2eSmrg
78023544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
78033544ea2eSmrg
78043544ea2eSmrg		eval supported=\$$cacheid
7805b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7806b71ad168Smrgprintf "%s\n" "$supported" >&6; }
78073544ea2eSmrg		if test "$supported" = "yes" ; then
78083544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self"
78093544ea2eSmrg			found="yes"
78103544ea2eSmrg		fi
78113544ea2eSmrg	fi
78123544ea2eSmrg
78133544ea2eSmrg
78143544ea2eSmrg
78153544ea2eSmrg
78163544ea2eSmrg
78173544ea2eSmrg
78183544ea2eSmrg
78193544ea2eSmrg
78203544ea2eSmrg
78213544ea2eSmrg
78223544ea2eSmrg
78233544ea2eSmrg
78243544ea2eSmrg
78253544ea2eSmrg
78263544ea2eSmrg
78273544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
78283544ea2eSmrg
78293544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
78303544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7831b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7832b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7833b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7834b71ad168Smrgthen :
7835b71ad168Smrg  printf %s "(cached) " >&6
7836b71ad168Smrgelse $as_nop
78373544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78383544ea2eSmrg/* end confdefs.h.  */
78393544ea2eSmrgint i;
78403544ea2eSmrg_ACEOF
7841b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7842b71ad168Smrgthen :
78433544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7844b71ad168Smrgelse $as_nop
78453544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
78463544ea2eSmrgfi
7847b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
78483544ea2eSmrgfi
7849b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7850b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
78513544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
78523544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
78533544ea2eSmrgfi
78543544ea2eSmrg
78553544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
78563544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
78573544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
78583544ea2eSmrg	fi
78593544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7860b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7861b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7862b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7863b71ad168Smrgthen :
7864b71ad168Smrg  printf %s "(cached) " >&6
7865b71ad168Smrgelse $as_nop
78663544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78673544ea2eSmrg/* end confdefs.h.  */
78683544ea2eSmrgint i;
78693544ea2eSmrg_ACEOF
7870b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7871b71ad168Smrgthen :
78723544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7873b71ad168Smrgelse $as_nop
78743544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
78753544ea2eSmrgfi
7876b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
78773544ea2eSmrgfi
7878b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
7879b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
78803544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
78813544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
78823544ea2eSmrgfi
78833544ea2eSmrg
78843544ea2eSmrgfound="no"
78853544ea2eSmrg
78863544ea2eSmrg	if test $found = "no" ; then
788795fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
78883544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
78893544ea2eSmrg		fi
78903544ea2eSmrg
789195fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
78923544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
78933544ea2eSmrg		fi
78943544ea2eSmrg
78953544ea2eSmrg		CFLAGS="$CFLAGS -Werror=main"
78963544ea2eSmrg
7897b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5
7898b71ad168Smrgprintf %s "checking if $CC supports -Werror=main... " >&6; }
789995fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_main
7900b71ad168Smrg		if eval test \${$cacheid+y}
7901b71ad168Smrgthen :
7902b71ad168Smrg  printf %s "(cached) " >&6
7903b71ad168Smrgelse $as_nop
79043544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79053544ea2eSmrg/* end confdefs.h.  */
79063544ea2eSmrgint i;
79073544ea2eSmrgint
7908b71ad168Smrgmain (void)
79093544ea2eSmrg{
79103544ea2eSmrg
79113544ea2eSmrg  ;
79123544ea2eSmrg  return 0;
79133544ea2eSmrg}
79143544ea2eSmrg_ACEOF
7915b71ad168Smrgif ac_fn_c_try_link "$LINENO"
7916b71ad168Smrgthen :
79173544ea2eSmrg  eval $cacheid=yes
7918b71ad168Smrgelse $as_nop
79193544ea2eSmrg  eval $cacheid=no
79203544ea2eSmrgfi
7921b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
79223544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
79233544ea2eSmrgfi
79243544ea2eSmrg
79253544ea2eSmrg
79263544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
79273544ea2eSmrg
79283544ea2eSmrg		eval supported=\$$cacheid
7929b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
7930b71ad168Smrgprintf "%s\n" "$supported" >&6; }
79313544ea2eSmrg		if test "$supported" = "yes" ; then
79323544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=main"
79333544ea2eSmrg			found="yes"
79343544ea2eSmrg		fi
79353544ea2eSmrg	fi
79363544ea2eSmrg
79373544ea2eSmrg
79383544ea2eSmrg
79393544ea2eSmrg
79403544ea2eSmrg
79413544ea2eSmrg
79423544ea2eSmrg
79433544ea2eSmrg
79443544ea2eSmrg
79453544ea2eSmrg
79463544ea2eSmrg
79473544ea2eSmrg
79483544ea2eSmrg
79493544ea2eSmrg
79503544ea2eSmrg
79513544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
79523544ea2eSmrg
79533544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
79543544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7955b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
7956b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
7957b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
7958b71ad168Smrgthen :
7959b71ad168Smrg  printf %s "(cached) " >&6
7960b71ad168Smrgelse $as_nop
79613544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79623544ea2eSmrg/* end confdefs.h.  */
79633544ea2eSmrgint i;
79643544ea2eSmrg_ACEOF
7965b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7966b71ad168Smrgthen :
79673544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
7968b71ad168Smrgelse $as_nop
79693544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
79703544ea2eSmrgfi
7971b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
79723544ea2eSmrgfi
7973b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
7974b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
79753544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
79763544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
79773544ea2eSmrgfi
79783544ea2eSmrg
79793544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
79803544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
79813544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
79823544ea2eSmrg	fi
79833544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
7984b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
7985b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
7986b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
7987b71ad168Smrgthen :
7988b71ad168Smrg  printf %s "(cached) " >&6
7989b71ad168Smrgelse $as_nop
79903544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
79913544ea2eSmrg/* end confdefs.h.  */
79923544ea2eSmrgint i;
79933544ea2eSmrg_ACEOF
7994b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
7995b71ad168Smrgthen :
79963544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
7997b71ad168Smrgelse $as_nop
79983544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
79993544ea2eSmrgfi
8000b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
80013544ea2eSmrgfi
8002b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8003b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
80043544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
80053544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
80063544ea2eSmrgfi
80073544ea2eSmrg
80083544ea2eSmrgfound="no"
80093544ea2eSmrg
80103544ea2eSmrg	if test $found = "no" ; then
801195fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
80123544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
80133544ea2eSmrg		fi
80143544ea2eSmrg
801595fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
80163544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
80173544ea2eSmrg		fi
80183544ea2eSmrg
80193544ea2eSmrg		CFLAGS="$CFLAGS -Werror=missing-braces"
80203544ea2eSmrg
8021b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5
8022b71ad168Smrgprintf %s "checking if $CC supports -Werror=missing-braces... " >&6; }
802395fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_missing_braces
8024b71ad168Smrg		if eval test \${$cacheid+y}
8025b71ad168Smrgthen :
8026b71ad168Smrg  printf %s "(cached) " >&6
8027b71ad168Smrgelse $as_nop
80283544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
80293544ea2eSmrg/* end confdefs.h.  */
80303544ea2eSmrgint i;
80313544ea2eSmrgint
8032b71ad168Smrgmain (void)
80333544ea2eSmrg{
80343544ea2eSmrg
80353544ea2eSmrg  ;
80363544ea2eSmrg  return 0;
80373544ea2eSmrg}
80383544ea2eSmrg_ACEOF
8039b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8040b71ad168Smrgthen :
80413544ea2eSmrg  eval $cacheid=yes
8042b71ad168Smrgelse $as_nop
80433544ea2eSmrg  eval $cacheid=no
80443544ea2eSmrgfi
8045b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
80463544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
80473544ea2eSmrgfi
80483544ea2eSmrg
80493544ea2eSmrg
80503544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
80513544ea2eSmrg
80523544ea2eSmrg		eval supported=\$$cacheid
8053b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8054b71ad168Smrgprintf "%s\n" "$supported" >&6; }
80553544ea2eSmrg		if test "$supported" = "yes" ; then
80563544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces"
80573544ea2eSmrg			found="yes"
80583544ea2eSmrg		fi
80593544ea2eSmrg	fi
80603544ea2eSmrg
80613544ea2eSmrg
80623544ea2eSmrg
80633544ea2eSmrg
80643544ea2eSmrg
80653544ea2eSmrg
80663544ea2eSmrg
80673544ea2eSmrg
80683544ea2eSmrg
80693544ea2eSmrg
80703544ea2eSmrg
80713544ea2eSmrg
80723544ea2eSmrg
80733544ea2eSmrg
80743544ea2eSmrg
80753544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
80763544ea2eSmrg
80773544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
80783544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
8079b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
8080b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
8081b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
8082b71ad168Smrgthen :
8083b71ad168Smrg  printf %s "(cached) " >&6
8084b71ad168Smrgelse $as_nop
80853544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
80863544ea2eSmrg/* end confdefs.h.  */
80873544ea2eSmrgint i;
80883544ea2eSmrg_ACEOF
8089b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8090b71ad168Smrgthen :
80913544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
8092b71ad168Smrgelse $as_nop
80933544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
80943544ea2eSmrgfi
8095b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
80963544ea2eSmrgfi
8097b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
8098b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
80993544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
81003544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
81013544ea2eSmrgfi
81023544ea2eSmrg
81033544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
81043544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
81053544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
81063544ea2eSmrg	fi
81073544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
8108b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
8109b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
8110b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
8111b71ad168Smrgthen :
8112b71ad168Smrg  printf %s "(cached) " >&6
8113b71ad168Smrgelse $as_nop
81143544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81153544ea2eSmrg/* end confdefs.h.  */
81163544ea2eSmrgint i;
81173544ea2eSmrg_ACEOF
8118b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8119b71ad168Smrgthen :
81203544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
8121b71ad168Smrgelse $as_nop
81223544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
81233544ea2eSmrgfi
8124b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
81253544ea2eSmrgfi
8126b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8127b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
81283544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
81293544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
81303544ea2eSmrgfi
81313544ea2eSmrg
81323544ea2eSmrgfound="no"
81333544ea2eSmrg
81343544ea2eSmrg	if test $found = "no" ; then
813595fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
81363544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
81373544ea2eSmrg		fi
81383544ea2eSmrg
813995fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
81403544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
81413544ea2eSmrg		fi
81423544ea2eSmrg
81433544ea2eSmrg		CFLAGS="$CFLAGS -Werror=sequence-point"
81443544ea2eSmrg
8145b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5
8146b71ad168Smrgprintf %s "checking if $CC supports -Werror=sequence-point... " >&6; }
814795fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_sequence_point
8148b71ad168Smrg		if eval test \${$cacheid+y}
8149b71ad168Smrgthen :
8150b71ad168Smrg  printf %s "(cached) " >&6
8151b71ad168Smrgelse $as_nop
81523544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
81533544ea2eSmrg/* end confdefs.h.  */
81543544ea2eSmrgint i;
81553544ea2eSmrgint
8156b71ad168Smrgmain (void)
81573544ea2eSmrg{
81583544ea2eSmrg
81593544ea2eSmrg  ;
81603544ea2eSmrg  return 0;
81613544ea2eSmrg}
81623544ea2eSmrg_ACEOF
8163b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8164b71ad168Smrgthen :
81653544ea2eSmrg  eval $cacheid=yes
8166b71ad168Smrgelse $as_nop
81673544ea2eSmrg  eval $cacheid=no
81683544ea2eSmrgfi
8169b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
81703544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
81713544ea2eSmrgfi
81723544ea2eSmrg
81733544ea2eSmrg
81743544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
81753544ea2eSmrg
81763544ea2eSmrg		eval supported=\$$cacheid
8177b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8178b71ad168Smrgprintf "%s\n" "$supported" >&6; }
81793544ea2eSmrg		if test "$supported" = "yes" ; then
81803544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point"
81813544ea2eSmrg			found="yes"
81823544ea2eSmrg		fi
81833544ea2eSmrg	fi
81843544ea2eSmrg
81853544ea2eSmrg
81863544ea2eSmrg
81873544ea2eSmrg
81883544ea2eSmrg
81893544ea2eSmrg
81903544ea2eSmrg
81913544ea2eSmrg
81923544ea2eSmrg
81933544ea2eSmrg
81943544ea2eSmrg
81953544ea2eSmrg
81963544ea2eSmrg
81973544ea2eSmrg
81983544ea2eSmrg
81993544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
82003544ea2eSmrg
82013544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
82023544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
8203b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
8204b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
8205b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
8206b71ad168Smrgthen :
8207b71ad168Smrg  printf %s "(cached) " >&6
8208b71ad168Smrgelse $as_nop
82093544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82103544ea2eSmrg/* end confdefs.h.  */
82113544ea2eSmrgint i;
82123544ea2eSmrg_ACEOF
8213b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8214b71ad168Smrgthen :
82153544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
8216b71ad168Smrgelse $as_nop
82173544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
82183544ea2eSmrgfi
8219b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
82203544ea2eSmrgfi
8221b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
8222b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
82233544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
82243544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
82253544ea2eSmrgfi
82263544ea2eSmrg
82273544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
82283544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
82293544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
82303544ea2eSmrg	fi
82313544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
8232b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
8233b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
8234b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
8235b71ad168Smrgthen :
8236b71ad168Smrg  printf %s "(cached) " >&6
8237b71ad168Smrgelse $as_nop
82383544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82393544ea2eSmrg/* end confdefs.h.  */
82403544ea2eSmrgint i;
82413544ea2eSmrg_ACEOF
8242b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8243b71ad168Smrgthen :
82443544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
8245b71ad168Smrgelse $as_nop
82463544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
82473544ea2eSmrgfi
8248b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
82493544ea2eSmrgfi
8250b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8251b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
82523544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
82533544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
82543544ea2eSmrgfi
82553544ea2eSmrg
82563544ea2eSmrgfound="no"
82573544ea2eSmrg
82583544ea2eSmrg	if test $found = "no" ; then
825995fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
82603544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
82613544ea2eSmrg		fi
82623544ea2eSmrg
826395fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
82643544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
82653544ea2eSmrg		fi
82663544ea2eSmrg
82673544ea2eSmrg		CFLAGS="$CFLAGS -Werror=return-type"
82683544ea2eSmrg
8269b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5
8270b71ad168Smrgprintf %s "checking if $CC supports -Werror=return-type... " >&6; }
827195fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_return_type
8272b71ad168Smrg		if eval test \${$cacheid+y}
8273b71ad168Smrgthen :
8274b71ad168Smrg  printf %s "(cached) " >&6
8275b71ad168Smrgelse $as_nop
82763544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82773544ea2eSmrg/* end confdefs.h.  */
82783544ea2eSmrgint i;
82793544ea2eSmrgint
8280b71ad168Smrgmain (void)
82813544ea2eSmrg{
82823544ea2eSmrg
82833544ea2eSmrg  ;
82843544ea2eSmrg  return 0;
82853544ea2eSmrg}
82863544ea2eSmrg_ACEOF
8287b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8288b71ad168Smrgthen :
82893544ea2eSmrg  eval $cacheid=yes
8290b71ad168Smrgelse $as_nop
82913544ea2eSmrg  eval $cacheid=no
82923544ea2eSmrgfi
8293b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
82943544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
82953544ea2eSmrgfi
82963544ea2eSmrg
82973544ea2eSmrg
82983544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
82993544ea2eSmrg
83003544ea2eSmrg		eval supported=\$$cacheid
8301b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8302b71ad168Smrgprintf "%s\n" "$supported" >&6; }
83033544ea2eSmrg		if test "$supported" = "yes" ; then
83043544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type"
83053544ea2eSmrg			found="yes"
83063544ea2eSmrg		fi
83073544ea2eSmrg	fi
83083544ea2eSmrg
83093544ea2eSmrg	if test $found = "no" ; then
831095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
83113544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
83123544ea2eSmrg		fi
83133544ea2eSmrg
831495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
83153544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
83163544ea2eSmrg		fi
83173544ea2eSmrg
83183544ea2eSmrg		CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
83193544ea2eSmrg
8320b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5
8321b71ad168Smrgprintf %s "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; }
832295fdd44cSmrg		cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT
8323b71ad168Smrg		if eval test \${$cacheid+y}
8324b71ad168Smrgthen :
8325b71ad168Smrg  printf %s "(cached) " >&6
8326b71ad168Smrgelse $as_nop
83273544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83283544ea2eSmrg/* end confdefs.h.  */
83293544ea2eSmrgint i;
83303544ea2eSmrgint
8331b71ad168Smrgmain (void)
83323544ea2eSmrg{
83333544ea2eSmrg
83343544ea2eSmrg  ;
83353544ea2eSmrg  return 0;
83363544ea2eSmrg}
83373544ea2eSmrg_ACEOF
8338b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8339b71ad168Smrgthen :
83403544ea2eSmrg  eval $cacheid=yes
8341b71ad168Smrgelse $as_nop
83423544ea2eSmrg  eval $cacheid=no
83433544ea2eSmrgfi
8344b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
83453544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
83463544ea2eSmrgfi
83473544ea2eSmrg
83483544ea2eSmrg
83493544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
83503544ea2eSmrg
83513544ea2eSmrg		eval supported=\$$cacheid
8352b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8353b71ad168Smrgprintf "%s\n" "$supported" >&6; }
83543544ea2eSmrg		if test "$supported" = "yes" ; then
83553544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
83563544ea2eSmrg			found="yes"
83573544ea2eSmrg		fi
83583544ea2eSmrg	fi
83593544ea2eSmrg
83603544ea2eSmrg
83613544ea2eSmrg
83623544ea2eSmrg
83633544ea2eSmrg
83643544ea2eSmrg
83653544ea2eSmrg
83663544ea2eSmrg
83673544ea2eSmrg
83683544ea2eSmrg
83693544ea2eSmrg
83703544ea2eSmrg
83713544ea2eSmrg
83723544ea2eSmrg
83733544ea2eSmrg
83743544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
83753544ea2eSmrg
83763544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
83773544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
8378b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
8379b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
8380b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
8381b71ad168Smrgthen :
8382b71ad168Smrg  printf %s "(cached) " >&6
8383b71ad168Smrgelse $as_nop
83843544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
83853544ea2eSmrg/* end confdefs.h.  */
83863544ea2eSmrgint i;
83873544ea2eSmrg_ACEOF
8388b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8389b71ad168Smrgthen :
83903544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
8391b71ad168Smrgelse $as_nop
83923544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
83933544ea2eSmrgfi
8394b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
83953544ea2eSmrgfi
8396b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
8397b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
83983544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
83993544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
84003544ea2eSmrgfi
84013544ea2eSmrg
84023544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
84033544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
84043544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
84053544ea2eSmrg	fi
84063544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
8407b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
8408b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
8409b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
8410b71ad168Smrgthen :
8411b71ad168Smrg  printf %s "(cached) " >&6
8412b71ad168Smrgelse $as_nop
84133544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84143544ea2eSmrg/* end confdefs.h.  */
84153544ea2eSmrgint i;
84163544ea2eSmrg_ACEOF
8417b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8418b71ad168Smrgthen :
84193544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
8420b71ad168Smrgelse $as_nop
84213544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
84223544ea2eSmrgfi
8423b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
84243544ea2eSmrgfi
8425b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8426b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
84273544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
84283544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
84293544ea2eSmrgfi
84303544ea2eSmrg
84313544ea2eSmrgfound="no"
84323544ea2eSmrg
84333544ea2eSmrg	if test $found = "no" ; then
843495fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
84353544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
84363544ea2eSmrg		fi
84373544ea2eSmrg
843895fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
84393544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
84403544ea2eSmrg		fi
84413544ea2eSmrg
84423544ea2eSmrg		CFLAGS="$CFLAGS -Werror=trigraphs"
84433544ea2eSmrg
8444b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5
8445b71ad168Smrgprintf %s "checking if $CC supports -Werror=trigraphs... " >&6; }
844695fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_trigraphs
8447b71ad168Smrg		if eval test \${$cacheid+y}
8448b71ad168Smrgthen :
8449b71ad168Smrg  printf %s "(cached) " >&6
8450b71ad168Smrgelse $as_nop
84513544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
84523544ea2eSmrg/* end confdefs.h.  */
84533544ea2eSmrgint i;
84543544ea2eSmrgint
8455b71ad168Smrgmain (void)
84563544ea2eSmrg{
84573544ea2eSmrg
84583544ea2eSmrg  ;
84593544ea2eSmrg  return 0;
84603544ea2eSmrg}
84613544ea2eSmrg_ACEOF
8462b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8463b71ad168Smrgthen :
84643544ea2eSmrg  eval $cacheid=yes
8465b71ad168Smrgelse $as_nop
84663544ea2eSmrg  eval $cacheid=no
84673544ea2eSmrgfi
8468b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
84693544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
84703544ea2eSmrgfi
84713544ea2eSmrg
84723544ea2eSmrg
84733544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
84743544ea2eSmrg
84753544ea2eSmrg		eval supported=\$$cacheid
8476b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8477b71ad168Smrgprintf "%s\n" "$supported" >&6; }
84783544ea2eSmrg		if test "$supported" = "yes" ; then
84793544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs"
84803544ea2eSmrg			found="yes"
84813544ea2eSmrg		fi
84823544ea2eSmrg	fi
84833544ea2eSmrg
84843544ea2eSmrg
84853544ea2eSmrg
84863544ea2eSmrg
84873544ea2eSmrg
84883544ea2eSmrg
84893544ea2eSmrg
84903544ea2eSmrg
84913544ea2eSmrg
84923544ea2eSmrg
84933544ea2eSmrg
84943544ea2eSmrg
84953544ea2eSmrg
84963544ea2eSmrg
84973544ea2eSmrg
84983544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
84993544ea2eSmrg
85003544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
85013544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
8502b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
8503b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
8504b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
8505b71ad168Smrgthen :
8506b71ad168Smrg  printf %s "(cached) " >&6
8507b71ad168Smrgelse $as_nop
85083544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85093544ea2eSmrg/* end confdefs.h.  */
85103544ea2eSmrgint i;
85113544ea2eSmrg_ACEOF
8512b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8513b71ad168Smrgthen :
85143544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
8515b71ad168Smrgelse $as_nop
85163544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
85173544ea2eSmrgfi
8518b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
85193544ea2eSmrgfi
8520b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
8521b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
85223544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
85233544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
85243544ea2eSmrgfi
85253544ea2eSmrg
85263544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
85273544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
85283544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
85293544ea2eSmrg	fi
85303544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
8531b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
8532b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
8533b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
8534b71ad168Smrgthen :
8535b71ad168Smrg  printf %s "(cached) " >&6
8536b71ad168Smrgelse $as_nop
85373544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85383544ea2eSmrg/* end confdefs.h.  */
85393544ea2eSmrgint i;
85403544ea2eSmrg_ACEOF
8541b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8542b71ad168Smrgthen :
85433544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
8544b71ad168Smrgelse $as_nop
85453544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
85463544ea2eSmrgfi
8547b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
85483544ea2eSmrgfi
8549b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8550b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
85513544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
85523544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
85533544ea2eSmrgfi
85543544ea2eSmrg
85553544ea2eSmrgfound="no"
85563544ea2eSmrg
85573544ea2eSmrg	if test $found = "no" ; then
855895fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
85593544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
85603544ea2eSmrg		fi
85613544ea2eSmrg
856295fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
85633544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
85643544ea2eSmrg		fi
85653544ea2eSmrg
85663544ea2eSmrg		CFLAGS="$CFLAGS -Werror=array-bounds"
85673544ea2eSmrg
8568b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5
8569b71ad168Smrgprintf %s "checking if $CC supports -Werror=array-bounds... " >&6; }
857095fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_array_bounds
8571b71ad168Smrg		if eval test \${$cacheid+y}
8572b71ad168Smrgthen :
8573b71ad168Smrg  printf %s "(cached) " >&6
8574b71ad168Smrgelse $as_nop
85753544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85763544ea2eSmrg/* end confdefs.h.  */
85773544ea2eSmrgint i;
85783544ea2eSmrgint
8579b71ad168Smrgmain (void)
85803544ea2eSmrg{
85813544ea2eSmrg
85823544ea2eSmrg  ;
85833544ea2eSmrg  return 0;
85843544ea2eSmrg}
85853544ea2eSmrg_ACEOF
8586b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8587b71ad168Smrgthen :
85883544ea2eSmrg  eval $cacheid=yes
8589b71ad168Smrgelse $as_nop
85903544ea2eSmrg  eval $cacheid=no
85913544ea2eSmrgfi
8592b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
85933544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
85943544ea2eSmrgfi
85953544ea2eSmrg
85963544ea2eSmrg
85973544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
85983544ea2eSmrg
85993544ea2eSmrg		eval supported=\$$cacheid
8600b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8601b71ad168Smrgprintf "%s\n" "$supported" >&6; }
86023544ea2eSmrg		if test "$supported" = "yes" ; then
86033544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds"
86043544ea2eSmrg			found="yes"
86053544ea2eSmrg		fi
86063544ea2eSmrg	fi
86073544ea2eSmrg
86083544ea2eSmrg
86093544ea2eSmrg
86103544ea2eSmrg
86113544ea2eSmrg
86123544ea2eSmrg
86133544ea2eSmrg
86143544ea2eSmrg
86153544ea2eSmrg
86163544ea2eSmrg
86173544ea2eSmrg
86183544ea2eSmrg
86193544ea2eSmrg
86203544ea2eSmrg
86213544ea2eSmrg
86223544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
86233544ea2eSmrg
86243544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
86253544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
8626b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
8627b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
8628b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
8629b71ad168Smrgthen :
8630b71ad168Smrg  printf %s "(cached) " >&6
8631b71ad168Smrgelse $as_nop
86323544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
86333544ea2eSmrg/* end confdefs.h.  */
86343544ea2eSmrgint i;
86353544ea2eSmrg_ACEOF
8636b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8637b71ad168Smrgthen :
86383544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
8639b71ad168Smrgelse $as_nop
86403544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
86413544ea2eSmrgfi
8642b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
86433544ea2eSmrgfi
8644b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
8645b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
86463544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
86473544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
86483544ea2eSmrgfi
86493544ea2eSmrg
86503544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
86513544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
86523544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
86533544ea2eSmrg	fi
86543544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
8655b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
8656b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
8657b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
8658b71ad168Smrgthen :
8659b71ad168Smrg  printf %s "(cached) " >&6
8660b71ad168Smrgelse $as_nop
86613544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
86623544ea2eSmrg/* end confdefs.h.  */
86633544ea2eSmrgint i;
86643544ea2eSmrg_ACEOF
8665b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8666b71ad168Smrgthen :
86673544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
8668b71ad168Smrgelse $as_nop
86693544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
86703544ea2eSmrgfi
8671b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
86723544ea2eSmrgfi
8673b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8674b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
86753544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
86763544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
86773544ea2eSmrgfi
86783544ea2eSmrg
86793544ea2eSmrgfound="no"
86803544ea2eSmrg
86813544ea2eSmrg	if test $found = "no" ; then
868295fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
86833544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
86843544ea2eSmrg		fi
86853544ea2eSmrg
868695fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
86873544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
86883544ea2eSmrg		fi
86893544ea2eSmrg
86903544ea2eSmrg		CFLAGS="$CFLAGS -Werror=write-strings"
86913544ea2eSmrg
8692b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5
8693b71ad168Smrgprintf %s "checking if $CC supports -Werror=write-strings... " >&6; }
869495fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_write_strings
8695b71ad168Smrg		if eval test \${$cacheid+y}
8696b71ad168Smrgthen :
8697b71ad168Smrg  printf %s "(cached) " >&6
8698b71ad168Smrgelse $as_nop
86993544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
87003544ea2eSmrg/* end confdefs.h.  */
87013544ea2eSmrgint i;
87023544ea2eSmrgint
8703b71ad168Smrgmain (void)
87043544ea2eSmrg{
87053544ea2eSmrg
87063544ea2eSmrg  ;
87073544ea2eSmrg  return 0;
87083544ea2eSmrg}
87093544ea2eSmrg_ACEOF
8710b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8711b71ad168Smrgthen :
87123544ea2eSmrg  eval $cacheid=yes
8713b71ad168Smrgelse $as_nop
87143544ea2eSmrg  eval $cacheid=no
87153544ea2eSmrgfi
8716b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
87173544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
87183544ea2eSmrgfi
87193544ea2eSmrg
87203544ea2eSmrg
87213544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
87223544ea2eSmrg
87233544ea2eSmrg		eval supported=\$$cacheid
8724b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8725b71ad168Smrgprintf "%s\n" "$supported" >&6; }
87263544ea2eSmrg		if test "$supported" = "yes" ; then
87273544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings"
87283544ea2eSmrg			found="yes"
87293544ea2eSmrg		fi
87303544ea2eSmrg	fi
87313544ea2eSmrg
87323544ea2eSmrg
87333544ea2eSmrg
87343544ea2eSmrg
87353544ea2eSmrg
87363544ea2eSmrg
87373544ea2eSmrg
87383544ea2eSmrg
87393544ea2eSmrg
87403544ea2eSmrg
87413544ea2eSmrg
87423544ea2eSmrg
87433544ea2eSmrg
87443544ea2eSmrg
87453544ea2eSmrg
87463544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
87473544ea2eSmrg
87483544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
87493544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
8750b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
8751b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
8752b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
8753b71ad168Smrgthen :
8754b71ad168Smrg  printf %s "(cached) " >&6
8755b71ad168Smrgelse $as_nop
87563544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
87573544ea2eSmrg/* end confdefs.h.  */
87583544ea2eSmrgint i;
87593544ea2eSmrg_ACEOF
8760b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8761b71ad168Smrgthen :
87623544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
8763b71ad168Smrgelse $as_nop
87643544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
87653544ea2eSmrgfi
8766b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
87673544ea2eSmrgfi
8768b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
8769b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
87703544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
87713544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
87723544ea2eSmrgfi
87733544ea2eSmrg
87743544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
87753544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
87763544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
87773544ea2eSmrg	fi
87783544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
8779b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
8780b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
8781b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
8782b71ad168Smrgthen :
8783b71ad168Smrg  printf %s "(cached) " >&6
8784b71ad168Smrgelse $as_nop
87853544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
87863544ea2eSmrg/* end confdefs.h.  */
87873544ea2eSmrgint i;
87883544ea2eSmrg_ACEOF
8789b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8790b71ad168Smrgthen :
87913544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
8792b71ad168Smrgelse $as_nop
87933544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
87943544ea2eSmrgfi
8795b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
87963544ea2eSmrgfi
8797b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8798b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
87993544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
88003544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
88013544ea2eSmrgfi
88023544ea2eSmrg
88033544ea2eSmrgfound="no"
88043544ea2eSmrg
88053544ea2eSmrg	if test $found = "no" ; then
880695fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
88073544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
88083544ea2eSmrg		fi
88093544ea2eSmrg
881095fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
88113544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
88123544ea2eSmrg		fi
88133544ea2eSmrg
88143544ea2eSmrg		CFLAGS="$CFLAGS -Werror=address"
88153544ea2eSmrg
8816b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5
8817b71ad168Smrgprintf %s "checking if $CC supports -Werror=address... " >&6; }
881895fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_address
8819b71ad168Smrg		if eval test \${$cacheid+y}
8820b71ad168Smrgthen :
8821b71ad168Smrg  printf %s "(cached) " >&6
8822b71ad168Smrgelse $as_nop
88233544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88243544ea2eSmrg/* end confdefs.h.  */
88253544ea2eSmrgint i;
88263544ea2eSmrgint
8827b71ad168Smrgmain (void)
88283544ea2eSmrg{
88293544ea2eSmrg
88303544ea2eSmrg  ;
88313544ea2eSmrg  return 0;
88323544ea2eSmrg}
88333544ea2eSmrg_ACEOF
8834b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8835b71ad168Smrgthen :
88363544ea2eSmrg  eval $cacheid=yes
8837b71ad168Smrgelse $as_nop
88383544ea2eSmrg  eval $cacheid=no
88393544ea2eSmrgfi
8840b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
88413544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
88423544ea2eSmrgfi
88433544ea2eSmrg
88443544ea2eSmrg
88453544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
88463544ea2eSmrg
88473544ea2eSmrg		eval supported=\$$cacheid
8848b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8849b71ad168Smrgprintf "%s\n" "$supported" >&6; }
88503544ea2eSmrg		if test "$supported" = "yes" ; then
88513544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=address"
88523544ea2eSmrg			found="yes"
88533544ea2eSmrg		fi
88543544ea2eSmrg	fi
88553544ea2eSmrg
88563544ea2eSmrg
88573544ea2eSmrg
88583544ea2eSmrg
88593544ea2eSmrg
88603544ea2eSmrg
88613544ea2eSmrg
88623544ea2eSmrg
88633544ea2eSmrg
88643544ea2eSmrg
88653544ea2eSmrg
88663544ea2eSmrg
88673544ea2eSmrg
88683544ea2eSmrg
88693544ea2eSmrg
88703544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
88713544ea2eSmrg
88723544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
88733544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
8874b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
8875b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
8876b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
8877b71ad168Smrgthen :
8878b71ad168Smrg  printf %s "(cached) " >&6
8879b71ad168Smrgelse $as_nop
88803544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
88813544ea2eSmrg/* end confdefs.h.  */
88823544ea2eSmrgint i;
88833544ea2eSmrg_ACEOF
8884b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8885b71ad168Smrgthen :
88863544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
8887b71ad168Smrgelse $as_nop
88883544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
88893544ea2eSmrgfi
8890b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
88913544ea2eSmrgfi
8892b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
8893b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
88943544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
88953544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
88963544ea2eSmrgfi
88973544ea2eSmrg
88983544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
88993544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
89003544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
89013544ea2eSmrg	fi
89023544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
8903b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
8904b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
8905b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
8906b71ad168Smrgthen :
8907b71ad168Smrg  printf %s "(cached) " >&6
8908b71ad168Smrgelse $as_nop
89093544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
89103544ea2eSmrg/* end confdefs.h.  */
89113544ea2eSmrgint i;
89123544ea2eSmrg_ACEOF
8913b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
8914b71ad168Smrgthen :
89153544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
8916b71ad168Smrgelse $as_nop
89173544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
89183544ea2eSmrgfi
8919b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
89203544ea2eSmrgfi
8921b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
8922b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
89233544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
89243544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
89253544ea2eSmrgfi
89263544ea2eSmrg
89273544ea2eSmrgfound="no"
89283544ea2eSmrg
89293544ea2eSmrg	if test $found = "no" ; then
893095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
89313544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
89323544ea2eSmrg		fi
89333544ea2eSmrg
893495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
89353544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
89363544ea2eSmrg		fi
89373544ea2eSmrg
89383544ea2eSmrg		CFLAGS="$CFLAGS -Werror=int-to-pointer-cast"
89393544ea2eSmrg
8940b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5
8941b71ad168Smrgprintf %s "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; }
894295fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast
8943b71ad168Smrg		if eval test \${$cacheid+y}
8944b71ad168Smrgthen :
8945b71ad168Smrg  printf %s "(cached) " >&6
8946b71ad168Smrgelse $as_nop
89473544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
89483544ea2eSmrg/* end confdefs.h.  */
89493544ea2eSmrgint i;
89503544ea2eSmrgint
8951b71ad168Smrgmain (void)
89523544ea2eSmrg{
89533544ea2eSmrg
89543544ea2eSmrg  ;
89553544ea2eSmrg  return 0;
89563544ea2eSmrg}
89573544ea2eSmrg_ACEOF
8958b71ad168Smrgif ac_fn_c_try_link "$LINENO"
8959b71ad168Smrgthen :
89603544ea2eSmrg  eval $cacheid=yes
8961b71ad168Smrgelse $as_nop
89623544ea2eSmrg  eval $cacheid=no
89633544ea2eSmrgfi
8964b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
89653544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
89663544ea2eSmrgfi
89673544ea2eSmrg
89683544ea2eSmrg
89693544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
89703544ea2eSmrg
89713544ea2eSmrg		eval supported=\$$cacheid
8972b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
8973b71ad168Smrgprintf "%s\n" "$supported" >&6; }
89743544ea2eSmrg		if test "$supported" = "yes" ; then
89753544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast"
89763544ea2eSmrg			found="yes"
89773544ea2eSmrg		fi
89783544ea2eSmrg	fi
89793544ea2eSmrg
89803544ea2eSmrg	if test $found = "no" ; then
898195fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
89823544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
89833544ea2eSmrg		fi
89843544ea2eSmrg
898595fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
89863544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
89873544ea2eSmrg		fi
89883544ea2eSmrg
89893544ea2eSmrg		CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
89903544ea2eSmrg
8991b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5
8992b71ad168Smrgprintf %s "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; }
899395fdd44cSmrg		cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION
8994b71ad168Smrg		if eval test \${$cacheid+y}
8995b71ad168Smrgthen :
8996b71ad168Smrg  printf %s "(cached) " >&6
8997b71ad168Smrgelse $as_nop
89983544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
89993544ea2eSmrg/* end confdefs.h.  */
90003544ea2eSmrgint i;
90013544ea2eSmrgint
9002b71ad168Smrgmain (void)
90033544ea2eSmrg{
90043544ea2eSmrg
90053544ea2eSmrg  ;
90063544ea2eSmrg  return 0;
90073544ea2eSmrg}
90083544ea2eSmrg_ACEOF
9009b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9010b71ad168Smrgthen :
90113544ea2eSmrg  eval $cacheid=yes
9012b71ad168Smrgelse $as_nop
90133544ea2eSmrg  eval $cacheid=no
90143544ea2eSmrgfi
9015b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
90163544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
90173544ea2eSmrgfi
90183544ea2eSmrg
90193544ea2eSmrg
90203544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
90213544ea2eSmrg
90223544ea2eSmrg		eval supported=\$$cacheid
9023b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9024b71ad168Smrgprintf "%s\n" "$supported" >&6; }
90253544ea2eSmrg		if test "$supported" = "yes" ; then
90263544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
90273544ea2eSmrg			found="yes"
90283544ea2eSmrg		fi
90293544ea2eSmrg	fi
90303544ea2eSmrg
90313544ea2eSmrg
90323544ea2eSmrg
90333544ea2eSmrg
90343544ea2eSmrg
90353544ea2eSmrg
90363544ea2eSmrg
90373544ea2eSmrg
90383544ea2eSmrg
90393544ea2eSmrg
90403544ea2eSmrg
90413544ea2eSmrg
90423544ea2eSmrg
90433544ea2eSmrg
90443544ea2eSmrg
90453544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
90463544ea2eSmrg
90473544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
90483544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9049b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9050b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9051b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9052b71ad168Smrgthen :
9053b71ad168Smrg  printf %s "(cached) " >&6
9054b71ad168Smrgelse $as_nop
90553544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
90563544ea2eSmrg/* end confdefs.h.  */
90573544ea2eSmrgint i;
90583544ea2eSmrg_ACEOF
9059b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9060b71ad168Smrgthen :
90613544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9062b71ad168Smrgelse $as_nop
90633544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
90643544ea2eSmrgfi
9065b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
90663544ea2eSmrgfi
9067b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9068b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
90693544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
90703544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
90713544ea2eSmrgfi
90723544ea2eSmrg
90733544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
90743544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
90753544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
90763544ea2eSmrg	fi
90773544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9078b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9079b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9080b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9081b71ad168Smrgthen :
9082b71ad168Smrg  printf %s "(cached) " >&6
9083b71ad168Smrgelse $as_nop
90843544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
90853544ea2eSmrg/* end confdefs.h.  */
90863544ea2eSmrgint i;
90873544ea2eSmrg_ACEOF
9088b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9089b71ad168Smrgthen :
90903544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9091b71ad168Smrgelse $as_nop
90923544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
90933544ea2eSmrgfi
9094b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
90953544ea2eSmrgfi
9096b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9097b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
90983544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
90993544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
91003544ea2eSmrgfi
91013544ea2eSmrg
91023544ea2eSmrgfound="no"
91033544ea2eSmrg
91043544ea2eSmrg	if test $found = "no" ; then
910595fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
91063544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
91073544ea2eSmrg		fi
91083544ea2eSmrg
910995fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
91103544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
91113544ea2eSmrg		fi
91123544ea2eSmrg
91133544ea2eSmrg		CFLAGS="$CFLAGS -Werror=pointer-to-int-cast"
91143544ea2eSmrg
9115b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5
9116b71ad168Smrgprintf %s "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; }
911795fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast
9118b71ad168Smrg		if eval test \${$cacheid+y}
9119b71ad168Smrgthen :
9120b71ad168Smrg  printf %s "(cached) " >&6
9121b71ad168Smrgelse $as_nop
91223544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91233544ea2eSmrg/* end confdefs.h.  */
91243544ea2eSmrgint i;
91253544ea2eSmrgint
9126b71ad168Smrgmain (void)
91273544ea2eSmrg{
91283544ea2eSmrg
91293544ea2eSmrg  ;
91303544ea2eSmrg  return 0;
91313544ea2eSmrg}
91323544ea2eSmrg_ACEOF
9133b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9134b71ad168Smrgthen :
91353544ea2eSmrg  eval $cacheid=yes
9136b71ad168Smrgelse $as_nop
91373544ea2eSmrg  eval $cacheid=no
91383544ea2eSmrgfi
9139b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
91403544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
91413544ea2eSmrgfi
91423544ea2eSmrg
91433544ea2eSmrg
91443544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
91453544ea2eSmrg
91463544ea2eSmrg		eval supported=\$$cacheid
9147b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9148b71ad168Smrgprintf "%s\n" "$supported" >&6; }
91493544ea2eSmrg		if test "$supported" = "yes" ; then
91503544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast"
91513544ea2eSmrg			found="yes"
91523544ea2eSmrg		fi
91533544ea2eSmrg	fi
91543544ea2eSmrg
91553544ea2eSmrg # Also -errwarn=E_BAD_PTR_INT_COMBINATION
91563544ea2eSmrgelse
9157b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5
9158b71ad168Smrgprintf "%s\n" "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;}
91593544ea2eSmrg
91603544ea2eSmrg
91613544ea2eSmrg
91623544ea2eSmrg
91633544ea2eSmrg
91643544ea2eSmrg
91653544ea2eSmrg
91663544ea2eSmrg
91673544ea2eSmrg
91683544ea2eSmrg
91693544ea2eSmrg
91703544ea2eSmrg
91713544ea2eSmrg
91723544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
91733544ea2eSmrg
91743544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
91753544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9176b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9177b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9178b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9179b71ad168Smrgthen :
9180b71ad168Smrg  printf %s "(cached) " >&6
9181b71ad168Smrgelse $as_nop
91823544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91833544ea2eSmrg/* end confdefs.h.  */
91843544ea2eSmrgint i;
91853544ea2eSmrg_ACEOF
9186b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9187b71ad168Smrgthen :
91883544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9189b71ad168Smrgelse $as_nop
91903544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
91913544ea2eSmrgfi
9192b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
91933544ea2eSmrgfi
9194b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9195b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
91963544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
91973544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
91983544ea2eSmrgfi
91993544ea2eSmrg
92003544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
92013544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
92023544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
92033544ea2eSmrg	fi
92043544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9205b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9206b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9207b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9208b71ad168Smrgthen :
9209b71ad168Smrg  printf %s "(cached) " >&6
9210b71ad168Smrgelse $as_nop
92113544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
92123544ea2eSmrg/* end confdefs.h.  */
92133544ea2eSmrgint i;
92143544ea2eSmrg_ACEOF
9215b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9216b71ad168Smrgthen :
92173544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9218b71ad168Smrgelse $as_nop
92193544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
92203544ea2eSmrgfi
9221b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
92223544ea2eSmrgfi
9223b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9224b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
92253544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
92263544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
92273544ea2eSmrgfi
92283544ea2eSmrg
92293544ea2eSmrgfound="no"
92303544ea2eSmrg
92313544ea2eSmrg	if test $found = "no" ; then
923295fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
92333544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
92343544ea2eSmrg		fi
92353544ea2eSmrg
923695fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
92373544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
92383544ea2eSmrg		fi
92393544ea2eSmrg
92403544ea2eSmrg		CFLAGS="$CFLAGS -Wimplicit"
92413544ea2eSmrg
9242b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5
9243b71ad168Smrgprintf %s "checking if $CC supports -Wimplicit... " >&6; }
92443544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wimplicit
9245b71ad168Smrg		if eval test \${$cacheid+y}
9246b71ad168Smrgthen :
9247b71ad168Smrg  printf %s "(cached) " >&6
9248b71ad168Smrgelse $as_nop
92493544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
92503544ea2eSmrg/* end confdefs.h.  */
92513544ea2eSmrgint i;
92523544ea2eSmrgint
9253b71ad168Smrgmain (void)
92543544ea2eSmrg{
92553544ea2eSmrg
92563544ea2eSmrg  ;
92573544ea2eSmrg  return 0;
92583544ea2eSmrg}
92593544ea2eSmrg_ACEOF
9260b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9261b71ad168Smrgthen :
92623544ea2eSmrg  eval $cacheid=yes
9263b71ad168Smrgelse $as_nop
92643544ea2eSmrg  eval $cacheid=no
92653544ea2eSmrgfi
9266b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
92673544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
92683544ea2eSmrgfi
92693544ea2eSmrg
92703544ea2eSmrg
92713544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
92723544ea2eSmrg
92733544ea2eSmrg		eval supported=\$$cacheid
9274b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9275b71ad168Smrgprintf "%s\n" "$supported" >&6; }
92763544ea2eSmrg		if test "$supported" = "yes" ; then
92773544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wimplicit"
92783544ea2eSmrg			found="yes"
92793544ea2eSmrg		fi
92803544ea2eSmrg	fi
92813544ea2eSmrg
92823544ea2eSmrg
92833544ea2eSmrg
92843544ea2eSmrg
92853544ea2eSmrg
92863544ea2eSmrg
92873544ea2eSmrg
92883544ea2eSmrg
92893544ea2eSmrg
92903544ea2eSmrg
92913544ea2eSmrg
92923544ea2eSmrg
92933544ea2eSmrg
92943544ea2eSmrg
92953544ea2eSmrg
92963544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
92973544ea2eSmrg
92983544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
92993544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9300b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9301b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9302b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9303b71ad168Smrgthen :
9304b71ad168Smrg  printf %s "(cached) " >&6
9305b71ad168Smrgelse $as_nop
93063544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
93073544ea2eSmrg/* end confdefs.h.  */
93083544ea2eSmrgint i;
93093544ea2eSmrg_ACEOF
9310b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9311b71ad168Smrgthen :
93123544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9313b71ad168Smrgelse $as_nop
93143544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
93153544ea2eSmrgfi
9316b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
93173544ea2eSmrgfi
9318b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9319b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
93203544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
93213544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
93223544ea2eSmrgfi
93233544ea2eSmrg
93243544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
93253544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
93263544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
93273544ea2eSmrg	fi
93283544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9329b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9330b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9331b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9332b71ad168Smrgthen :
9333b71ad168Smrg  printf %s "(cached) " >&6
9334b71ad168Smrgelse $as_nop
93353544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
93363544ea2eSmrg/* end confdefs.h.  */
93373544ea2eSmrgint i;
93383544ea2eSmrg_ACEOF
9339b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9340b71ad168Smrgthen :
93413544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9342b71ad168Smrgelse $as_nop
93433544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
93443544ea2eSmrgfi
9345b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
93463544ea2eSmrgfi
9347b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9348b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
93493544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
93503544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
93513544ea2eSmrgfi
93523544ea2eSmrg
93533544ea2eSmrgfound="no"
93543544ea2eSmrg
93553544ea2eSmrg	if test $found = "no" ; then
935695fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
93573544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
93583544ea2eSmrg		fi
93593544ea2eSmrg
936095fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
93613544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
93623544ea2eSmrg		fi
93633544ea2eSmrg
93643544ea2eSmrg		CFLAGS="$CFLAGS -Wnonnull"
93653544ea2eSmrg
9366b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5
9367b71ad168Smrgprintf %s "checking if $CC supports -Wnonnull... " >&6; }
93683544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wnonnull
9369b71ad168Smrg		if eval test \${$cacheid+y}
9370b71ad168Smrgthen :
9371b71ad168Smrg  printf %s "(cached) " >&6
9372b71ad168Smrgelse $as_nop
93733544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
93743544ea2eSmrg/* end confdefs.h.  */
93753544ea2eSmrgint i;
93763544ea2eSmrgint
9377b71ad168Smrgmain (void)
93783544ea2eSmrg{
93793544ea2eSmrg
93803544ea2eSmrg  ;
93813544ea2eSmrg  return 0;
93823544ea2eSmrg}
93833544ea2eSmrg_ACEOF
9384b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9385b71ad168Smrgthen :
93863544ea2eSmrg  eval $cacheid=yes
9387b71ad168Smrgelse $as_nop
93883544ea2eSmrg  eval $cacheid=no
93893544ea2eSmrgfi
9390b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
93913544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
93923544ea2eSmrgfi
93933544ea2eSmrg
93943544ea2eSmrg
93953544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
93963544ea2eSmrg
93973544ea2eSmrg		eval supported=\$$cacheid
9398b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9399b71ad168Smrgprintf "%s\n" "$supported" >&6; }
94003544ea2eSmrg		if test "$supported" = "yes" ; then
94013544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wnonnull"
94023544ea2eSmrg			found="yes"
94033544ea2eSmrg		fi
94043544ea2eSmrg	fi
94053544ea2eSmrg
94063544ea2eSmrg
94073544ea2eSmrg
94083544ea2eSmrg
94093544ea2eSmrg
94103544ea2eSmrg
94113544ea2eSmrg
94123544ea2eSmrg
94133544ea2eSmrg
94143544ea2eSmrg
94153544ea2eSmrg
94163544ea2eSmrg
94173544ea2eSmrg
94183544ea2eSmrg
94193544ea2eSmrg
94203544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
94213544ea2eSmrg
94223544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
94233544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9424b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9425b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9426b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9427b71ad168Smrgthen :
9428b71ad168Smrg  printf %s "(cached) " >&6
9429b71ad168Smrgelse $as_nop
94303544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
94313544ea2eSmrg/* end confdefs.h.  */
94323544ea2eSmrgint i;
94333544ea2eSmrg_ACEOF
9434b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9435b71ad168Smrgthen :
94363544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9437b71ad168Smrgelse $as_nop
94383544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
94393544ea2eSmrgfi
9440b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
94413544ea2eSmrgfi
9442b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9443b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
94443544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
94453544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
94463544ea2eSmrgfi
94473544ea2eSmrg
94483544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
94493544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
94503544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
94513544ea2eSmrg	fi
94523544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9453b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9454b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9455b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9456b71ad168Smrgthen :
9457b71ad168Smrg  printf %s "(cached) " >&6
9458b71ad168Smrgelse $as_nop
94593544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
94603544ea2eSmrg/* end confdefs.h.  */
94613544ea2eSmrgint i;
94623544ea2eSmrg_ACEOF
9463b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9464b71ad168Smrgthen :
94653544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9466b71ad168Smrgelse $as_nop
94673544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
94683544ea2eSmrgfi
9469b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
94703544ea2eSmrgfi
9471b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9472b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
94733544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
94743544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
94753544ea2eSmrgfi
94763544ea2eSmrg
94773544ea2eSmrgfound="no"
94783544ea2eSmrg
94793544ea2eSmrg	if test $found = "no" ; then
948095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
94813544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
94823544ea2eSmrg		fi
94833544ea2eSmrg
948495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
94853544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
94863544ea2eSmrg		fi
94873544ea2eSmrg
94883544ea2eSmrg		CFLAGS="$CFLAGS -Winit-self"
94893544ea2eSmrg
9490b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5
9491b71ad168Smrgprintf %s "checking if $CC supports -Winit-self... " >&6; }
94923544ea2eSmrg		cacheid=xorg_cv_cc_flag__Winit_self
9493b71ad168Smrg		if eval test \${$cacheid+y}
9494b71ad168Smrgthen :
9495b71ad168Smrg  printf %s "(cached) " >&6
9496b71ad168Smrgelse $as_nop
94973544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
94983544ea2eSmrg/* end confdefs.h.  */
94993544ea2eSmrgint i;
95003544ea2eSmrgint
9501b71ad168Smrgmain (void)
95023544ea2eSmrg{
95033544ea2eSmrg
95043544ea2eSmrg  ;
95053544ea2eSmrg  return 0;
95063544ea2eSmrg}
95073544ea2eSmrg_ACEOF
9508b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9509b71ad168Smrgthen :
95103544ea2eSmrg  eval $cacheid=yes
9511b71ad168Smrgelse $as_nop
95123544ea2eSmrg  eval $cacheid=no
95133544ea2eSmrgfi
9514b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
95153544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
95163544ea2eSmrgfi
95173544ea2eSmrg
95183544ea2eSmrg
95193544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
95203544ea2eSmrg
95213544ea2eSmrg		eval supported=\$$cacheid
9522b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9523b71ad168Smrgprintf "%s\n" "$supported" >&6; }
95243544ea2eSmrg		if test "$supported" = "yes" ; then
95253544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Winit-self"
95263544ea2eSmrg			found="yes"
95273544ea2eSmrg		fi
95283544ea2eSmrg	fi
95293544ea2eSmrg
95303544ea2eSmrg
95313544ea2eSmrg
95323544ea2eSmrg
95333544ea2eSmrg
95343544ea2eSmrg
95353544ea2eSmrg
95363544ea2eSmrg
95373544ea2eSmrg
95383544ea2eSmrg
95393544ea2eSmrg
95403544ea2eSmrg
95413544ea2eSmrg
95423544ea2eSmrg
95433544ea2eSmrg
95443544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
95453544ea2eSmrg
95463544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
95473544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9548b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9549b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9550b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9551b71ad168Smrgthen :
9552b71ad168Smrg  printf %s "(cached) " >&6
9553b71ad168Smrgelse $as_nop
95543544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
95553544ea2eSmrg/* end confdefs.h.  */
95563544ea2eSmrgint i;
95573544ea2eSmrg_ACEOF
9558b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9559b71ad168Smrgthen :
95603544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9561b71ad168Smrgelse $as_nop
95623544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
95633544ea2eSmrgfi
9564b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
95653544ea2eSmrgfi
9566b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9567b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
95683544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
95693544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
95703544ea2eSmrgfi
95713544ea2eSmrg
95723544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
95733544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
95743544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
95753544ea2eSmrg	fi
95763544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9577b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9578b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9579b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9580b71ad168Smrgthen :
9581b71ad168Smrg  printf %s "(cached) " >&6
9582b71ad168Smrgelse $as_nop
95833544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
95843544ea2eSmrg/* end confdefs.h.  */
95853544ea2eSmrgint i;
95863544ea2eSmrg_ACEOF
9587b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9588b71ad168Smrgthen :
95893544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9590b71ad168Smrgelse $as_nop
95913544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
95923544ea2eSmrgfi
9593b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
95943544ea2eSmrgfi
9595b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9596b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
95973544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
95983544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
95993544ea2eSmrgfi
96003544ea2eSmrg
96013544ea2eSmrgfound="no"
96023544ea2eSmrg
96033544ea2eSmrg	if test $found = "no" ; then
960495fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
96053544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
96063544ea2eSmrg		fi
96073544ea2eSmrg
960895fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
96093544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
96103544ea2eSmrg		fi
96113544ea2eSmrg
96123544ea2eSmrg		CFLAGS="$CFLAGS -Wmain"
96133544ea2eSmrg
9614b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5
9615b71ad168Smrgprintf %s "checking if $CC supports -Wmain... " >&6; }
96163544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wmain
9617b71ad168Smrg		if eval test \${$cacheid+y}
9618b71ad168Smrgthen :
9619b71ad168Smrg  printf %s "(cached) " >&6
9620b71ad168Smrgelse $as_nop
96213544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
96223544ea2eSmrg/* end confdefs.h.  */
96233544ea2eSmrgint i;
96243544ea2eSmrgint
9625b71ad168Smrgmain (void)
96263544ea2eSmrg{
96273544ea2eSmrg
96283544ea2eSmrg  ;
96293544ea2eSmrg  return 0;
96303544ea2eSmrg}
96313544ea2eSmrg_ACEOF
9632b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9633b71ad168Smrgthen :
96343544ea2eSmrg  eval $cacheid=yes
9635b71ad168Smrgelse $as_nop
96363544ea2eSmrg  eval $cacheid=no
96373544ea2eSmrgfi
9638b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
96393544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
96403544ea2eSmrgfi
96413544ea2eSmrg
96423544ea2eSmrg
96433544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
96443544ea2eSmrg
96453544ea2eSmrg		eval supported=\$$cacheid
9646b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9647b71ad168Smrgprintf "%s\n" "$supported" >&6; }
96483544ea2eSmrg		if test "$supported" = "yes" ; then
96493544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wmain"
96503544ea2eSmrg			found="yes"
96513544ea2eSmrg		fi
96523544ea2eSmrg	fi
96533544ea2eSmrg
96543544ea2eSmrg
96553544ea2eSmrg
96563544ea2eSmrg
96573544ea2eSmrg
96583544ea2eSmrg
96593544ea2eSmrg
96603544ea2eSmrg
96613544ea2eSmrg
96623544ea2eSmrg
96633544ea2eSmrg
96643544ea2eSmrg
96653544ea2eSmrg
96663544ea2eSmrg
96673544ea2eSmrg
96683544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
96693544ea2eSmrg
96703544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
96713544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9672b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9673b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9674b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9675b71ad168Smrgthen :
9676b71ad168Smrg  printf %s "(cached) " >&6
9677b71ad168Smrgelse $as_nop
96783544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
96793544ea2eSmrg/* end confdefs.h.  */
96803544ea2eSmrgint i;
96813544ea2eSmrg_ACEOF
9682b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9683b71ad168Smrgthen :
96843544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9685b71ad168Smrgelse $as_nop
96863544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
96873544ea2eSmrgfi
9688b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
96893544ea2eSmrgfi
9690b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9691b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
96923544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
96933544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
96943544ea2eSmrgfi
96953544ea2eSmrg
96963544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
96973544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
96983544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
96993544ea2eSmrg	fi
97003544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9701b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9702b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9703b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9704b71ad168Smrgthen :
9705b71ad168Smrg  printf %s "(cached) " >&6
9706b71ad168Smrgelse $as_nop
97073544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
97083544ea2eSmrg/* end confdefs.h.  */
97093544ea2eSmrgint i;
97103544ea2eSmrg_ACEOF
9711b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9712b71ad168Smrgthen :
97133544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9714b71ad168Smrgelse $as_nop
97153544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
97163544ea2eSmrgfi
9717b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
97183544ea2eSmrgfi
9719b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9720b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
97213544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
97223544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
97233544ea2eSmrgfi
97243544ea2eSmrg
97253544ea2eSmrgfound="no"
97263544ea2eSmrg
97273544ea2eSmrg	if test $found = "no" ; then
972895fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
97293544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
97303544ea2eSmrg		fi
97313544ea2eSmrg
973295fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
97333544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
97343544ea2eSmrg		fi
97353544ea2eSmrg
97363544ea2eSmrg		CFLAGS="$CFLAGS -Wmissing-braces"
97373544ea2eSmrg
9738b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5
9739b71ad168Smrgprintf %s "checking if $CC supports -Wmissing-braces... " >&6; }
97403544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wmissing_braces
9741b71ad168Smrg		if eval test \${$cacheid+y}
9742b71ad168Smrgthen :
9743b71ad168Smrg  printf %s "(cached) " >&6
9744b71ad168Smrgelse $as_nop
97453544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
97463544ea2eSmrg/* end confdefs.h.  */
97473544ea2eSmrgint i;
97483544ea2eSmrgint
9749b71ad168Smrgmain (void)
97503544ea2eSmrg{
97513544ea2eSmrg
97523544ea2eSmrg  ;
97533544ea2eSmrg  return 0;
97543544ea2eSmrg}
97553544ea2eSmrg_ACEOF
9756b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9757b71ad168Smrgthen :
97583544ea2eSmrg  eval $cacheid=yes
9759b71ad168Smrgelse $as_nop
97603544ea2eSmrg  eval $cacheid=no
97613544ea2eSmrgfi
9762b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
97633544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
97643544ea2eSmrgfi
97653544ea2eSmrg
97663544ea2eSmrg
97673544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
97683544ea2eSmrg
97693544ea2eSmrg		eval supported=\$$cacheid
9770b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9771b71ad168Smrgprintf "%s\n" "$supported" >&6; }
97723544ea2eSmrg		if test "$supported" = "yes" ; then
97733544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces"
97743544ea2eSmrg			found="yes"
97753544ea2eSmrg		fi
97763544ea2eSmrg	fi
97773544ea2eSmrg
97783544ea2eSmrg
97793544ea2eSmrg
97803544ea2eSmrg
97813544ea2eSmrg
97823544ea2eSmrg
97833544ea2eSmrg
97843544ea2eSmrg
97853544ea2eSmrg
97863544ea2eSmrg
97873544ea2eSmrg
97883544ea2eSmrg
97893544ea2eSmrg
97903544ea2eSmrg
97913544ea2eSmrg
97923544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
97933544ea2eSmrg
97943544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
97953544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9796b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9797b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9798b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9799b71ad168Smrgthen :
9800b71ad168Smrg  printf %s "(cached) " >&6
9801b71ad168Smrgelse $as_nop
98023544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98033544ea2eSmrg/* end confdefs.h.  */
98043544ea2eSmrgint i;
98053544ea2eSmrg_ACEOF
9806b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9807b71ad168Smrgthen :
98083544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9809b71ad168Smrgelse $as_nop
98103544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
98113544ea2eSmrgfi
9812b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
98133544ea2eSmrgfi
9814b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9815b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
98163544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
98173544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
98183544ea2eSmrgfi
98193544ea2eSmrg
98203544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
98213544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
98223544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
98233544ea2eSmrg	fi
98243544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9825b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9826b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9827b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9828b71ad168Smrgthen :
9829b71ad168Smrg  printf %s "(cached) " >&6
9830b71ad168Smrgelse $as_nop
98313544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98323544ea2eSmrg/* end confdefs.h.  */
98333544ea2eSmrgint i;
98343544ea2eSmrg_ACEOF
9835b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9836b71ad168Smrgthen :
98373544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9838b71ad168Smrgelse $as_nop
98393544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
98403544ea2eSmrgfi
9841b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
98423544ea2eSmrgfi
9843b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9844b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
98453544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
98463544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
98473544ea2eSmrgfi
98483544ea2eSmrg
98493544ea2eSmrgfound="no"
98503544ea2eSmrg
98513544ea2eSmrg	if test $found = "no" ; then
985295fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
98533544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
98543544ea2eSmrg		fi
98553544ea2eSmrg
985695fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
98573544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
98583544ea2eSmrg		fi
98593544ea2eSmrg
98603544ea2eSmrg		CFLAGS="$CFLAGS -Wsequence-point"
98613544ea2eSmrg
9862b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5
9863b71ad168Smrgprintf %s "checking if $CC supports -Wsequence-point... " >&6; }
98643544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wsequence_point
9865b71ad168Smrg		if eval test \${$cacheid+y}
9866b71ad168Smrgthen :
9867b71ad168Smrg  printf %s "(cached) " >&6
9868b71ad168Smrgelse $as_nop
98693544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
98703544ea2eSmrg/* end confdefs.h.  */
98713544ea2eSmrgint i;
98723544ea2eSmrgint
9873b71ad168Smrgmain (void)
98743544ea2eSmrg{
98753544ea2eSmrg
98763544ea2eSmrg  ;
98773544ea2eSmrg  return 0;
98783544ea2eSmrg}
98793544ea2eSmrg_ACEOF
9880b71ad168Smrgif ac_fn_c_try_link "$LINENO"
9881b71ad168Smrgthen :
98823544ea2eSmrg  eval $cacheid=yes
9883b71ad168Smrgelse $as_nop
98843544ea2eSmrg  eval $cacheid=no
98853544ea2eSmrgfi
9886b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
98873544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
98883544ea2eSmrgfi
98893544ea2eSmrg
98903544ea2eSmrg
98913544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
98923544ea2eSmrg
98933544ea2eSmrg		eval supported=\$$cacheid
9894b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
9895b71ad168Smrgprintf "%s\n" "$supported" >&6; }
98963544ea2eSmrg		if test "$supported" = "yes" ; then
98973544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point"
98983544ea2eSmrg			found="yes"
98993544ea2eSmrg		fi
99003544ea2eSmrg	fi
99013544ea2eSmrg
99023544ea2eSmrg
99033544ea2eSmrg
99043544ea2eSmrg
99053544ea2eSmrg
99063544ea2eSmrg
99073544ea2eSmrg
99083544ea2eSmrg
99093544ea2eSmrg
99103544ea2eSmrg
99113544ea2eSmrg
99123544ea2eSmrg
99133544ea2eSmrg
99143544ea2eSmrg
99153544ea2eSmrg
99163544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
99173544ea2eSmrg
99183544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
99193544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
9920b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
9921b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
9922b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
9923b71ad168Smrgthen :
9924b71ad168Smrg  printf %s "(cached) " >&6
9925b71ad168Smrgelse $as_nop
99263544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
99273544ea2eSmrg/* end confdefs.h.  */
99283544ea2eSmrgint i;
99293544ea2eSmrg_ACEOF
9930b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9931b71ad168Smrgthen :
99323544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
9933b71ad168Smrgelse $as_nop
99343544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
99353544ea2eSmrgfi
9936b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
99373544ea2eSmrgfi
9938b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
9939b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
99403544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
99413544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
99423544ea2eSmrgfi
99433544ea2eSmrg
99443544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
99453544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
99463544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
99473544ea2eSmrg	fi
99483544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
9949b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
9950b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
9951b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
9952b71ad168Smrgthen :
9953b71ad168Smrg  printf %s "(cached) " >&6
9954b71ad168Smrgelse $as_nop
99553544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
99563544ea2eSmrg/* end confdefs.h.  */
99573544ea2eSmrgint i;
99583544ea2eSmrg_ACEOF
9959b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
9960b71ad168Smrgthen :
99613544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
9962b71ad168Smrgelse $as_nop
99633544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
99643544ea2eSmrgfi
9965b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
99663544ea2eSmrgfi
9967b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
9968b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
99693544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
99703544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
99713544ea2eSmrgfi
99723544ea2eSmrg
99733544ea2eSmrgfound="no"
99743544ea2eSmrg
99753544ea2eSmrg	if test $found = "no" ; then
997695fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
99773544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
99783544ea2eSmrg		fi
99793544ea2eSmrg
998095fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
99813544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
99823544ea2eSmrg		fi
99833544ea2eSmrg
99843544ea2eSmrg		CFLAGS="$CFLAGS -Wreturn-type"
99853544ea2eSmrg
9986b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5
9987b71ad168Smrgprintf %s "checking if $CC supports -Wreturn-type... " >&6; }
99883544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wreturn_type
9989b71ad168Smrg		if eval test \${$cacheid+y}
9990b71ad168Smrgthen :
9991b71ad168Smrg  printf %s "(cached) " >&6
9992b71ad168Smrgelse $as_nop
99933544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
99943544ea2eSmrg/* end confdefs.h.  */
99953544ea2eSmrgint i;
99963544ea2eSmrgint
9997b71ad168Smrgmain (void)
99983544ea2eSmrg{
99993544ea2eSmrg
100003544ea2eSmrg  ;
100013544ea2eSmrg  return 0;
100023544ea2eSmrg}
100033544ea2eSmrg_ACEOF
10004b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10005b71ad168Smrgthen :
100063544ea2eSmrg  eval $cacheid=yes
10007b71ad168Smrgelse $as_nop
100083544ea2eSmrg  eval $cacheid=no
100093544ea2eSmrgfi
10010b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
100113544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
100123544ea2eSmrgfi
100133544ea2eSmrg
100143544ea2eSmrg
100153544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
100163544ea2eSmrg
100173544ea2eSmrg		eval supported=\$$cacheid
10018b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10019b71ad168Smrgprintf "%s\n" "$supported" >&6; }
100203544ea2eSmrg		if test "$supported" = "yes" ; then
100213544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type"
100223544ea2eSmrg			found="yes"
100233544ea2eSmrg		fi
100243544ea2eSmrg	fi
100253544ea2eSmrg
100263544ea2eSmrg
100273544ea2eSmrg
100283544ea2eSmrg
100293544ea2eSmrg
100303544ea2eSmrg
100313544ea2eSmrg
100323544ea2eSmrg
100333544ea2eSmrg
100343544ea2eSmrg
100353544ea2eSmrg
100363544ea2eSmrg
100373544ea2eSmrg
100383544ea2eSmrg
100393544ea2eSmrg
100403544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
100413544ea2eSmrg
100423544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
100433544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10044b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10045b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10046b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10047b71ad168Smrgthen :
10048b71ad168Smrg  printf %s "(cached) " >&6
10049b71ad168Smrgelse $as_nop
100503544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
100513544ea2eSmrg/* end confdefs.h.  */
100523544ea2eSmrgint i;
100533544ea2eSmrg_ACEOF
10054b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10055b71ad168Smrgthen :
100563544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10057b71ad168Smrgelse $as_nop
100583544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
100593544ea2eSmrgfi
10060b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
100613544ea2eSmrgfi
10062b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10063b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
100643544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
100653544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
100663544ea2eSmrgfi
100673544ea2eSmrg
100683544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
100693544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
100703544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
100713544ea2eSmrg	fi
100723544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10073b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10074b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10075b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10076b71ad168Smrgthen :
10077b71ad168Smrg  printf %s "(cached) " >&6
10078b71ad168Smrgelse $as_nop
100793544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
100803544ea2eSmrg/* end confdefs.h.  */
100813544ea2eSmrgint i;
100823544ea2eSmrg_ACEOF
10083b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10084b71ad168Smrgthen :
100853544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10086b71ad168Smrgelse $as_nop
100873544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
100883544ea2eSmrgfi
10089b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
100903544ea2eSmrgfi
10091b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10092b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
100933544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
100943544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
100953544ea2eSmrgfi
100963544ea2eSmrg
100973544ea2eSmrgfound="no"
100983544ea2eSmrg
100993544ea2eSmrg	if test $found = "no" ; then
1010095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
101013544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
101023544ea2eSmrg		fi
101033544ea2eSmrg
1010495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
101053544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
101063544ea2eSmrg		fi
101073544ea2eSmrg
101083544ea2eSmrg		CFLAGS="$CFLAGS -Wtrigraphs"
101093544ea2eSmrg
10110b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5
10111b71ad168Smrgprintf %s "checking if $CC supports -Wtrigraphs... " >&6; }
101123544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wtrigraphs
10113b71ad168Smrg		if eval test \${$cacheid+y}
10114b71ad168Smrgthen :
10115b71ad168Smrg  printf %s "(cached) " >&6
10116b71ad168Smrgelse $as_nop
101173544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
101183544ea2eSmrg/* end confdefs.h.  */
101193544ea2eSmrgint i;
101203544ea2eSmrgint
10121b71ad168Smrgmain (void)
101223544ea2eSmrg{
101233544ea2eSmrg
101243544ea2eSmrg  ;
101253544ea2eSmrg  return 0;
101263544ea2eSmrg}
101273544ea2eSmrg_ACEOF
10128b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10129b71ad168Smrgthen :
101303544ea2eSmrg  eval $cacheid=yes
10131b71ad168Smrgelse $as_nop
101323544ea2eSmrg  eval $cacheid=no
101333544ea2eSmrgfi
10134b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
101353544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
101363544ea2eSmrgfi
101373544ea2eSmrg
101383544ea2eSmrg
101393544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
101403544ea2eSmrg
101413544ea2eSmrg		eval supported=\$$cacheid
10142b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10143b71ad168Smrgprintf "%s\n" "$supported" >&6; }
101443544ea2eSmrg		if test "$supported" = "yes" ; then
101453544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs"
101463544ea2eSmrg			found="yes"
101473544ea2eSmrg		fi
101483544ea2eSmrg	fi
101493544ea2eSmrg
101503544ea2eSmrg
101513544ea2eSmrg
101523544ea2eSmrg
101533544ea2eSmrg
101543544ea2eSmrg
101553544ea2eSmrg
101563544ea2eSmrg
101573544ea2eSmrg
101583544ea2eSmrg
101593544ea2eSmrg
101603544ea2eSmrg
101613544ea2eSmrg
101623544ea2eSmrg
101633544ea2eSmrg
101643544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
101653544ea2eSmrg
101663544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
101673544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10168b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10169b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10170b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10171b71ad168Smrgthen :
10172b71ad168Smrg  printf %s "(cached) " >&6
10173b71ad168Smrgelse $as_nop
101743544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
101753544ea2eSmrg/* end confdefs.h.  */
101763544ea2eSmrgint i;
101773544ea2eSmrg_ACEOF
10178b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10179b71ad168Smrgthen :
101803544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10181b71ad168Smrgelse $as_nop
101823544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
101833544ea2eSmrgfi
10184b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
101853544ea2eSmrgfi
10186b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10187b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
101883544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
101893544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
101903544ea2eSmrgfi
101913544ea2eSmrg
101923544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
101933544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
101943544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
101953544ea2eSmrg	fi
101963544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10197b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10198b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10199b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10200b71ad168Smrgthen :
10201b71ad168Smrg  printf %s "(cached) " >&6
10202b71ad168Smrgelse $as_nop
102033544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
102043544ea2eSmrg/* end confdefs.h.  */
102053544ea2eSmrgint i;
102063544ea2eSmrg_ACEOF
10207b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10208b71ad168Smrgthen :
102093544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10210b71ad168Smrgelse $as_nop
102113544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
102123544ea2eSmrgfi
10213b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
102143544ea2eSmrgfi
10215b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10216b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
102173544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
102183544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
102193544ea2eSmrgfi
102203544ea2eSmrg
102213544ea2eSmrgfound="no"
102223544ea2eSmrg
102233544ea2eSmrg	if test $found = "no" ; then
1022495fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
102253544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
102263544ea2eSmrg		fi
102273544ea2eSmrg
1022895fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
102293544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
102303544ea2eSmrg		fi
102313544ea2eSmrg
102323544ea2eSmrg		CFLAGS="$CFLAGS -Warray-bounds"
102333544ea2eSmrg
10234b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5
10235b71ad168Smrgprintf %s "checking if $CC supports -Warray-bounds... " >&6; }
102363544ea2eSmrg		cacheid=xorg_cv_cc_flag__Warray_bounds
10237b71ad168Smrg		if eval test \${$cacheid+y}
10238b71ad168Smrgthen :
10239b71ad168Smrg  printf %s "(cached) " >&6
10240b71ad168Smrgelse $as_nop
102413544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
102423544ea2eSmrg/* end confdefs.h.  */
102433544ea2eSmrgint i;
102443544ea2eSmrgint
10245b71ad168Smrgmain (void)
102463544ea2eSmrg{
102473544ea2eSmrg
102483544ea2eSmrg  ;
102493544ea2eSmrg  return 0;
102503544ea2eSmrg}
102513544ea2eSmrg_ACEOF
10252b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10253b71ad168Smrgthen :
102543544ea2eSmrg  eval $cacheid=yes
10255b71ad168Smrgelse $as_nop
102563544ea2eSmrg  eval $cacheid=no
102573544ea2eSmrgfi
10258b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
102593544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
102603544ea2eSmrgfi
102613544ea2eSmrg
102623544ea2eSmrg
102633544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
102643544ea2eSmrg
102653544ea2eSmrg		eval supported=\$$cacheid
10266b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10267b71ad168Smrgprintf "%s\n" "$supported" >&6; }
102683544ea2eSmrg		if test "$supported" = "yes" ; then
102693544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds"
102703544ea2eSmrg			found="yes"
102713544ea2eSmrg		fi
102723544ea2eSmrg	fi
102733544ea2eSmrg
102743544ea2eSmrg
102753544ea2eSmrg
102763544ea2eSmrg
102773544ea2eSmrg
102783544ea2eSmrg
102793544ea2eSmrg
102803544ea2eSmrg
102813544ea2eSmrg
102823544ea2eSmrg
102833544ea2eSmrg
102843544ea2eSmrg
102853544ea2eSmrg
102863544ea2eSmrg
102873544ea2eSmrg
102883544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
102893544ea2eSmrg
102903544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
102913544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10292b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10293b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10294b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10295b71ad168Smrgthen :
10296b71ad168Smrg  printf %s "(cached) " >&6
10297b71ad168Smrgelse $as_nop
102983544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
102993544ea2eSmrg/* end confdefs.h.  */
103003544ea2eSmrgint i;
103013544ea2eSmrg_ACEOF
10302b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10303b71ad168Smrgthen :
103043544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10305b71ad168Smrgelse $as_nop
103063544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
103073544ea2eSmrgfi
10308b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
103093544ea2eSmrgfi
10310b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10311b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
103123544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
103133544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
103143544ea2eSmrgfi
103153544ea2eSmrg
103163544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
103173544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
103183544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
103193544ea2eSmrg	fi
103203544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10321b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10322b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10323b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10324b71ad168Smrgthen :
10325b71ad168Smrg  printf %s "(cached) " >&6
10326b71ad168Smrgelse $as_nop
103273544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
103283544ea2eSmrg/* end confdefs.h.  */
103293544ea2eSmrgint i;
103303544ea2eSmrg_ACEOF
10331b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10332b71ad168Smrgthen :
103333544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10334b71ad168Smrgelse $as_nop
103353544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
103363544ea2eSmrgfi
10337b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
103383544ea2eSmrgfi
10339b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10340b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
103413544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
103423544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
103433544ea2eSmrgfi
103443544ea2eSmrg
103453544ea2eSmrgfound="no"
103463544ea2eSmrg
103473544ea2eSmrg	if test $found = "no" ; then
1034895fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
103493544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
103503544ea2eSmrg		fi
103513544ea2eSmrg
1035295fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
103533544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
103543544ea2eSmrg		fi
103553544ea2eSmrg
103563544ea2eSmrg		CFLAGS="$CFLAGS -Wwrite-strings"
103573544ea2eSmrg
10358b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5
10359b71ad168Smrgprintf %s "checking if $CC supports -Wwrite-strings... " >&6; }
103603544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wwrite_strings
10361b71ad168Smrg		if eval test \${$cacheid+y}
10362b71ad168Smrgthen :
10363b71ad168Smrg  printf %s "(cached) " >&6
10364b71ad168Smrgelse $as_nop
103653544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
103663544ea2eSmrg/* end confdefs.h.  */
103673544ea2eSmrgint i;
103683544ea2eSmrgint
10369b71ad168Smrgmain (void)
103703544ea2eSmrg{
103713544ea2eSmrg
103723544ea2eSmrg  ;
103733544ea2eSmrg  return 0;
103743544ea2eSmrg}
103753544ea2eSmrg_ACEOF
10376b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10377b71ad168Smrgthen :
103783544ea2eSmrg  eval $cacheid=yes
10379b71ad168Smrgelse $as_nop
103803544ea2eSmrg  eval $cacheid=no
103813544ea2eSmrgfi
10382b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
103833544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
103843544ea2eSmrgfi
103853544ea2eSmrg
103863544ea2eSmrg
103873544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
103883544ea2eSmrg
103893544ea2eSmrg		eval supported=\$$cacheid
10390b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10391b71ad168Smrgprintf "%s\n" "$supported" >&6; }
103923544ea2eSmrg		if test "$supported" = "yes" ; then
103933544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings"
103943544ea2eSmrg			found="yes"
103953544ea2eSmrg		fi
103963544ea2eSmrg	fi
103973544ea2eSmrg
103983544ea2eSmrg
103993544ea2eSmrg
104003544ea2eSmrg
104013544ea2eSmrg
104023544ea2eSmrg
104033544ea2eSmrg
104043544ea2eSmrg
104053544ea2eSmrg
104063544ea2eSmrg
104073544ea2eSmrg
104083544ea2eSmrg
104093544ea2eSmrg
104103544ea2eSmrg
104113544ea2eSmrg
104123544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
104133544ea2eSmrg
104143544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
104153544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10416b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10417b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10418b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10419b71ad168Smrgthen :
10420b71ad168Smrg  printf %s "(cached) " >&6
10421b71ad168Smrgelse $as_nop
104223544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
104233544ea2eSmrg/* end confdefs.h.  */
104243544ea2eSmrgint i;
104253544ea2eSmrg_ACEOF
10426b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10427b71ad168Smrgthen :
104283544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10429b71ad168Smrgelse $as_nop
104303544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
104313544ea2eSmrgfi
10432b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
104333544ea2eSmrgfi
10434b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10435b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
104363544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
104373544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
104383544ea2eSmrgfi
104393544ea2eSmrg
104403544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
104413544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
104423544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
104433544ea2eSmrg	fi
104443544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10445b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10446b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10447b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10448b71ad168Smrgthen :
10449b71ad168Smrg  printf %s "(cached) " >&6
10450b71ad168Smrgelse $as_nop
104513544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
104523544ea2eSmrg/* end confdefs.h.  */
104533544ea2eSmrgint i;
104543544ea2eSmrg_ACEOF
10455b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10456b71ad168Smrgthen :
104573544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10458b71ad168Smrgelse $as_nop
104593544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
104603544ea2eSmrgfi
10461b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
104623544ea2eSmrgfi
10463b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10464b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
104653544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
104663544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
104673544ea2eSmrgfi
104683544ea2eSmrg
104693544ea2eSmrgfound="no"
104703544ea2eSmrg
104713544ea2eSmrg	if test $found = "no" ; then
1047295fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
104733544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
104743544ea2eSmrg		fi
104753544ea2eSmrg
1047695fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
104773544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
104783544ea2eSmrg		fi
104793544ea2eSmrg
104803544ea2eSmrg		CFLAGS="$CFLAGS -Waddress"
104813544ea2eSmrg
10482b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5
10483b71ad168Smrgprintf %s "checking if $CC supports -Waddress... " >&6; }
104843544ea2eSmrg		cacheid=xorg_cv_cc_flag__Waddress
10485b71ad168Smrg		if eval test \${$cacheid+y}
10486b71ad168Smrgthen :
10487b71ad168Smrg  printf %s "(cached) " >&6
10488b71ad168Smrgelse $as_nop
104893544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
104903544ea2eSmrg/* end confdefs.h.  */
104913544ea2eSmrgint i;
104923544ea2eSmrgint
10493b71ad168Smrgmain (void)
104943544ea2eSmrg{
104953544ea2eSmrg
104963544ea2eSmrg  ;
104973544ea2eSmrg  return 0;
104983544ea2eSmrg}
104993544ea2eSmrg_ACEOF
10500b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10501b71ad168Smrgthen :
105023544ea2eSmrg  eval $cacheid=yes
10503b71ad168Smrgelse $as_nop
105043544ea2eSmrg  eval $cacheid=no
105053544ea2eSmrgfi
10506b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
105073544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
105083544ea2eSmrgfi
105093544ea2eSmrg
105103544ea2eSmrg
105113544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
105123544ea2eSmrg
105133544ea2eSmrg		eval supported=\$$cacheid
10514b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10515b71ad168Smrgprintf "%s\n" "$supported" >&6; }
105163544ea2eSmrg		if test "$supported" = "yes" ; then
105173544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Waddress"
105183544ea2eSmrg			found="yes"
105193544ea2eSmrg		fi
105203544ea2eSmrg	fi
105213544ea2eSmrg
105223544ea2eSmrg
105233544ea2eSmrg
105243544ea2eSmrg
105253544ea2eSmrg
105263544ea2eSmrg
105273544ea2eSmrg
105283544ea2eSmrg
105293544ea2eSmrg
105303544ea2eSmrg
105313544ea2eSmrg
105323544ea2eSmrg
105333544ea2eSmrg
105343544ea2eSmrg
105353544ea2eSmrg
105363544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
105373544ea2eSmrg
105383544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
105393544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10540b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10541b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10542b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10543b71ad168Smrgthen :
10544b71ad168Smrg  printf %s "(cached) " >&6
10545b71ad168Smrgelse $as_nop
105463544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
105473544ea2eSmrg/* end confdefs.h.  */
105483544ea2eSmrgint i;
105493544ea2eSmrg_ACEOF
10550b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10551b71ad168Smrgthen :
105523544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10553b71ad168Smrgelse $as_nop
105543544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
105553544ea2eSmrgfi
10556b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
105573544ea2eSmrgfi
10558b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10559b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
105603544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
105613544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
105623544ea2eSmrgfi
105633544ea2eSmrg
105643544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
105653544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
105663544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
105673544ea2eSmrg	fi
105683544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10569b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10570b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10571b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10572b71ad168Smrgthen :
10573b71ad168Smrg  printf %s "(cached) " >&6
10574b71ad168Smrgelse $as_nop
105753544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
105763544ea2eSmrg/* end confdefs.h.  */
105773544ea2eSmrgint i;
105783544ea2eSmrg_ACEOF
10579b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10580b71ad168Smrgthen :
105813544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10582b71ad168Smrgelse $as_nop
105833544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
105843544ea2eSmrgfi
10585b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
105863544ea2eSmrgfi
10587b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10588b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
105893544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
105903544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
105913544ea2eSmrgfi
105923544ea2eSmrg
105933544ea2eSmrgfound="no"
105943544ea2eSmrg
105953544ea2eSmrg	if test $found = "no" ; then
1059695fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
105973544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
105983544ea2eSmrg		fi
105993544ea2eSmrg
1060095fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
106013544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
106023544ea2eSmrg		fi
106033544ea2eSmrg
106043544ea2eSmrg		CFLAGS="$CFLAGS -Wint-to-pointer-cast"
106053544ea2eSmrg
10606b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5
10607b71ad168Smrgprintf %s "checking if $CC supports -Wint-to-pointer-cast... " >&6; }
106083544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast
10609b71ad168Smrg		if eval test \${$cacheid+y}
10610b71ad168Smrgthen :
10611b71ad168Smrg  printf %s "(cached) " >&6
10612b71ad168Smrgelse $as_nop
106133544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
106143544ea2eSmrg/* end confdefs.h.  */
106153544ea2eSmrgint i;
106163544ea2eSmrgint
10617b71ad168Smrgmain (void)
106183544ea2eSmrg{
106193544ea2eSmrg
106203544ea2eSmrg  ;
106213544ea2eSmrg  return 0;
106223544ea2eSmrg}
106233544ea2eSmrg_ACEOF
10624b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10625b71ad168Smrgthen :
106263544ea2eSmrg  eval $cacheid=yes
10627b71ad168Smrgelse $as_nop
106283544ea2eSmrg  eval $cacheid=no
106293544ea2eSmrgfi
10630b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
106313544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
106323544ea2eSmrgfi
106333544ea2eSmrg
106343544ea2eSmrg
106353544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
106363544ea2eSmrg
106373544ea2eSmrg		eval supported=\$$cacheid
10638b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10639b71ad168Smrgprintf "%s\n" "$supported" >&6; }
106403544ea2eSmrg		if test "$supported" = "yes" ; then
106413544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast"
106423544ea2eSmrg			found="yes"
106433544ea2eSmrg		fi
106443544ea2eSmrg	fi
106453544ea2eSmrg
106463544ea2eSmrg
106473544ea2eSmrg
106483544ea2eSmrg
106493544ea2eSmrg
106503544ea2eSmrg
106513544ea2eSmrg
106523544ea2eSmrg
106533544ea2eSmrg
106543544ea2eSmrg
106553544ea2eSmrg
106563544ea2eSmrg
106573544ea2eSmrg
106583544ea2eSmrg
106593544ea2eSmrg
106603544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
106613544ea2eSmrg
106623544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
106633544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10664b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10665b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10666b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10667b71ad168Smrgthen :
10668b71ad168Smrg  printf %s "(cached) " >&6
10669b71ad168Smrgelse $as_nop
106703544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
106713544ea2eSmrg/* end confdefs.h.  */
106723544ea2eSmrgint i;
106733544ea2eSmrg_ACEOF
10674b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10675b71ad168Smrgthen :
106763544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10677b71ad168Smrgelse $as_nop
106783544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
106793544ea2eSmrgfi
10680b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
106813544ea2eSmrgfi
10682b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10683b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
106843544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
106853544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
106863544ea2eSmrgfi
106873544ea2eSmrg
106883544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
106893544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
106903544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
106913544ea2eSmrg	fi
106923544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10693b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10694b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10695b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10696b71ad168Smrgthen :
10697b71ad168Smrg  printf %s "(cached) " >&6
10698b71ad168Smrgelse $as_nop
106993544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
107003544ea2eSmrg/* end confdefs.h.  */
107013544ea2eSmrgint i;
107023544ea2eSmrg_ACEOF
10703b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10704b71ad168Smrgthen :
107053544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10706b71ad168Smrgelse $as_nop
107073544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
107083544ea2eSmrgfi
10709b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
107103544ea2eSmrgfi
10711b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10712b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
107133544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
107143544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
107153544ea2eSmrgfi
107163544ea2eSmrg
107173544ea2eSmrgfound="no"
107183544ea2eSmrg
107193544ea2eSmrg	if test $found = "no" ; then
1072095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
107213544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
107223544ea2eSmrg		fi
107233544ea2eSmrg
1072495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
107253544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
107263544ea2eSmrg		fi
107273544ea2eSmrg
107283544ea2eSmrg		CFLAGS="$CFLAGS -Wpointer-to-int-cast"
107293544ea2eSmrg
10730b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5
10731b71ad168Smrgprintf %s "checking if $CC supports -Wpointer-to-int-cast... " >&6; }
107323544ea2eSmrg		cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast
10733b71ad168Smrg		if eval test \${$cacheid+y}
10734b71ad168Smrgthen :
10735b71ad168Smrg  printf %s "(cached) " >&6
10736b71ad168Smrgelse $as_nop
107373544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
107383544ea2eSmrg/* end confdefs.h.  */
107393544ea2eSmrgint i;
107403544ea2eSmrgint
10741b71ad168Smrgmain (void)
107423544ea2eSmrg{
107433544ea2eSmrg
107443544ea2eSmrg  ;
107453544ea2eSmrg  return 0;
107463544ea2eSmrg}
107473544ea2eSmrg_ACEOF
10748b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10749b71ad168Smrgthen :
107503544ea2eSmrg  eval $cacheid=yes
10751b71ad168Smrgelse $as_nop
107523544ea2eSmrg  eval $cacheid=no
107533544ea2eSmrgfi
10754b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
107553544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
107563544ea2eSmrgfi
107573544ea2eSmrg
107583544ea2eSmrg
107593544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
107603544ea2eSmrg
107613544ea2eSmrg		eval supported=\$$cacheid
10762b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10763b71ad168Smrgprintf "%s\n" "$supported" >&6; }
107643544ea2eSmrg		if test "$supported" = "yes" ; then
107653544ea2eSmrg			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast"
107663544ea2eSmrg			found="yes"
107673544ea2eSmrg		fi
107683544ea2eSmrg	fi
107693544ea2eSmrg
107703544ea2eSmrg
107713544ea2eSmrgfi
107723544ea2eSmrg
107733544ea2eSmrg
107743544ea2eSmrg
107753544ea2eSmrg
107763544ea2eSmrg
107773544ea2eSmrg
107783544ea2eSmrg
107793544ea2eSmrg		CWARNFLAGS="$BASE_CFLAGS"
107803544ea2eSmrg		if  test "x$GCC" = xyes ; then
107813544ea2eSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
107823544ea2eSmrg		fi
107833544ea2eSmrg
107843544ea2eSmrg
107853544ea2eSmrg
107863544ea2eSmrg
107873544ea2eSmrg
107883544ea2eSmrg
107893544ea2eSmrg
107903544ea2eSmrg
107913544ea2eSmrg# Check whether --enable-strict-compilation was given.
10792b71ad168Smrgif test ${enable_strict_compilation+y}
10793b71ad168Smrgthen :
107943544ea2eSmrg  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
10795b71ad168Smrgelse $as_nop
107963544ea2eSmrg  STRICT_COMPILE=no
107973544ea2eSmrgfi
107983544ea2eSmrg
107993544ea2eSmrg
108003544ea2eSmrg
108013544ea2eSmrg
108023544ea2eSmrg
108033544ea2eSmrg
108043544ea2eSmrgSTRICT_CFLAGS=""
108053544ea2eSmrg
108063544ea2eSmrg
108073544ea2eSmrg
108083544ea2eSmrg
108093544ea2eSmrg
108103544ea2eSmrg
108113544ea2eSmrg
108123544ea2eSmrg
108133544ea2eSmrg
108143544ea2eSmrg
108153544ea2eSmrg
108163544ea2eSmrg
108173544ea2eSmrg
108183544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
108193544ea2eSmrg
108203544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
108213544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10822b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10823b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10824b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10825b71ad168Smrgthen :
10826b71ad168Smrg  printf %s "(cached) " >&6
10827b71ad168Smrgelse $as_nop
108283544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
108293544ea2eSmrg/* end confdefs.h.  */
108303544ea2eSmrgint i;
108313544ea2eSmrg_ACEOF
10832b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10833b71ad168Smrgthen :
108343544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10835b71ad168Smrgelse $as_nop
108363544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
108373544ea2eSmrgfi
10838b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
108393544ea2eSmrgfi
10840b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10841b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
108423544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
108433544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
108443544ea2eSmrgfi
108453544ea2eSmrg
108463544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
108473544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
108483544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
108493544ea2eSmrg	fi
108503544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10851b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10852b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10853b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10854b71ad168Smrgthen :
10855b71ad168Smrg  printf %s "(cached) " >&6
10856b71ad168Smrgelse $as_nop
108573544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
108583544ea2eSmrg/* end confdefs.h.  */
108593544ea2eSmrgint i;
108603544ea2eSmrg_ACEOF
10861b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10862b71ad168Smrgthen :
108633544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10864b71ad168Smrgelse $as_nop
108653544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
108663544ea2eSmrgfi
10867b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
108683544ea2eSmrgfi
10869b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10870b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
108713544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
108723544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
108733544ea2eSmrgfi
108743544ea2eSmrg
108753544ea2eSmrgfound="no"
108763544ea2eSmrg
108773544ea2eSmrg	if test $found = "no" ; then
1087895fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
108793544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
108803544ea2eSmrg		fi
108813544ea2eSmrg
1088295fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
108833544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
108843544ea2eSmrg		fi
108853544ea2eSmrg
108863544ea2eSmrg		CFLAGS="$CFLAGS -pedantic"
108873544ea2eSmrg
10888b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5
10889b71ad168Smrgprintf %s "checking if $CC supports -pedantic... " >&6; }
108903544ea2eSmrg		cacheid=xorg_cv_cc_flag__pedantic
10891b71ad168Smrg		if eval test \${$cacheid+y}
10892b71ad168Smrgthen :
10893b71ad168Smrg  printf %s "(cached) " >&6
10894b71ad168Smrgelse $as_nop
108953544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
108963544ea2eSmrg/* end confdefs.h.  */
108973544ea2eSmrgint i;
108983544ea2eSmrgint
10899b71ad168Smrgmain (void)
109003544ea2eSmrg{
109013544ea2eSmrg
109023544ea2eSmrg  ;
109033544ea2eSmrg  return 0;
109043544ea2eSmrg}
109053544ea2eSmrg_ACEOF
10906b71ad168Smrgif ac_fn_c_try_link "$LINENO"
10907b71ad168Smrgthen :
109083544ea2eSmrg  eval $cacheid=yes
10909b71ad168Smrgelse $as_nop
109103544ea2eSmrg  eval $cacheid=no
109113544ea2eSmrgfi
10912b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
109133544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
109143544ea2eSmrgfi
109153544ea2eSmrg
109163544ea2eSmrg
109173544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
109183544ea2eSmrg
109193544ea2eSmrg		eval supported=\$$cacheid
10920b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
10921b71ad168Smrgprintf "%s\n" "$supported" >&6; }
109223544ea2eSmrg		if test "$supported" = "yes" ; then
109233544ea2eSmrg			STRICT_CFLAGS="$STRICT_CFLAGS -pedantic"
109243544ea2eSmrg			found="yes"
109253544ea2eSmrg		fi
109263544ea2eSmrg	fi
109273544ea2eSmrg
109283544ea2eSmrg
109293544ea2eSmrg
109303544ea2eSmrg
109313544ea2eSmrg
109323544ea2eSmrg
109333544ea2eSmrg
109343544ea2eSmrg
109353544ea2eSmrg
109363544ea2eSmrg
109373544ea2eSmrg
109383544ea2eSmrg
109393544ea2eSmrg
109403544ea2eSmrg
109413544ea2eSmrg
109423544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
109433544ea2eSmrg
109443544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
109453544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
10946b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
10947b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
10948b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
10949b71ad168Smrgthen :
10950b71ad168Smrg  printf %s "(cached) " >&6
10951b71ad168Smrgelse $as_nop
109523544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
109533544ea2eSmrg/* end confdefs.h.  */
109543544ea2eSmrgint i;
109553544ea2eSmrg_ACEOF
10956b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10957b71ad168Smrgthen :
109583544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
10959b71ad168Smrgelse $as_nop
109603544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
109613544ea2eSmrgfi
10962b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
109633544ea2eSmrgfi
10964b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
10965b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
109663544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
109673544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
109683544ea2eSmrgfi
109693544ea2eSmrg
109703544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
109713544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
109723544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
109733544ea2eSmrg	fi
109743544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
10975b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
10976b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
10977b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
10978b71ad168Smrgthen :
10979b71ad168Smrg  printf %s "(cached) " >&6
10980b71ad168Smrgelse $as_nop
109813544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
109823544ea2eSmrg/* end confdefs.h.  */
109833544ea2eSmrgint i;
109843544ea2eSmrg_ACEOF
10985b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
10986b71ad168Smrgthen :
109873544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
10988b71ad168Smrgelse $as_nop
109893544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
109903544ea2eSmrgfi
10991b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
109923544ea2eSmrgfi
10993b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
10994b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
109953544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
109963544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
109973544ea2eSmrgfi
109983544ea2eSmrg
109993544ea2eSmrgfound="no"
110003544ea2eSmrg
110013544ea2eSmrg	if test $found = "no" ; then
1100295fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
110033544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
110043544ea2eSmrg		fi
110053544ea2eSmrg
1100695fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
110073544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
110083544ea2eSmrg		fi
110093544ea2eSmrg
110103544ea2eSmrg		CFLAGS="$CFLAGS -Werror"
110113544ea2eSmrg
11012b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
11013b71ad168Smrgprintf %s "checking if $CC supports -Werror... " >&6; }
110143544ea2eSmrg		cacheid=xorg_cv_cc_flag__Werror
11015b71ad168Smrg		if eval test \${$cacheid+y}
11016b71ad168Smrgthen :
11017b71ad168Smrg  printf %s "(cached) " >&6
11018b71ad168Smrgelse $as_nop
110193544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
110203544ea2eSmrg/* end confdefs.h.  */
110213544ea2eSmrgint i;
110223544ea2eSmrgint
11023b71ad168Smrgmain (void)
110243544ea2eSmrg{
110253544ea2eSmrg
110263544ea2eSmrg  ;
110273544ea2eSmrg  return 0;
110283544ea2eSmrg}
110293544ea2eSmrg_ACEOF
11030b71ad168Smrgif ac_fn_c_try_link "$LINENO"
11031b71ad168Smrgthen :
110323544ea2eSmrg  eval $cacheid=yes
11033b71ad168Smrgelse $as_nop
110343544ea2eSmrg  eval $cacheid=no
110353544ea2eSmrgfi
11036b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
110373544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
110383544ea2eSmrgfi
110393544ea2eSmrg
110403544ea2eSmrg
110413544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
110423544ea2eSmrg
110433544ea2eSmrg		eval supported=\$$cacheid
11044b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
11045b71ad168Smrgprintf "%s\n" "$supported" >&6; }
110463544ea2eSmrg		if test "$supported" = "yes" ; then
110473544ea2eSmrg			STRICT_CFLAGS="$STRICT_CFLAGS -Werror"
110483544ea2eSmrg			found="yes"
110493544ea2eSmrg		fi
110503544ea2eSmrg	fi
110513544ea2eSmrg
110523544ea2eSmrg	if test $found = "no" ; then
1105395fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
110543544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
110553544ea2eSmrg		fi
110563544ea2eSmrg
1105795fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
110583544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
110593544ea2eSmrg		fi
110603544ea2eSmrg
110613544ea2eSmrg		CFLAGS="$CFLAGS -errwarn"
110623544ea2eSmrg
11063b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5
11064b71ad168Smrgprintf %s "checking if $CC supports -errwarn... " >&6; }
110653544ea2eSmrg		cacheid=xorg_cv_cc_flag__errwarn
11066b71ad168Smrg		if eval test \${$cacheid+y}
11067b71ad168Smrgthen :
11068b71ad168Smrg  printf %s "(cached) " >&6
11069b71ad168Smrgelse $as_nop
110703544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
110713544ea2eSmrg/* end confdefs.h.  */
110723544ea2eSmrgint i;
110733544ea2eSmrgint
11074b71ad168Smrgmain (void)
110753544ea2eSmrg{
110763544ea2eSmrg
110773544ea2eSmrg  ;
110783544ea2eSmrg  return 0;
110793544ea2eSmrg}
110803544ea2eSmrg_ACEOF
11081b71ad168Smrgif ac_fn_c_try_link "$LINENO"
11082b71ad168Smrgthen :
110833544ea2eSmrg  eval $cacheid=yes
11084b71ad168Smrgelse $as_nop
110853544ea2eSmrg  eval $cacheid=no
110863544ea2eSmrgfi
11087b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
110883544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
110893544ea2eSmrgfi
110903544ea2eSmrg
110913544ea2eSmrg
110923544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
110933544ea2eSmrg
110943544ea2eSmrg		eval supported=\$$cacheid
11095b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
11096b71ad168Smrgprintf "%s\n" "$supported" >&6; }
110973544ea2eSmrg		if test "$supported" = "yes" ; then
110983544ea2eSmrg			STRICT_CFLAGS="$STRICT_CFLAGS -errwarn"
110993544ea2eSmrg			found="yes"
111003544ea2eSmrg		fi
111013544ea2eSmrg	fi
111023544ea2eSmrg
111033544ea2eSmrg
111043544ea2eSmrg
111053544ea2eSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
111063544ea2eSmrg# activate it with -Werror, so we add it here explicitly.
111073544ea2eSmrg
111083544ea2eSmrg
111093544ea2eSmrg
111103544ea2eSmrg
111113544ea2eSmrg
111123544ea2eSmrg
111133544ea2eSmrg
111143544ea2eSmrg
111153544ea2eSmrg
111163544ea2eSmrg
111173544ea2eSmrg
111183544ea2eSmrg
111193544ea2eSmrg
111203544ea2eSmrgxorg_testset_save_CFLAGS="$CFLAGS"
111213544ea2eSmrg
111223544ea2eSmrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
111233544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
11124b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
11125b71ad168Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
11126b71ad168Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
11127b71ad168Smrgthen :
11128b71ad168Smrg  printf %s "(cached) " >&6
11129b71ad168Smrgelse $as_nop
111303544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
111313544ea2eSmrg/* end confdefs.h.  */
111323544ea2eSmrgint i;
111333544ea2eSmrg_ACEOF
11134b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
11135b71ad168Smrgthen :
111363544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=yes
11137b71ad168Smrgelse $as_nop
111383544ea2eSmrg  xorg_cv_cc_flag_unknown_warning_option=no
111393544ea2eSmrgfi
11140b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
111413544ea2eSmrgfi
11142b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
11143b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
111443544ea2eSmrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
111453544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
111463544ea2eSmrgfi
111473544ea2eSmrg
111483544ea2eSmrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
111493544ea2eSmrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
111503544ea2eSmrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
111513544ea2eSmrg	fi
111523544ea2eSmrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
11153b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
11154b71ad168Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
11155b71ad168Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
11156b71ad168Smrgthen :
11157b71ad168Smrg  printf %s "(cached) " >&6
11158b71ad168Smrgelse $as_nop
111593544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
111603544ea2eSmrg/* end confdefs.h.  */
111613544ea2eSmrgint i;
111623544ea2eSmrg_ACEOF
11163b71ad168Smrgif ac_fn_c_try_compile "$LINENO"
11164b71ad168Smrgthen :
111653544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=yes
11166b71ad168Smrgelse $as_nop
111673544ea2eSmrg  xorg_cv_cc_flag_unused_command_line_argument=no
111683544ea2eSmrgfi
11169b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
111703544ea2eSmrgfi
11171b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
11172b71ad168Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
111733544ea2eSmrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
111743544ea2eSmrg	CFLAGS="$xorg_testset_save_CFLAGS"
111753544ea2eSmrgfi
111763544ea2eSmrg
111773544ea2eSmrgfound="no"
111783544ea2eSmrg
111793544ea2eSmrg	if test $found = "no" ; then
1118095fdd44cSmrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
111813544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
111823544ea2eSmrg		fi
111833544ea2eSmrg
1118495fdd44cSmrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
111853544ea2eSmrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
111863544ea2eSmrg		fi
111873544ea2eSmrg
111883544ea2eSmrg		CFLAGS="$CFLAGS -Werror=attributes"
111893544ea2eSmrg
11190b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5
11191b71ad168Smrgprintf %s "checking if $CC supports -Werror=attributes... " >&6; }
1119295fdd44cSmrg		cacheid=xorg_cv_cc_flag__Werror_attributes
11193b71ad168Smrg		if eval test \${$cacheid+y}
11194b71ad168Smrgthen :
11195b71ad168Smrg  printf %s "(cached) " >&6
11196b71ad168Smrgelse $as_nop
111973544ea2eSmrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
111983544ea2eSmrg/* end confdefs.h.  */
111993544ea2eSmrgint i;
112003544ea2eSmrgint
11201b71ad168Smrgmain (void)
112023544ea2eSmrg{
112033544ea2eSmrg
112043544ea2eSmrg  ;
112053544ea2eSmrg  return 0;
112063544ea2eSmrg}
112073544ea2eSmrg_ACEOF
11208b71ad168Smrgif ac_fn_c_try_link "$LINENO"
11209b71ad168Smrgthen :
112103544ea2eSmrg  eval $cacheid=yes
11211b71ad168Smrgelse $as_nop
112123544ea2eSmrg  eval $cacheid=no
112133544ea2eSmrgfi
11214b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
112153544ea2eSmrg    conftest$ac_exeext conftest.$ac_ext
112163544ea2eSmrgfi
112173544ea2eSmrg
112183544ea2eSmrg
112193544ea2eSmrg		CFLAGS="$xorg_testset_save_CFLAGS"
112203544ea2eSmrg
112213544ea2eSmrg		eval supported=\$$cacheid
11222b71ad168Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
11223b71ad168Smrgprintf "%s\n" "$supported" >&6; }
112243544ea2eSmrg		if test "$supported" = "yes" ; then
112253544ea2eSmrg			STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
112263544ea2eSmrg			found="yes"
112273544ea2eSmrg		fi
112283544ea2eSmrg	fi
112293544ea2eSmrg
112303544ea2eSmrg
112313544ea2eSmrg
112323544ea2eSmrgif test "x$STRICT_COMPILE" = "xyes"; then
112333544ea2eSmrg    BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
112343544ea2eSmrg    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
112353544ea2eSmrgfi
112363544ea2eSmrg
112373544ea2eSmrg
112383544ea2eSmrg
112393544ea2eSmrg
112403544ea2eSmrg
112413544ea2eSmrg
112423544ea2eSmrgcat >>confdefs.h <<_ACEOF
112433544ea2eSmrg#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
112443544ea2eSmrg_ACEOF
112453544ea2eSmrg
112463544ea2eSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
112473544ea2eSmrg	if test "x$PVM" = "x"; then
112483544ea2eSmrg		PVM="0"
112493544ea2eSmrg	fi
112503544ea2eSmrg
11251b71ad168Smrgprintf "%s\n" "#define PACKAGE_VERSION_MINOR $PVM" >>confdefs.h
112523544ea2eSmrg
112533544ea2eSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
112543544ea2eSmrg	if test "x$PVP" = "x"; then
112553544ea2eSmrg		PVP="0"
112563544ea2eSmrg	fi
112573544ea2eSmrg
11258b71ad168Smrgprintf "%s\n" "#define PACKAGE_VERSION_PATCHLEVEL $PVP" >>confdefs.h
112593544ea2eSmrg
112603544ea2eSmrg
112613544ea2eSmrg
11262b71ad168SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
112633544ea2eSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11264b71ad168Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
11265b71ad168Smrgtouch \$(top_srcdir)/ChangeLog; \
11266b71ad168Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
112673544ea2eSmrg
112683544ea2eSmrg
112693544ea2eSmrg
112703544ea2eSmrg
112713544ea2eSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
112723544ea2eSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
112733544ea2eSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11274b71ad168Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
11275b71ad168Smrgtouch \$(top_srcdir)/INSTALL; \
11276b71ad168Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
112773544ea2eSmrg
112783544ea2eSmrg
112793544ea2eSmrg
112803544ea2eSmrg
112813544ea2eSmrg
112823544ea2eSmrg
11283b71ad168Smrgcase $host_os in
11284b71ad168Smrg    solaris*)
11285b71ad168Smrg        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
11286b71ad168Smrg        # check for a man page file found in later versions that use
11287b71ad168Smrg        # traditional section numbers instead
11288b71ad168Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5
11289b71ad168Smrgprintf %s "checking for /usr/share/man/man7/attributes.7... " >&6; }
11290b71ad168Smrgif test ${ac_cv_file__usr_share_man_man7_attributes_7+y}
11291b71ad168Smrgthen :
11292b71ad168Smrg  printf %s "(cached) " >&6
11293b71ad168Smrgelse $as_nop
11294b71ad168Smrg  test "$cross_compiling" = yes &&
11295b71ad168Smrg  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
11296b71ad168Smrgif test -r "/usr/share/man/man7/attributes.7"; then
11297b71ad168Smrg  ac_cv_file__usr_share_man_man7_attributes_7=yes
11298b71ad168Smrgelse
11299b71ad168Smrg  ac_cv_file__usr_share_man_man7_attributes_7=no
11300b71ad168Smrgfi
11301b71ad168Smrgfi
11302b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5
11303b71ad168Smrgprintf "%s\n" "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; }
11304b71ad168Smrgif test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes
11305b71ad168Smrgthen :
11306b71ad168Smrg  SYSV_MAN_SECTIONS=false
11307b71ad168Smrgelse $as_nop
11308b71ad168Smrg  SYSV_MAN_SECTIONS=true
11309b71ad168Smrgfi
11310b71ad168Smrg
11311b71ad168Smrg        ;;
11312b71ad168Smrg    *) SYSV_MAN_SECTIONS=false ;;
11313b71ad168Smrgesac
11314b71ad168Smrg
113153544ea2eSmrgif test x$APP_MAN_SUFFIX = x    ; then
113163544ea2eSmrg    APP_MAN_SUFFIX=1
113173544ea2eSmrgfi
113183544ea2eSmrgif test x$APP_MAN_DIR = x    ; then
113193544ea2eSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
113203544ea2eSmrgfi
113213544ea2eSmrg
113223544ea2eSmrgif test x$LIB_MAN_SUFFIX = x    ; then
113233544ea2eSmrg    LIB_MAN_SUFFIX=3
113243544ea2eSmrgfi
113253544ea2eSmrgif test x$LIB_MAN_DIR = x    ; then
113263544ea2eSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
113273544ea2eSmrgfi
113283544ea2eSmrg
113293544ea2eSmrgif test x$FILE_MAN_SUFFIX = x    ; then
11330b71ad168Smrg    case $SYSV_MAN_SECTIONS in
11331b71ad168Smrg	true)				FILE_MAN_SUFFIX=4  ;;
11332aadd013eSmrg	*)				FILE_MAN_SUFFIX=5  ;;
113333544ea2eSmrg    esac
113343544ea2eSmrgfi
113353544ea2eSmrgif test x$FILE_MAN_DIR = x    ; then
113363544ea2eSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
113373544ea2eSmrgfi
113383544ea2eSmrg
113393544ea2eSmrgif test x$MISC_MAN_SUFFIX = x    ; then
11340b71ad168Smrg    case $SYSV_MAN_SECTIONS in
11341b71ad168Smrg	true)				MISC_MAN_SUFFIX=5  ;;
11342aadd013eSmrg	*)				MISC_MAN_SUFFIX=7  ;;
113433544ea2eSmrg    esac
113443544ea2eSmrgfi
113453544ea2eSmrgif test x$MISC_MAN_DIR = x    ; then
113463544ea2eSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
113473544ea2eSmrgfi
113483544ea2eSmrg
113493544ea2eSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
11350b71ad168Smrg    case $SYSV_MAN_SECTIONS in
11351b71ad168Smrg	true)				DRIVER_MAN_SUFFIX=7  ;;
11352aadd013eSmrg	*)				DRIVER_MAN_SUFFIX=4  ;;
113533544ea2eSmrg    esac
113543544ea2eSmrgfi
113553544ea2eSmrgif test x$DRIVER_MAN_DIR = x    ; then
113563544ea2eSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
113573544ea2eSmrgfi
113583544ea2eSmrg
113593544ea2eSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
11360b71ad168Smrg    case $SYSV_MAN_SECTIONS in
11361b71ad168Smrg	true)				ADMIN_MAN_SUFFIX=1m ;;
11362aadd013eSmrg	*)				ADMIN_MAN_SUFFIX=8  ;;
113633544ea2eSmrg    esac
113643544ea2eSmrgfi
113653544ea2eSmrgif test x$ADMIN_MAN_DIR = x    ; then
113663544ea2eSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
113673544ea2eSmrgfi
113683544ea2eSmrg
113693544ea2eSmrg
113703544ea2eSmrg
113713544ea2eSmrg
113723544ea2eSmrg
113733544ea2eSmrg
113743544ea2eSmrg
113753544ea2eSmrg
113763544ea2eSmrg
113773544ea2eSmrg
113783544ea2eSmrg
113793544ea2eSmrg
113803544ea2eSmrg
113813544ea2eSmrg
113823544ea2eSmrg
113833544ea2eSmrgXORG_MAN_PAGE="X Version 11"
113843544ea2eSmrg
113853544ea2eSmrgMAN_SUBSTS="\
113863544ea2eSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
113873544ea2eSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
113883544ea2eSmrg	-e 's|__xservername__|Xorg|g' \
113893544ea2eSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
113903544ea2eSmrg	-e 's|__projectroot__|\$(prefix)|g' \
113913544ea2eSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
11392169a0819Smrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
11393169a0819Smrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
11394169a0819Smrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
11395169a0819Smrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
11396169a0819Smrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
11397169a0819Smrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
11398fb23d3a8Smrg
1139964ce7165Smrg
1140064ce7165Smrg
11401169a0819Smrg# Check whether --enable-silent-rules was given.
11402b71ad168Smrgif test ${enable_silent_rules+y}
11403b71ad168Smrgthen :
11404169a0819Smrg  enableval=$enable_silent_rules;
1140564ce7165Smrgfi
1140664ce7165Smrg
1140781440437Smrgcase $enable_silent_rules in # (((
1140881440437Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
1140981440437Smrg   no) AM_DEFAULT_VERBOSITY=1;;
1141081440437Smrg    *) AM_DEFAULT_VERBOSITY=0;;
1141164ce7165Smrgesac
1141281440437Smrgam_make=${MAKE-make}
11413b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
11414b71ad168Smrgprintf %s "checking whether $am_make supports nested variables... " >&6; }
11415b71ad168Smrgif test ${am_cv_make_support_nested_variables+y}
11416b71ad168Smrgthen :
11417b71ad168Smrg  printf %s "(cached) " >&6
11418b71ad168Smrgelse $as_nop
11419b71ad168Smrg  if printf "%s\n" 'TRUE=$(BAR$(V))
1142081440437SmrgBAR0=false
1142181440437SmrgBAR1=true
1142281440437SmrgV=1
1142381440437Smrgam__doit:
1142481440437Smrg	@$(TRUE)
1142581440437Smrg.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
1142681440437Smrg  am_cv_make_support_nested_variables=yes
114273544ea2eSmrgelse
1142881440437Smrg  am_cv_make_support_nested_variables=no
114293544ea2eSmrgfi
114303544ea2eSmrgfi
11431b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
11432b71ad168Smrgprintf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
1143381440437Smrgif test $am_cv_make_support_nested_variables = yes; then
1143481440437Smrg    AM_V='$(V)'
1143581440437Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1143681440437Smrgelse
1143781440437Smrg  AM_V=$AM_DEFAULT_VERBOSITY
1143881440437Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1143981440437Smrgfi
1144081440437SmrgAM_BACKSLASH='\'
114413544ea2eSmrg
114423544ea2eSmrg
114433544ea2eSmrg
11444169a0819Smrg# Checks for pkg-config packages
114453544ea2eSmrg# - Both CFLAGS & LIBS needed:
1144664ce7165Smrg
1144764ce7165Smrgpkg_failed=no
11448b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XHOST" >&5
11449b71ad168Smrgprintf %s "checking for XHOST... " >&6; }
11450fb23d3a8Smrg
11451fb23d3a8Smrgif test -n "$XHOST_CFLAGS"; then
11452fb23d3a8Smrg    pkg_cv_XHOST_CFLAGS="$XHOST_CFLAGS"
11453fb23d3a8Smrg elif test -n "$PKG_CONFIG"; then
11454fb23d3a8Smrg    if test -n "$PKG_CONFIG" && \
11455b71ad168Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto >= 7.0.22 x11 xmuu\""; } >&5
1145681440437Smrg  ($PKG_CONFIG --exists --print-errors "xproto >= 7.0.22 x11 xmuu") 2>&5
1145764ce7165Smrg  ac_status=$?
11458b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11459169a0819Smrg  test $ac_status = 0; }; then
1146081440437Smrg  pkg_cv_XHOST_CFLAGS=`$PKG_CONFIG --cflags "xproto >= 7.0.22 x11 xmuu" 2>/dev/null`
11461aadd013eSmrg		      test "x$?" != "x0" && pkg_failed=yes
1146264ce7165Smrgelse
1146364ce7165Smrg  pkg_failed=yes
1146464ce7165Smrgfi
11465fb23d3a8Smrg else
11466fb23d3a8Smrg    pkg_failed=untried
1146764ce7165Smrgfi
11468fb23d3a8Smrgif test -n "$XHOST_LIBS"; then
11469fb23d3a8Smrg    pkg_cv_XHOST_LIBS="$XHOST_LIBS"
11470fb23d3a8Smrg elif test -n "$PKG_CONFIG"; then
11471fb23d3a8Smrg    if test -n "$PKG_CONFIG" && \
11472b71ad168Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xproto >= 7.0.22 x11 xmuu\""; } >&5
1147381440437Smrg  ($PKG_CONFIG --exists --print-errors "xproto >= 7.0.22 x11 xmuu") 2>&5
1147464ce7165Smrg  ac_status=$?
11475b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11476169a0819Smrg  test $ac_status = 0; }; then
1147781440437Smrg  pkg_cv_XHOST_LIBS=`$PKG_CONFIG --libs "xproto >= 7.0.22 x11 xmuu" 2>/dev/null`
11478aadd013eSmrg		      test "x$?" != "x0" && pkg_failed=yes
1147964ce7165Smrgelse
1148064ce7165Smrg  pkg_failed=yes
1148164ce7165Smrgfi
11482fb23d3a8Smrg else
11483fb23d3a8Smrg    pkg_failed=untried
1148464ce7165Smrgfi
1148564ce7165Smrg
11486fb23d3a8Smrg
11487fb23d3a8Smrg
1148864ce7165Smrgif test $pkg_failed = yes; then
11489b71ad168Smrg   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11490b71ad168Smrgprintf "%s\n" "no" >&6; }
11491fb23d3a8Smrg
11492fb23d3a8Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11493fb23d3a8Smrg        _pkg_short_errors_supported=yes
11494fb23d3a8Smrgelse
11495fb23d3a8Smrg        _pkg_short_errors_supported=no
11496fb23d3a8Smrgfi
11497fb23d3a8Smrg        if test $_pkg_short_errors_supported = yes; then
11498aadd013eSmrg	        XHOST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xproto >= 7.0.22 x11 xmuu" 2>&1`
11499fb23d3a8Smrg        else
11500aadd013eSmrg	        XHOST_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xproto >= 7.0.22 x11 xmuu" 2>&1`
11501fb23d3a8Smrg        fi
1150264ce7165Smrg	# Put the nasty error message in config.log where it belongs
11503fb23d3a8Smrg	echo "$XHOST_PKG_ERRORS" >&5
11504fb23d3a8Smrg
1150581440437Smrg	as_fn_error $? "Package requirements (xproto >= 7.0.22 x11 xmuu) were not met:
11506fb23d3a8Smrg
11507fb23d3a8Smrg$XHOST_PKG_ERRORS
11508fb23d3a8Smrg
1150964ce7165SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
1151064ce7165Smrginstalled software in a non-standard prefix.
1151164ce7165Smrg
11512fb23d3a8SmrgAlternatively, you may set the environment variables XHOST_CFLAGS
11513fb23d3a8Smrgand XHOST_LIBS to avoid the need to call pkg-config.
11514aadd013eSmrgSee the pkg-config man page for more details." "$LINENO" 5
1151564ce7165Smrgelif test $pkg_failed = untried; then
11516b71ad168Smrg     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11517b71ad168Smrgprintf "%s\n" "no" >&6; }
11518b71ad168Smrg	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11519b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11520169a0819Smrgas_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
1152164ce7165Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
1152264ce7165Smrgpath to pkg-config.
1152364ce7165Smrg
11524fb23d3a8SmrgAlternatively, you may set the environment variables XHOST_CFLAGS
11525fb23d3a8Smrgand XHOST_LIBS to avoid the need to call pkg-config.
11526fb23d3a8SmrgSee the pkg-config man page for more details.
1152764ce7165Smrg
11528fb23d3a8SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.
11529169a0819SmrgSee \`config.log' for more details" "$LINENO" 5; }
1153064ce7165Smrgelse
1153164ce7165Smrg	XHOST_CFLAGS=$pkg_cv_XHOST_CFLAGS
1153264ce7165Smrg	XHOST_LIBS=$pkg_cv_XHOST_LIBS
11533b71ad168Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11534b71ad168Smrgprintf "%s\n" "yes" >&6; }
11535aadd013eSmrg
1153664ce7165Smrgfi
115373544ea2eSmrg# - Only CFLAGS needed, not libs:
115383544ea2eSmrg
115393544ea2eSmrgpkg_failed=no
11540b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XAU" >&5
11541b71ad168Smrgprintf %s "checking for XAU... " >&6; }
115423544ea2eSmrg
115433544ea2eSmrgif test -n "$XAU_CFLAGS"; then
115443544ea2eSmrg    pkg_cv_XAU_CFLAGS="$XAU_CFLAGS"
115453544ea2eSmrg elif test -n "$PKG_CONFIG"; then
115463544ea2eSmrg    if test -n "$PKG_CONFIG" && \
11547b71ad168Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xau\""; } >&5
115483544ea2eSmrg  ($PKG_CONFIG --exists --print-errors "xau") 2>&5
115493544ea2eSmrg  ac_status=$?
11550b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
115513544ea2eSmrg  test $ac_status = 0; }; then
115523544ea2eSmrg  pkg_cv_XAU_CFLAGS=`$PKG_CONFIG --cflags "xau" 2>/dev/null`
11553aadd013eSmrg		      test "x$?" != "x0" && pkg_failed=yes
115543544ea2eSmrgelse
115553544ea2eSmrg  pkg_failed=yes
115563544ea2eSmrgfi
115573544ea2eSmrg else
115583544ea2eSmrg    pkg_failed=untried
115593544ea2eSmrgfi
115603544ea2eSmrgif test -n "$XAU_LIBS"; then
115613544ea2eSmrg    pkg_cv_XAU_LIBS="$XAU_LIBS"
115623544ea2eSmrg elif test -n "$PKG_CONFIG"; then
115633544ea2eSmrg    if test -n "$PKG_CONFIG" && \
11564b71ad168Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xau\""; } >&5
115653544ea2eSmrg  ($PKG_CONFIG --exists --print-errors "xau") 2>&5
115663544ea2eSmrg  ac_status=$?
11567b71ad168Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
115683544ea2eSmrg  test $ac_status = 0; }; then
115693544ea2eSmrg  pkg_cv_XAU_LIBS=`$PKG_CONFIG --libs "xau" 2>/dev/null`
11570aadd013eSmrg		      test "x$?" != "x0" && pkg_failed=yes
115713544ea2eSmrgelse
115723544ea2eSmrg  pkg_failed=yes
115733544ea2eSmrgfi
115743544ea2eSmrg else
115753544ea2eSmrg    pkg_failed=untried
115763544ea2eSmrgfi
115773544ea2eSmrg
115783544ea2eSmrg
115793544ea2eSmrg
115803544ea2eSmrgif test $pkg_failed = yes; then
11581b71ad168Smrg   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582b71ad168Smrgprintf "%s\n" "no" >&6; }
115833544ea2eSmrg
115843544ea2eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
115853544ea2eSmrg        _pkg_short_errors_supported=yes
115863544ea2eSmrgelse
115873544ea2eSmrg        _pkg_short_errors_supported=no
115883544ea2eSmrgfi
115893544ea2eSmrg        if test $_pkg_short_errors_supported = yes; then
11590aadd013eSmrg	        XAU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xau" 2>&1`
115913544ea2eSmrg        else
11592aadd013eSmrg	        XAU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xau" 2>&1`
115933544ea2eSmrg        fi
115943544ea2eSmrg	# Put the nasty error message in config.log where it belongs
115953544ea2eSmrg	echo "$XAU_PKG_ERRORS" >&5
115963544ea2eSmrg
115973544ea2eSmrg	as_fn_error $? "Package requirements (xau) were not met:
115983544ea2eSmrg
115993544ea2eSmrg$XAU_PKG_ERRORS
116003544ea2eSmrg
116013544ea2eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
116023544ea2eSmrginstalled software in a non-standard prefix.
116033544ea2eSmrg
116043544ea2eSmrgAlternatively, you may set the environment variables XAU_CFLAGS
116053544ea2eSmrgand XAU_LIBS to avoid the need to call pkg-config.
11606aadd013eSmrgSee the pkg-config man page for more details." "$LINENO" 5
116073544ea2eSmrgelif test $pkg_failed = untried; then
11608b71ad168Smrg     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609b71ad168Smrgprintf "%s\n" "no" >&6; }
11610b71ad168Smrg	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11611b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
116123544ea2eSmrgas_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
116133544ea2eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
116143544ea2eSmrgpath to pkg-config.
116153544ea2eSmrg
116163544ea2eSmrgAlternatively, you may set the environment variables XAU_CFLAGS
116173544ea2eSmrgand XAU_LIBS to avoid the need to call pkg-config.
116183544ea2eSmrgSee the pkg-config man page for more details.
116193544ea2eSmrg
116203544ea2eSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.
116213544ea2eSmrgSee \`config.log' for more details" "$LINENO" 5; }
116223544ea2eSmrgelse
116233544ea2eSmrg	XAU_CFLAGS=$pkg_cv_XAU_CFLAGS
116243544ea2eSmrg	XAU_LIBS=$pkg_cv_XAU_LIBS
11625b71ad168Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11626b71ad168Smrgprintf "%s\n" "yes" >&6; }
11627aadd013eSmrg
116283544ea2eSmrgfi
1162964ce7165Smrg
1163064ce7165Smrg# Transport selection macro from xtrans.m4
1163164ce7165Smrg
1163264ce7165Smrg
11633fb23d3a8Smrg case $host_os in
11634fb23d3a8Smrg	mingw*)	unixdef="no"   ;;
11635fb23d3a8Smrg	*)	unixdef="yes"  ;;
11636fb23d3a8Smrg esac
1163764ce7165Smrg # Check whether --enable-unix-transport was given.
11638b71ad168Smrgif test ${enable_unix_transport+y}
11639b71ad168Smrgthen :
1164064ce7165Smrg  enableval=$enable_unix_transport; UNIXCONN=$enableval
11641b71ad168Smrgelse $as_nop
11642fb23d3a8Smrg  UNIXCONN=$unixdef
1164364ce7165Smrgfi
1164464ce7165Smrg
11645b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support UNIX socket connections" >&5
11646b71ad168Smrgprintf %s "checking if Xtrans should support UNIX socket connections... " >&6; }
1164764ce7165Smrg if test "$UNIXCONN" = "yes"; then
1164864ce7165Smrg
11649b71ad168Smrgprintf "%s\n" "#define UNIXCONN 1" >>confdefs.h
1165064ce7165Smrg
1165164ce7165Smrg fi
11652b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UNIXCONN" >&5
11653b71ad168Smrgprintf "%s\n" "$UNIXCONN" >&6; }
11654fb23d3a8Smrg # Check whether --enable-tcp-transport was given.
11655b71ad168Smrgif test ${enable_tcp_transport+y}
11656b71ad168Smrgthen :
11657fb23d3a8Smrg  enableval=$enable_tcp_transport; TCPCONN=$enableval
11658b71ad168Smrgelse $as_nop
11659fb23d3a8Smrg  TCPCONN=yes
11660fb23d3a8Smrgfi
11661fb23d3a8Smrg
11662b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support TCP socket connections" >&5
11663b71ad168Smrgprintf %s "checking if Xtrans should support TCP socket connections... " >&6; }
11664b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TCPCONN" >&5
11665b71ad168Smrgprintf "%s\n" "$TCPCONN" >&6; }
1166664ce7165Smrg if test "$TCPCONN" = "yes"; then
1166764ce7165Smrg
11668b71ad168Smrgprintf "%s\n" "#define TCPCONN 1" >>confdefs.h
1166964ce7165Smrg
1167064ce7165Smrg
1167164ce7165Smrg # SVR4 hides these in libraries other than libc
11672b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11673b71ad168Smrgprintf %s "checking for library containing socket... " >&6; }
11674b71ad168Smrgif test ${ac_cv_search_socket+y}
11675b71ad168Smrgthen :
11676b71ad168Smrg  printf %s "(cached) " >&6
11677b71ad168Smrgelse $as_nop
1167864ce7165Smrg  ac_func_search_save_LIBS=$LIBS
11679169a0819Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1168064ce7165Smrg/* end confdefs.h.  */
1168164ce7165Smrg
1168264ce7165Smrg/* Override any GCC internal prototype to avoid an error.
1168364ce7165Smrg   Use char because int might match the return type of a GCC
1168464ce7165Smrg   builtin and then its argument prototype would still apply.  */
1168564ce7165Smrgchar socket ();
1168664ce7165Smrgint
11687b71ad168Smrgmain (void)
1168864ce7165Smrg{
1168964ce7165Smrgreturn socket ();
1169064ce7165Smrg  ;
1169164ce7165Smrg  return 0;
1169264ce7165Smrg}
1169364ce7165Smrg_ACEOF
11694b71ad168Smrgfor ac_lib in '' socket
11695b71ad168Smrgdo
1169664ce7165Smrg  if test -z "$ac_lib"; then
1169764ce7165Smrg    ac_res="none required"
1169864ce7165Smrg  else
1169964ce7165Smrg    ac_res=-l$ac_lib
1170064ce7165Smrg    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
1170164ce7165Smrg  fi
11702b71ad168Smrg  if ac_fn_c_try_link "$LINENO"
11703b71ad168Smrgthen :
1170464ce7165Smrg  ac_cv_search_socket=$ac_res
1170564ce7165Smrgfi
11706b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
11707169a0819Smrg    conftest$ac_exeext
11708b71ad168Smrg  if test ${ac_cv_search_socket+y}
11709b71ad168Smrgthen :
1171064ce7165Smrg  break
1171164ce7165Smrgfi
1171264ce7165Smrgdone
11713b71ad168Smrgif test ${ac_cv_search_socket+y}
11714b71ad168Smrgthen :
11715169a0819Smrg
11716b71ad168Smrgelse $as_nop
1171764ce7165Smrg  ac_cv_search_socket=no
1171864ce7165Smrgfi
1171964ce7165Smrgrm conftest.$ac_ext
1172064ce7165SmrgLIBS=$ac_func_search_save_LIBS
1172164ce7165Smrgfi
11722b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11723b71ad168Smrgprintf "%s\n" "$ac_cv_search_socket" >&6; }
1172464ce7165Smrgac_res=$ac_cv_search_socket
11725b71ad168Smrgif test "$ac_res" != no
11726b71ad168Smrgthen :
1172764ce7165Smrg  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
1172864ce7165Smrg
1172964ce7165Smrgfi
1173064ce7165Smrg
11731b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
11732b71ad168Smrgprintf %s "checking for library containing gethostbyname... " >&6; }
11733b71ad168Smrgif test ${ac_cv_search_gethostbyname+y}
11734b71ad168Smrgthen :
11735b71ad168Smrg  printf %s "(cached) " >&6
11736b71ad168Smrgelse $as_nop
1173764ce7165Smrg  ac_func_search_save_LIBS=$LIBS
11738169a0819Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1173964ce7165Smrg/* end confdefs.h.  */
1174064ce7165Smrg
1174164ce7165Smrg/* Override any GCC internal prototype to avoid an error.
1174264ce7165Smrg   Use char because int might match the return type of a GCC
1174364ce7165Smrg   builtin and then its argument prototype would still apply.  */
1174464ce7165Smrgchar gethostbyname ();
1174564ce7165Smrgint
11746b71ad168Smrgmain (void)
1174764ce7165Smrg{
1174864ce7165Smrgreturn gethostbyname ();
1174964ce7165Smrg  ;
1175064ce7165Smrg  return 0;
1175164ce7165Smrg}
1175264ce7165Smrg_ACEOF
11753b71ad168Smrgfor ac_lib in '' nsl
11754b71ad168Smrgdo
1175564ce7165Smrg  if test -z "$ac_lib"; then
1175664ce7165Smrg    ac_res="none required"
1175764ce7165Smrg  else
1175864ce7165Smrg    ac_res=-l$ac_lib
1175964ce7165Smrg    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
1176064ce7165Smrg  fi
11761b71ad168Smrg  if ac_fn_c_try_link "$LINENO"
11762b71ad168Smrgthen :
1176364ce7165Smrg  ac_cv_search_gethostbyname=$ac_res
1176464ce7165Smrgfi
11765b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
11766169a0819Smrg    conftest$ac_exeext
11767b71ad168Smrg  if test ${ac_cv_search_gethostbyname+y}
11768b71ad168Smrgthen :
1176964ce7165Smrg  break
1177064ce7165Smrgfi
1177164ce7165Smrgdone
11772b71ad168Smrgif test ${ac_cv_search_gethostbyname+y}
11773b71ad168Smrgthen :
11774169a0819Smrg
11775b71ad168Smrgelse $as_nop
1177664ce7165Smrg  ac_cv_search_gethostbyname=no
1177764ce7165Smrgfi
1177864ce7165Smrgrm conftest.$ac_ext
1177964ce7165SmrgLIBS=$ac_func_search_save_LIBS
1178064ce7165Smrgfi
11781b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
11782b71ad168Smrgprintf "%s\n" "$ac_cv_search_gethostbyname" >&6; }
1178364ce7165Smrgac_res=$ac_cv_search_gethostbyname
11784b71ad168Smrgif test "$ac_res" != no
11785b71ad168Smrgthen :
1178664ce7165Smrg  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
1178764ce7165Smrg
1178864ce7165Smrgfi
1178964ce7165Smrg
11790169a0819Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
11791b71ad168Smrg   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5
11792b71ad168Smrgprintf %s "checking for main in -lws2_32... " >&6; }
11793b71ad168Smrgif test ${ac_cv_lib_ws2_32_main+y}
11794b71ad168Smrgthen :
11795b71ad168Smrg  printf %s "(cached) " >&6
11796b71ad168Smrgelse $as_nop
11797fb23d3a8Smrg  ac_check_lib_save_LIBS=$LIBS
11798fb23d3a8SmrgLIBS="-lws2_32  $LIBS"
11799169a0819Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
11800fb23d3a8Smrg/* end confdefs.h.  */
11801fb23d3a8Smrg
11802fb23d3a8Smrg
11803fb23d3a8Smrgint
11804b71ad168Smrgmain (void)
11805fb23d3a8Smrg{
11806fb23d3a8Smrgreturn main ();
11807fb23d3a8Smrg  ;
11808fb23d3a8Smrg  return 0;
11809fb23d3a8Smrg}
11810fb23d3a8Smrg_ACEOF
11811b71ad168Smrgif ac_fn_c_try_link "$LINENO"
11812b71ad168Smrgthen :
11813fb23d3a8Smrg  ac_cv_lib_ws2_32_main=yes
11814b71ad168Smrgelse $as_nop
11815169a0819Smrg  ac_cv_lib_ws2_32_main=no
11816fb23d3a8Smrgfi
11817b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
11818169a0819Smrg    conftest$ac_exeext conftest.$ac_ext
11819fb23d3a8SmrgLIBS=$ac_check_lib_save_LIBS
11820fb23d3a8Smrgfi
11821b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5
11822b71ad168Smrgprintf "%s\n" "$ac_cv_lib_ws2_32_main" >&6; }
11823b71ad168Smrgif test "x$ac_cv_lib_ws2_32_main" = xyes
11824b71ad168Smrgthen :
11825b71ad168Smrg  printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h
11826fb23d3a8Smrg
11827fb23d3a8Smrg  LIBS="-lws2_32 $LIBS"
11828fb23d3a8Smrg
11829fb23d3a8Smrgfi
11830fb23d3a8Smrg
11831169a0819Smrg fi
11832fb23d3a8Smrg
1183364ce7165Smrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
1183464ce7165Smrg # Check whether --enable-ipv6 was given.
11835b71ad168Smrgif test ${enable_ipv6+y}
11836b71ad168Smrgthen :
1183764ce7165Smrg  enableval=$enable_ipv6; IPV6CONN=$enableval
11838b71ad168Smrgelse $as_nop
11839169a0819Smrg  ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
11840b71ad168Smrgif test "x$ac_cv_func_getaddrinfo" = xyes
11841b71ad168Smrgthen :
1184264ce7165Smrg  IPV6CONN=yes
11843b71ad168Smrgelse $as_nop
1184464ce7165Smrg  IPV6CONN=no
1184564ce7165Smrgfi
1184664ce7165Smrg
1184764ce7165Smrgfi
1184864ce7165Smrg
11849b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IPv6 support should be built" >&5
11850b71ad168Smrgprintf %s "checking if IPv6 support should be built... " >&6; }
1185164ce7165Smrg if test "$IPV6CONN" = "yes"; then
1185264ce7165Smrg
11853b71ad168Smrgprintf "%s\n" "#define IPv6 1" >>confdefs.h
1185464ce7165Smrg
1185564ce7165Smrg fi
11856b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPV6CONN" >&5
11857b71ad168Smrgprintf "%s\n" "$IPV6CONN" >&6; }
1185864ce7165Smrg
1185964ce7165Smrg # 4.3BSD-Reno added a new member to struct sockaddr_in
11860169a0819Smrg ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" "
11861fb23d3a8Smrg#include <sys/types.h>
11862fb23d3a8Smrg#include <sys/socket.h>
11863fb23d3a8Smrg#include <netinet/in.h>
11864fb23d3a8Smrg
11865169a0819Smrg"
11866b71ad168Smrgif test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes
11867b71ad168Smrgthen :
11868fb23d3a8Smrg
11869b71ad168Smrgprintf "%s\n" "#define BSD44SOCKETS 1" >>confdefs.h
11870fb23d3a8Smrg
11871fb23d3a8Smrgfi
11872fb23d3a8Smrg
11873fb23d3a8Smrg
11874fb23d3a8Smrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
11875169a0819Smrg ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
11876fb23d3a8Smrg$ac_includes_default
1187764ce7165Smrg#include <sys/socket.h>
11878169a0819Smrg"
11879b71ad168Smrgif test "x$ac_cv_type_socklen_t" = xyes
11880b71ad168Smrgthen :
1188164ce7165Smrg
11882b71ad168Smrgprintf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h
1188364ce7165Smrg
11884fb23d3a8Smrg
1188564ce7165Smrgfi
1188664ce7165Smrg
1188764ce7165Smrg
1188895fdd44cSmrg # XPG4v2/UNIX95 added msg_control - check to see if we need to define
1188995fdd44cSmrg # _XOPEN_SOURCE to get it (such as on Solaris)
1189095fdd44cSmrg ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
1189195fdd44cSmrg$ac_includes_default
1189295fdd44cSmrg#include <sys/socket.h>
1189395fdd44cSmrg
1189495fdd44cSmrg"
11895b71ad168Smrgif test "x$ac_cv_member_struct_msghdr_msg_control" = xyes
11896b71ad168Smrgthen :
1189795fdd44cSmrg
1189895fdd44cSmrgfi
1189995fdd44cSmrg
1190095fdd44cSmrg # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
1190195fdd44cSmrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
1190295fdd44cSmrg     unset ac_cv_member_struct_msghdr_msg_control
11903b71ad168Smrg     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=600" >&5
11904b71ad168Smrgprintf "%s\n" "$as_me: trying again with _XOPEN_SOURCE=600" >&6;}
1190595fdd44cSmrg     ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
1190695fdd44cSmrg#define _XOPEN_SOURCE 600
1190795fdd44cSmrg$ac_includes_default
1190895fdd44cSmrg#include <sys/socket.h>
1190995fdd44cSmrg
1191095fdd44cSmrg"
11911b71ad168Smrgif test "x$ac_cv_member_struct_msghdr_msg_control" = xyes
11912b71ad168Smrgthen :
1191395fdd44cSmrg
11914b71ad168Smrgprintf "%s\n" "#define _XOPEN_SOURCE 600" >>confdefs.h
1191595fdd44cSmrg
1191695fdd44cSmrg
1191795fdd44cSmrgfi
1191895fdd44cSmrg
1191995fdd44cSmrg fi
1192095fdd44cSmrg # If that didn't work, fall back to XPG5/UNIX98 with C89
1192195fdd44cSmrg if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
1192295fdd44cSmrg     unset ac_cv_member_struct_msghdr_msg_control
11923b71ad168Smrg     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=500" >&5
11924b71ad168Smrgprintf "%s\n" "$as_me: trying again with _XOPEN_SOURCE=500" >&6;}
1192595fdd44cSmrg     ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
1192695fdd44cSmrg#define _XOPEN_SOURCE 500
1192795fdd44cSmrg$ac_includes_default
1192895fdd44cSmrg#include <sys/socket.h>
1192995fdd44cSmrg
1193095fdd44cSmrg"
11931b71ad168Smrgif test "x$ac_cv_member_struct_msghdr_msg_control" = xyes
11932b71ad168Smrgthen :
1193395fdd44cSmrg
11934b71ad168Smrgprintf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
1193595fdd44cSmrg
1193695fdd44cSmrg
1193795fdd44cSmrgfi
1193895fdd44cSmrg
1193995fdd44cSmrg fi
1194095fdd44cSmrg
1194195fdd44cSmrg
11942fb23d3a8Smrg
1194364ce7165Smrg fi
1194464ce7165Smrg case $host_os in
11945b71ad168Smrg	solaris*)		localdef="yes" ;;
1194664ce7165Smrg	*)			localdef="no"  ;;
1194764ce7165Smrg esac
1194864ce7165Smrg # Check whether --enable-local-transport was given.
11949b71ad168Smrgif test ${enable_local_transport+y}
11950b71ad168Smrgthen :
1195164ce7165Smrg  enableval=$enable_local_transport; LOCALCONN=$enableval
11952b71ad168Smrgelse $as_nop
1195364ce7165Smrg  LOCALCONN=$localdef
1195464ce7165Smrgfi
1195564ce7165Smrg
11956b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support os-specific local connections" >&5
11957b71ad168Smrgprintf %s "checking if Xtrans should support os-specific local connections... " >&6; }
11958b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCALCONN" >&5
11959b71ad168Smrgprintf "%s\n" "$LOCALCONN" >&6; }
1196064ce7165Smrg if test "$LOCALCONN" = "yes"; then
1196164ce7165Smrg
11962b71ad168Smrgprintf "%s\n" "#define LOCALCONN 1" >>confdefs.h
1196364ce7165Smrg
1196464ce7165Smrg fi
1196564ce7165Smrg
11966b71ad168Smrg # Other functions Xtrans may need
11967b71ad168Smrg ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
11968b71ad168Smrgif test "x$ac_cv_func_strcasecmp" = xyes
11969b71ad168Smrgthen :
11970b71ad168Smrg  printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
11971b71ad168Smrg
11972b71ad168Smrgfi
11973b71ad168Smrgac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
11974b71ad168Smrgif test "x$ac_cv_func_strlcpy" = xyes
11975b71ad168Smrgthen :
11976b71ad168Smrg  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
11977b71ad168Smrg
11978b71ad168Smrgfi
11979b71ad168Smrg
11980b71ad168Smrg
1198164ce7165Smrg
1198264ce7165Smrg
1198364ce7165Smrg# Secure RPC detection macro from xtrans.m4
1198464ce7165Smrg
11985169a0819Smrg # Check whether --enable-secure-rpc was given.
11986b71ad168Smrgif test ${enable_secure_rpc+y}
11987b71ad168Smrgthen :
11988169a0819Smrg  enableval=$enable_secure_rpc; SECURE_RPC=$enableval
11989b71ad168Smrgelse $as_nop
11990169a0819Smrg  SECURE_RPC="try"
1199164ce7165Smrgfi
1199264ce7165Smrg
11993169a0819Smrg
11994169a0819Smrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
11995169a0819Smrg	FOUND_SECURE_RPC="no"
11996b71ad168Smrg
11997b71ad168Smrg  for ac_func in authdes_seccreate authdes_create
11998169a0819Smrgdo :
11999b71ad168Smrg  as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
12000169a0819Smrgac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12001b71ad168Smrgif eval test \"x\$"$as_ac_var"\" = x"yes"
12002b71ad168Smrgthen :
1200364ce7165Smrg  cat >>confdefs.h <<_ACEOF
12004b71ad168Smrg#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
1200564ce7165Smrg_ACEOF
1200664ce7165Smrg FOUND_SECURE_RPC="yes"
1200764ce7165Smrgfi
1200864ce7165Smrg
12009b71ad168Smrgdone
1201064ce7165Smrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
1201164ce7165Smrg		if test "x$SECURE_RPC" = "xyes" ; then
12012169a0819Smrg	as_fn_error $? "Secure RPC requested, but required functions not found" "$LINENO" 5
1201364ce7165Smrg		fi
1201464ce7165Smrg		SECURE_RPC="no"
1201564ce7165Smrg	else
12016b71ad168Smrg				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsecretkey" >&5
12017b71ad168Smrgprintf %s "checking for library containing getsecretkey... " >&6; }
12018b71ad168Smrgif test ${ac_cv_search_getsecretkey+y}
12019b71ad168Smrgthen :
12020b71ad168Smrg  printf %s "(cached) " >&6
12021b71ad168Smrgelse $as_nop
1202264ce7165Smrg  ac_func_search_save_LIBS=$LIBS
12023169a0819Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1202464ce7165Smrg/* end confdefs.h.  */
1202564ce7165Smrg
1202664ce7165Smrg/* Override any GCC internal prototype to avoid an error.
1202764ce7165Smrg   Use char because int might match the return type of a GCC
1202864ce7165Smrg   builtin and then its argument prototype would still apply.  */
1202964ce7165Smrgchar getsecretkey ();
1203064ce7165Smrgint
12031b71ad168Smrgmain (void)
1203264ce7165Smrg{
1203364ce7165Smrgreturn getsecretkey ();
1203464ce7165Smrg  ;
1203564ce7165Smrg  return 0;
1203664ce7165Smrg}
1203764ce7165Smrg_ACEOF
12038b71ad168Smrgfor ac_lib in '' rpcsvc
12039b71ad168Smrgdo
1204064ce7165Smrg  if test -z "$ac_lib"; then
1204164ce7165Smrg    ac_res="none required"
1204264ce7165Smrg  else
1204364ce7165Smrg    ac_res=-l$ac_lib
1204464ce7165Smrg    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
1204564ce7165Smrg  fi
12046b71ad168Smrg  if ac_fn_c_try_link "$LINENO"
12047b71ad168Smrgthen :
1204864ce7165Smrg  ac_cv_search_getsecretkey=$ac_res
1204964ce7165Smrgfi
12050b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
12051169a0819Smrg    conftest$ac_exeext
12052b71ad168Smrg  if test ${ac_cv_search_getsecretkey+y}
12053b71ad168Smrgthen :
1205464ce7165Smrg  break
1205564ce7165Smrgfi
1205664ce7165Smrgdone
12057b71ad168Smrgif test ${ac_cv_search_getsecretkey+y}
12058b71ad168Smrgthen :
12059169a0819Smrg
12060b71ad168Smrgelse $as_nop
1206164ce7165Smrg  ac_cv_search_getsecretkey=no
1206264ce7165Smrgfi
1206364ce7165Smrgrm conftest.$ac_ext
1206464ce7165SmrgLIBS=$ac_func_search_save_LIBS
1206564ce7165Smrgfi
12066b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsecretkey" >&5
12067b71ad168Smrgprintf "%s\n" "$ac_cv_search_getsecretkey" >&6; }
1206864ce7165Smrgac_res=$ac_cv_search_getsecretkey
12069b71ad168Smrgif test "$ac_res" != no
12070b71ad168Smrgthen :
1207164ce7165Smrg  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
1207264ce7165Smrg
1207364ce7165Smrgfi
1207464ce7165Smrg
1207564ce7165Smrg		SECURE_RPC="yes"
1207664ce7165Smrg	fi
1207764ce7165Smrg fi
12078b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5
12079b71ad168Smrgprintf %s "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; }
1208064ce7165Smrg if test "x$SECURE_RPC" = "xyes" ; then
1208164ce7165Smrg
12082b71ad168Smrgprintf "%s\n" "#define SECURE_RPC 1" >>confdefs.h
1208364ce7165Smrg
1208464ce7165Smrg fi
12085b71ad168Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SECURE_RPC" >&5
12086b71ad168Smrgprintf "%s\n" "$SECURE_RPC" >&6; }
1208764ce7165Smrg
1208864ce7165Smrg
1208981440437Smrg# Link with winsock if mingw target
1209081440437Smrgcase $host_os in
1209181440437Smrg *mingw*)
12092b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5
12093b71ad168Smrgprintf %s "checking for main in -lws2_32... " >&6; }
12094b71ad168Smrgif test ${ac_cv_lib_ws2_32_main+y}
12095b71ad168Smrgthen :
12096b71ad168Smrg  printf %s "(cached) " >&6
12097b71ad168Smrgelse $as_nop
1209881440437Smrg  ac_check_lib_save_LIBS=$LIBS
1209981440437SmrgLIBS="-lws2_32  $LIBS"
1210081440437Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1210181440437Smrg/* end confdefs.h.  */
1210281440437Smrg
1210381440437Smrg
1210481440437Smrgint
12105b71ad168Smrgmain (void)
1210681440437Smrg{
1210781440437Smrgreturn main ();
1210881440437Smrg  ;
1210981440437Smrg  return 0;
1211081440437Smrg}
1211181440437Smrg_ACEOF
12112b71ad168Smrgif ac_fn_c_try_link "$LINENO"
12113b71ad168Smrgthen :
1211481440437Smrg  ac_cv_lib_ws2_32_main=yes
12115b71ad168Smrgelse $as_nop
1211681440437Smrg  ac_cv_lib_ws2_32_main=no
1211781440437Smrgfi
12118b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1211981440437Smrg    conftest$ac_exeext conftest.$ac_ext
1212081440437SmrgLIBS=$ac_check_lib_save_LIBS
1212181440437Smrgfi
12122b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5
12123b71ad168Smrgprintf "%s\n" "$ac_cv_lib_ws2_32_main" >&6; }
12124b71ad168Smrgif test "x$ac_cv_lib_ws2_32_main" = xyes
12125b71ad168Smrgthen :
12126b71ad168Smrg  printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h
1212781440437Smrg
1212881440437Smrg  LIBS="-lws2_32 $LIBS"
1212981440437Smrg
1213081440437Smrgfi
1213181440437Smrg
1213281440437Smrg  ;;
1213381440437Smrg *)
1213481440437Smrg  ;;
1213581440437Smrgesac
1213681440437Smrg
12137aadd013eSmrg# Checks for library functions.
12138b71ad168Smrgac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
12139b71ad168Smrgif test "x$ac_cv_func_inet_aton" = xyes
12140b71ad168Smrgthen :
12141b71ad168Smrg  printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h
12142b71ad168Smrg
12143b71ad168Smrgfi
12144aadd013eSmrg
12145b71ad168Smrg
12146b71ad168Smrg# Internationalization & localization support
12147b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gettext" >&5
12148b71ad168Smrgprintf %s "checking for library containing gettext... " >&6; }
12149b71ad168Smrgif test ${ac_cv_search_gettext+y}
12150b71ad168Smrgthen :
12151b71ad168Smrg  printf %s "(cached) " >&6
12152b71ad168Smrgelse $as_nop
12153b71ad168Smrg  ac_func_search_save_LIBS=$LIBS
12154b71ad168Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
12155b71ad168Smrg/* end confdefs.h.  */
12156b71ad168Smrg
12157b71ad168Smrg/* Override any GCC internal prototype to avoid an error.
12158b71ad168Smrg   Use char because int might match the return type of a GCC
12159b71ad168Smrg   builtin and then its argument prototype would still apply.  */
12160b71ad168Smrgchar gettext ();
12161b71ad168Smrgint
12162b71ad168Smrgmain (void)
12163b71ad168Smrg{
12164b71ad168Smrgreturn gettext ();
12165b71ad168Smrg  ;
12166b71ad168Smrg  return 0;
12167b71ad168Smrg}
12168b71ad168Smrg_ACEOF
12169b71ad168Smrgfor ac_lib in '' intl
12170b71ad168Smrgdo
12171b71ad168Smrg  if test -z "$ac_lib"; then
12172b71ad168Smrg    ac_res="none required"
12173b71ad168Smrg  else
12174b71ad168Smrg    ac_res=-l$ac_lib
12175b71ad168Smrg    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12176b71ad168Smrg  fi
12177b71ad168Smrg  if ac_fn_c_try_link "$LINENO"
12178b71ad168Smrgthen :
12179b71ad168Smrg  ac_cv_search_gettext=$ac_res
12180b71ad168Smrgfi
12181b71ad168Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
12182b71ad168Smrg    conftest$ac_exeext
12183b71ad168Smrg  if test ${ac_cv_search_gettext+y}
12184b71ad168Smrgthen :
12185b71ad168Smrg  break
12186aadd013eSmrgfi
12187aadd013eSmrgdone
12188b71ad168Smrgif test ${ac_cv_search_gettext+y}
12189b71ad168Smrgthen :
12190b71ad168Smrg
12191b71ad168Smrgelse $as_nop
12192b71ad168Smrg  ac_cv_search_gettext=no
12193b71ad168Smrgfi
12194b71ad168Smrgrm conftest.$ac_ext
12195b71ad168SmrgLIBS=$ac_func_search_save_LIBS
12196b71ad168Smrgfi
12197b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gettext" >&5
12198b71ad168Smrgprintf "%s\n" "$ac_cv_search_gettext" >&6; }
12199b71ad168Smrgac_res=$ac_cv_search_gettext
12200b71ad168Smrgif test "$ac_res" != no
12201b71ad168Smrgthen :
12202b71ad168Smrg  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12203b71ad168Smrg  USE_GETTEXT="yes"
12204b71ad168Smrgelse $as_nop
12205b71ad168Smrg  USE_GETTEXT="no"
12206b71ad168Smrgfi
12207b71ad168Smrg
12208b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to install localized messages" >&5
12209b71ad168Smrgprintf %s "checking where to install localized messages... " >&6; }
12210b71ad168Smrg
12211b71ad168Smrg# Check whether --with-localedir was given.
12212b71ad168Smrgif test ${with_localedir+y}
12213b71ad168Smrgthen :
12214b71ad168Smrg  withval=$with_localedir; LOCALEDIR=${withval}
12215b71ad168Smrgelse $as_nop
12216b71ad168Smrg  LOCALEDIR=${datadir}/locale
12217b71ad168Smrgfi
12218b71ad168Smrg
12219b71ad168Smrgif test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
12220b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: nowhere" >&5
12221b71ad168Smrgprintf "%s\n" "nowhere" >&6; }
12222b71ad168Smrg	USE_GETTEXT="no"
12223b71ad168Smrgelse
12224b71ad168Smrg
12225b71ad168Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCALEDIR" >&5
12226b71ad168Smrgprintf "%s\n" "$LOCALEDIR" >&6; }
12227b71ad168Smrgfi
12228b71ad168Smrg
12229b71ad168Smrgif test "x$USE_GETTEXT" = "xyes" ; then
12230b71ad168Smrg
12231b71ad168Smrgprintf "%s\n" "#define USE_GETTEXT 1" >>confdefs.h
12232b71ad168Smrg
12233b71ad168Smrgfi
12234b71ad168Smrg if test "x$USE_GETTEXT" = "xyes"; then
12235b71ad168Smrg  USE_GETTEXT_TRUE=
12236b71ad168Smrg  USE_GETTEXT_FALSE='#'
12237b71ad168Smrgelse
12238b71ad168Smrg  USE_GETTEXT_TRUE='#'
12239b71ad168Smrg  USE_GETTEXT_FALSE=
12240b71ad168Smrgfi
12241b71ad168Smrg
12242aadd013eSmrg
12243aadd013eSmrg
122443544ea2eSmrgac_config_files="$ac_config_files Makefile man/Makefile"
1224564ce7165Smrg
1224664ce7165Smrgcat >confcache <<\_ACEOF
1224764ce7165Smrg# This file is a shell script that caches the results of configure
1224864ce7165Smrg# tests run on this system so they can be shared between configure
1224964ce7165Smrg# scripts and configure runs, see configure's option --config-cache.
1225064ce7165Smrg# It is not useful on other systems.  If it contains results you don't
1225164ce7165Smrg# want to keep, you may remove or edit it.
1225264ce7165Smrg#
1225364ce7165Smrg# config.status only pays attention to the cache file if you give it
1225464ce7165Smrg# the --recheck option to rerun configure.
1225564ce7165Smrg#
1225664ce7165Smrg# `ac_cv_env_foo' variables (set or unset) will be overridden when
1225764ce7165Smrg# loading this file, other *unset* `ac_cv_foo' will be assigned the
1225864ce7165Smrg# following values.
1225964ce7165Smrg
1226064ce7165Smrg_ACEOF
1226164ce7165Smrg
1226264ce7165Smrg# The following way of writing the cache mishandles newlines in values,
1226364ce7165Smrg# but we know of no workaround that is simple, portable, and efficient.
1226464ce7165Smrg# So, we kill variables containing newlines.
1226564ce7165Smrg# Ultrix sh set writes to stderr and can't be redirected directly,
1226664ce7165Smrg# and sets the high bit in the cache file unless we assign to the vars.
1226764ce7165Smrg(
1226864ce7165Smrg  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
1226964ce7165Smrg    eval ac_val=\$$ac_var
1227064ce7165Smrg    case $ac_val in #(
1227164ce7165Smrg    *${as_nl}*)
1227264ce7165Smrg      case $ac_var in #(
12273b71ad168Smrg      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12274b71ad168Smrgprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1227564ce7165Smrg      esac
1227664ce7165Smrg      case $ac_var in #(
1227764ce7165Smrg      _ | IFS | as_nl) ;; #(
12278fb23d3a8Smrg      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12279169a0819Smrg      *) { eval $ac_var=; unset $ac_var;} ;;
1228064ce7165Smrg      esac ;;
1228164ce7165Smrg    esac
1228264ce7165Smrg  done
1228364ce7165Smrg
1228464ce7165Smrg  (set) 2>&1 |
1228564ce7165Smrg    case $as_nl`(ac_space=' '; set) 2>&1` in #(
1228664ce7165Smrg    *${as_nl}ac_space=\ *)
12287169a0819Smrg      # `set' does not quote correctly, so add quotes: double-quote
12288169a0819Smrg      # substitution turns \\\\ into \\, and sed turns \\ into \.
1228964ce7165Smrg      sed -n \
1229064ce7165Smrg	"s/'/'\\\\''/g;
1229164ce7165Smrg	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
1229264ce7165Smrg      ;; #(
1229364ce7165Smrg    *)
1229464ce7165Smrg      # `set' quotes correctly as required by POSIX, so do not add quotes.
1229564ce7165Smrg      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1229664ce7165Smrg      ;;
1229764ce7165Smrg    esac |
1229864ce7165Smrg    sort
1229964ce7165Smrg) |
1230064ce7165Smrg  sed '
1230164ce7165Smrg     /^ac_cv_env_/b end
1230264ce7165Smrg     t clear
1230364ce7165Smrg     :clear
12304b71ad168Smrg     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
1230564ce7165Smrg     t end
1230664ce7165Smrg     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
1230764ce7165Smrg     :end' >>confcache
1230864ce7165Smrgif diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1230964ce7165Smrg  if test -w "$cache_file"; then
12310169a0819Smrg    if test "x$cache_file" != "x/dev/null"; then
12311b71ad168Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12312b71ad168Smrgprintf "%s\n" "$as_me: updating cache $cache_file" >&6;}
12313169a0819Smrg      if test ! -f "$cache_file" || test -h "$cache_file"; then
12314169a0819Smrg	cat confcache >"$cache_file"
12315169a0819Smrg      else
12316169a0819Smrg        case $cache_file in #(
12317169a0819Smrg        */* | ?:*)
12318169a0819Smrg	  mv -f confcache "$cache_file"$$ &&
12319169a0819Smrg	  mv -f "$cache_file"$$ "$cache_file" ;; #(
12320169a0819Smrg        *)
12321169a0819Smrg	  mv -f confcache "$cache_file" ;;
12322169a0819Smrg	esac
12323169a0819Smrg      fi
12324169a0819Smrg    fi
1232564ce7165Smrg  else
12326b71ad168Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12327b71ad168Smrgprintf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
1232864ce7165Smrg  fi
1232964ce7165Smrgfi
1233064ce7165Smrgrm -f confcache
1233164ce7165Smrg
1233264ce7165Smrgtest "x$prefix" = xNONE && prefix=$ac_default_prefix
1233364ce7165Smrg# Let make expand exec_prefix.
1233464ce7165Smrgtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1233564ce7165Smrg
1233664ce7165SmrgDEFS=-DHAVE_CONFIG_H
1233764ce7165Smrg
1233864ce7165Smrgac_libobjs=
1233964ce7165Smrgac_ltlibobjs=
12340169a0819SmrgU=
1234164ce7165Smrgfor ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
1234264ce7165Smrg  # 1. Remove the extension, and $U if already installed.
1234364ce7165Smrg  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12344b71ad168Smrg  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
1234564ce7165Smrg  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
1234664ce7165Smrg  #    will be set to the directory where LIBOBJS objects are built.
12347169a0819Smrg  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12348169a0819Smrg  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
1234964ce7165Smrgdone
1235064ce7165SmrgLIBOBJS=$ac_libobjs
1235164ce7165Smrg
1235264ce7165SmrgLTLIBOBJS=$ac_ltlibobjs
1235364ce7165Smrg
1235464ce7165Smrg
12355b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
12356b71ad168Smrgprintf %s "checking that generated files are newer than configure... " >&6; }
1235781440437Smrg   if test -n "$am_sleep_pid"; then
1235881440437Smrg     # Hide warnings about reused PIDs.
1235981440437Smrg     wait $am_sleep_pid 2>/dev/null
1236081440437Smrg   fi
12361b71ad168Smrg   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
12362b71ad168Smrgprintf "%s\n" "done" >&6; }
12363fb23d3a8Smrg if test -n "$EXEEXT"; then
12364fb23d3a8Smrg  am__EXEEXT_TRUE=
12365fb23d3a8Smrg  am__EXEEXT_FALSE='#'
12366fb23d3a8Smrgelse
12367fb23d3a8Smrg  am__EXEEXT_TRUE='#'
12368fb23d3a8Smrg  am__EXEEXT_FALSE=
12369fb23d3a8Smrgfi
12370fb23d3a8Smrg
1237164ce7165Smrgif test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
12372169a0819Smrg  as_fn_error $? "conditional \"AMDEP\" was never defined.
12373169a0819SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
1237464ce7165Smrgfi
1237564ce7165Smrgif test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
12376169a0819Smrg  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
12377169a0819SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
1237864ce7165Smrgfi
12379b71ad168Smrgif test -z "${USE_GETTEXT_TRUE}" && test -z "${USE_GETTEXT_FALSE}"; then
12380b71ad168Smrg  as_fn_error $? "conditional \"USE_GETTEXT\" was never defined.
12381b71ad168SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
12382b71ad168Smrgfi
1238364ce7165Smrg
12384169a0819Smrg: "${CONFIG_STATUS=./config.status}"
12385fb23d3a8Smrgac_write_fail=0
1238664ce7165Smrgac_clean_files_save=$ac_clean_files
1238764ce7165Smrgac_clean_files="$ac_clean_files $CONFIG_STATUS"
12388b71ad168Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12389b71ad168Smrgprintf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
12390169a0819Smrgas_write_fail=0
12391169a0819Smrgcat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
1239264ce7165Smrg#! $SHELL
1239364ce7165Smrg# Generated by $as_me.
1239464ce7165Smrg# Run this file to recreate the current configuration.
1239564ce7165Smrg# Compiler output produced by configure, useful for debugging
1239664ce7165Smrg# configure, is in config.log if it exists.
1239764ce7165Smrg
1239864ce7165Smrgdebug=false
1239964ce7165Smrgac_cs_recheck=false
1240064ce7165Smrgac_cs_silent=false
1240164ce7165Smrg
12402169a0819SmrgSHELL=\${CONFIG_SHELL-$SHELL}
12403169a0819Smrgexport SHELL
12404169a0819Smrg_ASEOF
12405169a0819Smrgcat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12406169a0819Smrg## -------------------- ##
12407169a0819Smrg## M4sh Initialization. ##
12408169a0819Smrg## -------------------- ##
1240964ce7165Smrg
1241064ce7165Smrg# Be more Bourne compatible
1241164ce7165SmrgDUALCASE=1; export DUALCASE # for MKS sh
12412b71ad168Smrgas_nop=:
12413b71ad168Smrgif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
12414b71ad168Smrgthen :
1241564ce7165Smrg  emulate sh
1241664ce7165Smrg  NULLCMD=:
12417fb23d3a8Smrg  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
1241864ce7165Smrg  # is contrary to our usage.  Disable this feature.
1241964ce7165Smrg  alias -g '${1+"$@"}'='"$@"'
1242064ce7165Smrg  setopt NO_GLOB_SUBST
12421b71ad168Smrgelse $as_nop
12422169a0819Smrg  case `(set -o) 2>/dev/null` in #(
12423169a0819Smrg  *posix*) :
12424169a0819Smrg    set -o posix ;; #(
12425169a0819Smrg  *) :
12426169a0819Smrg     ;;
1242764ce7165Smrgesac
1242864ce7165Smrgfi
1242964ce7165Smrg
1243064ce7165Smrg
12431b71ad168Smrg
12432b71ad168Smrg# Reset variables that may have inherited troublesome values from
12433b71ad168Smrg# the environment.
12434b71ad168Smrg
12435b71ad168Smrg# IFS needs to be set, to space, tab, and newline, in precisely that order.
12436b71ad168Smrg# (If _AS_PATH_WALK were called with IFS unset, it would have the
12437b71ad168Smrg# side effect of setting IFS to empty, thus disabling word splitting.)
12438b71ad168Smrg# Quoting is to prevent editors from complaining about space-tab.
12439fb23d3a8Smrgas_nl='
12440fb23d3a8Smrg'
12441fb23d3a8Smrgexport as_nl
12442b71ad168SmrgIFS=" ""	$as_nl"
12443b71ad168Smrg
12444b71ad168SmrgPS1='$ '
12445b71ad168SmrgPS2='> '
12446b71ad168SmrgPS4='+ '
12447b71ad168Smrg
12448b71ad168Smrg# Ensure predictable behavior from utilities with locale-dependent output.
12449b71ad168SmrgLC_ALL=C
12450b71ad168Smrgexport LC_ALL
12451b71ad168SmrgLANGUAGE=C
12452b71ad168Smrgexport LANGUAGE
12453b71ad168Smrg
12454b71ad168Smrg# We cannot yet rely on "unset" to work, but we need these variables
12455b71ad168Smrg# to be unset--not just set to an empty or harmless value--now, to
12456b71ad168Smrg# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
12457b71ad168Smrg# also avoids known problems related to "unset" and subshell syntax
12458b71ad168Smrg# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
12459b71ad168Smrgfor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
12460b71ad168Smrgdo eval test \${$as_var+y} \
12461b71ad168Smrg  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12462b71ad168Smrgdone
12463b71ad168Smrg
12464b71ad168Smrg# Ensure that fds 0, 1, and 2 are open.
12465b71ad168Smrgif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
12466b71ad168Smrgif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
12467b71ad168Smrgif (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
12468fb23d3a8Smrg
12469fb23d3a8Smrg# The user is always right.
12470b71ad168Smrgif ${PATH_SEPARATOR+false} :; then
12471fb23d3a8Smrg  PATH_SEPARATOR=:
12472fb23d3a8Smrg  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12473fb23d3a8Smrg    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12474fb23d3a8Smrg      PATH_SEPARATOR=';'
12475fb23d3a8Smrg  }
1247664ce7165Smrgfi
1247764ce7165Smrg
1247864ce7165Smrg
1247964ce7165Smrg# Find who we are.  Look in the path if we contain no directory separator.
12480169a0819Smrgas_myself=
12481169a0819Smrgcase $0 in #((
1248264ce7165Smrg  *[\\/]* ) as_myself=$0 ;;
1248364ce7165Smrg  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1248464ce7165Smrgfor as_dir in $PATH
1248564ce7165Smrgdo
1248664ce7165Smrg  IFS=$as_save_IFS
12487b71ad168Smrg  case $as_dir in #(((
12488b71ad168Smrg    '') as_dir=./ ;;
12489b71ad168Smrg    */) ;;
12490b71ad168Smrg    *) as_dir=$as_dir/ ;;
12491b71ad168Smrg  esac
12492b71ad168Smrg    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
12493169a0819Smrg  done
1249464ce7165SmrgIFS=$as_save_IFS
1249564ce7165Smrg
1249664ce7165Smrg     ;;
1249764ce7165Smrgesac
1249864ce7165Smrg# We did not find ourselves, most probably we were run as `sh COMMAND'
1249964ce7165Smrg# in which case we are not to be found in the path.
1250064ce7165Smrgif test "x$as_myself" = x; then
1250164ce7165Smrg  as_myself=$0
1250264ce7165Smrgfi
1250364ce7165Smrgif test ! -f "$as_myself"; then
12504b71ad168Smrg  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12505169a0819Smrg  exit 1
1250664ce7165Smrgfi
1250764ce7165Smrg
12508169a0819Smrg
12509169a0819Smrg
12510169a0819Smrg# as_fn_error STATUS ERROR [LINENO LOG_FD]
12511169a0819Smrg# ----------------------------------------
12512169a0819Smrg# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12513169a0819Smrg# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12514169a0819Smrg# script with STATUS, using 1 if that was 0.
12515169a0819Smrgas_fn_error ()
12516169a0819Smrg{
12517169a0819Smrg  as_status=$1; test $as_status -eq 0 && as_status=1
12518169a0819Smrg  if test "$4"; then
12519169a0819Smrg    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12520b71ad168Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12521169a0819Smrg  fi
12522b71ad168Smrg  printf "%s\n" "$as_me: error: $2" >&2
12523169a0819Smrg  as_fn_exit $as_status
12524169a0819Smrg} # as_fn_error
12525169a0819Smrg
12526169a0819Smrg
12527b71ad168Smrg
12528169a0819Smrg# as_fn_set_status STATUS
12529169a0819Smrg# -----------------------
12530169a0819Smrg# Set $? to STATUS, without forking.
12531169a0819Smrgas_fn_set_status ()
12532169a0819Smrg{
12533169a0819Smrg  return $1
12534169a0819Smrg} # as_fn_set_status
12535169a0819Smrg
12536169a0819Smrg# as_fn_exit STATUS
12537169a0819Smrg# -----------------
12538169a0819Smrg# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12539169a0819Smrgas_fn_exit ()
12540169a0819Smrg{
12541169a0819Smrg  set +e
12542169a0819Smrg  as_fn_set_status $1
12543169a0819Smrg  exit $1
12544169a0819Smrg} # as_fn_exit
12545169a0819Smrg
12546169a0819Smrg# as_fn_unset VAR
12547169a0819Smrg# ---------------
12548169a0819Smrg# Portably unset VAR.
12549169a0819Smrgas_fn_unset ()
12550169a0819Smrg{
12551169a0819Smrg  { eval $1=; unset $1;}
12552169a0819Smrg}
12553169a0819Smrgas_unset=as_fn_unset
12554b71ad168Smrg
12555169a0819Smrg# as_fn_append VAR VALUE
12556169a0819Smrg# ----------------------
12557169a0819Smrg# Append the text in VALUE to the end of the definition contained in VAR. Take
12558169a0819Smrg# advantage of any shell optimizations that allow amortized linear growth over
12559169a0819Smrg# repeated appends, instead of the typical quadratic growth present in naive
12560169a0819Smrg# implementations.
12561b71ad168Smrgif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
12562b71ad168Smrgthen :
12563169a0819Smrg  eval 'as_fn_append ()
12564169a0819Smrg  {
12565169a0819Smrg    eval $1+=\$2
12566169a0819Smrg  }'
12567b71ad168Smrgelse $as_nop
12568169a0819Smrg  as_fn_append ()
12569169a0819Smrg  {
12570169a0819Smrg    eval $1=\$$1\$2
12571169a0819Smrg  }
12572169a0819Smrgfi # as_fn_append
12573169a0819Smrg
12574169a0819Smrg# as_fn_arith ARG...
12575169a0819Smrg# ------------------
12576169a0819Smrg# Perform arithmetic evaluation on the ARGs, and store the result in the
12577169a0819Smrg# global $as_val. Take advantage of shells that can avoid forks. The arguments
12578169a0819Smrg# must be portable across $(()) and expr.
12579b71ad168Smrgif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
12580b71ad168Smrgthen :
12581169a0819Smrg  eval 'as_fn_arith ()
12582169a0819Smrg  {
12583169a0819Smrg    as_val=$(( $* ))
12584169a0819Smrg  }'
12585b71ad168Smrgelse $as_nop
12586169a0819Smrg  as_fn_arith ()
12587169a0819Smrg  {
12588169a0819Smrg    as_val=`expr "$@" || test $? -eq 1`
12589169a0819Smrg  }
12590169a0819Smrgfi # as_fn_arith
12591169a0819Smrg
12592169a0819Smrg
1259364ce7165Smrgif expr a : '\(a\)' >/dev/null 2>&1 &&
1259464ce7165Smrg   test "X`expr 00001 : '.*\(...\)'`" = X001; then
1259564ce7165Smrg  as_expr=expr
1259664ce7165Smrgelse
1259764ce7165Smrg  as_expr=false
1259864ce7165Smrgfi
1259964ce7165Smrg
1260064ce7165Smrgif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
1260164ce7165Smrg  as_basename=basename
1260264ce7165Smrgelse
1260364ce7165Smrg  as_basename=false
1260464ce7165Smrgfi
1260564ce7165Smrg
12606169a0819Smrgif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12607169a0819Smrg  as_dirname=dirname
12608169a0819Smrgelse
12609169a0819Smrg  as_dirname=false
12610169a0819Smrgfi
1261164ce7165Smrg
1261264ce7165Smrgas_me=`$as_basename -- "$0" ||
1261364ce7165Smrg$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
1261464ce7165Smrg	 X"$0" : 'X\(//\)$' \| \
1261564ce7165Smrg	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12616b71ad168Smrgprintf "%s\n" X/"$0" |
1261764ce7165Smrg    sed '/^.*\/\([^/][^/]*\)\/*$/{
1261864ce7165Smrg	    s//\1/
1261964ce7165Smrg	    q
1262064ce7165Smrg	  }
1262164ce7165Smrg	  /^X\/\(\/\/\)$/{
1262264ce7165Smrg	    s//\1/
1262364ce7165Smrg	    q
1262464ce7165Smrg	  }
1262564ce7165Smrg	  /^X\/\(\/\).*/{
1262664ce7165Smrg	    s//\1/
1262764ce7165Smrg	    q
1262864ce7165Smrg	  }
1262964ce7165Smrg	  s/.*/./; q'`
1263064ce7165Smrg
12631169a0819Smrg# Avoid depending upon Character Ranges.
12632169a0819Smrgas_cr_letters='abcdefghijklmnopqrstuvwxyz'
12633169a0819Smrgas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12634169a0819Smrgas_cr_Letters=$as_cr_letters$as_cr_LETTERS
12635169a0819Smrgas_cr_digits='0123456789'
12636169a0819Smrgas_cr_alnum=$as_cr_Letters$as_cr_digits
1263764ce7165Smrg
12638b71ad168Smrg
12639b71ad168Smrg# Determine whether it's possible to make 'echo' print without a newline.
12640b71ad168Smrg# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
12641b71ad168Smrg# for compatibility with existing Makefiles.
1264264ce7165SmrgECHO_C= ECHO_N= ECHO_T=
12643169a0819Smrgcase `echo -n x` in #(((((
1264464ce7165Smrg-n*)
12645169a0819Smrg  case `echo 'xy\c'` in
1264664ce7165Smrg  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
12647169a0819Smrg  xy)  ECHO_C='\c';;
12648169a0819Smrg  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
12649169a0819Smrg       ECHO_T='	';;
1265064ce7165Smrg  esac;;
1265164ce7165Smrg*)
1265264ce7165Smrg  ECHO_N='-n';;
1265364ce7165Smrgesac
1265464ce7165Smrg
12655b71ad168Smrg# For backward compatibility with old third-party macros, we provide
12656b71ad168Smrg# the shell variables $as_echo and $as_echo_n.  New code should use
12657b71ad168Smrg# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
12658b71ad168Smrgas_echo='printf %s\n'
12659b71ad168Smrgas_echo_n='printf %s'
12660b71ad168Smrg
1266164ce7165Smrgrm -f conf$$ conf$$.exe conf$$.file
1266264ce7165Smrgif test -d conf$$.dir; then
1266364ce7165Smrg  rm -f conf$$.dir/conf$$.file
1266464ce7165Smrgelse
1266564ce7165Smrg  rm -f conf$$.dir
12666fb23d3a8Smrg  mkdir conf$$.dir 2>/dev/null
12667fb23d3a8Smrgfi
12668fb23d3a8Smrgif (echo >conf$$.file) 2>/dev/null; then
12669fb23d3a8Smrg  if ln -s conf$$.file conf$$ 2>/dev/null; then
12670fb23d3a8Smrg    as_ln_s='ln -s'
12671fb23d3a8Smrg    # ... but there are two gotchas:
12672fb23d3a8Smrg    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12673fb23d3a8Smrg    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
1267495fdd44cSmrg    # In both cases, we have to default to `cp -pR'.
12675fb23d3a8Smrg    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
1267695fdd44cSmrg      as_ln_s='cp -pR'
12677fb23d3a8Smrg  elif ln conf$$.file conf$$ 2>/dev/null; then
12678fb23d3a8Smrg    as_ln_s=ln
12679fb23d3a8Smrg  else
1268095fdd44cSmrg    as_ln_s='cp -pR'
12681fb23d3a8Smrg  fi
1268264ce7165Smrgelse
1268395fdd44cSmrg  as_ln_s='cp -pR'
1268464ce7165Smrgfi
1268564ce7165Smrgrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
1268664ce7165Smrgrmdir conf$$.dir 2>/dev/null
1268764ce7165Smrg
12688169a0819Smrg
12689169a0819Smrg# as_fn_mkdir_p
12690169a0819Smrg# -------------
12691169a0819Smrg# Create "$as_dir" as a directory, including parents if necessary.
12692169a0819Smrgas_fn_mkdir_p ()
12693169a0819Smrg{
12694169a0819Smrg
12695169a0819Smrg  case $as_dir in #(
12696169a0819Smrg  -*) as_dir=./$as_dir;;
12697169a0819Smrg  esac
12698169a0819Smrg  test -d "$as_dir" || eval $as_mkdir_p || {
12699169a0819Smrg    as_dirs=
12700169a0819Smrg    while :; do
12701169a0819Smrg      case $as_dir in #(
12702b71ad168Smrg      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12703169a0819Smrg      *) as_qdir=$as_dir;;
12704169a0819Smrg      esac
12705169a0819Smrg      as_dirs="'$as_qdir' $as_dirs"
12706169a0819Smrg      as_dir=`$as_dirname -- "$as_dir" ||
12707169a0819Smrg$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12708169a0819Smrg	 X"$as_dir" : 'X\(//\)[^/]' \| \
12709169a0819Smrg	 X"$as_dir" : 'X\(//\)$' \| \
12710169a0819Smrg	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12711b71ad168Smrgprintf "%s\n" X"$as_dir" |
12712169a0819Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12713169a0819Smrg	    s//\1/
12714169a0819Smrg	    q
12715169a0819Smrg	  }
12716169a0819Smrg	  /^X\(\/\/\)[^/].*/{
12717169a0819Smrg	    s//\1/
12718169a0819Smrg	    q
12719169a0819Smrg	  }
12720169a0819Smrg	  /^X\(\/\/\)$/{
12721169a0819Smrg	    s//\1/
12722169a0819Smrg	    q
12723169a0819Smrg	  }
12724169a0819Smrg	  /^X\(\/\).*/{
12725169a0819Smrg	    s//\1/
12726169a0819Smrg	    q
12727169a0819Smrg	  }
12728169a0819Smrg	  s/.*/./; q'`
12729169a0819Smrg      test -d "$as_dir" && break
12730169a0819Smrg    done
12731169a0819Smrg    test -z "$as_dirs" || eval "mkdir $as_dirs"
12732169a0819Smrg  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
12733169a0819Smrg
12734169a0819Smrg
12735169a0819Smrg} # as_fn_mkdir_p
1273664ce7165Smrgif mkdir -p . 2>/dev/null; then
12737169a0819Smrg  as_mkdir_p='mkdir -p "$as_dir"'
1273864ce7165Smrgelse
1273964ce7165Smrg  test -d ./-p && rmdir ./-p
1274064ce7165Smrg  as_mkdir_p=false
1274164ce7165Smrgfi
1274264ce7165Smrg
1274395fdd44cSmrg
1274495fdd44cSmrg# as_fn_executable_p FILE
1274595fdd44cSmrg# -----------------------
1274695fdd44cSmrg# Test if FILE is an executable regular file.
1274795fdd44cSmrgas_fn_executable_p ()
1274895fdd44cSmrg{
1274995fdd44cSmrg  test -f "$1" && test -x "$1"
1275095fdd44cSmrg} # as_fn_executable_p
1275195fdd44cSmrgas_test_x='test -x'
1275295fdd44cSmrgas_executable_p=as_fn_executable_p
1275364ce7165Smrg
1275464ce7165Smrg# Sed expression to map a string onto a valid CPP name.
1275564ce7165Smrgas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
1275664ce7165Smrg
1275764ce7165Smrg# Sed expression to map a string onto a valid variable name.
1275864ce7165Smrgas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
1275964ce7165Smrg
1276064ce7165Smrg
1276164ce7165Smrgexec 6>&1
12762169a0819Smrg## ----------------------------------- ##
12763169a0819Smrg## Main body of $CONFIG_STATUS script. ##
12764169a0819Smrg## ----------------------------------- ##
12765169a0819Smrg_ASEOF
12766169a0819Smrgtest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
1276764ce7165Smrg
12768169a0819Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12769169a0819Smrg# Save the log message, to keep $0 and so on meaningful, and to
1277064ce7165Smrg# report actual input values of CONFIG_FILES etc. instead of their
1277164ce7165Smrg# values after options handling.
1277264ce7165Smrgac_log="
12773b71ad168SmrgThis file was extended by xhost $as_me 1.0.9, which was
12774b71ad168Smrggenerated by GNU Autoconf 2.71.  Invocation command line was
1277564ce7165Smrg
1277664ce7165Smrg  CONFIG_FILES    = $CONFIG_FILES
1277764ce7165Smrg  CONFIG_HEADERS  = $CONFIG_HEADERS
1277864ce7165Smrg  CONFIG_LINKS    = $CONFIG_LINKS
1277964ce7165Smrg  CONFIG_COMMANDS = $CONFIG_COMMANDS
1278064ce7165Smrg  $ $0 $@
1278164ce7165Smrg
1278264ce7165Smrgon `(hostname || uname -n) 2>/dev/null | sed 1q`
1278364ce7165Smrg"
1278464ce7165Smrg
1278564ce7165Smrg_ACEOF
1278664ce7165Smrg
12787fb23d3a8Smrgcase $ac_config_files in *"
12788fb23d3a8Smrg"*) set x $ac_config_files; shift; ac_config_files=$*;;
12789fb23d3a8Smrgesac
12790fb23d3a8Smrg
12791fb23d3a8Smrgcase $ac_config_headers in *"
12792fb23d3a8Smrg"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
12793fb23d3a8Smrgesac
12794fb23d3a8Smrg
12795fb23d3a8Smrg
12796fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1279764ce7165Smrg# Files that config.status was made for.
1279864ce7165Smrgconfig_files="$ac_config_files"
1279964ce7165Smrgconfig_headers="$ac_config_headers"
1280064ce7165Smrgconfig_commands="$ac_config_commands"
1280164ce7165Smrg
1280264ce7165Smrg_ACEOF
1280364ce7165Smrg
12804fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1280564ce7165Smrgac_cs_usage="\
12806169a0819Smrg\`$as_me' instantiates files and other configuration actions
12807169a0819Smrgfrom templates according to the current configuration.  Unless the files
12808169a0819Smrgand actions are specified as TAGs, all are instantiated by default.
1280964ce7165Smrg
12810169a0819SmrgUsage: $0 [OPTION]... [TAG]...
1281164ce7165Smrg
1281264ce7165Smrg  -h, --help       print this help, then exit
1281364ce7165Smrg  -V, --version    print version number and configuration settings, then exit
12814169a0819Smrg      --config     print configuration, then exit
12815fb23d3a8Smrg  -q, --quiet, --silent
12816fb23d3a8Smrg                   do not print progress messages
1281764ce7165Smrg  -d, --debug      don't remove temporary files
1281864ce7165Smrg      --recheck    update $as_me by reconfiguring in the same conditions
12819fb23d3a8Smrg      --file=FILE[:TEMPLATE]
12820fb23d3a8Smrg                   instantiate the configuration file FILE
12821fb23d3a8Smrg      --header=FILE[:TEMPLATE]
12822fb23d3a8Smrg                   instantiate the configuration header FILE
1282364ce7165Smrg
1282464ce7165SmrgConfiguration files:
1282564ce7165Smrg$config_files
1282664ce7165Smrg
1282764ce7165SmrgConfiguration headers:
1282864ce7165Smrg$config_headers
1282964ce7165Smrg
1283064ce7165SmrgConfiguration commands:
1283164ce7165Smrg$config_commands
1283264ce7165Smrg
12833b71ad168SmrgReport bugs to <https://gitlab.freedesktop.org/xorg/app/xhost/-/issues>."
1283464ce7165Smrg
1283564ce7165Smrg_ACEOF
12836b71ad168Smrgac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
12837b71ad168Smrgac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
12838fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12839b71ad168Smrgac_cs_config='$ac_cs_config_escaped'
1284064ce7165Smrgac_cs_version="\\
12841b71ad168Smrgxhost config.status 1.0.9
12842b71ad168Smrgconfigured by $0, generated by GNU Autoconf 2.71,
12843169a0819Smrg  with options \\"\$ac_cs_config\\"
1284464ce7165Smrg
12845b71ad168SmrgCopyright (C) 2021 Free Software Foundation, Inc.
1284664ce7165SmrgThis config.status script is free software; the Free Software Foundation
1284764ce7165Smrggives unlimited permission to copy, distribute and modify it."
1284864ce7165Smrg
1284964ce7165Smrgac_pwd='$ac_pwd'
1285064ce7165Smrgsrcdir='$srcdir'
1285164ce7165SmrgINSTALL='$INSTALL'
1285264ce7165SmrgMKDIR_P='$MKDIR_P'
12853fb23d3a8SmrgAWK='$AWK'
12854fb23d3a8Smrgtest -n "\$AWK" || AWK=awk
1285564ce7165Smrg_ACEOF
1285664ce7165Smrg
12857fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12858fb23d3a8Smrg# The default lists apply if the user does not specify any file.
1285964ce7165Smrgac_need_defaults=:
1286064ce7165Smrgwhile test $# != 0
1286164ce7165Smrgdo
1286264ce7165Smrg  case $1 in
12863169a0819Smrg  --*=?*)
1286464ce7165Smrg    ac_option=`expr "X$1" : 'X\([^=]*\)='`
1286564ce7165Smrg    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
1286664ce7165Smrg    ac_shift=:
1286764ce7165Smrg    ;;
12868169a0819Smrg  --*=)
12869169a0819Smrg    ac_option=`expr "X$1" : 'X\([^=]*\)='`
12870169a0819Smrg    ac_optarg=
12871169a0819Smrg    ac_shift=:
12872169a0819Smrg    ;;
1287364ce7165Smrg  *)
1287464ce7165Smrg    ac_option=$1
1287564ce7165Smrg    ac_optarg=$2
1287664ce7165Smrg    ac_shift=shift
1287764ce7165Smrg    ;;
1287864ce7165Smrg  esac
1287964ce7165Smrg
1288064ce7165Smrg  case $ac_option in
1288164ce7165Smrg  # Handling of the options.
1288264ce7165Smrg  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1288364ce7165Smrg    ac_cs_recheck=: ;;
1288464ce7165Smrg  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12885b71ad168Smrg    printf "%s\n" "$ac_cs_version"; exit ;;
12886169a0819Smrg  --config | --confi | --conf | --con | --co | --c )
12887b71ad168Smrg    printf "%s\n" "$ac_cs_config"; exit ;;
1288864ce7165Smrg  --debug | --debu | --deb | --de | --d | -d )
1288964ce7165Smrg    debug=: ;;
1289064ce7165Smrg  --file | --fil | --fi | --f )
1289164ce7165Smrg    $ac_shift
12892fb23d3a8Smrg    case $ac_optarg in
12893b71ad168Smrg    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12894169a0819Smrg    '') as_fn_error $? "missing file argument" ;;
12895fb23d3a8Smrg    esac
12896169a0819Smrg    as_fn_append CONFIG_FILES " '$ac_optarg'"
1289764ce7165Smrg    ac_need_defaults=false;;
1289864ce7165Smrg  --header | --heade | --head | --hea )
1289964ce7165Smrg    $ac_shift
12900fb23d3a8Smrg    case $ac_optarg in
12901b71ad168Smrg    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12902fb23d3a8Smrg    esac
12903169a0819Smrg    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
1290464ce7165Smrg    ac_need_defaults=false;;
1290564ce7165Smrg  --he | --h)
1290664ce7165Smrg    # Conflict between --help and --header
12907169a0819Smrg    as_fn_error $? "ambiguous option: \`$1'
12908169a0819SmrgTry \`$0 --help' for more information.";;
1290964ce7165Smrg  --help | --hel | -h )
12910b71ad168Smrg    printf "%s\n" "$ac_cs_usage"; exit ;;
1291164ce7165Smrg  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1291264ce7165Smrg  | -silent | --silent | --silen | --sile | --sil | --si | --s)
1291364ce7165Smrg    ac_cs_silent=: ;;
1291464ce7165Smrg
1291564ce7165Smrg  # This is an error.
12916169a0819Smrg  -*) as_fn_error $? "unrecognized option: \`$1'
12917169a0819SmrgTry \`$0 --help' for more information." ;;
1291864ce7165Smrg
12919169a0819Smrg  *) as_fn_append ac_config_targets " $1"
1292064ce7165Smrg     ac_need_defaults=false ;;
1292164ce7165Smrg
1292264ce7165Smrg  esac
1292364ce7165Smrg  shift
1292464ce7165Smrgdone
1292564ce7165Smrg
1292664ce7165Smrgac_configure_extra_args=
1292764ce7165Smrg
1292864ce7165Smrgif $ac_cs_silent; then
1292964ce7165Smrg  exec 6>/dev/null
1293064ce7165Smrg  ac_configure_extra_args="$ac_configure_extra_args --silent"
1293164ce7165Smrgfi
1293264ce7165Smrg
1293364ce7165Smrg_ACEOF
12934fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1293564ce7165Smrgif \$ac_cs_recheck; then
1293695fdd44cSmrg  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12937fb23d3a8Smrg  shift
12938b71ad168Smrg  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
12939fb23d3a8Smrg  CONFIG_SHELL='$SHELL'
1294064ce7165Smrg  export CONFIG_SHELL
12941fb23d3a8Smrg  exec "\$@"
1294264ce7165Smrgfi
1294364ce7165Smrg
1294464ce7165Smrg_ACEOF
12945fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1294664ce7165Smrgexec 5>>config.log
1294764ce7165Smrg{
1294864ce7165Smrg  echo
1294964ce7165Smrg  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
1295064ce7165Smrg## Running $as_me. ##
1295164ce7165Smrg_ASBOX
12952b71ad168Smrg  printf "%s\n" "$ac_log"
1295364ce7165Smrg} >&5
1295464ce7165Smrg
1295564ce7165Smrg_ACEOF
12956fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1295764ce7165Smrg#
1295864ce7165Smrg# INIT-COMMANDS
1295964ce7165Smrg#
12960b71ad168SmrgAMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
1296164ce7165Smrg
1296264ce7165Smrg_ACEOF
1296364ce7165Smrg
12964fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1296564ce7165Smrg
1296664ce7165Smrg# Handling of arguments.
1296764ce7165Smrgfor ac_config_target in $ac_config_targets
1296864ce7165Smrgdo
1296964ce7165Smrg  case $ac_config_target in
1297064ce7165Smrg    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
1297164ce7165Smrg    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
1297264ce7165Smrg    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
129733544ea2eSmrg    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
1297464ce7165Smrg
12975169a0819Smrg  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
1297664ce7165Smrg  esac
1297764ce7165Smrgdone
1297864ce7165Smrg
1297964ce7165Smrg
1298064ce7165Smrg# If the user did not use the arguments to specify the items to instantiate,
1298164ce7165Smrg# then the envvar interface is used.  Set only those that are not.
1298264ce7165Smrg# We use the long form for the default assignment because of an extremely
1298364ce7165Smrg# bizarre bug on SunOS 4.1.3.
1298464ce7165Smrgif $ac_need_defaults; then
12985b71ad168Smrg  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
12986b71ad168Smrg  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
12987b71ad168Smrg  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
1298864ce7165Smrgfi
1298964ce7165Smrg
1299064ce7165Smrg# Have a temporary directory for convenience.  Make it in the build tree
1299164ce7165Smrg# simply because there is no reason against having it here, and in addition,
1299264ce7165Smrg# creating and moving files from /tmp can sometimes cause problems.
1299364ce7165Smrg# Hook for its removal unless debugging.
1299464ce7165Smrg# Note that there is a small window in which the directory will not be cleaned:
1299564ce7165Smrg# after its creation but before its name has been assigned to `$tmp'.
1299664ce7165Smrg$debug ||
1299764ce7165Smrg{
12998169a0819Smrg  tmp= ac_tmp=
1299964ce7165Smrg  trap 'exit_status=$?
13000169a0819Smrg  : "${ac_tmp:=$tmp}"
13001169a0819Smrg  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
1300264ce7165Smrg' 0
13003169a0819Smrg  trap 'as_fn_exit 1' 1 2 13 15
1300464ce7165Smrg}
1300564ce7165Smrg# Create a (secure) tmp directory for tmp files.
1300664ce7165Smrg
1300764ce7165Smrg{
1300864ce7165Smrg  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
13009169a0819Smrg  test -d "$tmp"
1301064ce7165Smrg}  ||
1301164ce7165Smrg{
1301264ce7165Smrg  tmp=./conf$$-$RANDOM
1301364ce7165Smrg  (umask 077 && mkdir "$tmp")
13014169a0819Smrg} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
13015169a0819Smrgac_tmp=$tmp
1301664ce7165Smrg
13017fb23d3a8Smrg# Set up the scripts for CONFIG_FILES section.
13018fb23d3a8Smrg# No need to generate them if there are no CONFIG_FILES.
13019fb23d3a8Smrg# This happens for instance with `./config.status config.h'.
1302064ce7165Smrgif test -n "$CONFIG_FILES"; then
1302164ce7165Smrg
1302264ce7165Smrg
13023169a0819Smrgac_cr=`echo X | tr X '\015'`
13024169a0819Smrg# On cygwin, bash can eat \r inside `` if the user requested igncr.
13025169a0819Smrg# But we know of no other shell where ac_cr would be empty at this
13026169a0819Smrg# point, so we can use a bashism as a fallback.
13027169a0819Smrgif test "x$ac_cr" = x; then
13028169a0819Smrg  eval ac_cr=\$\'\\r\'
13029169a0819Smrgfi
13030fb23d3a8Smrgac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
13031fb23d3a8Smrgif test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
13032fb23d3a8Smrg  ac_cs_awk_cr='\\r'
13033fb23d3a8Smrgelse
13034fb23d3a8Smrg  ac_cs_awk_cr=$ac_cr
1303564ce7165Smrgfi
1303664ce7165Smrg
13037169a0819Smrgecho 'BEGIN {' >"$ac_tmp/subs1.awk" &&
1303864ce7165Smrg_ACEOF
1303964ce7165Smrg
1304064ce7165Smrg
13041fb23d3a8Smrg{
13042fb23d3a8Smrg  echo "cat >conf$$subs.awk <<_ACEOF" &&
13043fb23d3a8Smrg  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
13044fb23d3a8Smrg  echo "_ACEOF"
13045fb23d3a8Smrg} >conf$$subs.sh ||
13046169a0819Smrg  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
13047169a0819Smrgac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
1304864ce7165Smrgac_delim='%!_!# '
1304964ce7165Smrgfor ac_last_try in false false false false false :; do
13050fb23d3a8Smrg  . ./conf$$subs.sh ||
13051169a0819Smrg    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1305264ce7165Smrg
13053fb23d3a8Smrg  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
13054fb23d3a8Smrg  if test $ac_delim_n = $ac_delim_num; then
1305564ce7165Smrg    break
1305664ce7165Smrg  elif $ac_last_try; then
13057169a0819Smrg    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
1305864ce7165Smrg  else
1305964ce7165Smrg    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
1306064ce7165Smrg  fi
1306164ce7165Smrgdone
13062fb23d3a8Smrgrm -f conf$$subs.sh
1306364ce7165Smrg
13064fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13065169a0819Smrgcat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
13066fb23d3a8Smrg_ACEOF
13067fb23d3a8Smrgsed -n '
13068fb23d3a8Smrgh
13069fb23d3a8Smrgs/^/S["/; s/!.*/"]=/
13070fb23d3a8Smrgp
13071fb23d3a8Smrgg
13072fb23d3a8Smrgs/^[^!]*!//
13073fb23d3a8Smrg:repl
13074fb23d3a8Smrgt repl
13075fb23d3a8Smrgs/'"$ac_delim"'$//
13076fb23d3a8Smrgt delim
13077fb23d3a8Smrg:nl
13078fb23d3a8Smrgh
13079169a0819Smrgs/\(.\{148\}\)..*/\1/
13080fb23d3a8Smrgt more1
13081fb23d3a8Smrgs/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
13082fb23d3a8Smrgp
13083fb23d3a8Smrgn
13084fb23d3a8Smrgb repl
13085fb23d3a8Smrg:more1
13086fb23d3a8Smrgs/["\\]/\\&/g; s/^/"/; s/$/"\\/
13087fb23d3a8Smrgp
13088fb23d3a8Smrgg
13089fb23d3a8Smrgs/.\{148\}//
13090fb23d3a8Smrgt nl
13091fb23d3a8Smrg:delim
13092fb23d3a8Smrgh
13093169a0819Smrgs/\(.\{148\}\)..*/\1/
13094fb23d3a8Smrgt more2
13095fb23d3a8Smrgs/["\\]/\\&/g; s/^/"/; s/$/"/
13096fb23d3a8Smrgp
13097fb23d3a8Smrgb
13098fb23d3a8Smrg:more2
13099fb23d3a8Smrgs/["\\]/\\&/g; s/^/"/; s/$/"\\/
13100fb23d3a8Smrgp
13101fb23d3a8Smrgg
13102fb23d3a8Smrgs/.\{148\}//
13103fb23d3a8Smrgt delim
13104fb23d3a8Smrg' <conf$$subs.awk | sed '
13105fb23d3a8Smrg/^[^""]/{
13106fb23d3a8Smrg  N
13107fb23d3a8Smrg  s/\n//
13108fb23d3a8Smrg}
13109fb23d3a8Smrg' >>$CONFIG_STATUS || ac_write_fail=1
13110fb23d3a8Smrgrm -f conf$$subs.awk
13111fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13112fb23d3a8Smrg_ACAWK
13113169a0819Smrgcat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
13114fb23d3a8Smrg  for (key in S) S_is_set[key] = 1
13115fb23d3a8Smrg  FS = ""
13116fb23d3a8Smrg
13117fb23d3a8Smrg}
13118fb23d3a8Smrg{
13119fb23d3a8Smrg  line = $ 0
13120fb23d3a8Smrg  nfields = split(line, field, "@")
13121fb23d3a8Smrg  substed = 0
13122fb23d3a8Smrg  len = length(field[1])
13123fb23d3a8Smrg  for (i = 2; i < nfields; i++) {
13124fb23d3a8Smrg    key = field[i]
13125fb23d3a8Smrg    keylen = length(key)
13126fb23d3a8Smrg    if (S_is_set[key]) {
13127fb23d3a8Smrg      value = S[key]
13128fb23d3a8Smrg      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
13129fb23d3a8Smrg      len += length(value) + length(field[++i])
13130fb23d3a8Smrg      substed = 1
13131fb23d3a8Smrg    } else
13132fb23d3a8Smrg      len += 1 + keylen
13133fb23d3a8Smrg  }
13134fb23d3a8Smrg
13135fb23d3a8Smrg  print line
13136fb23d3a8Smrg}
1313764ce7165Smrg
13138fb23d3a8Smrg_ACAWK
1313964ce7165Smrg_ACEOF
13140fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13141fb23d3a8Smrgif sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
13142fb23d3a8Smrg  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
13143fb23d3a8Smrgelse
13144fb23d3a8Smrg  cat
13145169a0819Smrgfi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
13146169a0819Smrg  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
1314764ce7165Smrg_ACEOF
1314864ce7165Smrg
13149169a0819Smrg# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
13150169a0819Smrg# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
1315164ce7165Smrg# trailing colons and then remove the whole line if VPATH becomes empty
1315264ce7165Smrg# (actually we leave an empty line to preserve line numbers).
1315364ce7165Smrgif test "x$srcdir" = x.; then
13154169a0819Smrg  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
13155169a0819Smrgh
13156169a0819Smrgs///
13157169a0819Smrgs/^/:/
13158169a0819Smrgs/[	 ]*$/:/
13159169a0819Smrgs/:\$(srcdir):/:/g
13160169a0819Smrgs/:\${srcdir}:/:/g
13161169a0819Smrgs/:@srcdir@:/:/g
13162169a0819Smrgs/^:*//
1316364ce7165Smrgs/:*$//
13164169a0819Smrgx
13165169a0819Smrgs/\(=[	 ]*\).*/\1/
13166169a0819SmrgG
13167169a0819Smrgs/\n//
1316864ce7165Smrgs/^[^=]*=[	 ]*$//
1316964ce7165Smrg}'
1317064ce7165Smrgfi
1317164ce7165Smrg
13172fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1317364ce7165Smrgfi # test -n "$CONFIG_FILES"
1317464ce7165Smrg
13175fb23d3a8Smrg# Set up the scripts for CONFIG_HEADERS section.
13176fb23d3a8Smrg# No need to generate them if there are no CONFIG_HEADERS.
13177fb23d3a8Smrg# This happens for instance with `./config.status Makefile'.
13178fb23d3a8Smrgif test -n "$CONFIG_HEADERS"; then
13179169a0819Smrgcat >"$ac_tmp/defines.awk" <<\_ACAWK ||
13180fb23d3a8SmrgBEGIN {
13181fb23d3a8Smrg_ACEOF
13182fb23d3a8Smrg
13183fb23d3a8Smrg# Transform confdefs.h into an awk script `defines.awk', embedded as
13184fb23d3a8Smrg# here-document in config.status, that substitutes the proper values into
13185fb23d3a8Smrg# config.h.in to produce config.h.
13186fb23d3a8Smrg
13187fb23d3a8Smrg# Create a delimiter string that does not exist in confdefs.h, to ease
13188fb23d3a8Smrg# handling of long lines.
13189fb23d3a8Smrgac_delim='%!_!# '
13190fb23d3a8Smrgfor ac_last_try in false false :; do
13191169a0819Smrg  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
13192169a0819Smrg  if test -z "$ac_tt"; then
13193fb23d3a8Smrg    break
13194fb23d3a8Smrg  elif $ac_last_try; then
13195169a0819Smrg    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
13196fb23d3a8Smrg  else
13197fb23d3a8Smrg    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
13198fb23d3a8Smrg  fi
13199fb23d3a8Smrgdone
13200fb23d3a8Smrg
13201fb23d3a8Smrg# For the awk script, D is an array of macro values keyed by name,
13202fb23d3a8Smrg# likewise P contains macro parameters if any.  Preserve backslash
13203fb23d3a8Smrg# newline sequences.
13204fb23d3a8Smrg
13205fb23d3a8Smrgac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
13206fb23d3a8Smrgsed -n '
13207fb23d3a8Smrgs/.\{148\}/&'"$ac_delim"'/g
13208fb23d3a8Smrgt rset
13209fb23d3a8Smrg:rset
13210fb23d3a8Smrgs/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
13211fb23d3a8Smrgt def
13212fb23d3a8Smrgd
13213fb23d3a8Smrg:def
13214fb23d3a8Smrgs/\\$//
13215fb23d3a8Smrgt bsnl
13216fb23d3a8Smrgs/["\\]/\\&/g
13217fb23d3a8Smrgs/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
13218fb23d3a8SmrgD["\1"]=" \3"/p
13219fb23d3a8Smrgs/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
13220fb23d3a8Smrgd
13221fb23d3a8Smrg:bsnl
13222fb23d3a8Smrgs/["\\]/\\&/g
13223fb23d3a8Smrgs/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
13224fb23d3a8SmrgD["\1"]=" \3\\\\\\n"\\/p
13225fb23d3a8Smrgt cont
13226fb23d3a8Smrgs/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
13227fb23d3a8Smrgt cont
13228fb23d3a8Smrgd
13229fb23d3a8Smrg:cont
13230fb23d3a8Smrgn
13231fb23d3a8Smrgs/.\{148\}/&'"$ac_delim"'/g
13232fb23d3a8Smrgt clear
13233fb23d3a8Smrg:clear
13234fb23d3a8Smrgs/\\$//
13235fb23d3a8Smrgt bsnlc
13236fb23d3a8Smrgs/["\\]/\\&/g; s/^/"/; s/$/"/p
13237fb23d3a8Smrgd
13238fb23d3a8Smrg:bsnlc
13239fb23d3a8Smrgs/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13240fb23d3a8Smrgb cont
13241fb23d3a8Smrg' <confdefs.h | sed '
13242fb23d3a8Smrgs/'"$ac_delim"'/"\\\
13243fb23d3a8Smrg"/g' >>$CONFIG_STATUS || ac_write_fail=1
13244fb23d3a8Smrg
13245fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13246fb23d3a8Smrg  for (key in D) D_is_set[key] = 1
13247fb23d3a8Smrg  FS = ""
13248fb23d3a8Smrg}
13249fb23d3a8Smrg/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13250fb23d3a8Smrg  line = \$ 0
13251fb23d3a8Smrg  split(line, arg, " ")
13252fb23d3a8Smrg  if (arg[1] == "#") {
13253fb23d3a8Smrg    defundef = arg[2]
13254fb23d3a8Smrg    mac1 = arg[3]
13255fb23d3a8Smrg  } else {
13256fb23d3a8Smrg    defundef = substr(arg[1], 2)
13257fb23d3a8Smrg    mac1 = arg[2]
13258fb23d3a8Smrg  }
13259fb23d3a8Smrg  split(mac1, mac2, "(") #)
13260fb23d3a8Smrg  macro = mac2[1]
13261fb23d3a8Smrg  prefix = substr(line, 1, index(line, defundef) - 1)
13262fb23d3a8Smrg  if (D_is_set[macro]) {
13263fb23d3a8Smrg    # Preserve the white space surrounding the "#".
13264fb23d3a8Smrg    print prefix "define", macro P[macro] D[macro]
13265fb23d3a8Smrg    next
13266fb23d3a8Smrg  } else {
13267fb23d3a8Smrg    # Replace #undef with comments.  This is necessary, for example,
13268fb23d3a8Smrg    # in the case of _POSIX_SOURCE, which is predefined and required
13269fb23d3a8Smrg    # on some systems where configure will not decide to define it.
13270fb23d3a8Smrg    if (defundef == "undef") {
13271fb23d3a8Smrg      print "/*", prefix defundef, macro, "*/"
13272fb23d3a8Smrg      next
13273fb23d3a8Smrg    }
13274fb23d3a8Smrg  }
13275fb23d3a8Smrg}
13276fb23d3a8Smrg{ print }
13277fb23d3a8Smrg_ACAWK
13278fb23d3a8Smrg_ACEOF
13279fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13280169a0819Smrg  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
13281fb23d3a8Smrgfi # test -n "$CONFIG_HEADERS"
13282fb23d3a8Smrg
1328364ce7165Smrg
13284fb23d3a8Smrgeval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
13285fb23d3a8Smrgshift
13286fb23d3a8Smrgfor ac_tag
1328764ce7165Smrgdo
1328864ce7165Smrg  case $ac_tag in
1328964ce7165Smrg  :[FHLC]) ac_mode=$ac_tag; continue;;
1329064ce7165Smrg  esac
1329164ce7165Smrg  case $ac_mode$ac_tag in
1329264ce7165Smrg  :[FHL]*:*);;
13293169a0819Smrg  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
1329464ce7165Smrg  :[FH]-) ac_tag=-:-;;
1329564ce7165Smrg  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
1329664ce7165Smrg  esac
1329764ce7165Smrg  ac_save_IFS=$IFS
1329864ce7165Smrg  IFS=:
1329964ce7165Smrg  set x $ac_tag
1330064ce7165Smrg  IFS=$ac_save_IFS
1330164ce7165Smrg  shift
1330264ce7165Smrg  ac_file=$1
1330364ce7165Smrg  shift
1330464ce7165Smrg
1330564ce7165Smrg  case $ac_mode in
1330664ce7165Smrg  :L) ac_source=$1;;
1330764ce7165Smrg  :[FH])
1330864ce7165Smrg    ac_file_inputs=
1330964ce7165Smrg    for ac_f
1331064ce7165Smrg    do
1331164ce7165Smrg      case $ac_f in
13312169a0819Smrg      -) ac_f="$ac_tmp/stdin";;
1331364ce7165Smrg      *) # Look for the file first in the build tree, then in the source tree
1331464ce7165Smrg	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
1331564ce7165Smrg	 # because $ac_f cannot contain `:'.
1331664ce7165Smrg	 test -f "$ac_f" ||
1331764ce7165Smrg	   case $ac_f in
1331864ce7165Smrg	   [\\/$]*) false;;
1331964ce7165Smrg	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1332064ce7165Smrg	   esac ||
13321169a0819Smrg	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
1332264ce7165Smrg      esac
13323b71ad168Smrg      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13324169a0819Smrg      as_fn_append ac_file_inputs " '$ac_f'"
1332564ce7165Smrg    done
1332664ce7165Smrg
1332764ce7165Smrg    # Let's still pretend it is `configure' which instantiates (i.e., don't
1332864ce7165Smrg    # use $as_me), people would be surprised to read:
1332964ce7165Smrg    #    /* config.h.  Generated by config.status.  */
13330fb23d3a8Smrg    configure_input='Generated from '`
13331b71ad168Smrg	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13332fb23d3a8Smrg	`' by configure.'
1333364ce7165Smrg    if test x"$ac_file" != x-; then
1333464ce7165Smrg      configure_input="$ac_file.  $configure_input"
13335b71ad168Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13336b71ad168Smrgprintf "%s\n" "$as_me: creating $ac_file" >&6;}
1333764ce7165Smrg    fi
13338fb23d3a8Smrg    # Neutralize special characters interpreted by sed in replacement strings.
13339fb23d3a8Smrg    case $configure_input in #(
13340fb23d3a8Smrg    *\&* | *\|* | *\\* )
13341b71ad168Smrg       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
13342fb23d3a8Smrg       sed 's/[\\\\&|]/\\\\&/g'`;; #(
13343fb23d3a8Smrg    *) ac_sed_conf_input=$configure_input;;
13344fb23d3a8Smrg    esac
1334564ce7165Smrg
1334664ce7165Smrg    case $ac_tag in
13347169a0819Smrg    *:-:* | *:-) cat >"$ac_tmp/stdin" \
13348169a0819Smrg      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
1334964ce7165Smrg    esac
1335064ce7165Smrg    ;;
1335164ce7165Smrg  esac
1335264ce7165Smrg
1335364ce7165Smrg  ac_dir=`$as_dirname -- "$ac_file" ||
1335464ce7165Smrg$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1335564ce7165Smrg	 X"$ac_file" : 'X\(//\)[^/]' \| \
1335664ce7165Smrg	 X"$ac_file" : 'X\(//\)$' \| \
1335764ce7165Smrg	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13358b71ad168Smrgprintf "%s\n" X"$ac_file" |
1335964ce7165Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336064ce7165Smrg	    s//\1/
1336164ce7165Smrg	    q
1336264ce7165Smrg	  }
1336364ce7165Smrg	  /^X\(\/\/\)[^/].*/{
1336464ce7165Smrg	    s//\1/
1336564ce7165Smrg	    q
1336664ce7165Smrg	  }
1336764ce7165Smrg	  /^X\(\/\/\)$/{
1336864ce7165Smrg	    s//\1/
1336964ce7165Smrg	    q
1337064ce7165Smrg	  }
1337164ce7165Smrg	  /^X\(\/\).*/{
1337264ce7165Smrg	    s//\1/
1337364ce7165Smrg	    q
1337464ce7165Smrg	  }
1337564ce7165Smrg	  s/.*/./; q'`
13376169a0819Smrg  as_dir="$ac_dir"; as_fn_mkdir_p
1337764ce7165Smrg  ac_builddir=.
1337864ce7165Smrg
1337964ce7165Smrgcase "$ac_dir" in
1338064ce7165Smrg.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1338164ce7165Smrg*)
13382b71ad168Smrg  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1338364ce7165Smrg  # A ".." for each directory in $ac_dir_suffix.
13384b71ad168Smrg  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1338564ce7165Smrg  case $ac_top_builddir_sub in
1338664ce7165Smrg  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1338764ce7165Smrg  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1338864ce7165Smrg  esac ;;
1338964ce7165Smrgesac
1339064ce7165Smrgac_abs_top_builddir=$ac_pwd
1339164ce7165Smrgac_abs_builddir=$ac_pwd$ac_dir_suffix
1339264ce7165Smrg# for backward compatibility:
1339364ce7165Smrgac_top_builddir=$ac_top_build_prefix
1339464ce7165Smrg
1339564ce7165Smrgcase $srcdir in
1339664ce7165Smrg  .)  # We are building in place.
1339764ce7165Smrg    ac_srcdir=.
1339864ce7165Smrg    ac_top_srcdir=$ac_top_builddir_sub
1339964ce7165Smrg    ac_abs_top_srcdir=$ac_pwd ;;
1340064ce7165Smrg  [\\/]* | ?:[\\/]* )  # Absolute name.
1340164ce7165Smrg    ac_srcdir=$srcdir$ac_dir_suffix;
1340264ce7165Smrg    ac_top_srcdir=$srcdir
1340364ce7165Smrg    ac_abs_top_srcdir=$srcdir ;;
1340464ce7165Smrg  *) # Relative name.
1340564ce7165Smrg    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1340664ce7165Smrg    ac_top_srcdir=$ac_top_build_prefix$srcdir
1340764ce7165Smrg    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1340864ce7165Smrgesac
1340964ce7165Smrgac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1341064ce7165Smrg
1341164ce7165Smrg
1341264ce7165Smrg  case $ac_mode in
1341364ce7165Smrg  :F)
1341464ce7165Smrg  #
1341564ce7165Smrg  # CONFIG_FILE
1341664ce7165Smrg  #
1341764ce7165Smrg
1341864ce7165Smrg  case $INSTALL in
1341964ce7165Smrg  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
1342064ce7165Smrg  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
1342164ce7165Smrg  esac
1342264ce7165Smrg  ac_MKDIR_P=$MKDIR_P
1342364ce7165Smrg  case $MKDIR_P in
1342464ce7165Smrg  [\\/$]* | ?:[\\/]* ) ;;
1342564ce7165Smrg  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
1342664ce7165Smrg  esac
1342764ce7165Smrg_ACEOF
1342864ce7165Smrg
13429fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1343064ce7165Smrg# If the template does not know about datarootdir, expand it.
1343164ce7165Smrg# FIXME: This hack should be removed a few years after 2.60.
1343264ce7165Smrgac_datarootdir_hack=; ac_datarootdir_seen=
13433fb23d3a8Smrgac_sed_dataroot='
13434fb23d3a8Smrg/datarootdir/ {
1343564ce7165Smrg  p
1343664ce7165Smrg  q
1343764ce7165Smrg}
1343864ce7165Smrg/@datadir@/p
1343964ce7165Smrg/@docdir@/p
1344064ce7165Smrg/@infodir@/p
1344164ce7165Smrg/@localedir@/p
13442169a0819Smrg/@mandir@/p'
13443fb23d3a8Smrgcase `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
1344464ce7165Smrg*datarootdir*) ac_datarootdir_seen=yes;;
1344564ce7165Smrg*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13446b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13447b71ad168Smrgprintf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
1344864ce7165Smrg_ACEOF
13449fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1345064ce7165Smrg  ac_datarootdir_hack='
1345164ce7165Smrg  s&@datadir@&$datadir&g
1345264ce7165Smrg  s&@docdir@&$docdir&g
1345364ce7165Smrg  s&@infodir@&$infodir&g
1345464ce7165Smrg  s&@localedir@&$localedir&g
1345564ce7165Smrg  s&@mandir@&$mandir&g
13456169a0819Smrg  s&\\\${datarootdir}&$datarootdir&g' ;;
1345764ce7165Smrgesac
1345864ce7165Smrg_ACEOF
1345964ce7165Smrg
1346064ce7165Smrg# Neutralize VPATH when `$srcdir' = `.'.
1346164ce7165Smrg# Shell code in configure.ac might set extrasub.
1346264ce7165Smrg# FIXME: do we really want to maintain this feature?
13463fb23d3a8Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13464fb23d3a8Smrgac_sed_extra="$ac_vpsub
1346564ce7165Smrg$extrasub
1346664ce7165Smrg_ACEOF
13467fb23d3a8Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1346864ce7165Smrg:t
1346964ce7165Smrg/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13470fb23d3a8Smrgs|@configure_input@|$ac_sed_conf_input|;t t
1347164ce7165Smrgs&@top_builddir@&$ac_top_builddir_sub&;t t
13472fb23d3a8Smrgs&@top_build_prefix@&$ac_top_build_prefix&;t t
1347364ce7165Smrgs&@srcdir@&$ac_srcdir&;t t
1347464ce7165Smrgs&@abs_srcdir@&$ac_abs_srcdir&;t t
1347564ce7165Smrgs&@top_srcdir@&$ac_top_srcdir&;t t
1347664ce7165Smrgs&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
1347764ce7165Smrgs&@builddir@&$ac_builddir&;t t
1347864ce7165Smrgs&@abs_builddir@&$ac_abs_builddir&;t t
1347964ce7165Smrgs&@abs_top_builddir@&$ac_abs_top_builddir&;t t
1348064ce7165Smrgs&@INSTALL@&$ac_INSTALL&;t t
1348164ce7165Smrgs&@MKDIR_P@&$ac_MKDIR_P&;t t
1348264ce7165Smrg$ac_datarootdir_hack
13483fb23d3a8Smrg"
13484169a0819Smrgeval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13485169a0819Smrg  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1348664ce7165Smrg
1348764ce7165Smrgtest -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13488169a0819Smrg  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13489169a0819Smrg  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
13490169a0819Smrg      "$ac_tmp/out"`; test -z "$ac_out"; } &&
13491b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13492169a0819Smrgwhich seems to be undefined.  Please make sure it is defined" >&5
13493b71ad168Smrgprintf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13494169a0819Smrgwhich seems to be undefined.  Please make sure it is defined" >&2;}
1349564ce7165Smrg
13496169a0819Smrg  rm -f "$ac_tmp/stdin"
1349764ce7165Smrg  case $ac_file in
13498169a0819Smrg  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13499169a0819Smrg  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13500fb23d3a8Smrg  esac \
13501169a0819Smrg  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1350264ce7165Smrg ;;
1350364ce7165Smrg  :H)
1350464ce7165Smrg  #
1350564ce7165Smrg  # CONFIG_HEADER
1350664ce7165Smrg  #
1350764ce7165Smrg  if test x"$ac_file" != x-; then
13508fb23d3a8Smrg    {
13509b71ad168Smrg      printf "%s\n" "/* $configure_input  */" >&1 \
13510169a0819Smrg      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13511169a0819Smrg    } >"$ac_tmp/config.h" \
13512169a0819Smrg      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13513169a0819Smrg    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13514b71ad168Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13515b71ad168Smrgprintf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
1351664ce7165Smrg    else
13517fb23d3a8Smrg      rm -f "$ac_file"
13518169a0819Smrg      mv "$ac_tmp/config.h" "$ac_file" \
13519169a0819Smrg	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
1352064ce7165Smrg    fi
1352164ce7165Smrg  else
13522b71ad168Smrg    printf "%s\n" "/* $configure_input  */" >&1 \
13523169a0819Smrg      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13524169a0819Smrg      || as_fn_error $? "could not create -" "$LINENO" 5
1352564ce7165Smrg  fi
13526fb23d3a8Smrg# Compute "$ac_file"'s index in $config_headers.
13527fb23d3a8Smrg_am_arg="$ac_file"
1352864ce7165Smrg_am_stamp_count=1
1352964ce7165Smrgfor _am_header in $config_headers :; do
1353064ce7165Smrg  case $_am_header in
13531fb23d3a8Smrg    $_am_arg | $_am_arg:* )
1353264ce7165Smrg      break ;;
1353364ce7165Smrg    * )
1353464ce7165Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1353564ce7165Smrg  esac
1353664ce7165Smrgdone
13537fb23d3a8Smrgecho "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
13538fb23d3a8Smrg$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13539fb23d3a8Smrg	 X"$_am_arg" : 'X\(//\)[^/]' \| \
13540fb23d3a8Smrg	 X"$_am_arg" : 'X\(//\)$' \| \
13541fb23d3a8Smrg	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
13542b71ad168Smrgprintf "%s\n" X"$_am_arg" |
1354364ce7165Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1354464ce7165Smrg	    s//\1/
1354564ce7165Smrg	    q
1354664ce7165Smrg	  }
1354764ce7165Smrg	  /^X\(\/\/\)[^/].*/{
1354864ce7165Smrg	    s//\1/
1354964ce7165Smrg	    q
1355064ce7165Smrg	  }
1355164ce7165Smrg	  /^X\(\/\/\)$/{
1355264ce7165Smrg	    s//\1/
1355364ce7165Smrg	    q
1355464ce7165Smrg	  }
1355564ce7165Smrg	  /^X\(\/\).*/{
1355664ce7165Smrg	    s//\1/
1355764ce7165Smrg	    q
1355864ce7165Smrg	  }
1355964ce7165Smrg	  s/.*/./; q'`/stamp-h$_am_stamp_count
1356064ce7165Smrg ;;
1356164ce7165Smrg
13562b71ad168Smrg  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13563b71ad168Smrgprintf "%s\n" "$as_me: executing $ac_file commands" >&6;}
1356464ce7165Smrg ;;
1356564ce7165Smrg  esac
1356664ce7165Smrg
1356764ce7165Smrg
1356864ce7165Smrg  case $ac_file$ac_mode in
13569fb23d3a8Smrg    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
1357081440437Smrg  # Older Autoconf quotes --file arguments for eval, but not when files
13571fb23d3a8Smrg  # are listed without --file.  Let's play safe and only enable the eval
13572fb23d3a8Smrg  # if we detect the quoting.
13573b71ad168Smrg  # TODO: see whether this extra hack can be removed once we start
13574b71ad168Smrg  # requiring Autoconf 2.70 or later.
13575b71ad168Smrg  case $CONFIG_FILES in #(
13576b71ad168Smrg  *\'*) :
13577b71ad168Smrg    eval set x "$CONFIG_FILES" ;; #(
13578b71ad168Smrg  *) :
13579b71ad168Smrg    set x $CONFIG_FILES ;; #(
13580b71ad168Smrg  *) :
13581b71ad168Smrg     ;;
13582b71ad168Smrgesac
13583fb23d3a8Smrg  shift
13584b71ad168Smrg  # Used to flag and report bootstrapping failures.
13585b71ad168Smrg  am_rc=0
13586b71ad168Smrg  for am_mf
13587fb23d3a8Smrg  do
13588fb23d3a8Smrg    # Strip MF so we end up with the name of the file.
13589b71ad168Smrg    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
13590b71ad168Smrg    # Check whether this is an Automake generated Makefile which includes
13591b71ad168Smrg    # dependency-tracking related rules and includes.
13592b71ad168Smrg    # Grep'ing the whole file directly is not great: AIX grep has a line
13593fb23d3a8Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
13594b71ad168Smrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
13595b71ad168Smrg      || continue
13596b71ad168Smrg    am_dirpart=`$as_dirname -- "$am_mf" ||
13597b71ad168Smrg$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13598b71ad168Smrg	 X"$am_mf" : 'X\(//\)[^/]' \| \
13599b71ad168Smrg	 X"$am_mf" : 'X\(//\)$' \| \
13600b71ad168Smrg	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
13601b71ad168Smrgprintf "%s\n" X"$am_mf" |
1360264ce7165Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1360364ce7165Smrg	    s//\1/
1360464ce7165Smrg	    q
1360564ce7165Smrg	  }
1360664ce7165Smrg	  /^X\(\/\/\)[^/].*/{
1360764ce7165Smrg	    s//\1/
1360864ce7165Smrg	    q
1360964ce7165Smrg	  }
1361064ce7165Smrg	  /^X\(\/\/\)$/{
1361164ce7165Smrg	    s//\1/
1361264ce7165Smrg	    q
1361364ce7165Smrg	  }
1361464ce7165Smrg	  /^X\(\/\).*/{
1361564ce7165Smrg	    s//\1/
1361664ce7165Smrg	    q
1361764ce7165Smrg	  }
1361864ce7165Smrg	  s/.*/./; q'`
13619b71ad168Smrg    am_filepart=`$as_basename -- "$am_mf" ||
13620b71ad168Smrg$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
13621b71ad168Smrg	 X"$am_mf" : 'X\(//\)$' \| \
13622b71ad168Smrg	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
13623b71ad168Smrgprintf "%s\n" X/"$am_mf" |
13624b71ad168Smrg    sed '/^.*\/\([^/][^/]*\)\/*$/{
1362564ce7165Smrg	    s//\1/
1362664ce7165Smrg	    q
1362764ce7165Smrg	  }
13628b71ad168Smrg	  /^X\/\(\/\/\)$/{
1362964ce7165Smrg	    s//\1/
1363064ce7165Smrg	    q
1363164ce7165Smrg	  }
13632b71ad168Smrg	  /^X\/\(\/\).*/{
1363364ce7165Smrg	    s//\1/
1363464ce7165Smrg	    q
1363564ce7165Smrg	  }
1363664ce7165Smrg	  s/.*/./; q'`
13637b71ad168Smrg    { echo "$as_me:$LINENO: cd "$am_dirpart" \
13638b71ad168Smrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
13639b71ad168Smrg        | $MAKE -f - am--depfiles" >&5
13640b71ad168Smrg   (cd "$am_dirpart" \
13641b71ad168Smrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
13642b71ad168Smrg        | $MAKE -f - am--depfiles) >&5 2>&5
13643b71ad168Smrg   ac_status=$?
13644b71ad168Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645b71ad168Smrg   (exit $ac_status); } || am_rc=$?
1364664ce7165Smrg  done
13647b71ad168Smrg  if test $am_rc -ne 0; then
13648b71ad168Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13649b71ad168Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
13650b71ad168Smrgas_fn_error $? "Something went wrong bootstrapping makefile fragments
13651b71ad168Smrg    for automatic dependency tracking.  If GNU make was not used, consider
13652b71ad168Smrg    re-running the configure script with MAKE=\"gmake\" (or whatever is
13653b71ad168Smrg    necessary).  You can also try re-running configure with the
13654b71ad168Smrg    '--disable-dependency-tracking' option to at least be able to build
13655b71ad168Smrg    the package (albeit without support for automatic dependency tracking).
13656b71ad168SmrgSee \`config.log' for more details" "$LINENO" 5; }
13657b71ad168Smrg  fi
13658b71ad168Smrg  { am_dirpart=; unset am_dirpart;}
13659b71ad168Smrg  { am_filepart=; unset am_filepart;}
13660b71ad168Smrg  { am_mf=; unset am_mf;}
13661b71ad168Smrg  { am_rc=; unset am_rc;}
13662b71ad168Smrg  rm -f conftest-deps.mk
13663fb23d3a8Smrg}
1366464ce7165Smrg ;;
1366564ce7165Smrg
1366664ce7165Smrg  esac
1366764ce7165Smrgdone # for ac_tag
1366864ce7165Smrg
1366964ce7165Smrg
13670169a0819Smrgas_fn_exit 0
1367164ce7165Smrg_ACEOF
1367264ce7165Smrgac_clean_files=$ac_clean_files_save
1367364ce7165Smrg
13674fb23d3a8Smrgtest $ac_write_fail = 0 ||
13675169a0819Smrg  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13676fb23d3a8Smrg
1367764ce7165Smrg
1367864ce7165Smrg# configure is writing to config.log, and then calls config.status.
1367964ce7165Smrg# config.status does its own redirection, appending to config.log.
1368064ce7165Smrg# Unfortunately, on DOS this fails, as config.log is still kept open
1368164ce7165Smrg# by configure, so config.status won't be able to write to it; its
1368264ce7165Smrg# output is simply discarded.  So we exec the FD to /dev/null,
1368364ce7165Smrg# effectively closing config.log, so it can be properly (re)opened and
1368464ce7165Smrg# appended to by config.status.  When coming back to configure, we
1368564ce7165Smrg# need to make the FD available again.
1368664ce7165Smrgif test "$no_create" != yes; then
1368764ce7165Smrg  ac_cs_success=:
1368864ce7165Smrg  ac_config_status_args=
1368964ce7165Smrg  test "$silent" = yes &&
1369064ce7165Smrg    ac_config_status_args="$ac_config_status_args --quiet"
1369164ce7165Smrg  exec 5>/dev/null
1369264ce7165Smrg  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
1369364ce7165Smrg  exec 5>>config.log
1369464ce7165Smrg  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
1369564ce7165Smrg  # would make configure fail if this is the last instruction.
13696169a0819Smrg  $ac_cs_success || as_fn_exit 1
1369764ce7165Smrgfi
13698fb23d3a8Smrgif test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
13699b71ad168Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
13700b71ad168Smrgprintf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
13701fb23d3a8Smrgfi
1370264ce7165Smrg
13703b71ad168Smrg
13704