1c582b7e3Smrg#! /bin/sh
2c582b7e3Smrg# Guess values for system-dependent variables and create Makefiles.
38ce07328Smrg# Generated by GNU Autoconf 2.71 for xf86-video-r128 6.12.1.
4c582b7e3Smrg#
58ce07328Smrg# Report bugs to <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/issues>.
6c582b7e3Smrg#
742a55b46Smrg#
88ce07328Smrg# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
98ce07328Smrg# Inc.
1042a55b46Smrg#
1142a55b46Smrg#
12c582b7e3Smrg# This configure script is free software; the Free Software Foundation
13c582b7e3Smrg# gives unlimited permission to copy, distribute and modify it.
1442a55b46Smrg## -------------------- ##
1542a55b46Smrg## M4sh Initialization. ##
1642a55b46Smrg## -------------------- ##
17c582b7e3Smrg
18c582b7e3Smrg# Be more Bourne compatible
19c582b7e3SmrgDUALCASE=1; export DUALCASE # for MKS sh
208ce07328Smrgas_nop=:
218ce07328Smrgif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
228ce07328Smrgthen :
23c582b7e3Smrg  emulate sh
24c582b7e3Smrg  NULLCMD=:
2519019ffeSmrg  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26c582b7e3Smrg  # is contrary to our usage.  Disable this feature.
27c582b7e3Smrg  alias -g '${1+"$@"}'='"$@"'
28c582b7e3Smrg  setopt NO_GLOB_SUBST
298ce07328Smrgelse $as_nop
3042a55b46Smrg  case `(set -o) 2>/dev/null` in #(
3142a55b46Smrg  *posix*) :
3242a55b46Smrg    set -o posix ;; #(
3342a55b46Smrg  *) :
3442a55b46Smrg     ;;
35c582b7e3Smrgesac
36c582b7e3Smrgfi
37c582b7e3Smrg
38c582b7e3Smrg
398ce07328Smrg
408ce07328Smrg# Reset variables that may have inherited troublesome values from
418ce07328Smrg# the environment.
428ce07328Smrg
438ce07328Smrg# IFS needs to be set, to space, tab, and newline, in precisely that order.
448ce07328Smrg# (If _AS_PATH_WALK were called with IFS unset, it would have the
458ce07328Smrg# side effect of setting IFS to empty, thus disabling word splitting.)
468ce07328Smrg# Quoting is to prevent editors from complaining about space-tab.
4719019ffeSmrgas_nl='
4819019ffeSmrg'
4919019ffeSmrgexport as_nl
508ce07328SmrgIFS=" ""	$as_nl"
518ce07328Smrg
528ce07328SmrgPS1='$ '
538ce07328SmrgPS2='> '
548ce07328SmrgPS4='+ '
558ce07328Smrg
568ce07328Smrg# Ensure predictable behavior from utilities with locale-dependent output.
578ce07328SmrgLC_ALL=C
588ce07328Smrgexport LC_ALL
598ce07328SmrgLANGUAGE=C
608ce07328Smrgexport LANGUAGE
618ce07328Smrg
628ce07328Smrg# We cannot yet rely on "unset" to work, but we need these variables
638ce07328Smrg# to be unset--not just set to an empty or harmless value--now, to
648ce07328Smrg# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
658ce07328Smrg# also avoids known problems related to "unset" and subshell syntax
668ce07328Smrg# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
678ce07328Smrgfor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
688ce07328Smrgdo eval test \${$as_var+y} \
698ce07328Smrg  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
708ce07328Smrgdone
718ce07328Smrg
728ce07328Smrg# Ensure that fds 0, 1, and 2 are open.
738ce07328Smrgif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
748ce07328Smrgif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
758ce07328Smrgif (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
7619019ffeSmrg
7719019ffeSmrg# The user is always right.
788ce07328Smrgif ${PATH_SEPARATOR+false} :; then
7919019ffeSmrg  PATH_SEPARATOR=:
8019019ffeSmrg  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8119019ffeSmrg    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8219019ffeSmrg      PATH_SEPARATOR=';'
8319019ffeSmrg  }
84c582b7e3Smrgfi
85c582b7e3Smrg
86c582b7e3Smrg
87c582b7e3Smrg# Find who we are.  Look in the path if we contain no directory separator.
8842a55b46Smrgas_myself=
8942a55b46Smrgcase $0 in #((
90c582b7e3Smrg  *[\\/]* ) as_myself=$0 ;;
91c582b7e3Smrg  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92c582b7e3Smrgfor as_dir in $PATH
93c582b7e3Smrgdo
94c582b7e3Smrg  IFS=$as_save_IFS
958ce07328Smrg  case $as_dir in #(((
968ce07328Smrg    '') as_dir=./ ;;
978ce07328Smrg    */) ;;
988ce07328Smrg    *) as_dir=$as_dir/ ;;
998ce07328Smrg  esac
1008ce07328Smrg    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
10142a55b46Smrg  done
102c582b7e3SmrgIFS=$as_save_IFS
103c582b7e3Smrg
104c582b7e3Smrg     ;;
105c582b7e3Smrgesac
106c582b7e3Smrg# We did not find ourselves, most probably we were run as `sh COMMAND'
107c582b7e3Smrg# in which case we are not to be found in the path.
108c582b7e3Smrgif test "x$as_myself" = x; then
109c582b7e3Smrg  as_myself=$0
110c582b7e3Smrgfi
111c582b7e3Smrgif test ! -f "$as_myself"; then
1128ce07328Smrg  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11342a55b46Smrg  exit 1
114c582b7e3Smrgfi
115c582b7e3Smrg
11642a55b46Smrg
1170496e070Smrg# Use a proper internal environment variable to ensure we don't fall
1180496e070Smrg  # into an infinite loop, continuously re-executing ourselves.
1190496e070Smrg  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
1200496e070Smrg    _as_can_reexec=no; export _as_can_reexec;
1210496e070Smrg    # We cannot yet assume a decent shell, so we have to provide a
1220496e070Smrg# neutralization value for shells without unset; and this also
1230496e070Smrg# works around shells that cannot unset nonexistent variables.
1240496e070Smrg# Preserve -v and -x to the replacement shell.
1250496e070SmrgBASH_ENV=/dev/null
1260496e070SmrgENV=/dev/null
1270496e070Smrg(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
1280496e070Smrgcase $- in # ((((
1290496e070Smrg  *v*x* | *x*v* ) as_opts=-vx ;;
1300496e070Smrg  *v* ) as_opts=-v ;;
1310496e070Smrg  *x* ) as_opts=-x ;;
1320496e070Smrg  * ) as_opts= ;;
1330496e070Smrgesac
1340496e070Smrgexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
1350496e070Smrg# Admittedly, this is quite paranoid, since all the known shells bail
1360496e070Smrg# out after a failed `exec'.
1378ce07328Smrgprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
1388ce07328Smrgexit 255
1390496e070Smrg  fi
1400496e070Smrg  # We don't want this to propagate to other subprocesses.
1410496e070Smrg          { _as_can_reexec=; unset _as_can_reexec;}
14242a55b46Smrgif test "x$CONFIG_SHELL" = x; then
1438ce07328Smrg  as_bourne_compatible="as_nop=:
1448ce07328Smrgif test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
1458ce07328Smrgthen :
14642a55b46Smrg  emulate sh
14742a55b46Smrg  NULLCMD=:
14842a55b46Smrg  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
14942a55b46Smrg  # is contrary to our usage.  Disable this feature.
15042a55b46Smrg  alias -g '\${1+\"\$@\"}'='\"\$@\"'
15142a55b46Smrg  setopt NO_GLOB_SUBST
1528ce07328Smrgelse \$as_nop
15342a55b46Smrg  case \`(set -o) 2>/dev/null\` in #(
15442a55b46Smrg  *posix*) :
15542a55b46Smrg    set -o posix ;; #(
15642a55b46Smrg  *) :
15742a55b46Smrg     ;;
15842a55b46Smrgesac
15942a55b46Smrgfi
16042a55b46Smrg"
16142a55b46Smrg  as_required="as_fn_return () { (exit \$1); }
16242a55b46Smrgas_fn_success () { as_fn_return 0; }
16342a55b46Smrgas_fn_failure () { as_fn_return 1; }
16442a55b46Smrgas_fn_ret_success () { return 0; }
16542a55b46Smrgas_fn_ret_failure () { return 1; }
16642a55b46Smrg
16742a55b46Smrgexitcode=0
16842a55b46Smrgas_fn_success || { exitcode=1; echo as_fn_success failed.; }
16942a55b46Smrgas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
17042a55b46Smrgas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
17142a55b46Smrgas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
1728ce07328Smrgif ( set x; as_fn_ret_success y && test x = \"\$1\" )
1738ce07328Smrgthen :
17442a55b46Smrg
1758ce07328Smrgelse \$as_nop
17642a55b46Smrg  exitcode=1; echo positional parameters were not saved.
17742a55b46Smrgfi
1780496e070Smrgtest x\$exitcode = x0 || exit 1
1798ce07328Smrgblah=\$(echo \$(echo blah))
1808ce07328Smrgtest x\"\$blah\" = xblah || exit 1
1810496e070Smrgtest -x / || exit 1"
18242a55b46Smrg  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
18342a55b46Smrg  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
18442a55b46Smrg  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
18542a55b46Smrg  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
18642a55b46Smrgtest \$(( 1 + 1 )) = 2 || exit 1
18742a55b46Smrg
18842a55b46Smrg  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
18942a55b46Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19042a55b46Smrg    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
19142a55b46Smrg    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
19242a55b46Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
19342a55b46Smrg    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
19442a55b46Smrg      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
1958ce07328Smrg  if (eval "$as_required") 2>/dev/null
1968ce07328Smrgthen :
19742a55b46Smrg  as_have_required=yes
1988ce07328Smrgelse $as_nop
19942a55b46Smrg  as_have_required=no
20042a55b46Smrgfi
2018ce07328Smrg  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
2028ce07328Smrgthen :
20342a55b46Smrg
2048ce07328Smrgelse $as_nop
20542a55b46Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20642a55b46Smrgas_found=false
20742a55b46Smrgfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20842a55b46Smrgdo
20942a55b46Smrg  IFS=$as_save_IFS
2108ce07328Smrg  case $as_dir in #(((
2118ce07328Smrg    '') as_dir=./ ;;
2128ce07328Smrg    */) ;;
2138ce07328Smrg    *) as_dir=$as_dir/ ;;
2148ce07328Smrg  esac
21542a55b46Smrg  as_found=:
21642a55b46Smrg  case $as_dir in #(
21742a55b46Smrg	 /*)
21842a55b46Smrg	   for as_base in sh bash ksh sh5; do
21942a55b46Smrg	     # Try only shells that exist, to save several forks.
2208ce07328Smrg	     as_shell=$as_dir$as_base
22142a55b46Smrg	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
2228ce07328Smrg		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
2238ce07328Smrgthen :
22442a55b46Smrg  CONFIG_SHELL=$as_shell as_have_required=yes
2258ce07328Smrg		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
2268ce07328Smrgthen :
22742a55b46Smrg  break 2
22842a55b46Smrgfi
22942a55b46Smrgfi
23042a55b46Smrg	   done;;
23142a55b46Smrg       esac
23242a55b46Smrg  as_found=false
23342a55b46Smrgdone
23442a55b46SmrgIFS=$as_save_IFS
2358ce07328Smrgif $as_found
2368ce07328Smrgthen :
2378ce07328Smrg
2388ce07328Smrgelse $as_nop
2398ce07328Smrg  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
2408ce07328Smrg	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
2418ce07328Smrgthen :
2428ce07328Smrg  CONFIG_SHELL=$SHELL as_have_required=yes
2438ce07328Smrgfi
2448ce07328Smrgfi
24542a55b46Smrg
24642a55b46Smrg
2478ce07328Smrg      if test "x$CONFIG_SHELL" != x
2488ce07328Smrgthen :
2490496e070Smrg  export CONFIG_SHELL
2500496e070Smrg             # We cannot yet assume a decent shell, so we have to provide a
2510496e070Smrg# neutralization value for shells without unset; and this also
2520496e070Smrg# works around shells that cannot unset nonexistent variables.
2530496e070Smrg# Preserve -v and -x to the replacement shell.
2540496e070SmrgBASH_ENV=/dev/null
2550496e070SmrgENV=/dev/null
2560496e070Smrg(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
2570496e070Smrgcase $- in # ((((
2580496e070Smrg  *v*x* | *x*v* ) as_opts=-vx ;;
2590496e070Smrg  *v* ) as_opts=-v ;;
2600496e070Smrg  *x* ) as_opts=-x ;;
2610496e070Smrg  * ) as_opts= ;;
2620496e070Smrgesac
2630496e070Smrgexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
2640496e070Smrg# Admittedly, this is quite paranoid, since all the known shells bail
2650496e070Smrg# out after a failed `exec'.
2668ce07328Smrgprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
2670496e070Smrgexit 255
26842a55b46Smrgfi
26942a55b46Smrg
2708ce07328Smrg    if test x$as_have_required = xno
2718ce07328Smrgthen :
2728ce07328Smrg  printf "%s\n" "$0: This script requires a shell more modern than all"
2738ce07328Smrg  printf "%s\n" "$0: the shells that I found on your system."
2748ce07328Smrg  if test ${ZSH_VERSION+y} ; then
2758ce07328Smrg    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
2768ce07328Smrg    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
27742a55b46Smrg  else
2788ce07328Smrg    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
2798ce07328Smrg$0: https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/issues
28042a55b46Smrg$0: about your system, including any error possibly output
28142a55b46Smrg$0: before this message. Then install a modern shell, or
28242a55b46Smrg$0: manually run the script under such a shell if you do
28342a55b46Smrg$0: have one."
28442a55b46Smrg  fi
28542a55b46Smrg  exit 1
28642a55b46Smrgfi
28742a55b46Smrgfi
28842a55b46Smrgfi
28942a55b46SmrgSHELL=${CONFIG_SHELL-/bin/sh}
29042a55b46Smrgexport SHELL
29142a55b46Smrg# Unset more variables known to interfere with behavior of common tools.
29242a55b46SmrgCLICOLOR_FORCE= GREP_OPTIONS=
29342a55b46Smrgunset CLICOLOR_FORCE GREP_OPTIONS
29442a55b46Smrg
29542a55b46Smrg## --------------------- ##
29642a55b46Smrg## M4sh Shell Functions. ##
29742a55b46Smrg## --------------------- ##
29842a55b46Smrg# as_fn_unset VAR
29942a55b46Smrg# ---------------
30042a55b46Smrg# Portably unset VAR.
30142a55b46Smrgas_fn_unset ()
30242a55b46Smrg{
30342a55b46Smrg  { eval $1=; unset $1;}
30442a55b46Smrg}
30542a55b46Smrgas_unset=as_fn_unset
30642a55b46Smrg
3078ce07328Smrg
30842a55b46Smrg# as_fn_set_status STATUS
30942a55b46Smrg# -----------------------
31042a55b46Smrg# Set $? to STATUS, without forking.
31142a55b46Smrgas_fn_set_status ()
31242a55b46Smrg{
31342a55b46Smrg  return $1
31442a55b46Smrg} # as_fn_set_status
31542a55b46Smrg
31642a55b46Smrg# as_fn_exit STATUS
31742a55b46Smrg# -----------------
31842a55b46Smrg# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31942a55b46Smrgas_fn_exit ()
32042a55b46Smrg{
32142a55b46Smrg  set +e
32242a55b46Smrg  as_fn_set_status $1
32342a55b46Smrg  exit $1
32442a55b46Smrg} # as_fn_exit
3258ce07328Smrg# as_fn_nop
3268ce07328Smrg# ---------
3278ce07328Smrg# Do nothing but, unlike ":", preserve the value of $?.
3288ce07328Smrgas_fn_nop ()
3298ce07328Smrg{
3308ce07328Smrg  return $?
3318ce07328Smrg}
3328ce07328Smrgas_nop=as_fn_nop
33342a55b46Smrg
33442a55b46Smrg# as_fn_mkdir_p
33542a55b46Smrg# -------------
33642a55b46Smrg# Create "$as_dir" as a directory, including parents if necessary.
33742a55b46Smrgas_fn_mkdir_p ()
33842a55b46Smrg{
33942a55b46Smrg
34042a55b46Smrg  case $as_dir in #(
34142a55b46Smrg  -*) as_dir=./$as_dir;;
34242a55b46Smrg  esac
34342a55b46Smrg  test -d "$as_dir" || eval $as_mkdir_p || {
34442a55b46Smrg    as_dirs=
34542a55b46Smrg    while :; do
34642a55b46Smrg      case $as_dir in #(
3478ce07328Smrg      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
34842a55b46Smrg      *) as_qdir=$as_dir;;
34942a55b46Smrg      esac
35042a55b46Smrg      as_dirs="'$as_qdir' $as_dirs"
35142a55b46Smrg      as_dir=`$as_dirname -- "$as_dir" ||
35242a55b46Smrg$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35342a55b46Smrg	 X"$as_dir" : 'X\(//\)[^/]' \| \
35442a55b46Smrg	 X"$as_dir" : 'X\(//\)$' \| \
35542a55b46Smrg	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
3568ce07328Smrgprintf "%s\n" X"$as_dir" |
35742a55b46Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35842a55b46Smrg	    s//\1/
35942a55b46Smrg	    q
36042a55b46Smrg	  }
36142a55b46Smrg	  /^X\(\/\/\)[^/].*/{
36242a55b46Smrg	    s//\1/
36342a55b46Smrg	    q
36442a55b46Smrg	  }
36542a55b46Smrg	  /^X\(\/\/\)$/{
36642a55b46Smrg	    s//\1/
36742a55b46Smrg	    q
36842a55b46Smrg	  }
36942a55b46Smrg	  /^X\(\/\).*/{
37042a55b46Smrg	    s//\1/
37142a55b46Smrg	    q
37242a55b46Smrg	  }
37342a55b46Smrg	  s/.*/./; q'`
37442a55b46Smrg      test -d "$as_dir" && break
37542a55b46Smrg    done
37642a55b46Smrg    test -z "$as_dirs" || eval "mkdir $as_dirs"
37742a55b46Smrg  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
37842a55b46Smrg
37942a55b46Smrg
38042a55b46Smrg} # as_fn_mkdir_p
3810496e070Smrg
3820496e070Smrg# as_fn_executable_p FILE
3830496e070Smrg# -----------------------
3840496e070Smrg# Test if FILE is an executable regular file.
3850496e070Smrgas_fn_executable_p ()
3860496e070Smrg{
3870496e070Smrg  test -f "$1" && test -x "$1"
3880496e070Smrg} # as_fn_executable_p
38942a55b46Smrg# as_fn_append VAR VALUE
39042a55b46Smrg# ----------------------
39142a55b46Smrg# Append the text in VALUE to the end of the definition contained in VAR. Take
39242a55b46Smrg# advantage of any shell optimizations that allow amortized linear growth over
39342a55b46Smrg# repeated appends, instead of the typical quadratic growth present in naive
39442a55b46Smrg# implementations.
3958ce07328Smrgif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
3968ce07328Smrgthen :
39742a55b46Smrg  eval 'as_fn_append ()
39842a55b46Smrg  {
39942a55b46Smrg    eval $1+=\$2
40042a55b46Smrg  }'
4018ce07328Smrgelse $as_nop
40242a55b46Smrg  as_fn_append ()
40342a55b46Smrg  {
40442a55b46Smrg    eval $1=\$$1\$2
40542a55b46Smrg  }
40642a55b46Smrgfi # as_fn_append
40742a55b46Smrg
40842a55b46Smrg# as_fn_arith ARG...
40942a55b46Smrg# ------------------
41042a55b46Smrg# Perform arithmetic evaluation on the ARGs, and store the result in the
41142a55b46Smrg# global $as_val. Take advantage of shells that can avoid forks. The arguments
41242a55b46Smrg# must be portable across $(()) and expr.
4138ce07328Smrgif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
4148ce07328Smrgthen :
41542a55b46Smrg  eval 'as_fn_arith ()
41642a55b46Smrg  {
41742a55b46Smrg    as_val=$(( $* ))
41842a55b46Smrg  }'
4198ce07328Smrgelse $as_nop
42042a55b46Smrg  as_fn_arith ()
42142a55b46Smrg  {
42242a55b46Smrg    as_val=`expr "$@" || test $? -eq 1`
42342a55b46Smrg  }
42442a55b46Smrgfi # as_fn_arith
42542a55b46Smrg
4268ce07328Smrg# as_fn_nop
4278ce07328Smrg# ---------
4288ce07328Smrg# Do nothing but, unlike ":", preserve the value of $?.
4298ce07328Smrgas_fn_nop ()
4308ce07328Smrg{
4318ce07328Smrg  return $?
4328ce07328Smrg}
4338ce07328Smrgas_nop=as_fn_nop
43442a55b46Smrg
43542a55b46Smrg# as_fn_error STATUS ERROR [LINENO LOG_FD]
43642a55b46Smrg# ----------------------------------------
43742a55b46Smrg# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
43842a55b46Smrg# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
43942a55b46Smrg# script with STATUS, using 1 if that was 0.
44042a55b46Smrgas_fn_error ()
44142a55b46Smrg{
44242a55b46Smrg  as_status=$1; test $as_status -eq 0 && as_status=1
44342a55b46Smrg  if test "$4"; then
44442a55b46Smrg    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4458ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
44642a55b46Smrg  fi
4478ce07328Smrg  printf "%s\n" "$as_me: error: $2" >&2
44842a55b46Smrg  as_fn_exit $as_status
44942a55b46Smrg} # as_fn_error
45042a55b46Smrg
451c582b7e3Smrgif expr a : '\(a\)' >/dev/null 2>&1 &&
452c582b7e3Smrg   test "X`expr 00001 : '.*\(...\)'`" = X001; then
453c582b7e3Smrg  as_expr=expr
454c582b7e3Smrgelse
455c582b7e3Smrg  as_expr=false
456c582b7e3Smrgfi
457c582b7e3Smrg
458c582b7e3Smrgif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
459c582b7e3Smrg  as_basename=basename
460c582b7e3Smrgelse
461c582b7e3Smrg  as_basename=false
462c582b7e3Smrgfi
463c582b7e3Smrg
46442a55b46Smrgif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
46542a55b46Smrg  as_dirname=dirname
46642a55b46Smrgelse
46742a55b46Smrg  as_dirname=false
46842a55b46Smrgfi
469c582b7e3Smrg
470c582b7e3Smrgas_me=`$as_basename -- "$0" ||
471c582b7e3Smrg$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
472c582b7e3Smrg	 X"$0" : 'X\(//\)$' \| \
473c582b7e3Smrg	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
4748ce07328Smrgprintf "%s\n" X/"$0" |
475c582b7e3Smrg    sed '/^.*\/\([^/][^/]*\)\/*$/{
476c582b7e3Smrg	    s//\1/
477c582b7e3Smrg	    q
478c582b7e3Smrg	  }
479c582b7e3Smrg	  /^X\/\(\/\/\)$/{
480c582b7e3Smrg	    s//\1/
481c582b7e3Smrg	    q
482c582b7e3Smrg	  }
483c582b7e3Smrg	  /^X\/\(\/\).*/{
484c582b7e3Smrg	    s//\1/
485c582b7e3Smrg	    q
486c582b7e3Smrg	  }
487c582b7e3Smrg	  s/.*/./; q'`
488c582b7e3Smrg
48942a55b46Smrg# Avoid depending upon Character Ranges.
49042a55b46Smrgas_cr_letters='abcdefghijklmnopqrstuvwxyz'
49142a55b46Smrgas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49242a55b46Smrgas_cr_Letters=$as_cr_letters$as_cr_LETTERS
49342a55b46Smrgas_cr_digits='0123456789'
49442a55b46Smrgas_cr_alnum=$as_cr_Letters$as_cr_digits
495c582b7e3Smrg
496c582b7e3Smrg
49742a55b46Smrg  as_lineno_1=$LINENO as_lineno_1a=$LINENO
49842a55b46Smrg  as_lineno_2=$LINENO as_lineno_2a=$LINENO
49942a55b46Smrg  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
50042a55b46Smrg  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
50142a55b46Smrg  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
50242a55b46Smrg  sed -n '
50342a55b46Smrg    p
50442a55b46Smrg    /[$]LINENO/=
50542a55b46Smrg  ' <$as_myself |
50642a55b46Smrg    sed '
50742a55b46Smrg      s/[$]LINENO.*/&-/
50842a55b46Smrg      t lineno
50942a55b46Smrg      b
51042a55b46Smrg      :lineno
51142a55b46Smrg      N
51242a55b46Smrg      :loop
51342a55b46Smrg      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
51442a55b46Smrg      t loop
51542a55b46Smrg      s/-\n.*//
51642a55b46Smrg    ' >$as_me.lineno &&
51742a55b46Smrg  chmod +x "$as_me.lineno" ||
5188ce07328Smrg    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
519c582b7e3Smrg
5200496e070Smrg  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
5210496e070Smrg  # already done that, so ensure we don't try to do so again and fall
5220496e070Smrg  # in an infinite loop.  This has already happened in practice.
5230496e070Smrg  _as_can_reexec=no; export _as_can_reexec
52442a55b46Smrg  # Don't try to exec as it changes $[0], causing all sort of problems
52542a55b46Smrg  # (the dirname of $[0] is not the place where we might find the
52642a55b46Smrg  # original and so on.  Autoconf is especially sensitive to this).
52742a55b46Smrg  . "./$as_me.lineno"
52842a55b46Smrg  # Exit status is that of the last command.
52942a55b46Smrg  exit
530c582b7e3Smrg}
531c582b7e3Smrg
5328ce07328Smrg
5338ce07328Smrg# Determine whether it's possible to make 'echo' print without a newline.
5348ce07328Smrg# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
5358ce07328Smrg# for compatibility with existing Makefiles.
53642a55b46SmrgECHO_C= ECHO_N= ECHO_T=
53742a55b46Smrgcase `echo -n x` in #(((((
53842a55b46Smrg-n*)
53942a55b46Smrg  case `echo 'xy\c'` in
54042a55b46Smrg  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
54142a55b46Smrg  xy)  ECHO_C='\c';;
54242a55b46Smrg  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
54342a55b46Smrg       ECHO_T='	';;
54442a55b46Smrg  esac;;
54542a55b46Smrg*)
54642a55b46Smrg  ECHO_N='-n';;
54742a55b46Smrgesac
548c582b7e3Smrg
5498ce07328Smrg# For backward compatibility with old third-party macros, we provide
5508ce07328Smrg# the shell variables $as_echo and $as_echo_n.  New code should use
5518ce07328Smrg# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
5528ce07328Smrgas_echo='printf %s\n'
5538ce07328Smrgas_echo_n='printf %s'
5548ce07328Smrg
5558ce07328Smrg
55642a55b46Smrgrm -f conf$$ conf$$.exe conf$$.file
55742a55b46Smrgif test -d conf$$.dir; then
55842a55b46Smrg  rm -f conf$$.dir/conf$$.file
55942a55b46Smrgelse
56042a55b46Smrg  rm -f conf$$.dir
56142a55b46Smrg  mkdir conf$$.dir 2>/dev/null
562c582b7e3Smrgfi
56342a55b46Smrgif (echo >conf$$.file) 2>/dev/null; then
56442a55b46Smrg  if ln -s conf$$.file conf$$ 2>/dev/null; then
56542a55b46Smrg    as_ln_s='ln -s'
56642a55b46Smrg    # ... but there are two gotchas:
56742a55b46Smrg    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
56842a55b46Smrg    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
5690496e070Smrg    # In both cases, we have to default to `cp -pR'.
57042a55b46Smrg    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
5710496e070Smrg      as_ln_s='cp -pR'
57242a55b46Smrg  elif ln conf$$.file conf$$ 2>/dev/null; then
57342a55b46Smrg    as_ln_s=ln
57442a55b46Smrg  else
5750496e070Smrg    as_ln_s='cp -pR'
57642a55b46Smrg  fi
577c582b7e3Smrgelse
5780496e070Smrg  as_ln_s='cp -pR'
579c582b7e3Smrgfi
58042a55b46Smrgrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
58142a55b46Smrgrmdir conf$$.dir 2>/dev/null
582c582b7e3Smrg
58342a55b46Smrgif mkdir -p . 2>/dev/null; then
58442a55b46Smrg  as_mkdir_p='mkdir -p "$as_dir"'
58542a55b46Smrgelse
58642a55b46Smrg  test -d ./-p && rmdir ./-p
58742a55b46Smrg  as_mkdir_p=false
588c582b7e3Smrgfi
589c582b7e3Smrg
5900496e070Smrgas_test_x='test -x'
5910496e070Smrgas_executable_p=as_fn_executable_p
592c582b7e3Smrg
59342a55b46Smrg# Sed expression to map a string onto a valid CPP name.
59442a55b46Smrgas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
595c582b7e3Smrg
59642a55b46Smrg# Sed expression to map a string onto a valid variable name.
59742a55b46Smrgas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
598c582b7e3Smrg
59942a55b46SmrgSHELL=${CONFIG_SHELL-/bin/sh}
600c582b7e3Smrg
601c582b7e3Smrg
60242a55b46Smrgtest -n "$DJDIR" || exec 7<&0 </dev/null
60342a55b46Smrgexec 6>&1
604c582b7e3Smrg
60542a55b46Smrg# Name of the host.
60642a55b46Smrg# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
60742a55b46Smrg# so uname gets run too.
60842a55b46Smrgac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
609c582b7e3Smrg
61042a55b46Smrg#
61142a55b46Smrg# Initializations.
61242a55b46Smrg#
61342a55b46Smrgac_default_prefix=/usr/local
61442a55b46Smrgac_clean_files=
61542a55b46Smrgac_config_libobj_dir=.
61642a55b46SmrgLIBOBJS=
61742a55b46Smrgcross_compiling=no
61842a55b46Smrgsubdirs=
61942a55b46SmrgMFLAGS=
62042a55b46SmrgMAKEFLAGS=
621c582b7e3Smrg
62242a55b46Smrg# Identity of this package.
62342a55b46SmrgPACKAGE_NAME='xf86-video-r128'
62442a55b46SmrgPACKAGE_TARNAME='xf86-video-r128'
6258ce07328SmrgPACKAGE_VERSION='6.12.1'
6268ce07328SmrgPACKAGE_STRING='xf86-video-r128 6.12.1'
6278ce07328SmrgPACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/issues'
62842a55b46SmrgPACKAGE_URL=''
629c582b7e3Smrg
63042a55b46Smrgac_unique_file="Makefile.am"
63142a55b46Smrg# Factoring default headers for most tests.
63242a55b46Smrgac_includes_default="\
6338ce07328Smrg#include <stddef.h>
6348ce07328Smrg#ifdef HAVE_STDIO_H
6358ce07328Smrg# include <stdio.h>
63642a55b46Smrg#endif
6378ce07328Smrg#ifdef HAVE_STDLIB_H
63842a55b46Smrg# include <stdlib.h>
63942a55b46Smrg#endif
64042a55b46Smrg#ifdef HAVE_STRING_H
64142a55b46Smrg# include <string.h>
64242a55b46Smrg#endif
64342a55b46Smrg#ifdef HAVE_INTTYPES_H
64442a55b46Smrg# include <inttypes.h>
64542a55b46Smrg#endif
64642a55b46Smrg#ifdef HAVE_STDINT_H
64742a55b46Smrg# include <stdint.h>
64842a55b46Smrg#endif
6498ce07328Smrg#ifdef HAVE_STRINGS_H
6508ce07328Smrg# include <strings.h>
6518ce07328Smrg#endif
6528ce07328Smrg#ifdef HAVE_SYS_TYPES_H
6538ce07328Smrg# include <sys/types.h>
6548ce07328Smrg#endif
6558ce07328Smrg#ifdef HAVE_SYS_STAT_H
6568ce07328Smrg# include <sys/stat.h>
6578ce07328Smrg#endif
65842a55b46Smrg#ifdef HAVE_UNISTD_H
65942a55b46Smrg# include <unistd.h>
66042a55b46Smrg#endif"
661c582b7e3Smrg
6628ce07328Smrgac_header_c_list=
66342a55b46Smrgac_subst_vars='am__EXEEXT_FALSE
66442a55b46Smrgam__EXEEXT_TRUE
66542a55b46SmrgLTLIBOBJS
66642a55b46SmrgLIBOBJS
66742a55b46SmrgDRIVER_NAME
66842a55b46Smrgmoduledir
66942a55b46SmrgXSERVER_LIBPCIACCESS_FALSE
67042a55b46SmrgXSERVER_LIBPCIACCESS_TRUE
67142a55b46SmrgPCIACCESS_LIBS
67242a55b46SmrgPCIACCESS_CFLAGS
67342a55b46SmrgUSE_EXA_FALSE
67442a55b46SmrgUSE_EXA_TRUE
67542a55b46SmrgXAA_FALSE
67642a55b46SmrgXAA_TRUE
6778ce07328SmrgCPP
67842a55b46SmrgDRI_LIBS
67942a55b46SmrgDRI_CFLAGS
68042a55b46SmrgDRI_FALSE
68142a55b46SmrgDRI_TRUE
68242a55b46SmrgHAVE_XEXTPROTO_71_FALSE
68342a55b46SmrgHAVE_XEXTPROTO_71_TRUE
68442a55b46SmrgXEXT_LIBS
68542a55b46SmrgXEXT_CFLAGS
68642a55b46SmrgXORG_LIBS
68742a55b46SmrgXORG_CFLAGS
688e3d74329SmrgLT_SYS_LIBRARY_PATH
68942a55b46SmrgOTOOL64
69042a55b46SmrgOTOOL
69142a55b46SmrgLIPO
69242a55b46SmrgNMEDIT
69342a55b46SmrgDSYMUTIL
69442a55b46SmrgMANIFEST_TOOL
69542a55b46SmrgRANLIB
69642a55b46Smrgac_ct_AR
69742a55b46SmrgAR
69842a55b46SmrgDLLTOOL
69942a55b46SmrgOBJDUMP
7008ce07328SmrgFILECMD
70142a55b46SmrgLN_S
70242a55b46SmrgNM
70342a55b46Smrgac_ct_DUMPBIN
70442a55b46SmrgDUMPBIN
70542a55b46SmrgLD
70642a55b46SmrgFGREP
7078ce07328SmrgEGREP
7088ce07328SmrgGREP
70942a55b46SmrgLIBTOOL
71042a55b46SmrgMAN_SUBSTS
71142a55b46SmrgXORG_MAN_PAGE
71242a55b46SmrgADMIN_MAN_DIR
71342a55b46SmrgDRIVER_MAN_DIR
71442a55b46SmrgMISC_MAN_DIR
71542a55b46SmrgFILE_MAN_DIR
71642a55b46SmrgLIB_MAN_DIR
71742a55b46SmrgAPP_MAN_DIR
71842a55b46SmrgADMIN_MAN_SUFFIX
71942a55b46SmrgDRIVER_MAN_SUFFIX
72042a55b46SmrgMISC_MAN_SUFFIX
72142a55b46SmrgFILE_MAN_SUFFIX
72242a55b46SmrgLIB_MAN_SUFFIX
72342a55b46SmrgAPP_MAN_SUFFIX
72442a55b46SmrgSED
72542a55b46Smrghost_os
72642a55b46Smrghost_vendor
72742a55b46Smrghost_cpu
72842a55b46Smrghost
72942a55b46Smrgbuild_os
73042a55b46Smrgbuild_vendor
73142a55b46Smrgbuild_cpu
73242a55b46Smrgbuild
73342a55b46SmrgINSTALL_CMD
73442a55b46SmrgPKG_CONFIG_LIBDIR
73542a55b46SmrgPKG_CONFIG_PATH
73642a55b46SmrgPKG_CONFIG
73742a55b46SmrgCHANGELOG_CMD
73842a55b46SmrgSTRICT_CFLAGS
73942a55b46SmrgCWARNFLAGS
74042a55b46SmrgBASE_CFLAGS
74142a55b46Smrgam__fastdepCC_FALSE
74242a55b46Smrgam__fastdepCC_TRUE
74342a55b46SmrgCCDEPMODE
74442a55b46Smrgam__nodep
74542a55b46SmrgAMDEPBACKSLASH
74642a55b46SmrgAMDEP_FALSE
74742a55b46SmrgAMDEP_TRUE
74842a55b46Smrgam__include
74942a55b46SmrgDEPDIR
75042a55b46SmrgOBJEXT
75142a55b46SmrgEXEEXT
75242a55b46Smrgac_ct_CC
75342a55b46SmrgCPPFLAGS
75442a55b46SmrgLDFLAGS
75542a55b46SmrgCFLAGS
75642a55b46SmrgCC
757e3d74329SmrgAM_BACKSLASH
758e3d74329SmrgAM_DEFAULT_VERBOSITY
759e3d74329SmrgAM_DEFAULT_V
760e3d74329SmrgAM_V
7618ce07328SmrgCSCOPE
7628ce07328SmrgETAGS
7638ce07328SmrgCTAGS
76442a55b46Smrgam__untar
76542a55b46Smrgam__tar
76642a55b46SmrgAMTAR
76742a55b46Smrgam__leading_dot
76842a55b46SmrgSET_MAKE
76942a55b46SmrgAWK
77042a55b46Smrgmkdir_p
77142a55b46SmrgMKDIR_P
77242a55b46SmrgINSTALL_STRIP_PROGRAM
77342a55b46SmrgSTRIP
77442a55b46Smrginstall_sh
77542a55b46SmrgMAKEINFO
77642a55b46SmrgAUTOHEADER
77742a55b46SmrgAUTOMAKE
77842a55b46SmrgAUTOCONF
77942a55b46SmrgACLOCAL
78042a55b46SmrgVERSION
78142a55b46SmrgPACKAGE
78242a55b46SmrgCYGPATH_W
78342a55b46Smrgam__isrc
78442a55b46SmrgINSTALL_DATA
78542a55b46SmrgINSTALL_SCRIPT
78642a55b46SmrgINSTALL_PROGRAM
78742a55b46Smrgtarget_alias
78842a55b46Smrghost_alias
78942a55b46Smrgbuild_alias
79042a55b46SmrgLIBS
79142a55b46SmrgECHO_T
79242a55b46SmrgECHO_N
79342a55b46SmrgECHO_C
79442a55b46SmrgDEFS
79542a55b46Smrgmandir
79642a55b46Smrglocaledir
79742a55b46Smrglibdir
79842a55b46Smrgpsdir
79942a55b46Smrgpdfdir
80042a55b46Smrgdvidir
80142a55b46Smrghtmldir
80242a55b46Smrginfodir
80342a55b46Smrgdocdir
80442a55b46Smrgoldincludedir
80542a55b46Smrgincludedir
806cd241713Smrgrunstatedir
80742a55b46Smrglocalstatedir
80842a55b46Smrgsharedstatedir
80942a55b46Smrgsysconfdir
81042a55b46Smrgdatadir
81142a55b46Smrgdatarootdir
81242a55b46Smrglibexecdir
81342a55b46Smrgsbindir
81442a55b46Smrgbindir
81542a55b46Smrgprogram_transform_name
81642a55b46Smrgprefix
81742a55b46Smrgexec_prefix
81842a55b46SmrgPACKAGE_URL
81942a55b46SmrgPACKAGE_BUGREPORT
82042a55b46SmrgPACKAGE_STRING
82142a55b46SmrgPACKAGE_VERSION
82242a55b46SmrgPACKAGE_TARNAME
82342a55b46SmrgPACKAGE_NAME
82442a55b46SmrgPATH_SEPARATOR
8258ce07328SmrgSHELL
8268ce07328Smrgam__quote'
82742a55b46Smrgac_subst_files=''
82842a55b46Smrgac_user_opts='
82942a55b46Smrgenable_option_checking
830e3d74329Smrgenable_silent_rules
83142a55b46Smrgenable_dependency_tracking
83242a55b46Smrgenable_selective_werror
83342a55b46Smrgenable_strict_compilation
83442a55b46Smrgenable_static
83542a55b46Smrgenable_shared
83642a55b46Smrgwith_pic
83742a55b46Smrgenable_fast_install
838e3d74329Smrgwith_aix_soname
83942a55b46Smrgwith_gnu_ld
84042a55b46Smrgwith_sysroot
84142a55b46Smrgenable_libtool_lock
84242a55b46Smrgwith_xorg_module_dir
84342a55b46Smrgenable_dri
84442a55b46Smrgenable_exa
84542a55b46Smrgenable_xaa
84642a55b46Smrg'
84742a55b46Smrg      ac_precious_vars='build_alias
84842a55b46Smrghost_alias
84942a55b46Smrgtarget_alias
85042a55b46SmrgCC
85142a55b46SmrgCFLAGS
85242a55b46SmrgLDFLAGS
85342a55b46SmrgLIBS
85442a55b46SmrgCPPFLAGS
85542a55b46SmrgPKG_CONFIG
85642a55b46SmrgPKG_CONFIG_PATH
85742a55b46SmrgPKG_CONFIG_LIBDIR
858e3d74329SmrgLT_SYS_LIBRARY_PATH
85942a55b46SmrgXORG_CFLAGS
86042a55b46SmrgXORG_LIBS
86142a55b46SmrgXEXT_CFLAGS
86242a55b46SmrgXEXT_LIBS
86342a55b46SmrgDRI_CFLAGS
86442a55b46SmrgDRI_LIBS
8658ce07328SmrgCPP
86642a55b46SmrgPCIACCESS_CFLAGS
86742a55b46SmrgPCIACCESS_LIBS'
868c582b7e3Smrg
869c582b7e3Smrg
87042a55b46Smrg# Initialize some variables set by options.
87142a55b46Smrgac_init_help=
87242a55b46Smrgac_init_version=false
87342a55b46Smrgac_unrecognized_opts=
87442a55b46Smrgac_unrecognized_sep=
87542a55b46Smrg# The variables have the same names as the options, with
87642a55b46Smrg# dashes changed to underlines.
87742a55b46Smrgcache_file=/dev/null
87842a55b46Smrgexec_prefix=NONE
87942a55b46Smrgno_create=
88042a55b46Smrgno_recursion=
88142a55b46Smrgprefix=NONE
88242a55b46Smrgprogram_prefix=NONE
88342a55b46Smrgprogram_suffix=NONE
88442a55b46Smrgprogram_transform_name=s,x,x,
88542a55b46Smrgsilent=
88642a55b46Smrgsite=
88742a55b46Smrgsrcdir=
88842a55b46Smrgverbose=
88942a55b46Smrgx_includes=NONE
89042a55b46Smrgx_libraries=NONE
891c582b7e3Smrg
89242a55b46Smrg# Installation directory options.
89342a55b46Smrg# These are left unexpanded so users can "make install exec_prefix=/foo"
89442a55b46Smrg# and all the variables that are supposed to be based on exec_prefix
89542a55b46Smrg# by default will actually change.
89642a55b46Smrg# Use braces instead of parens because sh, perl, etc. also accept them.
89742a55b46Smrg# (The list follows the same order as the GNU Coding Standards.)
89842a55b46Smrgbindir='${exec_prefix}/bin'
89942a55b46Smrgsbindir='${exec_prefix}/sbin'
90042a55b46Smrglibexecdir='${exec_prefix}/libexec'
90142a55b46Smrgdatarootdir='${prefix}/share'
90242a55b46Smrgdatadir='${datarootdir}'
90342a55b46Smrgsysconfdir='${prefix}/etc'
90442a55b46Smrgsharedstatedir='${prefix}/com'
90542a55b46Smrglocalstatedir='${prefix}/var'
906cd241713Smrgrunstatedir='${localstatedir}/run'
90742a55b46Smrgincludedir='${prefix}/include'
90842a55b46Smrgoldincludedir='/usr/include'
90942a55b46Smrgdocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
91042a55b46Smrginfodir='${datarootdir}/info'
91142a55b46Smrghtmldir='${docdir}'
91242a55b46Smrgdvidir='${docdir}'
91342a55b46Smrgpdfdir='${docdir}'
91442a55b46Smrgpsdir='${docdir}'
91542a55b46Smrglibdir='${exec_prefix}/lib'
91642a55b46Smrglocaledir='${datarootdir}/locale'
91742a55b46Smrgmandir='${datarootdir}/man'
918c582b7e3Smrg
91942a55b46Smrgac_prev=
92042a55b46Smrgac_dashdash=
92142a55b46Smrgfor ac_option
92242a55b46Smrgdo
92342a55b46Smrg  # If the previous option needs an argument, assign it.
92442a55b46Smrg  if test -n "$ac_prev"; then
92542a55b46Smrg    eval $ac_prev=\$ac_option
92642a55b46Smrg    ac_prev=
92742a55b46Smrg    continue
92842a55b46Smrg  fi
929c582b7e3Smrg
93042a55b46Smrg  case $ac_option in
93142a55b46Smrg  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
93242a55b46Smrg  *=)   ac_optarg= ;;
93342a55b46Smrg  *)    ac_optarg=yes ;;
93442a55b46Smrg  esac
935c582b7e3Smrg
93642a55b46Smrg  case $ac_dashdash$ac_option in
93742a55b46Smrg  --)
93842a55b46Smrg    ac_dashdash=yes ;;
939c582b7e3Smrg
94042a55b46Smrg  -bindir | --bindir | --bindi | --bind | --bin | --bi)
94142a55b46Smrg    ac_prev=bindir ;;
94242a55b46Smrg  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
94342a55b46Smrg    bindir=$ac_optarg ;;
944c582b7e3Smrg
94542a55b46Smrg  -build | --build | --buil | --bui | --bu)
94642a55b46Smrg    ac_prev=build_alias ;;
94742a55b46Smrg  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94842a55b46Smrg    build_alias=$ac_optarg ;;
949c582b7e3Smrg
95042a55b46Smrg  -cache-file | --cache-file | --cache-fil | --cache-fi \
95142a55b46Smrg  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
95242a55b46Smrg    ac_prev=cache_file ;;
95342a55b46Smrg  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
95442a55b46Smrg  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95542a55b46Smrg    cache_file=$ac_optarg ;;
956c582b7e3Smrg
95742a55b46Smrg  --config-cache | -C)
95842a55b46Smrg    cache_file=config.cache ;;
959c582b7e3Smrg
96042a55b46Smrg  -datadir | --datadir | --datadi | --datad)
96142a55b46Smrg    ac_prev=datadir ;;
96242a55b46Smrg  -datadir=* | --datadir=* | --datadi=* | --datad=*)
96342a55b46Smrg    datadir=$ac_optarg ;;
964c582b7e3Smrg
96542a55b46Smrg  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
96642a55b46Smrg  | --dataroo | --dataro | --datar)
96742a55b46Smrg    ac_prev=datarootdir ;;
96842a55b46Smrg  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
96942a55b46Smrg  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
97042a55b46Smrg    datarootdir=$ac_optarg ;;
971c582b7e3Smrg
97242a55b46Smrg  -disable-* | --disable-*)
97342a55b46Smrg    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
97442a55b46Smrg    # Reject names that are not valid shell variable names.
97542a55b46Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
9768ce07328Smrg      as_fn_error $? "invalid feature name: \`$ac_useropt'"
97742a55b46Smrg    ac_useropt_orig=$ac_useropt
9788ce07328Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
97942a55b46Smrg    case $ac_user_opts in
98042a55b46Smrg      *"
98142a55b46Smrg"enable_$ac_useropt"
98242a55b46Smrg"*) ;;
98342a55b46Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
98442a55b46Smrg	 ac_unrecognized_sep=', ';;
98542a55b46Smrg    esac
98642a55b46Smrg    eval enable_$ac_useropt=no ;;
987c582b7e3Smrg
98842a55b46Smrg  -docdir | --docdir | --docdi | --doc | --do)
98942a55b46Smrg    ac_prev=docdir ;;
99042a55b46Smrg  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
99142a55b46Smrg    docdir=$ac_optarg ;;
992c582b7e3Smrg
99342a55b46Smrg  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
99442a55b46Smrg    ac_prev=dvidir ;;
99542a55b46Smrg  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
99642a55b46Smrg    dvidir=$ac_optarg ;;
997c582b7e3Smrg
99842a55b46Smrg  -enable-* | --enable-*)
99942a55b46Smrg    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
100042a55b46Smrg    # Reject names that are not valid shell variable names.
100142a55b46Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
10028ce07328Smrg      as_fn_error $? "invalid feature name: \`$ac_useropt'"
100342a55b46Smrg    ac_useropt_orig=$ac_useropt
10048ce07328Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
100542a55b46Smrg    case $ac_user_opts in
100642a55b46Smrg      *"
100742a55b46Smrg"enable_$ac_useropt"
100842a55b46Smrg"*) ;;
100942a55b46Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
101042a55b46Smrg	 ac_unrecognized_sep=', ';;
101142a55b46Smrg    esac
101242a55b46Smrg    eval enable_$ac_useropt=\$ac_optarg ;;
1013c582b7e3Smrg
101442a55b46Smrg  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
101542a55b46Smrg  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
101642a55b46Smrg  | --exec | --exe | --ex)
101742a55b46Smrg    ac_prev=exec_prefix ;;
101842a55b46Smrg  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
101942a55b46Smrg  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
102042a55b46Smrg  | --exec=* | --exe=* | --ex=*)
102142a55b46Smrg    exec_prefix=$ac_optarg ;;
1022c582b7e3Smrg
102342a55b46Smrg  -gas | --gas | --ga | --g)
102442a55b46Smrg    # Obsolete; use --with-gas.
102542a55b46Smrg    with_gas=yes ;;
1026c582b7e3Smrg
102742a55b46Smrg  -help | --help | --hel | --he | -h)
102842a55b46Smrg    ac_init_help=long ;;
102942a55b46Smrg  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
103042a55b46Smrg    ac_init_help=recursive ;;
103142a55b46Smrg  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
103242a55b46Smrg    ac_init_help=short ;;
1033c582b7e3Smrg
103442a55b46Smrg  -host | --host | --hos | --ho)
103542a55b46Smrg    ac_prev=host_alias ;;
103642a55b46Smrg  -host=* | --host=* | --hos=* | --ho=*)
103742a55b46Smrg    host_alias=$ac_optarg ;;
1038c582b7e3Smrg
103942a55b46Smrg  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
104042a55b46Smrg    ac_prev=htmldir ;;
104142a55b46Smrg  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
104242a55b46Smrg  | --ht=*)
104342a55b46Smrg    htmldir=$ac_optarg ;;
1044c582b7e3Smrg
104542a55b46Smrg  -includedir | --includedir | --includedi | --included | --include \
104642a55b46Smrg  | --includ | --inclu | --incl | --inc)
104742a55b46Smrg    ac_prev=includedir ;;
104842a55b46Smrg  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
104942a55b46Smrg  | --includ=* | --inclu=* | --incl=* | --inc=*)
105042a55b46Smrg    includedir=$ac_optarg ;;
1051c582b7e3Smrg
105242a55b46Smrg  -infodir | --infodir | --infodi | --infod | --info | --inf)
105342a55b46Smrg    ac_prev=infodir ;;
105442a55b46Smrg  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
105542a55b46Smrg    infodir=$ac_optarg ;;
1056c582b7e3Smrg
105742a55b46Smrg  -libdir | --libdir | --libdi | --libd)
105842a55b46Smrg    ac_prev=libdir ;;
105942a55b46Smrg  -libdir=* | --libdir=* | --libdi=* | --libd=*)
106042a55b46Smrg    libdir=$ac_optarg ;;
1061c582b7e3Smrg
106242a55b46Smrg  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
106342a55b46Smrg  | --libexe | --libex | --libe)
106442a55b46Smrg    ac_prev=libexecdir ;;
106542a55b46Smrg  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
106642a55b46Smrg  | --libexe=* | --libex=* | --libe=*)
106742a55b46Smrg    libexecdir=$ac_optarg ;;
1068c582b7e3Smrg
106942a55b46Smrg  -localedir | --localedir | --localedi | --localed | --locale)
107042a55b46Smrg    ac_prev=localedir ;;
107142a55b46Smrg  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
107242a55b46Smrg    localedir=$ac_optarg ;;
1073c582b7e3Smrg
107442a55b46Smrg  -localstatedir | --localstatedir | --localstatedi | --localstated \
107542a55b46Smrg  | --localstate | --localstat | --localsta | --localst | --locals)
107642a55b46Smrg    ac_prev=localstatedir ;;
107742a55b46Smrg  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
107842a55b46Smrg  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
107942a55b46Smrg    localstatedir=$ac_optarg ;;
1080c582b7e3Smrg
108142a55b46Smrg  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
108242a55b46Smrg    ac_prev=mandir ;;
108342a55b46Smrg  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
108442a55b46Smrg    mandir=$ac_optarg ;;
1085c582b7e3Smrg
108642a55b46Smrg  -nfp | --nfp | --nf)
108742a55b46Smrg    # Obsolete; use --without-fp.
108842a55b46Smrg    with_fp=no ;;
1089c582b7e3Smrg
109042a55b46Smrg  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
109142a55b46Smrg  | --no-cr | --no-c | -n)
109242a55b46Smrg    no_create=yes ;;
1093c582b7e3Smrg
109442a55b46Smrg  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
109542a55b46Smrg  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
109642a55b46Smrg    no_recursion=yes ;;
1097c582b7e3Smrg
109842a55b46Smrg  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
109942a55b46Smrg  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
110042a55b46Smrg  | --oldin | --oldi | --old | --ol | --o)
110142a55b46Smrg    ac_prev=oldincludedir ;;
110242a55b46Smrg  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
110342a55b46Smrg  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
110442a55b46Smrg  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
110542a55b46Smrg    oldincludedir=$ac_optarg ;;
1106c582b7e3Smrg
110742a55b46Smrg  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
110842a55b46Smrg    ac_prev=prefix ;;
110942a55b46Smrg  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
111042a55b46Smrg    prefix=$ac_optarg ;;
1111c582b7e3Smrg
111242a55b46Smrg  -program-prefix | --program-prefix | --program-prefi | --program-pref \
111342a55b46Smrg  | --program-pre | --program-pr | --program-p)
111442a55b46Smrg    ac_prev=program_prefix ;;
111542a55b46Smrg  -program-prefix=* | --program-prefix=* | --program-prefi=* \
111642a55b46Smrg  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
111742a55b46Smrg    program_prefix=$ac_optarg ;;
1118c582b7e3Smrg
111942a55b46Smrg  -program-suffix | --program-suffix | --program-suffi | --program-suff \
112042a55b46Smrg  | --program-suf | --program-su | --program-s)
112142a55b46Smrg    ac_prev=program_suffix ;;
112242a55b46Smrg  -program-suffix=* | --program-suffix=* | --program-suffi=* \
112342a55b46Smrg  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
112442a55b46Smrg    program_suffix=$ac_optarg ;;
1125c582b7e3Smrg
112642a55b46Smrg  -program-transform-name | --program-transform-name \
112742a55b46Smrg  | --program-transform-nam | --program-transform-na \
112842a55b46Smrg  | --program-transform-n | --program-transform- \
112942a55b46Smrg  | --program-transform | --program-transfor \
113042a55b46Smrg  | --program-transfo | --program-transf \
113142a55b46Smrg  | --program-trans | --program-tran \
113242a55b46Smrg  | --progr-tra | --program-tr | --program-t)
113342a55b46Smrg    ac_prev=program_transform_name ;;
113442a55b46Smrg  -program-transform-name=* | --program-transform-name=* \
113542a55b46Smrg  | --program-transform-nam=* | --program-transform-na=* \
113642a55b46Smrg  | --program-transform-n=* | --program-transform-=* \
113742a55b46Smrg  | --program-transform=* | --program-transfor=* \
113842a55b46Smrg  | --program-transfo=* | --program-transf=* \
113942a55b46Smrg  | --program-trans=* | --program-tran=* \
114042a55b46Smrg  | --progr-tra=* | --program-tr=* | --program-t=*)
114142a55b46Smrg    program_transform_name=$ac_optarg ;;
1142c582b7e3Smrg
114342a55b46Smrg  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
114442a55b46Smrg    ac_prev=pdfdir ;;
114542a55b46Smrg  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
114642a55b46Smrg    pdfdir=$ac_optarg ;;
1147c582b7e3Smrg
114842a55b46Smrg  -psdir | --psdir | --psdi | --psd | --ps)
114942a55b46Smrg    ac_prev=psdir ;;
115042a55b46Smrg  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
115142a55b46Smrg    psdir=$ac_optarg ;;
1152c582b7e3Smrg
115342a55b46Smrg  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
115442a55b46Smrg  | -silent | --silent | --silen | --sile | --sil)
115542a55b46Smrg    silent=yes ;;
1156c582b7e3Smrg
1157cd241713Smrg  -runstatedir | --runstatedir | --runstatedi | --runstated \
1158cd241713Smrg  | --runstate | --runstat | --runsta | --runst | --runs \
1159cd241713Smrg  | --run | --ru | --r)
1160cd241713Smrg    ac_prev=runstatedir ;;
1161cd241713Smrg  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1162cd241713Smrg  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1163cd241713Smrg  | --run=* | --ru=* | --r=*)
1164cd241713Smrg    runstatedir=$ac_optarg ;;
1165cd241713Smrg
116642a55b46Smrg  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
116742a55b46Smrg    ac_prev=sbindir ;;
116842a55b46Smrg  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
116942a55b46Smrg  | --sbi=* | --sb=*)
117042a55b46Smrg    sbindir=$ac_optarg ;;
1171c582b7e3Smrg
117242a55b46Smrg  -sharedstatedir | --sharedstatedir | --sharedstatedi \
117342a55b46Smrg  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
117442a55b46Smrg  | --sharedst | --shareds | --shared | --share | --shar \
117542a55b46Smrg  | --sha | --sh)
117642a55b46Smrg    ac_prev=sharedstatedir ;;
117742a55b46Smrg  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
117842a55b46Smrg  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
117942a55b46Smrg  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
118042a55b46Smrg  | --sha=* | --sh=*)
118142a55b46Smrg    sharedstatedir=$ac_optarg ;;
1182c582b7e3Smrg
118342a55b46Smrg  -site | --site | --sit)
118442a55b46Smrg    ac_prev=site ;;
118542a55b46Smrg  -site=* | --site=* | --sit=*)
118642a55b46Smrg    site=$ac_optarg ;;
1187c582b7e3Smrg
118842a55b46Smrg  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
118942a55b46Smrg    ac_prev=srcdir ;;
119042a55b46Smrg  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
119142a55b46Smrg    srcdir=$ac_optarg ;;
1192c582b7e3Smrg
119342a55b46Smrg  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
119442a55b46Smrg  | --syscon | --sysco | --sysc | --sys | --sy)
119542a55b46Smrg    ac_prev=sysconfdir ;;
119642a55b46Smrg  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
119742a55b46Smrg  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
119842a55b46Smrg    sysconfdir=$ac_optarg ;;
1199c582b7e3Smrg
120042a55b46Smrg  -target | --target | --targe | --targ | --tar | --ta | --t)
120142a55b46Smrg    ac_prev=target_alias ;;
120242a55b46Smrg  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
120342a55b46Smrg    target_alias=$ac_optarg ;;
1204c582b7e3Smrg
120542a55b46Smrg  -v | -verbose | --verbose | --verbos | --verbo | --verb)
120642a55b46Smrg    verbose=yes ;;
1207c582b7e3Smrg
120842a55b46Smrg  -version | --version | --versio | --versi | --vers | -V)
120942a55b46Smrg    ac_init_version=: ;;
1210c582b7e3Smrg
121142a55b46Smrg  -with-* | --with-*)
121242a55b46Smrg    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
121342a55b46Smrg    # Reject names that are not valid shell variable names.
121442a55b46Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
12158ce07328Smrg      as_fn_error $? "invalid package name: \`$ac_useropt'"
121642a55b46Smrg    ac_useropt_orig=$ac_useropt
12178ce07328Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
121842a55b46Smrg    case $ac_user_opts in
121942a55b46Smrg      *"
122042a55b46Smrg"with_$ac_useropt"
122142a55b46Smrg"*) ;;
122242a55b46Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
122342a55b46Smrg	 ac_unrecognized_sep=', ';;
122442a55b46Smrg    esac
122542a55b46Smrg    eval with_$ac_useropt=\$ac_optarg ;;
1226c582b7e3Smrg
122742a55b46Smrg  -without-* | --without-*)
122842a55b46Smrg    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
122942a55b46Smrg    # Reject names that are not valid shell variable names.
123042a55b46Smrg    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
12318ce07328Smrg      as_fn_error $? "invalid package name: \`$ac_useropt'"
123242a55b46Smrg    ac_useropt_orig=$ac_useropt
12338ce07328Smrg    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
123442a55b46Smrg    case $ac_user_opts in
123542a55b46Smrg      *"
123642a55b46Smrg"with_$ac_useropt"
123742a55b46Smrg"*) ;;
123842a55b46Smrg      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
123942a55b46Smrg	 ac_unrecognized_sep=', ';;
124042a55b46Smrg    esac
124142a55b46Smrg    eval with_$ac_useropt=no ;;
1242c582b7e3Smrg
124342a55b46Smrg  --x)
124442a55b46Smrg    # Obsolete; use --with-x.
124542a55b46Smrg    with_x=yes ;;
1246c582b7e3Smrg
124742a55b46Smrg  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
124842a55b46Smrg  | --x-incl | --x-inc | --x-in | --x-i)
124942a55b46Smrg    ac_prev=x_includes ;;
125042a55b46Smrg  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
125142a55b46Smrg  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
125242a55b46Smrg    x_includes=$ac_optarg ;;
1253c582b7e3Smrg
125442a55b46Smrg  -x-libraries | --x-libraries | --x-librarie | --x-librari \
125542a55b46Smrg  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
125642a55b46Smrg    ac_prev=x_libraries ;;
125742a55b46Smrg  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
125842a55b46Smrg  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
125942a55b46Smrg    x_libraries=$ac_optarg ;;
1260c582b7e3Smrg
126142a55b46Smrg  -*) as_fn_error $? "unrecognized option: \`$ac_option'
126242a55b46SmrgTry \`$0 --help' for more information"
126342a55b46Smrg    ;;
1264c582b7e3Smrg
126542a55b46Smrg  *=*)
126642a55b46Smrg    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
126742a55b46Smrg    # Reject names that are not valid shell variable names.
126842a55b46Smrg    case $ac_envvar in #(
126942a55b46Smrg      '' | [0-9]* | *[!_$as_cr_alnum]* )
127042a55b46Smrg      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
127142a55b46Smrg    esac
127242a55b46Smrg    eval $ac_envvar=\$ac_optarg
127342a55b46Smrg    export $ac_envvar ;;
1274c582b7e3Smrg
1275c582b7e3Smrg  *)
1276c582b7e3Smrg    # FIXME: should be removed in autoconf 3.0.
12778ce07328Smrg    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1278c582b7e3Smrg    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
12798ce07328Smrg      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
128042a55b46Smrg    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1281c582b7e3Smrg    ;;
1282c582b7e3Smrg
1283c582b7e3Smrg  esac
1284c582b7e3Smrgdone
1285c582b7e3Smrg
1286c582b7e3Smrgif test -n "$ac_prev"; then
1287c582b7e3Smrg  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
128842a55b46Smrg  as_fn_error $? "missing argument to $ac_option"
1289c582b7e3Smrgfi
1290c582b7e3Smrg
129119019ffeSmrgif test -n "$ac_unrecognized_opts"; then
129219019ffeSmrg  case $enable_option_checking in
129319019ffeSmrg    no) ;;
129442a55b46Smrg    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
12958ce07328Smrg    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
129619019ffeSmrg  esac
129719019ffeSmrgfi
129819019ffeSmrg
129919019ffeSmrg# Check all directory arguments for consistency.
1300c582b7e3Smrgfor ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1301c582b7e3Smrg		datadir sysconfdir sharedstatedir localstatedir includedir \
1302c582b7e3Smrg		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1303cd241713Smrg		libdir localedir mandir runstatedir
1304c582b7e3Smrgdo
1305c582b7e3Smrg  eval ac_val=\$$ac_var
130619019ffeSmrg  # Remove trailing slashes.
130719019ffeSmrg  case $ac_val in
130819019ffeSmrg    */ )
130919019ffeSmrg      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
131019019ffeSmrg      eval $ac_var=\$ac_val;;
131119019ffeSmrg  esac
131219019ffeSmrg  # Be sure to have absolute directory names.
1313c582b7e3Smrg  case $ac_val in
1314c582b7e3Smrg    [\\/$]* | ?:[\\/]* )  continue;;
1315c582b7e3Smrg    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1316c582b7e3Smrg  esac
131742a55b46Smrg  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1318c582b7e3Smrgdone
1319c582b7e3Smrg
1320c582b7e3Smrg# There might be people who depend on the old broken behavior: `$host'
1321c582b7e3Smrg# used to hold the argument of --host etc.
1322c582b7e3Smrg# FIXME: To remove some day.
1323c582b7e3Smrgbuild=$build_alias
1324c582b7e3Smrghost=$host_alias
1325c582b7e3Smrgtarget=$target_alias
1326c582b7e3Smrg
1327c582b7e3Smrg# FIXME: To remove some day.
1328c582b7e3Smrgif test "x$host_alias" != x; then
1329c582b7e3Smrg  if test "x$build_alias" = x; then
1330c582b7e3Smrg    cross_compiling=maybe
1331c582b7e3Smrg  elif test "x$build_alias" != "x$host_alias"; then
1332c582b7e3Smrg    cross_compiling=yes
1333c582b7e3Smrg  fi
1334c582b7e3Smrgfi
1335c582b7e3Smrg
1336c582b7e3Smrgac_tool_prefix=
1337c582b7e3Smrgtest -n "$host_alias" && ac_tool_prefix=$host_alias-
1338c582b7e3Smrg
1339c582b7e3Smrgtest "$silent" = yes && exec 6>/dev/null
1340c582b7e3Smrg
1341c582b7e3Smrg
1342c582b7e3Smrgac_pwd=`pwd` && test -n "$ac_pwd" &&
1343c582b7e3Smrgac_ls_di=`ls -di .` &&
1344c582b7e3Smrgac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
134542a55b46Smrg  as_fn_error $? "working directory cannot be determined"
1346c582b7e3Smrgtest "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
134742a55b46Smrg  as_fn_error $? "pwd does not report name of working directory"
1348c582b7e3Smrg
1349c582b7e3Smrg
1350c582b7e3Smrg# Find the source files, if location was not specified.
1351c582b7e3Smrgif test -z "$srcdir"; then
1352c582b7e3Smrg  ac_srcdir_defaulted=yes
1353c582b7e3Smrg  # Try the directory containing this script, then the parent directory.
135419019ffeSmrg  ac_confdir=`$as_dirname -- "$as_myself" ||
135519019ffeSmrg$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
135619019ffeSmrg	 X"$as_myself" : 'X\(//\)[^/]' \| \
135719019ffeSmrg	 X"$as_myself" : 'X\(//\)$' \| \
135819019ffeSmrg	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
13598ce07328Smrgprintf "%s\n" X"$as_myself" |
1360c582b7e3Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1361c582b7e3Smrg	    s//\1/
1362c582b7e3Smrg	    q
1363c582b7e3Smrg	  }
1364c582b7e3Smrg	  /^X\(\/\/\)[^/].*/{
1365c582b7e3Smrg	    s//\1/
1366c582b7e3Smrg	    q
1367c582b7e3Smrg	  }
1368c582b7e3Smrg	  /^X\(\/\/\)$/{
1369c582b7e3Smrg	    s//\1/
1370c582b7e3Smrg	    q
1371c582b7e3Smrg	  }
1372c582b7e3Smrg	  /^X\(\/\).*/{
1373c582b7e3Smrg	    s//\1/
1374c582b7e3Smrg	    q
1375c582b7e3Smrg	  }
1376c582b7e3Smrg	  s/.*/./; q'`
1377c582b7e3Smrg  srcdir=$ac_confdir
1378c582b7e3Smrg  if test ! -r "$srcdir/$ac_unique_file"; then
1379c582b7e3Smrg    srcdir=..
1380c582b7e3Smrg  fi
1381c582b7e3Smrgelse
1382c582b7e3Smrg  ac_srcdir_defaulted=no
1383c582b7e3Smrgfi
1384c582b7e3Smrgif test ! -r "$srcdir/$ac_unique_file"; then
1385c582b7e3Smrg  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
138642a55b46Smrg  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1387c582b7e3Smrgfi
1388c582b7e3Smrgac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1389c582b7e3Smrgac_abs_confdir=`(
139042a55b46Smrg	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1391c582b7e3Smrg	pwd)`
1392c582b7e3Smrg# When building in place, set srcdir=.
1393c582b7e3Smrgif test "$ac_abs_confdir" = "$ac_pwd"; then
1394c582b7e3Smrg  srcdir=.
1395c582b7e3Smrgfi
1396c582b7e3Smrg# Remove unnecessary trailing slashes from srcdir.
1397c582b7e3Smrg# Double slashes in file names in object file debugging info
1398c582b7e3Smrg# mess up M-x gdb in Emacs.
1399c582b7e3Smrgcase $srcdir in
1400c582b7e3Smrg*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1401c582b7e3Smrgesac
1402c582b7e3Smrgfor ac_var in $ac_precious_vars; do
1403c582b7e3Smrg  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1404c582b7e3Smrg  eval ac_env_${ac_var}_value=\$${ac_var}
1405c582b7e3Smrg  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1406c582b7e3Smrg  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1407c582b7e3Smrgdone
1408c582b7e3Smrg
1409c582b7e3Smrg#
1410c582b7e3Smrg# Report the --help message.
1411c582b7e3Smrg#
1412c582b7e3Smrgif test "$ac_init_help" = "long"; then
1413c582b7e3Smrg  # Omit some internal or obsolete options to make the list less imposing.
1414c582b7e3Smrg  # This message is too long to be a string in the A/UX 3.1 sh.
1415c582b7e3Smrg  cat <<_ACEOF
14168ce07328Smrg\`configure' configures xf86-video-r128 6.12.1 to adapt to many kinds of systems.
1417c582b7e3Smrg
1418c582b7e3SmrgUsage: $0 [OPTION]... [VAR=VALUE]...
1419c582b7e3Smrg
1420c582b7e3SmrgTo assign environment variables (e.g., CC, CFLAGS...), specify them as
1421c582b7e3SmrgVAR=VALUE.  See below for descriptions of some of the useful variables.
1422c582b7e3Smrg
1423c582b7e3SmrgDefaults for the options are specified in brackets.
1424c582b7e3Smrg
1425c582b7e3SmrgConfiguration:
1426c582b7e3Smrg  -h, --help              display this help and exit
1427c582b7e3Smrg      --help=short        display options specific to this package
1428c582b7e3Smrg      --help=recursive    display the short help of all the included packages
1429c582b7e3Smrg  -V, --version           display version information and exit
143042a55b46Smrg  -q, --quiet, --silent   do not print \`checking ...' messages
1431c582b7e3Smrg      --cache-file=FILE   cache test results in FILE [disabled]
1432c582b7e3Smrg  -C, --config-cache      alias for \`--cache-file=config.cache'
1433c582b7e3Smrg  -n, --no-create         do not create output files
1434c582b7e3Smrg      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1435c582b7e3Smrg
1436c582b7e3SmrgInstallation directories:
1437c582b7e3Smrg  --prefix=PREFIX         install architecture-independent files in PREFIX
143819019ffeSmrg                          [$ac_default_prefix]
1439c582b7e3Smrg  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
144019019ffeSmrg                          [PREFIX]
1441c582b7e3Smrg
1442c582b7e3SmrgBy default, \`make install' will install all the files in
1443c582b7e3Smrg\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1444c582b7e3Smrgan installation prefix other than \`$ac_default_prefix' using \`--prefix',
1445c582b7e3Smrgfor instance \`--prefix=\$HOME'.
1446c582b7e3Smrg
1447c582b7e3SmrgFor better control, use the options below.
1448c582b7e3Smrg
1449c582b7e3SmrgFine tuning of the installation directories:
145019019ffeSmrg  --bindir=DIR            user executables [EPREFIX/bin]
145119019ffeSmrg  --sbindir=DIR           system admin executables [EPREFIX/sbin]
145219019ffeSmrg  --libexecdir=DIR        program executables [EPREFIX/libexec]
145319019ffeSmrg  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
145419019ffeSmrg  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
145519019ffeSmrg  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1456cd241713Smrg  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
145719019ffeSmrg  --libdir=DIR            object code libraries [EPREFIX/lib]
145819019ffeSmrg  --includedir=DIR        C header files [PREFIX/include]
145919019ffeSmrg  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
146019019ffeSmrg  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
146119019ffeSmrg  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
146219019ffeSmrg  --infodir=DIR           info documentation [DATAROOTDIR/info]
146319019ffeSmrg  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
146419019ffeSmrg  --mandir=DIR            man documentation [DATAROOTDIR/man]
146519019ffeSmrg  --docdir=DIR            documentation root [DATAROOTDIR/doc/xf86-video-r128]
146619019ffeSmrg  --htmldir=DIR           html documentation [DOCDIR]
146719019ffeSmrg  --dvidir=DIR            dvi documentation [DOCDIR]
146819019ffeSmrg  --pdfdir=DIR            pdf documentation [DOCDIR]
146919019ffeSmrg  --psdir=DIR             ps documentation [DOCDIR]
1470c582b7e3Smrg_ACEOF
1471c582b7e3Smrg
1472c582b7e3Smrg  cat <<\_ACEOF
1473c582b7e3Smrg
1474c582b7e3SmrgProgram names:
1475c582b7e3Smrg  --program-prefix=PREFIX            prepend PREFIX to installed program names
1476c582b7e3Smrg  --program-suffix=SUFFIX            append SUFFIX to installed program names
1477c582b7e3Smrg  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1478c582b7e3Smrg
1479c582b7e3SmrgSystem types:
1480c582b7e3Smrg  --build=BUILD     configure for building on BUILD [guessed]
1481c582b7e3Smrg  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1482c582b7e3Smrg_ACEOF
1483c582b7e3Smrgfi
1484c582b7e3Smrg
1485c582b7e3Smrgif test -n "$ac_init_help"; then
1486c582b7e3Smrg  case $ac_init_help in
14878ce07328Smrg     short | recursive ) echo "Configuration of xf86-video-r128 6.12.1:";;
1488c582b7e3Smrg   esac
1489c582b7e3Smrg  cat <<\_ACEOF
1490c582b7e3Smrg
1491c582b7e3SmrgOptional Features:
149219019ffeSmrg  --disable-option-checking  ignore unrecognized --enable/--with options
1493c582b7e3Smrg  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1494c582b7e3Smrg  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1495e3d74329Smrg  --enable-silent-rules   less verbose build output (undo: "make V=1")
1496e3d74329Smrg  --disable-silent-rules  verbose build output (undo: "make V=0")
1497e3d74329Smrg  --enable-dependency-tracking
1498e3d74329Smrg                          do not reject slow dependency extractors
1499e3d74329Smrg  --disable-dependency-tracking
1500e3d74329Smrg                          speeds up one-time build
150142a55b46Smrg  --disable-selective-werror
150242a55b46Smrg                          Turn off selective compiler errors. (default:
150342a55b46Smrg                          enabled)
150442a55b46Smrg  --enable-strict-compilation
150542a55b46Smrg                          Enable all warnings from compiler and make them
150642a55b46Smrg                          errors (default: disabled)
1507c582b7e3Smrg  --enable-static[=PKGS]  build static libraries [default=no]
1508c582b7e3Smrg  --enable-shared[=PKGS]  build shared libraries [default=yes]
1509c582b7e3Smrg  --enable-fast-install[=PKGS]
1510c582b7e3Smrg                          optimize for fast installation [default=yes]
1511c582b7e3Smrg  --disable-libtool-lock  avoid locking (might break parallel builds)
151242a55b46Smrg  --disable-dri           Disable DRI support [[default=auto]]
151342a55b46Smrg  --disable-exa           Disable EXA support [[default=enabled]]
151442a55b46Smrg  --enable-xaa            Enable legacy X Acceleration Architecture (XAA)
151542a55b46Smrg                          [default=auto]
1516c582b7e3Smrg
1517c582b7e3SmrgOptional Packages:
1518c582b7e3Smrg  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1519c582b7e3Smrg  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
152042a55b46Smrg  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1521c582b7e3Smrg                          both]
1522e3d74329Smrg  --with-aix-soname=aix|svr4|both
1523e3d74329Smrg                          shared library versioning (aka "SONAME") variant to
1524e3d74329Smrg                          provide on AIX, [default=aix].
152542a55b46Smrg  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1526e3d74329Smrg  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1527e3d74329Smrg                          compiler's sysroot if not specified).
1528c582b7e3Smrg  --with-xorg-module-dir=DIR
1529c582b7e3Smrg                          Default xorg module directory
153042a55b46Smrg                          [[default=$libdir/xorg/modules]]
1531c582b7e3Smrg
1532c582b7e3SmrgSome influential environment variables:
1533c582b7e3Smrg  CC          C compiler command
1534c582b7e3Smrg  CFLAGS      C compiler flags
1535c582b7e3Smrg  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1536c582b7e3Smrg              nonstandard directory <lib dir>
1537c582b7e3Smrg  LIBS        libraries to pass to the linker, e.g. -l<library>
153842a55b46Smrg  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1539c582b7e3Smrg              you have headers in a nonstandard directory <include dir>
1540c582b7e3Smrg  PKG_CONFIG  path to pkg-config utility
154142a55b46Smrg  PKG_CONFIG_PATH
154242a55b46Smrg              directories to add to pkg-config's search path
154342a55b46Smrg  PKG_CONFIG_LIBDIR
154442a55b46Smrg              path overriding pkg-config's built-in search path
1545e3d74329Smrg  LT_SYS_LIBRARY_PATH
1546e3d74329Smrg              User-defined run-time library search path.
1547c582b7e3Smrg  XORG_CFLAGS C compiler flags for XORG, overriding pkg-config
1548c582b7e3Smrg  XORG_LIBS   linker flags for XORG, overriding pkg-config
154919019ffeSmrg  XEXT_CFLAGS C compiler flags for XEXT, overriding pkg-config
155019019ffeSmrg  XEXT_LIBS   linker flags for XEXT, overriding pkg-config
1551c582b7e3Smrg  DRI_CFLAGS  C compiler flags for DRI, overriding pkg-config
1552c582b7e3Smrg  DRI_LIBS    linker flags for DRI, overriding pkg-config
15538ce07328Smrg  CPP         C preprocessor
1554c582b7e3Smrg  PCIACCESS_CFLAGS
1555c582b7e3Smrg              C compiler flags for PCIACCESS, overriding pkg-config
1556c582b7e3Smrg  PCIACCESS_LIBS
1557c582b7e3Smrg              linker flags for PCIACCESS, overriding pkg-config
1558c582b7e3Smrg
1559c582b7e3SmrgUse these variables to override the choices made by `configure' or to help
1560c582b7e3Smrgit to find libraries and programs with nonstandard names/locations.
1561c582b7e3Smrg
15628ce07328SmrgReport bugs to <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/issues>.
1563c582b7e3Smrg_ACEOF
1564c582b7e3Smrgac_status=$?
1565c582b7e3Smrgfi
1566c582b7e3Smrg
1567c582b7e3Smrgif test "$ac_init_help" = "recursive"; then
1568c582b7e3Smrg  # If there are subdirs, report their specific --help.
1569c582b7e3Smrg  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
157019019ffeSmrg    test -d "$ac_dir" ||
157119019ffeSmrg      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
157219019ffeSmrg      continue
1573c582b7e3Smrg    ac_builddir=.
1574c582b7e3Smrg
1575c582b7e3Smrgcase "$ac_dir" in
1576c582b7e3Smrg.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1577c582b7e3Smrg*)
15788ce07328Smrg  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1579c582b7e3Smrg  # A ".." for each directory in $ac_dir_suffix.
15808ce07328Smrg  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1581c582b7e3Smrg  case $ac_top_builddir_sub in
1582c582b7e3Smrg  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1583c582b7e3Smrg  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1584c582b7e3Smrg  esac ;;
1585c582b7e3Smrgesac
1586c582b7e3Smrgac_abs_top_builddir=$ac_pwd
1587c582b7e3Smrgac_abs_builddir=$ac_pwd$ac_dir_suffix
1588c582b7e3Smrg# for backward compatibility:
1589c582b7e3Smrgac_top_builddir=$ac_top_build_prefix
1590c582b7e3Smrg
1591c582b7e3Smrgcase $srcdir in
1592c582b7e3Smrg  .)  # We are building in place.
1593c582b7e3Smrg    ac_srcdir=.
1594c582b7e3Smrg    ac_top_srcdir=$ac_top_builddir_sub
1595c582b7e3Smrg    ac_abs_top_srcdir=$ac_pwd ;;
1596c582b7e3Smrg  [\\/]* | ?:[\\/]* )  # Absolute name.
1597c582b7e3Smrg    ac_srcdir=$srcdir$ac_dir_suffix;
1598c582b7e3Smrg    ac_top_srcdir=$srcdir
1599c582b7e3Smrg    ac_abs_top_srcdir=$srcdir ;;
1600c582b7e3Smrg  *) # Relative name.
1601c582b7e3Smrg    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1602c582b7e3Smrg    ac_top_srcdir=$ac_top_build_prefix$srcdir
1603c582b7e3Smrg    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1604c582b7e3Smrgesac
1605c582b7e3Smrgac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1606c582b7e3Smrg
1607c582b7e3Smrg    cd "$ac_dir" || { ac_status=$?; continue; }
16088ce07328Smrg    # Check for configure.gnu first; this name is used for a wrapper for
16098ce07328Smrg    # Metaconfig's "Configure" on case-insensitive file systems.
1610c582b7e3Smrg    if test -f "$ac_srcdir/configure.gnu"; then
1611c582b7e3Smrg      echo &&
1612c582b7e3Smrg      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1613c582b7e3Smrg    elif test -f "$ac_srcdir/configure"; then
1614c582b7e3Smrg      echo &&
1615c582b7e3Smrg      $SHELL "$ac_srcdir/configure" --help=recursive
1616c582b7e3Smrg    else
16178ce07328Smrg      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1618c582b7e3Smrg    fi || ac_status=$?
1619c582b7e3Smrg    cd "$ac_pwd" || { ac_status=$?; break; }
1620c582b7e3Smrg  done
1621c582b7e3Smrgfi
1622c582b7e3Smrg
1623c582b7e3Smrgtest -n "$ac_init_help" && exit $ac_status
1624c582b7e3Smrgif $ac_init_version; then
1625c582b7e3Smrg  cat <<\_ACEOF
16268ce07328Smrgxf86-video-r128 configure 6.12.1
16278ce07328Smrggenerated by GNU Autoconf 2.71
1628c582b7e3Smrg
16298ce07328SmrgCopyright (C) 2021 Free Software Foundation, Inc.
1630c582b7e3SmrgThis configure script is free software; the Free Software Foundation
1631c582b7e3Smrggives unlimited permission to copy, distribute and modify it.
1632c582b7e3Smrg_ACEOF
1633c582b7e3Smrg  exit
1634c582b7e3Smrgfi
163542a55b46Smrg
163642a55b46Smrg## ------------------------ ##
163742a55b46Smrg## Autoconf initialization. ##
163842a55b46Smrg## ------------------------ ##
163942a55b46Smrg
164042a55b46Smrg# ac_fn_c_try_compile LINENO
164142a55b46Smrg# --------------------------
164242a55b46Smrg# Try to compile conftest.$ac_ext, and return whether this succeeded.
164342a55b46Smrgac_fn_c_try_compile ()
164442a55b46Smrg{
164542a55b46Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16468ce07328Smrg  rm -f conftest.$ac_objext conftest.beam
164742a55b46Smrg  if { { ac_try="$ac_compile"
164842a55b46Smrgcase "(($ac_try" in
164942a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
165042a55b46Smrg  *) ac_try_echo=$ac_try;;
165142a55b46Smrgesac
165242a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16538ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
165442a55b46Smrg  (eval "$ac_compile") 2>conftest.err
165542a55b46Smrg  ac_status=$?
165642a55b46Smrg  if test -s conftest.err; then
165742a55b46Smrg    grep -v '^ *+' conftest.err >conftest.er1
165842a55b46Smrg    cat conftest.er1 >&5
165942a55b46Smrg    mv -f conftest.er1 conftest.err
166042a55b46Smrg  fi
16618ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
166242a55b46Smrg  test $ac_status = 0; } && {
166342a55b46Smrg	 test -z "$ac_c_werror_flag" ||
166442a55b46Smrg	 test ! -s conftest.err
16658ce07328Smrg       } && test -s conftest.$ac_objext
16668ce07328Smrgthen :
166742a55b46Smrg  ac_retval=0
16688ce07328Smrgelse $as_nop
16698ce07328Smrg  printf "%s\n" "$as_me: failed program was:" >&5
167042a55b46Smrgsed 's/^/| /' conftest.$ac_ext >&5
167142a55b46Smrg
167242a55b46Smrg	ac_retval=1
167342a55b46Smrgfi
167442a55b46Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
167542a55b46Smrg  as_fn_set_status $ac_retval
167642a55b46Smrg
167742a55b46Smrg} # ac_fn_c_try_compile
167842a55b46Smrg
16798ce07328Smrg# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
16808ce07328Smrg# ------------------------------------------------------------------
168142a55b46Smrg# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
16828ce07328Smrg# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
16838ce07328Smrgac_fn_check_decl ()
168442a55b46Smrg{
168542a55b46Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
168642a55b46Smrg  as_decl_name=`echo $2|sed 's/ *(.*//'`
16878ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
16888ce07328Smrgprintf %s "checking whether $as_decl_name is declared... " >&6; }
16898ce07328Smrgif eval test \${$3+y}
16908ce07328Smrgthen :
16918ce07328Smrg  printf %s "(cached) " >&6
16928ce07328Smrgelse $as_nop
169342a55b46Smrg  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
16948ce07328Smrg  eval ac_save_FLAGS=\$$6
16958ce07328Smrg  as_fn_append $6 " $5"
169642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
169742a55b46Smrg/* end confdefs.h.  */
169842a55b46Smrg$4
169942a55b46Smrgint
17008ce07328Smrgmain (void)
170142a55b46Smrg{
170242a55b46Smrg#ifndef $as_decl_name
170342a55b46Smrg#ifdef __cplusplus
170442a55b46Smrg  (void) $as_decl_use;
170542a55b46Smrg#else
170642a55b46Smrg  (void) $as_decl_name;
170742a55b46Smrg#endif
170842a55b46Smrg#endif
170942a55b46Smrg
171042a55b46Smrg  ;
171142a55b46Smrg  return 0;
171242a55b46Smrg}
171342a55b46Smrg_ACEOF
17148ce07328Smrgif ac_fn_c_try_compile "$LINENO"
17158ce07328Smrgthen :
171642a55b46Smrg  eval "$3=yes"
17178ce07328Smrgelse $as_nop
171842a55b46Smrg  eval "$3=no"
171942a55b46Smrgfi
17208ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17218ce07328Smrg  eval $6=\$ac_save_FLAGS
172242a55b46Smrg
172342a55b46Smrgfi
17248ce07328Smrgeval ac_res=\$$3
17258ce07328Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17268ce07328Smrgprintf "%s\n" "$ac_res" >&6; }
172742a55b46Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
172842a55b46Smrg
17298ce07328Smrg} # ac_fn_check_decl
173042a55b46Smrg
173142a55b46Smrg# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
173242a55b46Smrg# -------------------------------------------------------
173342a55b46Smrg# Tests whether HEADER exists and can be compiled using the include files in
173442a55b46Smrg# INCLUDES, setting the cache variable VAR accordingly.
173542a55b46Smrgac_fn_c_check_header_compile ()
173642a55b46Smrg{
173742a55b46Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17388ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
17398ce07328Smrgprintf %s "checking for $2... " >&6; }
17408ce07328Smrgif eval test \${$3+y}
17418ce07328Smrgthen :
17428ce07328Smrg  printf %s "(cached) " >&6
17438ce07328Smrgelse $as_nop
174442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
174542a55b46Smrg/* end confdefs.h.  */
174642a55b46Smrg$4
174742a55b46Smrg#include <$2>
174842a55b46Smrg_ACEOF
17498ce07328Smrgif ac_fn_c_try_compile "$LINENO"
17508ce07328Smrgthen :
175142a55b46Smrg  eval "$3=yes"
17528ce07328Smrgelse $as_nop
175342a55b46Smrg  eval "$3=no"
175442a55b46Smrgfi
17558ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
175642a55b46Smrgfi
175742a55b46Smrgeval ac_res=\$$3
17588ce07328Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17598ce07328Smrgprintf "%s\n" "$ac_res" >&6; }
176042a55b46Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
176142a55b46Smrg
176242a55b46Smrg} # ac_fn_c_check_header_compile
176342a55b46Smrg
176442a55b46Smrg# ac_fn_c_try_link LINENO
176542a55b46Smrg# -----------------------
176642a55b46Smrg# Try to link conftest.$ac_ext, and return whether this succeeded.
176742a55b46Smrgac_fn_c_try_link ()
176842a55b46Smrg{
176942a55b46Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17708ce07328Smrg  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
177142a55b46Smrg  if { { ac_try="$ac_link"
177242a55b46Smrgcase "(($ac_try" in
177342a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
177442a55b46Smrg  *) ac_try_echo=$ac_try;;
177542a55b46Smrgesac
177642a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
17778ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
177842a55b46Smrg  (eval "$ac_link") 2>conftest.err
177942a55b46Smrg  ac_status=$?
178042a55b46Smrg  if test -s conftest.err; then
178142a55b46Smrg    grep -v '^ *+' conftest.err >conftest.er1
178242a55b46Smrg    cat conftest.er1 >&5
178342a55b46Smrg    mv -f conftest.er1 conftest.err
178442a55b46Smrg  fi
17858ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
178642a55b46Smrg  test $ac_status = 0; } && {
178742a55b46Smrg	 test -z "$ac_c_werror_flag" ||
178842a55b46Smrg	 test ! -s conftest.err
178942a55b46Smrg       } && test -s conftest$ac_exeext && {
179042a55b46Smrg	 test "$cross_compiling" = yes ||
17910496e070Smrg	 test -x conftest$ac_exeext
17928ce07328Smrg       }
17938ce07328Smrgthen :
179442a55b46Smrg  ac_retval=0
17958ce07328Smrgelse $as_nop
17968ce07328Smrg  printf "%s\n" "$as_me: failed program was:" >&5
179742a55b46Smrgsed 's/^/| /' conftest.$ac_ext >&5
179842a55b46Smrg
179942a55b46Smrg	ac_retval=1
180042a55b46Smrgfi
180142a55b46Smrg  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
180242a55b46Smrg  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
180342a55b46Smrg  # interfere with the next link command; also delete a directory that is
180442a55b46Smrg  # left behind by Apple's compiler.  We do this before executing the actions.
180542a55b46Smrg  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
180642a55b46Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
180742a55b46Smrg  as_fn_set_status $ac_retval
180842a55b46Smrg
180942a55b46Smrg} # ac_fn_c_try_link
181042a55b46Smrg
181142a55b46Smrg# ac_fn_c_check_func LINENO FUNC VAR
181242a55b46Smrg# ----------------------------------
181342a55b46Smrg# Tests whether FUNC exists, setting the cache variable VAR accordingly
181442a55b46Smrgac_fn_c_check_func ()
181542a55b46Smrg{
181642a55b46Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18178ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
18188ce07328Smrgprintf %s "checking for $2... " >&6; }
18198ce07328Smrgif eval test \${$3+y}
18208ce07328Smrgthen :
18218ce07328Smrg  printf %s "(cached) " >&6
18228ce07328Smrgelse $as_nop
182342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
182442a55b46Smrg/* end confdefs.h.  */
182542a55b46Smrg/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
182642a55b46Smrg   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
182742a55b46Smrg#define $2 innocuous_$2
182842a55b46Smrg
182942a55b46Smrg/* System header to define __stub macros and hopefully few prototypes,
18308ce07328Smrg   which can conflict with char $2 (); below.  */
183142a55b46Smrg
18328ce07328Smrg#include <limits.h>
183342a55b46Smrg#undef $2
183442a55b46Smrg
183542a55b46Smrg/* Override any GCC internal prototype to avoid an error.
183642a55b46Smrg   Use char because int might match the return type of a GCC
183742a55b46Smrg   builtin and then its argument prototype would still apply.  */
183842a55b46Smrg#ifdef __cplusplus
183942a55b46Smrgextern "C"
184042a55b46Smrg#endif
184142a55b46Smrgchar $2 ();
184242a55b46Smrg/* The GNU C library defines this for functions which it implements
184342a55b46Smrg    to always fail with ENOSYS.  Some functions are actually named
184442a55b46Smrg    something starting with __ and the normal name is an alias.  */
184542a55b46Smrg#if defined __stub_$2 || defined __stub___$2
184642a55b46Smrgchoke me
184742a55b46Smrg#endif
184842a55b46Smrg
184942a55b46Smrgint
18508ce07328Smrgmain (void)
185142a55b46Smrg{
185242a55b46Smrgreturn $2 ();
185342a55b46Smrg  ;
185442a55b46Smrg  return 0;
185542a55b46Smrg}
185642a55b46Smrg_ACEOF
18578ce07328Smrgif ac_fn_c_try_link "$LINENO"
18588ce07328Smrgthen :
185942a55b46Smrg  eval "$3=yes"
18608ce07328Smrgelse $as_nop
186142a55b46Smrg  eval "$3=no"
186242a55b46Smrgfi
18638ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
186442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
186542a55b46Smrgfi
186642a55b46Smrgeval ac_res=\$$3
18678ce07328Smrg	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18688ce07328Smrgprintf "%s\n" "$ac_res" >&6; }
186942a55b46Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
187042a55b46Smrg
187142a55b46Smrg} # ac_fn_c_check_func
187242a55b46Smrg
18738ce07328Smrg# ac_fn_c_try_cpp LINENO
18748ce07328Smrg# ----------------------
18758ce07328Smrg# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
18768ce07328Smrgac_fn_c_try_cpp ()
187742a55b46Smrg{
187842a55b46Smrg  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18798ce07328Smrg  if { { ac_try="$ac_cpp conftest.$ac_ext"
18808ce07328Smrgcase "(($ac_try" in
18818ce07328Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18828ce07328Smrg  *) ac_try_echo=$ac_try;;
188342a55b46Smrgesac
18848ce07328Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18858ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
18868ce07328Smrg  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
18878ce07328Smrg  ac_status=$?
18888ce07328Smrg  if test -s conftest.err; then
18898ce07328Smrg    grep -v '^ *+' conftest.err >conftest.er1
18908ce07328Smrg    cat conftest.er1 >&5
18918ce07328Smrg    mv -f conftest.er1 conftest.err
18928ce07328Smrg  fi
18938ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18948ce07328Smrg  test $ac_status = 0; } > conftest.i && {
18958ce07328Smrg	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18968ce07328Smrg	 test ! -s conftest.err
18978ce07328Smrg       }
18988ce07328Smrgthen :
18998ce07328Smrg  ac_retval=0
19008ce07328Smrgelse $as_nop
19018ce07328Smrg  printf "%s\n" "$as_me: failed program was:" >&5
19028ce07328Smrgsed 's/^/| /' conftest.$ac_ext >&5
19038ce07328Smrg
19048ce07328Smrg    ac_retval=1
190542a55b46Smrgfi
190642a55b46Smrg  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
19078ce07328Smrg  as_fn_set_status $ac_retval
19088ce07328Smrg
19098ce07328Smrg} # ac_fn_c_try_cpp
19108ce07328Smrgac_configure_args_raw=
19118ce07328Smrgfor ac_arg
19128ce07328Smrgdo
19138ce07328Smrg  case $ac_arg in
19148ce07328Smrg  *\'*)
19158ce07328Smrg    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19168ce07328Smrg  esac
19178ce07328Smrg  as_fn_append ac_configure_args_raw " '$ac_arg'"
19188ce07328Smrgdone
19198ce07328Smrg
19208ce07328Smrgcase $ac_configure_args_raw in
19218ce07328Smrg  *$as_nl*)
19228ce07328Smrg    ac_safe_unquote= ;;
19238ce07328Smrg  *)
19248ce07328Smrg    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
19258ce07328Smrg    ac_unsafe_a="$ac_unsafe_z#~"
19268ce07328Smrg    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
19278ce07328Smrg    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
19288ce07328Smrgesac
192942a55b46Smrg
1930c582b7e3Smrgcat >config.log <<_ACEOF
1931c582b7e3SmrgThis file contains any messages produced by compilers while
1932c582b7e3Smrgrunning configure, to aid debugging if configure makes a mistake.
1933c582b7e3Smrg
19348ce07328SmrgIt was created by xf86-video-r128 $as_me 6.12.1, which was
19358ce07328Smrggenerated by GNU Autoconf 2.71.  Invocation command line was
1936c582b7e3Smrg
19378ce07328Smrg  $ $0$ac_configure_args_raw
1938c582b7e3Smrg
1939c582b7e3Smrg_ACEOF
1940c582b7e3Smrgexec 5>>config.log
1941c582b7e3Smrg{
1942c582b7e3Smrgcat <<_ASUNAME
1943c582b7e3Smrg## --------- ##
1944c582b7e3Smrg## Platform. ##
1945c582b7e3Smrg## --------- ##
1946c582b7e3Smrg
1947c582b7e3Smrghostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1948c582b7e3Smrguname -m = `(uname -m) 2>/dev/null || echo unknown`
1949c582b7e3Smrguname -r = `(uname -r) 2>/dev/null || echo unknown`
1950c582b7e3Smrguname -s = `(uname -s) 2>/dev/null || echo unknown`
1951c582b7e3Smrguname -v = `(uname -v) 2>/dev/null || echo unknown`
1952c582b7e3Smrg
1953c582b7e3Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1954c582b7e3Smrg/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1955c582b7e3Smrg
1956c582b7e3Smrg/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1957c582b7e3Smrg/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1958c582b7e3Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1959c582b7e3Smrg/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1960c582b7e3Smrg/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1961c582b7e3Smrg/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1962c582b7e3Smrg/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1963c582b7e3Smrg
1964c582b7e3Smrg_ASUNAME
1965c582b7e3Smrg
1966c582b7e3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1967c582b7e3Smrgfor as_dir in $PATH
1968c582b7e3Smrgdo
1969c582b7e3Smrg  IFS=$as_save_IFS
19708ce07328Smrg  case $as_dir in #(((
19718ce07328Smrg    '') as_dir=./ ;;
19728ce07328Smrg    */) ;;
19738ce07328Smrg    *) as_dir=$as_dir/ ;;
19748ce07328Smrg  esac
19758ce07328Smrg    printf "%s\n" "PATH: $as_dir"
197642a55b46Smrg  done
1977c582b7e3SmrgIFS=$as_save_IFS
1978c582b7e3Smrg
1979c582b7e3Smrg} >&5
1980c582b7e3Smrg
1981c582b7e3Smrgcat >&5 <<_ACEOF
1982c582b7e3Smrg
1983c582b7e3Smrg
1984c582b7e3Smrg## ----------- ##
1985c582b7e3Smrg## Core tests. ##
1986c582b7e3Smrg## ----------- ##
1987c582b7e3Smrg
1988c582b7e3Smrg_ACEOF
1989c582b7e3Smrg
1990c582b7e3Smrg
1991c582b7e3Smrg# Keep a trace of the command line.
1992c582b7e3Smrg# Strip out --no-create and --no-recursion so they do not pile up.
1993c582b7e3Smrg# Strip out --silent because we don't want to record it for future runs.
1994c582b7e3Smrg# Also quote any args containing shell meta-characters.
1995c582b7e3Smrg# Make two passes to allow for proper duplicate-argument suppression.
1996c582b7e3Smrgac_configure_args=
1997c582b7e3Smrgac_configure_args0=
1998c582b7e3Smrgac_configure_args1=
1999c582b7e3Smrgac_must_keep_next=false
2000c582b7e3Smrgfor ac_pass in 1 2
2001c582b7e3Smrgdo
2002c582b7e3Smrg  for ac_arg
2003c582b7e3Smrg  do
2004c582b7e3Smrg    case $ac_arg in
2005c582b7e3Smrg    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2006c582b7e3Smrg    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2007c582b7e3Smrg    | -silent | --silent | --silen | --sile | --sil)
2008c582b7e3Smrg      continue ;;
2009c582b7e3Smrg    *\'*)
20108ce07328Smrg      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2011c582b7e3Smrg    esac
2012c582b7e3Smrg    case $ac_pass in
201342a55b46Smrg    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2014c582b7e3Smrg    2)
201542a55b46Smrg      as_fn_append ac_configure_args1 " '$ac_arg'"
2016c582b7e3Smrg      if test $ac_must_keep_next = true; then
2017c582b7e3Smrg	ac_must_keep_next=false # Got value, back to normal.
2018c582b7e3Smrg      else
2019c582b7e3Smrg	case $ac_arg in
2020c582b7e3Smrg	  *=* | --config-cache | -C | -disable-* | --disable-* \
2021c582b7e3Smrg	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2022c582b7e3Smrg	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2023c582b7e3Smrg	  | -with-* | --with-* | -without-* | --without-* | --x)
2024c582b7e3Smrg	    case "$ac_configure_args0 " in
2025c582b7e3Smrg	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2026c582b7e3Smrg	    esac
2027c582b7e3Smrg	    ;;
2028c582b7e3Smrg	  -* ) ac_must_keep_next=true ;;
2029c582b7e3Smrg	esac
2030c582b7e3Smrg      fi
203142a55b46Smrg      as_fn_append ac_configure_args " '$ac_arg'"
2032c582b7e3Smrg      ;;
2033c582b7e3Smrg    esac
2034c582b7e3Smrg  done
2035c582b7e3Smrgdone
203642a55b46Smrg{ ac_configure_args0=; unset ac_configure_args0;}
203742a55b46Smrg{ ac_configure_args1=; unset ac_configure_args1;}
2038c582b7e3Smrg
2039c582b7e3Smrg# When interrupted or exit'd, cleanup temporary files, and complete
2040c582b7e3Smrg# config.log.  We remove comments because anyway the quotes in there
2041c582b7e3Smrg# would cause problems or look ugly.
2042c582b7e3Smrg# WARNING: Use '\'' to represent an apostrophe within the trap.
2043c582b7e3Smrg# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2044c582b7e3Smrgtrap 'exit_status=$?
20458ce07328Smrg  # Sanitize IFS.
20468ce07328Smrg  IFS=" ""	$as_nl"
2047c582b7e3Smrg  # Save into config.log some information that might help in debugging.
2048c582b7e3Smrg  {
2049c582b7e3Smrg    echo
2050c582b7e3Smrg
20518ce07328Smrg    printf "%s\n" "## ---------------- ##
2052c582b7e3Smrg## Cache variables. ##
205342a55b46Smrg## ---------------- ##"
2054c582b7e3Smrg    echo
2055c582b7e3Smrg    # The following way of writing the cache mishandles newlines in values,
2056c582b7e3Smrg(
2057c582b7e3Smrg  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2058c582b7e3Smrg    eval ac_val=\$$ac_var
2059c582b7e3Smrg    case $ac_val in #(
2060c582b7e3Smrg    *${as_nl}*)
2061c582b7e3Smrg      case $ac_var in #(
20628ce07328Smrg      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20638ce07328Smrgprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2064c582b7e3Smrg      esac
2065c582b7e3Smrg      case $ac_var in #(
2066c582b7e3Smrg      _ | IFS | as_nl) ;; #(
206719019ffeSmrg      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
206842a55b46Smrg      *) { eval $ac_var=; unset $ac_var;} ;;
2069c582b7e3Smrg      esac ;;
2070c582b7e3Smrg    esac
2071c582b7e3Smrg  done
2072c582b7e3Smrg  (set) 2>&1 |
2073c582b7e3Smrg    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2074c582b7e3Smrg    *${as_nl}ac_space=\ *)
2075c582b7e3Smrg      sed -n \
2076c582b7e3Smrg	"s/'\''/'\''\\\\'\'''\''/g;
2077c582b7e3Smrg	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2078c582b7e3Smrg      ;; #(
2079c582b7e3Smrg    *)
2080c582b7e3Smrg      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2081c582b7e3Smrg      ;;
2082c582b7e3Smrg    esac |
2083c582b7e3Smrg    sort
2084c582b7e3Smrg)
2085c582b7e3Smrg    echo
2086c582b7e3Smrg
20878ce07328Smrg    printf "%s\n" "## ----------------- ##
2088c582b7e3Smrg## Output variables. ##
208942a55b46Smrg## ----------------- ##"
2090c582b7e3Smrg    echo
2091c582b7e3Smrg    for ac_var in $ac_subst_vars
2092c582b7e3Smrg    do
2093c582b7e3Smrg      eval ac_val=\$$ac_var
2094c582b7e3Smrg      case $ac_val in
20958ce07328Smrg      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2096c582b7e3Smrg      esac
20978ce07328Smrg      printf "%s\n" "$ac_var='\''$ac_val'\''"
2098c582b7e3Smrg    done | sort
2099c582b7e3Smrg    echo
2100c582b7e3Smrg
2101c582b7e3Smrg    if test -n "$ac_subst_files"; then
21028ce07328Smrg      printf "%s\n" "## ------------------- ##
2103c582b7e3Smrg## File substitutions. ##
210442a55b46Smrg## ------------------- ##"
2105c582b7e3Smrg      echo
2106c582b7e3Smrg      for ac_var in $ac_subst_files
2107c582b7e3Smrg      do
2108c582b7e3Smrg	eval ac_val=\$$ac_var
2109c582b7e3Smrg	case $ac_val in
21108ce07328Smrg	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2111c582b7e3Smrg	esac
21128ce07328Smrg	printf "%s\n" "$ac_var='\''$ac_val'\''"
2113c582b7e3Smrg      done | sort
2114c582b7e3Smrg      echo
2115c582b7e3Smrg    fi
2116c582b7e3Smrg
2117c582b7e3Smrg    if test -s confdefs.h; then
21188ce07328Smrg      printf "%s\n" "## ----------- ##
2119c582b7e3Smrg## confdefs.h. ##
212042a55b46Smrg## ----------- ##"
2121c582b7e3Smrg      echo
2122c582b7e3Smrg      cat confdefs.h
2123c582b7e3Smrg      echo
2124c582b7e3Smrg    fi
2125c582b7e3Smrg    test "$ac_signal" != 0 &&
21268ce07328Smrg      printf "%s\n" "$as_me: caught signal $ac_signal"
21278ce07328Smrg    printf "%s\n" "$as_me: exit $exit_status"
2128c582b7e3Smrg  } >&5
2129c582b7e3Smrg  rm -f core *.core core.conftest.* &&
2130c582b7e3Smrg    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2131c582b7e3Smrg    exit $exit_status
2132c582b7e3Smrg' 0
2133c582b7e3Smrgfor ac_signal in 1 2 13 15; do
213442a55b46Smrg  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2135c582b7e3Smrgdone
2136c582b7e3Smrgac_signal=0
2137c582b7e3Smrg
2138c582b7e3Smrg# confdefs.h avoids OS command line length limits that DEFS can exceed.
2139c582b7e3Smrgrm -f -r conftest* confdefs.h
2140c582b7e3Smrg
21418ce07328Smrgprintf "%s\n" "/* confdefs.h */" > confdefs.h
214242a55b46Smrg
2143c582b7e3Smrg# Predefined preprocessor variables.
2144c582b7e3Smrg
21458ce07328Smrgprintf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2146c582b7e3Smrg
21478ce07328Smrgprintf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2148c582b7e3Smrg
21498ce07328Smrgprintf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2150c582b7e3Smrg
21518ce07328Smrgprintf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2152c582b7e3Smrg
21538ce07328Smrgprintf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2154c582b7e3Smrg
21558ce07328Smrgprintf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
215642a55b46Smrg
2157c582b7e3Smrg
2158c582b7e3Smrg# Let the site file select an alternate cache file if it wants to.
215919019ffeSmrg# Prefer an explicitly selected file to automatically selected ones.
2160c582b7e3Smrgif test -n "$CONFIG_SITE"; then
21618ce07328Smrg  ac_site_files="$CONFIG_SITE"
2162c582b7e3Smrgelif test "x$prefix" != xNONE; then
21638ce07328Smrg  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2164c582b7e3Smrgelse
21658ce07328Smrg  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2166c582b7e3Smrgfi
21678ce07328Smrg
21688ce07328Smrgfor ac_site_file in $ac_site_files
2169c582b7e3Smrgdo
21708ce07328Smrg  case $ac_site_file in #(
21718ce07328Smrg  */*) :
21728ce07328Smrg     ;; #(
21738ce07328Smrg  *) :
21748ce07328Smrg    ac_site_file=./$ac_site_file ;;
21758ce07328Smrgesac
21768ce07328Smrg  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
21778ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
21788ce07328Smrgprintf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2179c582b7e3Smrg    sed 's/^/| /' "$ac_site_file" >&5
218042a55b46Smrg    . "$ac_site_file" \
21818ce07328Smrg      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21828ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
218342a55b46Smrgas_fn_error $? "failed to load site script $ac_site_file
218442a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
2185c582b7e3Smrg  fi
2186c582b7e3Smrgdone
2187c582b7e3Smrg
2188c582b7e3Smrgif test -r "$cache_file"; then
218942a55b46Smrg  # Some versions of bash will fail to source /dev/null (special files
219042a55b46Smrg  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
219142a55b46Smrg  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
21928ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
21938ce07328Smrgprintf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2194c582b7e3Smrg    case $cache_file in
2195c582b7e3Smrg      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2196c582b7e3Smrg      *)                      . "./$cache_file";;
2197c582b7e3Smrg    esac
2198c582b7e3Smrg  fi
2199c582b7e3Smrgelse
22008ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
22018ce07328Smrgprintf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2202c582b7e3Smrg  >$cache_file
2203c582b7e3Smrgfi
2204c582b7e3Smrg
22058ce07328Smrg# Test code for whether the C compiler supports C89 (global declarations)
22068ce07328Smrgac_c_conftest_c89_globals='
22078ce07328Smrg/* Does the compiler advertise C89 conformance?
22088ce07328Smrg   Do not test the value of __STDC__, because some compilers set it to 0
22098ce07328Smrg   while being otherwise adequately conformant. */
22108ce07328Smrg#if !defined __STDC__
22118ce07328Smrg# error "Compiler does not advertise C89 conformance"
22128ce07328Smrg#endif
22138ce07328Smrg
22148ce07328Smrg#include <stddef.h>
22158ce07328Smrg#include <stdarg.h>
22168ce07328Smrgstruct stat;
22178ce07328Smrg/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
22188ce07328Smrgstruct buf { int x; };
22198ce07328Smrgstruct buf * (*rcsopen) (struct buf *, struct stat *, int);
22208ce07328Smrgstatic char *e (p, i)
22218ce07328Smrg     char **p;
22228ce07328Smrg     int i;
22238ce07328Smrg{
22248ce07328Smrg  return p[i];
22258ce07328Smrg}
22268ce07328Smrgstatic char *f (char * (*g) (char **, int), char **p, ...)
22278ce07328Smrg{
22288ce07328Smrg  char *s;
22298ce07328Smrg  va_list v;
22308ce07328Smrg  va_start (v,p);
22318ce07328Smrg  s = g (p, va_arg (v,int));
22328ce07328Smrg  va_end (v);
22338ce07328Smrg  return s;
22348ce07328Smrg}
22358ce07328Smrg
22368ce07328Smrg/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
22378ce07328Smrg   function prototypes and stuff, but not \xHH hex character constants.
22388ce07328Smrg   These do not provoke an error unfortunately, instead are silently treated
22398ce07328Smrg   as an "x".  The following induces an error, until -std is added to get
22408ce07328Smrg   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
22418ce07328Smrg   array size at least.  It is necessary to write \x00 == 0 to get something
22428ce07328Smrg   that is true only with -std.  */
22438ce07328Smrgint osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
22448ce07328Smrg
22458ce07328Smrg/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
22468ce07328Smrg   inside strings and character constants.  */
22478ce07328Smrg#define FOO(x) '\''x'\''
22488ce07328Smrgint xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
22498ce07328Smrg
22508ce07328Smrgint test (int i, double x);
22518ce07328Smrgstruct s1 {int (*f) (int a);};
22528ce07328Smrgstruct s2 {int (*f) (double a);};
22538ce07328Smrgint pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
22548ce07328Smrg               int, int);'
22558ce07328Smrg
22568ce07328Smrg# Test code for whether the C compiler supports C89 (body of main).
22578ce07328Smrgac_c_conftest_c89_main='
22588ce07328Smrgok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
22598ce07328Smrg'
22608ce07328Smrg
22618ce07328Smrg# Test code for whether the C compiler supports C99 (global declarations)
22628ce07328Smrgac_c_conftest_c99_globals='
22638ce07328Smrg// Does the compiler advertise C99 conformance?
22648ce07328Smrg#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
22658ce07328Smrg# error "Compiler does not advertise C99 conformance"
22668ce07328Smrg#endif
22678ce07328Smrg
22688ce07328Smrg#include <stdbool.h>
22698ce07328Smrgextern int puts (const char *);
22708ce07328Smrgextern int printf (const char *, ...);
22718ce07328Smrgextern int dprintf (int, const char *, ...);
22728ce07328Smrgextern void *malloc (size_t);
22738ce07328Smrg
22748ce07328Smrg// Check varargs macros.  These examples are taken from C99 6.10.3.5.
22758ce07328Smrg// dprintf is used instead of fprintf to avoid needing to declare
22768ce07328Smrg// FILE and stderr.
22778ce07328Smrg#define debug(...) dprintf (2, __VA_ARGS__)
22788ce07328Smrg#define showlist(...) puts (#__VA_ARGS__)
22798ce07328Smrg#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
22808ce07328Smrgstatic void
22818ce07328Smrgtest_varargs_macros (void)
22828ce07328Smrg{
22838ce07328Smrg  int x = 1234;
22848ce07328Smrg  int y = 5678;
22858ce07328Smrg  debug ("Flag");
22868ce07328Smrg  debug ("X = %d\n", x);
22878ce07328Smrg  showlist (The first, second, and third items.);
22888ce07328Smrg  report (x>y, "x is %d but y is %d", x, y);
22898ce07328Smrg}
22908ce07328Smrg
22918ce07328Smrg// Check long long types.
22928ce07328Smrg#define BIG64 18446744073709551615ull
22938ce07328Smrg#define BIG32 4294967295ul
22948ce07328Smrg#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
22958ce07328Smrg#if !BIG_OK
22968ce07328Smrg  #error "your preprocessor is broken"
22978ce07328Smrg#endif
22988ce07328Smrg#if BIG_OK
22998ce07328Smrg#else
23008ce07328Smrg  #error "your preprocessor is broken"
23018ce07328Smrg#endif
23028ce07328Smrgstatic long long int bignum = -9223372036854775807LL;
23038ce07328Smrgstatic unsigned long long int ubignum = BIG64;
23048ce07328Smrg
23058ce07328Smrgstruct incomplete_array
23068ce07328Smrg{
23078ce07328Smrg  int datasize;
23088ce07328Smrg  double data[];
23098ce07328Smrg};
23108ce07328Smrg
23118ce07328Smrgstruct named_init {
23128ce07328Smrg  int number;
23138ce07328Smrg  const wchar_t *name;
23148ce07328Smrg  double average;
23158ce07328Smrg};
23168ce07328Smrg
23178ce07328Smrgtypedef const char *ccp;
23188ce07328Smrg
23198ce07328Smrgstatic inline int
23208ce07328Smrgtest_restrict (ccp restrict text)
23218ce07328Smrg{
23228ce07328Smrg  // See if C++-style comments work.
23238ce07328Smrg  // Iterate through items via the restricted pointer.
23248ce07328Smrg  // Also check for declarations in for loops.
23258ce07328Smrg  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
23268ce07328Smrg    continue;
23278ce07328Smrg  return 0;
23288ce07328Smrg}
23298ce07328Smrg
23308ce07328Smrg// Check varargs and va_copy.
23318ce07328Smrgstatic bool
23328ce07328Smrgtest_varargs (const char *format, ...)
23338ce07328Smrg{
23348ce07328Smrg  va_list args;
23358ce07328Smrg  va_start (args, format);
23368ce07328Smrg  va_list args_copy;
23378ce07328Smrg  va_copy (args_copy, args);
23388ce07328Smrg
23398ce07328Smrg  const char *str = "";
23408ce07328Smrg  int number = 0;
23418ce07328Smrg  float fnumber = 0;
23428ce07328Smrg
23438ce07328Smrg  while (*format)
23448ce07328Smrg    {
23458ce07328Smrg      switch (*format++)
23468ce07328Smrg	{
23478ce07328Smrg	case '\''s'\'': // string
23488ce07328Smrg	  str = va_arg (args_copy, const char *);
23498ce07328Smrg	  break;
23508ce07328Smrg	case '\''d'\'': // int
23518ce07328Smrg	  number = va_arg (args_copy, int);
23528ce07328Smrg	  break;
23538ce07328Smrg	case '\''f'\'': // float
23548ce07328Smrg	  fnumber = va_arg (args_copy, double);
23558ce07328Smrg	  break;
23568ce07328Smrg	default:
23578ce07328Smrg	  break;
23588ce07328Smrg	}
23598ce07328Smrg    }
23608ce07328Smrg  va_end (args_copy);
23618ce07328Smrg  va_end (args);
23628ce07328Smrg
23638ce07328Smrg  return *str && number && fnumber;
23648ce07328Smrg}
23658ce07328Smrg'
23668ce07328Smrg
23678ce07328Smrg# Test code for whether the C compiler supports C99 (body of main).
23688ce07328Smrgac_c_conftest_c99_main='
23698ce07328Smrg  // Check bool.
23708ce07328Smrg  _Bool success = false;
23718ce07328Smrg  success |= (argc != 0);
23728ce07328Smrg
23738ce07328Smrg  // Check restrict.
23748ce07328Smrg  if (test_restrict ("String literal") == 0)
23758ce07328Smrg    success = true;
23768ce07328Smrg  char *restrict newvar = "Another string";
23778ce07328Smrg
23788ce07328Smrg  // Check varargs.
23798ce07328Smrg  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
23808ce07328Smrg  test_varargs_macros ();
23818ce07328Smrg
23828ce07328Smrg  // Check flexible array members.
23838ce07328Smrg  struct incomplete_array *ia =
23848ce07328Smrg    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
23858ce07328Smrg  ia->datasize = 10;
23868ce07328Smrg  for (int i = 0; i < ia->datasize; ++i)
23878ce07328Smrg    ia->data[i] = i * 1.234;
23888ce07328Smrg
23898ce07328Smrg  // Check named initializers.
23908ce07328Smrg  struct named_init ni = {
23918ce07328Smrg    .number = 34,
23928ce07328Smrg    .name = L"Test wide string",
23938ce07328Smrg    .average = 543.34343,
23948ce07328Smrg  };
23958ce07328Smrg
23968ce07328Smrg  ni.number = 58;
23978ce07328Smrg
23988ce07328Smrg  int dynamic_array[ni.number];
23998ce07328Smrg  dynamic_array[0] = argv[0][0];
24008ce07328Smrg  dynamic_array[ni.number - 1] = 543;
24018ce07328Smrg
24028ce07328Smrg  // work around unused variable warnings
24038ce07328Smrg  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
24048ce07328Smrg	 || dynamic_array[ni.number - 1] != 543);
24058ce07328Smrg'
24068ce07328Smrg
24078ce07328Smrg# Test code for whether the C compiler supports C11 (global declarations)
24088ce07328Smrgac_c_conftest_c11_globals='
24098ce07328Smrg// Does the compiler advertise C11 conformance?
24108ce07328Smrg#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
24118ce07328Smrg# error "Compiler does not advertise C11 conformance"
24128ce07328Smrg#endif
24138ce07328Smrg
24148ce07328Smrg// Check _Alignas.
24158ce07328Smrgchar _Alignas (double) aligned_as_double;
24168ce07328Smrgchar _Alignas (0) no_special_alignment;
24178ce07328Smrgextern char aligned_as_int;
24188ce07328Smrgchar _Alignas (0) _Alignas (int) aligned_as_int;
24198ce07328Smrg
24208ce07328Smrg// Check _Alignof.
24218ce07328Smrgenum
24228ce07328Smrg{
24238ce07328Smrg  int_alignment = _Alignof (int),
24248ce07328Smrg  int_array_alignment = _Alignof (int[100]),
24258ce07328Smrg  char_alignment = _Alignof (char)
24268ce07328Smrg};
24278ce07328Smrg_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
24288ce07328Smrg
24298ce07328Smrg// Check _Noreturn.
24308ce07328Smrgint _Noreturn does_not_return (void) { for (;;) continue; }
24318ce07328Smrg
24328ce07328Smrg// Check _Static_assert.
24338ce07328Smrgstruct test_static_assert
24348ce07328Smrg{
24358ce07328Smrg  int x;
24368ce07328Smrg  _Static_assert (sizeof (int) <= sizeof (long int),
24378ce07328Smrg                  "_Static_assert does not work in struct");
24388ce07328Smrg  long int y;
24398ce07328Smrg};
24408ce07328Smrg
24418ce07328Smrg// Check UTF-8 literals.
24428ce07328Smrg#define u8 syntax error!
24438ce07328Smrgchar const utf8_literal[] = u8"happens to be ASCII" "another string";
24448ce07328Smrg
24458ce07328Smrg// Check duplicate typedefs.
24468ce07328Smrgtypedef long *long_ptr;
24478ce07328Smrgtypedef long int *long_ptr;
24488ce07328Smrgtypedef long_ptr long_ptr;
24498ce07328Smrg
24508ce07328Smrg// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
24518ce07328Smrgstruct anonymous
24528ce07328Smrg{
24538ce07328Smrg  union {
24548ce07328Smrg    struct { int i; int j; };
24558ce07328Smrg    struct { int k; long int l; } w;
24568ce07328Smrg  };
24578ce07328Smrg  int m;
24588ce07328Smrg} v1;
24598ce07328Smrg'
24608ce07328Smrg
24618ce07328Smrg# Test code for whether the C compiler supports C11 (body of main).
24628ce07328Smrgac_c_conftest_c11_main='
24638ce07328Smrg  _Static_assert ((offsetof (struct anonymous, i)
24648ce07328Smrg		   == offsetof (struct anonymous, w.k)),
24658ce07328Smrg		  "Anonymous union alignment botch");
24668ce07328Smrg  v1.i = 2;
24678ce07328Smrg  v1.w.k = 5;
24688ce07328Smrg  ok |= v1.i != 5;
24698ce07328Smrg'
24708ce07328Smrg
24718ce07328Smrg# Test code for whether the C compiler supports C11 (complete).
24728ce07328Smrgac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
24738ce07328Smrg${ac_c_conftest_c99_globals}
24748ce07328Smrg${ac_c_conftest_c11_globals}
24758ce07328Smrg
24768ce07328Smrgint
24778ce07328Smrgmain (int argc, char **argv)
24788ce07328Smrg{
24798ce07328Smrg  int ok = 0;
24808ce07328Smrg  ${ac_c_conftest_c89_main}
24818ce07328Smrg  ${ac_c_conftest_c99_main}
24828ce07328Smrg  ${ac_c_conftest_c11_main}
24838ce07328Smrg  return ok;
24848ce07328Smrg}
24858ce07328Smrg"
24868ce07328Smrg
24878ce07328Smrg# Test code for whether the C compiler supports C99 (complete).
24888ce07328Smrgac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
24898ce07328Smrg${ac_c_conftest_c99_globals}
24908ce07328Smrg
24918ce07328Smrgint
24928ce07328Smrgmain (int argc, char **argv)
24938ce07328Smrg{
24948ce07328Smrg  int ok = 0;
24958ce07328Smrg  ${ac_c_conftest_c89_main}
24968ce07328Smrg  ${ac_c_conftest_c99_main}
24978ce07328Smrg  return ok;
24988ce07328Smrg}
24998ce07328Smrg"
25008ce07328Smrg
25018ce07328Smrg# Test code for whether the C compiler supports C89 (complete).
25028ce07328Smrgac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
25038ce07328Smrg
25048ce07328Smrgint
25058ce07328Smrgmain (int argc, char **argv)
25068ce07328Smrg{
25078ce07328Smrg  int ok = 0;
25088ce07328Smrg  ${ac_c_conftest_c89_main}
25098ce07328Smrg  return ok;
25108ce07328Smrg}
25118ce07328Smrg"
25128ce07328Smrg
25138ce07328Smrgas_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
25148ce07328Smrgas_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
25158ce07328Smrgas_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
25168ce07328Smrgas_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
25178ce07328Smrgas_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
25188ce07328Smrgas_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
25198ce07328Smrgas_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
25208ce07328Smrgas_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
25218ce07328Smrgas_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
25228ce07328Smrg
25238ce07328Smrg# Auxiliary files required by this configure script.
25248ce07328Smrgac_aux_files="ltmain.sh config.guess config.sub compile missing install-sh"
25258ce07328Smrg
25268ce07328Smrg# Locations in which to look for auxiliary files.
25278ce07328Smrgac_aux_dir_candidates="${srcdir}/."
25288ce07328Smrg
25298ce07328Smrg# Search for a directory containing all of the required auxiliary files,
25308ce07328Smrg# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
25318ce07328Smrg# If we don't find one directory that contains all the files we need,
25328ce07328Smrg# we report the set of missing files from the *first* directory in
25338ce07328Smrg# $ac_aux_dir_candidates and give up.
25348ce07328Smrgac_missing_aux_files=""
25358ce07328Smrgac_first_candidate=:
25368ce07328Smrgprintf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
25378ce07328Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25388ce07328Smrgas_found=false
25398ce07328Smrgfor as_dir in $ac_aux_dir_candidates
25408ce07328Smrgdo
25418ce07328Smrg  IFS=$as_save_IFS
25428ce07328Smrg  case $as_dir in #(((
25438ce07328Smrg    '') as_dir=./ ;;
25448ce07328Smrg    */) ;;
25458ce07328Smrg    *) as_dir=$as_dir/ ;;
25468ce07328Smrg  esac
25478ce07328Smrg  as_found=:
25488ce07328Smrg
25498ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
25508ce07328Smrg  ac_aux_dir_found=yes
25518ce07328Smrg  ac_install_sh=
25528ce07328Smrg  for ac_aux in $ac_aux_files
25538ce07328Smrg  do
25548ce07328Smrg    # As a special case, if "install-sh" is required, that requirement
25558ce07328Smrg    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
25568ce07328Smrg    # and $ac_install_sh is set appropriately for whichever one is found.
25578ce07328Smrg    if test x"$ac_aux" = x"install-sh"
25588ce07328Smrg    then
25598ce07328Smrg      if test -f "${as_dir}install-sh"; then
25608ce07328Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
25618ce07328Smrg        ac_install_sh="${as_dir}install-sh -c"
25628ce07328Smrg      elif test -f "${as_dir}install.sh"; then
25638ce07328Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
25648ce07328Smrg        ac_install_sh="${as_dir}install.sh -c"
25658ce07328Smrg      elif test -f "${as_dir}shtool"; then
25668ce07328Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
25678ce07328Smrg        ac_install_sh="${as_dir}shtool install -c"
25688ce07328Smrg      else
25698ce07328Smrg        ac_aux_dir_found=no
25708ce07328Smrg        if $ac_first_candidate; then
25718ce07328Smrg          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
25728ce07328Smrg        else
25738ce07328Smrg          break
25748ce07328Smrg        fi
25758ce07328Smrg      fi
25768ce07328Smrg    else
25778ce07328Smrg      if test -f "${as_dir}${ac_aux}"; then
25788ce07328Smrg        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
25798ce07328Smrg      else
25808ce07328Smrg        ac_aux_dir_found=no
25818ce07328Smrg        if $ac_first_candidate; then
25828ce07328Smrg          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
25838ce07328Smrg        else
25848ce07328Smrg          break
25858ce07328Smrg        fi
25868ce07328Smrg      fi
25878ce07328Smrg    fi
25888ce07328Smrg  done
25898ce07328Smrg  if test "$ac_aux_dir_found" = yes; then
25908ce07328Smrg    ac_aux_dir="$as_dir"
25918ce07328Smrg    break
25928ce07328Smrg  fi
25938ce07328Smrg  ac_first_candidate=false
25948ce07328Smrg
25958ce07328Smrg  as_found=false
25968ce07328Smrgdone
25978ce07328SmrgIFS=$as_save_IFS
25988ce07328Smrgif $as_found
25998ce07328Smrgthen :
26008ce07328Smrg
26018ce07328Smrgelse $as_nop
26028ce07328Smrg  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
26038ce07328Smrgfi
26048ce07328Smrg
26058ce07328Smrg
26068ce07328Smrg# These three variables are undocumented and unsupported,
26078ce07328Smrg# and are intended to be withdrawn in a future Autoconf release.
26088ce07328Smrg# They can cause serious problems if a builder's source tree is in a directory
26098ce07328Smrg# whose full name contains unusual characters.
26108ce07328Smrgif test -f "${ac_aux_dir}config.guess"; then
26118ce07328Smrg  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
26128ce07328Smrgfi
26138ce07328Smrgif test -f "${ac_aux_dir}config.sub"; then
26148ce07328Smrg  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
26158ce07328Smrgfi
26168ce07328Smrgif test -f "$ac_aux_dir/configure"; then
26178ce07328Smrg  ac_configure="$SHELL ${ac_aux_dir}configure"
26188ce07328Smrgfi
26198ce07328Smrg
26208ce07328Smrg# Check that the precious variables saved in the cache have kept the same
26218ce07328Smrg# value.
26228ce07328Smrgac_cache_corrupted=false
26238ce07328Smrgfor ac_var in $ac_precious_vars; do
26248ce07328Smrg  eval ac_old_set=\$ac_cv_env_${ac_var}_set
26258ce07328Smrg  eval ac_new_set=\$ac_env_${ac_var}_set
26268ce07328Smrg  eval ac_old_val=\$ac_cv_env_${ac_var}_value
26278ce07328Smrg  eval ac_new_val=\$ac_env_${ac_var}_value
26288ce07328Smrg  case $ac_old_set,$ac_new_set in
26298ce07328Smrg    set,)
26308ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
26318ce07328Smrgprintf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
26328ce07328Smrg      ac_cache_corrupted=: ;;
26338ce07328Smrg    ,set)
26348ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
26358ce07328Smrgprintf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
26368ce07328Smrg      ac_cache_corrupted=: ;;
26378ce07328Smrg    ,);;
26388ce07328Smrg    *)
26398ce07328Smrg      if test "x$ac_old_val" != "x$ac_new_val"; then
26408ce07328Smrg	# differences in whitespace do not lead to failure.
26418ce07328Smrg	ac_old_val_w=`echo x $ac_old_val`
26428ce07328Smrg	ac_new_val_w=`echo x $ac_new_val`
26438ce07328Smrg	if test "$ac_old_val_w" != "$ac_new_val_w"; then
26448ce07328Smrg	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
26458ce07328Smrgprintf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
26468ce07328Smrg	  ac_cache_corrupted=:
26478ce07328Smrg	else
26488ce07328Smrg	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
26498ce07328Smrgprintf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
265019019ffeSmrg	  eval $ac_var=\$ac_old_val
265119019ffeSmrg	fi
26528ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
26538ce07328Smrgprintf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
26548ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
26558ce07328Smrgprintf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
2656c582b7e3Smrg      fi;;
2657c582b7e3Smrg  esac
2658c582b7e3Smrg  # Pass precious variables to config.status.
2659c582b7e3Smrg  if test "$ac_new_set" = set; then
2660c582b7e3Smrg    case $ac_new_val in
26618ce07328Smrg    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2662c582b7e3Smrg    *) ac_arg=$ac_var=$ac_new_val ;;
2663c582b7e3Smrg    esac
2664c582b7e3Smrg    case " $ac_configure_args " in
2665c582b7e3Smrg      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
266642a55b46Smrg      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2667c582b7e3Smrg    esac
2668c582b7e3Smrg  fi
2669c582b7e3Smrgdone
2670c582b7e3Smrgif $ac_cache_corrupted; then
26718ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26728ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
26738ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
26748ce07328Smrgprintf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
26758ce07328Smrg  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
26768ce07328Smrg	    and start over" "$LINENO" 5
2677c582b7e3Smrgfi
267842a55b46Smrg## -------------------- ##
267942a55b46Smrg## Main body of script. ##
268042a55b46Smrg## -------------------- ##
2681c582b7e3Smrg
2682c582b7e3Smrgac_ext=c
2683c582b7e3Smrgac_cpp='$CPP $CPPFLAGS'
2684c582b7e3Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685c582b7e3Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686c582b7e3Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
2687c582b7e3Smrg
2688c582b7e3Smrg
2689c582b7e3Smrg
2690c582b7e3Smrgac_config_headers="$ac_config_headers config.h"
2691c582b7e3Smrg
2692c582b7e3Smrg
2693c582b7e3Smrg
26948ce07328Smrg# Initialize Automake
26958ce07328Smrgam__api_version='1.16'
2696c582b7e3Smrg
2697c582b7e3Smrg
2698c582b7e3Smrg
26998ce07328Smrg  # Find a good install program.  We prefer a C program (faster),
2700c582b7e3Smrg# so one script is as good as another.  But avoid the broken or
2701c582b7e3Smrg# incompatible versions:
2702c582b7e3Smrg# SysV /etc/install, /usr/sbin/install
2703c582b7e3Smrg# SunOS /usr/etc/install
2704c582b7e3Smrg# IRIX /sbin/install
2705c582b7e3Smrg# AIX /bin/install
2706c582b7e3Smrg# AmigaOS /C/install, which installs bootblocks on floppy discs
2707c582b7e3Smrg# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2708c582b7e3Smrg# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2709c582b7e3Smrg# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2710c582b7e3Smrg# OS/2's system install, which has a completely different semantic
2711c582b7e3Smrg# ./install, which can be erroneously created by make from ./install.sh.
271219019ffeSmrg# Reject install programs that cannot install multiple files.
27138ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
27148ce07328Smrgprintf %s "checking for a BSD-compatible install... " >&6; }
2715c582b7e3Smrgif test -z "$INSTALL"; then
27168ce07328Smrgif test ${ac_cv_path_install+y}
27178ce07328Smrgthen :
27188ce07328Smrg  printf %s "(cached) " >&6
27198ce07328Smrgelse $as_nop
2720c582b7e3Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2721c582b7e3Smrgfor as_dir in $PATH
2722c582b7e3Smrgdo
2723c582b7e3Smrg  IFS=$as_save_IFS
27248ce07328Smrg  case $as_dir in #(((
27258ce07328Smrg    '') as_dir=./ ;;
27268ce07328Smrg    */) ;;
27278ce07328Smrg    *) as_dir=$as_dir/ ;;
27288ce07328Smrg  esac
27298ce07328Smrg    # Account for fact that we put trailing slashes in our PATH walk.
27308ce07328Smrgcase $as_dir in #((
27318ce07328Smrg  ./ | /[cC]/* | \
2732c582b7e3Smrg  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
273342a55b46Smrg  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2734c582b7e3Smrg  /usr/ucb/* ) ;;
2735c582b7e3Smrg  *)
2736c582b7e3Smrg    # OSF1 and SCO ODT 3.0 have their own names for install.
2737c582b7e3Smrg    # Don't use installbsd from OSF since it installs stuff as root
2738c582b7e3Smrg    # by default.
2739c582b7e3Smrg    for ac_prog in ginstall scoinst install; do
2740c582b7e3Smrg      for ac_exec_ext in '' $ac_executable_extensions; do
27418ce07328Smrg	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
2742c582b7e3Smrg	  if test $ac_prog = install &&
27438ce07328Smrg	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2744c582b7e3Smrg	    # AIX install.  It has an incompatible calling convention.
2745c582b7e3Smrg	    :
2746c582b7e3Smrg	  elif test $ac_prog = install &&
27478ce07328Smrg	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2748c582b7e3Smrg	    # program-specific install script used by HP pwplus--don't use.
2749c582b7e3Smrg	    :
2750c582b7e3Smrg	  else
275119019ffeSmrg	    rm -rf conftest.one conftest.two conftest.dir
275219019ffeSmrg	    echo one > conftest.one
275319019ffeSmrg	    echo two > conftest.two
275419019ffeSmrg	    mkdir conftest.dir
27558ce07328Smrg	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
275619019ffeSmrg	      test -s conftest.one && test -s conftest.two &&
275719019ffeSmrg	      test -s conftest.dir/conftest.one &&
275819019ffeSmrg	      test -s conftest.dir/conftest.two
275919019ffeSmrg	    then
27608ce07328Smrg	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
276119019ffeSmrg	      break 3
276219019ffeSmrg	    fi
2763c582b7e3Smrg	  fi
2764c582b7e3Smrg	fi
2765c582b7e3Smrg      done
2766c582b7e3Smrg    done
2767c582b7e3Smrg    ;;
2768c582b7e3Smrgesac
276919019ffeSmrg
277042a55b46Smrg  done
2771c582b7e3SmrgIFS=$as_save_IFS
2772c582b7e3Smrg
277319019ffeSmrgrm -rf conftest.one conftest.two conftest.dir
2774c582b7e3Smrg
2775c582b7e3Smrgfi
27768ce07328Smrg  if test ${ac_cv_path_install+y}; then
2777c582b7e3Smrg    INSTALL=$ac_cv_path_install
2778c582b7e3Smrg  else
2779c582b7e3Smrg    # As a last resort, use the slow shell script.  Don't cache a
2780c582b7e3Smrg    # value for INSTALL within a source directory, because that will
2781c582b7e3Smrg    # break other packages using the cache if that directory is
2782c582b7e3Smrg    # removed, or if the value is a relative name.
2783c582b7e3Smrg    INSTALL=$ac_install_sh
2784c582b7e3Smrg  fi
2785c582b7e3Smrgfi
27868ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
27878ce07328Smrgprintf "%s\n" "$INSTALL" >&6; }
2788c582b7e3Smrg
2789c582b7e3Smrg# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2790c582b7e3Smrg# It thinks the first close brace ends the variable substitution.
2791c582b7e3Smrgtest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2792c582b7e3Smrg
2793c582b7e3Smrgtest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2794c582b7e3Smrg
2795c582b7e3Smrgtest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2796c582b7e3Smrg
27978ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
27988ce07328Smrgprintf %s "checking whether build environment is sane... " >&6; }
279919019ffeSmrg# Reject unsafe characters in $srcdir or the absolute working directory
280019019ffeSmrg# name.  Accept space and tab only in the latter.
280119019ffeSmrgam_lf='
280219019ffeSmrg'
280319019ffeSmrgcase `pwd` in
280419019ffeSmrg  *[\\\"\#\$\&\'\`$am_lf]*)
280542a55b46Smrg    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
280619019ffeSmrgesac
280719019ffeSmrgcase $srcdir in
280819019ffeSmrg  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
2809e3d74329Smrg    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
281019019ffeSmrgesac
281119019ffeSmrg
2812e3d74329Smrg# Do 'set' in a subshell so we don't clobber the current shell's
2813c582b7e3Smrg# arguments.  Must try -L first in case configure is actually a
2814c582b7e3Smrg# symlink; some systems play weird games with the mod time of symlinks
2815c582b7e3Smrg# (eg FreeBSD returns the mod time of the symlink's containing
2816c582b7e3Smrg# directory).
2817c582b7e3Smrgif (
2818e3d74329Smrg   am_has_slept=no
2819e3d74329Smrg   for am_try in 1 2; do
2820e3d74329Smrg     echo "timestamp, slept: $am_has_slept" > conftest.file
2821e3d74329Smrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2822e3d74329Smrg     if test "$*" = "X"; then
2823e3d74329Smrg	# -L didn't work.
2824e3d74329Smrg	set X `ls -t "$srcdir/configure" conftest.file`
2825e3d74329Smrg     fi
2826e3d74329Smrg     if test "$*" != "X $srcdir/configure conftest.file" \
2827e3d74329Smrg	&& test "$*" != "X conftest.file $srcdir/configure"; then
2828e3d74329Smrg
2829e3d74329Smrg	# If neither matched, then we have a broken ls.  This can happen
2830e3d74329Smrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
2831e3d74329Smrg	# broken ls alias from the environment.  This has actually
2832e3d74329Smrg	# happened.  Such a system could not be considered "sane".
2833e3d74329Smrg	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
2834e3d74329Smrg  alias in your environment" "$LINENO" 5
2835e3d74329Smrg     fi
2836e3d74329Smrg     if test "$2" = conftest.file || test $am_try -eq 2; then
2837e3d74329Smrg       break
2838e3d74329Smrg     fi
2839e3d74329Smrg     # Just in case.
2840e3d74329Smrg     sleep 1
2841e3d74329Smrg     am_has_slept=yes
2842e3d74329Smrg   done
2843c582b7e3Smrg   test "$2" = conftest.file
2844c582b7e3Smrg   )
2845c582b7e3Smrgthen
2846c582b7e3Smrg   # Ok.
2847c582b7e3Smrg   :
2848c582b7e3Smrgelse
284942a55b46Smrg   as_fn_error $? "newly created file is older than distributed files!
285042a55b46SmrgCheck your system clock" "$LINENO" 5
2851c582b7e3Smrgfi
28528ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28538ce07328Smrgprintf "%s\n" "yes" >&6; }
2854e3d74329Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and
2855e3d74329Smrg# generated files are strictly newer.
2856e3d74329Smrgam_sleep_pid=
2857e3d74329Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
2858e3d74329Smrg  ( sleep 1 ) &
2859e3d74329Smrg  am_sleep_pid=$!
2860e3d74329Smrgfi
2861e3d74329Smrg
2862e3d74329Smrgrm -f conftest.file
2863e3d74329Smrg
2864c582b7e3Smrgtest "$program_prefix" != NONE &&
2865c582b7e3Smrg  program_transform_name="s&^&$program_prefix&;$program_transform_name"
2866c582b7e3Smrg# Use a double $ so make ignores it.
2867c582b7e3Smrgtest "$program_suffix" != NONE &&
2868c582b7e3Smrg  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
286919019ffeSmrg# Double any \ or $.
2870c582b7e3Smrg# By default was `s,x,x', remove it if useless.
287119019ffeSmrgac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
28728ce07328Smrgprogram_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
28738ce07328Smrg
2874c582b7e3Smrg
2875e3d74329Smrg# Expand $ac_aux_dir to an absolute path.
2876e3d74329Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
2877c582b7e3Smrg
28788ce07328Smrg
28798ce07328Smrg  if test x"${MISSING+set}" != xset; then
28808ce07328Smrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
288119019ffeSmrgfi
2882c582b7e3Smrg# Use eval to expand $SHELL
2883e3d74329Smrgif eval "$MISSING --is-lightweight"; then
2884e3d74329Smrg  am_missing_run="$MISSING "
2885c582b7e3Smrgelse
2886c582b7e3Smrg  am_missing_run=
28878ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
28888ce07328Smrgprintf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
288919019ffeSmrgfi
289019019ffeSmrg
2891e3d74329Smrgif test x"${install_sh+set}" != xset; then
289219019ffeSmrg  case $am_aux_dir in
289319019ffeSmrg  *\ * | *\	*)
289419019ffeSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
289519019ffeSmrg  *)
289619019ffeSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
289719019ffeSmrg  esac
289819019ffeSmrgfi
289919019ffeSmrg
2900e3d74329Smrg# Installed binaries are usually stripped using 'strip' when the user
2901e3d74329Smrg# run "make install-strip".  However 'strip' might not be the right
290219019ffeSmrg# tool to use in cross-compilation environments, therefore Automake
2903e3d74329Smrg# will honor the 'STRIP' environment variable to overrule this program.
290419019ffeSmrgif test "$cross_compiling" != no; then
290519019ffeSmrg  if test -n "$ac_tool_prefix"; then
290619019ffeSmrg  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
290719019ffeSmrgset dummy ${ac_tool_prefix}strip; ac_word=$2
29088ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29098ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
29108ce07328Smrgif test ${ac_cv_prog_STRIP+y}
29118ce07328Smrgthen :
29128ce07328Smrg  printf %s "(cached) " >&6
29138ce07328Smrgelse $as_nop
291419019ffeSmrg  if test -n "$STRIP"; then
291519019ffeSmrg  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
291619019ffeSmrgelse
291719019ffeSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
291819019ffeSmrgfor as_dir in $PATH
291919019ffeSmrgdo
292019019ffeSmrg  IFS=$as_save_IFS
29218ce07328Smrg  case $as_dir in #(((
29228ce07328Smrg    '') as_dir=./ ;;
29238ce07328Smrg    */) ;;
29248ce07328Smrg    *) as_dir=$as_dir/ ;;
29258ce07328Smrg  esac
292642a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
29278ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
292819019ffeSmrg    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
29298ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
293019019ffeSmrg    break 2
293119019ffeSmrg  fi
293219019ffeSmrgdone
293342a55b46Smrg  done
293419019ffeSmrgIFS=$as_save_IFS
293519019ffeSmrg
293619019ffeSmrgfi
293719019ffeSmrgfi
293819019ffeSmrgSTRIP=$ac_cv_prog_STRIP
293919019ffeSmrgif test -n "$STRIP"; then
29408ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
29418ce07328Smrgprintf "%s\n" "$STRIP" >&6; }
294219019ffeSmrgelse
29438ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29448ce07328Smrgprintf "%s\n" "no" >&6; }
294519019ffeSmrgfi
294619019ffeSmrg
294719019ffeSmrg
294819019ffeSmrgfi
294919019ffeSmrgif test -z "$ac_cv_prog_STRIP"; then
295019019ffeSmrg  ac_ct_STRIP=$STRIP
295119019ffeSmrg  # Extract the first word of "strip", so it can be a program name with args.
295219019ffeSmrgset dummy strip; ac_word=$2
29538ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29548ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
29558ce07328Smrgif test ${ac_cv_prog_ac_ct_STRIP+y}
29568ce07328Smrgthen :
29578ce07328Smrg  printf %s "(cached) " >&6
29588ce07328Smrgelse $as_nop
295919019ffeSmrg  if test -n "$ac_ct_STRIP"; then
296019019ffeSmrg  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
296119019ffeSmrgelse
296219019ffeSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
296319019ffeSmrgfor as_dir in $PATH
296419019ffeSmrgdo
296519019ffeSmrg  IFS=$as_save_IFS
29668ce07328Smrg  case $as_dir in #(((
29678ce07328Smrg    '') as_dir=./ ;;
29688ce07328Smrg    */) ;;
29698ce07328Smrg    *) as_dir=$as_dir/ ;;
29708ce07328Smrg  esac
297142a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
29728ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
297319019ffeSmrg    ac_cv_prog_ac_ct_STRIP="strip"
29748ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
297519019ffeSmrg    break 2
297619019ffeSmrg  fi
297719019ffeSmrgdone
297842a55b46Smrg  done
297919019ffeSmrgIFS=$as_save_IFS
298019019ffeSmrg
2981c582b7e3Smrgfi
298219019ffeSmrgfi
298319019ffeSmrgac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
298419019ffeSmrgif test -n "$ac_ct_STRIP"; then
29858ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
29868ce07328Smrgprintf "%s\n" "$ac_ct_STRIP" >&6; }
298719019ffeSmrgelse
29888ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
29898ce07328Smrgprintf "%s\n" "no" >&6; }
299019019ffeSmrgfi
299119019ffeSmrg
299219019ffeSmrg  if test "x$ac_ct_STRIP" = x; then
299319019ffeSmrg    STRIP=":"
299419019ffeSmrg  else
299519019ffeSmrg    case $cross_compiling:$ac_tool_warned in
299619019ffeSmrgyes:)
29978ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29988ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
299919019ffeSmrgac_tool_warned=yes ;;
300019019ffeSmrgesac
300119019ffeSmrg    STRIP=$ac_ct_STRIP
300219019ffeSmrg  fi
300319019ffeSmrgelse
300419019ffeSmrg  STRIP="$ac_cv_prog_STRIP"
300519019ffeSmrgfi
300619019ffeSmrg
300719019ffeSmrgfi
300819019ffeSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3009c582b7e3Smrg
30108ce07328Smrg
30118ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
30128ce07328Smrgprintf %s "checking for a race-free mkdir -p... " >&6; }
3013c582b7e3Smrgif test -z "$MKDIR_P"; then
30148ce07328Smrg  if test ${ac_cv_path_mkdir+y}
30158ce07328Smrgthen :
30168ce07328Smrg  printf %s "(cached) " >&6
30178ce07328Smrgelse $as_nop
3018c582b7e3Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3019c582b7e3Smrgfor as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3020c582b7e3Smrgdo
3021c582b7e3Smrg  IFS=$as_save_IFS
30228ce07328Smrg  case $as_dir in #(((
30238ce07328Smrg    '') as_dir=./ ;;
30248ce07328Smrg    */) ;;
30258ce07328Smrg    *) as_dir=$as_dir/ ;;
30268ce07328Smrg  esac
302742a55b46Smrg    for ac_prog in mkdir gmkdir; do
3028c582b7e3Smrg	 for ac_exec_ext in '' $ac_executable_extensions; do
30298ce07328Smrg	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
30308ce07328Smrg	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
30318ce07328Smrg	     'mkdir ('*'coreutils) '* | \
30328ce07328Smrg	     'BusyBox '* | \
3033c582b7e3Smrg	     'mkdir (fileutils) '4.1*)
30348ce07328Smrg	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3035c582b7e3Smrg	       break 3;;
3036c582b7e3Smrg	   esac
3037c582b7e3Smrg	 done
3038c582b7e3Smrg       done
303942a55b46Smrg  done
3040c582b7e3SmrgIFS=$as_save_IFS
3041c582b7e3Smrg
3042c582b7e3Smrgfi
3043c582b7e3Smrg
304442a55b46Smrg  test -d ./--version && rmdir ./--version
30458ce07328Smrg  if test ${ac_cv_path_mkdir+y}; then
3046c582b7e3Smrg    MKDIR_P="$ac_cv_path_mkdir -p"
3047c582b7e3Smrg  else
3048c582b7e3Smrg    # As a last resort, use the slow shell script.  Don't cache a
3049c582b7e3Smrg    # value for MKDIR_P within a source directory, because that will
3050c582b7e3Smrg    # break other packages using the cache if that directory is
3051c582b7e3Smrg    # removed, or if the value is a relative name.
3052c582b7e3Smrg    MKDIR_P="$ac_install_sh -d"
3053c582b7e3Smrg  fi
3054c582b7e3Smrgfi
30558ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
30568ce07328Smrgprintf "%s\n" "$MKDIR_P" >&6; }
3057c582b7e3Smrg
3058c582b7e3Smrgfor ac_prog in gawk mawk nawk awk
3059c582b7e3Smrgdo
3060c582b7e3Smrg  # Extract the first word of "$ac_prog", so it can be a program name with args.
3061c582b7e3Smrgset dummy $ac_prog; ac_word=$2
30628ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30638ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
30648ce07328Smrgif test ${ac_cv_prog_AWK+y}
30658ce07328Smrgthen :
30668ce07328Smrg  printf %s "(cached) " >&6
30678ce07328Smrgelse $as_nop
3068c582b7e3Smrg  if test -n "$AWK"; then
3069c582b7e3Smrg  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3070c582b7e3Smrgelse
3071c582b7e3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3072c582b7e3Smrgfor as_dir in $PATH
3073c582b7e3Smrgdo
3074c582b7e3Smrg  IFS=$as_save_IFS
30758ce07328Smrg  case $as_dir in #(((
30768ce07328Smrg    '') as_dir=./ ;;
30778ce07328Smrg    */) ;;
30788ce07328Smrg    *) as_dir=$as_dir/ ;;
30798ce07328Smrg  esac
308042a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
30818ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3082c582b7e3Smrg    ac_cv_prog_AWK="$ac_prog"
30838ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3084c582b7e3Smrg    break 2
3085c582b7e3Smrg  fi
3086c582b7e3Smrgdone
308742a55b46Smrg  done
3088c582b7e3SmrgIFS=$as_save_IFS
3089c582b7e3Smrg
3090c582b7e3Smrgfi
3091c582b7e3Smrgfi
3092c582b7e3SmrgAWK=$ac_cv_prog_AWK
3093c582b7e3Smrgif test -n "$AWK"; then
30948ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
30958ce07328Smrgprintf "%s\n" "$AWK" >&6; }
3096c582b7e3Smrgelse
30978ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
30988ce07328Smrgprintf "%s\n" "no" >&6; }
3099c582b7e3Smrgfi
3100c582b7e3Smrg
3101c582b7e3Smrg
3102c582b7e3Smrg  test -n "$AWK" && break
3103c582b7e3Smrgdone
3104c582b7e3Smrg
31058ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
31068ce07328Smrgprintf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
310719019ffeSmrgset x ${MAKE-make}
31088ce07328Smrgac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
31098ce07328Smrgif eval test \${ac_cv_prog_make_${ac_make}_set+y}
31108ce07328Smrgthen :
31118ce07328Smrg  printf %s "(cached) " >&6
31128ce07328Smrgelse $as_nop
3113c582b7e3Smrg  cat >conftest.make <<\_ACEOF
3114c582b7e3SmrgSHELL = /bin/sh
3115c582b7e3Smrgall:
3116c582b7e3Smrg	@echo '@@@%%%=$(MAKE)=@@@%%%'
3117c582b7e3Smrg_ACEOF
311842a55b46Smrg# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3119c582b7e3Smrgcase `${MAKE-make} -f conftest.make 2>/dev/null` in
3120c582b7e3Smrg  *@@@%%%=?*=@@@%%%*)
3121c582b7e3Smrg    eval ac_cv_prog_make_${ac_make}_set=yes;;
3122c582b7e3Smrg  *)
3123c582b7e3Smrg    eval ac_cv_prog_make_${ac_make}_set=no;;
3124c582b7e3Smrgesac
3125c582b7e3Smrgrm -f conftest.make
3126c582b7e3Smrgfi
3127c582b7e3Smrgif eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
31288ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31298ce07328Smrgprintf "%s\n" "yes" >&6; }
3130c582b7e3Smrg  SET_MAKE=
3131c582b7e3Smrgelse
31328ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31338ce07328Smrgprintf "%s\n" "no" >&6; }
3134c582b7e3Smrg  SET_MAKE="MAKE=${MAKE-make}"
3135c582b7e3Smrgfi
3136c582b7e3Smrg
3137c582b7e3Smrgrm -rf .tst 2>/dev/null
3138c582b7e3Smrgmkdir .tst 2>/dev/null
3139c582b7e3Smrgif test -d .tst; then
3140c582b7e3Smrg  am__leading_dot=.
3141c582b7e3Smrgelse
3142c582b7e3Smrg  am__leading_dot=_
3143c582b7e3Smrgfi
3144c582b7e3Smrgrmdir .tst 2>/dev/null
3145c582b7e3Smrg
3146e3d74329Smrg# Check whether --enable-silent-rules was given.
31478ce07328Smrgif test ${enable_silent_rules+y}
31488ce07328Smrgthen :
3149e3d74329Smrg  enableval=$enable_silent_rules;
3150e3d74329Smrgfi
3151e3d74329Smrg
3152e3d74329Smrgcase $enable_silent_rules in # (((
3153e3d74329Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
3154e3d74329Smrg   no) AM_DEFAULT_VERBOSITY=1;;
3155e3d74329Smrg    *) AM_DEFAULT_VERBOSITY=1;;
3156e3d74329Smrgesac
3157e3d74329Smrgam_make=${MAKE-make}
31588ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
31598ce07328Smrgprintf %s "checking whether $am_make supports nested variables... " >&6; }
31608ce07328Smrgif test ${am_cv_make_support_nested_variables+y}
31618ce07328Smrgthen :
31628ce07328Smrg  printf %s "(cached) " >&6
31638ce07328Smrgelse $as_nop
31648ce07328Smrg  if printf "%s\n" 'TRUE=$(BAR$(V))
3165e3d74329SmrgBAR0=false
3166e3d74329SmrgBAR1=true
3167e3d74329SmrgV=1
3168e3d74329Smrgam__doit:
3169e3d74329Smrg	@$(TRUE)
3170e3d74329Smrg.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3171e3d74329Smrg  am_cv_make_support_nested_variables=yes
3172e3d74329Smrgelse
3173e3d74329Smrg  am_cv_make_support_nested_variables=no
3174e3d74329Smrgfi
3175e3d74329Smrgfi
31768ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
31778ce07328Smrgprintf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3178e3d74329Smrgif test $am_cv_make_support_nested_variables = yes; then
3179e3d74329Smrg    AM_V='$(V)'
3180e3d74329Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3181e3d74329Smrgelse
3182e3d74329Smrg  AM_V=$AM_DEFAULT_VERBOSITY
3183e3d74329Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3184e3d74329Smrgfi
3185e3d74329SmrgAM_BACKSLASH='\'
3186e3d74329Smrg
3187c582b7e3Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
3188c582b7e3Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3189c582b7e3Smrg  # is not polluted with repeated "-I."
3190c582b7e3Smrg  am__isrc=' -I$(srcdir)'
3191c582b7e3Smrg  # test to see if srcdir already configured
3192c582b7e3Smrg  if test -f $srcdir/config.status; then
319342a55b46Smrg    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3194c582b7e3Smrg  fi
3195c582b7e3Smrgfi
3196c582b7e3Smrg
3197c582b7e3Smrg# test whether we have cygpath
3198c582b7e3Smrgif test -z "$CYGPATH_W"; then
3199c582b7e3Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
3200c582b7e3Smrg    CYGPATH_W='cygpath -w'
3201c582b7e3Smrg  else
3202c582b7e3Smrg    CYGPATH_W=echo
3203c582b7e3Smrg  fi
3204c582b7e3Smrgfi
3205c582b7e3Smrg
3206c582b7e3Smrg
3207c582b7e3Smrg# Define the identity of the package.
3208c582b7e3Smrg PACKAGE='xf86-video-r128'
32098ce07328Smrg VERSION='6.12.1'
3210c582b7e3Smrg
3211c582b7e3Smrg
32128ce07328Smrgprintf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
3213c582b7e3Smrg
3214c582b7e3Smrg
32158ce07328Smrgprintf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
3216c582b7e3Smrg
3217c582b7e3Smrg# Some tools Automake needs.
3218c582b7e3Smrg
3219c582b7e3SmrgACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3220c582b7e3Smrg
3221c582b7e3Smrg
3222c582b7e3SmrgAUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3223c582b7e3Smrg
3224c582b7e3Smrg
3225c582b7e3SmrgAUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3226c582b7e3Smrg
3227c582b7e3Smrg
3228c582b7e3SmrgAUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3229c582b7e3Smrg
3230c582b7e3Smrg
3231c582b7e3SmrgMAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3232c582b7e3Smrg
3233e3d74329Smrg# For better backward compatibility.  To be removed once Automake 1.9.x
3234e3d74329Smrg# dies out for good.  For more background, see:
32358ce07328Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
32368ce07328Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3237e3d74329Smrgmkdir_p='$(MKDIR_P)'
3238e3d74329Smrg
3239e3d74329Smrg# We need awk for the "check" target (and possibly the TAP driver).  The
3240e3d74329Smrg# system "awk" is bad on some platforms.
324142a55b46Smrg# Always define AMTAR for backward compatibility.  Yes, it's still used
324242a55b46Smrg# in the wild :-(  We should find a proper way to deprecate it ...
324342a55b46SmrgAMTAR='$${TAR-tar}'
3244c582b7e3Smrg
3245e3d74329Smrg
3246e3d74329Smrg# We'll loop over all known methods to create a tar archive until one works.
3247e3d74329Smrg_am_tools='gnutar  pax cpio none'
3248e3d74329Smrg
324942a55b46Smrgam__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3250c582b7e3Smrg
3251c582b7e3Smrg
3252c582b7e3Smrg
3253c582b7e3Smrg
3254c582b7e3Smrg
32558ce07328Smrg# Variables for tags utilities; see am/tags.am
32568ce07328Smrgif test -z "$CTAGS"; then
32578ce07328Smrg  CTAGS=ctags
32588ce07328Smrgfi
32598ce07328Smrg
32608ce07328Smrgif test -z "$ETAGS"; then
32618ce07328Smrg  ETAGS=etags
32628ce07328Smrgfi
32638ce07328Smrg
32648ce07328Smrgif test -z "$CSCOPE"; then
32658ce07328Smrg  CSCOPE=cscope
32668ce07328Smrgfi
32678ce07328Smrg
32688ce07328Smrg
3269c582b7e3Smrg
3270e3d74329Smrg# POSIX will say in a future version that running "rm -f" with no argument
3271e3d74329Smrg# is OK; and we want to be able to make that assumption in our Makefile
3272e3d74329Smrg# recipes.  So use an aggressive probe to check that the usage we want is
3273e3d74329Smrg# actually supported "in the wild" to an acceptable degree.
3274e3d74329Smrg# See automake bug#10828.
3275e3d74329Smrg# To make any issue more visible, cause the running configure to be aborted
3276e3d74329Smrg# by default if the 'rm' program in use doesn't match our expectations; the
3277e3d74329Smrg# user can still override this though.
3278e3d74329Smrgif rm -f && rm -fr && rm -rf; then : OK; else
3279e3d74329Smrg  cat >&2 <<'END'
3280e3d74329SmrgOops!
3281e3d74329Smrg
3282e3d74329SmrgYour 'rm' program seems unable to run without file operands specified
3283e3d74329Smrgon the command line, even when the '-f' option is present.  This is contrary
3284e3d74329Smrgto the behaviour of most rm programs out there, and not conforming with
3285e3d74329Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3286e3d74329Smrg
3287e3d74329SmrgPlease tell bug-automake@gnu.org about your system, including the value
3288e3d74329Smrgof your $PATH and any error possibly output before this message.  This
3289e3d74329Smrgcan help us improve future automake versions.
3290e3d74329Smrg
3291e3d74329SmrgEND
3292e3d74329Smrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3293e3d74329Smrg    echo 'Configuration will proceed anyway, since you have set the' >&2
3294e3d74329Smrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3295e3d74329Smrg    echo >&2
3296e3d74329Smrg  else
3297e3d74329Smrg    cat >&2 <<'END'
3298e3d74329SmrgAborting the configuration process, to ensure you take notice of the issue.
3299e3d74329Smrg
3300e3d74329SmrgYou can download and install GNU coreutils to get an 'rm' implementation
33018ce07328Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
3302e3d74329Smrg
3303e3d74329SmrgIf you want to complete the configuration process using your problematic
3304e3d74329Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3305e3d74329Smrgto "yes", and re-run configure.
3306e3d74329Smrg
3307e3d74329SmrgEND
3308e3d74329Smrg    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3309e3d74329Smrg  fi
3310e3d74329Smrgfi
3311e3d74329Smrg
3312e3d74329Smrg
331342a55b46Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
3314c582b7e3Smrg
331519019ffeSmrg
331619019ffeSmrg
331719019ffeSmrg
331819019ffeSmrg
331919019ffeSmrg
3320c582b7e3Smrg
3321c582b7e3Smrg
3322c582b7e3Smrg
3323c582b7e3Smrg
3324c582b7e3Smrg
33258ce07328Smrg
33268ce07328Smrg
33278ce07328Smrg
33288ce07328Smrg
33298ce07328Smrg
33308ce07328Smrg
33318ce07328Smrg
33328ce07328Smrg
33338ce07328Smrg
333442a55b46SmrgDEPDIR="${am__leading_dot}deps"
333542a55b46Smrg
333642a55b46Smrgac_config_commands="$ac_config_commands depfiles"
333742a55b46Smrg
33388ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
33398ce07328Smrgprintf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
33408ce07328Smrgcat > confinc.mk << 'END'
334142a55b46Smrgam__doit:
33428ce07328Smrg	@echo this is the am__doit target >confinc.out
334342a55b46Smrg.PHONY: am__doit
334442a55b46SmrgEND
334542a55b46Smrgam__include="#"
334642a55b46Smrgam__quote=
33478ce07328Smrg# BSD make does it like this.
33488ce07328Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD
33498ce07328Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
33508ce07328Smrgecho 'include confinc.mk # ignored' > confmf.GNU
33518ce07328Smrg_am_result=no
33528ce07328Smrgfor s in GNU BSD; do
33538ce07328Smrg  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
33548ce07328Smrg   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
33558ce07328Smrg   ac_status=$?
33568ce07328Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33578ce07328Smrg   (exit $ac_status); }
33588ce07328Smrg  case $?:`cat confinc.out 2>/dev/null` in #(
33598ce07328Smrg  '0:this is the am__doit target') :
33608ce07328Smrg    case $s in #(
33618ce07328Smrg  BSD) :
33628ce07328Smrg    am__include='.include' am__quote='"' ;; #(
33638ce07328Smrg  *) :
33648ce07328Smrg    am__include='include' am__quote='' ;;
33658ce07328Smrgesac ;; #(
33668ce07328Smrg  *) :
336742a55b46Smrg     ;;
33688ce07328Smrgesac
33698ce07328Smrg  if test "$am__include" != "#"; then
33708ce07328Smrg    _am_result="yes ($s style)"
33718ce07328Smrg    break
33728ce07328Smrg  fi
33738ce07328Smrgdone
33748ce07328Smrgrm -f confinc.* confmf.*
33758ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
33768ce07328Smrgprintf "%s\n" "${_am_result}" >&6; }
3377c582b7e3Smrg
337842a55b46Smrg# Check whether --enable-dependency-tracking was given.
33798ce07328Smrgif test ${enable_dependency_tracking+y}
33808ce07328Smrgthen :
338142a55b46Smrg  enableval=$enable_dependency_tracking;
338242a55b46Smrgfi
338342a55b46Smrg
338442a55b46Smrgif test "x$enable_dependency_tracking" != xno; then
338542a55b46Smrg  am_depcomp="$ac_aux_dir/depcomp"
338642a55b46Smrg  AMDEPBACKSLASH='\'
338742a55b46Smrg  am__nodep='_no'
338842a55b46Smrgfi
338942a55b46Smrg if test "x$enable_dependency_tracking" != xno; then
339042a55b46Smrg  AMDEP_TRUE=
339142a55b46Smrg  AMDEP_FALSE='#'
3392c582b7e3Smrgelse
339342a55b46Smrg  AMDEP_TRUE='#'
339442a55b46Smrg  AMDEP_FALSE=
3395c582b7e3Smrgfi
3396c582b7e3Smrg
3397c582b7e3Smrg
339842a55b46Smrgac_ext=c
339942a55b46Smrgac_cpp='$CPP $CPPFLAGS'
340042a55b46Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
340142a55b46Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
340242a55b46Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
340342a55b46Smrgif test -n "$ac_tool_prefix"; then
340442a55b46Smrg  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
340542a55b46Smrgset dummy ${ac_tool_prefix}gcc; ac_word=$2
34068ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34078ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
34088ce07328Smrgif test ${ac_cv_prog_CC+y}
34098ce07328Smrgthen :
34108ce07328Smrg  printf %s "(cached) " >&6
34118ce07328Smrgelse $as_nop
341242a55b46Smrg  if test -n "$CC"; then
341342a55b46Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
341442a55b46Smrgelse
341542a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
341642a55b46Smrgfor as_dir in $PATH
341742a55b46Smrgdo
341842a55b46Smrg  IFS=$as_save_IFS
34198ce07328Smrg  case $as_dir in #(((
34208ce07328Smrg    '') as_dir=./ ;;
34218ce07328Smrg    */) ;;
34228ce07328Smrg    *) as_dir=$as_dir/ ;;
34238ce07328Smrg  esac
342442a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
34258ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
342642a55b46Smrg    ac_cv_prog_CC="${ac_tool_prefix}gcc"
34278ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
342842a55b46Smrg    break 2
342942a55b46Smrg  fi
343042a55b46Smrgdone
343142a55b46Smrg  done
343242a55b46SmrgIFS=$as_save_IFS
3433c582b7e3Smrg
343442a55b46Smrgfi
343542a55b46Smrgfi
343642a55b46SmrgCC=$ac_cv_prog_CC
343742a55b46Smrgif test -n "$CC"; then
34388ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34398ce07328Smrgprintf "%s\n" "$CC" >&6; }
344042a55b46Smrgelse
34418ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34428ce07328Smrgprintf "%s\n" "no" >&6; }
344342a55b46Smrgfi
3444c582b7e3Smrg
3445c582b7e3Smrg
344642a55b46Smrgfi
344742a55b46Smrgif test -z "$ac_cv_prog_CC"; then
344842a55b46Smrg  ac_ct_CC=$CC
344942a55b46Smrg  # Extract the first word of "gcc", so it can be a program name with args.
345042a55b46Smrgset dummy gcc; ac_word=$2
34518ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34528ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
34538ce07328Smrgif test ${ac_cv_prog_ac_ct_CC+y}
34548ce07328Smrgthen :
34558ce07328Smrg  printf %s "(cached) " >&6
34568ce07328Smrgelse $as_nop
345742a55b46Smrg  if test -n "$ac_ct_CC"; then
345842a55b46Smrg  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
345942a55b46Smrgelse
346042a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
346142a55b46Smrgfor as_dir in $PATH
346242a55b46Smrgdo
346342a55b46Smrg  IFS=$as_save_IFS
34648ce07328Smrg  case $as_dir in #(((
34658ce07328Smrg    '') as_dir=./ ;;
34668ce07328Smrg    */) ;;
34678ce07328Smrg    *) as_dir=$as_dir/ ;;
34688ce07328Smrg  esac
346942a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
34708ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
347142a55b46Smrg    ac_cv_prog_ac_ct_CC="gcc"
34728ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
347342a55b46Smrg    break 2
347442a55b46Smrg  fi
347542a55b46Smrgdone
347642a55b46Smrg  done
347742a55b46SmrgIFS=$as_save_IFS
3478c582b7e3Smrg
3479c582b7e3Smrgfi
348042a55b46Smrgfi
348142a55b46Smrgac_ct_CC=$ac_cv_prog_ac_ct_CC
348242a55b46Smrgif test -n "$ac_ct_CC"; then
34838ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34848ce07328Smrgprintf "%s\n" "$ac_ct_CC" >&6; }
348542a55b46Smrgelse
34868ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34878ce07328Smrgprintf "%s\n" "no" >&6; }
348842a55b46Smrgfi
348942a55b46Smrg
349042a55b46Smrg  if test "x$ac_ct_CC" = x; then
349142a55b46Smrg    CC=""
349242a55b46Smrg  else
349342a55b46Smrg    case $cross_compiling:$ac_tool_warned in
349442a55b46Smrgyes:)
34958ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34968ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
349742a55b46Smrgac_tool_warned=yes ;;
3498c582b7e3Smrgesac
349942a55b46Smrg    CC=$ac_ct_CC
350042a55b46Smrg  fi
350142a55b46Smrgelse
350242a55b46Smrg  CC="$ac_cv_prog_CC"
350342a55b46Smrgfi
3504c582b7e3Smrg
350542a55b46Smrgif test -z "$CC"; then
350642a55b46Smrg          if test -n "$ac_tool_prefix"; then
350742a55b46Smrg    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
350842a55b46Smrgset dummy ${ac_tool_prefix}cc; ac_word=$2
35098ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35108ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
35118ce07328Smrgif test ${ac_cv_prog_CC+y}
35128ce07328Smrgthen :
35138ce07328Smrg  printf %s "(cached) " >&6
35148ce07328Smrgelse $as_nop
351542a55b46Smrg  if test -n "$CC"; then
351642a55b46Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
351742a55b46Smrgelse
351842a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
351942a55b46Smrgfor as_dir in $PATH
352042a55b46Smrgdo
352142a55b46Smrg  IFS=$as_save_IFS
35228ce07328Smrg  case $as_dir in #(((
35238ce07328Smrg    '') as_dir=./ ;;
35248ce07328Smrg    */) ;;
35258ce07328Smrg    *) as_dir=$as_dir/ ;;
35268ce07328Smrg  esac
352742a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
35288ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
352942a55b46Smrg    ac_cv_prog_CC="${ac_tool_prefix}cc"
35308ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
353142a55b46Smrg    break 2
353242a55b46Smrg  fi
353342a55b46Smrgdone
353442a55b46Smrg  done
353542a55b46SmrgIFS=$as_save_IFS
3536c582b7e3Smrg
3537c582b7e3Smrgfi
3538c582b7e3Smrgfi
353942a55b46SmrgCC=$ac_cv_prog_CC
354042a55b46Smrgif test -n "$CC"; then
35418ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
35428ce07328Smrgprintf "%s\n" "$CC" >&6; }
354342a55b46Smrgelse
35448ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
35458ce07328Smrgprintf "%s\n" "no" >&6; }
3546c582b7e3Smrgfi
3547c582b7e3Smrg
3548c582b7e3Smrg
354942a55b46Smrg  fi
3550c582b7e3Smrgfi
355142a55b46Smrgif test -z "$CC"; then
355242a55b46Smrg  # Extract the first word of "cc", so it can be a program name with args.
355342a55b46Smrgset dummy cc; ac_word=$2
35548ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35558ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
35568ce07328Smrgif test ${ac_cv_prog_CC+y}
35578ce07328Smrgthen :
35588ce07328Smrg  printf %s "(cached) " >&6
35598ce07328Smrgelse $as_nop
356042a55b46Smrg  if test -n "$CC"; then
356142a55b46Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
356242a55b46Smrgelse
356342a55b46Smrg  ac_prog_rejected=no
356442a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
356542a55b46Smrgfor as_dir in $PATH
356642a55b46Smrgdo
356742a55b46Smrg  IFS=$as_save_IFS
35688ce07328Smrg  case $as_dir in #(((
35698ce07328Smrg    '') as_dir=./ ;;
35708ce07328Smrg    */) ;;
35718ce07328Smrg    *) as_dir=$as_dir/ ;;
35728ce07328Smrg  esac
357342a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
35748ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
35758ce07328Smrg    if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
357642a55b46Smrg       ac_prog_rejected=yes
357742a55b46Smrg       continue
357842a55b46Smrg     fi
357942a55b46Smrg    ac_cv_prog_CC="cc"
35808ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
358142a55b46Smrg    break 2
358242a55b46Smrg  fi
358342a55b46Smrgdone
358442a55b46Smrg  done
358542a55b46SmrgIFS=$as_save_IFS
3586c582b7e3Smrg
358742a55b46Smrgif test $ac_prog_rejected = yes; then
358842a55b46Smrg  # We found a bogon in the path, so make sure we never use it.
358942a55b46Smrg  set dummy $ac_cv_prog_CC
359042a55b46Smrg  shift
359142a55b46Smrg  if test $# != 0; then
359242a55b46Smrg    # We chose a different compiler from the bogus one.
359342a55b46Smrg    # However, it has the same basename, so the bogon will be chosen
359442a55b46Smrg    # first if we set CC to just the basename; use the full file name.
359542a55b46Smrg    shift
35968ce07328Smrg    ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
359742a55b46Smrg  fi
3598c582b7e3Smrgfi
359942a55b46Smrgfi
360042a55b46Smrgfi
360142a55b46SmrgCC=$ac_cv_prog_CC
360242a55b46Smrgif test -n "$CC"; then
36038ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
36048ce07328Smrgprintf "%s\n" "$CC" >&6; }
3605c582b7e3Smrgelse
36068ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36078ce07328Smrgprintf "%s\n" "no" >&6; }
3608c582b7e3Smrgfi
3609c582b7e3Smrg
3610c582b7e3Smrg
361142a55b46Smrgfi
361242a55b46Smrgif test -z "$CC"; then
361342a55b46Smrg  if test -n "$ac_tool_prefix"; then
361442a55b46Smrg  for ac_prog in cl.exe
361542a55b46Smrg  do
361642a55b46Smrg    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
361742a55b46Smrgset dummy $ac_tool_prefix$ac_prog; ac_word=$2
36188ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36198ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
36208ce07328Smrgif test ${ac_cv_prog_CC+y}
36218ce07328Smrgthen :
36228ce07328Smrg  printf %s "(cached) " >&6
36238ce07328Smrgelse $as_nop
3624c582b7e3Smrg  if test -n "$CC"; then
3625c582b7e3Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
3626c582b7e3Smrgelse
3627c582b7e3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3628c582b7e3Smrgfor as_dir in $PATH
3629c582b7e3Smrgdo
3630c582b7e3Smrg  IFS=$as_save_IFS
36318ce07328Smrg  case $as_dir in #(((
36328ce07328Smrg    '') as_dir=./ ;;
36338ce07328Smrg    */) ;;
36348ce07328Smrg    *) as_dir=$as_dir/ ;;
36358ce07328Smrg  esac
363642a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
36378ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
363842a55b46Smrg    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
36398ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3640c582b7e3Smrg    break 2
3641c582b7e3Smrg  fi
3642c582b7e3Smrgdone
364342a55b46Smrg  done
3644c582b7e3SmrgIFS=$as_save_IFS
3645c582b7e3Smrg
3646c582b7e3Smrgfi
3647c582b7e3Smrgfi
3648c582b7e3SmrgCC=$ac_cv_prog_CC
3649c582b7e3Smrgif test -n "$CC"; then
36508ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
36518ce07328Smrgprintf "%s\n" "$CC" >&6; }
3652c582b7e3Smrgelse
36538ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
36548ce07328Smrgprintf "%s\n" "no" >&6; }
3655c582b7e3Smrgfi
3656c582b7e3Smrg
3657c582b7e3Smrg
365842a55b46Smrg    test -n "$CC" && break
365942a55b46Smrg  done
3660c582b7e3Smrgfi
366142a55b46Smrgif test -z "$CC"; then
3662c582b7e3Smrg  ac_ct_CC=$CC
366342a55b46Smrg  for ac_prog in cl.exe
366442a55b46Smrgdo
366542a55b46Smrg  # Extract the first word of "$ac_prog", so it can be a program name with args.
366642a55b46Smrgset dummy $ac_prog; ac_word=$2
36678ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36688ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
36698ce07328Smrgif test ${ac_cv_prog_ac_ct_CC+y}
36708ce07328Smrgthen :
36718ce07328Smrg  printf %s "(cached) " >&6
36728ce07328Smrgelse $as_nop
3673c582b7e3Smrg  if test -n "$ac_ct_CC"; then
3674c582b7e3Smrg  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3675c582b7e3Smrgelse
3676c582b7e3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3677c582b7e3Smrgfor as_dir in $PATH
3678c582b7e3Smrgdo
3679c582b7e3Smrg  IFS=$as_save_IFS
36808ce07328Smrg  case $as_dir in #(((
36818ce07328Smrg    '') as_dir=./ ;;
36828ce07328Smrg    */) ;;
36838ce07328Smrg    *) as_dir=$as_dir/ ;;
36848ce07328Smrg  esac
368542a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
36868ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
368742a55b46Smrg    ac_cv_prog_ac_ct_CC="$ac_prog"
36888ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3689c582b7e3Smrg    break 2
3690c582b7e3Smrg  fi
3691c582b7e3Smrgdone
369242a55b46Smrg  done
369342a55b46SmrgIFS=$as_save_IFS
369442a55b46Smrg
369542a55b46Smrgfi
369642a55b46Smrgfi
369742a55b46Smrgac_ct_CC=$ac_cv_prog_ac_ct_CC
369842a55b46Smrgif test -n "$ac_ct_CC"; then
36998ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
37008ce07328Smrgprintf "%s\n" "$ac_ct_CC" >&6; }
370142a55b46Smrgelse
37028ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37038ce07328Smrgprintf "%s\n" "no" >&6; }
370442a55b46Smrgfi
370542a55b46Smrg
370642a55b46Smrg
370742a55b46Smrg  test -n "$ac_ct_CC" && break
370842a55b46Smrgdone
370942a55b46Smrg
371042a55b46Smrg  if test "x$ac_ct_CC" = x; then
371142a55b46Smrg    CC=""
371242a55b46Smrg  else
371342a55b46Smrg    case $cross_compiling:$ac_tool_warned in
371442a55b46Smrgyes:)
37158ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37168ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37178ce07328Smrgac_tool_warned=yes ;;
37188ce07328Smrgesac
37198ce07328Smrg    CC=$ac_ct_CC
37208ce07328Smrg  fi
37218ce07328Smrgfi
37228ce07328Smrg
37238ce07328Smrgfi
37248ce07328Smrgif test -z "$CC"; then
37258ce07328Smrg  if test -n "$ac_tool_prefix"; then
37268ce07328Smrg  # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
37278ce07328Smrgset dummy ${ac_tool_prefix}clang; ac_word=$2
37288ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37298ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
37308ce07328Smrgif test ${ac_cv_prog_CC+y}
37318ce07328Smrgthen :
37328ce07328Smrg  printf %s "(cached) " >&6
37338ce07328Smrgelse $as_nop
37348ce07328Smrg  if test -n "$CC"; then
37358ce07328Smrg  ac_cv_prog_CC="$CC" # Let the user override the test.
37368ce07328Smrgelse
37378ce07328Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37388ce07328Smrgfor as_dir in $PATH
37398ce07328Smrgdo
37408ce07328Smrg  IFS=$as_save_IFS
37418ce07328Smrg  case $as_dir in #(((
37428ce07328Smrg    '') as_dir=./ ;;
37438ce07328Smrg    */) ;;
37448ce07328Smrg    *) as_dir=$as_dir/ ;;
37458ce07328Smrg  esac
37468ce07328Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
37478ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37488ce07328Smrg    ac_cv_prog_CC="${ac_tool_prefix}clang"
37498ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37508ce07328Smrg    break 2
37518ce07328Smrg  fi
37528ce07328Smrgdone
37538ce07328Smrg  done
37548ce07328SmrgIFS=$as_save_IFS
37558ce07328Smrg
37568ce07328Smrgfi
37578ce07328Smrgfi
37588ce07328SmrgCC=$ac_cv_prog_CC
37598ce07328Smrgif test -n "$CC"; then
37608ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
37618ce07328Smrgprintf "%s\n" "$CC" >&6; }
37628ce07328Smrgelse
37638ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
37648ce07328Smrgprintf "%s\n" "no" >&6; }
37658ce07328Smrgfi
37668ce07328Smrg
37678ce07328Smrg
37688ce07328Smrgfi
37698ce07328Smrgif test -z "$ac_cv_prog_CC"; then
37708ce07328Smrg  ac_ct_CC=$CC
37718ce07328Smrg  # Extract the first word of "clang", so it can be a program name with args.
37728ce07328Smrgset dummy clang; ac_word=$2
37738ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37748ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
37758ce07328Smrgif test ${ac_cv_prog_ac_ct_CC+y}
37768ce07328Smrgthen :
37778ce07328Smrg  printf %s "(cached) " >&6
37788ce07328Smrgelse $as_nop
37798ce07328Smrg  if test -n "$ac_ct_CC"; then
37808ce07328Smrg  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
37818ce07328Smrgelse
37828ce07328Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37838ce07328Smrgfor as_dir in $PATH
37848ce07328Smrgdo
37858ce07328Smrg  IFS=$as_save_IFS
37868ce07328Smrg  case $as_dir in #(((
37878ce07328Smrg    '') as_dir=./ ;;
37888ce07328Smrg    */) ;;
37898ce07328Smrg    *) as_dir=$as_dir/ ;;
37908ce07328Smrg  esac
37918ce07328Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
37928ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
37938ce07328Smrg    ac_cv_prog_ac_ct_CC="clang"
37948ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
37958ce07328Smrg    break 2
37968ce07328Smrg  fi
37978ce07328Smrgdone
37988ce07328Smrg  done
37998ce07328SmrgIFS=$as_save_IFS
38008ce07328Smrg
38018ce07328Smrgfi
38028ce07328Smrgfi
38038ce07328Smrgac_ct_CC=$ac_cv_prog_ac_ct_CC
38048ce07328Smrgif test -n "$ac_ct_CC"; then
38058ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
38068ce07328Smrgprintf "%s\n" "$ac_ct_CC" >&6; }
38078ce07328Smrgelse
38088ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38098ce07328Smrgprintf "%s\n" "no" >&6; }
38108ce07328Smrgfi
38118ce07328Smrg
38128ce07328Smrg  if test "x$ac_ct_CC" = x; then
38138ce07328Smrg    CC=""
38148ce07328Smrg  else
38158ce07328Smrg    case $cross_compiling:$ac_tool_warned in
38168ce07328Smrgyes:)
38178ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38188ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
381942a55b46Smrgac_tool_warned=yes ;;
382042a55b46Smrgesac
382142a55b46Smrg    CC=$ac_ct_CC
382242a55b46Smrg  fi
38238ce07328Smrgelse
38248ce07328Smrg  CC="$ac_cv_prog_CC"
382542a55b46Smrgfi
382642a55b46Smrg
382742a55b46Smrgfi
382842a55b46Smrg
382942a55b46Smrg
38308ce07328Smrgtest -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
38318ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
383242a55b46Smrgas_fn_error $? "no acceptable C compiler found in \$PATH
383342a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
383442a55b46Smrg
383542a55b46Smrg# Provide some information about the compiler.
38368ce07328Smrgprintf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
383742a55b46Smrgset X $ac_compile
383842a55b46Smrgac_compiler=$2
38398ce07328Smrgfor ac_option in --version -v -V -qversion -version; do
384042a55b46Smrg  { { ac_try="$ac_compiler $ac_option >&5"
384142a55b46Smrgcase "(($ac_try" in
384242a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
384342a55b46Smrg  *) ac_try_echo=$ac_try;;
384442a55b46Smrgesac
384542a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
38468ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
384742a55b46Smrg  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
384842a55b46Smrg  ac_status=$?
384942a55b46Smrg  if test -s conftest.err; then
385042a55b46Smrg    sed '10a\
385142a55b46Smrg... rest of stderr output deleted ...
385242a55b46Smrg         10q' conftest.err >conftest.er1
385342a55b46Smrg    cat conftest.er1 >&5
385442a55b46Smrg  fi
385542a55b46Smrg  rm -f conftest.er1 conftest.err
38568ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
385742a55b46Smrg  test $ac_status = 0; }
385842a55b46Smrgdone
385942a55b46Smrg
386042a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
386142a55b46Smrg/* end confdefs.h.  */
386242a55b46Smrg
386342a55b46Smrgint
38648ce07328Smrgmain (void)
386542a55b46Smrg{
386642a55b46Smrg
386742a55b46Smrg  ;
386842a55b46Smrg  return 0;
386942a55b46Smrg}
387042a55b46Smrg_ACEOF
387142a55b46Smrgac_clean_files_save=$ac_clean_files
387242a55b46Smrgac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
387342a55b46Smrg# Try to create an executable without -o first, disregard a.out.
387442a55b46Smrg# It will help us diagnose broken compilers, and finding out an intuition
387542a55b46Smrg# of exeext.
38768ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
38778ce07328Smrgprintf %s "checking whether the C compiler works... " >&6; }
38788ce07328Smrgac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
387942a55b46Smrg
388042a55b46Smrg# The possible output files:
388142a55b46Smrgac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
388242a55b46Smrg
388342a55b46Smrgac_rmfiles=
388442a55b46Smrgfor ac_file in $ac_files
388542a55b46Smrgdo
388642a55b46Smrg  case $ac_file in
388742a55b46Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
388842a55b46Smrg    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
388942a55b46Smrg  esac
389042a55b46Smrgdone
389142a55b46Smrgrm -f $ac_rmfiles
389242a55b46Smrg
389342a55b46Smrgif { { ac_try="$ac_link_default"
389442a55b46Smrgcase "(($ac_try" in
389542a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
389642a55b46Smrg  *) ac_try_echo=$ac_try;;
389742a55b46Smrgesac
389842a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
38998ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
390042a55b46Smrg  (eval "$ac_link_default") 2>&5
390142a55b46Smrg  ac_status=$?
39028ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39038ce07328Smrg  test $ac_status = 0; }
39048ce07328Smrgthen :
390542a55b46Smrg  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
390642a55b46Smrg# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
390742a55b46Smrg# in a Makefile.  We should not override ac_cv_exeext if it was cached,
390842a55b46Smrg# so that the user can short-circuit this test for compilers unknown to
390942a55b46Smrg# Autoconf.
391042a55b46Smrgfor ac_file in $ac_files ''
391142a55b46Smrgdo
391242a55b46Smrg  test -f "$ac_file" || continue
391342a55b46Smrg  case $ac_file in
391442a55b46Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
391542a55b46Smrg	;;
391642a55b46Smrg    [ab].out )
391742a55b46Smrg	# We found the default executable, but exeext='' is most
391842a55b46Smrg	# certainly right.
391942a55b46Smrg	break;;
392042a55b46Smrg    *.* )
39218ce07328Smrg	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
392242a55b46Smrg	then :; else
392342a55b46Smrg	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
392442a55b46Smrg	fi
392542a55b46Smrg	# We set ac_cv_exeext here because the later test for it is not
392642a55b46Smrg	# safe: cross compilers may not add the suffix if given an `-o'
392742a55b46Smrg	# argument, so we may need to know it at that point already.
392842a55b46Smrg	# Even if this section looks crufty: it has the advantage of
392942a55b46Smrg	# actually working.
393042a55b46Smrg	break;;
393142a55b46Smrg    * )
393242a55b46Smrg	break;;
393342a55b46Smrg  esac
3934c582b7e3Smrgdone
393542a55b46Smrgtest "$ac_cv_exeext" = no && ac_cv_exeext=
3936c582b7e3Smrg
39378ce07328Smrgelse $as_nop
393842a55b46Smrg  ac_file=''
3939c582b7e3Smrgfi
39408ce07328Smrgif test -z "$ac_file"
39418ce07328Smrgthen :
39428ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39438ce07328Smrgprintf "%s\n" "no" >&6; }
39448ce07328Smrgprintf "%s\n" "$as_me: failed program was:" >&5
394542a55b46Smrgsed 's/^/| /' conftest.$ac_ext >&5
394642a55b46Smrg
39478ce07328Smrg{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39488ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
394942a55b46Smrgas_fn_error 77 "C compiler cannot create executables
395042a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
39518ce07328Smrgelse $as_nop
39528ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39538ce07328Smrgprintf "%s\n" "yes" >&6; }
39548ce07328Smrgfi
39558ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
39568ce07328Smrgprintf %s "checking for C compiler default output file name... " >&6; }
39578ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
39588ce07328Smrgprintf "%s\n" "$ac_file" >&6; }
395942a55b46Smrgac_exeext=$ac_cv_exeext
396042a55b46Smrg
396142a55b46Smrgrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
396242a55b46Smrgac_clean_files=$ac_clean_files_save
39638ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
39648ce07328Smrgprintf %s "checking for suffix of executables... " >&6; }
396542a55b46Smrgif { { ac_try="$ac_link"
396642a55b46Smrgcase "(($ac_try" in
396742a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
396842a55b46Smrg  *) ac_try_echo=$ac_try;;
396942a55b46Smrgesac
397042a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
39718ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
397242a55b46Smrg  (eval "$ac_link") 2>&5
397342a55b46Smrg  ac_status=$?
39748ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39758ce07328Smrg  test $ac_status = 0; }
39768ce07328Smrgthen :
397742a55b46Smrg  # If both `conftest.exe' and `conftest' are `present' (well, observable)
397842a55b46Smrg# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
397942a55b46Smrg# work properly (i.e., refer to `conftest.exe'), while it won't with
398042a55b46Smrg# `rm'.
398142a55b46Smrgfor ac_file in conftest.exe conftest conftest.*; do
398242a55b46Smrg  test -f "$ac_file" || continue
398342a55b46Smrg  case $ac_file in
398442a55b46Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
398542a55b46Smrg    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
398642a55b46Smrg	  break;;
398742a55b46Smrg    * ) break;;
398842a55b46Smrg  esac
398942a55b46Smrgdone
39908ce07328Smrgelse $as_nop
39918ce07328Smrg  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
39928ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
399342a55b46Smrgas_fn_error $? "cannot compute suffix of executables: cannot compile and link
399442a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
3995c582b7e3Smrgfi
399642a55b46Smrgrm -f conftest conftest$ac_cv_exeext
39978ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
39988ce07328Smrgprintf "%s\n" "$ac_cv_exeext" >&6; }
3999c582b7e3Smrg
400042a55b46Smrgrm -f conftest.$ac_ext
400142a55b46SmrgEXEEXT=$ac_cv_exeext
400242a55b46Smrgac_exeext=$EXEEXT
400342a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
400442a55b46Smrg/* end confdefs.h.  */
400542a55b46Smrg#include <stdio.h>
400642a55b46Smrgint
40078ce07328Smrgmain (void)
400842a55b46Smrg{
400942a55b46SmrgFILE *f = fopen ("conftest.out", "w");
401042a55b46Smrg return ferror (f) || fclose (f) != 0;
401142a55b46Smrg
401242a55b46Smrg  ;
401342a55b46Smrg  return 0;
401442a55b46Smrg}
401542a55b46Smrg_ACEOF
401642a55b46Smrgac_clean_files="$ac_clean_files conftest.out"
401742a55b46Smrg# Check that the compiler produces executables we can run.  If not, either
401842a55b46Smrg# the compiler is broken, or we cross compile.
40198ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
40208ce07328Smrgprintf %s "checking whether we are cross compiling... " >&6; }
402142a55b46Smrgif test "$cross_compiling" != yes; then
402242a55b46Smrg  { { ac_try="$ac_link"
402342a55b46Smrgcase "(($ac_try" in
402442a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
402542a55b46Smrg  *) ac_try_echo=$ac_try;;
4026c582b7e3Smrgesac
402742a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
40288ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
402942a55b46Smrg  (eval "$ac_link") 2>&5
403042a55b46Smrg  ac_status=$?
40318ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
403242a55b46Smrg  test $ac_status = 0; }
403342a55b46Smrg  if { ac_try='./conftest$ac_cv_exeext'
403442a55b46Smrg  { { case "(($ac_try" in
403542a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
403642a55b46Smrg  *) ac_try_echo=$ac_try;;
403742a55b46Smrgesac
403842a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
40398ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
404042a55b46Smrg  (eval "$ac_try") 2>&5
404142a55b46Smrg  ac_status=$?
40428ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
404342a55b46Smrg  test $ac_status = 0; }; }; then
404442a55b46Smrg    cross_compiling=no
404542a55b46Smrg  else
404642a55b46Smrg    if test "$cross_compiling" = maybe; then
404742a55b46Smrg	cross_compiling=yes
404842a55b46Smrg    else
40498ce07328Smrg	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40508ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
40518ce07328Smrgas_fn_error 77 "cannot run C compiled programs.
405242a55b46SmrgIf you meant to cross compile, use \`--host'.
405342a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
405442a55b46Smrg    fi
4055c582b7e3Smrg  fi
4056c582b7e3Smrgfi
40578ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
40588ce07328Smrgprintf "%s\n" "$cross_compiling" >&6; }
4059c582b7e3Smrg
406042a55b46Smrgrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
406142a55b46Smrgac_clean_files=$ac_clean_files_save
40628ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
40638ce07328Smrgprintf %s "checking for suffix of object files... " >&6; }
40648ce07328Smrgif test ${ac_cv_objext+y}
40658ce07328Smrgthen :
40668ce07328Smrg  printf %s "(cached) " >&6
40678ce07328Smrgelse $as_nop
406842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
406942a55b46Smrg/* end confdefs.h.  */
407042a55b46Smrg
407142a55b46Smrgint
40728ce07328Smrgmain (void)
407342a55b46Smrg{
407442a55b46Smrg
407542a55b46Smrg  ;
407642a55b46Smrg  return 0;
407742a55b46Smrg}
407842a55b46Smrg_ACEOF
407942a55b46Smrgrm -f conftest.o conftest.obj
408042a55b46Smrgif { { ac_try="$ac_compile"
408142a55b46Smrgcase "(($ac_try" in
408242a55b46Smrg  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
408342a55b46Smrg  *) ac_try_echo=$ac_try;;
408442a55b46Smrgesac
408542a55b46Smrgeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
40868ce07328Smrgprintf "%s\n" "$ac_try_echo"; } >&5
408742a55b46Smrg  (eval "$ac_compile") 2>&5
408842a55b46Smrg  ac_status=$?
40898ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40908ce07328Smrg  test $ac_status = 0; }
40918ce07328Smrgthen :
409242a55b46Smrg  for ac_file in conftest.o conftest.obj conftest.*; do
409342a55b46Smrg  test -f "$ac_file" || continue;
409442a55b46Smrg  case $ac_file in
409542a55b46Smrg    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
409642a55b46Smrg    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
409742a55b46Smrg       break;;
409842a55b46Smrg  esac
4099c582b7e3Smrgdone
41008ce07328Smrgelse $as_nop
41018ce07328Smrg  printf "%s\n" "$as_me: failed program was:" >&5
410242a55b46Smrgsed 's/^/| /' conftest.$ac_ext >&5
4103c582b7e3Smrg
41048ce07328Smrg{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41058ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
410642a55b46Smrgas_fn_error $? "cannot compute suffix of object files: cannot compile
410742a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
4108c582b7e3Smrgfi
410942a55b46Smrgrm -f conftest.$ac_cv_objext conftest.$ac_ext
4110c582b7e3Smrgfi
41118ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
41128ce07328Smrgprintf "%s\n" "$ac_cv_objext" >&6; }
411342a55b46SmrgOBJEXT=$ac_cv_objext
411442a55b46Smrgac_objext=$OBJEXT
41158ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
41168ce07328Smrgprintf %s "checking whether the compiler supports GNU C... " >&6; }
41178ce07328Smrgif test ${ac_cv_c_compiler_gnu+y}
41188ce07328Smrgthen :
41198ce07328Smrg  printf %s "(cached) " >&6
41208ce07328Smrgelse $as_nop
412142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
412242a55b46Smrg/* end confdefs.h.  */
4123c582b7e3Smrg
412442a55b46Smrgint
41258ce07328Smrgmain (void)
412642a55b46Smrg{
412742a55b46Smrg#ifndef __GNUC__
412842a55b46Smrg       choke me
412942a55b46Smrg#endif
4130c582b7e3Smrg
413142a55b46Smrg  ;
413242a55b46Smrg  return 0;
413342a55b46Smrg}
413442a55b46Smrg_ACEOF
41358ce07328Smrgif ac_fn_c_try_compile "$LINENO"
41368ce07328Smrgthen :
413742a55b46Smrg  ac_compiler_gnu=yes
41388ce07328Smrgelse $as_nop
413942a55b46Smrg  ac_compiler_gnu=no
4140c582b7e3Smrgfi
41418ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
414242a55b46Smrgac_cv_c_compiler_gnu=$ac_compiler_gnu
414342a55b46Smrg
414442a55b46Smrgfi
41458ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
41468ce07328Smrgprintf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
41478ce07328Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
41488ce07328Smrg
414942a55b46Smrgif test $ac_compiler_gnu = yes; then
415042a55b46Smrg  GCC=yes
415142a55b46Smrgelse
415242a55b46Smrg  GCC=
415342a55b46Smrgfi
41548ce07328Smrgac_test_CFLAGS=${CFLAGS+y}
415542a55b46Smrgac_save_CFLAGS=$CFLAGS
41568ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
41578ce07328Smrgprintf %s "checking whether $CC accepts -g... " >&6; }
41588ce07328Smrgif test ${ac_cv_prog_cc_g+y}
41598ce07328Smrgthen :
41608ce07328Smrg  printf %s "(cached) " >&6
41618ce07328Smrgelse $as_nop
416242a55b46Smrg  ac_save_c_werror_flag=$ac_c_werror_flag
416342a55b46Smrg   ac_c_werror_flag=yes
416442a55b46Smrg   ac_cv_prog_cc_g=no
416542a55b46Smrg   CFLAGS="-g"
416642a55b46Smrg   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
416742a55b46Smrg/* end confdefs.h.  */
416842a55b46Smrg
416942a55b46Smrgint
41708ce07328Smrgmain (void)
417142a55b46Smrg{
417242a55b46Smrg
417342a55b46Smrg  ;
417442a55b46Smrg  return 0;
417542a55b46Smrg}
417642a55b46Smrg_ACEOF
41778ce07328Smrgif ac_fn_c_try_compile "$LINENO"
41788ce07328Smrgthen :
417942a55b46Smrg  ac_cv_prog_cc_g=yes
41808ce07328Smrgelse $as_nop
418142a55b46Smrg  CFLAGS=""
418242a55b46Smrg      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
418342a55b46Smrg/* end confdefs.h.  */
4184c582b7e3Smrg
418542a55b46Smrgint
41868ce07328Smrgmain (void)
418742a55b46Smrg{
418842a55b46Smrg
418942a55b46Smrg  ;
419042a55b46Smrg  return 0;
419142a55b46Smrg}
419242a55b46Smrg_ACEOF
41938ce07328Smrgif ac_fn_c_try_compile "$LINENO"
41948ce07328Smrgthen :
419542a55b46Smrg
41968ce07328Smrgelse $as_nop
419742a55b46Smrg  ac_c_werror_flag=$ac_save_c_werror_flag
419842a55b46Smrg	 CFLAGS="-g"
419942a55b46Smrg	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
420042a55b46Smrg/* end confdefs.h.  */
420142a55b46Smrg
420242a55b46Smrgint
42038ce07328Smrgmain (void)
420442a55b46Smrg{
420542a55b46Smrg
420642a55b46Smrg  ;
420742a55b46Smrg  return 0;
420842a55b46Smrg}
420942a55b46Smrg_ACEOF
42108ce07328Smrgif ac_fn_c_try_compile "$LINENO"
42118ce07328Smrgthen :
421242a55b46Smrg  ac_cv_prog_cc_g=yes
4213c582b7e3Smrgfi
42148ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4215c582b7e3Smrgfi
42168ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4217c582b7e3Smrgfi
42188ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
421942a55b46Smrg   ac_c_werror_flag=$ac_save_c_werror_flag
4220c582b7e3Smrgfi
42218ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
42228ce07328Smrgprintf "%s\n" "$ac_cv_prog_cc_g" >&6; }
42238ce07328Smrgif test $ac_test_CFLAGS; then
422442a55b46Smrg  CFLAGS=$ac_save_CFLAGS
422542a55b46Smrgelif test $ac_cv_prog_cc_g = yes; then
422642a55b46Smrg  if test "$GCC" = yes; then
422742a55b46Smrg    CFLAGS="-g -O2"
422842a55b46Smrg  else
422942a55b46Smrg    CFLAGS="-g"
423042a55b46Smrg  fi
423142a55b46Smrgelse
423242a55b46Smrg  if test "$GCC" = yes; then
423342a55b46Smrg    CFLAGS="-O2"
423442a55b46Smrg  else
423542a55b46Smrg    CFLAGS=
423642a55b46Smrg  fi
4237c582b7e3Smrgfi
42388ce07328Smrgac_prog_cc_stdc=no
42398ce07328Smrgif test x$ac_prog_cc_stdc = xno
42408ce07328Smrgthen :
42418ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
42428ce07328Smrgprintf %s "checking for $CC option to enable C11 features... " >&6; }
42438ce07328Smrgif test ${ac_cv_prog_cc_c11+y}
42448ce07328Smrgthen :
42458ce07328Smrg  printf %s "(cached) " >&6
42468ce07328Smrgelse $as_nop
42478ce07328Smrg  ac_cv_prog_cc_c11=no
424842a55b46Smrgac_save_CC=$CC
424942a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
425042a55b46Smrg/* end confdefs.h.  */
42518ce07328Smrg$ac_c_conftest_c11_program
42528ce07328Smrg_ACEOF
42538ce07328Smrgfor ac_arg in '' -std=gnu11
42548ce07328Smrgdo
42558ce07328Smrg  CC="$ac_save_CC $ac_arg"
42568ce07328Smrg  if ac_fn_c_try_compile "$LINENO"
42578ce07328Smrgthen :
42588ce07328Smrg  ac_cv_prog_cc_c11=$ac_arg
42598ce07328Smrgfi
42608ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam
42618ce07328Smrg  test "x$ac_cv_prog_cc_c11" != "xno" && break
42628ce07328Smrgdone
42638ce07328Smrgrm -f conftest.$ac_ext
42648ce07328SmrgCC=$ac_save_CC
42658ce07328Smrgfi
426642a55b46Smrg
42678ce07328Smrgif test "x$ac_cv_prog_cc_c11" = xno
42688ce07328Smrgthen :
42698ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
42708ce07328Smrgprintf "%s\n" "unsupported" >&6; }
42718ce07328Smrgelse $as_nop
42728ce07328Smrg  if test "x$ac_cv_prog_cc_c11" = x
42738ce07328Smrgthen :
42748ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
42758ce07328Smrgprintf "%s\n" "none needed" >&6; }
42768ce07328Smrgelse $as_nop
42778ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
42788ce07328Smrgprintf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
42798ce07328Smrg     CC="$CC $ac_cv_prog_cc_c11"
42808ce07328Smrgfi
42818ce07328Smrg  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
42828ce07328Smrg  ac_prog_cc_stdc=c11
42838ce07328Smrgfi
42848ce07328Smrgfi
42858ce07328Smrgif test x$ac_prog_cc_stdc = xno
42868ce07328Smrgthen :
42878ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
42888ce07328Smrgprintf %s "checking for $CC option to enable C99 features... " >&6; }
42898ce07328Smrgif test ${ac_cv_prog_cc_c99+y}
42908ce07328Smrgthen :
42918ce07328Smrg  printf %s "(cached) " >&6
42928ce07328Smrgelse $as_nop
42938ce07328Smrg  ac_cv_prog_cc_c99=no
42948ce07328Smrgac_save_CC=$CC
42958ce07328Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
42968ce07328Smrg/* end confdefs.h.  */
42978ce07328Smrg$ac_c_conftest_c99_program
42988ce07328Smrg_ACEOF
42998ce07328Smrgfor ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
43008ce07328Smrgdo
43018ce07328Smrg  CC="$ac_save_CC $ac_arg"
43028ce07328Smrg  if ac_fn_c_try_compile "$LINENO"
43038ce07328Smrgthen :
43048ce07328Smrg  ac_cv_prog_cc_c99=$ac_arg
43058ce07328Smrgfi
43068ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam
43078ce07328Smrg  test "x$ac_cv_prog_cc_c99" != "xno" && break
43088ce07328Smrgdone
43098ce07328Smrgrm -f conftest.$ac_ext
43108ce07328SmrgCC=$ac_save_CC
43118ce07328Smrgfi
431242a55b46Smrg
43138ce07328Smrgif test "x$ac_cv_prog_cc_c99" = xno
43148ce07328Smrgthen :
43158ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
43168ce07328Smrgprintf "%s\n" "unsupported" >&6; }
43178ce07328Smrgelse $as_nop
43188ce07328Smrg  if test "x$ac_cv_prog_cc_c99" = x
43198ce07328Smrgthen :
43208ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
43218ce07328Smrgprintf "%s\n" "none needed" >&6; }
43228ce07328Smrgelse $as_nop
43238ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
43248ce07328Smrgprintf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
43258ce07328Smrg     CC="$CC $ac_cv_prog_cc_c99"
43268ce07328Smrgfi
43278ce07328Smrg  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
43288ce07328Smrg  ac_prog_cc_stdc=c99
43298ce07328Smrgfi
43308ce07328Smrgfi
43318ce07328Smrgif test x$ac_prog_cc_stdc = xno
43328ce07328Smrgthen :
43338ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
43348ce07328Smrgprintf %s "checking for $CC option to enable C89 features... " >&6; }
43358ce07328Smrgif test ${ac_cv_prog_cc_c89+y}
43368ce07328Smrgthen :
43378ce07328Smrg  printf %s "(cached) " >&6
43388ce07328Smrgelse $as_nop
43398ce07328Smrg  ac_cv_prog_cc_c89=no
43408ce07328Smrgac_save_CC=$CC
43418ce07328Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
43428ce07328Smrg/* end confdefs.h.  */
43438ce07328Smrg$ac_c_conftest_c89_program
434442a55b46Smrg_ACEOF
43458ce07328Smrgfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4346c582b7e3Smrgdo
434742a55b46Smrg  CC="$ac_save_CC $ac_arg"
43488ce07328Smrg  if ac_fn_c_try_compile "$LINENO"
43498ce07328Smrgthen :
435042a55b46Smrg  ac_cv_prog_cc_c89=$ac_arg
435142a55b46Smrgfi
43528ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam
435342a55b46Smrg  test "x$ac_cv_prog_cc_c89" != "xno" && break
4354c582b7e3Smrgdone
435542a55b46Smrgrm -f conftest.$ac_ext
435642a55b46SmrgCC=$ac_save_CC
4357c582b7e3Smrgfi
435842a55b46Smrg
43598ce07328Smrgif test "x$ac_cv_prog_cc_c89" = xno
43608ce07328Smrgthen :
43618ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
43628ce07328Smrgprintf "%s\n" "unsupported" >&6; }
43638ce07328Smrgelse $as_nop
43648ce07328Smrg  if test "x$ac_cv_prog_cc_c89" = x
43658ce07328Smrgthen :
43668ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
43678ce07328Smrgprintf "%s\n" "none needed" >&6; }
43688ce07328Smrgelse $as_nop
43698ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
43708ce07328Smrgprintf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
43718ce07328Smrg     CC="$CC $ac_cv_prog_cc_c89"
43728ce07328Smrgfi
43738ce07328Smrg  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
43748ce07328Smrg  ac_prog_cc_stdc=c89
43758ce07328Smrgfi
4376c582b7e3Smrgfi
4377c582b7e3Smrg
437842a55b46Smrgac_ext=c
437942a55b46Smrgac_cpp='$CPP $CPPFLAGS'
438042a55b46Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
438142a55b46Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
438242a55b46Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
4383c582b7e3Smrg
43848ce07328Smrg
43858ce07328Smrg  ac_ext=c
4386e3d74329Smrgac_cpp='$CPP $CPPFLAGS'
4387e3d74329Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4388e3d74329Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4389e3d74329Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
43908ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
43918ce07328Smrgprintf %s "checking whether $CC understands -c and -o together... " >&6; }
43928ce07328Smrgif test ${am_cv_prog_cc_c_o+y}
43938ce07328Smrgthen :
43948ce07328Smrg  printf %s "(cached) " >&6
43958ce07328Smrgelse $as_nop
4396e3d74329Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397e3d74329Smrg/* end confdefs.h.  */
4398e3d74329Smrg
4399e3d74329Smrgint
44008ce07328Smrgmain (void)
4401e3d74329Smrg{
4402e3d74329Smrg
4403e3d74329Smrg  ;
4404e3d74329Smrg  return 0;
4405e3d74329Smrg}
4406e3d74329Smrg_ACEOF
4407e3d74329Smrg  # Make sure it works both with $CC and with simple cc.
4408e3d74329Smrg  # Following AC_PROG_CC_C_O, we do the test twice because some
4409e3d74329Smrg  # compilers refuse to overwrite an existing .o file with -o,
4410e3d74329Smrg  # though they will create one.
4411e3d74329Smrg  am_cv_prog_cc_c_o=yes
4412e3d74329Smrg  for am_i in 1 2; do
4413e3d74329Smrg    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4414e3d74329Smrg   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4415e3d74329Smrg   ac_status=$?
4416e3d74329Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4417e3d74329Smrg   (exit $ac_status); } \
4418e3d74329Smrg         && test -f conftest2.$ac_objext; then
4419e3d74329Smrg      : OK
4420e3d74329Smrg    else
4421e3d74329Smrg      am_cv_prog_cc_c_o=no
4422e3d74329Smrg      break
4423e3d74329Smrg    fi
4424e3d74329Smrg  done
4425e3d74329Smrg  rm -f core conftest*
4426e3d74329Smrg  unset am_i
4427e3d74329Smrgfi
44288ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
44298ce07328Smrgprintf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
4430e3d74329Smrgif test "$am_cv_prog_cc_c_o" != yes; then
4431e3d74329Smrg   # Losing compiler, so override with the script.
4432e3d74329Smrg   # FIXME: It is wrong to rewrite CC.
4433e3d74329Smrg   # But if we don't then we get into trouble of one sort or another.
4434e3d74329Smrg   # A longer-term fix would be to have automake use am__CC in this case,
4435e3d74329Smrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4436e3d74329Smrg   CC="$am_aux_dir/compile $CC"
4437e3d74329Smrgfi
4438e3d74329Smrgac_ext=c
4439e3d74329Smrgac_cpp='$CPP $CPPFLAGS'
4440e3d74329Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4441e3d74329Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4442e3d74329Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
4443e3d74329Smrg
4444e3d74329Smrg
444542a55b46Smrgdepcc="$CC"   am_compiler_list=
444642a55b46Smrg
44478ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
44488ce07328Smrgprintf %s "checking dependency style of $depcc... " >&6; }
44498ce07328Smrgif test ${am_cv_CC_dependencies_compiler_type+y}
44508ce07328Smrgthen :
44518ce07328Smrg  printf %s "(cached) " >&6
44528ce07328Smrgelse $as_nop
445342a55b46Smrg  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
445442a55b46Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
445542a55b46Smrg  # making bogus files that we don't know about and never remove.  For
445642a55b46Smrg  # instance it was reported that on HP-UX the gcc test will end up
4457e3d74329Smrg  # making a dummy file named 'D' -- because '-MD' means "put the output
4458e3d74329Smrg  # in D".
445942a55b46Smrg  rm -rf conftest.dir
446042a55b46Smrg  mkdir conftest.dir
446142a55b46Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
446242a55b46Smrg  # using a relative directory.
446342a55b46Smrg  cp "$am_depcomp" conftest.dir
446442a55b46Smrg  cd conftest.dir
446542a55b46Smrg  # We will build objects and dependencies in a subdirectory because
446642a55b46Smrg  # it helps to detect inapplicable dependency modes.  For instance
446742a55b46Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
446842a55b46Smrg  # side effect of compilation, but ICC will put the dependencies in
446942a55b46Smrg  # the current directory while Tru64 will put them in the object
447042a55b46Smrg  # directory.
447142a55b46Smrg  mkdir sub
447242a55b46Smrg
447342a55b46Smrg  am_cv_CC_dependencies_compiler_type=none
447442a55b46Smrg  if test "$am_compiler_list" = ""; then
447542a55b46Smrg     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4476c582b7e3Smrg  fi
447742a55b46Smrg  am__universal=false
447842a55b46Smrg  case " $depcc " in #(
447942a55b46Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
448042a55b46Smrg     esac
448142a55b46Smrg
448242a55b46Smrg  for depmode in $am_compiler_list; do
448342a55b46Smrg    # Setup a source with many dependencies, because some compilers
448442a55b46Smrg    # like to wrap large dependency lists on column 80 (with \), and
448542a55b46Smrg    # we should not choose a depcomp mode which is confused by this.
448642a55b46Smrg    #
448742a55b46Smrg    # We need to recreate these files for each test, as the compiler may
448842a55b46Smrg    # overwrite some of them when testing with obscure command lines.
448942a55b46Smrg    # This happens at least with the AIX C compiler.
449042a55b46Smrg    : > sub/conftest.c
449142a55b46Smrg    for i in 1 2 3 4 5 6; do
449242a55b46Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4493e3d74329Smrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4494e3d74329Smrg      # Solaris 10 /bin/sh.
4495e3d74329Smrg      echo '/* dummy */' > sub/conftst$i.h
449642a55b46Smrg    done
449742a55b46Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
449842a55b46Smrg
4499e3d74329Smrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
450042a55b46Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
4501e3d74329Smrg    # handle '-M -o', and we need to detect this.  Also, some Intel
4502e3d74329Smrg    # versions had trouble with output in subdirs.
450342a55b46Smrg    am__obj=sub/conftest.${OBJEXT-o}
450442a55b46Smrg    am__minus_obj="-o $am__obj"
450542a55b46Smrg    case $depmode in
450642a55b46Smrg    gcc)
450742a55b46Smrg      # This depmode causes a compiler race in universal mode.
450842a55b46Smrg      test "$am__universal" = false || continue
450942a55b46Smrg      ;;
451042a55b46Smrg    nosideeffect)
4511e3d74329Smrg      # After this tag, mechanisms are not by side-effect, so they'll
4512e3d74329Smrg      # only be used when explicitly requested.
451342a55b46Smrg      if test "x$enable_dependency_tracking" = xyes; then
451442a55b46Smrg	continue
451542a55b46Smrg      else
451642a55b46Smrg	break
451742a55b46Smrg      fi
451842a55b46Smrg      ;;
451942a55b46Smrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4520e3d74329Smrg      # This compiler won't grok '-c -o', but also, the minuso test has
452142a55b46Smrg      # not run yet.  These depmodes are late enough in the game, and
452242a55b46Smrg      # so weak that their functioning should not be impacted.
452342a55b46Smrg      am__obj=conftest.${OBJEXT-o}
452442a55b46Smrg      am__minus_obj=
452542a55b46Smrg      ;;
452642a55b46Smrg    none) break ;;
452742a55b46Smrg    esac
452842a55b46Smrg    if depmode=$depmode \
452942a55b46Smrg       source=sub/conftest.c object=$am__obj \
453042a55b46Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
453142a55b46Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
453242a55b46Smrg         >/dev/null 2>conftest.err &&
453342a55b46Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
453442a55b46Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
453542a55b46Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
453642a55b46Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
453742a55b46Smrg      # icc doesn't choke on unknown options, it will just issue warnings
453842a55b46Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
453942a55b46Smrg      # that says an option was ignored or not supported.
454042a55b46Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
454142a55b46Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
454242a55b46Smrg      # The diagnosis changed in icc 8.0:
454342a55b46Smrg      #   icc: Command line remark: option '-MP' not supported
454442a55b46Smrg      if (grep 'ignoring option' conftest.err ||
454542a55b46Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
454642a55b46Smrg        am_cv_CC_dependencies_compiler_type=$depmode
454742a55b46Smrg        break
454842a55b46Smrg      fi
454942a55b46Smrg    fi
455042a55b46Smrg  done
4551c582b7e3Smrg
455242a55b46Smrg  cd ..
455342a55b46Smrg  rm -rf conftest.dir
455442a55b46Smrgelse
455542a55b46Smrg  am_cv_CC_dependencies_compiler_type=none
4556c582b7e3Smrgfi
455742a55b46Smrg
4558c582b7e3Smrgfi
45598ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
45608ce07328Smrgprintf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
456142a55b46SmrgCCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
456242a55b46Smrg
456342a55b46Smrg if
456442a55b46Smrg  test "x$enable_dependency_tracking" != xno \
456542a55b46Smrg  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
456642a55b46Smrg  am__fastdepCC_TRUE=
456742a55b46Smrg  am__fastdepCC_FALSE='#'
4568c582b7e3Smrgelse
45698ce07328Smrg  am__fastdepCC_TRUE='#'
45708ce07328Smrg  am__fastdepCC_FALSE=
457142a55b46Smrgfi
457242a55b46Smrg
457342a55b46Smrg
4574c582b7e3Smrg
45758ce07328Smrg
45768ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
45778ce07328Smrgprintf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
45788ce07328Smrgif test ${ac_cv_c_undeclared_builtin_options+y}
45798ce07328Smrgthen :
45808ce07328Smrg  printf %s "(cached) " >&6
45818ce07328Smrgelse $as_nop
45828ce07328Smrg  ac_save_CFLAGS=$CFLAGS
45838ce07328Smrg   ac_cv_c_undeclared_builtin_options='cannot detect'
45848ce07328Smrg   for ac_arg in '' -fno-builtin; do
45858ce07328Smrg     CFLAGS="$ac_save_CFLAGS $ac_arg"
45868ce07328Smrg     # This test program should *not* compile successfully.
45878ce07328Smrg     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588c582b7e3Smrg/* end confdefs.h.  */
4589c582b7e3Smrg
4590c582b7e3Smrgint
45918ce07328Smrgmain (void)
4592c582b7e3Smrg{
45938ce07328Smrg(void) strchr;
4594c582b7e3Smrg  ;
4595c582b7e3Smrg  return 0;
4596c582b7e3Smrg}
4597c582b7e3Smrg_ACEOF
45988ce07328Smrgif ac_fn_c_try_compile "$LINENO"
45998ce07328Smrgthen :
46008ce07328Smrg
46018ce07328Smrgelse $as_nop
46028ce07328Smrg  # This test program should compile successfully.
46038ce07328Smrg        # No library function is consistently available on
46048ce07328Smrg        # freestanding implementations, so test against a dummy
46058ce07328Smrg        # declaration.  Include always-available headers on the
46068ce07328Smrg        # off chance that they somehow elicit warnings.
46078ce07328Smrg        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
460842a55b46Smrg/* end confdefs.h.  */
46098ce07328Smrg#include <float.h>
46108ce07328Smrg#include <limits.h>
46118ce07328Smrg#include <stdarg.h>
46128ce07328Smrg#include <stddef.h>
46138ce07328Smrgextern void ac_decl (int, char *);
4614c582b7e3Smrg
4615c582b7e3Smrgint
46168ce07328Smrgmain (void)
4617c582b7e3Smrg{
46188ce07328Smrg(void) ac_decl (0, (char *) 0);
46198ce07328Smrg  (void) ac_decl;
46208ce07328Smrg
46218ce07328Smrg  ;
4622c582b7e3Smrg  return 0;
4623c582b7e3Smrg}
4624c582b7e3Smrg_ACEOF
46258ce07328Smrgif ac_fn_c_try_compile "$LINENO"
46268ce07328Smrgthen :
46278ce07328Smrg  if test x"$ac_arg" = x
46288ce07328Smrgthen :
46298ce07328Smrg  ac_cv_c_undeclared_builtin_options='none needed'
46308ce07328Smrgelse $as_nop
46318ce07328Smrg  ac_cv_c_undeclared_builtin_options=$ac_arg
4632c582b7e3Smrgfi
46338ce07328Smrg          break
463442a55b46Smrgfi
46358ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
463642a55b46Smrgfi
46378ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
46388ce07328Smrg    done
46398ce07328Smrg    CFLAGS=$ac_save_CFLAGS
46408ce07328Smrg
46418ce07328Smrgfi
46428ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
46438ce07328Smrgprintf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
46448ce07328Smrg  case $ac_cv_c_undeclared_builtin_options in #(
46458ce07328Smrg  'cannot detect') :
46468ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46478ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
46488ce07328Smrgas_fn_error $? "cannot make $CC report undeclared builtins
46498ce07328SmrgSee \`config.log' for more details" "$LINENO" 5; } ;; #(
46508ce07328Smrg  'none needed') :
46518ce07328Smrg    ac_c_undeclared_builtin_options='' ;; #(
46528ce07328Smrg  *) :
46538ce07328Smrg    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
46548ce07328Smrgesac
46558ce07328Smrg
46568ce07328Smrgac_header= ac_cache=
46578ce07328Smrgfor ac_item in $ac_header_c_list
46588ce07328Smrgdo
46598ce07328Smrg  if test $ac_cache; then
46608ce07328Smrg    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
46618ce07328Smrg    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
46628ce07328Smrg      printf "%s\n" "#define $ac_item 1" >> confdefs.h
46638ce07328Smrg    fi
46648ce07328Smrg    ac_header= ac_cache=
46658ce07328Smrg  elif test $ac_header; then
46668ce07328Smrg    ac_cache=$ac_item
46678ce07328Smrg  else
46688ce07328Smrg    ac_header=$ac_item
46698ce07328Smrg  fi
46708ce07328Smrgdone
4671c582b7e3Smrg
4672c582b7e3Smrg
4673c582b7e3Smrg
467419019ffeSmrg
4675c582b7e3Smrg
4676c582b7e3Smrg
467742a55b46Smrg
467842a55b46Smrg
46798ce07328Smrgif test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
46808ce07328Smrgthen :
46818ce07328Smrg
46828ce07328Smrgprintf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
46838ce07328Smrg
46848ce07328Smrgfi
46858ce07328Smrg
468642a55b46Smrg
468742a55b46Smrg
468842a55b46Smrg
46898ce07328Smrgac_fn_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
46908ce07328Smrgif test "x$ac_cv_have_decl___clang__" = xyes
46918ce07328Smrgthen :
469242a55b46Smrg  CLANGCC="yes"
46938ce07328Smrgelse $as_nop
469442a55b46Smrg  CLANGCC="no"
4695c582b7e3Smrgfi
46968ce07328Smrgac_fn_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
46978ce07328Smrgif test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes
46988ce07328Smrgthen :
469942a55b46Smrg  INTELCC="yes"
47008ce07328Smrgelse $as_nop
470142a55b46Smrg  INTELCC="no"
4702c582b7e3Smrgfi
47038ce07328Smrgac_fn_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
47048ce07328Smrgif test "x$ac_cv_have_decl___SUNPRO_C" = xyes
47058ce07328Smrgthen :
470642a55b46Smrg  SUNCC="yes"
47078ce07328Smrgelse $as_nop
470842a55b46Smrg  SUNCC="no"
4709c582b7e3Smrgfi
4710c582b7e3Smrg
4711c582b7e3Smrg
471242a55b46Smrg
471342a55b46Smrg
471442a55b46Smrg
471542a55b46Smrg
471642a55b46Smrg
471742a55b46Smrg
471842a55b46Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
471942a55b46Smrg	if test -n "$ac_tool_prefix"; then
472042a55b46Smrg  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
472142a55b46Smrgset dummy ${ac_tool_prefix}pkg-config; ac_word=$2
47228ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47238ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
47248ce07328Smrgif test ${ac_cv_path_PKG_CONFIG+y}
47258ce07328Smrgthen :
47268ce07328Smrg  printf %s "(cached) " >&6
47278ce07328Smrgelse $as_nop
472842a55b46Smrg  case $PKG_CONFIG in
472942a55b46Smrg  [\\/]* | ?:[\\/]*)
473042a55b46Smrg  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
473142a55b46Smrg  ;;
473242a55b46Smrg  *)
473342a55b46Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4734c582b7e3Smrgfor as_dir in $PATH
4735c582b7e3Smrgdo
4736c582b7e3Smrg  IFS=$as_save_IFS
47378ce07328Smrg  case $as_dir in #(((
47388ce07328Smrg    '') as_dir=./ ;;
47398ce07328Smrg    */) ;;
47408ce07328Smrg    *) as_dir=$as_dir/ ;;
47418ce07328Smrg  esac
4742c582b7e3Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
47438ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47448ce07328Smrg    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
47458ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
474642a55b46Smrg    break 2
4747c582b7e3Smrg  fi
4748c582b7e3Smrgdone
474942a55b46Smrg  done
475042a55b46SmrgIFS=$as_save_IFS
4751c582b7e3Smrg
475242a55b46Smrg  ;;
475342a55b46Smrgesac
475442a55b46Smrgfi
475542a55b46SmrgPKG_CONFIG=$ac_cv_path_PKG_CONFIG
475642a55b46Smrgif test -n "$PKG_CONFIG"; then
47578ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
47588ce07328Smrgprintf "%s\n" "$PKG_CONFIG" >&6; }
475942a55b46Smrgelse
47608ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
47618ce07328Smrgprintf "%s\n" "no" >&6; }
4762c582b7e3Smrgfi
4763c582b7e3Smrg
4764c582b7e3Smrg
476542a55b46Smrgfi
476642a55b46Smrgif test -z "$ac_cv_path_PKG_CONFIG"; then
476742a55b46Smrg  ac_pt_PKG_CONFIG=$PKG_CONFIG
476842a55b46Smrg  # Extract the first word of "pkg-config", so it can be a program name with args.
476942a55b46Smrgset dummy pkg-config; ac_word=$2
47708ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47718ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
47728ce07328Smrgif test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
47738ce07328Smrgthen :
47748ce07328Smrg  printf %s "(cached) " >&6
47758ce07328Smrgelse $as_nop
477642a55b46Smrg  case $ac_pt_PKG_CONFIG in
477742a55b46Smrg  [\\/]* | ?:[\\/]*)
477842a55b46Smrg  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
477942a55b46Smrg  ;;
478042a55b46Smrg  *)
478119019ffeSmrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
478242a55b46Smrgfor as_dir in $PATH
4783c582b7e3Smrgdo
4784c582b7e3Smrg  IFS=$as_save_IFS
47858ce07328Smrg  case $as_dir in #(((
47868ce07328Smrg    '') as_dir=./ ;;
47878ce07328Smrg    */) ;;
47888ce07328Smrg    *) as_dir=$as_dir/ ;;
47898ce07328Smrg  esac
479019019ffeSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
47918ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
47928ce07328Smrg    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
47938ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
479442a55b46Smrg    break 2
479542a55b46Smrg  fi
479642a55b46Smrgdone
4797c582b7e3Smrg  done
479842a55b46SmrgIFS=$as_save_IFS
479942a55b46Smrg
480042a55b46Smrg  ;;
4801c582b7e3Smrgesac
480242a55b46Smrgfi
480342a55b46Smrgac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
480442a55b46Smrgif test -n "$ac_pt_PKG_CONFIG"; then
48058ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
48068ce07328Smrgprintf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
480742a55b46Smrgelse
48088ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48098ce07328Smrgprintf "%s\n" "no" >&6; }
481042a55b46Smrgfi
4811c582b7e3Smrg
481242a55b46Smrg  if test "x$ac_pt_PKG_CONFIG" = x; then
481342a55b46Smrg    PKG_CONFIG=""
481442a55b46Smrg  else
481542a55b46Smrg    case $cross_compiling:$ac_tool_warned in
481642a55b46Smrgyes:)
48178ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
48188ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
481942a55b46Smrgac_tool_warned=yes ;;
482042a55b46Smrgesac
482142a55b46Smrg    PKG_CONFIG=$ac_pt_PKG_CONFIG
482219019ffeSmrg  fi
4823c582b7e3Smrgelse
482442a55b46Smrg  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4825c582b7e3Smrgfi
4826c582b7e3Smrg
4827c582b7e3Smrgfi
482842a55b46Smrgif test -n "$PKG_CONFIG"; then
482942a55b46Smrg	_pkg_min_version=0.9.0
48308ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
48318ce07328Smrgprintf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
483242a55b46Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
48338ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48348ce07328Smrgprintf "%s\n" "yes" >&6; }
483542a55b46Smrg	else
48368ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
48378ce07328Smrgprintf "%s\n" "no" >&6; }
483842a55b46Smrg		PKG_CONFIG=""
483942a55b46Smrg	fi
484042a55b46Smrgfi
4841c582b7e3Smrg
48428ce07328Smrg
48438ce07328Smrg  # Make sure we can run config.sub.
48448ce07328Smrg$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
48458ce07328Smrg  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
48468ce07328Smrg
48478ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
48488ce07328Smrgprintf %s "checking build system type... " >&6; }
48498ce07328Smrgif test ${ac_cv_build+y}
48508ce07328Smrgthen :
48518ce07328Smrg  printf %s "(cached) " >&6
48528ce07328Smrgelse $as_nop
485342a55b46Smrg  ac_build_alias=$build_alias
485442a55b46Smrgtest "x$ac_build_alias" = x &&
48558ce07328Smrg  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
485642a55b46Smrgtest "x$ac_build_alias" = x &&
485742a55b46Smrg  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
48588ce07328Smrgac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
48598ce07328Smrg  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
4860c582b7e3Smrg
486142a55b46Smrgfi
48628ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
48638ce07328Smrgprintf "%s\n" "$ac_cv_build" >&6; }
486442a55b46Smrgcase $ac_cv_build in
486542a55b46Smrg*-*-*) ;;
486642a55b46Smrg*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
486742a55b46Smrgesac
486842a55b46Smrgbuild=$ac_cv_build
486942a55b46Smrgac_save_IFS=$IFS; IFS='-'
487042a55b46Smrgset x $ac_cv_build
487142a55b46Smrgshift
487242a55b46Smrgbuild_cpu=$1
487342a55b46Smrgbuild_vendor=$2
487442a55b46Smrgshift; shift
487542a55b46Smrg# Remember, the first character of IFS is used to create $*,
487642a55b46Smrg# except with old shells:
487742a55b46Smrgbuild_os=$*
487842a55b46SmrgIFS=$ac_save_IFS
487942a55b46Smrgcase $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
488042a55b46Smrg
488142a55b46Smrg
48828ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
48838ce07328Smrgprintf %s "checking host system type... " >&6; }
48848ce07328Smrgif test ${ac_cv_host+y}
48858ce07328Smrgthen :
48868ce07328Smrg  printf %s "(cached) " >&6
48878ce07328Smrgelse $as_nop
488842a55b46Smrg  if test "x$host_alias" = x; then
488942a55b46Smrg  ac_cv_host=$ac_cv_build
489042a55b46Smrgelse
48918ce07328Smrg  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
48928ce07328Smrg    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
489342a55b46Smrgfi
489442a55b46Smrg
489542a55b46Smrgfi
48968ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
48978ce07328Smrgprintf "%s\n" "$ac_cv_host" >&6; }
489842a55b46Smrgcase $ac_cv_host in
489942a55b46Smrg*-*-*) ;;
490042a55b46Smrg*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
490142a55b46Smrgesac
490242a55b46Smrghost=$ac_cv_host
490342a55b46Smrgac_save_IFS=$IFS; IFS='-'
490442a55b46Smrgset x $ac_cv_host
490542a55b46Smrgshift
490642a55b46Smrghost_cpu=$1
490742a55b46Smrghost_vendor=$2
490842a55b46Smrgshift; shift
490942a55b46Smrg# Remember, the first character of IFS is used to create $*,
491042a55b46Smrg# except with old shells:
491142a55b46Smrghost_os=$*
491242a55b46SmrgIFS=$ac_save_IFS
491342a55b46Smrgcase $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
491442a55b46Smrg
491542a55b46Smrg
49168ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
49178ce07328Smrgprintf %s "checking for a sed that does not truncate output... " >&6; }
49188ce07328Smrgif test ${ac_cv_path_SED+y}
49198ce07328Smrgthen :
49208ce07328Smrg  printf %s "(cached) " >&6
49218ce07328Smrgelse $as_nop
492242a55b46Smrg            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
492342a55b46Smrg     for ac_i in 1 2 3 4 5 6 7; do
492442a55b46Smrg       ac_script="$ac_script$as_nl$ac_script"
492542a55b46Smrg     done
492642a55b46Smrg     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
492742a55b46Smrg     { ac_script=; unset ac_script;}
492842a55b46Smrg     if test -z "$SED"; then
492942a55b46Smrg  ac_path_SED_found=false
493019019ffeSmrg  # Loop through the user's path and test for each of PROGNAME-LIST
493119019ffeSmrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
493242a55b46Smrgfor as_dir in $PATH
4933c582b7e3Smrgdo
4934c582b7e3Smrg  IFS=$as_save_IFS
49358ce07328Smrg  case $as_dir in #(((
49368ce07328Smrg    '') as_dir=./ ;;
49378ce07328Smrg    */) ;;
49388ce07328Smrg    *) as_dir=$as_dir/ ;;
49398ce07328Smrg  esac
49408ce07328Smrg    for ac_prog in sed gsed
49418ce07328Smrg   do
494219019ffeSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
49438ce07328Smrg      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
49440496e070Smrg      as_fn_executable_p "$ac_path_SED" || continue
494542a55b46Smrg# Check for GNU ac_path_SED and select it if it is found.
494642a55b46Smrg  # Check for GNU $ac_path_SED
494742a55b46Smrgcase `"$ac_path_SED" --version 2>&1` in
4948c582b7e3Smrg*GNU*)
494942a55b46Smrg  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4950c582b7e3Smrg*)
4951c582b7e3Smrg  ac_count=0
49528ce07328Smrg  printf %s 0123456789 >"conftest.in"
4953c582b7e3Smrg  while :
4954c582b7e3Smrg  do
4955c582b7e3Smrg    cat "conftest.in" "conftest.in" >"conftest.tmp"
4956c582b7e3Smrg    mv "conftest.tmp" "conftest.in"
4957c582b7e3Smrg    cp "conftest.in" "conftest.nl"
49588ce07328Smrg    printf "%s\n" '' >> "conftest.nl"
495942a55b46Smrg    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4960c582b7e3Smrg    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
496142a55b46Smrg    as_fn_arith $ac_count + 1 && ac_count=$as_val
496242a55b46Smrg    if test $ac_count -gt ${ac_path_SED_max-0}; then
4963c582b7e3Smrg      # Best one so far, save it but keep looking for a better one
496442a55b46Smrg      ac_cv_path_SED="$ac_path_SED"
496542a55b46Smrg      ac_path_SED_max=$ac_count
4966c582b7e3Smrg    fi
4967c582b7e3Smrg    # 10*(2^10) chars as input seems more than enough
4968c582b7e3Smrg    test $ac_count -gt 10 && break
4969c582b7e3Smrg  done
4970c582b7e3Smrg  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4971c582b7e3Smrgesac
4972c582b7e3Smrg
497342a55b46Smrg      $ac_path_SED_found && break 3
497419019ffeSmrg    done
4975c582b7e3Smrg  done
497642a55b46Smrg  done
4977c582b7e3SmrgIFS=$as_save_IFS
497842a55b46Smrg  if test -z "$ac_cv_path_SED"; then
497942a55b46Smrg    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
498019019ffeSmrg  fi
4981c582b7e3Smrgelse
498242a55b46Smrg  ac_cv_path_SED=$SED
4983c582b7e3Smrgfi
4984c582b7e3Smrg
4985c582b7e3Smrgfi
49868ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
49878ce07328Smrgprintf "%s\n" "$ac_cv_path_SED" >&6; }
498842a55b46Smrg SED="$ac_cv_path_SED"
498942a55b46Smrg  rm -f conftest.sed
4990c582b7e3Smrg
4991c582b7e3Smrg
4992c582b7e3Smrg
499342a55b46Smrg
499442a55b46Smrg
499542a55b46Smrg
499642a55b46Smrg# Check whether --enable-selective-werror was given.
49978ce07328Smrgif test ${enable_selective_werror+y}
49988ce07328Smrgthen :
499942a55b46Smrg  enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval
50008ce07328Smrgelse $as_nop
500142a55b46Smrg  SELECTIVE_WERROR=yes
5002c582b7e3Smrgfi
5003c582b7e3Smrg
500442a55b46Smrg
500542a55b46Smrg
500642a55b46Smrg
500742a55b46Smrg
500842a55b46Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
500942a55b46Smrgif test "x$SUNCC" = "xyes"; then
501042a55b46Smrg    BASE_CFLAGS="-v"
5011c582b7e3Smrgelse
501242a55b46Smrg    BASE_CFLAGS=""
5013c582b7e3Smrgfi
501442a55b46Smrg
501542a55b46Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
501642a55b46Smrg
501742a55b46Smrg
501842a55b46Smrg
501942a55b46Smrg
502042a55b46Smrg
502142a55b46Smrg
502242a55b46Smrg
502342a55b46Smrg
502442a55b46Smrg
502542a55b46Smrg
502642a55b46Smrg
502742a55b46Smrg
502842a55b46Smrg
502942a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
503042a55b46Smrg
503142a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
503242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
50338ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
50348ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
50358ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
50368ce07328Smrgthen :
50378ce07328Smrg  printf %s "(cached) " >&6
50388ce07328Smrgelse $as_nop
503942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
504042a55b46Smrg/* end confdefs.h.  */
504142a55b46Smrgint i;
504242a55b46Smrg_ACEOF
50438ce07328Smrgif ac_fn_c_try_compile "$LINENO"
50448ce07328Smrgthen :
504542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
50468ce07328Smrgelse $as_nop
504742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
504842a55b46Smrgfi
50498ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
505042a55b46Smrgfi
50518ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
50528ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
505342a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
505442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
505542a55b46Smrgfi
505642a55b46Smrg
505742a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
505842a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
505942a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
506042a55b46Smrg	fi
506142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
50628ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
50638ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
50648ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
50658ce07328Smrgthen :
50668ce07328Smrg  printf %s "(cached) " >&6
50678ce07328Smrgelse $as_nop
506842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
506942a55b46Smrg/* end confdefs.h.  */
507042a55b46Smrgint i;
507142a55b46Smrg_ACEOF
50728ce07328Smrgif ac_fn_c_try_compile "$LINENO"
50738ce07328Smrgthen :
507442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
50758ce07328Smrgelse $as_nop
507642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
507742a55b46Smrgfi
50788ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
507942a55b46Smrgfi
50808ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
50818ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
508242a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
508342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
508442a55b46Smrgfi
508542a55b46Smrg
508642a55b46Smrgfound="no"
508742a55b46Smrg
508842a55b46Smrg	if test $found = "no" ; then
5089e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
509042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
509142a55b46Smrg		fi
509242a55b46Smrg
5093e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
509442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
509542a55b46Smrg		fi
509642a55b46Smrg
509742a55b46Smrg		CFLAGS="$CFLAGS -Wall"
509842a55b46Smrg
50998ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
51008ce07328Smrgprintf %s "checking if $CC supports -Wall... " >&6; }
510142a55b46Smrg		cacheid=xorg_cv_cc_flag__Wall
51028ce07328Smrg		if eval test \${$cacheid+y}
51038ce07328Smrgthen :
51048ce07328Smrg  printf %s "(cached) " >&6
51058ce07328Smrgelse $as_nop
510642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
510742a55b46Smrg/* end confdefs.h.  */
510842a55b46Smrgint i;
510942a55b46Smrgint
51108ce07328Smrgmain (void)
511142a55b46Smrg{
511242a55b46Smrg
511342a55b46Smrg  ;
511442a55b46Smrg  return 0;
511542a55b46Smrg}
511642a55b46Smrg_ACEOF
51178ce07328Smrgif ac_fn_c_try_link "$LINENO"
51188ce07328Smrgthen :
511942a55b46Smrg  eval $cacheid=yes
51208ce07328Smrgelse $as_nop
512142a55b46Smrg  eval $cacheid=no
512242a55b46Smrgfi
51238ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
512442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
512542a55b46Smrgfi
512642a55b46Smrg
512742a55b46Smrg
512842a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
512942a55b46Smrg
513042a55b46Smrg		eval supported=\$$cacheid
51318ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
51328ce07328Smrgprintf "%s\n" "$supported" >&6; }
513342a55b46Smrg		if test "$supported" = "yes" ; then
513442a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wall"
513542a55b46Smrg			found="yes"
513642a55b46Smrg		fi
513742a55b46Smrg	fi
513842a55b46Smrg
513942a55b46Smrg
514042a55b46Smrg
514142a55b46Smrg
514242a55b46Smrg
514342a55b46Smrg
514442a55b46Smrg
514542a55b46Smrg
514642a55b46Smrg
514742a55b46Smrg
514842a55b46Smrg
514942a55b46Smrg
515042a55b46Smrg
515142a55b46Smrg
515242a55b46Smrg
515342a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
515442a55b46Smrg
515542a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
515642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
51578ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
51588ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
51598ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
51608ce07328Smrgthen :
51618ce07328Smrg  printf %s "(cached) " >&6
51628ce07328Smrgelse $as_nop
516342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
516442a55b46Smrg/* end confdefs.h.  */
516542a55b46Smrgint i;
516642a55b46Smrg_ACEOF
51678ce07328Smrgif ac_fn_c_try_compile "$LINENO"
51688ce07328Smrgthen :
516942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
51708ce07328Smrgelse $as_nop
517142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
517242a55b46Smrgfi
51738ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
517442a55b46Smrgfi
51758ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
51768ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
517742a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
517842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
517942a55b46Smrgfi
518042a55b46Smrg
518142a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
518242a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
518342a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
518442a55b46Smrg	fi
518542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
51868ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
51878ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
51888ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
51898ce07328Smrgthen :
51908ce07328Smrg  printf %s "(cached) " >&6
51918ce07328Smrgelse $as_nop
519242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
519342a55b46Smrg/* end confdefs.h.  */
519442a55b46Smrgint i;
519542a55b46Smrg_ACEOF
51968ce07328Smrgif ac_fn_c_try_compile "$LINENO"
51978ce07328Smrgthen :
519842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
51998ce07328Smrgelse $as_nop
520042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
520142a55b46Smrgfi
52028ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
520342a55b46Smrgfi
52048ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
52058ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
520642a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
520742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
520842a55b46Smrgfi
520942a55b46Smrg
521042a55b46Smrgfound="no"
521142a55b46Smrg
521242a55b46Smrg	if test $found = "no" ; then
5213e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
521442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
521542a55b46Smrg		fi
521642a55b46Smrg
5217e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
521842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
521942a55b46Smrg		fi
522042a55b46Smrg
522142a55b46Smrg		CFLAGS="$CFLAGS -Wpointer-arith"
522242a55b46Smrg
52238ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
52248ce07328Smrgprintf %s "checking if $CC supports -Wpointer-arith... " >&6; }
522542a55b46Smrg		cacheid=xorg_cv_cc_flag__Wpointer_arith
52268ce07328Smrg		if eval test \${$cacheid+y}
52278ce07328Smrgthen :
52288ce07328Smrg  printf %s "(cached) " >&6
52298ce07328Smrgelse $as_nop
523042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
523142a55b46Smrg/* end confdefs.h.  */
523242a55b46Smrgint i;
523342a55b46Smrgint
52348ce07328Smrgmain (void)
523542a55b46Smrg{
523642a55b46Smrg
523742a55b46Smrg  ;
523842a55b46Smrg  return 0;
523942a55b46Smrg}
524042a55b46Smrg_ACEOF
52418ce07328Smrgif ac_fn_c_try_link "$LINENO"
52428ce07328Smrgthen :
524342a55b46Smrg  eval $cacheid=yes
52448ce07328Smrgelse $as_nop
524542a55b46Smrg  eval $cacheid=no
524642a55b46Smrgfi
52478ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
524842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
524942a55b46Smrgfi
525042a55b46Smrg
525142a55b46Smrg
525242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
525342a55b46Smrg
525442a55b46Smrg		eval supported=\$$cacheid
52558ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
52568ce07328Smrgprintf "%s\n" "$supported" >&6; }
525742a55b46Smrg		if test "$supported" = "yes" ; then
525842a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith"
525942a55b46Smrg			found="yes"
526042a55b46Smrg		fi
526142a55b46Smrg	fi
526242a55b46Smrg
526342a55b46Smrg
526442a55b46Smrg
526542a55b46Smrg
526642a55b46Smrg
526742a55b46Smrg
526842a55b46Smrg
526942a55b46Smrg
527042a55b46Smrg
527142a55b46Smrg
527242a55b46Smrg
527342a55b46Smrg
527442a55b46Smrg
527542a55b46Smrg
527642a55b46Smrg
527742a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
527842a55b46Smrg
527942a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
528042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
52818ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
52828ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
52838ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
52848ce07328Smrgthen :
52858ce07328Smrg  printf %s "(cached) " >&6
52868ce07328Smrgelse $as_nop
528742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
528842a55b46Smrg/* end confdefs.h.  */
528942a55b46Smrgint i;
529042a55b46Smrg_ACEOF
52918ce07328Smrgif ac_fn_c_try_compile "$LINENO"
52928ce07328Smrgthen :
529342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
52948ce07328Smrgelse $as_nop
529542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
529642a55b46Smrgfi
52978ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
529842a55b46Smrgfi
52998ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
53008ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
530142a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
530242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
530342a55b46Smrgfi
530442a55b46Smrg
530542a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
530642a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
530742a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
530842a55b46Smrg	fi
530942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
53108ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
53118ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
53128ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
53138ce07328Smrgthen :
53148ce07328Smrg  printf %s "(cached) " >&6
53158ce07328Smrgelse $as_nop
531642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
531742a55b46Smrg/* end confdefs.h.  */
531842a55b46Smrgint i;
531942a55b46Smrg_ACEOF
53208ce07328Smrgif ac_fn_c_try_compile "$LINENO"
53218ce07328Smrgthen :
532242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
53238ce07328Smrgelse $as_nop
532442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
532542a55b46Smrgfi
53268ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
532742a55b46Smrgfi
53288ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
53298ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
533042a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
533142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
533242a55b46Smrgfi
533342a55b46Smrg
533442a55b46Smrgfound="no"
533542a55b46Smrg
533642a55b46Smrg	if test $found = "no" ; then
5337e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
533842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
533942a55b46Smrg		fi
534042a55b46Smrg
5341e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
534242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
534342a55b46Smrg		fi
534442a55b46Smrg
534542a55b46Smrg		CFLAGS="$CFLAGS -Wmissing-declarations"
534642a55b46Smrg
53478ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5
53488ce07328Smrgprintf %s "checking if $CC supports -Wmissing-declarations... " >&6; }
534942a55b46Smrg		cacheid=xorg_cv_cc_flag__Wmissing_declarations
53508ce07328Smrg		if eval test \${$cacheid+y}
53518ce07328Smrgthen :
53528ce07328Smrg  printf %s "(cached) " >&6
53538ce07328Smrgelse $as_nop
535442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
535542a55b46Smrg/* end confdefs.h.  */
535642a55b46Smrgint i;
535742a55b46Smrgint
53588ce07328Smrgmain (void)
535942a55b46Smrg{
536042a55b46Smrg
536142a55b46Smrg  ;
536242a55b46Smrg  return 0;
536342a55b46Smrg}
536442a55b46Smrg_ACEOF
53658ce07328Smrgif ac_fn_c_try_link "$LINENO"
53668ce07328Smrgthen :
536742a55b46Smrg  eval $cacheid=yes
53688ce07328Smrgelse $as_nop
536942a55b46Smrg  eval $cacheid=no
5370c582b7e3Smrgfi
53718ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
537242a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
5373c582b7e3Smrgfi
5374c582b7e3Smrg
537542a55b46Smrg
537642a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
537742a55b46Smrg
537842a55b46Smrg		eval supported=\$$cacheid
53798ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
53808ce07328Smrgprintf "%s\n" "$supported" >&6; }
538142a55b46Smrg		if test "$supported" = "yes" ; then
538242a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations"
538342a55b46Smrg			found="yes"
538442a55b46Smrg		fi
538542a55b46Smrg	fi
538642a55b46Smrg
538742a55b46Smrg
538842a55b46Smrg
538942a55b46Smrg
539042a55b46Smrg
539142a55b46Smrg
539242a55b46Smrg
539342a55b46Smrg
539442a55b46Smrg
539542a55b46Smrg
539642a55b46Smrg
539742a55b46Smrg
539842a55b46Smrg
539942a55b46Smrg
540042a55b46Smrg
540142a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
540242a55b46Smrg
540342a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
540442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
54058ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
54068ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
54078ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
54088ce07328Smrgthen :
54098ce07328Smrg  printf %s "(cached) " >&6
54108ce07328Smrgelse $as_nop
541142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
541242a55b46Smrg/* end confdefs.h.  */
541342a55b46Smrgint i;
541442a55b46Smrg_ACEOF
54158ce07328Smrgif ac_fn_c_try_compile "$LINENO"
54168ce07328Smrgthen :
541742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
54188ce07328Smrgelse $as_nop
541942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
5420c582b7e3Smrgfi
54218ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
542242a55b46Smrgfi
54238ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
54248ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
542542a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
542642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
542742a55b46Smrgfi
542842a55b46Smrg
542942a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
543042a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
543142a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
543242a55b46Smrg	fi
543342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
54348ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
54358ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
54368ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
54378ce07328Smrgthen :
54388ce07328Smrg  printf %s "(cached) " >&6
54398ce07328Smrgelse $as_nop
544042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
544142a55b46Smrg/* end confdefs.h.  */
544242a55b46Smrgint i;
544342a55b46Smrg_ACEOF
54448ce07328Smrgif ac_fn_c_try_compile "$LINENO"
54458ce07328Smrgthen :
544642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
54478ce07328Smrgelse $as_nop
544842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
544942a55b46Smrgfi
54508ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
545142a55b46Smrgfi
54528ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
54538ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
545442a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
545542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
5456c582b7e3Smrgfi
5457c582b7e3Smrg
545842a55b46Smrgfound="no"
5459c582b7e3Smrg
546042a55b46Smrg	if test $found = "no" ; then
5461e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
546242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
546342a55b46Smrg		fi
546442a55b46Smrg
5465e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
546642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
546742a55b46Smrg		fi
546842a55b46Smrg
546942a55b46Smrg		CFLAGS="$CFLAGS -Wformat=2"
547042a55b46Smrg
54718ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5
54728ce07328Smrgprintf %s "checking if $CC supports -Wformat=2... " >&6; }
54730496e070Smrg		cacheid=xorg_cv_cc_flag__Wformat_2
54748ce07328Smrg		if eval test \${$cacheid+y}
54758ce07328Smrgthen :
54768ce07328Smrg  printf %s "(cached) " >&6
54778ce07328Smrgelse $as_nop
547842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
547942a55b46Smrg/* end confdefs.h.  */
548042a55b46Smrgint i;
548142a55b46Smrgint
54828ce07328Smrgmain (void)
548342a55b46Smrg{
548442a55b46Smrg
548542a55b46Smrg  ;
548642a55b46Smrg  return 0;
548742a55b46Smrg}
548842a55b46Smrg_ACEOF
54898ce07328Smrgif ac_fn_c_try_link "$LINENO"
54908ce07328Smrgthen :
549142a55b46Smrg  eval $cacheid=yes
54928ce07328Smrgelse $as_nop
549342a55b46Smrg  eval $cacheid=no
5494c582b7e3Smrgfi
54958ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
549642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
549742a55b46Smrgfi
549842a55b46Smrg
549942a55b46Smrg
550042a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
550142a55b46Smrg
550242a55b46Smrg		eval supported=\$$cacheid
55038ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
55048ce07328Smrgprintf "%s\n" "$supported" >&6; }
550542a55b46Smrg		if test "$supported" = "yes" ; then
550642a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wformat=2"
550742a55b46Smrg			found="yes"
550842a55b46Smrg		fi
550942a55b46Smrg	fi
551042a55b46Smrg
551142a55b46Smrg	if test $found = "no" ; then
5512e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
551342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
551442a55b46Smrg		fi
5515c582b7e3Smrg
5516e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
551742a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
551842a55b46Smrg		fi
551942a55b46Smrg
552042a55b46Smrg		CFLAGS="$CFLAGS -Wformat"
552142a55b46Smrg
55228ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5
55238ce07328Smrgprintf %s "checking if $CC supports -Wformat... " >&6; }
552442a55b46Smrg		cacheid=xorg_cv_cc_flag__Wformat
55258ce07328Smrg		if eval test \${$cacheid+y}
55268ce07328Smrgthen :
55278ce07328Smrg  printf %s "(cached) " >&6
55288ce07328Smrgelse $as_nop
552942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
553042a55b46Smrg/* end confdefs.h.  */
553142a55b46Smrgint i;
553242a55b46Smrgint
55338ce07328Smrgmain (void)
553442a55b46Smrg{
553542a55b46Smrg
553642a55b46Smrg  ;
553742a55b46Smrg  return 0;
553842a55b46Smrg}
553942a55b46Smrg_ACEOF
55408ce07328Smrgif ac_fn_c_try_link "$LINENO"
55418ce07328Smrgthen :
554242a55b46Smrg  eval $cacheid=yes
55438ce07328Smrgelse $as_nop
554442a55b46Smrg  eval $cacheid=no
5545c582b7e3Smrgfi
55468ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
554742a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
5548c582b7e3Smrgfi
5549c582b7e3Smrg
5550c582b7e3Smrg
555142a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
5552c582b7e3Smrg
555342a55b46Smrg		eval supported=\$$cacheid
55548ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
55558ce07328Smrgprintf "%s\n" "$supported" >&6; }
555642a55b46Smrg		if test "$supported" = "yes" ; then
555742a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wformat"
555842a55b46Smrg			found="yes"
555942a55b46Smrg		fi
556042a55b46Smrg	fi
5561c582b7e3Smrg
5562c582b7e3Smrg
5563c582b7e3Smrg
5564c582b7e3Smrg
5565c582b7e3Smrg
5566c582b7e3Smrg
5567c582b7e3Smrg
5568c582b7e3Smrg
5569c582b7e3Smrg
5570c582b7e3Smrg
5571c582b7e3Smrg
5572c582b7e3Smrg
5573c582b7e3Smrg
5574c582b7e3Smrg
5575c582b7e3Smrg
5576c582b7e3Smrg
5577c582b7e3Smrg
557842a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
557942a55b46Smrg
558042a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
558142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
55828ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
55838ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
55848ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
55858ce07328Smrgthen :
55868ce07328Smrg  printf %s "(cached) " >&6
55878ce07328Smrgelse $as_nop
558842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
558942a55b46Smrg/* end confdefs.h.  */
559042a55b46Smrgint i;
559142a55b46Smrg_ACEOF
55928ce07328Smrgif ac_fn_c_try_compile "$LINENO"
55938ce07328Smrgthen :
559442a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
55958ce07328Smrgelse $as_nop
559642a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
559742a55b46Smrgfi
55988ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
559942a55b46Smrgfi
56008ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
56018ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
560242a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
560342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
560442a55b46Smrgfi
560542a55b46Smrg
560642a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
560742a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
560842a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
560942a55b46Smrg	fi
561042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
56118ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
56128ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
56138ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
56148ce07328Smrgthen :
56158ce07328Smrg  printf %s "(cached) " >&6
56168ce07328Smrgelse $as_nop
561742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
561842a55b46Smrg/* end confdefs.h.  */
561942a55b46Smrgint i;
562042a55b46Smrg_ACEOF
56218ce07328Smrgif ac_fn_c_try_compile "$LINENO"
56228ce07328Smrgthen :
562342a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
56248ce07328Smrgelse $as_nop
562542a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
562642a55b46Smrgfi
56278ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
562842a55b46Smrgfi
56298ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
56308ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
563142a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
563242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
563342a55b46Smrgfi
563442a55b46Smrg
563542a55b46Smrgfound="no"
563642a55b46Smrg
563742a55b46Smrg	if test $found = "no" ; then
5638e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
563942a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
564042a55b46Smrg		fi
564142a55b46Smrg
5642e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
564342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
564442a55b46Smrg		fi
564542a55b46Smrg
564642a55b46Smrg		CFLAGS="$CFLAGS -Wstrict-prototypes"
564742a55b46Smrg
56488ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5
56498ce07328Smrgprintf %s "checking if $CC supports -Wstrict-prototypes... " >&6; }
565042a55b46Smrg		cacheid=xorg_cv_cc_flag__Wstrict_prototypes
56518ce07328Smrg		if eval test \${$cacheid+y}
56528ce07328Smrgthen :
56538ce07328Smrg  printf %s "(cached) " >&6
56548ce07328Smrgelse $as_nop
565542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
565642a55b46Smrg/* end confdefs.h.  */
565742a55b46Smrgint i;
565842a55b46Smrgint
56598ce07328Smrgmain (void)
566042a55b46Smrg{
566142a55b46Smrg
566242a55b46Smrg  ;
566342a55b46Smrg  return 0;
566442a55b46Smrg}
566542a55b46Smrg_ACEOF
56668ce07328Smrgif ac_fn_c_try_link "$LINENO"
56678ce07328Smrgthen :
566842a55b46Smrg  eval $cacheid=yes
56698ce07328Smrgelse $as_nop
567042a55b46Smrg  eval $cacheid=no
567142a55b46Smrgfi
56728ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
567342a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
567442a55b46Smrgfi
567542a55b46Smrg
567642a55b46Smrg
567742a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
567842a55b46Smrg
567942a55b46Smrg		eval supported=\$$cacheid
56808ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
56818ce07328Smrgprintf "%s\n" "$supported" >&6; }
568242a55b46Smrg		if test "$supported" = "yes" ; then
568342a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes"
568442a55b46Smrg			found="yes"
568542a55b46Smrg		fi
568642a55b46Smrg	fi
5687c582b7e3Smrg
5688c582b7e3Smrg
5689c582b7e3Smrg
5690c582b7e3Smrg
5691c582b7e3Smrg
5692c582b7e3Smrg
5693c582b7e3Smrg
5694c582b7e3Smrg
5695c582b7e3Smrg
5696c582b7e3Smrg
5697c582b7e3Smrg
5698c582b7e3Smrg
5699c582b7e3Smrg
5700c582b7e3Smrg
5701c582b7e3Smrg
570242a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
5703c582b7e3Smrg
570442a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
570542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
57068ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
57078ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
57088ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
57098ce07328Smrgthen :
57108ce07328Smrg  printf %s "(cached) " >&6
57118ce07328Smrgelse $as_nop
571242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
571342a55b46Smrg/* end confdefs.h.  */
571442a55b46Smrgint i;
5715c582b7e3Smrg_ACEOF
57168ce07328Smrgif ac_fn_c_try_compile "$LINENO"
57178ce07328Smrgthen :
571842a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
57198ce07328Smrgelse $as_nop
572042a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
572142a55b46Smrgfi
57228ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
572342a55b46Smrgfi
57248ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
57258ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
572642a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
572742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
572842a55b46Smrgfi
572942a55b46Smrg
573042a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
573142a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
573242a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
573342a55b46Smrg	fi
573442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
57358ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
57368ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
57378ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
57388ce07328Smrgthen :
57398ce07328Smrg  printf %s "(cached) " >&6
57408ce07328Smrgelse $as_nop
574142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5742c582b7e3Smrg/* end confdefs.h.  */
574342a55b46Smrgint i;
574442a55b46Smrg_ACEOF
57458ce07328Smrgif ac_fn_c_try_compile "$LINENO"
57468ce07328Smrgthen :
574742a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
57488ce07328Smrgelse $as_nop
574942a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
575042a55b46Smrgfi
57518ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
575242a55b46Smrgfi
57538ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
57548ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
575542a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
575642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
575742a55b46Smrgfi
575842a55b46Smrg
575942a55b46Smrgfound="no"
576042a55b46Smrg
576142a55b46Smrg	if test $found = "no" ; then
5762e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
576342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
576442a55b46Smrg		fi
576542a55b46Smrg
5766e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
576742a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
576842a55b46Smrg		fi
5769c582b7e3Smrg
577042a55b46Smrg		CFLAGS="$CFLAGS -Wmissing-prototypes"
577142a55b46Smrg
57728ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5
57738ce07328Smrgprintf %s "checking if $CC supports -Wmissing-prototypes... " >&6; }
577442a55b46Smrg		cacheid=xorg_cv_cc_flag__Wmissing_prototypes
57758ce07328Smrg		if eval test \${$cacheid+y}
57768ce07328Smrgthen :
57778ce07328Smrg  printf %s "(cached) " >&6
57788ce07328Smrgelse $as_nop
577942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
578042a55b46Smrg/* end confdefs.h.  */
578142a55b46Smrgint i;
5782c582b7e3Smrgint
57838ce07328Smrgmain (void)
5784c582b7e3Smrg{
5785c582b7e3Smrg
5786c582b7e3Smrg  ;
5787c582b7e3Smrg  return 0;
5788c582b7e3Smrg}
5789c582b7e3Smrg_ACEOF
57908ce07328Smrgif ac_fn_c_try_link "$LINENO"
57918ce07328Smrgthen :
579242a55b46Smrg  eval $cacheid=yes
57938ce07328Smrgelse $as_nop
579442a55b46Smrg  eval $cacheid=no
579542a55b46Smrgfi
57968ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
579742a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
5798c582b7e3Smrgfi
5799c582b7e3Smrg
5800c582b7e3Smrg
580142a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
580242a55b46Smrg
580342a55b46Smrg		eval supported=\$$cacheid
58048ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
58058ce07328Smrgprintf "%s\n" "$supported" >&6; }
580642a55b46Smrg		if test "$supported" = "yes" ; then
580742a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes"
580842a55b46Smrg			found="yes"
580942a55b46Smrg		fi
581019019ffeSmrg	fi
5811c582b7e3Smrg
5812c582b7e3Smrg
5813c582b7e3Smrg
5814c582b7e3Smrg
5815c582b7e3Smrg
581642a55b46Smrg
581742a55b46Smrg
581842a55b46Smrg
581942a55b46Smrg
582042a55b46Smrg
582142a55b46Smrg
582242a55b46Smrg
582342a55b46Smrg
582442a55b46Smrg
582542a55b46Smrg
582642a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
582742a55b46Smrg
582842a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
582942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
58308ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
58318ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
58328ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
58338ce07328Smrgthen :
58348ce07328Smrg  printf %s "(cached) " >&6
58358ce07328Smrgelse $as_nop
583642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5837c582b7e3Smrg/* end confdefs.h.  */
583842a55b46Smrgint i;
5839c582b7e3Smrg_ACEOF
58408ce07328Smrgif ac_fn_c_try_compile "$LINENO"
58418ce07328Smrgthen :
584242a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
58438ce07328Smrgelse $as_nop
584442a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
584542a55b46Smrgfi
58468ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
584742a55b46Smrgfi
58488ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
58498ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
585042a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
585142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
5852c582b7e3Smrgfi
5853c582b7e3Smrg
585442a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
585542a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
585642a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
585742a55b46Smrg	fi
585842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
58598ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
58608ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
58618ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
58628ce07328Smrgthen :
58638ce07328Smrg  printf %s "(cached) " >&6
58648ce07328Smrgelse $as_nop
586542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5866c582b7e3Smrg/* end confdefs.h.  */
586742a55b46Smrgint i;
5868c582b7e3Smrg_ACEOF
58698ce07328Smrgif ac_fn_c_try_compile "$LINENO"
58708ce07328Smrgthen :
587142a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
58728ce07328Smrgelse $as_nop
587342a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
587442a55b46Smrgfi
58758ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
587642a55b46Smrgfi
58778ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
58788ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
587942a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
588042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
5881c582b7e3Smrgfi
5882c582b7e3Smrg
588342a55b46Smrgfound="no"
5884c582b7e3Smrg
588542a55b46Smrg	if test $found = "no" ; then
5886e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
588742a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
588842a55b46Smrg		fi
5889c582b7e3Smrg
5890e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
589142a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
589242a55b46Smrg		fi
5893c582b7e3Smrg
589442a55b46Smrg		CFLAGS="$CFLAGS -Wnested-externs"
589542a55b46Smrg
58968ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5
58978ce07328Smrgprintf %s "checking if $CC supports -Wnested-externs... " >&6; }
589842a55b46Smrg		cacheid=xorg_cv_cc_flag__Wnested_externs
58998ce07328Smrg		if eval test \${$cacheid+y}
59008ce07328Smrgthen :
59018ce07328Smrg  printf %s "(cached) " >&6
59028ce07328Smrgelse $as_nop
590342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904c582b7e3Smrg/* end confdefs.h.  */
590542a55b46Smrgint i;
590642a55b46Smrgint
59078ce07328Smrgmain (void)
590842a55b46Smrg{
590942a55b46Smrg
591042a55b46Smrg  ;
591142a55b46Smrg  return 0;
591242a55b46Smrg}
5913c582b7e3Smrg_ACEOF
59148ce07328Smrgif ac_fn_c_try_link "$LINENO"
59158ce07328Smrgthen :
591642a55b46Smrg  eval $cacheid=yes
59178ce07328Smrgelse $as_nop
591842a55b46Smrg  eval $cacheid=no
591942a55b46Smrgfi
59208ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
592142a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
5922c582b7e3Smrgfi
5923c582b7e3Smrg
5924c582b7e3Smrg
592542a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
592642a55b46Smrg
592742a55b46Smrg		eval supported=\$$cacheid
59288ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
59298ce07328Smrgprintf "%s\n" "$supported" >&6; }
593042a55b46Smrg		if test "$supported" = "yes" ; then
593142a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs"
593242a55b46Smrg			found="yes"
593342a55b46Smrg		fi
593442a55b46Smrg	fi
593542a55b46Smrg
593642a55b46Smrg
593742a55b46Smrg
593842a55b46Smrg
593942a55b46Smrg
594042a55b46Smrg
594142a55b46Smrg
594242a55b46Smrg
594342a55b46Smrg
594442a55b46Smrg
594542a55b46Smrg
594642a55b46Smrg
594742a55b46Smrg
594842a55b46Smrg
594942a55b46Smrg
595042a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
595142a55b46Smrg
595242a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
595342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
59548ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
59558ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
59568ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
59578ce07328Smrgthen :
59588ce07328Smrg  printf %s "(cached) " >&6
59598ce07328Smrgelse $as_nop
596042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5961c582b7e3Smrg/* end confdefs.h.  */
596242a55b46Smrgint i;
5963c582b7e3Smrg_ACEOF
59648ce07328Smrgif ac_fn_c_try_compile "$LINENO"
59658ce07328Smrgthen :
596642a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
59678ce07328Smrgelse $as_nop
596842a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
596942a55b46Smrgfi
59708ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
597142a55b46Smrgfi
59728ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
59738ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
597442a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
597542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
5976c582b7e3Smrgfi
5977c582b7e3Smrg
597842a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
597942a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
598042a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
598142a55b46Smrg	fi
598242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
59838ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
59848ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
59858ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
59868ce07328Smrgthen :
59878ce07328Smrg  printf %s "(cached) " >&6
59888ce07328Smrgelse $as_nop
598942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
599042a55b46Smrg/* end confdefs.h.  */
599142a55b46Smrgint i;
599242a55b46Smrg_ACEOF
59938ce07328Smrgif ac_fn_c_try_compile "$LINENO"
59948ce07328Smrgthen :
599542a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
59968ce07328Smrgelse $as_nop
599742a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
599842a55b46Smrgfi
59998ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
600042a55b46Smrgfi
60018ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
60028ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
600342a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
600442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
6005c582b7e3Smrgfi
6006c582b7e3Smrg
600742a55b46Smrgfound="no"
6008c582b7e3Smrg
600942a55b46Smrg	if test $found = "no" ; then
6010e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
601142a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
601242a55b46Smrg		fi
6013c582b7e3Smrg
6014e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
601542a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
601642a55b46Smrg		fi
601742a55b46Smrg
601842a55b46Smrg		CFLAGS="$CFLAGS -Wbad-function-cast"
601942a55b46Smrg
60208ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5
60218ce07328Smrgprintf %s "checking if $CC supports -Wbad-function-cast... " >&6; }
602242a55b46Smrg		cacheid=xorg_cv_cc_flag__Wbad_function_cast
60238ce07328Smrg		if eval test \${$cacheid+y}
60248ce07328Smrgthen :
60258ce07328Smrg  printf %s "(cached) " >&6
60268ce07328Smrgelse $as_nop
602742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6028c582b7e3Smrg/* end confdefs.h.  */
602942a55b46Smrgint i;
6030c582b7e3Smrgint
60318ce07328Smrgmain (void)
6032c582b7e3Smrg{
6033c582b7e3Smrg
6034c582b7e3Smrg  ;
6035c582b7e3Smrg  return 0;
6036c582b7e3Smrg}
6037c582b7e3Smrg_ACEOF
60388ce07328Smrgif ac_fn_c_try_link "$LINENO"
60398ce07328Smrgthen :
604042a55b46Smrg  eval $cacheid=yes
60418ce07328Smrgelse $as_nop
604242a55b46Smrg  eval $cacheid=no
604342a55b46Smrgfi
60448ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
604542a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
6046c582b7e3Smrgfi
6047c582b7e3Smrg
6048c582b7e3Smrg
604942a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
605042a55b46Smrg
605142a55b46Smrg		eval supported=\$$cacheid
60528ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
60538ce07328Smrgprintf "%s\n" "$supported" >&6; }
605442a55b46Smrg		if test "$supported" = "yes" ; then
605542a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast"
605642a55b46Smrg			found="yes"
605742a55b46Smrg		fi
605842a55b46Smrg	fi
605942a55b46Smrg
606042a55b46Smrg
606142a55b46Smrg
606242a55b46Smrg
606342a55b46Smrg
606442a55b46Smrg
6065c582b7e3Smrg
606642a55b46Smrg
606742a55b46Smrg
606842a55b46Smrg
606942a55b46Smrg
607042a55b46Smrg
607142a55b46Smrg
607242a55b46Smrg
607342a55b46Smrg
607442a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
607542a55b46Smrg
607642a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
607742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
60788ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
60798ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
60808ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
60818ce07328Smrgthen :
60828ce07328Smrg  printf %s "(cached) " >&6
60838ce07328Smrgelse $as_nop
608442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
608542a55b46Smrg/* end confdefs.h.  */
608642a55b46Smrgint i;
6087c582b7e3Smrg_ACEOF
60888ce07328Smrgif ac_fn_c_try_compile "$LINENO"
60898ce07328Smrgthen :
609042a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
60918ce07328Smrgelse $as_nop
609242a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
6093c582b7e3Smrgfi
60948ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
609542a55b46Smrgfi
60968ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
60978ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
609842a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
609942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
6100c582b7e3Smrgfi
6101c582b7e3Smrg
610242a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
610342a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
610442a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
610542a55b46Smrg	fi
610642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
61078ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
61088ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
61098ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
61108ce07328Smrgthen :
61118ce07328Smrg  printf %s "(cached) " >&6
61128ce07328Smrgelse $as_nop
611342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6114c582b7e3Smrg/* end confdefs.h.  */
611542a55b46Smrgint i;
6116c582b7e3Smrg_ACEOF
61178ce07328Smrgif ac_fn_c_try_compile "$LINENO"
61188ce07328Smrgthen :
611942a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
61208ce07328Smrgelse $as_nop
612142a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
612242a55b46Smrgfi
61238ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6124c582b7e3Smrgfi
61258ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
61268ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
612742a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
612842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
6129c582b7e3Smrgfi
6130c582b7e3Smrg
613142a55b46Smrgfound="no"
613242a55b46Smrg
613342a55b46Smrg	if test $found = "no" ; then
6134e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
613542a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
613642a55b46Smrg		fi
613742a55b46Smrg
6138e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
613942a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
614042a55b46Smrg		fi
614142a55b46Smrg
614242a55b46Smrg		CFLAGS="$CFLAGS -Wold-style-definition"
614342a55b46Smrg
61448ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5
61458ce07328Smrgprintf %s "checking if $CC supports -Wold-style-definition... " >&6; }
614642a55b46Smrg		cacheid=xorg_cv_cc_flag__Wold_style_definition
61478ce07328Smrg		if eval test \${$cacheid+y}
61488ce07328Smrgthen :
61498ce07328Smrg  printf %s "(cached) " >&6
61508ce07328Smrgelse $as_nop
615142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6152c582b7e3Smrg/* end confdefs.h.  */
615342a55b46Smrgint i;
6154c582b7e3Smrgint
61558ce07328Smrgmain (void)
6156c582b7e3Smrg{
615742a55b46Smrg
615842a55b46Smrg  ;
6159c582b7e3Smrg  return 0;
6160c582b7e3Smrg}
6161c582b7e3Smrg_ACEOF
61628ce07328Smrgif ac_fn_c_try_link "$LINENO"
61638ce07328Smrgthen :
616442a55b46Smrg  eval $cacheid=yes
61658ce07328Smrgelse $as_nop
616642a55b46Smrg  eval $cacheid=no
6167c582b7e3Smrgfi
61688ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
616942a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
6170c582b7e3Smrgfi
6171c582b7e3Smrg
6172c582b7e3Smrg
617342a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
6174c582b7e3Smrg
617542a55b46Smrg		eval supported=\$$cacheid
61768ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
61778ce07328Smrgprintf "%s\n" "$supported" >&6; }
617842a55b46Smrg		if test "$supported" = "yes" ; then
617942a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition"
618042a55b46Smrg			found="yes"
618142a55b46Smrg		fi
618242a55b46Smrg	fi
6183c582b7e3Smrg
6184e3d74329Smrg	if test $found = "no" ; then
6185e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
6186e3d74329Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
6187e3d74329Smrg		fi
6188e3d74329Smrg
6189e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
6190e3d74329Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
6191e3d74329Smrg		fi
6192e3d74329Smrg
6193e3d74329Smrg		CFLAGS="$CFLAGS -fd"
6194e3d74329Smrg
61958ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5
61968ce07328Smrgprintf %s "checking if $CC supports -fd... " >&6; }
6197e3d74329Smrg		cacheid=xorg_cv_cc_flag__fd
61988ce07328Smrg		if eval test \${$cacheid+y}
61998ce07328Smrgthen :
62008ce07328Smrg  printf %s "(cached) " >&6
62018ce07328Smrgelse $as_nop
6202e3d74329Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6203e3d74329Smrg/* end confdefs.h.  */
6204e3d74329Smrgint i;
6205e3d74329Smrgint
62068ce07328Smrgmain (void)
6207e3d74329Smrg{
6208e3d74329Smrg
6209e3d74329Smrg  ;
6210e3d74329Smrg  return 0;
6211e3d74329Smrg}
6212e3d74329Smrg_ACEOF
62138ce07328Smrgif ac_fn_c_try_link "$LINENO"
62148ce07328Smrgthen :
6215e3d74329Smrg  eval $cacheid=yes
62168ce07328Smrgelse $as_nop
6217e3d74329Smrg  eval $cacheid=no
6218e3d74329Smrgfi
62198ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
6220e3d74329Smrg    conftest$ac_exeext conftest.$ac_ext
6221e3d74329Smrgfi
6222e3d74329Smrg
6223e3d74329Smrg
6224e3d74329Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
6225e3d74329Smrg
6226e3d74329Smrg		eval supported=\$$cacheid
62278ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
62288ce07328Smrgprintf "%s\n" "$supported" >&6; }
6229e3d74329Smrg		if test "$supported" = "yes" ; then
6230e3d74329Smrg			BASE_CFLAGS="$BASE_CFLAGS -fd"
6231e3d74329Smrg			found="yes"
6232e3d74329Smrg		fi
6233e3d74329Smrg	fi
6234e3d74329Smrg
6235c582b7e3Smrg
6236c582b7e3Smrg
6237c582b7e3Smrg
6238c582b7e3Smrg
6239c582b7e3Smrg
6240c582b7e3Smrg
6241c582b7e3Smrg
6242c582b7e3Smrg
6243c582b7e3Smrg
6244c582b7e3Smrg
624542a55b46Smrg
624642a55b46Smrg
624742a55b46Smrg
624842a55b46Smrg
624942a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
625042a55b46Smrg
625142a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
625242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
62538ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
62548ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
62558ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
62568ce07328Smrgthen :
62578ce07328Smrg  printf %s "(cached) " >&6
62588ce07328Smrgelse $as_nop
625942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6260c582b7e3Smrg/* end confdefs.h.  */
626142a55b46Smrgint i;
6262c582b7e3Smrg_ACEOF
62638ce07328Smrgif ac_fn_c_try_compile "$LINENO"
62648ce07328Smrgthen :
626542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
62668ce07328Smrgelse $as_nop
626742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
6268c582b7e3Smrgfi
62698ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6270c582b7e3Smrgfi
62718ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
62728ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
627342a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
627442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
627542a55b46Smrgfi
6276c582b7e3Smrg
627742a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
627842a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
627942a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
628042a55b46Smrg	fi
628142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
62828ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
62838ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
62848ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
62858ce07328Smrgthen :
62868ce07328Smrg  printf %s "(cached) " >&6
62878ce07328Smrgelse $as_nop
628842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
628942a55b46Smrg/* end confdefs.h.  */
629042a55b46Smrgint i;
629142a55b46Smrg_ACEOF
62928ce07328Smrgif ac_fn_c_try_compile "$LINENO"
62938ce07328Smrgthen :
629442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
62958ce07328Smrgelse $as_nop
629642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
629742a55b46Smrgfi
62988ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
629942a55b46Smrgfi
63008ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
63018ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
630242a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
630342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
6304c582b7e3Smrgfi
6305c582b7e3Smrg
630642a55b46Smrgfound="no"
6307c582b7e3Smrg
630842a55b46Smrg	if test $found = "no" ; then
6309e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
631042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
631142a55b46Smrg		fi
6312c582b7e3Smrg
6313e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
631442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
631542a55b46Smrg		fi
6316c582b7e3Smrg
631742a55b46Smrg		CFLAGS="$CFLAGS -Wdeclaration-after-statement"
631842a55b46Smrg
63198ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5
63208ce07328Smrgprintf %s "checking if $CC supports -Wdeclaration-after-statement... " >&6; }
632142a55b46Smrg		cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement
63228ce07328Smrg		if eval test \${$cacheid+y}
63238ce07328Smrgthen :
63248ce07328Smrg  printf %s "(cached) " >&6
63258ce07328Smrgelse $as_nop
632642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327c582b7e3Smrg/* end confdefs.h.  */
632842a55b46Smrgint i;
632942a55b46Smrgint
63308ce07328Smrgmain (void)
633142a55b46Smrg{
633242a55b46Smrg
633342a55b46Smrg  ;
633442a55b46Smrg  return 0;
633542a55b46Smrg}
6336c582b7e3Smrg_ACEOF
63378ce07328Smrgif ac_fn_c_try_link "$LINENO"
63388ce07328Smrgthen :
633942a55b46Smrg  eval $cacheid=yes
63408ce07328Smrgelse $as_nop
634142a55b46Smrg  eval $cacheid=no
634242a55b46Smrgfi
63438ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
634442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
6345c582b7e3Smrgfi
6346c582b7e3Smrg
6347c582b7e3Smrg
634842a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
6349c582b7e3Smrg
635042a55b46Smrg		eval supported=\$$cacheid
63518ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
63528ce07328Smrgprintf "%s\n" "$supported" >&6; }
635342a55b46Smrg		if test "$supported" = "yes" ; then
635442a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement"
635542a55b46Smrg			found="yes"
635642a55b46Smrg		fi
635742a55b46Smrg	fi
6358c582b7e3Smrg
6359c582b7e3Smrg
6360c582b7e3Smrg
6361c582b7e3Smrg
6362c582b7e3Smrg
636342a55b46Smrg# This chunk adds additional warnings that could catch undesired effects.
6364c582b7e3Smrg
6365c582b7e3Smrg
6366c582b7e3Smrg
6367c582b7e3Smrg
636842a55b46Smrg
636942a55b46Smrg
637042a55b46Smrg
637142a55b46Smrg
637242a55b46Smrg
637342a55b46Smrg
637442a55b46Smrg
637542a55b46Smrg
637642a55b46Smrg
637742a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
637842a55b46Smrg
637942a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
638042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
63818ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
63828ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
63838ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
63848ce07328Smrgthen :
63858ce07328Smrg  printf %s "(cached) " >&6
63868ce07328Smrgelse $as_nop
638742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
638842a55b46Smrg/* end confdefs.h.  */
638942a55b46Smrgint i;
639042a55b46Smrg_ACEOF
63918ce07328Smrgif ac_fn_c_try_compile "$LINENO"
63928ce07328Smrgthen :
639342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
63948ce07328Smrgelse $as_nop
639542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
6396c582b7e3Smrgfi
63978ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6398c582b7e3Smrgfi
63998ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
64008ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
640142a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
640242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
6403c582b7e3Smrgfi
6404c582b7e3Smrg
640542a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
640642a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
640742a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
640842a55b46Smrg	fi
640942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
64108ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
64118ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
64128ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
64138ce07328Smrgthen :
64148ce07328Smrg  printf %s "(cached) " >&6
64158ce07328Smrgelse $as_nop
641642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
641742a55b46Smrg/* end confdefs.h.  */
641842a55b46Smrgint i;
641942a55b46Smrg_ACEOF
64208ce07328Smrgif ac_fn_c_try_compile "$LINENO"
64218ce07328Smrgthen :
642242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
64238ce07328Smrgelse $as_nop
642442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
6425c582b7e3Smrgfi
64268ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6427c582b7e3Smrgfi
64288ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
64298ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
643042a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
643142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
643242a55b46Smrgfi
643342a55b46Smrg
643442a55b46Smrgfound="no"
643542a55b46Smrg
643642a55b46Smrg	if test $found = "no" ; then
6437e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
643842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
643942a55b46Smrg		fi
644042a55b46Smrg
6441e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
644242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
644342a55b46Smrg		fi
6444c582b7e3Smrg
644542a55b46Smrg		CFLAGS="$CFLAGS -Wunused"
644642a55b46Smrg
64478ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5
64488ce07328Smrgprintf %s "checking if $CC supports -Wunused... " >&6; }
644942a55b46Smrg		cacheid=xorg_cv_cc_flag__Wunused
64508ce07328Smrg		if eval test \${$cacheid+y}
64518ce07328Smrgthen :
64528ce07328Smrg  printf %s "(cached) " >&6
64538ce07328Smrgelse $as_nop
645442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6455c582b7e3Smrg/* end confdefs.h.  */
645642a55b46Smrgint i;
6457c582b7e3Smrgint
64588ce07328Smrgmain (void)
6459c582b7e3Smrg{
6460c582b7e3Smrg
6461c582b7e3Smrg  ;
6462c582b7e3Smrg  return 0;
6463c582b7e3Smrg}
6464c582b7e3Smrg_ACEOF
64658ce07328Smrgif ac_fn_c_try_link "$LINENO"
64668ce07328Smrgthen :
646742a55b46Smrg  eval $cacheid=yes
64688ce07328Smrgelse $as_nop
646942a55b46Smrg  eval $cacheid=no
647042a55b46Smrgfi
64718ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
647242a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
6473c582b7e3Smrgfi
6474c582b7e3Smrg
6475c582b7e3Smrg
647642a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
647742a55b46Smrg
647842a55b46Smrg		eval supported=\$$cacheid
64798ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
64808ce07328Smrgprintf "%s\n" "$supported" >&6; }
648142a55b46Smrg		if test "$supported" = "yes" ; then
648242a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wunused"
648342a55b46Smrg			found="yes"
648442a55b46Smrg		fi
648542a55b46Smrg	fi
648642a55b46Smrg
648742a55b46Smrg
648842a55b46Smrg
648942a55b46Smrg
649042a55b46Smrg
649142a55b46Smrg
649242a55b46Smrg
649342a55b46Smrg
649442a55b46Smrg
649542a55b46Smrg
649642a55b46Smrg
649742a55b46Smrg
649842a55b46Smrg
649942a55b46Smrg
650042a55b46Smrg
650142a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
650242a55b46Smrg
650342a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
650442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
65058ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
65068ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
65078ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
65088ce07328Smrgthen :
65098ce07328Smrg  printf %s "(cached) " >&6
65108ce07328Smrgelse $as_nop
651142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
651242a55b46Smrg/* end confdefs.h.  */
651342a55b46Smrgint i;
651442a55b46Smrg_ACEOF
65158ce07328Smrgif ac_fn_c_try_compile "$LINENO"
65168ce07328Smrgthen :
651742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
65188ce07328Smrgelse $as_nop
651942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
652042a55b46Smrgfi
65218ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
652242a55b46Smrgfi
65238ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
65248ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
652542a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
652642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
652719019ffeSmrgfi
652842a55b46Smrg
652942a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
653042a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
653142a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
653242a55b46Smrg	fi
653342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
65348ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
65358ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
65368ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
65378ce07328Smrgthen :
65388ce07328Smrg  printf %s "(cached) " >&6
65398ce07328Smrgelse $as_nop
654042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6541c582b7e3Smrg/* end confdefs.h.  */
654242a55b46Smrgint i;
654342a55b46Smrg_ACEOF
65448ce07328Smrgif ac_fn_c_try_compile "$LINENO"
65458ce07328Smrgthen :
654642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
65478ce07328Smrgelse $as_nop
654842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
654942a55b46Smrgfi
65508ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
655142a55b46Smrgfi
65528ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
65538ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
655442a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
655542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
655642a55b46Smrgfi
655742a55b46Smrg
655842a55b46Smrgfound="no"
6559c582b7e3Smrg
656042a55b46Smrg	if test $found = "no" ; then
6561e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
656242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
656342a55b46Smrg		fi
656442a55b46Smrg
6565e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
656642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
656742a55b46Smrg		fi
656842a55b46Smrg
656942a55b46Smrg		CFLAGS="$CFLAGS -Wuninitialized"
657042a55b46Smrg
65718ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
65728ce07328Smrgprintf %s "checking if $CC supports -Wuninitialized... " >&6; }
657342a55b46Smrg		cacheid=xorg_cv_cc_flag__Wuninitialized
65748ce07328Smrg		if eval test \${$cacheid+y}
65758ce07328Smrgthen :
65768ce07328Smrg  printf %s "(cached) " >&6
65778ce07328Smrgelse $as_nop
657842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
657942a55b46Smrg/* end confdefs.h.  */
658042a55b46Smrgint i;
6581c582b7e3Smrgint
65828ce07328Smrgmain (void)
6583c582b7e3Smrg{
6584c582b7e3Smrg
6585c582b7e3Smrg  ;
6586c582b7e3Smrg  return 0;
6587c582b7e3Smrg}
6588c582b7e3Smrg_ACEOF
65898ce07328Smrgif ac_fn_c_try_link "$LINENO"
65908ce07328Smrgthen :
659142a55b46Smrg  eval $cacheid=yes
65928ce07328Smrgelse $as_nop
659342a55b46Smrg  eval $cacheid=no
659442a55b46Smrgfi
65958ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
659642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
659742a55b46Smrgfi
6598c582b7e3Smrg
6599c582b7e3Smrg
660042a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
6601c582b7e3Smrg
660242a55b46Smrg		eval supported=\$$cacheid
66038ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
66048ce07328Smrgprintf "%s\n" "$supported" >&6; }
660542a55b46Smrg		if test "$supported" = "yes" ; then
660642a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized"
660742a55b46Smrg			found="yes"
660842a55b46Smrg		fi
660942a55b46Smrg	fi
661042a55b46Smrg
661142a55b46Smrg
661242a55b46Smrg
661342a55b46Smrg
661442a55b46Smrg
661542a55b46Smrg
661642a55b46Smrg
661742a55b46Smrg
661842a55b46Smrg
661942a55b46Smrg
662042a55b46Smrg
662142a55b46Smrg
662242a55b46Smrg
662342a55b46Smrg
662442a55b46Smrg
662542a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
662642a55b46Smrg
662742a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
662842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
66298ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
66308ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
66318ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
66328ce07328Smrgthen :
66338ce07328Smrg  printf %s "(cached) " >&6
66348ce07328Smrgelse $as_nop
663542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
663642a55b46Smrg/* end confdefs.h.  */
663742a55b46Smrgint i;
6638c582b7e3Smrg_ACEOF
66398ce07328Smrgif ac_fn_c_try_compile "$LINENO"
66408ce07328Smrgthen :
664142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
66428ce07328Smrgelse $as_nop
664342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
664442a55b46Smrgfi
66458ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
664642a55b46Smrgfi
66478ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
66488ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
664942a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
665042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
665142a55b46Smrgfi
6652c582b7e3Smrg
665342a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
665442a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
665542a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
665642a55b46Smrg	fi
665742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
66588ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
66598ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
66608ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
66618ce07328Smrgthen :
66628ce07328Smrg  printf %s "(cached) " >&6
66638ce07328Smrgelse $as_nop
666442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6665c582b7e3Smrg/* end confdefs.h.  */
666642a55b46Smrgint i;
666742a55b46Smrg_ACEOF
66688ce07328Smrgif ac_fn_c_try_compile "$LINENO"
66698ce07328Smrgthen :
667042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
66718ce07328Smrgelse $as_nop
667242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
667342a55b46Smrgfi
66748ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
667542a55b46Smrgfi
66768ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
66778ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
667842a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
667942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
668042a55b46Smrgfi
668142a55b46Smrg
668242a55b46Smrgfound="no"
668342a55b46Smrg
668442a55b46Smrg	if test $found = "no" ; then
6685e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
668642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
668742a55b46Smrg		fi
668842a55b46Smrg
6689e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
669042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
669142a55b46Smrg		fi
6692c582b7e3Smrg
669342a55b46Smrg		CFLAGS="$CFLAGS -Wshadow"
669442a55b46Smrg
66958ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5
66968ce07328Smrgprintf %s "checking if $CC supports -Wshadow... " >&6; }
669742a55b46Smrg		cacheid=xorg_cv_cc_flag__Wshadow
66988ce07328Smrg		if eval test \${$cacheid+y}
66998ce07328Smrgthen :
67008ce07328Smrg  printf %s "(cached) " >&6
67018ce07328Smrgelse $as_nop
670242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
670342a55b46Smrg/* end confdefs.h.  */
670442a55b46Smrgint i;
6705c582b7e3Smrgint
67068ce07328Smrgmain (void)
6707c582b7e3Smrg{
6708c582b7e3Smrg
6709c582b7e3Smrg  ;
6710c582b7e3Smrg  return 0;
6711c582b7e3Smrg}
6712c582b7e3Smrg_ACEOF
67138ce07328Smrgif ac_fn_c_try_link "$LINENO"
67148ce07328Smrgthen :
671542a55b46Smrg  eval $cacheid=yes
67168ce07328Smrgelse $as_nop
671742a55b46Smrg  eval $cacheid=no
6718c582b7e3Smrgfi
67198ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
672042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
6721c582b7e3Smrgfi
6722c582b7e3Smrg
6723c582b7e3Smrg
672442a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
672519019ffeSmrg
672642a55b46Smrg		eval supported=\$$cacheid
67278ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
67288ce07328Smrgprintf "%s\n" "$supported" >&6; }
672942a55b46Smrg		if test "$supported" = "yes" ; then
673042a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wshadow"
673142a55b46Smrg			found="yes"
673242a55b46Smrg		fi
673342a55b46Smrg	fi
6734c582b7e3Smrg
6735c582b7e3Smrg
673642a55b46Smrg
673742a55b46Smrg
673842a55b46Smrg
673942a55b46Smrg
674042a55b46Smrg
674142a55b46Smrg
674242a55b46Smrg
674342a55b46Smrg
674442a55b46Smrg
674542a55b46Smrg
674642a55b46Smrg
674742a55b46Smrg
674842a55b46Smrg
674942a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
675042a55b46Smrg
675142a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
675242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
67538ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
67548ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
67558ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
67568ce07328Smrgthen :
67578ce07328Smrg  printf %s "(cached) " >&6
67588ce07328Smrgelse $as_nop
675942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
676042a55b46Smrg/* end confdefs.h.  */
676142a55b46Smrgint i;
676242a55b46Smrg_ACEOF
67638ce07328Smrgif ac_fn_c_try_compile "$LINENO"
67648ce07328Smrgthen :
676542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
67668ce07328Smrgelse $as_nop
676742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
6768c582b7e3Smrgfi
67698ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
677042a55b46Smrgfi
67718ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
67728ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
677342a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
677442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
6775c582b7e3Smrgfi
6776c582b7e3Smrg
677742a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
677842a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
677942a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
678042a55b46Smrg	fi
678142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
67828ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
67838ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
67848ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
67858ce07328Smrgthen :
67868ce07328Smrg  printf %s "(cached) " >&6
67878ce07328Smrgelse $as_nop
678842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
678942a55b46Smrg/* end confdefs.h.  */
679042a55b46Smrgint i;
679142a55b46Smrg_ACEOF
67928ce07328Smrgif ac_fn_c_try_compile "$LINENO"
67938ce07328Smrgthen :
679442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
67958ce07328Smrgelse $as_nop
679642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
679742a55b46Smrgfi
67988ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6799c582b7e3Smrgfi
68008ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
68018ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
680242a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
680342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
680442a55b46Smrgfi
680542a55b46Smrg
680642a55b46Smrgfound="no"
6807c582b7e3Smrg
680842a55b46Smrg	if test $found = "no" ; then
6809e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
681042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
681142a55b46Smrg		fi
6812c582b7e3Smrg
6813e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
681442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
681542a55b46Smrg		fi
6816c582b7e3Smrg
6817e3d74329Smrg		CFLAGS="$CFLAGS -Wmissing-noreturn"
6818c582b7e3Smrg
68198ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5
68208ce07328Smrgprintf %s "checking if $CC supports -Wmissing-noreturn... " >&6; }
6821e3d74329Smrg		cacheid=xorg_cv_cc_flag__Wmissing_noreturn
68228ce07328Smrg		if eval test \${$cacheid+y}
68238ce07328Smrgthen :
68248ce07328Smrg  printf %s "(cached) " >&6
68258ce07328Smrgelse $as_nop
682642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6827c582b7e3Smrg/* end confdefs.h.  */
682842a55b46Smrgint i;
682942a55b46Smrgint
68308ce07328Smrgmain (void)
683142a55b46Smrg{
683242a55b46Smrg
683342a55b46Smrg  ;
683442a55b46Smrg  return 0;
683542a55b46Smrg}
6836c582b7e3Smrg_ACEOF
68378ce07328Smrgif ac_fn_c_try_link "$LINENO"
68388ce07328Smrgthen :
683942a55b46Smrg  eval $cacheid=yes
68408ce07328Smrgelse $as_nop
684142a55b46Smrg  eval $cacheid=no
684242a55b46Smrgfi
68438ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
684442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
6845c582b7e3Smrgfi
6846c582b7e3Smrg
6847c582b7e3Smrg
684842a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
684942a55b46Smrg
685042a55b46Smrg		eval supported=\$$cacheid
68518ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
68528ce07328Smrgprintf "%s\n" "$supported" >&6; }
685342a55b46Smrg		if test "$supported" = "yes" ; then
6854e3d74329Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn"
685542a55b46Smrg			found="yes"
685642a55b46Smrg		fi
685742a55b46Smrg	fi
685842a55b46Smrg
685942a55b46Smrg
686042a55b46Smrg
686142a55b46Smrg
686242a55b46Smrg
686342a55b46Smrg
686442a55b46Smrg
686542a55b46Smrg
686642a55b46Smrg
686742a55b46Smrg
686842a55b46Smrg
686942a55b46Smrg
687042a55b46Smrg
687142a55b46Smrg
687242a55b46Smrg
687342a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
687442a55b46Smrg
687542a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
687642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
68778ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
68788ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
68798ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
68808ce07328Smrgthen :
68818ce07328Smrg  printf %s "(cached) " >&6
68828ce07328Smrgelse $as_nop
688342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6884c582b7e3Smrg/* end confdefs.h.  */
688542a55b46Smrgint i;
6886c582b7e3Smrg_ACEOF
68878ce07328Smrgif ac_fn_c_try_compile "$LINENO"
68888ce07328Smrgthen :
688942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
68908ce07328Smrgelse $as_nop
689142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
689242a55b46Smrgfi
68938ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
689442a55b46Smrgfi
68958ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
68968ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
689742a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
689842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
689942a55b46Smrgfi
6900c582b7e3Smrg
690142a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
690242a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
690342a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
690442a55b46Smrg	fi
690542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
69068ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
69078ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
69088ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
69098ce07328Smrgthen :
69108ce07328Smrg  printf %s "(cached) " >&6
69118ce07328Smrgelse $as_nop
691242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
691342a55b46Smrg/* end confdefs.h.  */
691442a55b46Smrgint i;
691542a55b46Smrg_ACEOF
69168ce07328Smrgif ac_fn_c_try_compile "$LINENO"
69178ce07328Smrgthen :
691842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
69198ce07328Smrgelse $as_nop
692042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
692142a55b46Smrgfi
69228ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
692342a55b46Smrgfi
69248ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
69258ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
692642a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
692742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
6928c582b7e3Smrgfi
6929c582b7e3Smrg
693042a55b46Smrgfound="no"
6931c582b7e3Smrg
693242a55b46Smrg	if test $found = "no" ; then
6933e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
693442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
693542a55b46Smrg		fi
6936c582b7e3Smrg
6937e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
693842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
693942a55b46Smrg		fi
6940c582b7e3Smrg
6941e3d74329Smrg		CFLAGS="$CFLAGS -Wmissing-format-attribute"
694242a55b46Smrg
69438ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5
69448ce07328Smrgprintf %s "checking if $CC supports -Wmissing-format-attribute... " >&6; }
6945e3d74329Smrg		cacheid=xorg_cv_cc_flag__Wmissing_format_attribute
69468ce07328Smrg		if eval test \${$cacheid+y}
69478ce07328Smrgthen :
69488ce07328Smrg  printf %s "(cached) " >&6
69498ce07328Smrgelse $as_nop
695042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6951c582b7e3Smrg/* end confdefs.h.  */
695242a55b46Smrgint i;
695342a55b46Smrgint
69548ce07328Smrgmain (void)
695542a55b46Smrg{
695642a55b46Smrg
695742a55b46Smrg  ;
695842a55b46Smrg  return 0;
695942a55b46Smrg}
6960c582b7e3Smrg_ACEOF
69618ce07328Smrgif ac_fn_c_try_link "$LINENO"
69628ce07328Smrgthen :
696342a55b46Smrg  eval $cacheid=yes
69648ce07328Smrgelse $as_nop
696542a55b46Smrg  eval $cacheid=no
696642a55b46Smrgfi
69678ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
696842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
6969c582b7e3Smrgfi
6970c582b7e3Smrg
6971c582b7e3Smrg
697242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
697342a55b46Smrg
697442a55b46Smrg		eval supported=\$$cacheid
69758ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
69768ce07328Smrgprintf "%s\n" "$supported" >&6; }
697742a55b46Smrg		if test "$supported" = "yes" ; then
6978e3d74329Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute"
697942a55b46Smrg			found="yes"
698042a55b46Smrg		fi
698142a55b46Smrg	fi
698242a55b46Smrg
698342a55b46Smrg
698442a55b46Smrg
698542a55b46Smrg
698642a55b46Smrg
698742a55b46Smrg
698842a55b46Smrg
698942a55b46Smrg
699042a55b46Smrg
699142a55b46Smrg
699242a55b46Smrg
699342a55b46Smrg
699442a55b46Smrg
699542a55b46Smrg
699642a55b46Smrg
699742a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
699842a55b46Smrg
699942a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
700042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
70018ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
70028ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
70038ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
70048ce07328Smrgthen :
70058ce07328Smrg  printf %s "(cached) " >&6
70068ce07328Smrgelse $as_nop
700742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008c582b7e3Smrg/* end confdefs.h.  */
700942a55b46Smrgint i;
7010c582b7e3Smrg_ACEOF
70118ce07328Smrgif ac_fn_c_try_compile "$LINENO"
70128ce07328Smrgthen :
701342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
70148ce07328Smrgelse $as_nop
701542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
701642a55b46Smrgfi
70178ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
701842a55b46Smrgfi
70198ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
70208ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
702142a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
702242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
702342a55b46Smrgfi
7024c582b7e3Smrg
702542a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
702642a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
702742a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
702842a55b46Smrg	fi
702942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
70308ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
70318ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
70328ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
70338ce07328Smrgthen :
70348ce07328Smrg  printf %s "(cached) " >&6
70358ce07328Smrgelse $as_nop
703642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
703742a55b46Smrg/* end confdefs.h.  */
703842a55b46Smrgint i;
703942a55b46Smrg_ACEOF
70408ce07328Smrgif ac_fn_c_try_compile "$LINENO"
70418ce07328Smrgthen :
704242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
70438ce07328Smrgelse $as_nop
704442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
704542a55b46Smrgfi
70468ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
704742a55b46Smrgfi
70488ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
70498ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
705042a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
705142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7052c582b7e3Smrgfi
7053c582b7e3Smrg
705442a55b46Smrgfound="no"
7055c582b7e3Smrg
705642a55b46Smrg	if test $found = "no" ; then
7057e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
705842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
705942a55b46Smrg		fi
706042a55b46Smrg
7061e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
706242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
706342a55b46Smrg		fi
706442a55b46Smrg
7065e3d74329Smrg		CFLAGS="$CFLAGS -Wredundant-decls"
706642a55b46Smrg
70678ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5
70688ce07328Smrgprintf %s "checking if $CC supports -Wredundant-decls... " >&6; }
7069e3d74329Smrg		cacheid=xorg_cv_cc_flag__Wredundant_decls
70708ce07328Smrg		if eval test \${$cacheid+y}
70718ce07328Smrgthen :
70728ce07328Smrg  printf %s "(cached) " >&6
70738ce07328Smrgelse $as_nop
707442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
707542a55b46Smrg/* end confdefs.h.  */
707642a55b46Smrgint i;
707742a55b46Smrgint
70788ce07328Smrgmain (void)
707942a55b46Smrg{
708042a55b46Smrg
708142a55b46Smrg  ;
708242a55b46Smrg  return 0;
708342a55b46Smrg}
708442a55b46Smrg_ACEOF
70858ce07328Smrgif ac_fn_c_try_link "$LINENO"
70868ce07328Smrgthen :
708742a55b46Smrg  eval $cacheid=yes
70888ce07328Smrgelse $as_nop
708942a55b46Smrg  eval $cacheid=no
709042a55b46Smrgfi
70918ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
709242a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
7093c582b7e3Smrgfi
7094c582b7e3Smrg
7095c582b7e3Smrg
709642a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
7097c582b7e3Smrg
709842a55b46Smrg		eval supported=\$$cacheid
70998ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
71008ce07328Smrgprintf "%s\n" "$supported" >&6; }
710142a55b46Smrg		if test "$supported" = "yes" ; then
7102e3d74329Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
710342a55b46Smrg			found="yes"
710442a55b46Smrg		fi
710542a55b46Smrg	fi
7106c582b7e3Smrg
710742a55b46Smrg
710842a55b46Smrg
710942a55b46Smrg
711042a55b46Smrg
711142a55b46Smrg
711242a55b46Smrg
711342a55b46Smrg
711442a55b46Smrg
711542a55b46Smrg
711642a55b46Smrg
711742a55b46Smrg
711842a55b46Smrg
711942a55b46Smrg
712042a55b46Smrg
712142a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
712242a55b46Smrg
712342a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
712442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
71258ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
71268ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
71278ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
71288ce07328Smrgthen :
71298ce07328Smrg  printf %s "(cached) " >&6
71308ce07328Smrgelse $as_nop
713142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
713242a55b46Smrg/* end confdefs.h.  */
713342a55b46Smrgint i;
713442a55b46Smrg_ACEOF
71358ce07328Smrgif ac_fn_c_try_compile "$LINENO"
71368ce07328Smrgthen :
713742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
71388ce07328Smrgelse $as_nop
713942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
7140c582b7e3Smrgfi
71418ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7142c582b7e3Smrgfi
71438ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
71448ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
714542a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
714642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7147c582b7e3Smrgfi
7148c582b7e3Smrg
714942a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
715042a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
715142a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
715242a55b46Smrg	fi
715342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
71548ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
71558ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
71568ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
71578ce07328Smrgthen :
71588ce07328Smrg  printf %s "(cached) " >&6
71598ce07328Smrgelse $as_nop
716042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
716142a55b46Smrg/* end confdefs.h.  */
716242a55b46Smrgint i;
716342a55b46Smrg_ACEOF
71648ce07328Smrgif ac_fn_c_try_compile "$LINENO"
71658ce07328Smrgthen :
716642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
71678ce07328Smrgelse $as_nop
716842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
7169c582b7e3Smrgfi
71708ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7171c582b7e3Smrgfi
71728ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
71738ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
717442a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
717542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7176c582b7e3Smrgfi
7177c582b7e3Smrg
717842a55b46Smrgfound="no"
7179c582b7e3Smrg
718042a55b46Smrg	if test $found = "no" ; then
7181e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
718242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
718342a55b46Smrg		fi
7184c582b7e3Smrg
7185e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
718642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
718742a55b46Smrg		fi
7188c582b7e3Smrg
7189e3d74329Smrg		CFLAGS="$CFLAGS -Wlogical-op"
7190c582b7e3Smrg
71918ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5
71928ce07328Smrgprintf %s "checking if $CC supports -Wlogical-op... " >&6; }
7193e3d74329Smrg		cacheid=xorg_cv_cc_flag__Wlogical_op
71948ce07328Smrg		if eval test \${$cacheid+y}
71958ce07328Smrgthen :
71968ce07328Smrg  printf %s "(cached) " >&6
71978ce07328Smrgelse $as_nop
719842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
719942a55b46Smrg/* end confdefs.h.  */
720042a55b46Smrgint i;
720142a55b46Smrgint
72028ce07328Smrgmain (void)
720342a55b46Smrg{
7204c582b7e3Smrg
720542a55b46Smrg  ;
720642a55b46Smrg  return 0;
720742a55b46Smrg}
7208c582b7e3Smrg_ACEOF
72098ce07328Smrgif ac_fn_c_try_link "$LINENO"
72108ce07328Smrgthen :
721142a55b46Smrg  eval $cacheid=yes
72128ce07328Smrgelse $as_nop
721342a55b46Smrg  eval $cacheid=no
721442a55b46Smrgfi
72158ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
721642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
7217c582b7e3Smrgfi
7218c582b7e3Smrg
7219c582b7e3Smrg
722042a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
7221c582b7e3Smrg
722242a55b46Smrg		eval supported=\$$cacheid
72238ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
72248ce07328Smrgprintf "%s\n" "$supported" >&6; }
722542a55b46Smrg		if test "$supported" = "yes" ; then
7226e3d74329Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op"
722742a55b46Smrg			found="yes"
722842a55b46Smrg		fi
722942a55b46Smrg	fi
7230c582b7e3Smrg
7231c582b7e3Smrg
7232c582b7e3Smrg
723342a55b46Smrg# These are currently disabled because they are noisy.  They will be enabled
723442a55b46Smrg# in the future once the codebase is sufficiently modernized to silence
723542a55b46Smrg# them.  For now, I don't want them to drown out the other warnings.
723642a55b46Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
723742a55b46Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
7238e3d74329Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
7239c582b7e3Smrg
724042a55b46Smrg# Turn some warnings into errors, so we don't accidently get successful builds
724142a55b46Smrg# when there are problems that should be fixed.
7242c582b7e3Smrg
724342a55b46Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
7244c582b7e3Smrg
7245c582b7e3Smrg
7246c582b7e3Smrg
7247c582b7e3Smrg
7248c582b7e3Smrg
7249c582b7e3Smrg
7250c582b7e3Smrg
7251c582b7e3Smrg
7252c582b7e3Smrg
725342a55b46Smrg
725442a55b46Smrg
725542a55b46Smrg
725642a55b46Smrg
725742a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
725842a55b46Smrg
725942a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
726042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
72618ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
72628ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
72638ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
72648ce07328Smrgthen :
72658ce07328Smrg  printf %s "(cached) " >&6
72668ce07328Smrgelse $as_nop
726742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
726842a55b46Smrg/* end confdefs.h.  */
726942a55b46Smrgint i;
727042a55b46Smrg_ACEOF
72718ce07328Smrgif ac_fn_c_try_compile "$LINENO"
72728ce07328Smrgthen :
727342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
72748ce07328Smrgelse $as_nop
727542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
727642a55b46Smrgfi
72778ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
727842a55b46Smrgfi
72798ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
72808ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
728142a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
728242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
728342a55b46Smrgfi
728442a55b46Smrg
728542a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
728642a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
728742a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
728842a55b46Smrg	fi
728942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
72908ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
72918ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
72928ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
72938ce07328Smrgthen :
72948ce07328Smrg  printf %s "(cached) " >&6
72958ce07328Smrgelse $as_nop
729642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
729742a55b46Smrg/* end confdefs.h.  */
729842a55b46Smrgint i;
729942a55b46Smrg_ACEOF
73008ce07328Smrgif ac_fn_c_try_compile "$LINENO"
73018ce07328Smrgthen :
730242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
73038ce07328Smrgelse $as_nop
730442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
730542a55b46Smrgfi
73068ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
730742a55b46Smrgfi
73088ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
73098ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
731042a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
731142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7312c582b7e3Smrgfi
7313c582b7e3Smrg
731442a55b46Smrgfound="no"
731542a55b46Smrg
731642a55b46Smrg	if test $found = "no" ; then
7317e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
731842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
731942a55b46Smrg		fi
732042a55b46Smrg
7321e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
732242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
732342a55b46Smrg		fi
732442a55b46Smrg
732542a55b46Smrg		CFLAGS="$CFLAGS -Werror=implicit"
732642a55b46Smrg
73278ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5
73288ce07328Smrgprintf %s "checking if $CC supports -Werror=implicit... " >&6; }
73290496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_implicit
73308ce07328Smrg		if eval test \${$cacheid+y}
73318ce07328Smrgthen :
73328ce07328Smrg  printf %s "(cached) " >&6
73338ce07328Smrgelse $as_nop
733442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
733542a55b46Smrg/* end confdefs.h.  */
733642a55b46Smrgint i;
733742a55b46Smrgint
73388ce07328Smrgmain (void)
733942a55b46Smrg{
734042a55b46Smrg
734142a55b46Smrg  ;
734242a55b46Smrg  return 0;
734342a55b46Smrg}
734442a55b46Smrg_ACEOF
73458ce07328Smrgif ac_fn_c_try_link "$LINENO"
73468ce07328Smrgthen :
734742a55b46Smrg  eval $cacheid=yes
73488ce07328Smrgelse $as_nop
734942a55b46Smrg  eval $cacheid=no
735042a55b46Smrgfi
73518ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
735242a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
7353c582b7e3Smrgfi
7354c582b7e3Smrg
7355c582b7e3Smrg
735642a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
7357c582b7e3Smrg
735842a55b46Smrg		eval supported=\$$cacheid
73598ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
73608ce07328Smrgprintf "%s\n" "$supported" >&6; }
736142a55b46Smrg		if test "$supported" = "yes" ; then
736242a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit"
736342a55b46Smrg			found="yes"
736442a55b46Smrg		fi
736542a55b46Smrg	fi
7366c582b7e3Smrg
736742a55b46Smrg	if test $found = "no" ; then
7368e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
736942a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
737042a55b46Smrg		fi
7371c582b7e3Smrg
7372e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
737342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
737442a55b46Smrg		fi
737542a55b46Smrg
737642a55b46Smrg		CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
737742a55b46Smrg
73788ce07328Smrg		{ 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
73798ce07328Smrgprintf %s "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; }
73800496e070Smrg		cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED
73818ce07328Smrg		if eval test \${$cacheid+y}
73828ce07328Smrgthen :
73838ce07328Smrg  printf %s "(cached) " >&6
73848ce07328Smrgelse $as_nop
738542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
738642a55b46Smrg/* end confdefs.h.  */
738742a55b46Smrgint i;
738842a55b46Smrgint
73898ce07328Smrgmain (void)
739042a55b46Smrg{
7391c582b7e3Smrg
739242a55b46Smrg  ;
739342a55b46Smrg  return 0;
739442a55b46Smrg}
739542a55b46Smrg_ACEOF
73968ce07328Smrgif ac_fn_c_try_link "$LINENO"
73978ce07328Smrgthen :
739842a55b46Smrg  eval $cacheid=yes
73998ce07328Smrgelse $as_nop
740042a55b46Smrg  eval $cacheid=no
740142a55b46Smrgfi
74028ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
740342a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
740442a55b46Smrgfi
7405c582b7e3Smrg
7406c582b7e3Smrg
740742a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
7408c582b7e3Smrg
740942a55b46Smrg		eval supported=\$$cacheid
74108ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
74118ce07328Smrgprintf "%s\n" "$supported" >&6; }
741242a55b46Smrg		if test "$supported" = "yes" ; then
741342a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED"
741442a55b46Smrg			found="yes"
741542a55b46Smrg		fi
741642a55b46Smrg	fi
7417c582b7e3Smrg
7418c582b7e3Smrg
7419c582b7e3Smrg
7420c582b7e3Smrg
7421c582b7e3Smrg
7422c582b7e3Smrg
7423c582b7e3Smrg
7424c582b7e3Smrg
7425c582b7e3Smrg
7426c582b7e3Smrg
7427c582b7e3Smrg
7428c582b7e3Smrg
7429c582b7e3Smrg
7430c582b7e3Smrg
743142a55b46Smrg
743242a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
743342a55b46Smrg
743442a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
743542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
74368ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
74378ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
74388ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
74398ce07328Smrgthen :
74408ce07328Smrg  printf %s "(cached) " >&6
74418ce07328Smrgelse $as_nop
744242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
744342a55b46Smrg/* end confdefs.h.  */
744442a55b46Smrgint i;
744542a55b46Smrg_ACEOF
74468ce07328Smrgif ac_fn_c_try_compile "$LINENO"
74478ce07328Smrgthen :
744842a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
74498ce07328Smrgelse $as_nop
745042a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
745142a55b46Smrgfi
74528ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
745342a55b46Smrgfi
74548ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
74558ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
745642a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
745742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
745842a55b46Smrgfi
745942a55b46Smrg
746042a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
746142a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
746242a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
746342a55b46Smrg	fi
746442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
74658ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
74668ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
74678ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
74688ce07328Smrgthen :
74698ce07328Smrg  printf %s "(cached) " >&6
74708ce07328Smrgelse $as_nop
747142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
747242a55b46Smrg/* end confdefs.h.  */
747342a55b46Smrgint i;
747442a55b46Smrg_ACEOF
74758ce07328Smrgif ac_fn_c_try_compile "$LINENO"
74768ce07328Smrgthen :
747742a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
74788ce07328Smrgelse $as_nop
747942a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
748042a55b46Smrgfi
74818ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
748242a55b46Smrgfi
74838ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
74848ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
748542a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
748642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
748742a55b46Smrgfi
748842a55b46Smrg
748942a55b46Smrgfound="no"
749042a55b46Smrg
749142a55b46Smrg	if test $found = "no" ; then
7492e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
749342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
749442a55b46Smrg		fi
749542a55b46Smrg
7496e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
749742a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
749842a55b46Smrg		fi
749942a55b46Smrg
750042a55b46Smrg		CFLAGS="$CFLAGS -Werror=nonnull"
750142a55b46Smrg
75028ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5
75038ce07328Smrgprintf %s "checking if $CC supports -Werror=nonnull... " >&6; }
75040496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_nonnull
75058ce07328Smrg		if eval test \${$cacheid+y}
75068ce07328Smrgthen :
75078ce07328Smrg  printf %s "(cached) " >&6
75088ce07328Smrgelse $as_nop
750942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
751042a55b46Smrg/* end confdefs.h.  */
751142a55b46Smrgint i;
751242a55b46Smrgint
75138ce07328Smrgmain (void)
7514c582b7e3Smrg{
7515c582b7e3Smrg
751642a55b46Smrg  ;
751742a55b46Smrg  return 0;
7518c582b7e3Smrg}
751942a55b46Smrg_ACEOF
75208ce07328Smrgif ac_fn_c_try_link "$LINENO"
75218ce07328Smrgthen :
752242a55b46Smrg  eval $cacheid=yes
75238ce07328Smrgelse $as_nop
752442a55b46Smrg  eval $cacheid=no
752542a55b46Smrgfi
75268ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
752742a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
752842a55b46Smrgfi
752942a55b46Smrg
753042a55b46Smrg
753142a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
753242a55b46Smrg
753342a55b46Smrg		eval supported=\$$cacheid
75348ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
75358ce07328Smrgprintf "%s\n" "$supported" >&6; }
753642a55b46Smrg		if test "$supported" = "yes" ; then
753742a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull"
753842a55b46Smrg			found="yes"
753942a55b46Smrg		fi
7540c582b7e3Smrg	fi
7541c582b7e3Smrg
7542c582b7e3Smrg
7543c582b7e3Smrg
754442a55b46Smrg
754542a55b46Smrg
754642a55b46Smrg
754742a55b46Smrg
754842a55b46Smrg
754942a55b46Smrg
755042a55b46Smrg
755142a55b46Smrg
755242a55b46Smrg
755342a55b46Smrg
755442a55b46Smrg
755542a55b46Smrg
755642a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
755742a55b46Smrg
755842a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
755942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
75608ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
75618ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
75628ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
75638ce07328Smrgthen :
75648ce07328Smrg  printf %s "(cached) " >&6
75658ce07328Smrgelse $as_nop
756642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
756742a55b46Smrg/* end confdefs.h.  */
756842a55b46Smrgint i;
756942a55b46Smrg_ACEOF
75708ce07328Smrgif ac_fn_c_try_compile "$LINENO"
75718ce07328Smrgthen :
757242a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
75738ce07328Smrgelse $as_nop
757442a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
7575c582b7e3Smrgfi
75768ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
757742a55b46Smrgfi
75788ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
75798ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
758042a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
758142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
758242a55b46Smrgfi
758342a55b46Smrg
758442a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
758542a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
758642a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
758742a55b46Smrg	fi
758842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
75898ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
75908ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
75918ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
75928ce07328Smrgthen :
75938ce07328Smrg  printf %s "(cached) " >&6
75948ce07328Smrgelse $as_nop
759542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
759642a55b46Smrg/* end confdefs.h.  */
759742a55b46Smrgint i;
759842a55b46Smrg_ACEOF
75998ce07328Smrgif ac_fn_c_try_compile "$LINENO"
76008ce07328Smrgthen :
760142a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
76028ce07328Smrgelse $as_nop
760342a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
760442a55b46Smrgfi
76058ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
760642a55b46Smrgfi
76078ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
76088ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
760942a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
761042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7611c582b7e3Smrgfi
7612c582b7e3Smrg
761342a55b46Smrgfound="no"
761442a55b46Smrg
761542a55b46Smrg	if test $found = "no" ; then
7616e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
761742a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
761842a55b46Smrg		fi
761942a55b46Smrg
7620e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
762142a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
762242a55b46Smrg		fi
762342a55b46Smrg
762442a55b46Smrg		CFLAGS="$CFLAGS -Werror=init-self"
762542a55b46Smrg
76268ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5
76278ce07328Smrgprintf %s "checking if $CC supports -Werror=init-self... " >&6; }
76280496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_init_self
76298ce07328Smrg		if eval test \${$cacheid+y}
76308ce07328Smrgthen :
76318ce07328Smrg  printf %s "(cached) " >&6
76328ce07328Smrgelse $as_nop
763342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
763442a55b46Smrg/* end confdefs.h.  */
763542a55b46Smrgint i;
763642a55b46Smrgint
76378ce07328Smrgmain (void)
763842a55b46Smrg{
763942a55b46Smrg
764042a55b46Smrg  ;
764142a55b46Smrg  return 0;
764242a55b46Smrg}
764342a55b46Smrg_ACEOF
76448ce07328Smrgif ac_fn_c_try_link "$LINENO"
76458ce07328Smrgthen :
764642a55b46Smrg  eval $cacheid=yes
76478ce07328Smrgelse $as_nop
764842a55b46Smrg  eval $cacheid=no
7649c582b7e3Smrgfi
76508ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
765142a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
7652c582b7e3Smrgfi
765342a55b46Smrg
765442a55b46Smrg
765542a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
765642a55b46Smrg
765742a55b46Smrg		eval supported=\$$cacheid
76588ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
76598ce07328Smrgprintf "%s\n" "$supported" >&6; }
766042a55b46Smrg		if test "$supported" = "yes" ; then
766142a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self"
766242a55b46Smrg			found="yes"
766342a55b46Smrg		fi
766442a55b46Smrg	fi
7665c582b7e3Smrg
7666c582b7e3Smrg
7667c582b7e3Smrg
7668c582b7e3Smrg
7669c582b7e3Smrg
7670c582b7e3Smrg
7671c582b7e3Smrg
7672c582b7e3Smrg
7673c582b7e3Smrg
7674c582b7e3Smrg
7675c582b7e3Smrg
7676c582b7e3Smrg
7677c582b7e3Smrg
767842a55b46Smrg
767942a55b46Smrg
768042a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
768142a55b46Smrg
768242a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
768342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
76848ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
76858ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
76868ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
76878ce07328Smrgthen :
76888ce07328Smrg  printf %s "(cached) " >&6
76898ce07328Smrgelse $as_nop
769042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
769142a55b46Smrg/* end confdefs.h.  */
769242a55b46Smrgint i;
769342a55b46Smrg_ACEOF
76948ce07328Smrgif ac_fn_c_try_compile "$LINENO"
76958ce07328Smrgthen :
769642a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
76978ce07328Smrgelse $as_nop
769842a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
7699c582b7e3Smrgfi
77008ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7701c582b7e3Smrgfi
77028ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
77038ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
770442a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
770542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7706c582b7e3Smrgfi
7707c582b7e3Smrg
770842a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
770942a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
771042a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
771142a55b46Smrg	fi
771242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
77138ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
77148ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
77158ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
77168ce07328Smrgthen :
77178ce07328Smrg  printf %s "(cached) " >&6
77188ce07328Smrgelse $as_nop
771942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
772042a55b46Smrg/* end confdefs.h.  */
772142a55b46Smrgint i;
772242a55b46Smrg_ACEOF
77238ce07328Smrgif ac_fn_c_try_compile "$LINENO"
77248ce07328Smrgthen :
772542a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
77268ce07328Smrgelse $as_nop
772742a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
7728c582b7e3Smrgfi
77298ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7730c582b7e3Smrgfi
77318ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
77328ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
773342a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
773442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7735c582b7e3Smrgfi
7736c582b7e3Smrg
773742a55b46Smrgfound="no"
7738c582b7e3Smrg
773942a55b46Smrg	if test $found = "no" ; then
7740e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
774142a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
774242a55b46Smrg		fi
774342a55b46Smrg
7744e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
774542a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
774642a55b46Smrg		fi
774742a55b46Smrg
774842a55b46Smrg		CFLAGS="$CFLAGS -Werror=main"
774942a55b46Smrg
77508ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5
77518ce07328Smrgprintf %s "checking if $CC supports -Werror=main... " >&6; }
77520496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_main
77538ce07328Smrg		if eval test \${$cacheid+y}
77548ce07328Smrgthen :
77558ce07328Smrg  printf %s "(cached) " >&6
77568ce07328Smrgelse $as_nop
775742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
775842a55b46Smrg/* end confdefs.h.  */
775942a55b46Smrgint i;
776042a55b46Smrgint
77618ce07328Smrgmain (void)
776242a55b46Smrg{
7763c582b7e3Smrg
776442a55b46Smrg  ;
776542a55b46Smrg  return 0;
776642a55b46Smrg}
776742a55b46Smrg_ACEOF
77688ce07328Smrgif ac_fn_c_try_link "$LINENO"
77698ce07328Smrgthen :
777042a55b46Smrg  eval $cacheid=yes
77718ce07328Smrgelse $as_nop
777242a55b46Smrg  eval $cacheid=no
777342a55b46Smrgfi
77748ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
777542a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
7776c582b7e3Smrgfi
7777c582b7e3Smrg
7778c582b7e3Smrg
777942a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
778042a55b46Smrg
778142a55b46Smrg		eval supported=\$$cacheid
77828ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
77838ce07328Smrgprintf "%s\n" "$supported" >&6; }
778442a55b46Smrg		if test "$supported" = "yes" ; then
778542a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=main"
778642a55b46Smrg			found="yes"
778742a55b46Smrg		fi
778842a55b46Smrg	fi
778942a55b46Smrg
779042a55b46Smrg
779142a55b46Smrg
779242a55b46Smrg
779342a55b46Smrg
779442a55b46Smrg
779542a55b46Smrg
779642a55b46Smrg
779742a55b46Smrg
779842a55b46Smrg
779942a55b46Smrg
780042a55b46Smrg
780142a55b46Smrg
780242a55b46Smrg
780342a55b46Smrg
780442a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
780542a55b46Smrg
780642a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
780742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
78088ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
78098ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
78108ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
78118ce07328Smrgthen :
78128ce07328Smrg  printf %s "(cached) " >&6
78138ce07328Smrgelse $as_nop
781442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
781542a55b46Smrg/* end confdefs.h.  */
781642a55b46Smrgint i;
781742a55b46Smrg_ACEOF
78188ce07328Smrgif ac_fn_c_try_compile "$LINENO"
78198ce07328Smrgthen :
782042a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
78218ce07328Smrgelse $as_nop
782242a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
7823c582b7e3Smrgfi
78248ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7825c582b7e3Smrgfi
78268ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
78278ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
782842a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
782942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7830c582b7e3Smrgfi
7831c582b7e3Smrg
783242a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
783342a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
783442a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
783542a55b46Smrg	fi
783642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
78378ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
78388ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
78398ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
78408ce07328Smrgthen :
78418ce07328Smrg  printf %s "(cached) " >&6
78428ce07328Smrgelse $as_nop
784342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
784442a55b46Smrg/* end confdefs.h.  */
784542a55b46Smrgint i;
784642a55b46Smrg_ACEOF
78478ce07328Smrgif ac_fn_c_try_compile "$LINENO"
78488ce07328Smrgthen :
784942a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
78508ce07328Smrgelse $as_nop
785142a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
7852c582b7e3Smrgfi
78538ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7854c582b7e3Smrgfi
78558ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
78568ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
785742a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
785842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
7859c582b7e3Smrgfi
7860c582b7e3Smrg
786142a55b46Smrgfound="no"
7862c582b7e3Smrg
786342a55b46Smrg	if test $found = "no" ; then
7864e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
786542a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
786642a55b46Smrg		fi
786742a55b46Smrg
7868e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
786942a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
787042a55b46Smrg		fi
787142a55b46Smrg
787242a55b46Smrg		CFLAGS="$CFLAGS -Werror=missing-braces"
787342a55b46Smrg
78748ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5
78758ce07328Smrgprintf %s "checking if $CC supports -Werror=missing-braces... " >&6; }
78760496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_missing_braces
78778ce07328Smrg		if eval test \${$cacheid+y}
78788ce07328Smrgthen :
78798ce07328Smrg  printf %s "(cached) " >&6
78808ce07328Smrgelse $as_nop
788142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
788242a55b46Smrg/* end confdefs.h.  */
788342a55b46Smrgint i;
788442a55b46Smrgint
78858ce07328Smrgmain (void)
788642a55b46Smrg{
7887c582b7e3Smrg
788842a55b46Smrg  ;
788942a55b46Smrg  return 0;
789042a55b46Smrg}
789142a55b46Smrg_ACEOF
78928ce07328Smrgif ac_fn_c_try_link "$LINENO"
78938ce07328Smrgthen :
789442a55b46Smrg  eval $cacheid=yes
78958ce07328Smrgelse $as_nop
789642a55b46Smrg  eval $cacheid=no
7897c582b7e3Smrgfi
78988ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
789942a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
7900c582b7e3Smrgfi
7901c582b7e3Smrg
7902c582b7e3Smrg
790342a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
7904c582b7e3Smrg
790542a55b46Smrg		eval supported=\$$cacheid
79068ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
79078ce07328Smrgprintf "%s\n" "$supported" >&6; }
790842a55b46Smrg		if test "$supported" = "yes" ; then
790942a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces"
791042a55b46Smrg			found="yes"
791142a55b46Smrg		fi
791242a55b46Smrg	fi
7913c582b7e3Smrg
7914c582b7e3Smrg
7915c582b7e3Smrg
7916c582b7e3Smrg
7917c582b7e3Smrg
7918c582b7e3Smrg
7919c582b7e3Smrg
7920c582b7e3Smrg
7921c582b7e3Smrg
7922c582b7e3Smrg
7923c582b7e3Smrg
7924c582b7e3Smrg
7925c582b7e3Smrg
7926c582b7e3Smrg
7927c582b7e3Smrg
792842a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
792919019ffeSmrg
793042a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
793142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
79328ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
79338ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
79348ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
79358ce07328Smrgthen :
79368ce07328Smrg  printf %s "(cached) " >&6
79378ce07328Smrgelse $as_nop
793842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
793942a55b46Smrg/* end confdefs.h.  */
794042a55b46Smrgint i;
794142a55b46Smrg_ACEOF
79428ce07328Smrgif ac_fn_c_try_compile "$LINENO"
79438ce07328Smrgthen :
794442a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
79458ce07328Smrgelse $as_nop
794642a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
794719019ffeSmrgfi
79488ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
794919019ffeSmrgfi
79508ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
79518ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
795242a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
795342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
795419019ffeSmrgfi
795519019ffeSmrg
795642a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
795742a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
795842a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
795942a55b46Smrg	fi
796042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
79618ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
79628ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
79638ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
79648ce07328Smrgthen :
79658ce07328Smrg  printf %s "(cached) " >&6
79668ce07328Smrgelse $as_nop
796742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
796842a55b46Smrg/* end confdefs.h.  */
796942a55b46Smrgint i;
797042a55b46Smrg_ACEOF
79718ce07328Smrgif ac_fn_c_try_compile "$LINENO"
79728ce07328Smrgthen :
797342a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
79748ce07328Smrgelse $as_nop
797542a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
797619019ffeSmrgfi
79778ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
797819019ffeSmrgfi
79798ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
79808ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
798142a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
798242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
798342a55b46Smrgfi
798442a55b46Smrg
798542a55b46Smrgfound="no"
798642a55b46Smrg
798742a55b46Smrg	if test $found = "no" ; then
7988e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
798942a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
799042a55b46Smrg		fi
799142a55b46Smrg
7992e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
799342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
799442a55b46Smrg		fi
799542a55b46Smrg
799642a55b46Smrg		CFLAGS="$CFLAGS -Werror=sequence-point"
799742a55b46Smrg
79988ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5
79998ce07328Smrgprintf %s "checking if $CC supports -Werror=sequence-point... " >&6; }
80000496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_sequence_point
80018ce07328Smrg		if eval test \${$cacheid+y}
80028ce07328Smrgthen :
80038ce07328Smrg  printf %s "(cached) " >&6
80048ce07328Smrgelse $as_nop
800542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
800642a55b46Smrg/* end confdefs.h.  */
800742a55b46Smrgint i;
800842a55b46Smrgint
80098ce07328Smrgmain (void)
801042a55b46Smrg{
801142a55b46Smrg
801242a55b46Smrg  ;
801342a55b46Smrg  return 0;
801442a55b46Smrg}
801542a55b46Smrg_ACEOF
80168ce07328Smrgif ac_fn_c_try_link "$LINENO"
80178ce07328Smrgthen :
801842a55b46Smrg  eval $cacheid=yes
80198ce07328Smrgelse $as_nop
802042a55b46Smrg  eval $cacheid=no
802142a55b46Smrgfi
80228ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
802342a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
802419019ffeSmrgfi
802519019ffeSmrg
802642a55b46Smrg
802742a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
802842a55b46Smrg
802942a55b46Smrg		eval supported=\$$cacheid
80308ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
80318ce07328Smrgprintf "%s\n" "$supported" >&6; }
803242a55b46Smrg		if test "$supported" = "yes" ; then
803342a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point"
803442a55b46Smrg			found="yes"
803542a55b46Smrg		fi
803642a55b46Smrg	fi
803742a55b46Smrg
803842a55b46Smrg
803942a55b46Smrg
804042a55b46Smrg
804142a55b46Smrg
804242a55b46Smrg
804342a55b46Smrg
804442a55b46Smrg
804542a55b46Smrg
804642a55b46Smrg
804742a55b46Smrg
804842a55b46Smrg
804942a55b46Smrg
805042a55b46Smrg
805142a55b46Smrg
805242a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
805342a55b46Smrg
805442a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
805542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
80568ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
80578ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
80588ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
80598ce07328Smrgthen :
80608ce07328Smrg  printf %s "(cached) " >&6
80618ce07328Smrgelse $as_nop
806242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
806342a55b46Smrg/* end confdefs.h.  */
806442a55b46Smrgint i;
806542a55b46Smrg_ACEOF
80668ce07328Smrgif ac_fn_c_try_compile "$LINENO"
80678ce07328Smrgthen :
806842a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
80698ce07328Smrgelse $as_nop
807042a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
807142a55b46Smrgfi
80728ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
807342a55b46Smrgfi
80748ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
80758ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
807642a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
807742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
807819019ffeSmrgfi
807919019ffeSmrg
808042a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
808142a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
808242a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
808342a55b46Smrg	fi
808442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
80858ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
80868ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
80878ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
80888ce07328Smrgthen :
80898ce07328Smrg  printf %s "(cached) " >&6
80908ce07328Smrgelse $as_nop
809142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
809242a55b46Smrg/* end confdefs.h.  */
809342a55b46Smrgint i;
809442a55b46Smrg_ACEOF
80958ce07328Smrgif ac_fn_c_try_compile "$LINENO"
80968ce07328Smrgthen :
809742a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
80988ce07328Smrgelse $as_nop
809942a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
810019019ffeSmrgfi
81018ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
810219019ffeSmrgfi
81038ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
81048ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
810542a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
810642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
810719019ffeSmrgfi
810819019ffeSmrg
810942a55b46Smrgfound="no"
811019019ffeSmrg
811142a55b46Smrg	if test $found = "no" ; then
8112e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
811342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
811442a55b46Smrg		fi
811542a55b46Smrg
8116e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
811742a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
811842a55b46Smrg		fi
811942a55b46Smrg
812042a55b46Smrg		CFLAGS="$CFLAGS -Werror=return-type"
812142a55b46Smrg
81228ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5
81238ce07328Smrgprintf %s "checking if $CC supports -Werror=return-type... " >&6; }
81240496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_return_type
81258ce07328Smrg		if eval test \${$cacheid+y}
81268ce07328Smrgthen :
81278ce07328Smrg  printf %s "(cached) " >&6
81288ce07328Smrgelse $as_nop
812942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
813042a55b46Smrg/* end confdefs.h.  */
813142a55b46Smrgint i;
813242a55b46Smrgint
81338ce07328Smrgmain (void)
813442a55b46Smrg{
813519019ffeSmrg
813642a55b46Smrg  ;
813742a55b46Smrg  return 0;
813842a55b46Smrg}
813942a55b46Smrg_ACEOF
81408ce07328Smrgif ac_fn_c_try_link "$LINENO"
81418ce07328Smrgthen :
814242a55b46Smrg  eval $cacheid=yes
81438ce07328Smrgelse $as_nop
814442a55b46Smrg  eval $cacheid=no
814519019ffeSmrgfi
81468ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
814742a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
814819019ffeSmrgfi
814942a55b46Smrg
815042a55b46Smrg
815142a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
815242a55b46Smrg
815342a55b46Smrg		eval supported=\$$cacheid
81548ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
81558ce07328Smrgprintf "%s\n" "$supported" >&6; }
815642a55b46Smrg		if test "$supported" = "yes" ; then
815742a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type"
815842a55b46Smrg			found="yes"
815942a55b46Smrg		fi
816042a55b46Smrg	fi
816142a55b46Smrg
816242a55b46Smrg	if test $found = "no" ; then
8163e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
816442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
816542a55b46Smrg		fi
816642a55b46Smrg
8167e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
816842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
816942a55b46Smrg		fi
817042a55b46Smrg
817142a55b46Smrg		CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
817242a55b46Smrg
81738ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5
81748ce07328Smrgprintf %s "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; }
81750496e070Smrg		cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT
81768ce07328Smrg		if eval test \${$cacheid+y}
81778ce07328Smrgthen :
81788ce07328Smrg  printf %s "(cached) " >&6
81798ce07328Smrgelse $as_nop
818042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
818142a55b46Smrg/* end confdefs.h.  */
818242a55b46Smrgint i;
818342a55b46Smrgint
81848ce07328Smrgmain (void)
818542a55b46Smrg{
818619019ffeSmrg
818742a55b46Smrg  ;
818842a55b46Smrg  return 0;
818942a55b46Smrg}
819042a55b46Smrg_ACEOF
81918ce07328Smrgif ac_fn_c_try_link "$LINENO"
81928ce07328Smrgthen :
819342a55b46Smrg  eval $cacheid=yes
81948ce07328Smrgelse $as_nop
819542a55b46Smrg  eval $cacheid=no
819642a55b46Smrgfi
81978ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
819842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
819919019ffeSmrgfi
820019019ffeSmrg
820119019ffeSmrg
820242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
820342a55b46Smrg
820442a55b46Smrg		eval supported=\$$cacheid
82058ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
82068ce07328Smrgprintf "%s\n" "$supported" >&6; }
820742a55b46Smrg		if test "$supported" = "yes" ; then
820842a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT"
820942a55b46Smrg			found="yes"
821042a55b46Smrg		fi
821142a55b46Smrg	fi
821242a55b46Smrg
821342a55b46Smrg
821442a55b46Smrg
821542a55b46Smrg
821642a55b46Smrg
821742a55b46Smrg
821842a55b46Smrg
821942a55b46Smrg
822042a55b46Smrg
822142a55b46Smrg
822242a55b46Smrg
822342a55b46Smrg
822442a55b46Smrg
822542a55b46Smrg
822642a55b46Smrg
822742a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
822842a55b46Smrg
822942a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
823042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
82318ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
82328ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
82338ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
82348ce07328Smrgthen :
82358ce07328Smrg  printf %s "(cached) " >&6
82368ce07328Smrgelse $as_nop
823742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
823842a55b46Smrg/* end confdefs.h.  */
823942a55b46Smrgint i;
824042a55b46Smrg_ACEOF
82418ce07328Smrgif ac_fn_c_try_compile "$LINENO"
82428ce07328Smrgthen :
824342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
82448ce07328Smrgelse $as_nop
824542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
824619019ffeSmrgfi
82478ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
824842a55b46Smrgfi
82498ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
82508ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
825142a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
825242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
825342a55b46Smrgfi
825442a55b46Smrg
825542a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
825642a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
825742a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
825842a55b46Smrg	fi
825942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
82608ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
82618ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
82628ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
82638ce07328Smrgthen :
82648ce07328Smrg  printf %s "(cached) " >&6
82658ce07328Smrgelse $as_nop
826642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
826719019ffeSmrg/* end confdefs.h.  */
826842a55b46Smrgint i;
826942a55b46Smrg_ACEOF
82708ce07328Smrgif ac_fn_c_try_compile "$LINENO"
82718ce07328Smrgthen :
827242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
82738ce07328Smrgelse $as_nop
827442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
827542a55b46Smrgfi
82768ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
827742a55b46Smrgfi
82788ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
82798ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
828042a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
828142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
828242a55b46Smrgfi
828342a55b46Smrg
828442a55b46Smrgfound="no"
828519019ffeSmrg
828642a55b46Smrg	if test $found = "no" ; then
8287e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
828842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
828942a55b46Smrg		fi
829042a55b46Smrg
8291e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
829242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
829342a55b46Smrg		fi
829442a55b46Smrg
829542a55b46Smrg		CFLAGS="$CFLAGS -Werror=trigraphs"
829642a55b46Smrg
82978ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5
82988ce07328Smrgprintf %s "checking if $CC supports -Werror=trigraphs... " >&6; }
82990496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_trigraphs
83008ce07328Smrg		if eval test \${$cacheid+y}
83018ce07328Smrgthen :
83028ce07328Smrg  printf %s "(cached) " >&6
83038ce07328Smrgelse $as_nop
830442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
830542a55b46Smrg/* end confdefs.h.  */
830642a55b46Smrgint i;
830719019ffeSmrgint
83088ce07328Smrgmain (void)
830919019ffeSmrg{
831019019ffeSmrg
831119019ffeSmrg  ;
831219019ffeSmrg  return 0;
831319019ffeSmrg}
831419019ffeSmrg_ACEOF
83158ce07328Smrgif ac_fn_c_try_link "$LINENO"
83168ce07328Smrgthen :
831742a55b46Smrg  eval $cacheid=yes
83188ce07328Smrgelse $as_nop
831942a55b46Smrg  eval $cacheid=no
832042a55b46Smrgfi
83218ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
832242a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
832319019ffeSmrgfi
832419019ffeSmrg
832519019ffeSmrg
832642a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
832719019ffeSmrg
832842a55b46Smrg		eval supported=\$$cacheid
83298ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
83308ce07328Smrgprintf "%s\n" "$supported" >&6; }
833142a55b46Smrg		if test "$supported" = "yes" ; then
833242a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs"
833342a55b46Smrg			found="yes"
833442a55b46Smrg		fi
833542a55b46Smrg	fi
833619019ffeSmrg
8337c582b7e3Smrg
8338c582b7e3Smrg
8339c582b7e3Smrg
8340c582b7e3Smrg
834142a55b46Smrg
834242a55b46Smrg
834342a55b46Smrg
834442a55b46Smrg
834542a55b46Smrg
834642a55b46Smrg
834742a55b46Smrg
834842a55b46Smrg
834942a55b46Smrg
835042a55b46Smrg
835142a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
835242a55b46Smrg
835342a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
835442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
83558ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
83568ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
83578ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
83588ce07328Smrgthen :
83598ce07328Smrg  printf %s "(cached) " >&6
83608ce07328Smrgelse $as_nop
836142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
836242a55b46Smrg/* end confdefs.h.  */
836342a55b46Smrgint i;
836442a55b46Smrg_ACEOF
83658ce07328Smrgif ac_fn_c_try_compile "$LINENO"
83668ce07328Smrgthen :
836742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
83688ce07328Smrgelse $as_nop
836942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
837042a55b46Smrgfi
83718ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
837242a55b46Smrgfi
83738ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
83748ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
837542a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
837642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
8377c582b7e3Smrgfi
8378c582b7e3Smrg
837942a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
838042a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
838142a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
838242a55b46Smrg	fi
838342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
83848ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
83858ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
83868ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
83878ce07328Smrgthen :
83888ce07328Smrg  printf %s "(cached) " >&6
83898ce07328Smrgelse $as_nop
839042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
839142a55b46Smrg/* end confdefs.h.  */
839242a55b46Smrgint i;
839342a55b46Smrg_ACEOF
83948ce07328Smrgif ac_fn_c_try_compile "$LINENO"
83958ce07328Smrgthen :
839642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
83978ce07328Smrgelse $as_nop
839842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
839942a55b46Smrgfi
84008ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
840142a55b46Smrgfi
84028ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
84038ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
840442a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
840542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
840642a55b46Smrgfi
8407c582b7e3Smrg
840842a55b46Smrgfound="no"
840942a55b46Smrg
841042a55b46Smrg	if test $found = "no" ; then
8411e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
841242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
841342a55b46Smrg		fi
841442a55b46Smrg
8415e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
841642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
841742a55b46Smrg		fi
841842a55b46Smrg
841942a55b46Smrg		CFLAGS="$CFLAGS -Werror=array-bounds"
842042a55b46Smrg
84218ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5
84228ce07328Smrgprintf %s "checking if $CC supports -Werror=array-bounds... " >&6; }
84230496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_array_bounds
84248ce07328Smrg		if eval test \${$cacheid+y}
84258ce07328Smrgthen :
84268ce07328Smrg  printf %s "(cached) " >&6
84278ce07328Smrgelse $as_nop
842842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
842942a55b46Smrg/* end confdefs.h.  */
843042a55b46Smrgint i;
843142a55b46Smrgint
84328ce07328Smrgmain (void)
843342a55b46Smrg{
843442a55b46Smrg
843542a55b46Smrg  ;
843642a55b46Smrg  return 0;
843742a55b46Smrg}
843842a55b46Smrg_ACEOF
84398ce07328Smrgif ac_fn_c_try_link "$LINENO"
84408ce07328Smrgthen :
844142a55b46Smrg  eval $cacheid=yes
84428ce07328Smrgelse $as_nop
844342a55b46Smrg  eval $cacheid=no
844442a55b46Smrgfi
84458ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
844642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
844742a55b46Smrgfi
8448c582b7e3Smrg
8449c582b7e3Smrg
845042a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
8451c582b7e3Smrg
845242a55b46Smrg		eval supported=\$$cacheid
84538ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
84548ce07328Smrgprintf "%s\n" "$supported" >&6; }
845542a55b46Smrg		if test "$supported" = "yes" ; then
845642a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds"
845742a55b46Smrg			found="yes"
845842a55b46Smrg		fi
845942a55b46Smrg	fi
8460c582b7e3Smrg
8461c582b7e3Smrg
8462c582b7e3Smrg
8463c582b7e3Smrg
8464c582b7e3Smrg
8465c582b7e3Smrg
8466c582b7e3Smrg
8467c582b7e3Smrg
8468c582b7e3Smrg
8469c582b7e3Smrg
8470c582b7e3Smrg
8471c582b7e3Smrg
8472c582b7e3Smrg
8473c582b7e3Smrg
8474c582b7e3Smrg
847542a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
847642a55b46Smrg
847742a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
847842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
84798ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
84808ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
84818ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
84828ce07328Smrgthen :
84838ce07328Smrg  printf %s "(cached) " >&6
84848ce07328Smrgelse $as_nop
848542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
848642a55b46Smrg/* end confdefs.h.  */
848742a55b46Smrgint i;
848842a55b46Smrg_ACEOF
84898ce07328Smrgif ac_fn_c_try_compile "$LINENO"
84908ce07328Smrgthen :
849142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
84928ce07328Smrgelse $as_nop
849342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
849442a55b46Smrgfi
84958ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
849642a55b46Smrgfi
84978ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
84988ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
849942a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
850042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
8501c582b7e3Smrgfi
8502c582b7e3Smrg
850342a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
850442a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
850542a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
850642a55b46Smrg	fi
850742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
85088ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
85098ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
85108ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
85118ce07328Smrgthen :
85128ce07328Smrg  printf %s "(cached) " >&6
85138ce07328Smrgelse $as_nop
851442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
851542a55b46Smrg/* end confdefs.h.  */
851642a55b46Smrgint i;
851742a55b46Smrg_ACEOF
85188ce07328Smrgif ac_fn_c_try_compile "$LINENO"
85198ce07328Smrgthen :
852042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
85218ce07328Smrgelse $as_nop
852242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
8523c582b7e3Smrgfi
85248ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
852542a55b46Smrgfi
85268ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
85278ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
852842a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
852942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
8530c582b7e3Smrgfi
8531c582b7e3Smrg
853242a55b46Smrgfound="no"
8533c582b7e3Smrg
853442a55b46Smrg	if test $found = "no" ; then
8535e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
853642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
853742a55b46Smrg		fi
8538c582b7e3Smrg
8539e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
854042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
854142a55b46Smrg		fi
8542c582b7e3Smrg
854342a55b46Smrg		CFLAGS="$CFLAGS -Werror=write-strings"
8544c582b7e3Smrg
85458ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5
85468ce07328Smrgprintf %s "checking if $CC supports -Werror=write-strings... " >&6; }
85470496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_write_strings
85488ce07328Smrg		if eval test \${$cacheid+y}
85498ce07328Smrgthen :
85508ce07328Smrg  printf %s "(cached) " >&6
85518ce07328Smrgelse $as_nop
855242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
855342a55b46Smrg/* end confdefs.h.  */
855442a55b46Smrgint i;
855542a55b46Smrgint
85568ce07328Smrgmain (void)
855742a55b46Smrg{
8558c582b7e3Smrg
855942a55b46Smrg  ;
856042a55b46Smrg  return 0;
856142a55b46Smrg}
856242a55b46Smrg_ACEOF
85638ce07328Smrgif ac_fn_c_try_link "$LINENO"
85648ce07328Smrgthen :
856542a55b46Smrg  eval $cacheid=yes
85668ce07328Smrgelse $as_nop
856742a55b46Smrg  eval $cacheid=no
856842a55b46Smrgfi
85698ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
857042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
857142a55b46Smrgfi
8572c582b7e3Smrg
8573c582b7e3Smrg
857442a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
8575c582b7e3Smrg
857642a55b46Smrg		eval supported=\$$cacheid
85778ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
85788ce07328Smrgprintf "%s\n" "$supported" >&6; }
857942a55b46Smrg		if test "$supported" = "yes" ; then
858042a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings"
858142a55b46Smrg			found="yes"
858242a55b46Smrg		fi
858342a55b46Smrg	fi
8584c582b7e3Smrg
8585c582b7e3Smrg
8586c582b7e3Smrg
8587c582b7e3Smrg
8588c582b7e3Smrg
8589c582b7e3Smrg
8590c582b7e3Smrg
8591c582b7e3Smrg
8592c582b7e3Smrg
8593c582b7e3Smrg
8594c582b7e3Smrg
8595c582b7e3Smrg
859642a55b46Smrg
859742a55b46Smrg
859842a55b46Smrg
859942a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
860042a55b46Smrg
860142a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
860242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
86038ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
86048ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
86058ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
86068ce07328Smrgthen :
86078ce07328Smrg  printf %s "(cached) " >&6
86088ce07328Smrgelse $as_nop
860942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
861042a55b46Smrg/* end confdefs.h.  */
861142a55b46Smrgint i;
861242a55b46Smrg_ACEOF
86138ce07328Smrgif ac_fn_c_try_compile "$LINENO"
86148ce07328Smrgthen :
861542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
86168ce07328Smrgelse $as_nop
861742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
861842a55b46Smrgfi
86198ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
862042a55b46Smrgfi
86218ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
86228ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
862342a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
862442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
8625c582b7e3Smrgfi
8626c582b7e3Smrg
862742a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
862842a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
862942a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
863042a55b46Smrg	fi
863142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
86328ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
86338ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
86348ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
86358ce07328Smrgthen :
86368ce07328Smrg  printf %s "(cached) " >&6
86378ce07328Smrgelse $as_nop
863842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
863942a55b46Smrg/* end confdefs.h.  */
864042a55b46Smrgint i;
864142a55b46Smrg_ACEOF
86428ce07328Smrgif ac_fn_c_try_compile "$LINENO"
86438ce07328Smrgthen :
864442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
86458ce07328Smrgelse $as_nop
864642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
8647c582b7e3Smrgfi
86488ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
864942a55b46Smrgfi
86508ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
86518ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
865242a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
865342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
8654c582b7e3Smrgfi
8655c582b7e3Smrg
865642a55b46Smrgfound="no"
865742a55b46Smrg
865842a55b46Smrg	if test $found = "no" ; then
8659e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
866042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
866142a55b46Smrg		fi
866242a55b46Smrg
8663e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
866442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
866542a55b46Smrg		fi
866642a55b46Smrg
866742a55b46Smrg		CFLAGS="$CFLAGS -Werror=address"
866842a55b46Smrg
86698ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5
86708ce07328Smrgprintf %s "checking if $CC supports -Werror=address... " >&6; }
86710496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_address
86728ce07328Smrg		if eval test \${$cacheid+y}
86738ce07328Smrgthen :
86748ce07328Smrg  printf %s "(cached) " >&6
86758ce07328Smrgelse $as_nop
867642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
867742a55b46Smrg/* end confdefs.h.  */
867842a55b46Smrgint i;
867942a55b46Smrgint
86808ce07328Smrgmain (void)
868142a55b46Smrg{
8682c582b7e3Smrg
868342a55b46Smrg  ;
868442a55b46Smrg  return 0;
868542a55b46Smrg}
868642a55b46Smrg_ACEOF
86878ce07328Smrgif ac_fn_c_try_link "$LINENO"
86888ce07328Smrgthen :
868942a55b46Smrg  eval $cacheid=yes
86908ce07328Smrgelse $as_nop
869142a55b46Smrg  eval $cacheid=no
869242a55b46Smrgfi
86938ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
869442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
8695c582b7e3Smrgfi
8696c582b7e3Smrg
8697c582b7e3Smrg
869842a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
8699c582b7e3Smrg
870042a55b46Smrg		eval supported=\$$cacheid
87018ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
87028ce07328Smrgprintf "%s\n" "$supported" >&6; }
870342a55b46Smrg		if test "$supported" = "yes" ; then
870442a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=address"
870542a55b46Smrg			found="yes"
870642a55b46Smrg		fi
870742a55b46Smrg	fi
8708c582b7e3Smrg
8709c582b7e3Smrg
8710c582b7e3Smrg
871142a55b46Smrg
871242a55b46Smrg
871342a55b46Smrg
871442a55b46Smrg
871542a55b46Smrg
871642a55b46Smrg
871742a55b46Smrg
871842a55b46Smrg
871942a55b46Smrg
872042a55b46Smrg
872142a55b46Smrg
872242a55b46Smrg
872342a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
872442a55b46Smrg
872542a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
872642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
87278ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
87288ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
87298ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
87308ce07328Smrgthen :
87318ce07328Smrg  printf %s "(cached) " >&6
87328ce07328Smrgelse $as_nop
873342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
873442a55b46Smrg/* end confdefs.h.  */
873542a55b46Smrgint i;
873642a55b46Smrg_ACEOF
87378ce07328Smrgif ac_fn_c_try_compile "$LINENO"
87388ce07328Smrgthen :
873942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
87408ce07328Smrgelse $as_nop
874142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
874242a55b46Smrgfi
87438ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
874442a55b46Smrgfi
87458ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
87468ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
874742a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
874842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
8749c582b7e3Smrgfi
8750c582b7e3Smrg
875142a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
875242a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
875342a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
875442a55b46Smrg	fi
875542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
87568ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
87578ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
87588ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
87598ce07328Smrgthen :
87608ce07328Smrg  printf %s "(cached) " >&6
87618ce07328Smrgelse $as_nop
876242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
876342a55b46Smrg/* end confdefs.h.  */
876442a55b46Smrgint i;
876542a55b46Smrg_ACEOF
87668ce07328Smrgif ac_fn_c_try_compile "$LINENO"
87678ce07328Smrgthen :
876842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
87698ce07328Smrgelse $as_nop
877042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
877142a55b46Smrgfi
87728ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
877342a55b46Smrgfi
87748ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
87758ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
877642a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
877742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
877842a55b46Smrgfi
8779c582b7e3Smrg
878042a55b46Smrgfound="no"
878142a55b46Smrg
878242a55b46Smrg	if test $found = "no" ; then
8783e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
878442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
878542a55b46Smrg		fi
8786c582b7e3Smrg
8787e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
878842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
878942a55b46Smrg		fi
8790c582b7e3Smrg
879142a55b46Smrg		CFLAGS="$CFLAGS -Werror=int-to-pointer-cast"
8792c582b7e3Smrg
87938ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5
87948ce07328Smrgprintf %s "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; }
87950496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast
87968ce07328Smrg		if eval test \${$cacheid+y}
87978ce07328Smrgthen :
87988ce07328Smrg  printf %s "(cached) " >&6
87998ce07328Smrgelse $as_nop
880042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
880142a55b46Smrg/* end confdefs.h.  */
880242a55b46Smrgint i;
880342a55b46Smrgint
88048ce07328Smrgmain (void)
880542a55b46Smrg{
8806c582b7e3Smrg
880742a55b46Smrg  ;
880842a55b46Smrg  return 0;
880942a55b46Smrg}
881042a55b46Smrg_ACEOF
88118ce07328Smrgif ac_fn_c_try_link "$LINENO"
88128ce07328Smrgthen :
881342a55b46Smrg  eval $cacheid=yes
88148ce07328Smrgelse $as_nop
881542a55b46Smrg  eval $cacheid=no
881642a55b46Smrgfi
88178ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
881842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
881942a55b46Smrgfi
8820c582b7e3Smrg
8821c582b7e3Smrg
882242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
8823c582b7e3Smrg
882442a55b46Smrg		eval supported=\$$cacheid
88258ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
88268ce07328Smrgprintf "%s\n" "$supported" >&6; }
882742a55b46Smrg		if test "$supported" = "yes" ; then
882842a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast"
882942a55b46Smrg			found="yes"
883042a55b46Smrg		fi
883142a55b46Smrg	fi
8832c582b7e3Smrg
883342a55b46Smrg	if test $found = "no" ; then
8834e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
883542a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
883642a55b46Smrg		fi
8837c582b7e3Smrg
8838e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
883942a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
884042a55b46Smrg		fi
8841c582b7e3Smrg
884242a55b46Smrg		CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
8843c582b7e3Smrg
88448ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5
88458ce07328Smrgprintf %s "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; }
88460496e070Smrg		cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION
88478ce07328Smrg		if eval test \${$cacheid+y}
88488ce07328Smrgthen :
88498ce07328Smrg  printf %s "(cached) " >&6
88508ce07328Smrgelse $as_nop
885142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
885242a55b46Smrg/* end confdefs.h.  */
885342a55b46Smrgint i;
885442a55b46Smrgint
88558ce07328Smrgmain (void)
885642a55b46Smrg{
8857c582b7e3Smrg
885842a55b46Smrg  ;
885942a55b46Smrg  return 0;
886042a55b46Smrg}
886142a55b46Smrg_ACEOF
88628ce07328Smrgif ac_fn_c_try_link "$LINENO"
88638ce07328Smrgthen :
886442a55b46Smrg  eval $cacheid=yes
88658ce07328Smrgelse $as_nop
886642a55b46Smrg  eval $cacheid=no
886742a55b46Smrgfi
88688ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
886942a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
887042a55b46Smrgfi
8871c582b7e3Smrg
8872c582b7e3Smrg
887342a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
887442a55b46Smrg
887542a55b46Smrg		eval supported=\$$cacheid
88768ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
88778ce07328Smrgprintf "%s\n" "$supported" >&6; }
887842a55b46Smrg		if test "$supported" = "yes" ; then
887942a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION"
888042a55b46Smrg			found="yes"
888142a55b46Smrg		fi
8882c582b7e3Smrg	fi
8883c582b7e3Smrg
8884c582b7e3Smrg
8885c582b7e3Smrg
8886c582b7e3Smrg
8887c582b7e3Smrg
8888c582b7e3Smrg
8889c582b7e3Smrg
8890c582b7e3Smrg
8891c582b7e3Smrg
8892c582b7e3Smrg
8893c582b7e3Smrg
8894c582b7e3Smrg
8895c582b7e3Smrg
8896c582b7e3Smrg
8897c582b7e3Smrg
889842a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
889942a55b46Smrg
890042a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
890142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
89028ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
89038ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
89048ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
89058ce07328Smrgthen :
89068ce07328Smrg  printf %s "(cached) " >&6
89078ce07328Smrgelse $as_nop
890842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
890942a55b46Smrg/* end confdefs.h.  */
891042a55b46Smrgint i;
891142a55b46Smrg_ACEOF
89128ce07328Smrgif ac_fn_c_try_compile "$LINENO"
89138ce07328Smrgthen :
891442a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
89158ce07328Smrgelse $as_nop
891642a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
891742a55b46Smrgfi
89188ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
891942a55b46Smrgfi
89208ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
89218ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
892242a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
892342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
892442a55b46Smrgfi
892542a55b46Smrg
892642a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
892742a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
892842a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
892942a55b46Smrg	fi
893042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
89318ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
89328ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
89338ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
89348ce07328Smrgthen :
89358ce07328Smrg  printf %s "(cached) " >&6
89368ce07328Smrgelse $as_nop
893742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
893842a55b46Smrg/* end confdefs.h.  */
893942a55b46Smrgint i;
894042a55b46Smrg_ACEOF
89418ce07328Smrgif ac_fn_c_try_compile "$LINENO"
89428ce07328Smrgthen :
894342a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
89448ce07328Smrgelse $as_nop
894542a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
894642a55b46Smrgfi
89478ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
894842a55b46Smrgfi
89498ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
89508ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
895142a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
895242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
895342a55b46Smrgfi
895442a55b46Smrg
895542a55b46Smrgfound="no"
895642a55b46Smrg
895742a55b46Smrg	if test $found = "no" ; then
8958e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
895942a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
896042a55b46Smrg		fi
896142a55b46Smrg
8962e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
896342a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
896442a55b46Smrg		fi
8965c582b7e3Smrg
896642a55b46Smrg		CFLAGS="$CFLAGS -Werror=pointer-to-int-cast"
8967c582b7e3Smrg
89688ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5
89698ce07328Smrgprintf %s "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; }
89700496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast
89718ce07328Smrg		if eval test \${$cacheid+y}
89728ce07328Smrgthen :
89738ce07328Smrg  printf %s "(cached) " >&6
89748ce07328Smrgelse $as_nop
897542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8976c582b7e3Smrg/* end confdefs.h.  */
897742a55b46Smrgint i;
8978c582b7e3Smrgint
89798ce07328Smrgmain (void)
8980c582b7e3Smrg{
8981c582b7e3Smrg
8982c582b7e3Smrg  ;
8983c582b7e3Smrg  return 0;
8984c582b7e3Smrg}
8985c582b7e3Smrg_ACEOF
89868ce07328Smrgif ac_fn_c_try_link "$LINENO"
89878ce07328Smrgthen :
898842a55b46Smrg  eval $cacheid=yes
89898ce07328Smrgelse $as_nop
899042a55b46Smrg  eval $cacheid=no
8991c582b7e3Smrgfi
89928ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
899342a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
899442a55b46Smrgfi
899542a55b46Smrg
899642a55b46Smrg
899742a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
899842a55b46Smrg
899942a55b46Smrg		eval supported=\$$cacheid
90008ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
90018ce07328Smrgprintf "%s\n" "$supported" >&6; }
900242a55b46Smrg		if test "$supported" = "yes" ; then
900342a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast"
900442a55b46Smrg			found="yes"
900542a55b46Smrg		fi
900642a55b46Smrg	fi
900742a55b46Smrg
900842a55b46Smrg # Also -errwarn=E_BAD_PTR_INT_COMBINATION
9009c582b7e3Smrgelse
90108ce07328Smrg{ 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
90118ce07328Smrgprintf "%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;}
9012c582b7e3Smrg
9013c582b7e3Smrg
9014c582b7e3Smrg
9015c582b7e3Smrg
901642a55b46Smrg
901742a55b46Smrg
901842a55b46Smrg
901942a55b46Smrg
902042a55b46Smrg
902142a55b46Smrg
902242a55b46Smrg
902342a55b46Smrg
902442a55b46Smrg
902542a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
902642a55b46Smrg
902742a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
902842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
90298ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
90308ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
90318ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
90328ce07328Smrgthen :
90338ce07328Smrg  printf %s "(cached) " >&6
90348ce07328Smrgelse $as_nop
903542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
903642a55b46Smrg/* end confdefs.h.  */
903742a55b46Smrgint i;
9038c582b7e3Smrg_ACEOF
90398ce07328Smrgif ac_fn_c_try_compile "$LINENO"
90408ce07328Smrgthen :
904142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
90428ce07328Smrgelse $as_nop
904342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
904442a55b46Smrgfi
90458ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
904642a55b46Smrgfi
90478ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
90488ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
904942a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
905042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
905142a55b46Smrgfi
905242a55b46Smrg
905342a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
905442a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
905542a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
905642a55b46Smrg	fi
905742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
90588ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
90598ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
90608ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
90618ce07328Smrgthen :
90628ce07328Smrg  printf %s "(cached) " >&6
90638ce07328Smrgelse $as_nop
906442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9065c582b7e3Smrg/* end confdefs.h.  */
906642a55b46Smrgint i;
906742a55b46Smrg_ACEOF
90688ce07328Smrgif ac_fn_c_try_compile "$LINENO"
90698ce07328Smrgthen :
907042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
90718ce07328Smrgelse $as_nop
907242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
907342a55b46Smrgfi
90748ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
907542a55b46Smrgfi
90768ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
90778ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
907842a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
907942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
908042a55b46Smrgfi
908142a55b46Smrg
908242a55b46Smrgfound="no"
908342a55b46Smrg
908442a55b46Smrg	if test $found = "no" ; then
9085e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
908642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
908742a55b46Smrg		fi
908842a55b46Smrg
9089e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
909042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
909142a55b46Smrg		fi
909242a55b46Smrg
909342a55b46Smrg		CFLAGS="$CFLAGS -Wimplicit"
9094c582b7e3Smrg
90958ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5
90968ce07328Smrgprintf %s "checking if $CC supports -Wimplicit... " >&6; }
909742a55b46Smrg		cacheid=xorg_cv_cc_flag__Wimplicit
90988ce07328Smrg		if eval test \${$cacheid+y}
90998ce07328Smrgthen :
91008ce07328Smrg  printf %s "(cached) " >&6
91018ce07328Smrgelse $as_nop
910242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
910342a55b46Smrg/* end confdefs.h.  */
910442a55b46Smrgint i;
9105c582b7e3Smrgint
91068ce07328Smrgmain (void)
9107c582b7e3Smrg{
9108c582b7e3Smrg
9109c582b7e3Smrg  ;
9110c582b7e3Smrg  return 0;
9111c582b7e3Smrg}
9112c582b7e3Smrg_ACEOF
91138ce07328Smrgif ac_fn_c_try_link "$LINENO"
91148ce07328Smrgthen :
911542a55b46Smrg  eval $cacheid=yes
91168ce07328Smrgelse $as_nop
911742a55b46Smrg  eval $cacheid=no
911842a55b46Smrgfi
91198ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
912042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
9121c582b7e3Smrgfi
9122c582b7e3Smrg
9123c582b7e3Smrg
912442a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
9125c582b7e3Smrg
912642a55b46Smrg		eval supported=\$$cacheid
91278ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
91288ce07328Smrgprintf "%s\n" "$supported" >&6; }
912942a55b46Smrg		if test "$supported" = "yes" ; then
913042a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wimplicit"
913142a55b46Smrg			found="yes"
913242a55b46Smrg		fi
913342a55b46Smrg	fi
9134c582b7e3Smrg
9135c582b7e3Smrg
9136c582b7e3Smrg
9137c582b7e3Smrg
9138c582b7e3Smrg
9139c582b7e3Smrg
9140c582b7e3Smrg
9141c582b7e3Smrg
9142c582b7e3Smrg
9143c582b7e3Smrg
9144c582b7e3Smrg
9145c582b7e3Smrg
9146c582b7e3Smrg
9147c582b7e3Smrg
9148c582b7e3Smrg
914942a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
9150c582b7e3Smrg
915142a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
915242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
91538ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
91548ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
91558ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
91568ce07328Smrgthen :
91578ce07328Smrg  printf %s "(cached) " >&6
91588ce07328Smrgelse $as_nop
915942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
916042a55b46Smrg/* end confdefs.h.  */
916142a55b46Smrgint i;
916242a55b46Smrg_ACEOF
91638ce07328Smrgif ac_fn_c_try_compile "$LINENO"
91648ce07328Smrgthen :
916542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
91668ce07328Smrgelse $as_nop
916742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
916842a55b46Smrgfi
91698ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
917042a55b46Smrgfi
91718ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
91728ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
917342a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
917442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
917542a55b46Smrgfi
9176c582b7e3Smrg
917742a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
917842a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
917942a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
918042a55b46Smrg	fi
918142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
91828ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
91838ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
91848ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
91858ce07328Smrgthen :
91868ce07328Smrg  printf %s "(cached) " >&6
91878ce07328Smrgelse $as_nop
918842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
918942a55b46Smrg/* end confdefs.h.  */
919042a55b46Smrgint i;
919142a55b46Smrg_ACEOF
91928ce07328Smrgif ac_fn_c_try_compile "$LINENO"
91938ce07328Smrgthen :
919442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
91958ce07328Smrgelse $as_nop
919642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
919742a55b46Smrgfi
91988ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
919942a55b46Smrgfi
92008ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
92018ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
920242a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
920342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
920442a55b46Smrgfi
9205c582b7e3Smrg
920642a55b46Smrgfound="no"
9207c582b7e3Smrg
920842a55b46Smrg	if test $found = "no" ; then
9209e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
921042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
921142a55b46Smrg		fi
9212c582b7e3Smrg
9213e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
921442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
921542a55b46Smrg		fi
9216c582b7e3Smrg
921742a55b46Smrg		CFLAGS="$CFLAGS -Wnonnull"
9218c582b7e3Smrg
92198ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5
92208ce07328Smrgprintf %s "checking if $CC supports -Wnonnull... " >&6; }
922142a55b46Smrg		cacheid=xorg_cv_cc_flag__Wnonnull
92228ce07328Smrg		if eval test \${$cacheid+y}
92238ce07328Smrgthen :
92248ce07328Smrg  printf %s "(cached) " >&6
92258ce07328Smrgelse $as_nop
922642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
922742a55b46Smrg/* end confdefs.h.  */
922842a55b46Smrgint i;
922942a55b46Smrgint
92308ce07328Smrgmain (void)
923142a55b46Smrg{
9232c582b7e3Smrg
923342a55b46Smrg  ;
923442a55b46Smrg  return 0;
923542a55b46Smrg}
923642a55b46Smrg_ACEOF
92378ce07328Smrgif ac_fn_c_try_link "$LINENO"
92388ce07328Smrgthen :
923942a55b46Smrg  eval $cacheid=yes
92408ce07328Smrgelse $as_nop
924142a55b46Smrg  eval $cacheid=no
924242a55b46Smrgfi
92438ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
924442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
924542a55b46Smrgfi
924642a55b46Smrg
924742a55b46Smrg
924842a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
924942a55b46Smrg
925042a55b46Smrg		eval supported=\$$cacheid
92518ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
92528ce07328Smrgprintf "%s\n" "$supported" >&6; }
925342a55b46Smrg		if test "$supported" = "yes" ; then
925442a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wnonnull"
925542a55b46Smrg			found="yes"
925642a55b46Smrg		fi
9257c582b7e3Smrg	fi
9258c582b7e3Smrg
9259c582b7e3Smrg
9260c582b7e3Smrg
9261c582b7e3Smrg
9262c582b7e3Smrg
9263c582b7e3Smrg
9264c582b7e3Smrg
9265c582b7e3Smrg
9266c582b7e3Smrg
9267c582b7e3Smrg
9268c582b7e3Smrg
9269c582b7e3Smrg
9270c582b7e3Smrg
9271c582b7e3Smrg
9272c582b7e3Smrg
927342a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
927442a55b46Smrg
927542a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
927642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
92778ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
92788ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
92798ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
92808ce07328Smrgthen :
92818ce07328Smrg  printf %s "(cached) " >&6
92828ce07328Smrgelse $as_nop
928342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
928442a55b46Smrg/* end confdefs.h.  */
928542a55b46Smrgint i;
928642a55b46Smrg_ACEOF
92878ce07328Smrgif ac_fn_c_try_compile "$LINENO"
92888ce07328Smrgthen :
928942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
92908ce07328Smrgelse $as_nop
929142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
929242a55b46Smrgfi
92938ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
929442a55b46Smrgfi
92958ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
92968ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
929742a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
929842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
929942a55b46Smrgfi
930042a55b46Smrg
930142a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
930242a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
930342a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
930442a55b46Smrg	fi
930542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
93068ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
93078ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
93088ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
93098ce07328Smrgthen :
93108ce07328Smrg  printf %s "(cached) " >&6
93118ce07328Smrgelse $as_nop
931242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
931342a55b46Smrg/* end confdefs.h.  */
931442a55b46Smrgint i;
931542a55b46Smrg_ACEOF
93168ce07328Smrgif ac_fn_c_try_compile "$LINENO"
93178ce07328Smrgthen :
931842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
93198ce07328Smrgelse $as_nop
932042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
932142a55b46Smrgfi
93228ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
932342a55b46Smrgfi
93248ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
93258ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
932642a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
932742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
932842a55b46Smrgfi
932942a55b46Smrg
933042a55b46Smrgfound="no"
933142a55b46Smrg
933242a55b46Smrg	if test $found = "no" ; then
9333e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
933442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
933542a55b46Smrg		fi
933642a55b46Smrg
9337e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
933842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
933942a55b46Smrg		fi
934042a55b46Smrg
934142a55b46Smrg		CFLAGS="$CFLAGS -Winit-self"
934242a55b46Smrg
93438ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5
93448ce07328Smrgprintf %s "checking if $CC supports -Winit-self... " >&6; }
934542a55b46Smrg		cacheid=xorg_cv_cc_flag__Winit_self
93468ce07328Smrg		if eval test \${$cacheid+y}
93478ce07328Smrgthen :
93488ce07328Smrg  printf %s "(cached) " >&6
93498ce07328Smrgelse $as_nop
935042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
935142a55b46Smrg/* end confdefs.h.  */
935242a55b46Smrgint i;
935342a55b46Smrgint
93548ce07328Smrgmain (void)
935542a55b46Smrg{
9356c582b7e3Smrg
935742a55b46Smrg  ;
935842a55b46Smrg  return 0;
935942a55b46Smrg}
936042a55b46Smrg_ACEOF
93618ce07328Smrgif ac_fn_c_try_link "$LINENO"
93628ce07328Smrgthen :
936342a55b46Smrg  eval $cacheid=yes
93648ce07328Smrgelse $as_nop
936542a55b46Smrg  eval $cacheid=no
936642a55b46Smrgfi
93678ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
936842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
9369c582b7e3Smrgfi
9370c582b7e3Smrg
9371c582b7e3Smrg
937242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
9373c582b7e3Smrg
937442a55b46Smrg		eval supported=\$$cacheid
93758ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
93768ce07328Smrgprintf "%s\n" "$supported" >&6; }
937742a55b46Smrg		if test "$supported" = "yes" ; then
937842a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Winit-self"
937942a55b46Smrg			found="yes"
938042a55b46Smrg		fi
938142a55b46Smrg	fi
9382c582b7e3Smrg
9383c582b7e3Smrg
9384c582b7e3Smrg
9385c582b7e3Smrg
9386c582b7e3Smrg
9387c582b7e3Smrg
9388c582b7e3Smrg
9389c582b7e3Smrg
9390c582b7e3Smrg
9391c582b7e3Smrg
9392c582b7e3Smrg
9393c582b7e3Smrg
9394c582b7e3Smrg
9395c582b7e3Smrg
9396c582b7e3Smrg
939742a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
939842a55b46Smrg
939942a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
940042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
94018ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
94028ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
94038ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
94048ce07328Smrgthen :
94058ce07328Smrg  printf %s "(cached) " >&6
94068ce07328Smrgelse $as_nop
940742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
940842a55b46Smrg/* end confdefs.h.  */
940942a55b46Smrgint i;
941042a55b46Smrg_ACEOF
94118ce07328Smrgif ac_fn_c_try_compile "$LINENO"
94128ce07328Smrgthen :
941342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
94148ce07328Smrgelse $as_nop
941542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
941642a55b46Smrgfi
94178ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
941842a55b46Smrgfi
94198ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
94208ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
942142a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
942242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
942342a55b46Smrgfi
942442a55b46Smrg
942542a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
942642a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
942742a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
942842a55b46Smrg	fi
942942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
94308ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
94318ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
94328ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
94338ce07328Smrgthen :
94348ce07328Smrg  printf %s "(cached) " >&6
94358ce07328Smrgelse $as_nop
943642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
943742a55b46Smrg/* end confdefs.h.  */
943842a55b46Smrgint i;
943942a55b46Smrg_ACEOF
94408ce07328Smrgif ac_fn_c_try_compile "$LINENO"
94418ce07328Smrgthen :
944242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
94438ce07328Smrgelse $as_nop
944442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
944542a55b46Smrgfi
94468ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
944742a55b46Smrgfi
94488ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
94498ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
945042a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
945142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
945242a55b46Smrgfi
945342a55b46Smrg
945442a55b46Smrgfound="no"
945542a55b46Smrg
945642a55b46Smrg	if test $found = "no" ; then
9457e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
945842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
945942a55b46Smrg		fi
946042a55b46Smrg
9461e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
946242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
946342a55b46Smrg		fi
946442a55b46Smrg
946542a55b46Smrg		CFLAGS="$CFLAGS -Wmain"
9466c582b7e3Smrg
94678ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5
94688ce07328Smrgprintf %s "checking if $CC supports -Wmain... " >&6; }
946942a55b46Smrg		cacheid=xorg_cv_cc_flag__Wmain
94708ce07328Smrg		if eval test \${$cacheid+y}
94718ce07328Smrgthen :
94728ce07328Smrg  printf %s "(cached) " >&6
94738ce07328Smrgelse $as_nop
947442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
947542a55b46Smrg/* end confdefs.h.  */
947642a55b46Smrgint i;
947742a55b46Smrgint
94788ce07328Smrgmain (void)
947942a55b46Smrg{
9480c582b7e3Smrg
948142a55b46Smrg  ;
948242a55b46Smrg  return 0;
948342a55b46Smrg}
948442a55b46Smrg_ACEOF
94858ce07328Smrgif ac_fn_c_try_link "$LINENO"
94868ce07328Smrgthen :
948742a55b46Smrg  eval $cacheid=yes
94888ce07328Smrgelse $as_nop
948942a55b46Smrg  eval $cacheid=no
949042a55b46Smrgfi
94918ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
949242a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
949342a55b46Smrgfi
9494c582b7e3Smrg
9495c582b7e3Smrg
949642a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
9497c582b7e3Smrg
949842a55b46Smrg		eval supported=\$$cacheid
94998ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
95008ce07328Smrgprintf "%s\n" "$supported" >&6; }
950142a55b46Smrg		if test "$supported" = "yes" ; then
950242a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wmain"
950342a55b46Smrg			found="yes"
950442a55b46Smrg		fi
950542a55b46Smrg	fi
9506c582b7e3Smrg
9507c582b7e3Smrg
9508c582b7e3Smrg
9509c582b7e3Smrg
9510c582b7e3Smrg
9511c582b7e3Smrg
9512c582b7e3Smrg
9513c582b7e3Smrg
9514c582b7e3Smrg
9515c582b7e3Smrg
9516c582b7e3Smrg
9517c582b7e3Smrg
9518c582b7e3Smrg
9519c582b7e3Smrg
9520c582b7e3Smrg
952142a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
9522c582b7e3Smrg
952342a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
952442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
95258ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
95268ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
95278ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
95288ce07328Smrgthen :
95298ce07328Smrg  printf %s "(cached) " >&6
95308ce07328Smrgelse $as_nop
953142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
953242a55b46Smrg/* end confdefs.h.  */
953342a55b46Smrgint i;
953442a55b46Smrg_ACEOF
95358ce07328Smrgif ac_fn_c_try_compile "$LINENO"
95368ce07328Smrgthen :
953742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
95388ce07328Smrgelse $as_nop
953942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
954042a55b46Smrgfi
95418ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
954242a55b46Smrgfi
95438ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
95448ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
954542a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
954642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
954719019ffeSmrgfi
954819019ffeSmrg
954942a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
955042a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
955142a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
955242a55b46Smrg	fi
955342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
95548ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
95558ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
95568ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
95578ce07328Smrgthen :
95588ce07328Smrg  printf %s "(cached) " >&6
95598ce07328Smrgelse $as_nop
956042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
956142a55b46Smrg/* end confdefs.h.  */
956242a55b46Smrgint i;
956342a55b46Smrg_ACEOF
95648ce07328Smrgif ac_fn_c_try_compile "$LINENO"
95658ce07328Smrgthen :
956642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
95678ce07328Smrgelse $as_nop
956842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
956942a55b46Smrgfi
95708ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
957142a55b46Smrgfi
95728ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
95738ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
957442a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
957542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
957619019ffeSmrgfi
957719019ffeSmrg
957842a55b46Smrgfound="no"
957919019ffeSmrg
958042a55b46Smrg	if test $found = "no" ; then
9581e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
958242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
958342a55b46Smrg		fi
9584c582b7e3Smrg
9585e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
958642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
958742a55b46Smrg		fi
9588c582b7e3Smrg
958942a55b46Smrg		CFLAGS="$CFLAGS -Wmissing-braces"
959042a55b46Smrg
95918ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5
95928ce07328Smrgprintf %s "checking if $CC supports -Wmissing-braces... " >&6; }
959342a55b46Smrg		cacheid=xorg_cv_cc_flag__Wmissing_braces
95948ce07328Smrg		if eval test \${$cacheid+y}
95958ce07328Smrgthen :
95968ce07328Smrg  printf %s "(cached) " >&6
95978ce07328Smrgelse $as_nop
959842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
959942a55b46Smrg/* end confdefs.h.  */
960042a55b46Smrgint i;
960142a55b46Smrgint
96028ce07328Smrgmain (void)
960342a55b46Smrg{
9604c582b7e3Smrg
960542a55b46Smrg  ;
960642a55b46Smrg  return 0;
960742a55b46Smrg}
960842a55b46Smrg_ACEOF
96098ce07328Smrgif ac_fn_c_try_link "$LINENO"
96108ce07328Smrgthen :
961142a55b46Smrg  eval $cacheid=yes
96128ce07328Smrgelse $as_nop
961342a55b46Smrg  eval $cacheid=no
961442a55b46Smrgfi
96158ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
961642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
9617c582b7e3Smrgfi
9618c582b7e3Smrg
961942a55b46Smrg
962042a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
962142a55b46Smrg
962242a55b46Smrg		eval supported=\$$cacheid
96238ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
96248ce07328Smrgprintf "%s\n" "$supported" >&6; }
962542a55b46Smrg		if test "$supported" = "yes" ; then
962642a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces"
962742a55b46Smrg			found="yes"
962842a55b46Smrg		fi
962942a55b46Smrg	fi
963042a55b46Smrg
963142a55b46Smrg
963242a55b46Smrg
963342a55b46Smrg
963442a55b46Smrg
963542a55b46Smrg
963642a55b46Smrg
963742a55b46Smrg
963842a55b46Smrg
963942a55b46Smrg
964042a55b46Smrg
964142a55b46Smrg
964242a55b46Smrg
964342a55b46Smrg
964442a55b46Smrg
964542a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
964642a55b46Smrg
964742a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
964842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
96498ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
96508ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
96518ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
96528ce07328Smrgthen :
96538ce07328Smrg  printf %s "(cached) " >&6
96548ce07328Smrgelse $as_nop
965542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
965642a55b46Smrg/* end confdefs.h.  */
965742a55b46Smrgint i;
965842a55b46Smrg_ACEOF
96598ce07328Smrgif ac_fn_c_try_compile "$LINENO"
96608ce07328Smrgthen :
966142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
96628ce07328Smrgelse $as_nop
966342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
9664c582b7e3Smrgfi
96658ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
966642a55b46Smrgfi
96678ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
96688ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
966942a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
967042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
9671c582b7e3Smrgfi
9672c582b7e3Smrg
967342a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
967442a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
967542a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
967642a55b46Smrg	fi
967742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
96788ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
96798ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
96808ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
96818ce07328Smrgthen :
96828ce07328Smrg  printf %s "(cached) " >&6
96838ce07328Smrgelse $as_nop
968442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
968542a55b46Smrg/* end confdefs.h.  */
968642a55b46Smrgint i;
968742a55b46Smrg_ACEOF
96888ce07328Smrgif ac_fn_c_try_compile "$LINENO"
96898ce07328Smrgthen :
969042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
96918ce07328Smrgelse $as_nop
969242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
969342a55b46Smrgfi
96948ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
969542a55b46Smrgfi
96968ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
96978ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
969842a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
969942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
970042a55b46Smrgfi
9701c582b7e3Smrg
970242a55b46Smrgfound="no"
9703c582b7e3Smrg
970442a55b46Smrg	if test $found = "no" ; then
9705e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
970642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
970742a55b46Smrg		fi
9708c582b7e3Smrg
9709e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
971042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
971142a55b46Smrg		fi
9712c582b7e3Smrg
971342a55b46Smrg		CFLAGS="$CFLAGS -Wsequence-point"
971442a55b46Smrg
97158ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5
97168ce07328Smrgprintf %s "checking if $CC supports -Wsequence-point... " >&6; }
971742a55b46Smrg		cacheid=xorg_cv_cc_flag__Wsequence_point
97188ce07328Smrg		if eval test \${$cacheid+y}
97198ce07328Smrgthen :
97208ce07328Smrg  printf %s "(cached) " >&6
97218ce07328Smrgelse $as_nop
972242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9723c582b7e3Smrg/* end confdefs.h.  */
972442a55b46Smrgint i;
9725c582b7e3Smrgint
97268ce07328Smrgmain (void)
9727c582b7e3Smrg{
972842a55b46Smrg
9729c582b7e3Smrg  ;
9730c582b7e3Smrg  return 0;
9731c582b7e3Smrg}
9732c582b7e3Smrg_ACEOF
97338ce07328Smrgif ac_fn_c_try_link "$LINENO"
97348ce07328Smrgthen :
973542a55b46Smrg  eval $cacheid=yes
97368ce07328Smrgelse $as_nop
973742a55b46Smrg  eval $cacheid=no
9738c582b7e3Smrgfi
97398ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
974042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
9741c582b7e3Smrgfi
9742c582b7e3Smrg
9743c582b7e3Smrg
974442a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
974542a55b46Smrg
974642a55b46Smrg		eval supported=\$$cacheid
97478ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
97488ce07328Smrgprintf "%s\n" "$supported" >&6; }
974942a55b46Smrg		if test "$supported" = "yes" ; then
975042a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point"
975142a55b46Smrg			found="yes"
975242a55b46Smrg		fi
975342a55b46Smrg	fi
975442a55b46Smrg
975542a55b46Smrg
975642a55b46Smrg
975742a55b46Smrg
975842a55b46Smrg
975942a55b46Smrg
976042a55b46Smrg
976142a55b46Smrg
976242a55b46Smrg
976342a55b46Smrg
976442a55b46Smrg
976542a55b46Smrg
976642a55b46Smrg
976742a55b46Smrg
976842a55b46Smrg
976942a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
977042a55b46Smrg
977142a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
977242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
97738ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
97748ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
97758ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
97768ce07328Smrgthen :
97778ce07328Smrg  printf %s "(cached) " >&6
97788ce07328Smrgelse $as_nop
977942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
978042a55b46Smrg/* end confdefs.h.  */
978142a55b46Smrgint i;
978242a55b46Smrg_ACEOF
97838ce07328Smrgif ac_fn_c_try_compile "$LINENO"
97848ce07328Smrgthen :
978542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
97868ce07328Smrgelse $as_nop
978742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
978842a55b46Smrgfi
97898ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
979042a55b46Smrgfi
97918ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
97928ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
979342a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
979442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
9795c582b7e3Smrgfi
9796c582b7e3Smrg
979742a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
979842a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
979942a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
980042a55b46Smrg	fi
980142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
98028ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
98038ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
98048ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
98058ce07328Smrgthen :
98068ce07328Smrg  printf %s "(cached) " >&6
98078ce07328Smrgelse $as_nop
980842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9809c582b7e3Smrg/* end confdefs.h.  */
981042a55b46Smrgint i;
981142a55b46Smrg_ACEOF
98128ce07328Smrgif ac_fn_c_try_compile "$LINENO"
98138ce07328Smrgthen :
981442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
98158ce07328Smrgelse $as_nop
981642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
981742a55b46Smrgfi
98188ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
981942a55b46Smrgfi
98208ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
98218ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
982242a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
982342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
982442a55b46Smrgfi
9825c582b7e3Smrg
982642a55b46Smrgfound="no"
9827c582b7e3Smrg
982842a55b46Smrg	if test $found = "no" ; then
9829e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
983042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
983142a55b46Smrg		fi
9832c582b7e3Smrg
9833e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
983442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
983542a55b46Smrg		fi
9836c582b7e3Smrg
983742a55b46Smrg		CFLAGS="$CFLAGS -Wreturn-type"
9838c582b7e3Smrg
98398ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5
98408ce07328Smrgprintf %s "checking if $CC supports -Wreturn-type... " >&6; }
984142a55b46Smrg		cacheid=xorg_cv_cc_flag__Wreturn_type
98428ce07328Smrg		if eval test \${$cacheid+y}
98438ce07328Smrgthen :
98448ce07328Smrg  printf %s "(cached) " >&6
98458ce07328Smrgelse $as_nop
984642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
984742a55b46Smrg/* end confdefs.h.  */
984842a55b46Smrgint i;
9849c582b7e3Smrgint
98508ce07328Smrgmain (void)
9851c582b7e3Smrg{
985242a55b46Smrg
9853c582b7e3Smrg  ;
9854c582b7e3Smrg  return 0;
9855c582b7e3Smrg}
9856c582b7e3Smrg_ACEOF
98578ce07328Smrgif ac_fn_c_try_link "$LINENO"
98588ce07328Smrgthen :
985942a55b46Smrg  eval $cacheid=yes
98608ce07328Smrgelse $as_nop
986142a55b46Smrg  eval $cacheid=no
9862c582b7e3Smrgfi
98638ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
986442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
9865c582b7e3Smrgfi
986642a55b46Smrg
986742a55b46Smrg
986842a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
986942a55b46Smrg
987042a55b46Smrg		eval supported=\$$cacheid
98718ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
98728ce07328Smrgprintf "%s\n" "$supported" >&6; }
987342a55b46Smrg		if test "$supported" = "yes" ; then
987442a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type"
987542a55b46Smrg			found="yes"
987642a55b46Smrg		fi
987742a55b46Smrg	fi
987842a55b46Smrg
987942a55b46Smrg
988042a55b46Smrg
988142a55b46Smrg
988242a55b46Smrg
988342a55b46Smrg
988442a55b46Smrg
988542a55b46Smrg
988642a55b46Smrg
988742a55b46Smrg
988842a55b46Smrg
988942a55b46Smrg
989042a55b46Smrg
989142a55b46Smrg
989242a55b46Smrg
989342a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
989442a55b46Smrg
989542a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
989642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
98978ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
98988ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
98998ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
99008ce07328Smrgthen :
99018ce07328Smrg  printf %s "(cached) " >&6
99028ce07328Smrgelse $as_nop
990342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9904c582b7e3Smrg/* end confdefs.h.  */
990542a55b46Smrgint i;
9906c582b7e3Smrg_ACEOF
99078ce07328Smrgif ac_fn_c_try_compile "$LINENO"
99088ce07328Smrgthen :
990942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
99108ce07328Smrgelse $as_nop
991142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
9912c582b7e3Smrgfi
99138ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9914c582b7e3Smrgfi
99158ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
99168ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
991742a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
991842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
991942a55b46Smrgfi
992042a55b46Smrg
992142a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
992242a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
992342a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
992442a55b46Smrg	fi
992542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
99268ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
99278ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
99288ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
99298ce07328Smrgthen :
99308ce07328Smrg  printf %s "(cached) " >&6
99318ce07328Smrgelse $as_nop
993242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9933c582b7e3Smrg/* end confdefs.h.  */
993442a55b46Smrgint i;
993542a55b46Smrg_ACEOF
99368ce07328Smrgif ac_fn_c_try_compile "$LINENO"
99378ce07328Smrgthen :
993842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
99398ce07328Smrgelse $as_nop
994042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
994142a55b46Smrgfi
99428ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
994342a55b46Smrgfi
99448ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
99458ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
994642a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
994742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
994842a55b46Smrgfi
9949c582b7e3Smrg
995042a55b46Smrgfound="no"
9951c582b7e3Smrg
995242a55b46Smrg	if test $found = "no" ; then
9953e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
995442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
995542a55b46Smrg		fi
9956c582b7e3Smrg
9957e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
995842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
995942a55b46Smrg		fi
9960c582b7e3Smrg
996142a55b46Smrg		CFLAGS="$CFLAGS -Wtrigraphs"
9962c582b7e3Smrg
99638ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5
99648ce07328Smrgprintf %s "checking if $CC supports -Wtrigraphs... " >&6; }
996542a55b46Smrg		cacheid=xorg_cv_cc_flag__Wtrigraphs
99668ce07328Smrg		if eval test \${$cacheid+y}
99678ce07328Smrgthen :
99688ce07328Smrg  printf %s "(cached) " >&6
99698ce07328Smrgelse $as_nop
997042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
997142a55b46Smrg/* end confdefs.h.  */
997242a55b46Smrgint i;
9973c582b7e3Smrgint
99748ce07328Smrgmain (void)
9975c582b7e3Smrg{
997642a55b46Smrg
9977c582b7e3Smrg  ;
9978c582b7e3Smrg  return 0;
9979c582b7e3Smrg}
9980c582b7e3Smrg_ACEOF
99818ce07328Smrgif ac_fn_c_try_link "$LINENO"
99828ce07328Smrgthen :
998342a55b46Smrg  eval $cacheid=yes
99848ce07328Smrgelse $as_nop
998542a55b46Smrg  eval $cacheid=no
9986c582b7e3Smrgfi
99878ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
998842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
9989c582b7e3Smrgfi
999042a55b46Smrg
999142a55b46Smrg
999242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
999342a55b46Smrg
999442a55b46Smrg		eval supported=\$$cacheid
99958ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
99968ce07328Smrgprintf "%s\n" "$supported" >&6; }
999742a55b46Smrg		if test "$supported" = "yes" ; then
999842a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs"
999942a55b46Smrg			found="yes"
1000042a55b46Smrg		fi
1000142a55b46Smrg	fi
1000242a55b46Smrg
1000342a55b46Smrg
1000442a55b46Smrg
1000542a55b46Smrg
1000642a55b46Smrg
1000742a55b46Smrg
1000842a55b46Smrg
1000942a55b46Smrg
1001042a55b46Smrg
1001142a55b46Smrg
1001242a55b46Smrg
1001342a55b46Smrg
1001442a55b46Smrg
1001542a55b46Smrg
1001642a55b46Smrg
1001742a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
1001842a55b46Smrg
1001942a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1002042a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
100218ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
100228ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
100238ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
100248ce07328Smrgthen :
100258ce07328Smrg  printf %s "(cached) " >&6
100268ce07328Smrgelse $as_nop
1002742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1002842a55b46Smrg/* end confdefs.h.  */
1002942a55b46Smrgint i;
10030c582b7e3Smrg_ACEOF
100318ce07328Smrgif ac_fn_c_try_compile "$LINENO"
100328ce07328Smrgthen :
1003342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
100348ce07328Smrgelse $as_nop
1003542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1003642a55b46Smrgfi
100378ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1003842a55b46Smrgfi
100398ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
100408ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1004142a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1004242a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1004342a55b46Smrgfi
1004442a55b46Smrg
1004542a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1004642a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1004742a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1004842a55b46Smrg	fi
1004942a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
100508ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
100518ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
100528ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
100538ce07328Smrgthen :
100548ce07328Smrg  printf %s "(cached) " >&6
100558ce07328Smrgelse $as_nop
1005642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10057c582b7e3Smrg/* end confdefs.h.  */
1005842a55b46Smrgint i;
1005942a55b46Smrg_ACEOF
100608ce07328Smrgif ac_fn_c_try_compile "$LINENO"
100618ce07328Smrgthen :
1006242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
100638ce07328Smrgelse $as_nop
1006442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1006542a55b46Smrgfi
100668ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1006742a55b46Smrgfi
100688ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
100698ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1007042a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1007142a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1007242a55b46Smrgfi
10073c582b7e3Smrg
1007442a55b46Smrgfound="no"
1007542a55b46Smrg
1007642a55b46Smrg	if test $found = "no" ; then
10077e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1007842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1007942a55b46Smrg		fi
1008042a55b46Smrg
10081e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1008242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1008342a55b46Smrg		fi
1008442a55b46Smrg
1008542a55b46Smrg		CFLAGS="$CFLAGS -Warray-bounds"
1008642a55b46Smrg
100878ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5
100888ce07328Smrgprintf %s "checking if $CC supports -Warray-bounds... " >&6; }
1008942a55b46Smrg		cacheid=xorg_cv_cc_flag__Warray_bounds
100908ce07328Smrg		if eval test \${$cacheid+y}
100918ce07328Smrgthen :
100928ce07328Smrg  printf %s "(cached) " >&6
100938ce07328Smrgelse $as_nop
1009442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1009542a55b46Smrg/* end confdefs.h.  */
1009642a55b46Smrgint i;
10097c582b7e3Smrgint
100988ce07328Smrgmain (void)
10099c582b7e3Smrg{
1010042a55b46Smrg
10101c582b7e3Smrg  ;
10102c582b7e3Smrg  return 0;
10103c582b7e3Smrg}
10104c582b7e3Smrg_ACEOF
101058ce07328Smrgif ac_fn_c_try_link "$LINENO"
101068ce07328Smrgthen :
1010742a55b46Smrg  eval $cacheid=yes
101088ce07328Smrgelse $as_nop
1010942a55b46Smrg  eval $cacheid=no
1011042a55b46Smrgfi
101118ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1011242a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1011342a55b46Smrgfi
1011442a55b46Smrg
1011542a55b46Smrg
1011642a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
1011742a55b46Smrg
1011842a55b46Smrg		eval supported=\$$cacheid
101198ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
101208ce07328Smrgprintf "%s\n" "$supported" >&6; }
1012142a55b46Smrg		if test "$supported" = "yes" ; then
1012242a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds"
1012342a55b46Smrg			found="yes"
1012442a55b46Smrg		fi
1012542a55b46Smrg	fi
1012642a55b46Smrg
1012742a55b46Smrg
1012842a55b46Smrg
1012942a55b46Smrg
1013042a55b46Smrg
1013142a55b46Smrg
1013242a55b46Smrg
1013342a55b46Smrg
1013442a55b46Smrg
1013542a55b46Smrg
10136c582b7e3Smrg
10137c582b7e3Smrg
1013842a55b46Smrg
1013942a55b46Smrg
1014042a55b46Smrg
1014142a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
1014242a55b46Smrg
1014342a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1014442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
101458ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
101468ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
101478ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
101488ce07328Smrgthen :
101498ce07328Smrg  printf %s "(cached) " >&6
101508ce07328Smrgelse $as_nop
1015142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1015242a55b46Smrg/* end confdefs.h.  */
1015342a55b46Smrgint i;
10154c582b7e3Smrg_ACEOF
101558ce07328Smrgif ac_fn_c_try_compile "$LINENO"
101568ce07328Smrgthen :
1015742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
101588ce07328Smrgelse $as_nop
1015942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1016042a55b46Smrgfi
101618ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1016242a55b46Smrgfi
101638ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
101648ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1016542a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1016642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1016742a55b46Smrgfi
1016842a55b46Smrg
1016942a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1017042a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1017142a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1017242a55b46Smrg	fi
1017342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
101748ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
101758ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
101768ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
101778ce07328Smrgthen :
101788ce07328Smrg  printf %s "(cached) " >&6
101798ce07328Smrgelse $as_nop
1018042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10181c582b7e3Smrg/* end confdefs.h.  */
1018242a55b46Smrgint i;
1018342a55b46Smrg_ACEOF
101848ce07328Smrgif ac_fn_c_try_compile "$LINENO"
101858ce07328Smrgthen :
1018642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
101878ce07328Smrgelse $as_nop
1018842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1018942a55b46Smrgfi
101908ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1019142a55b46Smrgfi
101928ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
101938ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1019442a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1019542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1019642a55b46Smrgfi
10197c582b7e3Smrg
1019842a55b46Smrgfound="no"
1019942a55b46Smrg
1020042a55b46Smrg	if test $found = "no" ; then
10201e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1020242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1020342a55b46Smrg		fi
1020442a55b46Smrg
10205e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1020642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1020742a55b46Smrg		fi
1020842a55b46Smrg
1020942a55b46Smrg		CFLAGS="$CFLAGS -Wwrite-strings"
1021042a55b46Smrg
102118ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5
102128ce07328Smrgprintf %s "checking if $CC supports -Wwrite-strings... " >&6; }
1021342a55b46Smrg		cacheid=xorg_cv_cc_flag__Wwrite_strings
102148ce07328Smrg		if eval test \${$cacheid+y}
102158ce07328Smrgthen :
102168ce07328Smrg  printf %s "(cached) " >&6
102178ce07328Smrgelse $as_nop
1021842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1021942a55b46Smrg/* end confdefs.h.  */
1022042a55b46Smrgint i;
10221c582b7e3Smrgint
102228ce07328Smrgmain (void)
10223c582b7e3Smrg{
1022442a55b46Smrg
10225c582b7e3Smrg  ;
10226c582b7e3Smrg  return 0;
10227c582b7e3Smrg}
10228c582b7e3Smrg_ACEOF
102298ce07328Smrgif ac_fn_c_try_link "$LINENO"
102308ce07328Smrgthen :
1023142a55b46Smrg  eval $cacheid=yes
102328ce07328Smrgelse $as_nop
1023342a55b46Smrg  eval $cacheid=no
10234c582b7e3Smrgfi
102358ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1023642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
10237c582b7e3Smrgfi
1023842a55b46Smrg
1023942a55b46Smrg
1024042a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
1024142a55b46Smrg
1024242a55b46Smrg		eval supported=\$$cacheid
102438ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
102448ce07328Smrgprintf "%s\n" "$supported" >&6; }
1024542a55b46Smrg		if test "$supported" = "yes" ; then
1024642a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings"
1024742a55b46Smrg			found="yes"
1024842a55b46Smrg		fi
1024942a55b46Smrg	fi
1025042a55b46Smrg
1025142a55b46Smrg
1025242a55b46Smrg
1025342a55b46Smrg
1025442a55b46Smrg
1025542a55b46Smrg
1025642a55b46Smrg
1025742a55b46Smrg
1025842a55b46Smrg
1025942a55b46Smrg
1026042a55b46Smrg
1026142a55b46Smrg
1026242a55b46Smrg
1026342a55b46Smrg
1026442a55b46Smrg
1026542a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
1026642a55b46Smrg
1026742a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1026842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
102698ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
102708ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
102718ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
102728ce07328Smrgthen :
102738ce07328Smrg  printf %s "(cached) " >&6
102748ce07328Smrgelse $as_nop
1027542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1027642a55b46Smrg/* end confdefs.h.  */
1027742a55b46Smrgint i;
10278c582b7e3Smrg_ACEOF
102798ce07328Smrgif ac_fn_c_try_compile "$LINENO"
102808ce07328Smrgthen :
1028142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
102828ce07328Smrgelse $as_nop
1028342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1028442a55b46Smrgfi
102858ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1028642a55b46Smrgfi
102878ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
102888ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1028942a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1029042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1029142a55b46Smrgfi
1029242a55b46Smrg
1029342a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1029442a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1029542a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1029642a55b46Smrg	fi
1029742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
102988ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
102998ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
103008ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
103018ce07328Smrgthen :
103028ce07328Smrg  printf %s "(cached) " >&6
103038ce07328Smrgelse $as_nop
1030442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10305c582b7e3Smrg/* end confdefs.h.  */
1030642a55b46Smrgint i;
1030742a55b46Smrg_ACEOF
103088ce07328Smrgif ac_fn_c_try_compile "$LINENO"
103098ce07328Smrgthen :
1031042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
103118ce07328Smrgelse $as_nop
1031242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1031342a55b46Smrgfi
103148ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1031542a55b46Smrgfi
103168ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
103178ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1031842a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1031942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1032042a55b46Smrgfi
10321c582b7e3Smrg
1032242a55b46Smrgfound="no"
1032342a55b46Smrg
1032442a55b46Smrg	if test $found = "no" ; then
10325e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1032642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1032742a55b46Smrg		fi
1032842a55b46Smrg
10329e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1033042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1033142a55b46Smrg		fi
1033242a55b46Smrg
1033342a55b46Smrg		CFLAGS="$CFLAGS -Waddress"
1033442a55b46Smrg
103358ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5
103368ce07328Smrgprintf %s "checking if $CC supports -Waddress... " >&6; }
1033742a55b46Smrg		cacheid=xorg_cv_cc_flag__Waddress
103388ce07328Smrg		if eval test \${$cacheid+y}
103398ce07328Smrgthen :
103408ce07328Smrg  printf %s "(cached) " >&6
103418ce07328Smrgelse $as_nop
1034242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1034342a55b46Smrg/* end confdefs.h.  */
1034442a55b46Smrgint i;
10345c582b7e3Smrgint
103468ce07328Smrgmain (void)
10347c582b7e3Smrg{
1034842a55b46Smrg
10349c582b7e3Smrg  ;
10350c582b7e3Smrg  return 0;
10351c582b7e3Smrg}
10352c582b7e3Smrg_ACEOF
103538ce07328Smrgif ac_fn_c_try_link "$LINENO"
103548ce07328Smrgthen :
1035542a55b46Smrg  eval $cacheid=yes
103568ce07328Smrgelse $as_nop
1035742a55b46Smrg  eval $cacheid=no
10358c582b7e3Smrgfi
103598ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1036042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
10361c582b7e3Smrgfi
10362c582b7e3Smrg
10363c582b7e3Smrg
1036442a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
10365c582b7e3Smrg
1036642a55b46Smrg		eval supported=\$$cacheid
103678ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
103688ce07328Smrgprintf "%s\n" "$supported" >&6; }
1036942a55b46Smrg		if test "$supported" = "yes" ; then
1037042a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Waddress"
1037142a55b46Smrg			found="yes"
1037242a55b46Smrg		fi
1037342a55b46Smrg	fi
10374c582b7e3Smrg
10375c582b7e3Smrg
10376c582b7e3Smrg
10377c582b7e3Smrg
10378c582b7e3Smrg
10379c582b7e3Smrg
10380c582b7e3Smrg
10381c582b7e3Smrg
10382c582b7e3Smrg
10383c582b7e3Smrg
10384c582b7e3Smrg
10385c582b7e3Smrg
10386c582b7e3Smrg
1038742a55b46Smrg
1038842a55b46Smrg
1038942a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
1039042a55b46Smrg
1039142a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1039242a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
103938ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
103948ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
103958ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
103968ce07328Smrgthen :
103978ce07328Smrg  printf %s "(cached) " >&6
103988ce07328Smrgelse $as_nop
1039942a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1040042a55b46Smrg/* end confdefs.h.  */
1040142a55b46Smrgint i;
1040242a55b46Smrg_ACEOF
104038ce07328Smrgif ac_fn_c_try_compile "$LINENO"
104048ce07328Smrgthen :
1040542a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
104068ce07328Smrgelse $as_nop
1040742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1040842a55b46Smrgfi
104098ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1041042a55b46Smrgfi
104118ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
104128ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1041342a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1041442a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1041542a55b46Smrgfi
10416c582b7e3Smrg
1041742a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1041842a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1041942a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1042042a55b46Smrg	fi
1042142a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
104228ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
104238ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
104248ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
104258ce07328Smrgthen :
104268ce07328Smrg  printf %s "(cached) " >&6
104278ce07328Smrgelse $as_nop
1042842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1042942a55b46Smrg/* end confdefs.h.  */
1043042a55b46Smrgint i;
1043142a55b46Smrg_ACEOF
104328ce07328Smrgif ac_fn_c_try_compile "$LINENO"
104338ce07328Smrgthen :
1043442a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
104358ce07328Smrgelse $as_nop
1043642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1043742a55b46Smrgfi
104388ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1043942a55b46Smrgfi
104408ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
104418ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1044242a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1044342a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1044442a55b46Smrgfi
10445c582b7e3Smrg
1044642a55b46Smrgfound="no"
10447c582b7e3Smrg
1044842a55b46Smrg	if test $found = "no" ; then
10449e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1045042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1045142a55b46Smrg		fi
10452c582b7e3Smrg
10453e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1045442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1045542a55b46Smrg		fi
10456c582b7e3Smrg
1045742a55b46Smrg		CFLAGS="$CFLAGS -Wint-to-pointer-cast"
10458c582b7e3Smrg
104598ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5
104608ce07328Smrgprintf %s "checking if $CC supports -Wint-to-pointer-cast... " >&6; }
1046142a55b46Smrg		cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast
104628ce07328Smrg		if eval test \${$cacheid+y}
104638ce07328Smrgthen :
104648ce07328Smrg  printf %s "(cached) " >&6
104658ce07328Smrgelse $as_nop
1046642a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1046742a55b46Smrg/* end confdefs.h.  */
1046842a55b46Smrgint i;
1046942a55b46Smrgint
104708ce07328Smrgmain (void)
10471c582b7e3Smrg{
10472c582b7e3Smrg
1047342a55b46Smrg  ;
1047442a55b46Smrg  return 0;
10475c582b7e3Smrg}
1047642a55b46Smrg_ACEOF
104778ce07328Smrgif ac_fn_c_try_link "$LINENO"
104788ce07328Smrgthen :
1047942a55b46Smrg  eval $cacheid=yes
104808ce07328Smrgelse $as_nop
1048142a55b46Smrg  eval $cacheid=no
1048242a55b46Smrgfi
104838ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1048442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
10485c582b7e3Smrgfi
10486c582b7e3Smrg
10487c582b7e3Smrg
1048842a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
10489c582b7e3Smrg
1049042a55b46Smrg		eval supported=\$$cacheid
104918ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
104928ce07328Smrgprintf "%s\n" "$supported" >&6; }
1049342a55b46Smrg		if test "$supported" = "yes" ; then
1049442a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast"
1049542a55b46Smrg			found="yes"
1049642a55b46Smrg		fi
1049742a55b46Smrg	fi
1049842a55b46Smrg
1049942a55b46Smrg
1050042a55b46Smrg
1050142a55b46Smrg
1050242a55b46Smrg
1050342a55b46Smrg
1050442a55b46Smrg
1050542a55b46Smrg
1050642a55b46Smrg
1050742a55b46Smrg
1050842a55b46Smrg
1050942a55b46Smrg
1051042a55b46Smrg
1051142a55b46Smrg
1051242a55b46Smrg
1051342a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
1051442a55b46Smrg
1051542a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1051642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
105178ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
105188ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
105198ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
105208ce07328Smrgthen :
105218ce07328Smrg  printf %s "(cached) " >&6
105228ce07328Smrgelse $as_nop
1052342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1052442a55b46Smrg/* end confdefs.h.  */
1052542a55b46Smrgint i;
1052642a55b46Smrg_ACEOF
105278ce07328Smrgif ac_fn_c_try_compile "$LINENO"
105288ce07328Smrgthen :
1052942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
105308ce07328Smrgelse $as_nop
1053142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1053242a55b46Smrgfi
105338ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1053442a55b46Smrgfi
105358ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
105368ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1053742a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1053842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1053942a55b46Smrgfi
10540c582b7e3Smrg
1054142a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1054242a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1054342a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1054442a55b46Smrg	fi
1054542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
105468ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
105478ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
105488ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
105498ce07328Smrgthen :
105508ce07328Smrg  printf %s "(cached) " >&6
105518ce07328Smrgelse $as_nop
1055242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1055342a55b46Smrg/* end confdefs.h.  */
1055442a55b46Smrgint i;
1055542a55b46Smrg_ACEOF
105568ce07328Smrgif ac_fn_c_try_compile "$LINENO"
105578ce07328Smrgthen :
1055842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
105598ce07328Smrgelse $as_nop
1056042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1056142a55b46Smrgfi
105628ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1056342a55b46Smrgfi
105648ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
105658ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1056642a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1056742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1056842a55b46Smrgfi
10569c582b7e3Smrg
1057042a55b46Smrgfound="no"
10571c582b7e3Smrg
1057242a55b46Smrg	if test $found = "no" ; then
10573e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1057442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1057542a55b46Smrg		fi
10576c582b7e3Smrg
10577e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1057842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1057942a55b46Smrg		fi
10580c582b7e3Smrg
1058142a55b46Smrg		CFLAGS="$CFLAGS -Wpointer-to-int-cast"
10582c582b7e3Smrg
105838ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5
105848ce07328Smrgprintf %s "checking if $CC supports -Wpointer-to-int-cast... " >&6; }
1058542a55b46Smrg		cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast
105868ce07328Smrg		if eval test \${$cacheid+y}
105878ce07328Smrgthen :
105888ce07328Smrg  printf %s "(cached) " >&6
105898ce07328Smrgelse $as_nop
1059042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1059142a55b46Smrg/* end confdefs.h.  */
1059242a55b46Smrgint i;
1059342a55b46Smrgint
105948ce07328Smrgmain (void)
10595c582b7e3Smrg{
10596c582b7e3Smrg
1059742a55b46Smrg  ;
1059842a55b46Smrg  return 0;
10599c582b7e3Smrg}
1060042a55b46Smrg_ACEOF
106018ce07328Smrgif ac_fn_c_try_link "$LINENO"
106028ce07328Smrgthen :
1060342a55b46Smrg  eval $cacheid=yes
106048ce07328Smrgelse $as_nop
1060542a55b46Smrg  eval $cacheid=no
10606c582b7e3Smrgfi
106078ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1060842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1060942a55b46Smrgfi
1061042a55b46Smrg
1061142a55b46Smrg
1061242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
1061342a55b46Smrg
1061442a55b46Smrg		eval supported=\$$cacheid
106158ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
106168ce07328Smrgprintf "%s\n" "$supported" >&6; }
1061742a55b46Smrg		if test "$supported" = "yes" ; then
1061842a55b46Smrg			BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast"
1061942a55b46Smrg			found="yes"
1062042a55b46Smrg		fi
1062142a55b46Smrg	fi
10622c582b7e3Smrg
10623c582b7e3Smrg
10624c582b7e3Smrgfi
10625c582b7e3Smrg
10626c582b7e3Smrg
10627c582b7e3Smrg
1062842a55b46Smrg
1062942a55b46Smrg
1063042a55b46Smrg
1063142a55b46Smrg
1063242a55b46Smrg		CWARNFLAGS="$BASE_CFLAGS"
1063342a55b46Smrg		if  test "x$GCC" = xyes ; then
1063442a55b46Smrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
1063542a55b46Smrg		fi
1063642a55b46Smrg
1063742a55b46Smrg
1063842a55b46Smrg
1063942a55b46Smrg
1064042a55b46Smrg
1064142a55b46Smrg
1064242a55b46Smrg
1064342a55b46Smrg
1064442a55b46Smrg# Check whether --enable-strict-compilation was given.
106458ce07328Smrgif test ${enable_strict_compilation+y}
106468ce07328Smrgthen :
1064742a55b46Smrg  enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
106488ce07328Smrgelse $as_nop
1064942a55b46Smrg  STRICT_COMPILE=no
10650c582b7e3Smrgfi
10651c582b7e3Smrg
10652c582b7e3Smrg
10653c582b7e3Smrg
10654c582b7e3Smrg
10655c582b7e3Smrg
10656c582b7e3Smrg
1065742a55b46SmrgSTRICT_CFLAGS=""
10658c582b7e3Smrg
10659c582b7e3Smrg
10660c582b7e3Smrg
10661c582b7e3Smrg
10662c582b7e3Smrg
10663c582b7e3Smrg
10664c582b7e3Smrg
10665c582b7e3Smrg
10666c582b7e3Smrg
10667c582b7e3Smrg
10668c582b7e3Smrg
10669c582b7e3Smrg
10670c582b7e3Smrg
1067142a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
10672c582b7e3Smrg
1067342a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1067442a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
106758ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
106768ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
106778ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
106788ce07328Smrgthen :
106798ce07328Smrg  printf %s "(cached) " >&6
106808ce07328Smrgelse $as_nop
1068142a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1068242a55b46Smrg/* end confdefs.h.  */
1068342a55b46Smrgint i;
1068442a55b46Smrg_ACEOF
106858ce07328Smrgif ac_fn_c_try_compile "$LINENO"
106868ce07328Smrgthen :
1068742a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
106888ce07328Smrgelse $as_nop
1068942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1069042a55b46Smrgfi
106918ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1069242a55b46Smrgfi
106938ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
106948ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1069542a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1069642a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1069742a55b46Smrgfi
10698c582b7e3Smrg
1069942a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1070042a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1070142a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1070242a55b46Smrg	fi
1070342a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
107048ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
107058ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
107068ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
107078ce07328Smrgthen :
107088ce07328Smrg  printf %s "(cached) " >&6
107098ce07328Smrgelse $as_nop
1071042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1071142a55b46Smrg/* end confdefs.h.  */
1071242a55b46Smrgint i;
1071342a55b46Smrg_ACEOF
107148ce07328Smrgif ac_fn_c_try_compile "$LINENO"
107158ce07328Smrgthen :
1071642a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
107178ce07328Smrgelse $as_nop
1071842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1071942a55b46Smrgfi
107208ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1072142a55b46Smrgfi
107228ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
107238ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1072442a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1072542a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1072642a55b46Smrgfi
10727c582b7e3Smrg
1072842a55b46Smrgfound="no"
10729c582b7e3Smrg
1073042a55b46Smrg	if test $found = "no" ; then
10731e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1073242a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1073342a55b46Smrg		fi
10734c582b7e3Smrg
10735e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1073642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1073742a55b46Smrg		fi
10738c582b7e3Smrg
1073942a55b46Smrg		CFLAGS="$CFLAGS -pedantic"
10740c582b7e3Smrg
107418ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5
107428ce07328Smrgprintf %s "checking if $CC supports -pedantic... " >&6; }
1074342a55b46Smrg		cacheid=xorg_cv_cc_flag__pedantic
107448ce07328Smrg		if eval test \${$cacheid+y}
107458ce07328Smrgthen :
107468ce07328Smrg  printf %s "(cached) " >&6
107478ce07328Smrgelse $as_nop
1074842a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1074942a55b46Smrg/* end confdefs.h.  */
1075042a55b46Smrgint i;
1075142a55b46Smrgint
107528ce07328Smrgmain (void)
1075342a55b46Smrg{
10754c582b7e3Smrg
1075542a55b46Smrg  ;
1075642a55b46Smrg  return 0;
1075742a55b46Smrg}
1075842a55b46Smrg_ACEOF
107598ce07328Smrgif ac_fn_c_try_link "$LINENO"
107608ce07328Smrgthen :
1076142a55b46Smrg  eval $cacheid=yes
107628ce07328Smrgelse $as_nop
1076342a55b46Smrg  eval $cacheid=no
1076442a55b46Smrgfi
107658ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1076642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1076742a55b46Smrgfi
1076842a55b46Smrg
1076942a55b46Smrg
1077042a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
1077142a55b46Smrg
1077242a55b46Smrg		eval supported=\$$cacheid
107738ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
107748ce07328Smrgprintf "%s\n" "$supported" >&6; }
1077542a55b46Smrg		if test "$supported" = "yes" ; then
1077642a55b46Smrg			STRICT_CFLAGS="$STRICT_CFLAGS -pedantic"
1077742a55b46Smrg			found="yes"
1077842a55b46Smrg		fi
1077942a55b46Smrg	fi
10780c582b7e3Smrg
10781c582b7e3Smrg
10782c582b7e3Smrg
10783c582b7e3Smrg
10784c582b7e3Smrg
10785c582b7e3Smrg
10786c582b7e3Smrg
10787c582b7e3Smrg
10788c582b7e3Smrg
10789c582b7e3Smrg
10790c582b7e3Smrg
10791c582b7e3Smrg
10792c582b7e3Smrg
10793c582b7e3Smrg
10794c582b7e3Smrg
1079542a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
10796c582b7e3Smrg
1079742a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1079842a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
107998ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
108008ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
108018ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
108028ce07328Smrgthen :
108038ce07328Smrg  printf %s "(cached) " >&6
108048ce07328Smrgelse $as_nop
1080542a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1080642a55b46Smrg/* end confdefs.h.  */
1080742a55b46Smrgint i;
1080842a55b46Smrg_ACEOF
108098ce07328Smrgif ac_fn_c_try_compile "$LINENO"
108108ce07328Smrgthen :
1081142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
108128ce07328Smrgelse $as_nop
1081342a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1081442a55b46Smrgfi
108158ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1081642a55b46Smrgfi
108178ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
108188ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1081942a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1082042a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1082142a55b46Smrgfi
10822c582b7e3Smrg
1082342a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1082442a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1082542a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1082642a55b46Smrg	fi
1082742a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
108288ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
108298ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
108308ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
108318ce07328Smrgthen :
108328ce07328Smrg  printf %s "(cached) " >&6
108338ce07328Smrgelse $as_nop
1083442a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1083542a55b46Smrg/* end confdefs.h.  */
1083642a55b46Smrgint i;
1083742a55b46Smrg_ACEOF
108388ce07328Smrgif ac_fn_c_try_compile "$LINENO"
108398ce07328Smrgthen :
1084042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
108418ce07328Smrgelse $as_nop
1084242a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1084342a55b46Smrgfi
108448ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1084542a55b46Smrgfi
108468ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
108478ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1084842a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1084942a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1085042a55b46Smrgfi
10851c582b7e3Smrg
1085242a55b46Smrgfound="no"
10853c582b7e3Smrg
1085442a55b46Smrg	if test $found = "no" ; then
10855e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1085642a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1085742a55b46Smrg		fi
10858c582b7e3Smrg
10859e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1086042a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1086142a55b46Smrg		fi
10862c582b7e3Smrg
1086342a55b46Smrg		CFLAGS="$CFLAGS -Werror"
10864c582b7e3Smrg
108658ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
108668ce07328Smrgprintf %s "checking if $CC supports -Werror... " >&6; }
1086742a55b46Smrg		cacheid=xorg_cv_cc_flag__Werror
108688ce07328Smrg		if eval test \${$cacheid+y}
108698ce07328Smrgthen :
108708ce07328Smrg  printf %s "(cached) " >&6
108718ce07328Smrgelse $as_nop
1087242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1087342a55b46Smrg/* end confdefs.h.  */
1087442a55b46Smrgint i;
1087542a55b46Smrgint
108768ce07328Smrgmain (void)
1087742a55b46Smrg{
10878c582b7e3Smrg
1087942a55b46Smrg  ;
1088042a55b46Smrg  return 0;
1088142a55b46Smrg}
1088242a55b46Smrg_ACEOF
108838ce07328Smrgif ac_fn_c_try_link "$LINENO"
108848ce07328Smrgthen :
1088542a55b46Smrg  eval $cacheid=yes
108868ce07328Smrgelse $as_nop
1088742a55b46Smrg  eval $cacheid=no
1088842a55b46Smrgfi
108898ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1089042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1089142a55b46Smrgfi
10892c582b7e3Smrg
10893c582b7e3Smrg
1089442a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
10895c582b7e3Smrg
1089642a55b46Smrg		eval supported=\$$cacheid
108978ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
108988ce07328Smrgprintf "%s\n" "$supported" >&6; }
1089942a55b46Smrg		if test "$supported" = "yes" ; then
1090042a55b46Smrg			STRICT_CFLAGS="$STRICT_CFLAGS -Werror"
1090142a55b46Smrg			found="yes"
1090242a55b46Smrg		fi
1090342a55b46Smrg	fi
10904c582b7e3Smrg
1090542a55b46Smrg	if test $found = "no" ; then
10906e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1090742a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1090842a55b46Smrg		fi
10909c582b7e3Smrg
10910e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1091142a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1091242a55b46Smrg		fi
10913c582b7e3Smrg
1091442a55b46Smrg		CFLAGS="$CFLAGS -errwarn"
10915c582b7e3Smrg
109168ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5
109178ce07328Smrgprintf %s "checking if $CC supports -errwarn... " >&6; }
1091842a55b46Smrg		cacheid=xorg_cv_cc_flag__errwarn
109198ce07328Smrg		if eval test \${$cacheid+y}
109208ce07328Smrgthen :
109218ce07328Smrg  printf %s "(cached) " >&6
109228ce07328Smrgelse $as_nop
1092342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1092442a55b46Smrg/* end confdefs.h.  */
1092542a55b46Smrgint i;
1092642a55b46Smrgint
109278ce07328Smrgmain (void)
1092842a55b46Smrg{
10929c582b7e3Smrg
1093042a55b46Smrg  ;
1093142a55b46Smrg  return 0;
1093242a55b46Smrg}
1093342a55b46Smrg_ACEOF
109348ce07328Smrgif ac_fn_c_try_link "$LINENO"
109358ce07328Smrgthen :
1093642a55b46Smrg  eval $cacheid=yes
109378ce07328Smrgelse $as_nop
1093842a55b46Smrg  eval $cacheid=no
1093942a55b46Smrgfi
109408ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1094142a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1094242a55b46Smrgfi
10943c582b7e3Smrg
10944c582b7e3Smrg
1094542a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
10946c582b7e3Smrg
1094742a55b46Smrg		eval supported=\$$cacheid
109488ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
109498ce07328Smrgprintf "%s\n" "$supported" >&6; }
1095042a55b46Smrg		if test "$supported" = "yes" ; then
1095142a55b46Smrg			STRICT_CFLAGS="$STRICT_CFLAGS -errwarn"
1095242a55b46Smrg			found="yes"
1095342a55b46Smrg		fi
1095442a55b46Smrg	fi
10955c582b7e3Smrg
10956c582b7e3Smrg
10957c582b7e3Smrg
1095842a55b46Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
1095942a55b46Smrg# activate it with -Werror, so we add it here explicitly.
10960c582b7e3Smrg
10961c582b7e3Smrg
10962c582b7e3Smrg
10963c582b7e3Smrg
10964c582b7e3Smrg
10965c582b7e3Smrg
10966c582b7e3Smrg
10967c582b7e3Smrg
10968c582b7e3Smrg
10969c582b7e3Smrg
10970c582b7e3Smrg
10971c582b7e3Smrg
1097219019ffeSmrg
1097342a55b46Smrgxorg_testset_save_CFLAGS="$CFLAGS"
10974c582b7e3Smrg
1097542a55b46Smrgif test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then
1097642a55b46Smrg	CFLAGS="$CFLAGS -Werror=unknown-warning-option"
109778ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5
109788ce07328Smrgprintf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; }
109798ce07328Smrgif test ${xorg_cv_cc_flag_unknown_warning_option+y}
109808ce07328Smrgthen :
109818ce07328Smrg  printf %s "(cached) " >&6
109828ce07328Smrgelse $as_nop
1098342a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1098442a55b46Smrg/* end confdefs.h.  */
1098542a55b46Smrgint i;
1098642a55b46Smrg_ACEOF
109878ce07328Smrgif ac_fn_c_try_compile "$LINENO"
109888ce07328Smrgthen :
1098942a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=yes
109908ce07328Smrgelse $as_nop
1099142a55b46Smrg  xorg_cv_cc_flag_unknown_warning_option=no
1099242a55b46Smrgfi
109938ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1099442a55b46Smrgfi
109958ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5
109968ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; }
1099742a55b46Smrg	xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option
1099842a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1099942a55b46Smrgfi
11000c582b7e3Smrg
1100142a55b46Smrgif test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then
1100242a55b46Smrg	if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1100342a55b46Smrg		CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1100442a55b46Smrg	fi
1100542a55b46Smrg	CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
110068ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5
110078ce07328Smrgprintf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; }
110088ce07328Smrgif test ${xorg_cv_cc_flag_unused_command_line_argument+y}
110098ce07328Smrgthen :
110108ce07328Smrg  printf %s "(cached) " >&6
110118ce07328Smrgelse $as_nop
1101242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1101342a55b46Smrg/* end confdefs.h.  */
1101442a55b46Smrgint i;
1101542a55b46Smrg_ACEOF
110168ce07328Smrgif ac_fn_c_try_compile "$LINENO"
110178ce07328Smrgthen :
1101842a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=yes
110198ce07328Smrgelse $as_nop
1102042a55b46Smrg  xorg_cv_cc_flag_unused_command_line_argument=no
1102142a55b46Smrgfi
110228ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1102342a55b46Smrgfi
110248ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5
110258ce07328Smrgprintf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; }
1102642a55b46Smrg	xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument
1102742a55b46Smrg	CFLAGS="$xorg_testset_save_CFLAGS"
1102842a55b46Smrgfi
11029c582b7e3Smrg
1103042a55b46Smrgfound="no"
11031c582b7e3Smrg
1103242a55b46Smrg	if test $found = "no" ; then
11033e3d74329Smrg		if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
1103442a55b46Smrg			CFLAGS="$CFLAGS -Werror=unknown-warning-option"
1103542a55b46Smrg		fi
11036c582b7e3Smrg
11037e3d74329Smrg		if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
1103842a55b46Smrg			CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
1103942a55b46Smrg		fi
11040c582b7e3Smrg
1104142a55b46Smrg		CFLAGS="$CFLAGS -Werror=attributes"
11042c582b7e3Smrg
110438ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5
110448ce07328Smrgprintf %s "checking if $CC supports -Werror=attributes... " >&6; }
110450496e070Smrg		cacheid=xorg_cv_cc_flag__Werror_attributes
110468ce07328Smrg		if eval test \${$cacheid+y}
110478ce07328Smrgthen :
110488ce07328Smrg  printf %s "(cached) " >&6
110498ce07328Smrgelse $as_nop
1105042a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1105142a55b46Smrg/* end confdefs.h.  */
1105242a55b46Smrgint i;
1105342a55b46Smrgint
110548ce07328Smrgmain (void)
1105542a55b46Smrg{
11056c582b7e3Smrg
1105742a55b46Smrg  ;
1105842a55b46Smrg  return 0;
1105942a55b46Smrg}
1106042a55b46Smrg_ACEOF
110618ce07328Smrgif ac_fn_c_try_link "$LINENO"
110628ce07328Smrgthen :
1106342a55b46Smrg  eval $cacheid=yes
110648ce07328Smrgelse $as_nop
1106542a55b46Smrg  eval $cacheid=no
1106642a55b46Smrgfi
110678ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1106842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1106942a55b46Smrgfi
11070c582b7e3Smrg
11071c582b7e3Smrg
1107242a55b46Smrg		CFLAGS="$xorg_testset_save_CFLAGS"
11073c582b7e3Smrg
1107442a55b46Smrg		eval supported=\$$cacheid
110758ce07328Smrg		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
110768ce07328Smrgprintf "%s\n" "$supported" >&6; }
1107742a55b46Smrg		if test "$supported" = "yes" ; then
1107842a55b46Smrg			STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
1107942a55b46Smrg			found="yes"
1108042a55b46Smrg		fi
1108142a55b46Smrg	fi
11082c582b7e3Smrg
11083c582b7e3Smrg
11084c582b7e3Smrg
1108542a55b46Smrgif test "x$STRICT_COMPILE" = "xyes"; then
1108642a55b46Smrg    BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS"
1108742a55b46Smrg    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
1108842a55b46Smrgfi
11089c582b7e3Smrg
11090c582b7e3Smrg
11091c582b7e3Smrg
11092c582b7e3Smrg
11093c582b7e3Smrg
11094c582b7e3Smrg
1109542a55b46Smrgcat >>confdefs.h <<_ACEOF
1109642a55b46Smrg#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
1109742a55b46Smrg_ACEOF
11098c582b7e3Smrg
1109942a55b46Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
1110042a55b46Smrg	if test "x$PVM" = "x"; then
1110142a55b46Smrg		PVM="0"
1110242a55b46Smrg	fi
11103c582b7e3Smrg
111048ce07328Smrgprintf "%s\n" "#define PACKAGE_VERSION_MINOR $PVM" >>confdefs.h
11105c582b7e3Smrg
1110642a55b46Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
1110742a55b46Smrg	if test "x$PVP" = "x"; then
1110842a55b46Smrg		PVP="0"
1110942a55b46Smrg	fi
11110c582b7e3Smrg
111118ce07328Smrgprintf "%s\n" "#define PACKAGE_VERSION_PATCHLEVEL $PVP" >>confdefs.h
11112c582b7e3Smrg
11113c582b7e3Smrg
11114c582b7e3Smrg
111158ce07328SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
1111642a55b46Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
111178ce07328Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
111188ce07328Smrgtouch \$(top_srcdir)/ChangeLog; \
111198ce07328Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
11120c582b7e3Smrg
11121c582b7e3Smrg
11122c582b7e3Smrg
11123c582b7e3Smrg
1112442a55b46Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
1112542a55b46SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
1112642a55b46Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
111278ce07328Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
111288ce07328Smrgtouch \$(top_srcdir)/INSTALL; \
111298ce07328Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
111308ce07328Smrg
111318ce07328Smrg
11132c582b7e3Smrg
11133c582b7e3Smrg
11134c582b7e3Smrg
11135c582b7e3Smrg
111368ce07328Smrgcase $host_os in
111378ce07328Smrg    solaris*)
111388ce07328Smrg        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
111398ce07328Smrg        # check for a man page file found in later versions that use
111408ce07328Smrg        # traditional section numbers instead
111418ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5
111428ce07328Smrgprintf %s "checking for /usr/share/man/man7/attributes.7... " >&6; }
111438ce07328Smrgif test ${ac_cv_file__usr_share_man_man7_attributes_7+y}
111448ce07328Smrgthen :
111458ce07328Smrg  printf %s "(cached) " >&6
111468ce07328Smrgelse $as_nop
111478ce07328Smrg  test "$cross_compiling" = yes &&
111488ce07328Smrg  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
111498ce07328Smrgif test -r "/usr/share/man/man7/attributes.7"; then
111508ce07328Smrg  ac_cv_file__usr_share_man_man7_attributes_7=yes
111518ce07328Smrgelse
111528ce07328Smrg  ac_cv_file__usr_share_man_man7_attributes_7=no
111538ce07328Smrgfi
111548ce07328Smrgfi
111558ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5
111568ce07328Smrgprintf "%s\n" "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; }
111578ce07328Smrgif test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes
111588ce07328Smrgthen :
111598ce07328Smrg  SYSV_MAN_SECTIONS=false
111608ce07328Smrgelse $as_nop
111618ce07328Smrg  SYSV_MAN_SECTIONS=true
111628ce07328Smrgfi
11163c582b7e3Smrg
111648ce07328Smrg        ;;
111658ce07328Smrg    *) SYSV_MAN_SECTIONS=false ;;
111668ce07328Smrgesac
11167c582b7e3Smrg
1116842a55b46Smrgif test x$APP_MAN_SUFFIX = x    ; then
1116942a55b46Smrg    APP_MAN_SUFFIX=1
1117042a55b46Smrgfi
1117142a55b46Smrgif test x$APP_MAN_DIR = x    ; then
1117242a55b46Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1117342a55b46Smrgfi
11174c582b7e3Smrg
1117542a55b46Smrgif test x$LIB_MAN_SUFFIX = x    ; then
1117642a55b46Smrg    LIB_MAN_SUFFIX=3
1117742a55b46Smrgfi
1117842a55b46Smrgif test x$LIB_MAN_DIR = x    ; then
1117942a55b46Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1118042a55b46Smrgfi
11181c582b7e3Smrg
1118242a55b46Smrgif test x$FILE_MAN_SUFFIX = x    ; then
111838ce07328Smrg    case $SYSV_MAN_SECTIONS in
111848ce07328Smrg	true)				FILE_MAN_SUFFIX=4  ;;
111858ce07328Smrg	*)				FILE_MAN_SUFFIX=5  ;;
1118642a55b46Smrg    esac
1118742a55b46Smrgfi
1118842a55b46Smrgif test x$FILE_MAN_DIR = x    ; then
1118942a55b46Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
11190c582b7e3Smrgfi
11191c582b7e3Smrg
1119242a55b46Smrgif test x$MISC_MAN_SUFFIX = x    ; then
111938ce07328Smrg    case $SYSV_MAN_SECTIONS in
111948ce07328Smrg	true)				MISC_MAN_SUFFIX=5  ;;
111958ce07328Smrg	*)				MISC_MAN_SUFFIX=7  ;;
1119642a55b46Smrg    esac
1119742a55b46Smrgfi
1119842a55b46Smrgif test x$MISC_MAN_DIR = x    ; then
1119942a55b46Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1120042a55b46Smrgfi
11201c582b7e3Smrg
1120242a55b46Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
112038ce07328Smrg    case $SYSV_MAN_SECTIONS in
112048ce07328Smrg	true)				DRIVER_MAN_SUFFIX=7  ;;
112058ce07328Smrg	*)				DRIVER_MAN_SUFFIX=4  ;;
1120642a55b46Smrg    esac
1120742a55b46Smrgfi
1120842a55b46Smrgif test x$DRIVER_MAN_DIR = x    ; then
1120942a55b46Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1121042a55b46Smrgfi
11211c582b7e3Smrg
1121242a55b46Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
112138ce07328Smrg    case $SYSV_MAN_SECTIONS in
112148ce07328Smrg	true)				ADMIN_MAN_SUFFIX=1m ;;
112158ce07328Smrg	*)				ADMIN_MAN_SUFFIX=8  ;;
1121642a55b46Smrg    esac
1121742a55b46Smrgfi
1121842a55b46Smrgif test x$ADMIN_MAN_DIR = x    ; then
1121942a55b46Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1122042a55b46Smrgfi
11221c582b7e3Smrg
11222c582b7e3Smrg
11223c582b7e3Smrg
11224c582b7e3Smrg
11225c582b7e3Smrg
11226c582b7e3Smrg
11227c582b7e3Smrg
11228c582b7e3Smrg
11229c582b7e3Smrg
11230c582b7e3Smrg
11231c582b7e3Smrg
11232c582b7e3Smrg
11233c582b7e3Smrg
11234c582b7e3Smrg
11235c582b7e3Smrg
1123642a55b46SmrgXORG_MAN_PAGE="X Version 11"
11237c582b7e3Smrg
1123842a55b46SmrgMAN_SUBSTS="\
1123942a55b46Smrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1124042a55b46Smrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1124142a55b46Smrg	-e 's|__xservername__|Xorg|g' \
1124242a55b46Smrg	-e 's|__xconfigfile__|xorg.conf|g' \
1124342a55b46Smrg	-e 's|__projectroot__|\$(prefix)|g' \
1124442a55b46Smrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
1124542a55b46Smrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1124642a55b46Smrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1124742a55b46Smrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1124842a55b46Smrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1124942a55b46Smrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1125042a55b46Smrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
11251c582b7e3Smrg
11252c582b7e3Smrg
11253c582b7e3Smrg
1125442a55b46Smrg# Check whether --enable-silent-rules was given.
112558ce07328Smrgif test ${enable_silent_rules+y}
112568ce07328Smrgthen :
1125742a55b46Smrg  enableval=$enable_silent_rules;
1125842a55b46Smrgfi
11259c582b7e3Smrg
11260e3d74329Smrgcase $enable_silent_rules in # (((
11261e3d74329Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
11262e3d74329Smrg   no) AM_DEFAULT_VERBOSITY=1;;
11263e3d74329Smrg    *) AM_DEFAULT_VERBOSITY=0;;
1126442a55b46Smrgesac
1126542a55b46Smrgam_make=${MAKE-make}
112668ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
112678ce07328Smrgprintf %s "checking whether $am_make supports nested variables... " >&6; }
112688ce07328Smrgif test ${am_cv_make_support_nested_variables+y}
112698ce07328Smrgthen :
112708ce07328Smrg  printf %s "(cached) " >&6
112718ce07328Smrgelse $as_nop
112728ce07328Smrg  if printf "%s\n" 'TRUE=$(BAR$(V))
1127342a55b46SmrgBAR0=false
1127442a55b46SmrgBAR1=true
1127542a55b46SmrgV=1
1127642a55b46Smrgam__doit:
1127742a55b46Smrg	@$(TRUE)
1127842a55b46Smrg.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
1127942a55b46Smrg  am_cv_make_support_nested_variables=yes
11280c582b7e3Smrgelse
1128142a55b46Smrg  am_cv_make_support_nested_variables=no
11282c582b7e3Smrgfi
1128342a55b46Smrgfi
112848ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
112858ce07328Smrgprintf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
1128642a55b46Smrgif test $am_cv_make_support_nested_variables = yes; then
1128742a55b46Smrg    AM_V='$(V)'
1128842a55b46Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
11289c582b7e3Smrgelse
1129042a55b46Smrg  AM_V=$AM_DEFAULT_VERBOSITY
1129142a55b46Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
11292c582b7e3Smrgfi
1129342a55b46SmrgAM_BACKSLASH='\'
11294c582b7e3Smrg
11295c582b7e3Smrg
11296c582b7e3Smrg
1129742a55b46Smrg# Initialize libtool
1129842a55b46Smrg# Check whether --enable-static was given.
112998ce07328Smrgif test ${enable_static+y}
113008ce07328Smrgthen :
1130142a55b46Smrg  enableval=$enable_static; p=${PACKAGE-default}
1130242a55b46Smrg    case $enableval in
1130342a55b46Smrg    yes) enable_static=yes ;;
1130442a55b46Smrg    no) enable_static=no ;;
1130542a55b46Smrg    *)
1130642a55b46Smrg     enable_static=no
1130742a55b46Smrg      # Look at the argument we got.  We use all the common list separators.
11308e3d74329Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
1130942a55b46Smrg      for pkg in $enableval; do
11310e3d74329Smrg	IFS=$lt_save_ifs
1131142a55b46Smrg	if test "X$pkg" = "X$p"; then
1131242a55b46Smrg	  enable_static=yes
1131342a55b46Smrg	fi
1131442a55b46Smrg      done
11315e3d74329Smrg      IFS=$lt_save_ifs
1131642a55b46Smrg      ;;
1131742a55b46Smrg    esac
113188ce07328Smrgelse $as_nop
1131942a55b46Smrg  enable_static=no
1132042a55b46Smrgfi
11321c582b7e3Smrg
11322c582b7e3Smrg
11323c582b7e3Smrg
11324c582b7e3Smrg
11325c582b7e3Smrg
11326c582b7e3Smrg
11327c582b7e3Smrg
11328c582b7e3Smrg
11329c582b7e3Smrg
1133042a55b46Smrgcase `pwd` in
1133142a55b46Smrg  *\ * | *\	*)
113328ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
113338ce07328Smrgprintf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
11334c582b7e3Smrgesac
11335c582b7e3Smrg
11336c582b7e3Smrg
11337c582b7e3Smrg
113388ce07328Smrgmacro_version='2.4.7'
113398ce07328Smrgmacro_revision='2.4.7'
113408ce07328Smrg
1134142a55b46Smrg
11342c582b7e3Smrg
11343c582b7e3Smrg
11344c582b7e3Smrg
11345c582b7e3Smrg
11346c582b7e3Smrg
11347c582b7e3Smrg
11348c582b7e3Smrg
11349c582b7e3Smrg
11350c582b7e3Smrg
11351c582b7e3Smrg
11352c582b7e3Smrg
11353c582b7e3Smrg
11354e3d74329Smrgltmain=$ac_aux_dir/ltmain.sh
11355c582b7e3Smrg
1135642a55b46Smrg# Backslashify metacharacters that are still active within
1135742a55b46Smrg# double-quoted strings.
1135842a55b46Smrgsed_quote_subst='s/\(["`$\\]\)/\\\1/g'
11359c582b7e3Smrg
1136042a55b46Smrg# Same as above, but do not quote variable references.
1136142a55b46Smrgdouble_quote_subst='s/\(["`\\]\)/\\\1/g'
11362c582b7e3Smrg
1136342a55b46Smrg# Sed substitution to delay expansion of an escaped shell variable in a
1136442a55b46Smrg# double_quote_subst'ed string.
1136542a55b46Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
11366c582b7e3Smrg
1136742a55b46Smrg# Sed substitution to delay expansion of an escaped single quote.
1136842a55b46Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
11369c582b7e3Smrg
1137042a55b46Smrg# Sed substitution to avoid accidental globbing in evaled expressions
1137142a55b46Smrgno_glob_subst='s/\*/\\\*/g'
11372c582b7e3Smrg
1137342a55b46SmrgECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1137442a55b46SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1137542a55b46SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1137642a55b46Smrg
113778ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
113788ce07328Smrgprintf %s "checking how to print strings... " >&6; }
1137942a55b46Smrg# Test print first, because it will be a builtin if present.
1138042a55b46Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1138142a55b46Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1138242a55b46Smrg  ECHO='print -r --'
1138342a55b46Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1138442a55b46Smrg  ECHO='printf %s\n'
1138542a55b46Smrgelse
1138642a55b46Smrg  # Use this function as a fallback that always works.
1138742a55b46Smrg  func_fallback_echo ()
1138842a55b46Smrg  {
1138942a55b46Smrg    eval 'cat <<_LTECHO_EOF
1139042a55b46Smrg$1
1139142a55b46Smrg_LTECHO_EOF'
1139242a55b46Smrg  }
1139342a55b46Smrg  ECHO='func_fallback_echo'
1139442a55b46Smrgfi
11395c582b7e3Smrg
1139642a55b46Smrg# func_echo_all arg...
1139742a55b46Smrg# Invoke $ECHO with all args, space-separated.
1139842a55b46Smrgfunc_echo_all ()
1139942a55b46Smrg{
1140042a55b46Smrg    $ECHO ""
1140142a55b46Smrg}
11402c582b7e3Smrg
11403e3d74329Smrgcase $ECHO in
114048ce07328Smrg  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
114058ce07328Smrgprintf "%s\n" "printf" >&6; } ;;
114068ce07328Smrg  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
114078ce07328Smrgprintf "%s\n" "print -r" >&6; } ;;
114088ce07328Smrg  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
114098ce07328Smrgprintf "%s\n" "cat" >&6; } ;;
114108ce07328Smrgesac
114118ce07328Smrg
114128ce07328Smrg
114138ce07328Smrg
114148ce07328Smrg
114158ce07328Smrg
114168ce07328Smrg
114178ce07328Smrg
114188ce07328Smrg
114198ce07328Smrg
114208ce07328Smrg
114218ce07328Smrg
114228ce07328Smrg
114238ce07328Smrg
114248ce07328Smrg
114258ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
114268ce07328Smrgprintf %s "checking for a sed that does not truncate output... " >&6; }
114278ce07328Smrgif test ${ac_cv_path_SED+y}
114288ce07328Smrgthen :
114298ce07328Smrg  printf %s "(cached) " >&6
114308ce07328Smrgelse $as_nop
114318ce07328Smrg            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
114328ce07328Smrg     for ac_i in 1 2 3 4 5 6 7; do
114338ce07328Smrg       ac_script="$ac_script$as_nl$ac_script"
114348ce07328Smrg     done
114358ce07328Smrg     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
114368ce07328Smrg     { ac_script=; unset ac_script;}
114378ce07328Smrg     if test -z "$SED"; then
114388ce07328Smrg  ac_path_SED_found=false
114398ce07328Smrg  # Loop through the user's path and test for each of PROGNAME-LIST
114408ce07328Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
114418ce07328Smrgfor as_dir in $PATH
114428ce07328Smrgdo
114438ce07328Smrg  IFS=$as_save_IFS
114448ce07328Smrg  case $as_dir in #(((
114458ce07328Smrg    '') as_dir=./ ;;
114468ce07328Smrg    */) ;;
114478ce07328Smrg    *) as_dir=$as_dir/ ;;
114488ce07328Smrg  esac
114498ce07328Smrg    for ac_prog in sed gsed
114508ce07328Smrg   do
114518ce07328Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
114528ce07328Smrg      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
114538ce07328Smrg      as_fn_executable_p "$ac_path_SED" || continue
114548ce07328Smrg# Check for GNU ac_path_SED and select it if it is found.
114558ce07328Smrg  # Check for GNU $ac_path_SED
114568ce07328Smrgcase `"$ac_path_SED" --version 2>&1` in
114578ce07328Smrg*GNU*)
114588ce07328Smrg  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
114598ce07328Smrg*)
114608ce07328Smrg  ac_count=0
114618ce07328Smrg  printf %s 0123456789 >"conftest.in"
114628ce07328Smrg  while :
114638ce07328Smrg  do
114648ce07328Smrg    cat "conftest.in" "conftest.in" >"conftest.tmp"
114658ce07328Smrg    mv "conftest.tmp" "conftest.in"
114668ce07328Smrg    cp "conftest.in" "conftest.nl"
114678ce07328Smrg    printf "%s\n" '' >> "conftest.nl"
114688ce07328Smrg    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
114698ce07328Smrg    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
114708ce07328Smrg    as_fn_arith $ac_count + 1 && ac_count=$as_val
114718ce07328Smrg    if test $ac_count -gt ${ac_path_SED_max-0}; then
114728ce07328Smrg      # Best one so far, save it but keep looking for a better one
114738ce07328Smrg      ac_cv_path_SED="$ac_path_SED"
114748ce07328Smrg      ac_path_SED_max=$ac_count
114758ce07328Smrg    fi
114768ce07328Smrg    # 10*(2^10) chars as input seems more than enough
114778ce07328Smrg    test $ac_count -gt 10 && break
114788ce07328Smrg  done
114798ce07328Smrg  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
114808ce07328Smrgesac
114818ce07328Smrg
114828ce07328Smrg      $ac_path_SED_found && break 3
114838ce07328Smrg    done
114848ce07328Smrg  done
114858ce07328Smrg  done
114868ce07328SmrgIFS=$as_save_IFS
114878ce07328Smrg  if test -z "$ac_cv_path_SED"; then
114888ce07328Smrg    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
114898ce07328Smrg  fi
114908ce07328Smrgelse
114918ce07328Smrg  ac_cv_path_SED=$SED
114928ce07328Smrgfi
114938ce07328Smrg
114948ce07328Smrgfi
114958ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
114968ce07328Smrgprintf "%s\n" "$ac_cv_path_SED" >&6; }
114978ce07328Smrg SED="$ac_cv_path_SED"
114988ce07328Smrg  rm -f conftest.sed
114998ce07328Smrg
115008ce07328Smrgtest -z "$SED" && SED=sed
115018ce07328SmrgXsed="$SED -e 1s/^X//"
115028ce07328Smrg
115038ce07328Smrg
115048ce07328Smrg
115058ce07328Smrg
115068ce07328Smrg
115078ce07328Smrg
115088ce07328Smrg
115098ce07328Smrg
115108ce07328Smrg
115118ce07328Smrg
115128ce07328Smrg
115138ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
115148ce07328Smrgprintf %s "checking for grep that handles long lines and -e... " >&6; }
115158ce07328Smrgif test ${ac_cv_path_GREP+y}
115168ce07328Smrgthen :
115178ce07328Smrg  printf %s "(cached) " >&6
115188ce07328Smrgelse $as_nop
115198ce07328Smrg  if test -z "$GREP"; then
115208ce07328Smrg  ac_path_GREP_found=false
115218ce07328Smrg  # Loop through the user's path and test for each of PROGNAME-LIST
115228ce07328Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
115238ce07328Smrgfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
115248ce07328Smrgdo
115258ce07328Smrg  IFS=$as_save_IFS
115268ce07328Smrg  case $as_dir in #(((
115278ce07328Smrg    '') as_dir=./ ;;
115288ce07328Smrg    */) ;;
115298ce07328Smrg    *) as_dir=$as_dir/ ;;
115308ce07328Smrg  esac
115318ce07328Smrg    for ac_prog in grep ggrep
115328ce07328Smrg   do
115338ce07328Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
115348ce07328Smrg      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
115358ce07328Smrg      as_fn_executable_p "$ac_path_GREP" || continue
115368ce07328Smrg# Check for GNU ac_path_GREP and select it if it is found.
115378ce07328Smrg  # Check for GNU $ac_path_GREP
115388ce07328Smrgcase `"$ac_path_GREP" --version 2>&1` in
115398ce07328Smrg*GNU*)
115408ce07328Smrg  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
115418ce07328Smrg*)
115428ce07328Smrg  ac_count=0
115438ce07328Smrg  printf %s 0123456789 >"conftest.in"
115448ce07328Smrg  while :
115458ce07328Smrg  do
115468ce07328Smrg    cat "conftest.in" "conftest.in" >"conftest.tmp"
115478ce07328Smrg    mv "conftest.tmp" "conftest.in"
115488ce07328Smrg    cp "conftest.in" "conftest.nl"
115498ce07328Smrg    printf "%s\n" 'GREP' >> "conftest.nl"
115508ce07328Smrg    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
115518ce07328Smrg    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
115528ce07328Smrg    as_fn_arith $ac_count + 1 && ac_count=$as_val
115538ce07328Smrg    if test $ac_count -gt ${ac_path_GREP_max-0}; then
115548ce07328Smrg      # Best one so far, save it but keep looking for a better one
115558ce07328Smrg      ac_cv_path_GREP="$ac_path_GREP"
115568ce07328Smrg      ac_path_GREP_max=$ac_count
115578ce07328Smrg    fi
115588ce07328Smrg    # 10*(2^10) chars as input seems more than enough
115598ce07328Smrg    test $ac_count -gt 10 && break
115608ce07328Smrg  done
115618ce07328Smrg  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
1156242a55b46Smrgesac
11563c582b7e3Smrg
115648ce07328Smrg      $ac_path_GREP_found && break 3
115658ce07328Smrg    done
115668ce07328Smrg  done
115678ce07328Smrg  done
115688ce07328SmrgIFS=$as_save_IFS
115698ce07328Smrg  if test -z "$ac_cv_path_GREP"; then
115708ce07328Smrg    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
115718ce07328Smrg  fi
115728ce07328Smrgelse
115738ce07328Smrg  ac_cv_path_GREP=$GREP
115748ce07328Smrgfi
11575c582b7e3Smrg
115768ce07328Smrgfi
115778ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
115788ce07328Smrgprintf "%s\n" "$ac_cv_path_GREP" >&6; }
115798ce07328Smrg GREP="$ac_cv_path_GREP"
11580c582b7e3Smrg
11581c582b7e3Smrg
115828ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
115838ce07328Smrgprintf %s "checking for egrep... " >&6; }
115848ce07328Smrgif test ${ac_cv_path_EGREP+y}
115858ce07328Smrgthen :
115868ce07328Smrg  printf %s "(cached) " >&6
115878ce07328Smrgelse $as_nop
115888ce07328Smrg  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
115898ce07328Smrg   then ac_cv_path_EGREP="$GREP -E"
115908ce07328Smrg   else
115918ce07328Smrg     if test -z "$EGREP"; then
115928ce07328Smrg  ac_path_EGREP_found=false
1159342a55b46Smrg  # Loop through the user's path and test for each of PROGNAME-LIST
1159442a55b46Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
115958ce07328Smrgfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
1159642a55b46Smrgdo
1159742a55b46Smrg  IFS=$as_save_IFS
115988ce07328Smrg  case $as_dir in #(((
115998ce07328Smrg    '') as_dir=./ ;;
116008ce07328Smrg    */) ;;
116018ce07328Smrg    *) as_dir=$as_dir/ ;;
116028ce07328Smrg  esac
116038ce07328Smrg    for ac_prog in egrep
116048ce07328Smrg   do
1160542a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
116068ce07328Smrg      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
116078ce07328Smrg      as_fn_executable_p "$ac_path_EGREP" || continue
116088ce07328Smrg# Check for GNU ac_path_EGREP and select it if it is found.
116098ce07328Smrg  # Check for GNU $ac_path_EGREP
116108ce07328Smrgcase `"$ac_path_EGREP" --version 2>&1` in
1161142a55b46Smrg*GNU*)
116128ce07328Smrg  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
1161342a55b46Smrg*)
1161442a55b46Smrg  ac_count=0
116158ce07328Smrg  printf %s 0123456789 >"conftest.in"
1161642a55b46Smrg  while :
1161742a55b46Smrg  do
1161842a55b46Smrg    cat "conftest.in" "conftest.in" >"conftest.tmp"
1161942a55b46Smrg    mv "conftest.tmp" "conftest.in"
1162042a55b46Smrg    cp "conftest.in" "conftest.nl"
116218ce07328Smrg    printf "%s\n" 'EGREP' >> "conftest.nl"
116228ce07328Smrg    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
1162342a55b46Smrg    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
1162442a55b46Smrg    as_fn_arith $ac_count + 1 && ac_count=$as_val
116258ce07328Smrg    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
1162642a55b46Smrg      # Best one so far, save it but keep looking for a better one
116278ce07328Smrg      ac_cv_path_EGREP="$ac_path_EGREP"
116288ce07328Smrg      ac_path_EGREP_max=$ac_count
1162942a55b46Smrg    fi
1163042a55b46Smrg    # 10*(2^10) chars as input seems more than enough
1163142a55b46Smrg    test $ac_count -gt 10 && break
1163242a55b46Smrg  done
1163342a55b46Smrg  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
1163442a55b46Smrgesac
11635c582b7e3Smrg
116368ce07328Smrg      $ac_path_EGREP_found && break 3
1163742a55b46Smrg    done
1163842a55b46Smrg  done
1163942a55b46Smrg  done
1164042a55b46SmrgIFS=$as_save_IFS
116418ce07328Smrg  if test -z "$ac_cv_path_EGREP"; then
116428ce07328Smrg    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
1164342a55b46Smrg  fi
1164442a55b46Smrgelse
116458ce07328Smrg  ac_cv_path_EGREP=$EGREP
1164642a55b46Smrgfi
1164742a55b46Smrg
116488ce07328Smrg   fi
1164942a55b46Smrgfi
116508ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
116518ce07328Smrgprintf "%s\n" "$ac_cv_path_EGREP" >&6; }
116528ce07328Smrg EGREP="$ac_cv_path_EGREP"
1165342a55b46Smrg
1165442a55b46Smrg
116558ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
116568ce07328Smrgprintf %s "checking for fgrep... " >&6; }
116578ce07328Smrgif test ${ac_cv_path_FGREP+y}
116588ce07328Smrgthen :
116598ce07328Smrg  printf %s "(cached) " >&6
116608ce07328Smrgelse $as_nop
1166142a55b46Smrg  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1166242a55b46Smrg   then ac_cv_path_FGREP="$GREP -F"
1166342a55b46Smrg   else
1166442a55b46Smrg     if test -z "$FGREP"; then
1166542a55b46Smrg  ac_path_FGREP_found=false
1166642a55b46Smrg  # Loop through the user's path and test for each of PROGNAME-LIST
1166742a55b46Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1166842a55b46Smrgfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
1166942a55b46Smrgdo
1167042a55b46Smrg  IFS=$as_save_IFS
116718ce07328Smrg  case $as_dir in #(((
116728ce07328Smrg    '') as_dir=./ ;;
116738ce07328Smrg    */) ;;
116748ce07328Smrg    *) as_dir=$as_dir/ ;;
116758ce07328Smrg  esac
116768ce07328Smrg    for ac_prog in fgrep
116778ce07328Smrg   do
1167842a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
116798ce07328Smrg      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
116800496e070Smrg      as_fn_executable_p "$ac_path_FGREP" || continue
1168142a55b46Smrg# Check for GNU ac_path_FGREP and select it if it is found.
1168242a55b46Smrg  # Check for GNU $ac_path_FGREP
1168342a55b46Smrgcase `"$ac_path_FGREP" --version 2>&1` in
1168442a55b46Smrg*GNU*)
1168542a55b46Smrg  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
1168642a55b46Smrg*)
1168742a55b46Smrg  ac_count=0
116888ce07328Smrg  printf %s 0123456789 >"conftest.in"
1168942a55b46Smrg  while :
1169042a55b46Smrg  do
1169142a55b46Smrg    cat "conftest.in" "conftest.in" >"conftest.tmp"
1169242a55b46Smrg    mv "conftest.tmp" "conftest.in"
1169342a55b46Smrg    cp "conftest.in" "conftest.nl"
116948ce07328Smrg    printf "%s\n" 'FGREP' >> "conftest.nl"
1169542a55b46Smrg    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
1169642a55b46Smrg    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
1169742a55b46Smrg    as_fn_arith $ac_count + 1 && ac_count=$as_val
1169842a55b46Smrg    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
1169942a55b46Smrg      # Best one so far, save it but keep looking for a better one
1170042a55b46Smrg      ac_cv_path_FGREP="$ac_path_FGREP"
1170142a55b46Smrg      ac_path_FGREP_max=$ac_count
1170242a55b46Smrg    fi
1170342a55b46Smrg    # 10*(2^10) chars as input seems more than enough
1170442a55b46Smrg    test $ac_count -gt 10 && break
11705c582b7e3Smrg  done
1170642a55b46Smrg  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
1170742a55b46Smrgesac
11708c582b7e3Smrg
1170942a55b46Smrg      $ac_path_FGREP_found && break 3
1171042a55b46Smrg    done
1171142a55b46Smrg  done
1171242a55b46Smrg  done
1171342a55b46SmrgIFS=$as_save_IFS
1171442a55b46Smrg  if test -z "$ac_cv_path_FGREP"; then
1171542a55b46Smrg    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
1171642a55b46Smrg  fi
11717c582b7e3Smrgelse
1171842a55b46Smrg  ac_cv_path_FGREP=$FGREP
11719c582b7e3Smrgfi
11720c582b7e3Smrg
1172142a55b46Smrg   fi
1172219019ffeSmrgfi
117238ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
117248ce07328Smrgprintf "%s\n" "$ac_cv_path_FGREP" >&6; }
1172542a55b46Smrg FGREP="$ac_cv_path_FGREP"
1172642a55b46Smrg
1172742a55b46Smrg
1172842a55b46Smrgtest -z "$GREP" && GREP=grep
1172942a55b46Smrg
1173042a55b46Smrg
1173142a55b46Smrg
1173242a55b46Smrg
1173319019ffeSmrg
11734c582b7e3Smrg
11735c582b7e3Smrg
11736c582b7e3Smrg
11737c582b7e3Smrg
11738c582b7e3Smrg
11739c582b7e3Smrg
11740c582b7e3Smrg
11741c582b7e3Smrg
11742c582b7e3Smrg
11743c582b7e3Smrg
11744c582b7e3Smrg
11745c582b7e3Smrg
11746c582b7e3Smrg
1174742a55b46Smrg
1174842a55b46Smrg# Check whether --with-gnu-ld was given.
117498ce07328Smrgif test ${with_gnu_ld+y}
117508ce07328Smrgthen :
11751e3d74329Smrg  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
117528ce07328Smrgelse $as_nop
1175342a55b46Smrg  with_gnu_ld=no
11754c582b7e3Smrgfi
11755c582b7e3Smrg
1175642a55b46Smrgac_prog=ld
11757e3d74329Smrgif test yes = "$GCC"; then
1175842a55b46Smrg  # Check if gcc -print-prog-name=ld gives a path.
117598ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
117608ce07328Smrgprintf %s "checking for ld used by $CC... " >&6; }
1176142a55b46Smrg  case $host in
1176242a55b46Smrg  *-*-mingw*)
11763e3d74329Smrg    # gcc leaves a trailing carriage return, which upsets mingw
1176442a55b46Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1176542a55b46Smrg  *)
1176642a55b46Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1176742a55b46Smrg  esac
1176842a55b46Smrg  case $ac_prog in
1176942a55b46Smrg    # Accept absolute paths.
1177042a55b46Smrg    [\\/]* | ?:[\\/]*)
1177142a55b46Smrg      re_direlt='/[^/][^/]*/\.\./'
1177242a55b46Smrg      # Canonicalize the pathname of ld
1177342a55b46Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
1177442a55b46Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
1177542a55b46Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
1177642a55b46Smrg      done
11777e3d74329Smrg      test -z "$LD" && LD=$ac_prog
1177842a55b46Smrg      ;;
1177942a55b46Smrg  "")
1178042a55b46Smrg    # If it fails, then pretend we aren't using GCC.
1178142a55b46Smrg    ac_prog=ld
11782c582b7e3Smrg    ;;
11783c582b7e3Smrg  *)
1178442a55b46Smrg    # If it is relative, then search for the first ld in PATH.
1178542a55b46Smrg    with_gnu_ld=unknown
11786c582b7e3Smrg    ;;
1178742a55b46Smrg  esac
11788e3d74329Smrgelif test yes = "$with_gnu_ld"; then
117898ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
117908ce07328Smrgprintf %s "checking for GNU ld... " >&6; }
1179142a55b46Smrgelse
117928ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
117938ce07328Smrgprintf %s "checking for non-GNU ld... " >&6; }
1179442a55b46Smrgfi
117958ce07328Smrgif test ${lt_cv_path_LD+y}
117968ce07328Smrgthen :
117978ce07328Smrg  printf %s "(cached) " >&6
117988ce07328Smrgelse $as_nop
1179942a55b46Smrg  if test -z "$LD"; then
11800e3d74329Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
1180142a55b46Smrg  for ac_dir in $PATH; do
11802e3d74329Smrg    IFS=$lt_save_ifs
1180342a55b46Smrg    test -z "$ac_dir" && ac_dir=.
1180442a55b46Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11805e3d74329Smrg      lt_cv_path_LD=$ac_dir/$ac_prog
1180642a55b46Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
1180742a55b46Smrg      # but apparently some variants of GNU ld only accept -v.
1180842a55b46Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
1180942a55b46Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
1181042a55b46Smrg      *GNU* | *'with BFD'*)
11811e3d74329Smrg	test no != "$with_gnu_ld" && break
1181242a55b46Smrg	;;
1181342a55b46Smrg      *)
11814e3d74329Smrg	test yes != "$with_gnu_ld" && break
1181542a55b46Smrg	;;
1181642a55b46Smrg      esac
1181742a55b46Smrg    fi
1181842a55b46Smrg  done
11819e3d74329Smrg  IFS=$lt_save_ifs
1182042a55b46Smrgelse
11821e3d74329Smrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
1182242a55b46Smrgfi
11823c582b7e3Smrgfi
11824c582b7e3Smrg
11825e3d74329SmrgLD=$lt_cv_path_LD
1182642a55b46Smrgif test -n "$LD"; then
118278ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
118288ce07328Smrgprintf "%s\n" "$LD" >&6; }
11829c582b7e3Smrgelse
118308ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
118318ce07328Smrgprintf "%s\n" "no" >&6; }
11832c582b7e3Smrgfi
1183342a55b46Smrgtest -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
118348ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
118358ce07328Smrgprintf %s "checking if the linker ($LD) is GNU ld... " >&6; }
118368ce07328Smrgif test ${lt_cv_prog_gnu_ld+y}
118378ce07328Smrgthen :
118388ce07328Smrg  printf %s "(cached) " >&6
118398ce07328Smrgelse $as_nop
1184042a55b46Smrg  # I'd rather use --version here, but apparently some GNU lds only accept -v.
1184142a55b46Smrgcase `$LD -v 2>&1 </dev/null` in
1184242a55b46Smrg*GNU* | *'with BFD'*)
1184342a55b46Smrg  lt_cv_prog_gnu_ld=yes
1184442a55b46Smrg  ;;
1184542a55b46Smrg*)
1184642a55b46Smrg  lt_cv_prog_gnu_ld=no
1184742a55b46Smrg  ;;
1184842a55b46Smrgesac
11849c582b7e3Smrgfi
118508ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
118518ce07328Smrgprintf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
1185242a55b46Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
11853c582b7e3Smrg
11854c582b7e3Smrg
11855c582b7e3Smrg
11856c582b7e3Smrg
11857c582b7e3Smrg
11858c582b7e3Smrg
11859c582b7e3Smrg
11860c582b7e3Smrg
1186142a55b46Smrg
118628ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
118638ce07328Smrgprintf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
118648ce07328Smrgif test ${lt_cv_path_NM+y}
118658ce07328Smrgthen :
118668ce07328Smrg  printf %s "(cached) " >&6
118678ce07328Smrgelse $as_nop
1186842a55b46Smrg  if test -n "$NM"; then
1186942a55b46Smrg  # Let the user override the test.
11870e3d74329Smrg  lt_cv_path_NM=$NM
1187142a55b46Smrgelse
11872e3d74329Smrg  lt_nm_to_check=${ac_tool_prefix}nm
1187342a55b46Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
1187442a55b46Smrg    lt_nm_to_check="$lt_nm_to_check nm"
1187542a55b46Smrg  fi
1187642a55b46Smrg  for lt_tmp_nm in $lt_nm_to_check; do
11877e3d74329Smrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
1187842a55b46Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
11879e3d74329Smrg      IFS=$lt_save_ifs
1188042a55b46Smrg      test -z "$ac_dir" && ac_dir=.
11881e3d74329Smrg      tmp_nm=$ac_dir/$lt_tmp_nm
11882e3d74329Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
1188342a55b46Smrg	# Check to see if the nm accepts a BSD-compat flag.
11884e3d74329Smrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
1188542a55b46Smrg	#   nm: unknown option "B" ignored
1188642a55b46Smrg	# Tru64's nm complains that /dev/null is an invalid object file
11887e3d74329Smrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
11888e3d74329Smrg	case $build_os in
11889e3d74329Smrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
11890e3d74329Smrg	*) lt_bad_file=/dev/null ;;
11891e3d74329Smrg	esac
118928ce07328Smrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
11893e3d74329Smrg	*$lt_bad_file* | *'Invalid file or object type'*)
1189442a55b46Smrg	  lt_cv_path_NM="$tmp_nm -B"
11895e3d74329Smrg	  break 2
1189642a55b46Smrg	  ;;
1189742a55b46Smrg	*)
118988ce07328Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
1189942a55b46Smrg	  */dev/null*)
1190042a55b46Smrg	    lt_cv_path_NM="$tmp_nm -p"
11901e3d74329Smrg	    break 2
1190242a55b46Smrg	    ;;
1190342a55b46Smrg	  *)
1190442a55b46Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1190542a55b46Smrg	    continue # so that we can try to find one that supports BSD flags
1190642a55b46Smrg	    ;;
1190742a55b46Smrg	  esac
1190842a55b46Smrg	  ;;
1190942a55b46Smrg	esac
11910c582b7e3Smrg      fi
1191142a55b46Smrg    done
11912e3d74329Smrg    IFS=$lt_save_ifs
1191342a55b46Smrg  done
1191442a55b46Smrg  : ${lt_cv_path_NM=no}
1191542a55b46Smrgfi
1191642a55b46Smrgfi
119178ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
119188ce07328Smrgprintf "%s\n" "$lt_cv_path_NM" >&6; }
11919e3d74329Smrgif test no != "$lt_cv_path_NM"; then
11920e3d74329Smrg  NM=$lt_cv_path_NM
1192142a55b46Smrgelse
1192242a55b46Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
1192342a55b46Smrg  if test -n "$DUMPBIN"; then :
1192442a55b46Smrg    # Let the user override the test.
1192542a55b46Smrg  else
1192642a55b46Smrg    if test -n "$ac_tool_prefix"; then
1192742a55b46Smrg  for ac_prog in dumpbin "link -dump"
1192842a55b46Smrg  do
1192942a55b46Smrg    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1193042a55b46Smrgset dummy $ac_tool_prefix$ac_prog; ac_word=$2
119318ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
119328ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
119338ce07328Smrgif test ${ac_cv_prog_DUMPBIN+y}
119348ce07328Smrgthen :
119358ce07328Smrg  printf %s "(cached) " >&6
119368ce07328Smrgelse $as_nop
1193742a55b46Smrg  if test -n "$DUMPBIN"; then
1193842a55b46Smrg  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
1193942a55b46Smrgelse
1194042a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1194142a55b46Smrgfor as_dir in $PATH
1194242a55b46Smrgdo
1194342a55b46Smrg  IFS=$as_save_IFS
119448ce07328Smrg  case $as_dir in #(((
119458ce07328Smrg    '') as_dir=./ ;;
119468ce07328Smrg    */) ;;
119478ce07328Smrg    *) as_dir=$as_dir/ ;;
119488ce07328Smrg  esac
1194942a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
119508ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1195142a55b46Smrg    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
119528ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1195342a55b46Smrg    break 2
11954c582b7e3Smrg  fi
1195542a55b46Smrgdone
1195642a55b46Smrg  done
1195742a55b46SmrgIFS=$as_save_IFS
11958c582b7e3Smrg
1195942a55b46Smrgfi
1196042a55b46Smrgfi
1196142a55b46SmrgDUMPBIN=$ac_cv_prog_DUMPBIN
1196242a55b46Smrgif test -n "$DUMPBIN"; then
119638ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
119648ce07328Smrgprintf "%s\n" "$DUMPBIN" >&6; }
1196542a55b46Smrgelse
119668ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
119678ce07328Smrgprintf "%s\n" "no" >&6; }
1196842a55b46Smrgfi
11969c582b7e3Smrg
11970c582b7e3Smrg
1197142a55b46Smrg    test -n "$DUMPBIN" && break
1197242a55b46Smrg  done
1197342a55b46Smrgfi
1197442a55b46Smrgif test -z "$DUMPBIN"; then
1197542a55b46Smrg  ac_ct_DUMPBIN=$DUMPBIN
1197642a55b46Smrg  for ac_prog in dumpbin "link -dump"
1197742a55b46Smrgdo
1197842a55b46Smrg  # Extract the first word of "$ac_prog", so it can be a program name with args.
1197942a55b46Smrgset dummy $ac_prog; ac_word=$2
119808ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
119818ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
119828ce07328Smrgif test ${ac_cv_prog_ac_ct_DUMPBIN+y}
119838ce07328Smrgthen :
119848ce07328Smrg  printf %s "(cached) " >&6
119858ce07328Smrgelse $as_nop
1198642a55b46Smrg  if test -n "$ac_ct_DUMPBIN"; then
1198742a55b46Smrg  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
1198842a55b46Smrgelse
1198942a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1199042a55b46Smrgfor as_dir in $PATH
1199142a55b46Smrgdo
1199242a55b46Smrg  IFS=$as_save_IFS
119938ce07328Smrg  case $as_dir in #(((
119948ce07328Smrg    '') as_dir=./ ;;
119958ce07328Smrg    */) ;;
119968ce07328Smrg    *) as_dir=$as_dir/ ;;
119978ce07328Smrg  esac
1199842a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
119998ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1200042a55b46Smrg    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
120018ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1200242a55b46Smrg    break 2
1200342a55b46Smrg  fi
1200442a55b46Smrgdone
1200542a55b46Smrg  done
1200642a55b46SmrgIFS=$as_save_IFS
12007c582b7e3Smrg
1200842a55b46Smrgfi
1200942a55b46Smrgfi
1201042a55b46Smrgac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
1201142a55b46Smrgif test -n "$ac_ct_DUMPBIN"; then
120128ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
120138ce07328Smrgprintf "%s\n" "$ac_ct_DUMPBIN" >&6; }
1201442a55b46Smrgelse
120158ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
120168ce07328Smrgprintf "%s\n" "no" >&6; }
1201742a55b46Smrgfi
12018c582b7e3Smrg
12019c582b7e3Smrg
1202042a55b46Smrg  test -n "$ac_ct_DUMPBIN" && break
1202142a55b46Smrgdone
1202242a55b46Smrg
1202342a55b46Smrg  if test "x$ac_ct_DUMPBIN" = x; then
1202442a55b46Smrg    DUMPBIN=":"
12025c582b7e3Smrg  else
1202642a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1202742a55b46Smrgyes:)
120288ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
120298ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1203042a55b46Smrgac_tool_warned=yes ;;
1203142a55b46Smrgesac
1203242a55b46Smrg    DUMPBIN=$ac_ct_DUMPBIN
1203342a55b46Smrg  fi
1203442a55b46Smrgfi
1203542a55b46Smrg
120368ce07328Smrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
1203742a55b46Smrg    *COFF*)
12038e3d74329Smrg      DUMPBIN="$DUMPBIN -symbols -headers"
1203942a55b46Smrg      ;;
1204042a55b46Smrg    *)
1204142a55b46Smrg      DUMPBIN=:
12042c582b7e3Smrg      ;;
12043c582b7e3Smrg    esac
12044c582b7e3Smrg  fi
12045c582b7e3Smrg
12046e3d74329Smrg  if test : != "$DUMPBIN"; then
12047e3d74329Smrg    NM=$DUMPBIN
1204842a55b46Smrg  fi
1204942a55b46Smrgfi
1205042a55b46Smrgtest -z "$NM" && NM=nm
12051c582b7e3Smrg
12052c582b7e3Smrg
12053c582b7e3Smrg
12054c582b7e3Smrg
12055c582b7e3Smrg
12056c582b7e3Smrg
120578ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
120588ce07328Smrgprintf %s "checking the name lister ($NM) interface... " >&6; }
120598ce07328Smrgif test ${lt_cv_nm_interface+y}
120608ce07328Smrgthen :
120618ce07328Smrg  printf %s "(cached) " >&6
120628ce07328Smrgelse $as_nop
1206342a55b46Smrg  lt_cv_nm_interface="BSD nm"
1206442a55b46Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
1206542a55b46Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
1206642a55b46Smrg  (eval "$ac_compile" 2>conftest.err)
1206742a55b46Smrg  cat conftest.err >&5
1206842a55b46Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
1206942a55b46Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
1207042a55b46Smrg  cat conftest.err >&5
1207142a55b46Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
1207242a55b46Smrg  cat conftest.out >&5
1207342a55b46Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
1207442a55b46Smrg    lt_cv_nm_interface="MS dumpbin"
1207542a55b46Smrg  fi
1207642a55b46Smrg  rm -f conftest*
1207742a55b46Smrgfi
120788ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
120798ce07328Smrgprintf "%s\n" "$lt_cv_nm_interface" >&6; }
12080c582b7e3Smrg
120818ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
120828ce07328Smrgprintf %s "checking whether ln -s works... " >&6; }
1208342a55b46SmrgLN_S=$as_ln_s
1208442a55b46Smrgif test "$LN_S" = "ln -s"; then
120858ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
120868ce07328Smrgprintf "%s\n" "yes" >&6; }
1208742a55b46Smrgelse
120888ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
120898ce07328Smrgprintf "%s\n" "no, using $LN_S" >&6; }
1209042a55b46Smrgfi
12091c582b7e3Smrg
1209242a55b46Smrg# find the maximum length of command line arguments
120938ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
120948ce07328Smrgprintf %s "checking the maximum length of command line arguments... " >&6; }
120958ce07328Smrgif test ${lt_cv_sys_max_cmd_len+y}
120968ce07328Smrgthen :
120978ce07328Smrg  printf %s "(cached) " >&6
120988ce07328Smrgelse $as_nop
1209942a55b46Smrg    i=0
12100e3d74329Smrg  teststring=ABCD
12101c582b7e3Smrg
1210242a55b46Smrg  case $build_os in
1210342a55b46Smrg  msdosdjgpp*)
1210442a55b46Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1210542a55b46Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1210642a55b46Smrg    # during glob expansion).  Even if it were fixed, the result of this
1210742a55b46Smrg    # check would be larger than it should be.
1210842a55b46Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
12109c582b7e3Smrg    ;;
1211042a55b46Smrg
1211142a55b46Smrg  gnu*)
1211242a55b46Smrg    # Under GNU Hurd, this test is not required because there is
1211342a55b46Smrg    # no limit to the length of command line arguments.
1211442a55b46Smrg    # Libtool will interpret -1 as no limit whatsoever
1211542a55b46Smrg    lt_cv_sys_max_cmd_len=-1;
12116c582b7e3Smrg    ;;
1211742a55b46Smrg
1211842a55b46Smrg  cygwin* | mingw* | cegcc*)
1211942a55b46Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1212042a55b46Smrg    # about 5 minutes as the teststring grows exponentially.
1212142a55b46Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1212242a55b46Smrg    # you end up with a "frozen" computer, even though with patience
1212342a55b46Smrg    # the test eventually succeeds (with a max line length of 256k).
1212442a55b46Smrg    # Instead, let's just punt: use the minimum linelength reported by
1212542a55b46Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1212642a55b46Smrg    lt_cv_sys_max_cmd_len=8192;
12127c582b7e3Smrg    ;;
1212842a55b46Smrg
1212942a55b46Smrg  mint*)
1213042a55b46Smrg    # On MiNT this can take a long time and run out of memory.
1213142a55b46Smrg    lt_cv_sys_max_cmd_len=8192;
12132c582b7e3Smrg    ;;
12133c582b7e3Smrg
1213442a55b46Smrg  amigaos*)
1213542a55b46Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
1213642a55b46Smrg    # So we just punt and use a minimum line length of 8192.
1213742a55b46Smrg    lt_cv_sys_max_cmd_len=8192;
1213842a55b46Smrg    ;;
12139c582b7e3Smrg
121408ce07328Smrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
1214142a55b46Smrg    # This has been around since 386BSD, at least.  Likely further.
1214242a55b46Smrg    if test -x /sbin/sysctl; then
1214342a55b46Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1214442a55b46Smrg    elif test -x /usr/sbin/sysctl; then
1214542a55b46Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
12146c582b7e3Smrg    else
1214742a55b46Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
12148c582b7e3Smrg    fi
1214942a55b46Smrg    # And add a safety zone
1215042a55b46Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1215142a55b46Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
12152c582b7e3Smrg    ;;
1215342a55b46Smrg
1215442a55b46Smrg  interix*)
1215542a55b46Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1215642a55b46Smrg    lt_cv_sys_max_cmd_len=196608
12157c582b7e3Smrg    ;;
12158c582b7e3Smrg
1215942a55b46Smrg  os2*)
1216042a55b46Smrg    # The test takes a long time on OS/2.
1216142a55b46Smrg    lt_cv_sys_max_cmd_len=8192
1216242a55b46Smrg    ;;
12163c582b7e3Smrg
1216442a55b46Smrg  osf*)
1216542a55b46Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1216642a55b46Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1216742a55b46Smrg    # nice to cause kernel panics so lets avoid the loop below.
1216842a55b46Smrg    # First set a reasonable default.
1216942a55b46Smrg    lt_cv_sys_max_cmd_len=16384
1217042a55b46Smrg    #
1217142a55b46Smrg    if test -x /sbin/sysconfig; then
1217242a55b46Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1217342a55b46Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1217442a55b46Smrg      esac
1217542a55b46Smrg    fi
1217642a55b46Smrg    ;;
1217742a55b46Smrg  sco3.2v5*)
1217842a55b46Smrg    lt_cv_sys_max_cmd_len=102400
1217942a55b46Smrg    ;;
1218042a55b46Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
1218142a55b46Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1218242a55b46Smrg    if test -n "$kargmax"; then
121838ce07328Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[	 ]//'`
1218442a55b46Smrg    else
1218542a55b46Smrg      lt_cv_sys_max_cmd_len=32768
1218642a55b46Smrg    fi
12187c582b7e3Smrg    ;;
12188c582b7e3Smrg  *)
1218942a55b46Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
121900496e070Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
12191e3d74329Smrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
1219242a55b46Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1219342a55b46Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1219442a55b46Smrg    else
1219542a55b46Smrg      # Make teststring a little bigger before we do anything with it.
1219642a55b46Smrg      # a 1K string should be a reasonable start.
12197e3d74329Smrg      for i in 1 2 3 4 5 6 7 8; do
1219842a55b46Smrg        teststring=$teststring$teststring
1219942a55b46Smrg      done
1220042a55b46Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1220142a55b46Smrg      # If test is not a shell built-in, we'll probably end up computing a
1220242a55b46Smrg      # maximum length that is only half of the actual maximum length, but
1220342a55b46Smrg      # we can't tell.
12204e3d74329Smrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1220542a55b46Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
12206e3d74329Smrg	      test 17 != "$i" # 1/2 MB should be enough
1220742a55b46Smrg      do
1220842a55b46Smrg        i=`expr $i + 1`
1220942a55b46Smrg        teststring=$teststring$teststring
1221042a55b46Smrg      done
1221142a55b46Smrg      # Only check the string length outside the loop.
1221242a55b46Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1221342a55b46Smrg      teststring=
1221442a55b46Smrg      # Add a significant safety factor because C++ compilers can tack on
1221542a55b46Smrg      # massive amounts of additional arguments before passing them to the
1221642a55b46Smrg      # linker.  It appears as though 1/2 is a usable value.
1221742a55b46Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1221842a55b46Smrg    fi
12219c582b7e3Smrg    ;;
12220c582b7e3Smrg  esac
12221c582b7e3Smrg
1222242a55b46Smrgfi
12223c582b7e3Smrg
12224e3d74329Smrgif test -n "$lt_cv_sys_max_cmd_len"; then
122258ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
122268ce07328Smrgprintf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
1222742a55b46Smrgelse
122288ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
122298ce07328Smrgprintf "%s\n" "none" >&6; }
1223042a55b46Smrgfi
1223142a55b46Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
12232c582b7e3Smrg
12233c582b7e3Smrg
12234c582b7e3Smrg
12235c582b7e3Smrg
12236c582b7e3Smrg
12237c582b7e3Smrg
1223842a55b46Smrg: ${CP="cp -f"}
1223942a55b46Smrg: ${MV="mv -f"}
1224042a55b46Smrg: ${RM="rm -f"}
12241c582b7e3Smrg
1224242a55b46Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
1224342a55b46Smrg  lt_unset=unset
1224442a55b46Smrgelse
1224542a55b46Smrg  lt_unset=false
1224642a55b46Smrgfi
12247c582b7e3Smrg
12248c582b7e3Smrg
12249c582b7e3Smrg
12250c582b7e3Smrg
12251c582b7e3Smrg
1225242a55b46Smrg# test EBCDIC or ASCII
1225342a55b46Smrgcase `echo X|tr X '\101'` in
1225442a55b46Smrg A) # ASCII based system
1225542a55b46Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
1225642a55b46Smrg  lt_SP2NL='tr \040 \012'
1225742a55b46Smrg  lt_NL2SP='tr \015\012 \040\040'
12258c582b7e3Smrg  ;;
1225942a55b46Smrg *) # EBCDIC based system
1226042a55b46Smrg  lt_SP2NL='tr \100 \n'
1226142a55b46Smrg  lt_NL2SP='tr \r\n \100\100'
12262c582b7e3Smrg  ;;
12263c582b7e3Smrgesac
12264c582b7e3Smrg
1226519019ffeSmrg
1226619019ffeSmrg
1226719019ffeSmrg
12268c582b7e3Smrg
12269c582b7e3Smrg
12270c582b7e3Smrg
12271c582b7e3Smrg
12272c582b7e3Smrg
122738ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
122748ce07328Smrgprintf %s "checking how to convert $build file names to $host format... " >&6; }
122758ce07328Smrgif test ${lt_cv_to_host_file_cmd+y}
122768ce07328Smrgthen :
122778ce07328Smrg  printf %s "(cached) " >&6
122788ce07328Smrgelse $as_nop
1227942a55b46Smrg  case $host in
1228042a55b46Smrg  *-*-mingw* )
1228142a55b46Smrg    case $build in
1228242a55b46Smrg      *-*-mingw* ) # actually msys
1228342a55b46Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
1228442a55b46Smrg        ;;
1228542a55b46Smrg      *-*-cygwin* )
1228642a55b46Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
1228742a55b46Smrg        ;;
1228842a55b46Smrg      * ) # otherwise, assume *nix
1228942a55b46Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
1229042a55b46Smrg        ;;
12291c582b7e3Smrg    esac
12292c582b7e3Smrg    ;;
1229342a55b46Smrg  *-*-cygwin* )
1229442a55b46Smrg    case $build in
1229542a55b46Smrg      *-*-mingw* ) # actually msys
1229642a55b46Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
1229742a55b46Smrg        ;;
1229842a55b46Smrg      *-*-cygwin* )
1229942a55b46Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
1230042a55b46Smrg        ;;
1230142a55b46Smrg      * ) # otherwise, assume *nix
1230242a55b46Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
1230342a55b46Smrg        ;;
1230442a55b46Smrg    esac
1230542a55b46Smrg    ;;
1230642a55b46Smrg  * ) # unhandled hosts (and "normal" native builds)
1230742a55b46Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
1230842a55b46Smrg    ;;
1230942a55b46Smrgesac
12310c582b7e3Smrg
1231142a55b46Smrgfi
12312c582b7e3Smrg
1231342a55b46Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
123148ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
123158ce07328Smrgprintf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
12316c582b7e3Smrg
12317c582b7e3Smrg
12318c582b7e3Smrg
12319c582b7e3Smrg
12320c582b7e3Smrg
123218ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
123228ce07328Smrgprintf %s "checking how to convert $build file names to toolchain format... " >&6; }
123238ce07328Smrgif test ${lt_cv_to_tool_file_cmd+y}
123248ce07328Smrgthen :
123258ce07328Smrg  printf %s "(cached) " >&6
123268ce07328Smrgelse $as_nop
1232742a55b46Smrg  #assume ordinary cross tools, or native build.
1232842a55b46Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
1232942a55b46Smrgcase $host in
1233042a55b46Smrg  *-*-mingw* )
1233142a55b46Smrg    case $build in
1233242a55b46Smrg      *-*-mingw* ) # actually msys
1233342a55b46Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
1233442a55b46Smrg        ;;
1233542a55b46Smrg    esac
1233642a55b46Smrg    ;;
1233742a55b46Smrgesac
12338c582b7e3Smrg
1233942a55b46Smrgfi
12340c582b7e3Smrg
1234142a55b46Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
123428ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
123438ce07328Smrgprintf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
12344c582b7e3Smrg
12345c582b7e3Smrg
12346c582b7e3Smrg
12347c582b7e3Smrg
12348c582b7e3Smrg
123498ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
123508ce07328Smrgprintf %s "checking for $LD option to reload object files... " >&6; }
123518ce07328Smrgif test ${lt_cv_ld_reload_flag+y}
123528ce07328Smrgthen :
123538ce07328Smrg  printf %s "(cached) " >&6
123548ce07328Smrgelse $as_nop
1235542a55b46Smrg  lt_cv_ld_reload_flag='-r'
1235642a55b46Smrgfi
123578ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
123588ce07328Smrgprintf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
1235942a55b46Smrgreload_flag=$lt_cv_ld_reload_flag
1236042a55b46Smrgcase $reload_flag in
1236142a55b46Smrg"" | " "*) ;;
1236242a55b46Smrg*) reload_flag=" $reload_flag" ;;
1236342a55b46Smrgesac
1236442a55b46Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
1236542a55b46Smrgcase $host_os in
1236642a55b46Smrg  cygwin* | mingw* | pw32* | cegcc*)
12367e3d74329Smrg    if test yes != "$GCC"; then
1236842a55b46Smrg      reload_cmds=false
1236942a55b46Smrg    fi
1237042a55b46Smrg    ;;
1237142a55b46Smrg  darwin*)
12372e3d74329Smrg    if test yes = "$GCC"; then
12373e3d74329Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
1237442a55b46Smrg    else
1237542a55b46Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
1237642a55b46Smrg    fi
1237742a55b46Smrg    ;;
1237842a55b46Smrgesac
12379c582b7e3Smrg
12380c582b7e3Smrg
12381c582b7e3Smrg
12382c582b7e3Smrg
12383c582b7e3Smrg
12384c582b7e3Smrg
12385c582b7e3Smrg
12386c582b7e3Smrg
12387c582b7e3Smrg
123888ce07328Smrgif test -n "$ac_tool_prefix"; then
123898ce07328Smrg  # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
123908ce07328Smrgset dummy ${ac_tool_prefix}file; ac_word=$2
123918ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
123928ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
123938ce07328Smrgif test ${ac_cv_prog_FILECMD+y}
123948ce07328Smrgthen :
123958ce07328Smrg  printf %s "(cached) " >&6
123968ce07328Smrgelse $as_nop
123978ce07328Smrg  if test -n "$FILECMD"; then
123988ce07328Smrg  ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
123998ce07328Smrgelse
124008ce07328Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
124018ce07328Smrgfor as_dir in $PATH
124028ce07328Smrgdo
124038ce07328Smrg  IFS=$as_save_IFS
124048ce07328Smrg  case $as_dir in #(((
124058ce07328Smrg    '') as_dir=./ ;;
124068ce07328Smrg    */) ;;
124078ce07328Smrg    *) as_dir=$as_dir/ ;;
124088ce07328Smrg  esac
124098ce07328Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
124108ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
124118ce07328Smrg    ac_cv_prog_FILECMD="${ac_tool_prefix}file"
124128ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
124138ce07328Smrg    break 2
124148ce07328Smrg  fi
124158ce07328Smrgdone
124168ce07328Smrg  done
124178ce07328SmrgIFS=$as_save_IFS
124188ce07328Smrg
124198ce07328Smrgfi
124208ce07328Smrgfi
124218ce07328SmrgFILECMD=$ac_cv_prog_FILECMD
124228ce07328Smrgif test -n "$FILECMD"; then
124238ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
124248ce07328Smrgprintf "%s\n" "$FILECMD" >&6; }
124258ce07328Smrgelse
124268ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
124278ce07328Smrgprintf "%s\n" "no" >&6; }
124288ce07328Smrgfi
124298ce07328Smrg
124308ce07328Smrg
124318ce07328Smrgfi
124328ce07328Smrgif test -z "$ac_cv_prog_FILECMD"; then
124338ce07328Smrg  ac_ct_FILECMD=$FILECMD
124348ce07328Smrg  # Extract the first word of "file", so it can be a program name with args.
124358ce07328Smrgset dummy file; ac_word=$2
124368ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
124378ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
124388ce07328Smrgif test ${ac_cv_prog_ac_ct_FILECMD+y}
124398ce07328Smrgthen :
124408ce07328Smrg  printf %s "(cached) " >&6
124418ce07328Smrgelse $as_nop
124428ce07328Smrg  if test -n "$ac_ct_FILECMD"; then
124438ce07328Smrg  ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
124448ce07328Smrgelse
124458ce07328Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
124468ce07328Smrgfor as_dir in $PATH
124478ce07328Smrgdo
124488ce07328Smrg  IFS=$as_save_IFS
124498ce07328Smrg  case $as_dir in #(((
124508ce07328Smrg    '') as_dir=./ ;;
124518ce07328Smrg    */) ;;
124528ce07328Smrg    *) as_dir=$as_dir/ ;;
124538ce07328Smrg  esac
124548ce07328Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
124558ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
124568ce07328Smrg    ac_cv_prog_ac_ct_FILECMD="file"
124578ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
124588ce07328Smrg    break 2
124598ce07328Smrg  fi
124608ce07328Smrgdone
124618ce07328Smrg  done
124628ce07328SmrgIFS=$as_save_IFS
124638ce07328Smrg
124648ce07328Smrgfi
124658ce07328Smrgfi
124668ce07328Smrgac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
124678ce07328Smrgif test -n "$ac_ct_FILECMD"; then
124688ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
124698ce07328Smrgprintf "%s\n" "$ac_ct_FILECMD" >&6; }
124708ce07328Smrgelse
124718ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
124728ce07328Smrgprintf "%s\n" "no" >&6; }
124738ce07328Smrgfi
124748ce07328Smrg
124758ce07328Smrg  if test "x$ac_ct_FILECMD" = x; then
124768ce07328Smrg    FILECMD=":"
124778ce07328Smrg  else
124788ce07328Smrg    case $cross_compiling:$ac_tool_warned in
124798ce07328Smrgyes:)
124808ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
124818ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
124828ce07328Smrgac_tool_warned=yes ;;
124838ce07328Smrgesac
124848ce07328Smrg    FILECMD=$ac_ct_FILECMD
124858ce07328Smrg  fi
124868ce07328Smrgelse
124878ce07328Smrg  FILECMD="$ac_cv_prog_FILECMD"
124888ce07328Smrgfi
124898ce07328Smrg
124908ce07328Smrg
124918ce07328Smrg
124928ce07328Smrg
124938ce07328Smrg
124948ce07328Smrg
124958ce07328Smrg
1249642a55b46Smrgif test -n "$ac_tool_prefix"; then
1249742a55b46Smrg  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
1249842a55b46Smrgset dummy ${ac_tool_prefix}objdump; ac_word=$2
124998ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
125008ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
125018ce07328Smrgif test ${ac_cv_prog_OBJDUMP+y}
125028ce07328Smrgthen :
125038ce07328Smrg  printf %s "(cached) " >&6
125048ce07328Smrgelse $as_nop
1250542a55b46Smrg  if test -n "$OBJDUMP"; then
1250642a55b46Smrg  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
1250742a55b46Smrgelse
1250842a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1250942a55b46Smrgfor as_dir in $PATH
1251042a55b46Smrgdo
1251142a55b46Smrg  IFS=$as_save_IFS
125128ce07328Smrg  case $as_dir in #(((
125138ce07328Smrg    '') as_dir=./ ;;
125148ce07328Smrg    */) ;;
125158ce07328Smrg    *) as_dir=$as_dir/ ;;
125168ce07328Smrg  esac
1251742a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
125188ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1251942a55b46Smrg    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
125208ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1252142a55b46Smrg    break 2
1252242a55b46Smrg  fi
1252342a55b46Smrgdone
1252442a55b46Smrg  done
1252542a55b46SmrgIFS=$as_save_IFS
12526c582b7e3Smrg
1252742a55b46Smrgfi
1252842a55b46Smrgfi
1252942a55b46SmrgOBJDUMP=$ac_cv_prog_OBJDUMP
1253042a55b46Smrgif test -n "$OBJDUMP"; then
125318ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
125328ce07328Smrgprintf "%s\n" "$OBJDUMP" >&6; }
1253342a55b46Smrgelse
125348ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
125358ce07328Smrgprintf "%s\n" "no" >&6; }
1253642a55b46Smrgfi
12537c582b7e3Smrg
12538c582b7e3Smrg
1253942a55b46Smrgfi
1254042a55b46Smrgif test -z "$ac_cv_prog_OBJDUMP"; then
1254142a55b46Smrg  ac_ct_OBJDUMP=$OBJDUMP
1254242a55b46Smrg  # Extract the first word of "objdump", so it can be a program name with args.
1254342a55b46Smrgset dummy objdump; ac_word=$2
125448ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
125458ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
125468ce07328Smrgif test ${ac_cv_prog_ac_ct_OBJDUMP+y}
125478ce07328Smrgthen :
125488ce07328Smrg  printf %s "(cached) " >&6
125498ce07328Smrgelse $as_nop
1255042a55b46Smrg  if test -n "$ac_ct_OBJDUMP"; then
1255142a55b46Smrg  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
1255242a55b46Smrgelse
1255342a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1255442a55b46Smrgfor as_dir in $PATH
1255542a55b46Smrgdo
1255642a55b46Smrg  IFS=$as_save_IFS
125578ce07328Smrg  case $as_dir in #(((
125588ce07328Smrg    '') as_dir=./ ;;
125598ce07328Smrg    */) ;;
125608ce07328Smrg    *) as_dir=$as_dir/ ;;
125618ce07328Smrg  esac
1256242a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
125638ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1256442a55b46Smrg    ac_cv_prog_ac_ct_OBJDUMP="objdump"
125658ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1256642a55b46Smrg    break 2
1256742a55b46Smrg  fi
1256842a55b46Smrgdone
1256942a55b46Smrg  done
1257042a55b46SmrgIFS=$as_save_IFS
12571c582b7e3Smrg
1257242a55b46Smrgfi
1257342a55b46Smrgfi
1257442a55b46Smrgac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
1257542a55b46Smrgif test -n "$ac_ct_OBJDUMP"; then
125768ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
125778ce07328Smrgprintf "%s\n" "$ac_ct_OBJDUMP" >&6; }
1257842a55b46Smrgelse
125798ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
125808ce07328Smrgprintf "%s\n" "no" >&6; }
1258142a55b46Smrgfi
12582c582b7e3Smrg
1258342a55b46Smrg  if test "x$ac_ct_OBJDUMP" = x; then
1258442a55b46Smrg    OBJDUMP="false"
1258542a55b46Smrg  else
1258642a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1258742a55b46Smrgyes:)
125888ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
125898ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1259042a55b46Smrgac_tool_warned=yes ;;
1259142a55b46Smrgesac
1259242a55b46Smrg    OBJDUMP=$ac_ct_OBJDUMP
1259342a55b46Smrg  fi
1259442a55b46Smrgelse
1259542a55b46Smrg  OBJDUMP="$ac_cv_prog_OBJDUMP"
1259642a55b46Smrgfi
12597c582b7e3Smrg
1259842a55b46Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
12599c582b7e3Smrg
12600c582b7e3Smrg
12601c582b7e3Smrg
12602c582b7e3Smrg
12603c582b7e3Smrg
12604c582b7e3Smrg
12605c582b7e3Smrg
12606c582b7e3Smrg
12607c582b7e3Smrg
126088ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
126098ce07328Smrgprintf %s "checking how to recognize dependent libraries... " >&6; }
126108ce07328Smrgif test ${lt_cv_deplibs_check_method+y}
126118ce07328Smrgthen :
126128ce07328Smrg  printf %s "(cached) " >&6
126138ce07328Smrgelse $as_nop
1261442a55b46Smrg  lt_cv_file_magic_cmd='$MAGIC_CMD'
1261542a55b46Smrglt_cv_file_magic_test_file=
1261642a55b46Smrglt_cv_deplibs_check_method='unknown'
1261742a55b46Smrg# Need to set the preceding variable on all platforms that support
1261842a55b46Smrg# interlibrary dependencies.
1261942a55b46Smrg# 'none' -- dependencies not supported.
12620e3d74329Smrg# 'unknown' -- same as none, but documents that we really don't know.
1262142a55b46Smrg# 'pass_all' -- all dependencies passed with no checks.
1262242a55b46Smrg# 'test_compile' -- check by making test program.
1262342a55b46Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
12624e3d74329Smrg# that responds to the $file_magic_cmd with a given extended regex.
12625e3d74329Smrg# If you have 'file' or equivalent on your system and you're not sure
12626e3d74329Smrg# whether 'pass_all' will *always* work, you probably want this one.
12627c582b7e3Smrg
1262842a55b46Smrgcase $host_os in
1262942a55b46Smrgaix[4-9]*)
1263042a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1263142a55b46Smrg  ;;
12632c582b7e3Smrg
1263342a55b46Smrgbeos*)
1263442a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1263542a55b46Smrg  ;;
12636c582b7e3Smrg
1263742a55b46Smrgbsdi[45]*)
1263842a55b46Smrg  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
126398ce07328Smrg  lt_cv_file_magic_cmd='$FILECMD -L'
1264042a55b46Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
1264142a55b46Smrg  ;;
12642c582b7e3Smrg
1264342a55b46Smrgcygwin*)
1264442a55b46Smrg  # func_win32_libid is a shell function defined in ltmain.sh
1264542a55b46Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
1264642a55b46Smrg  lt_cv_file_magic_cmd='func_win32_libid'
1264742a55b46Smrg  ;;
12648c582b7e3Smrg
1264942a55b46Smrgmingw* | pw32*)
1265042a55b46Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
1265142a55b46Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
1265242a55b46Smrg  # unless we find 'file', for example because we are cross-compiling.
12653e3d74329Smrg  if ( file / ) >/dev/null 2>&1; then
1265442a55b46Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
1265542a55b46Smrg    lt_cv_file_magic_cmd='func_win32_libid'
1265642a55b46Smrg  else
1265742a55b46Smrg    # Keep this pattern in sync with the one in func_win32_libid.
1265842a55b46Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
1265942a55b46Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
1266042a55b46Smrg  fi
1266142a55b46Smrg  ;;
12662c582b7e3Smrg
1266342a55b46Smrgcegcc*)
1266442a55b46Smrg  # use the weaker test based on 'objdump'. See mingw*.
1266542a55b46Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
1266642a55b46Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
1266742a55b46Smrg  ;;
12668c582b7e3Smrg
1266942a55b46Smrgdarwin* | rhapsody*)
1267042a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1267142a55b46Smrg  ;;
12672c582b7e3Smrg
126738ce07328Smrgfreebsd* | dragonfly* | midnightbsd*)
1267442a55b46Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
1267542a55b46Smrg    case $host_cpu in
1267642a55b46Smrg    i*86 )
1267742a55b46Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
1267842a55b46Smrg      # Let's accept both of them until this is cleared up.
1267942a55b46Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
126808ce07328Smrg      lt_cv_file_magic_cmd=$FILECMD
1268142a55b46Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1268242a55b46Smrg      ;;
1268342a55b46Smrg    esac
1268442a55b46Smrg  else
1268542a55b46Smrg    lt_cv_deplibs_check_method=pass_all
1268642a55b46Smrg  fi
1268742a55b46Smrg  ;;
12688c582b7e3Smrg
1268942a55b46Smrghaiku*)
1269042a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1269142a55b46Smrg  ;;
12692c582b7e3Smrg
1269342a55b46Smrghpux10.20* | hpux11*)
126948ce07328Smrg  lt_cv_file_magic_cmd=$FILECMD
1269542a55b46Smrg  case $host_cpu in
1269642a55b46Smrg  ia64*)
1269742a55b46Smrg    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1269842a55b46Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1269942a55b46Smrg    ;;
1270042a55b46Smrg  hppa*64*)
1270142a55b46Smrg    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
1270242a55b46Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
1270342a55b46Smrg    ;;
1270442a55b46Smrg  *)
1270542a55b46Smrg    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
1270642a55b46Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
1270742a55b46Smrg    ;;
1270842a55b46Smrg  esac
1270942a55b46Smrg  ;;
12710c582b7e3Smrg
1271142a55b46Smrginterix[3-9]*)
1271242a55b46Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
1271342a55b46Smrg  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
1271442a55b46Smrg  ;;
12715c582b7e3Smrg
1271642a55b46Smrgirix5* | irix6* | nonstopux*)
1271742a55b46Smrg  case $LD in
1271842a55b46Smrg  *-32|*"-32 ") libmagic=32-bit;;
1271942a55b46Smrg  *-n32|*"-n32 ") libmagic=N32;;
1272042a55b46Smrg  *-64|*"-64 ") libmagic=64-bit;;
1272142a55b46Smrg  *) libmagic=never-match;;
1272242a55b46Smrg  esac
1272342a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1272442a55b46Smrg  ;;
12725c582b7e3Smrg
1272642a55b46Smrg# This must be glibc/ELF.
127270496e070Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
1272842a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1272942a55b46Smrg  ;;
12730c582b7e3Smrg
127318ce07328Smrgnetbsd*)
1273242a55b46Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
1273342a55b46Smrg    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
1273442a55b46Smrg  else
1273542a55b46Smrg    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
1273642a55b46Smrg  fi
1273742a55b46Smrg  ;;
12738c582b7e3Smrg
1273942a55b46Smrgnewos6*)
1274042a55b46Smrg  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
127418ce07328Smrg  lt_cv_file_magic_cmd=$FILECMD
1274242a55b46Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
1274342a55b46Smrg  ;;
12744c582b7e3Smrg
1274542a55b46Smrg*nto* | *qnx*)
1274642a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1274742a55b46Smrg  ;;
12748c582b7e3Smrg
12749e3d74329Smrgopenbsd* | bitrig*)
12750e3d74329Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
1275142a55b46Smrg    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
1275242a55b46Smrg  else
1275342a55b46Smrg    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
1275442a55b46Smrg  fi
1275542a55b46Smrg  ;;
12756c582b7e3Smrg
1275742a55b46Smrgosf3* | osf4* | osf5*)
1275842a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1275942a55b46Smrg  ;;
1276042a55b46Smrg
1276142a55b46Smrgrdos*)
1276242a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1276342a55b46Smrg  ;;
12764c582b7e3Smrg
1276542a55b46Smrgsolaris*)
1276642a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1276742a55b46Smrg  ;;
12768c582b7e3Smrg
1276942a55b46Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1277042a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1277142a55b46Smrg  ;;
12772c582b7e3Smrg
1277342a55b46Smrgsysv4 | sysv4.3*)
1277442a55b46Smrg  case $host_vendor in
1277542a55b46Smrg  motorola)
1277642a55b46Smrg    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
1277742a55b46Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1277842a55b46Smrg    ;;
1277942a55b46Smrg  ncr)
1278042a55b46Smrg    lt_cv_deplibs_check_method=pass_all
1278142a55b46Smrg    ;;
1278242a55b46Smrg  sequent)
1278342a55b46Smrg    lt_cv_file_magic_cmd='/bin/file'
1278442a55b46Smrg    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1278542a55b46Smrg    ;;
1278642a55b46Smrg  sni)
1278742a55b46Smrg    lt_cv_file_magic_cmd='/bin/file'
1278842a55b46Smrg    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
1278942a55b46Smrg    lt_cv_file_magic_test_file=/lib/libc.so
1279042a55b46Smrg    ;;
1279142a55b46Smrg  siemens)
1279242a55b46Smrg    lt_cv_deplibs_check_method=pass_all
1279342a55b46Smrg    ;;
1279442a55b46Smrg  pc)
1279542a55b46Smrg    lt_cv_deplibs_check_method=pass_all
1279642a55b46Smrg    ;;
1279742a55b46Smrg  esac
1279842a55b46Smrg  ;;
12799c582b7e3Smrg
1280042a55b46Smrgtpf*)
1280142a55b46Smrg  lt_cv_deplibs_check_method=pass_all
1280242a55b46Smrg  ;;
12803e3d74329Smrgos2*)
12804e3d74329Smrg  lt_cv_deplibs_check_method=pass_all
12805e3d74329Smrg  ;;
1280642a55b46Smrgesac
12807c582b7e3Smrg
1280842a55b46Smrgfi
128098ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
128108ce07328Smrgprintf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
1281119019ffeSmrg
1281242a55b46Smrgfile_magic_glob=
1281342a55b46Smrgwant_nocaseglob=no
1281442a55b46Smrgif test "$build" = "$host"; then
1281542a55b46Smrg  case $host_os in
1281642a55b46Smrg  mingw* | pw32*)
1281742a55b46Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
1281842a55b46Smrg      want_nocaseglob=yes
1281942a55b46Smrg    else
1282042a55b46Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
1282142a55b46Smrg    fi
1282242a55b46Smrg    ;;
1282342a55b46Smrg  esac
1282442a55b46Smrgfi
12825c582b7e3Smrg
1282642a55b46Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
1282742a55b46Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
1282842a55b46Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
12829c582b7e3Smrg
12830c582b7e3Smrg
12831c582b7e3Smrg
12832c582b7e3Smrg
12833c582b7e3Smrg
12834c582b7e3Smrg
12835c582b7e3Smrg
12836c582b7e3Smrg
12837c582b7e3Smrg
12838c582b7e3Smrg
12839c582b7e3Smrg
12840c582b7e3Smrg
12841c582b7e3Smrg
12842c582b7e3Smrg
12843c582b7e3Smrg
12844c582b7e3Smrg
12845c582b7e3Smrg
12846c582b7e3Smrg
12847c582b7e3Smrg
12848c582b7e3Smrg
12849c582b7e3Smrg
12850c582b7e3Smrg
1285142a55b46Smrgif test -n "$ac_tool_prefix"; then
1285242a55b46Smrg  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1285342a55b46Smrgset dummy ${ac_tool_prefix}dlltool; ac_word=$2
128548ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
128558ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
128568ce07328Smrgif test ${ac_cv_prog_DLLTOOL+y}
128578ce07328Smrgthen :
128588ce07328Smrg  printf %s "(cached) " >&6
128598ce07328Smrgelse $as_nop
1286042a55b46Smrg  if test -n "$DLLTOOL"; then
1286142a55b46Smrg  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1286242a55b46Smrgelse
1286342a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1286442a55b46Smrgfor as_dir in $PATH
1286542a55b46Smrgdo
1286642a55b46Smrg  IFS=$as_save_IFS
128678ce07328Smrg  case $as_dir in #(((
128688ce07328Smrg    '') as_dir=./ ;;
128698ce07328Smrg    */) ;;
128708ce07328Smrg    *) as_dir=$as_dir/ ;;
128718ce07328Smrg  esac
1287242a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
128738ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1287442a55b46Smrg    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
128758ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1287642a55b46Smrg    break 2
1287742a55b46Smrg  fi
1287842a55b46Smrgdone
1287942a55b46Smrg  done
1288042a55b46SmrgIFS=$as_save_IFS
12881c582b7e3Smrg
1288242a55b46Smrgfi
1288342a55b46Smrgfi
1288442a55b46SmrgDLLTOOL=$ac_cv_prog_DLLTOOL
1288542a55b46Smrgif test -n "$DLLTOOL"; then
128868ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
128878ce07328Smrgprintf "%s\n" "$DLLTOOL" >&6; }
1288842a55b46Smrgelse
128898ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
128908ce07328Smrgprintf "%s\n" "no" >&6; }
1289142a55b46Smrgfi
12892c582b7e3Smrg
12893c582b7e3Smrg
1289442a55b46Smrgfi
1289542a55b46Smrgif test -z "$ac_cv_prog_DLLTOOL"; then
1289642a55b46Smrg  ac_ct_DLLTOOL=$DLLTOOL
1289742a55b46Smrg  # Extract the first word of "dlltool", so it can be a program name with args.
1289842a55b46Smrgset dummy dlltool; ac_word=$2
128998ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
129008ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
129018ce07328Smrgif test ${ac_cv_prog_ac_ct_DLLTOOL+y}
129028ce07328Smrgthen :
129038ce07328Smrg  printf %s "(cached) " >&6
129048ce07328Smrgelse $as_nop
1290542a55b46Smrg  if test -n "$ac_ct_DLLTOOL"; then
1290642a55b46Smrg  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
1290742a55b46Smrgelse
1290842a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1290942a55b46Smrgfor as_dir in $PATH
1291042a55b46Smrgdo
1291142a55b46Smrg  IFS=$as_save_IFS
129128ce07328Smrg  case $as_dir in #(((
129138ce07328Smrg    '') as_dir=./ ;;
129148ce07328Smrg    */) ;;
129158ce07328Smrg    *) as_dir=$as_dir/ ;;
129168ce07328Smrg  esac
1291742a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
129188ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1291942a55b46Smrg    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
129208ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1292142a55b46Smrg    break 2
1292242a55b46Smrg  fi
1292342a55b46Smrgdone
1292442a55b46Smrg  done
1292542a55b46SmrgIFS=$as_save_IFS
12926c582b7e3Smrg
1292742a55b46Smrgfi
1292842a55b46Smrgfi
1292942a55b46Smrgac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
1293042a55b46Smrgif test -n "$ac_ct_DLLTOOL"; then
129318ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
129328ce07328Smrgprintf "%s\n" "$ac_ct_DLLTOOL" >&6; }
1293342a55b46Smrgelse
129348ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
129358ce07328Smrgprintf "%s\n" "no" >&6; }
1293642a55b46Smrgfi
12937c582b7e3Smrg
1293842a55b46Smrg  if test "x$ac_ct_DLLTOOL" = x; then
1293942a55b46Smrg    DLLTOOL="false"
1294042a55b46Smrg  else
1294142a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1294242a55b46Smrgyes:)
129438ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
129448ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1294542a55b46Smrgac_tool_warned=yes ;;
1294642a55b46Smrgesac
1294742a55b46Smrg    DLLTOOL=$ac_ct_DLLTOOL
1294842a55b46Smrg  fi
1294942a55b46Smrgelse
1295042a55b46Smrg  DLLTOOL="$ac_cv_prog_DLLTOOL"
1295142a55b46Smrgfi
12952c582b7e3Smrg
1295342a55b46Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
12954c582b7e3Smrg
12955c582b7e3Smrg
12956c582b7e3Smrg
12957c582b7e3Smrg
12958c582b7e3Smrg
12959c582b7e3Smrg
12960c582b7e3Smrg
12961c582b7e3Smrg
12962c582b7e3Smrg
12963c582b7e3Smrg
129648ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
129658ce07328Smrgprintf %s "checking how to associate runtime and link libraries... " >&6; }
129668ce07328Smrgif test ${lt_cv_sharedlib_from_linklib_cmd+y}
129678ce07328Smrgthen :
129688ce07328Smrg  printf %s "(cached) " >&6
129698ce07328Smrgelse $as_nop
1297042a55b46Smrg  lt_cv_sharedlib_from_linklib_cmd='unknown'
12971c582b7e3Smrg
1297242a55b46Smrgcase $host_os in
1297342a55b46Smrgcygwin* | mingw* | pw32* | cegcc*)
12974e3d74329Smrg  # two different shell functions defined in ltmain.sh;
12975e3d74329Smrg  # decide which one to use based on capabilities of $DLLTOOL
1297642a55b46Smrg  case `$DLLTOOL --help 2>&1` in
1297742a55b46Smrg  *--identify-strict*)
1297842a55b46Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
1297942a55b46Smrg    ;;
1298042a55b46Smrg  *)
1298142a55b46Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
1298242a55b46Smrg    ;;
1298342a55b46Smrg  esac
1298442a55b46Smrg  ;;
1298542a55b46Smrg*)
1298642a55b46Smrg  # fallback: assume linklib IS sharedlib
12987e3d74329Smrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
1298842a55b46Smrg  ;;
1298942a55b46Smrgesac
12990c582b7e3Smrg
1299142a55b46Smrgfi
129928ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
129938ce07328Smrgprintf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
1299442a55b46Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
1299542a55b46Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
12996c582b7e3Smrg
12997c582b7e3Smrg
12998c582b7e3Smrg
12999c582b7e3Smrg
13000c582b7e3Smrg
13001c582b7e3Smrg
13002c582b7e3Smrg
1300342a55b46Smrgif test -n "$ac_tool_prefix"; then
1300442a55b46Smrg  for ac_prog in ar
1300542a55b46Smrg  do
1300642a55b46Smrg    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1300742a55b46Smrgset dummy $ac_tool_prefix$ac_prog; ac_word=$2
130088ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
130098ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
130108ce07328Smrgif test ${ac_cv_prog_AR+y}
130118ce07328Smrgthen :
130128ce07328Smrg  printf %s "(cached) " >&6
130138ce07328Smrgelse $as_nop
1301442a55b46Smrg  if test -n "$AR"; then
1301542a55b46Smrg  ac_cv_prog_AR="$AR" # Let the user override the test.
1301642a55b46Smrgelse
1301742a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1301842a55b46Smrgfor as_dir in $PATH
1301942a55b46Smrgdo
1302042a55b46Smrg  IFS=$as_save_IFS
130218ce07328Smrg  case $as_dir in #(((
130228ce07328Smrg    '') as_dir=./ ;;
130238ce07328Smrg    */) ;;
130248ce07328Smrg    *) as_dir=$as_dir/ ;;
130258ce07328Smrg  esac
1302642a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
130278ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1302842a55b46Smrg    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
130298ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1303042a55b46Smrg    break 2
1303142a55b46Smrg  fi
1303242a55b46Smrgdone
1303342a55b46Smrg  done
1303442a55b46SmrgIFS=$as_save_IFS
13035c582b7e3Smrg
1303642a55b46Smrgfi
1303742a55b46Smrgfi
1303842a55b46SmrgAR=$ac_cv_prog_AR
1303942a55b46Smrgif test -n "$AR"; then
130408ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
130418ce07328Smrgprintf "%s\n" "$AR" >&6; }
1304242a55b46Smrgelse
130438ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
130448ce07328Smrgprintf "%s\n" "no" >&6; }
1304542a55b46Smrgfi
13046c582b7e3Smrg
13047c582b7e3Smrg
1304842a55b46Smrg    test -n "$AR" && break
1304942a55b46Smrg  done
1305042a55b46Smrgfi
1305142a55b46Smrgif test -z "$AR"; then
1305242a55b46Smrg  ac_ct_AR=$AR
1305342a55b46Smrg  for ac_prog in ar
1305442a55b46Smrgdo
1305542a55b46Smrg  # Extract the first word of "$ac_prog", so it can be a program name with args.
1305642a55b46Smrgset dummy $ac_prog; ac_word=$2
130578ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
130588ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
130598ce07328Smrgif test ${ac_cv_prog_ac_ct_AR+y}
130608ce07328Smrgthen :
130618ce07328Smrg  printf %s "(cached) " >&6
130628ce07328Smrgelse $as_nop
1306342a55b46Smrg  if test -n "$ac_ct_AR"; then
1306442a55b46Smrg  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
1306542a55b46Smrgelse
1306642a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1306742a55b46Smrgfor as_dir in $PATH
1306842a55b46Smrgdo
1306942a55b46Smrg  IFS=$as_save_IFS
130708ce07328Smrg  case $as_dir in #(((
130718ce07328Smrg    '') as_dir=./ ;;
130728ce07328Smrg    */) ;;
130738ce07328Smrg    *) as_dir=$as_dir/ ;;
130748ce07328Smrg  esac
1307542a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
130768ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1307742a55b46Smrg    ac_cv_prog_ac_ct_AR="$ac_prog"
130788ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1307942a55b46Smrg    break 2
1308042a55b46Smrg  fi
13081c582b7e3Smrgdone
1308242a55b46Smrg  done
1308342a55b46SmrgIFS=$as_save_IFS
13084c582b7e3Smrg
1308542a55b46Smrgfi
1308642a55b46Smrgfi
1308742a55b46Smrgac_ct_AR=$ac_cv_prog_ac_ct_AR
1308842a55b46Smrgif test -n "$ac_ct_AR"; then
130898ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
130908ce07328Smrgprintf "%s\n" "$ac_ct_AR" >&6; }
1309142a55b46Smrgelse
130928ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
130938ce07328Smrgprintf "%s\n" "no" >&6; }
1309442a55b46Smrgfi
13095c582b7e3Smrg
13096c582b7e3Smrg
1309742a55b46Smrg  test -n "$ac_ct_AR" && break
1309842a55b46Smrgdone
13099c582b7e3Smrg
1310042a55b46Smrg  if test "x$ac_ct_AR" = x; then
1310142a55b46Smrg    AR="false"
1310242a55b46Smrg  else
1310342a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1310442a55b46Smrgyes:)
131058ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
131068ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1310742a55b46Smrgac_tool_warned=yes ;;
13108c582b7e3Smrgesac
1310942a55b46Smrg    AR=$ac_ct_AR
1311042a55b46Smrg  fi
1311142a55b46Smrgfi
13112c582b7e3Smrg
1311342a55b46Smrg: ${AR=ar}
13114c582b7e3Smrg
13115c582b7e3Smrg
13116c582b7e3Smrg
13117c582b7e3Smrg
13118c582b7e3Smrg
13119c582b7e3Smrg
131208ce07328Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
131218ce07328Smrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
131228ce07328Smrg# higher priority because thats what people were doing historically (setting
131238ce07328Smrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
131248ce07328Smrg# variable obsoleted/removed.
13125c582b7e3Smrg
131268ce07328Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
131278ce07328Smrglt_ar_flags=$AR_FLAGS
13128c582b7e3Smrg
13129c582b7e3Smrg
13130c582b7e3Smrg
13131c582b7e3Smrg
131328ce07328Smrg
131338ce07328Smrg
131348ce07328Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
131358ce07328Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
131368ce07328Smrg
131378ce07328Smrg
131388ce07328Smrg
131398ce07328Smrg
131408ce07328Smrg
131418ce07328Smrg
131428ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
131438ce07328Smrgprintf %s "checking for archiver @FILE support... " >&6; }
131448ce07328Smrgif test ${lt_cv_ar_at_file+y}
131458ce07328Smrgthen :
131468ce07328Smrg  printf %s "(cached) " >&6
131478ce07328Smrgelse $as_nop
1314842a55b46Smrg  lt_cv_ar_at_file=no
1314942a55b46Smrg   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1315042a55b46Smrg/* end confdefs.h.  */
13151c582b7e3Smrg
1315242a55b46Smrgint
131538ce07328Smrgmain (void)
1315442a55b46Smrg{
1315542a55b46Smrg
1315642a55b46Smrg  ;
1315742a55b46Smrg  return 0;
1315842a55b46Smrg}
1315942a55b46Smrg_ACEOF
131608ce07328Smrgif ac_fn_c_try_compile "$LINENO"
131618ce07328Smrgthen :
1316242a55b46Smrg  echo conftest.$ac_objext > conftest.lst
1316342a55b46Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
1316442a55b46Smrg      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
1316542a55b46Smrg  (eval $lt_ar_try) 2>&5
1316642a55b46Smrg  ac_status=$?
131678ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1316842a55b46Smrg  test $ac_status = 0; }
13169e3d74329Smrg      if test 0 -eq "$ac_status"; then
1317042a55b46Smrg	# Ensure the archiver fails upon bogus file names.
1317142a55b46Smrg	rm -f conftest.$ac_objext libconftest.a
1317242a55b46Smrg	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
1317342a55b46Smrg  (eval $lt_ar_try) 2>&5
1317442a55b46Smrg  ac_status=$?
131758ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1317642a55b46Smrg  test $ac_status = 0; }
13177e3d74329Smrg	if test 0 -ne "$ac_status"; then
1317842a55b46Smrg          lt_cv_ar_at_file=@
1317942a55b46Smrg        fi
13180c582b7e3Smrg      fi
1318142a55b46Smrg      rm -f conftest.* libconftest.a
13182c582b7e3Smrg
1318342a55b46Smrgfi
131848ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
13185c582b7e3Smrg
1318642a55b46Smrgfi
131878ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
131888ce07328Smrgprintf "%s\n" "$lt_cv_ar_at_file" >&6; }
1318942a55b46Smrg
13190e3d74329Smrgif test no = "$lt_cv_ar_at_file"; then
1319142a55b46Smrg  archiver_list_spec=
1319242a55b46Smrgelse
1319342a55b46Smrg  archiver_list_spec=$lt_cv_ar_at_file
1319442a55b46Smrgfi
13195c582b7e3Smrg
13196c582b7e3Smrg
13197c582b7e3Smrg
13198c582b7e3Smrg
13199c582b7e3Smrg
13200c582b7e3Smrg
13201c582b7e3Smrg
1320242a55b46Smrgif test -n "$ac_tool_prefix"; then
1320342a55b46Smrg  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1320442a55b46Smrgset dummy ${ac_tool_prefix}strip; ac_word=$2
132058ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
132068ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
132078ce07328Smrgif test ${ac_cv_prog_STRIP+y}
132088ce07328Smrgthen :
132098ce07328Smrg  printf %s "(cached) " >&6
132108ce07328Smrgelse $as_nop
1321142a55b46Smrg  if test -n "$STRIP"; then
1321242a55b46Smrg  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1321342a55b46Smrgelse
1321442a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1321542a55b46Smrgfor as_dir in $PATH
1321642a55b46Smrgdo
1321742a55b46Smrg  IFS=$as_save_IFS
132188ce07328Smrg  case $as_dir in #(((
132198ce07328Smrg    '') as_dir=./ ;;
132208ce07328Smrg    */) ;;
132218ce07328Smrg    *) as_dir=$as_dir/ ;;
132228ce07328Smrg  esac
1322342a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
132248ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1322542a55b46Smrg    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
132268ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1322742a55b46Smrg    break 2
1322842a55b46Smrg  fi
1322942a55b46Smrgdone
1323042a55b46Smrg  done
1323142a55b46SmrgIFS=$as_save_IFS
13232c582b7e3Smrg
1323342a55b46Smrgfi
1323442a55b46Smrgfi
1323542a55b46SmrgSTRIP=$ac_cv_prog_STRIP
1323642a55b46Smrgif test -n "$STRIP"; then
132378ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
132388ce07328Smrgprintf "%s\n" "$STRIP" >&6; }
1323942a55b46Smrgelse
132408ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
132418ce07328Smrgprintf "%s\n" "no" >&6; }
1324242a55b46Smrgfi
13243c582b7e3Smrg
13244c582b7e3Smrg
1324542a55b46Smrgfi
1324642a55b46Smrgif test -z "$ac_cv_prog_STRIP"; then
1324742a55b46Smrg  ac_ct_STRIP=$STRIP
1324842a55b46Smrg  # Extract the first word of "strip", so it can be a program name with args.
1324942a55b46Smrgset dummy strip; ac_word=$2
132508ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
132518ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
132528ce07328Smrgif test ${ac_cv_prog_ac_ct_STRIP+y}
132538ce07328Smrgthen :
132548ce07328Smrg  printf %s "(cached) " >&6
132558ce07328Smrgelse $as_nop
1325642a55b46Smrg  if test -n "$ac_ct_STRIP"; then
1325742a55b46Smrg  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
1325842a55b46Smrgelse
1325942a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1326042a55b46Smrgfor as_dir in $PATH
1326142a55b46Smrgdo
1326242a55b46Smrg  IFS=$as_save_IFS
132638ce07328Smrg  case $as_dir in #(((
132648ce07328Smrg    '') as_dir=./ ;;
132658ce07328Smrg    */) ;;
132668ce07328Smrg    *) as_dir=$as_dir/ ;;
132678ce07328Smrg  esac
1326842a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
132698ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1327042a55b46Smrg    ac_cv_prog_ac_ct_STRIP="strip"
132718ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1327242a55b46Smrg    break 2
1327342a55b46Smrg  fi
1327442a55b46Smrgdone
1327542a55b46Smrg  done
1327642a55b46SmrgIFS=$as_save_IFS
13277c582b7e3Smrg
1327842a55b46Smrgfi
1327942a55b46Smrgfi
1328042a55b46Smrgac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
1328142a55b46Smrgif test -n "$ac_ct_STRIP"; then
132828ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
132838ce07328Smrgprintf "%s\n" "$ac_ct_STRIP" >&6; }
1328442a55b46Smrgelse
132858ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
132868ce07328Smrgprintf "%s\n" "no" >&6; }
1328742a55b46Smrgfi
13288c582b7e3Smrg
1328942a55b46Smrg  if test "x$ac_ct_STRIP" = x; then
1329042a55b46Smrg    STRIP=":"
1329142a55b46Smrg  else
1329242a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1329342a55b46Smrgyes:)
132948ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
132958ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1329642a55b46Smrgac_tool_warned=yes ;;
1329742a55b46Smrgesac
1329842a55b46Smrg    STRIP=$ac_ct_STRIP
1329942a55b46Smrg  fi
1330042a55b46Smrgelse
1330142a55b46Smrg  STRIP="$ac_cv_prog_STRIP"
1330242a55b46Smrgfi
13303c582b7e3Smrg
1330442a55b46Smrgtest -z "$STRIP" && STRIP=:
13305c582b7e3Smrg
13306c582b7e3Smrg
1330742a55b46Smrg
1330842a55b46Smrg
1330942a55b46Smrg
1331042a55b46Smrg
1331142a55b46Smrgif test -n "$ac_tool_prefix"; then
1331242a55b46Smrg  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1331342a55b46Smrgset dummy ${ac_tool_prefix}ranlib; ac_word=$2
133148ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
133158ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
133168ce07328Smrgif test ${ac_cv_prog_RANLIB+y}
133178ce07328Smrgthen :
133188ce07328Smrg  printf %s "(cached) " >&6
133198ce07328Smrgelse $as_nop
1332042a55b46Smrg  if test -n "$RANLIB"; then
1332142a55b46Smrg  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1332242a55b46Smrgelse
1332342a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1332442a55b46Smrgfor as_dir in $PATH
1332542a55b46Smrgdo
1332642a55b46Smrg  IFS=$as_save_IFS
133278ce07328Smrg  case $as_dir in #(((
133288ce07328Smrg    '') as_dir=./ ;;
133298ce07328Smrg    */) ;;
133308ce07328Smrg    *) as_dir=$as_dir/ ;;
133318ce07328Smrg  esac
1333242a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
133338ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1333442a55b46Smrg    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
133358ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1333642a55b46Smrg    break 2
13337c582b7e3Smrg  fi
1333842a55b46Smrgdone
1333942a55b46Smrg  done
1334042a55b46SmrgIFS=$as_save_IFS
13341c582b7e3Smrg
1334242a55b46Smrgfi
1334342a55b46Smrgfi
1334442a55b46SmrgRANLIB=$ac_cv_prog_RANLIB
1334542a55b46Smrgif test -n "$RANLIB"; then
133468ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
133478ce07328Smrgprintf "%s\n" "$RANLIB" >&6; }
1334842a55b46Smrgelse
133498ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
133508ce07328Smrgprintf "%s\n" "no" >&6; }
1335142a55b46Smrgfi
13352c582b7e3Smrg
13353c582b7e3Smrg
1335442a55b46Smrgfi
1335542a55b46Smrgif test -z "$ac_cv_prog_RANLIB"; then
1335642a55b46Smrg  ac_ct_RANLIB=$RANLIB
1335742a55b46Smrg  # Extract the first word of "ranlib", so it can be a program name with args.
1335842a55b46Smrgset dummy ranlib; ac_word=$2
133598ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
133608ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
133618ce07328Smrgif test ${ac_cv_prog_ac_ct_RANLIB+y}
133628ce07328Smrgthen :
133638ce07328Smrg  printf %s "(cached) " >&6
133648ce07328Smrgelse $as_nop
1336542a55b46Smrg  if test -n "$ac_ct_RANLIB"; then
1336642a55b46Smrg  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
1336742a55b46Smrgelse
1336842a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1336942a55b46Smrgfor as_dir in $PATH
1337042a55b46Smrgdo
1337142a55b46Smrg  IFS=$as_save_IFS
133728ce07328Smrg  case $as_dir in #(((
133738ce07328Smrg    '') as_dir=./ ;;
133748ce07328Smrg    */) ;;
133758ce07328Smrg    *) as_dir=$as_dir/ ;;
133768ce07328Smrg  esac
1337742a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
133788ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1337942a55b46Smrg    ac_cv_prog_ac_ct_RANLIB="ranlib"
133808ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1338142a55b46Smrg    break 2
1338242a55b46Smrg  fi
1338342a55b46Smrgdone
1338442a55b46Smrg  done
1338542a55b46SmrgIFS=$as_save_IFS
13386c582b7e3Smrg
13387c582b7e3Smrgfi
1338842a55b46Smrgfi
1338942a55b46Smrgac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
1339042a55b46Smrgif test -n "$ac_ct_RANLIB"; then
133918ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
133928ce07328Smrgprintf "%s\n" "$ac_ct_RANLIB" >&6; }
1339342a55b46Smrgelse
133948ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
133958ce07328Smrgprintf "%s\n" "no" >&6; }
1339642a55b46Smrgfi
13397c582b7e3Smrg
1339842a55b46Smrg  if test "x$ac_ct_RANLIB" = x; then
1339942a55b46Smrg    RANLIB=":"
1340042a55b46Smrg  else
1340142a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1340242a55b46Smrgyes:)
134038ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
134048ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1340542a55b46Smrgac_tool_warned=yes ;;
1340642a55b46Smrgesac
1340742a55b46Smrg    RANLIB=$ac_ct_RANLIB
1340842a55b46Smrg  fi
13409c582b7e3Smrgelse
1341042a55b46Smrg  RANLIB="$ac_cv_prog_RANLIB"
1341142a55b46Smrgfi
1341242a55b46Smrg
1341342a55b46Smrgtest -z "$RANLIB" && RANLIB=:
1341442a55b46Smrg
1341542a55b46Smrg
1341642a55b46Smrg
1341742a55b46Smrg
1341842a55b46Smrg
1341942a55b46Smrg
1342042a55b46Smrg# Determine commands to create old-style static archives.
1342142a55b46Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1342242a55b46Smrgold_postinstall_cmds='chmod 644 $oldlib'
1342342a55b46Smrgold_postuninstall_cmds=
1342442a55b46Smrg
1342542a55b46Smrgif test -n "$RANLIB"; then
1342642a55b46Smrg  case $host_os in
13427e3d74329Smrg  bitrig* | openbsd*)
1342842a55b46Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1342942a55b46Smrg    ;;
1343042a55b46Smrg  *)
1343142a55b46Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1343242a55b46Smrg    ;;
1343342a55b46Smrg  esac
1343442a55b46Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
13435c582b7e3Smrgfi
13436c582b7e3Smrg
13437c582b7e3Smrgcase $host_os in
1343842a55b46Smrg  darwin*)
1343942a55b46Smrg    lock_old_archive_extraction=yes ;;
13440c582b7e3Smrg  *)
1344142a55b46Smrg    lock_old_archive_extraction=no ;;
13442c582b7e3Smrgesac
13443c582b7e3Smrg
13444c582b7e3Smrg
13445c582b7e3Smrg
13446c582b7e3Smrg
13447c582b7e3Smrg
13448c582b7e3Smrg
13449c582b7e3Smrg
13450c582b7e3Smrg
13451c582b7e3Smrg
13452c582b7e3Smrg
13453c582b7e3Smrg
13454c582b7e3Smrg
13455c582b7e3Smrg
13456c582b7e3Smrg
13457c582b7e3Smrg
13458c582b7e3Smrg
13459c582b7e3Smrg
13460c582b7e3Smrg
13461c582b7e3Smrg
13462c582b7e3Smrg
13463c582b7e3Smrg
13464c582b7e3Smrg
13465c582b7e3Smrg
13466c582b7e3Smrg
13467c582b7e3Smrg
13468c582b7e3Smrg
13469c582b7e3Smrg
13470c582b7e3Smrg
13471c582b7e3Smrg
13472c582b7e3Smrg
13473c582b7e3Smrg
13474c582b7e3Smrg
1347542a55b46Smrg
1347642a55b46Smrg
1347742a55b46Smrg
1347842a55b46Smrg
1347942a55b46Smrg
1348042a55b46Smrg
1348142a55b46Smrg
1348242a55b46Smrg# If no C compiler was specified, use CC.
1348342a55b46SmrgLTCC=${LTCC-"$CC"}
1348442a55b46Smrg
1348542a55b46Smrg# If no C compiler flags were specified, use CFLAGS.
1348642a55b46SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1348742a55b46Smrg
1348842a55b46Smrg# Allow CC to be a program name with arguments.
1348942a55b46Smrgcompiler=$CC
1349042a55b46Smrg
1349142a55b46Smrg
1349242a55b46Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
134938ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
134948ce07328Smrgprintf %s "checking command to parse $NM output from $compiler object... " >&6; }
134958ce07328Smrgif test ${lt_cv_sys_global_symbol_pipe+y}
134968ce07328Smrgthen :
134978ce07328Smrg  printf %s "(cached) " >&6
134988ce07328Smrgelse $as_nop
1349942a55b46Smrg
1350042a55b46Smrg# These are sane defaults that work on at least a few old systems.
1350142a55b46Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1350242a55b46Smrg
1350342a55b46Smrg# Character class describing NM global symbol codes.
1350442a55b46Smrgsymcode='[BCDEGRST]'
1350542a55b46Smrg
1350642a55b46Smrg# Regexp to match symbols that can be accessed directly from C.
1350742a55b46Smrgsympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1350842a55b46Smrg
1350942a55b46Smrg# Define system-specific variables.
1351042a55b46Smrgcase $host_os in
1351142a55b46Smrgaix*)
1351242a55b46Smrg  symcode='[BCDT]'
1351342a55b46Smrg  ;;
1351442a55b46Smrgcygwin* | mingw* | pw32* | cegcc*)
1351542a55b46Smrg  symcode='[ABCDGISTW]'
1351642a55b46Smrg  ;;
1351742a55b46Smrghpux*)
13518e3d74329Smrg  if test ia64 = "$host_cpu"; then
1351942a55b46Smrg    symcode='[ABCDEGRST]'
1352042a55b46Smrg  fi
1352142a55b46Smrg  ;;
1352242a55b46Smrgirix* | nonstopux*)
1352342a55b46Smrg  symcode='[BCDEGRST]'
1352442a55b46Smrg  ;;
1352542a55b46Smrgosf*)
1352642a55b46Smrg  symcode='[BCDEGQRST]'
1352742a55b46Smrg  ;;
1352842a55b46Smrgsolaris*)
1352942a55b46Smrg  symcode='[BDRT]'
1353042a55b46Smrg  ;;
1353142a55b46Smrgsco3.2v5*)
1353242a55b46Smrg  symcode='[DT]'
1353342a55b46Smrg  ;;
1353442a55b46Smrgsysv4.2uw2*)
1353542a55b46Smrg  symcode='[DT]'
1353642a55b46Smrg  ;;
1353742a55b46Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
1353842a55b46Smrg  symcode='[ABDT]'
1353942a55b46Smrg  ;;
1354042a55b46Smrgsysv4)
1354142a55b46Smrg  symcode='[DFNSTU]'
1354242a55b46Smrg  ;;
1354342a55b46Smrgesac
1354442a55b46Smrg
1354542a55b46Smrg# If we're using GNU nm, then use its standard symbol codes.
1354642a55b46Smrgcase `$NM -V 2>&1` in
1354742a55b46Smrg*GNU* | *'with BFD'*)
1354842a55b46Smrg  symcode='[ABCDGIRSTW]' ;;
1354942a55b46Smrgesac
1355042a55b46Smrg
13551e3d74329Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
13552e3d74329Smrg  # Gets list of data symbols to import.
135538ce07328Smrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
13554e3d74329Smrg  # Adjust the below global symbol transforms to fixup imported variables.
13555e3d74329Smrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
13556e3d74329Smrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
13557e3d74329Smrg  lt_c_name_lib_hook="\
13558e3d74329Smrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
13559e3d74329Smrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
13560e3d74329Smrgelse
13561e3d74329Smrg  # Disable hooks by default.
13562e3d74329Smrg  lt_cv_sys_global_symbol_to_import=
13563e3d74329Smrg  lt_cdecl_hook=
13564e3d74329Smrg  lt_c_name_hook=
13565e3d74329Smrg  lt_c_name_lib_hook=
13566e3d74329Smrgfi
13567e3d74329Smrg
1356842a55b46Smrg# Transform an extracted symbol line into a proper C declaration.
1356942a55b46Smrg# Some systems (esp. on ia64) link data and code symbols differently,
1357042a55b46Smrg# so use this general approach.
135718ce07328Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
13572e3d74329Smrg$lt_cdecl_hook\
13573e3d74329Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
13574e3d74329Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
1357542a55b46Smrg
1357642a55b46Smrg# Transform an extracted symbol line into symbol name and symbol address
135778ce07328Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
13578e3d74329Smrg$lt_c_name_hook\
13579e3d74329Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
13580e3d74329Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
13581e3d74329Smrg
13582e3d74329Smrg# Transform an extracted symbol line into symbol name with lib prefix and
13583e3d74329Smrg# symbol address.
135848ce07328Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
13585e3d74329Smrg$lt_c_name_lib_hook\
13586e3d74329Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
13587e3d74329Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
13588e3d74329Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
1358942a55b46Smrg
1359042a55b46Smrg# Handle CRLF in mingw tool chain
1359142a55b46Smrgopt_cr=
1359242a55b46Smrgcase $build_os in
1359342a55b46Smrgmingw*)
1359442a55b46Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1359542a55b46Smrg  ;;
1359642a55b46Smrgesac
1359742a55b46Smrg
1359842a55b46Smrg# Try without a prefix underscore, then with it.
1359942a55b46Smrgfor ac_symprfx in "" "_"; do
1360042a55b46Smrg
1360142a55b46Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
1360242a55b46Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
1360342a55b46Smrg
1360442a55b46Smrg  # Write the raw and C identifiers.
1360542a55b46Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
13606e3d74329Smrg    # Fake it for dumpbin and say T for any non-static function,
13607e3d74329Smrg    # D for any global variable and I for any imported variable.
136088ce07328Smrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
1360942a55b46Smrg    # which start with @ or ?.
1361042a55b46Smrg    lt_cv_sys_global_symbol_pipe="$AWK '"\
1361142a55b46Smrg"     {last_section=section; section=\$ 3};"\
1361242a55b46Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
1361342a55b46Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
13614e3d74329Smrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
13615e3d74329Smrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
13616e3d74329Smrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
1361742a55b46Smrg"     \$ 0!~/External *\|/{next};"\
1361842a55b46Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
1361942a55b46Smrg"     {if(hide[section]) next};"\
13620e3d74329Smrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
13621e3d74329Smrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
13622e3d74329Smrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
13623e3d74329Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
1362442a55b46Smrg"     ' prfx=^$ac_symprfx"
1362542a55b46Smrg  else
136268ce07328Smrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
1362742a55b46Smrg  fi
136288ce07328Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
1362942a55b46Smrg
1363042a55b46Smrg  # Check to see that the pipe works correctly.
1363142a55b46Smrg  pipe_works=no
1363242a55b46Smrg
1363342a55b46Smrg  rm -f conftest*
1363442a55b46Smrg  cat > conftest.$ac_ext <<_LT_EOF
1363542a55b46Smrg#ifdef __cplusplus
1363642a55b46Smrgextern "C" {
1363742a55b46Smrg#endif
1363842a55b46Smrgchar nm_test_var;
1363942a55b46Smrgvoid nm_test_func(void);
1364042a55b46Smrgvoid nm_test_func(void){}
1364142a55b46Smrg#ifdef __cplusplus
1364242a55b46Smrg}
1364342a55b46Smrg#endif
1364442a55b46Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
1364542a55b46Smrg_LT_EOF
1364642a55b46Smrg
1364742a55b46Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
1364842a55b46Smrg  (eval $ac_compile) 2>&5
1364942a55b46Smrg  ac_status=$?
136508ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1365142a55b46Smrg  test $ac_status = 0; }; then
1365242a55b46Smrg    # Now try to grab the symbols.
1365342a55b46Smrg    nlist=conftest.nm
1365442a55b46Smrg    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
1365542a55b46Smrg  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
1365642a55b46Smrg  ac_status=$?
136578ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1365842a55b46Smrg  test $ac_status = 0; } && test -s "$nlist"; then
1365942a55b46Smrg      # Try sorting and uniquifying the output.
1366042a55b46Smrg      if sort "$nlist" | uniq > "$nlist"T; then
1366142a55b46Smrg	mv -f "$nlist"T "$nlist"
13662c582b7e3Smrg      else
1366342a55b46Smrg	rm -f "$nlist"T
13664c582b7e3Smrg      fi
13665c582b7e3Smrg
1366642a55b46Smrg      # Make sure that we snagged all the symbols we need.
1366742a55b46Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
1366842a55b46Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
1366942a55b46Smrg	  cat <<_LT_EOF > conftest.$ac_ext
1367042a55b46Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
13671e3d74329Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
13672e3d74329Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
1367342a55b46Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
1367442a55b46Smrg# define LT_DLSYM_CONST
13675e3d74329Smrg#elif defined __osf__
1367642a55b46Smrg/* This system does not cope well with relocations in const data.  */
1367742a55b46Smrg# define LT_DLSYM_CONST
1367842a55b46Smrg#else
1367942a55b46Smrg# define LT_DLSYM_CONST const
1368042a55b46Smrg#endif
13681c582b7e3Smrg
1368242a55b46Smrg#ifdef __cplusplus
1368342a55b46Smrgextern "C" {
1368442a55b46Smrg#endif
13685c582b7e3Smrg
1368642a55b46Smrg_LT_EOF
1368742a55b46Smrg	  # Now generate the symbol file.
1368842a55b46Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
13689c582b7e3Smrg
1369042a55b46Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
13691c582b7e3Smrg
1369242a55b46Smrg/* The mapping between symbol names and symbols.  */
1369342a55b46SmrgLT_DLSYM_CONST struct {
1369442a55b46Smrg  const char *name;
1369542a55b46Smrg  void       *address;
1369642a55b46Smrg}
1369742a55b46Smrglt__PROGRAM__LTX_preloaded_symbols[] =
1369842a55b46Smrg{
1369942a55b46Smrg  { "@PROGRAM@", (void *) 0 },
1370042a55b46Smrg_LT_EOF
13701e3d74329Smrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
1370242a55b46Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
1370342a55b46Smrg  {0, (void *) 0}
1370442a55b46Smrg};
13705c582b7e3Smrg
1370642a55b46Smrg/* This works around a problem in FreeBSD linker */
1370742a55b46Smrg#ifdef FREEBSD_WORKAROUND
1370842a55b46Smrgstatic const void *lt_preloaded_setup() {
1370942a55b46Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
1371042a55b46Smrg}
1371142a55b46Smrg#endif
13712c582b7e3Smrg
1371342a55b46Smrg#ifdef __cplusplus
1371442a55b46Smrg}
1371542a55b46Smrg#endif
1371642a55b46Smrg_LT_EOF
1371742a55b46Smrg	  # Now try linking the two files.
1371842a55b46Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
1371942a55b46Smrg	  lt_globsym_save_LIBS=$LIBS
1372042a55b46Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
13721e3d74329Smrg	  LIBS=conftstm.$ac_objext
1372242a55b46Smrg	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
1372342a55b46Smrg	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
1372442a55b46Smrg  (eval $ac_link) 2>&5
1372542a55b46Smrg  ac_status=$?
137268ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13727e3d74329Smrg  test $ac_status = 0; } && test -s conftest$ac_exeext; then
1372842a55b46Smrg	    pipe_works=yes
13729c582b7e3Smrg	  fi
1373042a55b46Smrg	  LIBS=$lt_globsym_save_LIBS
1373142a55b46Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
13732c582b7e3Smrg	else
1373342a55b46Smrg	  echo "cannot find nm_test_func in $nlist" >&5
13734c582b7e3Smrg	fi
1373542a55b46Smrg      else
1373642a55b46Smrg	echo "cannot find nm_test_var in $nlist" >&5
13737c582b7e3Smrg      fi
1373842a55b46Smrg    else
1373942a55b46Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
1374042a55b46Smrg    fi
1374142a55b46Smrg  else
1374242a55b46Smrg    echo "$progname: failed program was:" >&5
1374342a55b46Smrg    cat conftest.$ac_ext >&5
1374442a55b46Smrg  fi
1374542a55b46Smrg  rm -rf conftest* conftst*
13746c582b7e3Smrg
1374742a55b46Smrg  # Do not use the global_symbol_pipe unless it works.
13748e3d74329Smrg  if test yes = "$pipe_works"; then
1374942a55b46Smrg    break
1375042a55b46Smrg  else
1375142a55b46Smrg    lt_cv_sys_global_symbol_pipe=
1375242a55b46Smrg  fi
1375342a55b46Smrgdone
13754c582b7e3Smrg
1375542a55b46Smrgfi
13756c582b7e3Smrg
1375742a55b46Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
1375842a55b46Smrg  lt_cv_sys_global_symbol_to_cdecl=
13759c582b7e3Smrgfi
1376042a55b46Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
137618ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
137628ce07328Smrgprintf "%s\n" "failed" >&6; }
13763c582b7e3Smrgelse
137648ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
137658ce07328Smrgprintf "%s\n" "ok" >&6; }
1376642a55b46Smrgfi
13767c582b7e3Smrg
1376842a55b46Smrg# Response file support.
1376942a55b46Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
1377042a55b46Smrg  nm_file_list_spec='@'
1377142a55b46Smrgelif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
1377242a55b46Smrg  nm_file_list_spec='@'
13773c582b7e3Smrgfi
13774c582b7e3Smrg
13775c582b7e3Smrg
13776c582b7e3Smrg
13777c582b7e3Smrg
13778c582b7e3Smrg
13779c582b7e3Smrg
13780c582b7e3Smrg
13781c582b7e3Smrg
13782c582b7e3Smrg
13783c582b7e3Smrg
13784c582b7e3Smrg
13785c582b7e3Smrg
13786c582b7e3Smrg
13787c582b7e3Smrg
13788c582b7e3Smrg
13789c582b7e3Smrg
13790e3d74329Smrg
13791e3d74329Smrg
13792e3d74329Smrg
13793e3d74329Smrg
13794e3d74329Smrg
13795e3d74329Smrg
13796e3d74329Smrg
13797e3d74329Smrg
13798e3d74329Smrg
13799e3d74329Smrg
13800c582b7e3Smrg
13801c582b7e3Smrg
13802c582b7e3Smrg
13803c582b7e3Smrg
13804c582b7e3Smrg
13805c582b7e3Smrg
13806c582b7e3Smrg
1380742a55b46Smrg
1380842a55b46Smrg
1380942a55b46Smrg
1381042a55b46Smrg
138118ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
138128ce07328Smrgprintf %s "checking for sysroot... " >&6; }
1381342a55b46Smrg
1381442a55b46Smrg# Check whether --with-sysroot was given.
138158ce07328Smrgif test ${with_sysroot+y}
138168ce07328Smrgthen :
1381742a55b46Smrg  withval=$with_sysroot;
138188ce07328Smrgelse $as_nop
1381942a55b46Smrg  with_sysroot=no
1382042a55b46Smrgfi
1382142a55b46Smrg
1382242a55b46Smrg
1382342a55b46Smrglt_sysroot=
13824e3d74329Smrgcase $with_sysroot in #(
1382542a55b46Smrg yes)
13826e3d74329Smrg   if test yes = "$GCC"; then
1382742a55b46Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1382842a55b46Smrg   fi
1382942a55b46Smrg   ;; #(
1383042a55b46Smrg /*)
138318ce07328Smrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1383242a55b46Smrg   ;; #(
1383342a55b46Smrg no|'')
1383442a55b46Smrg   ;; #(
1383542a55b46Smrg *)
138368ce07328Smrg   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
138378ce07328Smrgprintf "%s\n" "$with_sysroot" >&6; }
1383842a55b46Smrg   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
1383942a55b46Smrg   ;;
1384042a55b46Smrgesac
1384142a55b46Smrg
138428ce07328Smrg { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
138438ce07328Smrgprintf "%s\n" "${lt_sysroot:-no}" >&6; }
1384442a55b46Smrg
1384542a55b46Smrg
1384642a55b46Smrg
1384742a55b46Smrg
1384842a55b46Smrg
138498ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
138508ce07328Smrgprintf %s "checking for a working dd... " >&6; }
138518ce07328Smrgif test ${ac_cv_path_lt_DD+y}
138528ce07328Smrgthen :
138538ce07328Smrg  printf %s "(cached) " >&6
138548ce07328Smrgelse $as_nop
13855e3d74329Smrg  printf 0123456789abcdef0123456789abcdef >conftest.i
13856e3d74329Smrgcat conftest.i conftest.i >conftest2.i
13857e3d74329Smrg: ${lt_DD:=$DD}
13858e3d74329Smrgif test -z "$lt_DD"; then
13859e3d74329Smrg  ac_path_lt_DD_found=false
13860e3d74329Smrg  # Loop through the user's path and test for each of PROGNAME-LIST
13861e3d74329Smrg  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13862e3d74329Smrgfor as_dir in $PATH
13863e3d74329Smrgdo
13864e3d74329Smrg  IFS=$as_save_IFS
138658ce07328Smrg  case $as_dir in #(((
138668ce07328Smrg    '') as_dir=./ ;;
138678ce07328Smrg    */) ;;
138688ce07328Smrg    *) as_dir=$as_dir/ ;;
138698ce07328Smrg  esac
138708ce07328Smrg    for ac_prog in dd
138718ce07328Smrg   do
13872e3d74329Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
138738ce07328Smrg      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
13874e3d74329Smrg      as_fn_executable_p "$ac_path_lt_DD" || continue
13875e3d74329Smrgif "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
13876e3d74329Smrg  cmp -s conftest.i conftest.out \
13877e3d74329Smrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
13878e3d74329Smrgfi
13879e3d74329Smrg      $ac_path_lt_DD_found && break 3
13880e3d74329Smrg    done
13881e3d74329Smrg  done
13882e3d74329Smrg  done
13883e3d74329SmrgIFS=$as_save_IFS
13884e3d74329Smrg  if test -z "$ac_cv_path_lt_DD"; then
13885e3d74329Smrg    :
13886e3d74329Smrg  fi
13887e3d74329Smrgelse
13888e3d74329Smrg  ac_cv_path_lt_DD=$lt_DD
13889e3d74329Smrgfi
13890e3d74329Smrg
13891e3d74329Smrgrm -f conftest.i conftest2.i conftest.out
13892e3d74329Smrgfi
138938ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
138948ce07328Smrgprintf "%s\n" "$ac_cv_path_lt_DD" >&6; }
13895e3d74329Smrg
13896e3d74329Smrg
138978ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
138988ce07328Smrgprintf %s "checking how to truncate binary pipes... " >&6; }
138998ce07328Smrgif test ${lt_cv_truncate_bin+y}
139008ce07328Smrgthen :
139018ce07328Smrg  printf %s "(cached) " >&6
139028ce07328Smrgelse $as_nop
13903e3d74329Smrg  printf 0123456789abcdef0123456789abcdef >conftest.i
13904e3d74329Smrgcat conftest.i conftest.i >conftest2.i
13905e3d74329Smrglt_cv_truncate_bin=
13906e3d74329Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
13907e3d74329Smrg  cmp -s conftest.i conftest.out \
13908e3d74329Smrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
13909e3d74329Smrgfi
13910e3d74329Smrgrm -f conftest.i conftest2.i conftest.out
13911e3d74329Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
13912e3d74329Smrgfi
139138ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
139148ce07328Smrgprintf "%s\n" "$lt_cv_truncate_bin" >&6; }
13915e3d74329Smrg
13916e3d74329Smrg
13917e3d74329Smrg
13918e3d74329Smrg
13919e3d74329Smrg
13920e3d74329Smrg
13921e3d74329Smrg
13922e3d74329Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
13923e3d74329Smrgfunc_cc_basename ()
13924e3d74329Smrg{
13925e3d74329Smrg    for cc_temp in $*""; do
13926e3d74329Smrg      case $cc_temp in
13927e3d74329Smrg        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13928e3d74329Smrg        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13929e3d74329Smrg        \-*) ;;
13930e3d74329Smrg        *) break;;
13931e3d74329Smrg      esac
13932e3d74329Smrg    done
13933e3d74329Smrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
13934e3d74329Smrg}
13935e3d74329Smrg
1393642a55b46Smrg# Check whether --enable-libtool-lock was given.
139378ce07328Smrgif test ${enable_libtool_lock+y}
139388ce07328Smrgthen :
1393942a55b46Smrg  enableval=$enable_libtool_lock;
1394042a55b46Smrgfi
1394142a55b46Smrg
13942e3d74329Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
1394342a55b46Smrg
1394442a55b46Smrg# Some flags need to be propagated to the compiler or linker for good
1394542a55b46Smrg# libtool support.
1394642a55b46Smrgcase $host in
1394742a55b46Smrgia64-*-hpux*)
13948e3d74329Smrg  # Find out what ABI is being produced by ac_compile, and set mode
13949e3d74329Smrg  # options accordingly.
1395042a55b46Smrg  echo 'int i;' > conftest.$ac_ext
1395142a55b46Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
1395242a55b46Smrg  (eval $ac_compile) 2>&5
1395342a55b46Smrg  ac_status=$?
139548ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1395542a55b46Smrg  test $ac_status = 0; }; then
139568ce07328Smrg    case `$FILECMD conftest.$ac_objext` in
1395742a55b46Smrg      *ELF-32*)
13958e3d74329Smrg	HPUX_IA64_MODE=32
1395942a55b46Smrg	;;
1396042a55b46Smrg      *ELF-64*)
13961e3d74329Smrg	HPUX_IA64_MODE=64
1396242a55b46Smrg	;;
1396342a55b46Smrg    esac
1396442a55b46Smrg  fi
1396542a55b46Smrg  rm -rf conftest*
1396642a55b46Smrg  ;;
1396742a55b46Smrg*-*-irix6*)
13968e3d74329Smrg  # Find out what ABI is being produced by ac_compile, and set linker
13969e3d74329Smrg  # options accordingly.
1397042a55b46Smrg  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
1397142a55b46Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
1397242a55b46Smrg  (eval $ac_compile) 2>&5
1397342a55b46Smrg  ac_status=$?
139748ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1397542a55b46Smrg  test $ac_status = 0; }; then
13976e3d74329Smrg    if test yes = "$lt_cv_prog_gnu_ld"; then
139778ce07328Smrg      case `$FILECMD conftest.$ac_objext` in
1397842a55b46Smrg	*32-bit*)
1397942a55b46Smrg	  LD="${LD-ld} -melf32bsmip"
13980c582b7e3Smrg	  ;;
1398142a55b46Smrg	*N32*)
1398242a55b46Smrg	  LD="${LD-ld} -melf32bmipn32"
13983c582b7e3Smrg	  ;;
1398442a55b46Smrg	*64-bit*)
1398542a55b46Smrg	  LD="${LD-ld} -melf64bmip"
1398642a55b46Smrg	;;
1398742a55b46Smrg      esac
1398842a55b46Smrg    else
139898ce07328Smrg      case `$FILECMD conftest.$ac_objext` in
1399042a55b46Smrg	*32-bit*)
1399142a55b46Smrg	  LD="${LD-ld} -32"
13992c582b7e3Smrg	  ;;
1399342a55b46Smrg	*N32*)
1399442a55b46Smrg	  LD="${LD-ld} -n32"
13995c582b7e3Smrg	  ;;
1399642a55b46Smrg	*64-bit*)
1399742a55b46Smrg	  LD="${LD-ld} -64"
13998c582b7e3Smrg	  ;;
1399942a55b46Smrg      esac
1400042a55b46Smrg    fi
1400142a55b46Smrg  fi
1400242a55b46Smrg  rm -rf conftest*
1400342a55b46Smrg  ;;
1400442a55b46Smrg
14005e3d74329Smrgmips64*-*linux*)
14006e3d74329Smrg  # Find out what ABI is being produced by ac_compile, and set linker
14007e3d74329Smrg  # options accordingly.
14008e3d74329Smrg  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
14009e3d74329Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14010e3d74329Smrg  (eval $ac_compile) 2>&5
14011e3d74329Smrg  ac_status=$?
140128ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14013e3d74329Smrg  test $ac_status = 0; }; then
14014e3d74329Smrg    emul=elf
140158ce07328Smrg    case `$FILECMD conftest.$ac_objext` in
14016e3d74329Smrg      *32-bit*)
14017e3d74329Smrg	emul="${emul}32"
14018e3d74329Smrg	;;
14019e3d74329Smrg      *64-bit*)
14020e3d74329Smrg	emul="${emul}64"
14021e3d74329Smrg	;;
14022e3d74329Smrg    esac
140238ce07328Smrg    case `$FILECMD conftest.$ac_objext` in
14024e3d74329Smrg      *MSB*)
14025e3d74329Smrg	emul="${emul}btsmip"
14026e3d74329Smrg	;;
14027e3d74329Smrg      *LSB*)
14028e3d74329Smrg	emul="${emul}ltsmip"
14029e3d74329Smrg	;;
14030e3d74329Smrg    esac
140318ce07328Smrg    case `$FILECMD conftest.$ac_objext` in
14032e3d74329Smrg      *N32*)
14033e3d74329Smrg	emul="${emul}n32"
14034e3d74329Smrg	;;
14035e3d74329Smrg    esac
14036e3d74329Smrg    LD="${LD-ld} -m $emul"
14037e3d74329Smrg  fi
14038e3d74329Smrg  rm -rf conftest*
14039e3d74329Smrg  ;;
14040e3d74329Smrg
14041e3d74329Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1404242a55b46Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
14043e3d74329Smrg  # Find out what ABI is being produced by ac_compile, and set linker
14044e3d74329Smrg  # options accordingly.  Note that the listed cases only cover the
14045e3d74329Smrg  # situations where additional linker options are needed (such as when
14046e3d74329Smrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
14047e3d74329Smrg  # vice versa); the common cases where no linker options are needed do
14048e3d74329Smrg  # not appear in the list.
1404942a55b46Smrg  echo 'int i;' > conftest.$ac_ext
1405042a55b46Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
1405142a55b46Smrg  (eval $ac_compile) 2>&5
1405242a55b46Smrg  ac_status=$?
140538ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1405442a55b46Smrg  test $ac_status = 0; }; then
140558ce07328Smrg    case `$FILECMD conftest.o` in
1405642a55b46Smrg      *32-bit*)
1405742a55b46Smrg	case $host in
1405842a55b46Smrg	  x86_64-*kfreebsd*-gnu)
1405942a55b46Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
1406042a55b46Smrg	    ;;
1406142a55b46Smrg	  x86_64-*linux*)
140628ce07328Smrg	    case `$FILECMD conftest.o` in
140630496e070Smrg	      *x86-64*)
140640496e070Smrg		LD="${LD-ld} -m elf32_x86_64"
140650496e070Smrg		;;
140660496e070Smrg	      *)
140670496e070Smrg		LD="${LD-ld} -m elf_i386"
140680496e070Smrg		;;
140690496e070Smrg	    esac
1407042a55b46Smrg	    ;;
14071e3d74329Smrg	  powerpc64le-*linux*)
14072e3d74329Smrg	    LD="${LD-ld} -m elf32lppclinux"
14073e3d74329Smrg	    ;;
14074e3d74329Smrg	  powerpc64-*linux*)
1407542a55b46Smrg	    LD="${LD-ld} -m elf32ppclinux"
1407642a55b46Smrg	    ;;
1407742a55b46Smrg	  s390x-*linux*)
1407842a55b46Smrg	    LD="${LD-ld} -m elf_s390"
1407942a55b46Smrg	    ;;
1408042a55b46Smrg	  sparc64-*linux*)
1408142a55b46Smrg	    LD="${LD-ld} -m elf32_sparc"
1408242a55b46Smrg	    ;;
14083c582b7e3Smrg	esac
1408442a55b46Smrg	;;
1408542a55b46Smrg      *64-bit*)
1408642a55b46Smrg	case $host in
1408742a55b46Smrg	  x86_64-*kfreebsd*-gnu)
1408842a55b46Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1408942a55b46Smrg	    ;;
1409042a55b46Smrg	  x86_64-*linux*)
1409142a55b46Smrg	    LD="${LD-ld} -m elf_x86_64"
1409242a55b46Smrg	    ;;
14093e3d74329Smrg	  powerpcle-*linux*)
14094e3d74329Smrg	    LD="${LD-ld} -m elf64lppc"
14095e3d74329Smrg	    ;;
14096e3d74329Smrg	  powerpc-*linux*)
1409742a55b46Smrg	    LD="${LD-ld} -m elf64ppc"
1409842a55b46Smrg	    ;;
1409942a55b46Smrg	  s390*-*linux*|s390*-*tpf*)
1410042a55b46Smrg	    LD="${LD-ld} -m elf64_s390"
1410142a55b46Smrg	    ;;
1410242a55b46Smrg	  sparc*-*linux*)
1410342a55b46Smrg	    LD="${LD-ld} -m elf64_sparc"
1410442a55b46Smrg	    ;;
1410542a55b46Smrg	esac
1410642a55b46Smrg	;;
1410742a55b46Smrg    esac
1410842a55b46Smrg  fi
1410942a55b46Smrg  rm -rf conftest*
1411042a55b46Smrg  ;;
14111c582b7e3Smrg
1411242a55b46Smrg*-*-sco3.2v5*)
1411342a55b46Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
14114e3d74329Smrg  SAVE_CFLAGS=$CFLAGS
1411542a55b46Smrg  CFLAGS="$CFLAGS -belf"
141168ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
141178ce07328Smrgprintf %s "checking whether the C compiler needs -belf... " >&6; }
141188ce07328Smrgif test ${lt_cv_cc_needs_belf+y}
141198ce07328Smrgthen :
141208ce07328Smrg  printf %s "(cached) " >&6
141218ce07328Smrgelse $as_nop
1412242a55b46Smrg  ac_ext=c
1412342a55b46Smrgac_cpp='$CPP $CPPFLAGS'
1412442a55b46Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1412542a55b46Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1412642a55b46Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
14127c582b7e3Smrg
1412842a55b46Smrg     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1412942a55b46Smrg/* end confdefs.h.  */
14130c582b7e3Smrg
1413142a55b46Smrgint
141328ce07328Smrgmain (void)
1413342a55b46Smrg{
1413442a55b46Smrg
1413542a55b46Smrg  ;
1413642a55b46Smrg  return 0;
1413742a55b46Smrg}
1413842a55b46Smrg_ACEOF
141398ce07328Smrgif ac_fn_c_try_link "$LINENO"
141408ce07328Smrgthen :
1414142a55b46Smrg  lt_cv_cc_needs_belf=yes
141428ce07328Smrgelse $as_nop
1414342a55b46Smrg  lt_cv_cc_needs_belf=no
1414442a55b46Smrgfi
141458ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1414642a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1414742a55b46Smrg     ac_ext=c
1414842a55b46Smrgac_cpp='$CPP $CPPFLAGS'
1414942a55b46Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1415042a55b46Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1415142a55b46Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
1415242a55b46Smrg
1415342a55b46Smrgfi
141548ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
141558ce07328Smrgprintf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
14156e3d74329Smrg  if test yes != "$lt_cv_cc_needs_belf"; then
1415742a55b46Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
14158e3d74329Smrg    CFLAGS=$SAVE_CFLAGS
1415942a55b46Smrg  fi
1416042a55b46Smrg  ;;
1416142a55b46Smrg*-*solaris*)
14162e3d74329Smrg  # Find out what ABI is being produced by ac_compile, and set linker
14163e3d74329Smrg  # options accordingly.
1416442a55b46Smrg  echo 'int i;' > conftest.$ac_ext
1416542a55b46Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
1416642a55b46Smrg  (eval $ac_compile) 2>&5
1416742a55b46Smrg  ac_status=$?
141688ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1416942a55b46Smrg  test $ac_status = 0; }; then
141708ce07328Smrg    case `$FILECMD conftest.o` in
1417142a55b46Smrg    *64-bit*)
1417242a55b46Smrg      case $lt_cv_prog_gnu_ld in
1417342a55b46Smrg      yes*)
1417442a55b46Smrg        case $host in
14175e3d74329Smrg        i?86-*-solaris*|x86_64-*-solaris*)
1417642a55b46Smrg          LD="${LD-ld} -m elf_x86_64"
1417742a55b46Smrg          ;;
1417842a55b46Smrg        sparc*-*-solaris*)
1417942a55b46Smrg          LD="${LD-ld} -m elf64_sparc"
1418042a55b46Smrg          ;;
1418142a55b46Smrg        esac
1418242a55b46Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1418342a55b46Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
14184e3d74329Smrg          LD=${LD-ld}_sol2
1418542a55b46Smrg        fi
1418642a55b46Smrg        ;;
1418742a55b46Smrg      *)
1418842a55b46Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1418942a55b46Smrg	  LD="${LD-ld} -64"
1419042a55b46Smrg	fi
1419142a55b46Smrg	;;
1419242a55b46Smrg      esac
14193c582b7e3Smrg      ;;
1419442a55b46Smrg    esac
1419542a55b46Smrg  fi
1419642a55b46Smrg  rm -rf conftest*
1419742a55b46Smrg  ;;
1419842a55b46Smrgesac
1419942a55b46Smrg
14200e3d74329Smrgneed_locks=$enable_libtool_lock
1420142a55b46Smrg
1420242a55b46Smrgif test -n "$ac_tool_prefix"; then
1420342a55b46Smrg  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
1420442a55b46Smrgset dummy ${ac_tool_prefix}mt; ac_word=$2
142058ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
142068ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
142078ce07328Smrgif test ${ac_cv_prog_MANIFEST_TOOL+y}
142088ce07328Smrgthen :
142098ce07328Smrg  printf %s "(cached) " >&6
142108ce07328Smrgelse $as_nop
1421142a55b46Smrg  if test -n "$MANIFEST_TOOL"; then
1421242a55b46Smrg  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
1421342a55b46Smrgelse
1421442a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1421542a55b46Smrgfor as_dir in $PATH
1421642a55b46Smrgdo
1421742a55b46Smrg  IFS=$as_save_IFS
142188ce07328Smrg  case $as_dir in #(((
142198ce07328Smrg    '') as_dir=./ ;;
142208ce07328Smrg    */) ;;
142218ce07328Smrg    *) as_dir=$as_dir/ ;;
142228ce07328Smrg  esac
1422342a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
142248ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1422542a55b46Smrg    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
142268ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1422742a55b46Smrg    break 2
1422842a55b46Smrg  fi
1422942a55b46Smrgdone
1423042a55b46Smrg  done
1423142a55b46SmrgIFS=$as_save_IFS
1423242a55b46Smrg
1423342a55b46Smrgfi
1423442a55b46Smrgfi
1423542a55b46SmrgMANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
1423642a55b46Smrgif test -n "$MANIFEST_TOOL"; then
142378ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
142388ce07328Smrgprintf "%s\n" "$MANIFEST_TOOL" >&6; }
1423942a55b46Smrgelse
142408ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
142418ce07328Smrgprintf "%s\n" "no" >&6; }
1424242a55b46Smrgfi
1424342a55b46Smrg
1424442a55b46Smrg
1424542a55b46Smrgfi
1424642a55b46Smrgif test -z "$ac_cv_prog_MANIFEST_TOOL"; then
1424742a55b46Smrg  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
1424842a55b46Smrg  # Extract the first word of "mt", so it can be a program name with args.
1424942a55b46Smrgset dummy mt; ac_word=$2
142508ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
142518ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
142528ce07328Smrgif test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
142538ce07328Smrgthen :
142548ce07328Smrg  printf %s "(cached) " >&6
142558ce07328Smrgelse $as_nop
1425642a55b46Smrg  if test -n "$ac_ct_MANIFEST_TOOL"; then
1425742a55b46Smrg  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
1425842a55b46Smrgelse
1425942a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1426042a55b46Smrgfor as_dir in $PATH
1426142a55b46Smrgdo
1426242a55b46Smrg  IFS=$as_save_IFS
142638ce07328Smrg  case $as_dir in #(((
142648ce07328Smrg    '') as_dir=./ ;;
142658ce07328Smrg    */) ;;
142668ce07328Smrg    *) as_dir=$as_dir/ ;;
142678ce07328Smrg  esac
1426842a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
142698ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1427042a55b46Smrg    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
142718ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1427242a55b46Smrg    break 2
1427342a55b46Smrg  fi
1427442a55b46Smrgdone
1427542a55b46Smrg  done
1427642a55b46SmrgIFS=$as_save_IFS
14277c582b7e3Smrg
1427842a55b46Smrgfi
1427942a55b46Smrgfi
1428042a55b46Smrgac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
1428142a55b46Smrgif test -n "$ac_ct_MANIFEST_TOOL"; then
142828ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
142838ce07328Smrgprintf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
1428442a55b46Smrgelse
142858ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
142868ce07328Smrgprintf "%s\n" "no" >&6; }
1428742a55b46Smrgfi
14288c582b7e3Smrg
1428942a55b46Smrg  if test "x$ac_ct_MANIFEST_TOOL" = x; then
1429042a55b46Smrg    MANIFEST_TOOL=":"
1429142a55b46Smrg  else
1429242a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1429342a55b46Smrgyes:)
142948ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
142958ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1429642a55b46Smrgac_tool_warned=yes ;;
1429742a55b46Smrgesac
1429842a55b46Smrg    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
1429942a55b46Smrg  fi
1430042a55b46Smrgelse
1430142a55b46Smrg  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
1430242a55b46Smrgfi
14303c582b7e3Smrg
1430442a55b46Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
143058ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
143068ce07328Smrgprintf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
143078ce07328Smrgif test ${lt_cv_path_mainfest_tool+y}
143088ce07328Smrgthen :
143098ce07328Smrg  printf %s "(cached) " >&6
143108ce07328Smrgelse $as_nop
1431142a55b46Smrg  lt_cv_path_mainfest_tool=no
1431242a55b46Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
1431342a55b46Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
1431442a55b46Smrg  cat conftest.err >&5
1431542a55b46Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
1431642a55b46Smrg    lt_cv_path_mainfest_tool=yes
1431742a55b46Smrg  fi
1431842a55b46Smrg  rm -f conftest*
1431942a55b46Smrgfi
143208ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
143218ce07328Smrgprintf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
14322e3d74329Smrgif test yes != "$lt_cv_path_mainfest_tool"; then
1432342a55b46Smrg  MANIFEST_TOOL=:
1432442a55b46Smrgfi
14325c582b7e3Smrg
14326c582b7e3Smrg
14327c582b7e3Smrg
14328c582b7e3Smrg
14329c582b7e3Smrg
14330c582b7e3Smrg
1433142a55b46Smrg  case $host_os in
1433242a55b46Smrg    rhapsody* | darwin*)
1433342a55b46Smrg    if test -n "$ac_tool_prefix"; then
1433442a55b46Smrg  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
1433542a55b46Smrgset dummy ${ac_tool_prefix}dsymutil; ac_word=$2
143368ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
143378ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
143388ce07328Smrgif test ${ac_cv_prog_DSYMUTIL+y}
143398ce07328Smrgthen :
143408ce07328Smrg  printf %s "(cached) " >&6
143418ce07328Smrgelse $as_nop
1434242a55b46Smrg  if test -n "$DSYMUTIL"; then
1434342a55b46Smrg  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
1434442a55b46Smrgelse
1434542a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1434642a55b46Smrgfor as_dir in $PATH
1434742a55b46Smrgdo
1434842a55b46Smrg  IFS=$as_save_IFS
143498ce07328Smrg  case $as_dir in #(((
143508ce07328Smrg    '') as_dir=./ ;;
143518ce07328Smrg    */) ;;
143528ce07328Smrg    *) as_dir=$as_dir/ ;;
143538ce07328Smrg  esac
1435442a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
143558ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1435642a55b46Smrg    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
143578ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1435842a55b46Smrg    break 2
1435942a55b46Smrg  fi
1436042a55b46Smrgdone
1436142a55b46Smrg  done
1436242a55b46SmrgIFS=$as_save_IFS
14363c582b7e3Smrg
1436442a55b46Smrgfi
1436542a55b46Smrgfi
1436642a55b46SmrgDSYMUTIL=$ac_cv_prog_DSYMUTIL
1436742a55b46Smrgif test -n "$DSYMUTIL"; then
143688ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
143698ce07328Smrgprintf "%s\n" "$DSYMUTIL" >&6; }
1437042a55b46Smrgelse
143718ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
143728ce07328Smrgprintf "%s\n" "no" >&6; }
1437342a55b46Smrgfi
14374c582b7e3Smrg
14375c582b7e3Smrg
1437642a55b46Smrgfi
1437742a55b46Smrgif test -z "$ac_cv_prog_DSYMUTIL"; then
1437842a55b46Smrg  ac_ct_DSYMUTIL=$DSYMUTIL
1437942a55b46Smrg  # Extract the first word of "dsymutil", so it can be a program name with args.
1438042a55b46Smrgset dummy dsymutil; ac_word=$2
143818ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
143828ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
143838ce07328Smrgif test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
143848ce07328Smrgthen :
143858ce07328Smrg  printf %s "(cached) " >&6
143868ce07328Smrgelse $as_nop
1438742a55b46Smrg  if test -n "$ac_ct_DSYMUTIL"; then
1438842a55b46Smrg  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
1438942a55b46Smrgelse
1439042a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1439142a55b46Smrgfor as_dir in $PATH
1439242a55b46Smrgdo
1439342a55b46Smrg  IFS=$as_save_IFS
143948ce07328Smrg  case $as_dir in #(((
143958ce07328Smrg    '') as_dir=./ ;;
143968ce07328Smrg    */) ;;
143978ce07328Smrg    *) as_dir=$as_dir/ ;;
143988ce07328Smrg  esac
1439942a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
144008ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1440142a55b46Smrg    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
144028ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1440342a55b46Smrg    break 2
1440442a55b46Smrg  fi
1440542a55b46Smrgdone
1440642a55b46Smrg  done
1440742a55b46SmrgIFS=$as_save_IFS
14408c582b7e3Smrg
1440942a55b46Smrgfi
1441042a55b46Smrgfi
1441142a55b46Smrgac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
1441242a55b46Smrgif test -n "$ac_ct_DSYMUTIL"; then
144138ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
144148ce07328Smrgprintf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
1441542a55b46Smrgelse
144168ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
144178ce07328Smrgprintf "%s\n" "no" >&6; }
1441842a55b46Smrgfi
14419c582b7e3Smrg
1442042a55b46Smrg  if test "x$ac_ct_DSYMUTIL" = x; then
1442142a55b46Smrg    DSYMUTIL=":"
1442242a55b46Smrg  else
1442342a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1442442a55b46Smrgyes:)
144258ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
144268ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1442742a55b46Smrgac_tool_warned=yes ;;
1442842a55b46Smrgesac
1442942a55b46Smrg    DSYMUTIL=$ac_ct_DSYMUTIL
1443042a55b46Smrg  fi
1443142a55b46Smrgelse
1443242a55b46Smrg  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
1443342a55b46Smrgfi
14434c582b7e3Smrg
1443542a55b46Smrg    if test -n "$ac_tool_prefix"; then
1443642a55b46Smrg  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
1443742a55b46Smrgset dummy ${ac_tool_prefix}nmedit; ac_word=$2
144388ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
144398ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
144408ce07328Smrgif test ${ac_cv_prog_NMEDIT+y}
144418ce07328Smrgthen :
144428ce07328Smrg  printf %s "(cached) " >&6
144438ce07328Smrgelse $as_nop
1444442a55b46Smrg  if test -n "$NMEDIT"; then
1444542a55b46Smrg  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
1444642a55b46Smrgelse
1444742a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1444842a55b46Smrgfor as_dir in $PATH
1444942a55b46Smrgdo
1445042a55b46Smrg  IFS=$as_save_IFS
144518ce07328Smrg  case $as_dir in #(((
144528ce07328Smrg    '') as_dir=./ ;;
144538ce07328Smrg    */) ;;
144548ce07328Smrg    *) as_dir=$as_dir/ ;;
144558ce07328Smrg  esac
1445642a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
144578ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1445842a55b46Smrg    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
144598ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1446042a55b46Smrg    break 2
1446142a55b46Smrg  fi
1446242a55b46Smrgdone
1446342a55b46Smrg  done
1446442a55b46SmrgIFS=$as_save_IFS
14465c582b7e3Smrg
1446642a55b46Smrgfi
1446742a55b46Smrgfi
1446842a55b46SmrgNMEDIT=$ac_cv_prog_NMEDIT
1446942a55b46Smrgif test -n "$NMEDIT"; then
144708ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
144718ce07328Smrgprintf "%s\n" "$NMEDIT" >&6; }
1447242a55b46Smrgelse
144738ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
144748ce07328Smrgprintf "%s\n" "no" >&6; }
1447542a55b46Smrgfi
14476c582b7e3Smrg
14477c582b7e3Smrg
1447842a55b46Smrgfi
1447942a55b46Smrgif test -z "$ac_cv_prog_NMEDIT"; then
1448042a55b46Smrg  ac_ct_NMEDIT=$NMEDIT
1448142a55b46Smrg  # Extract the first word of "nmedit", so it can be a program name with args.
1448242a55b46Smrgset dummy nmedit; ac_word=$2
144838ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
144848ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
144858ce07328Smrgif test ${ac_cv_prog_ac_ct_NMEDIT+y}
144868ce07328Smrgthen :
144878ce07328Smrg  printf %s "(cached) " >&6
144888ce07328Smrgelse $as_nop
1448942a55b46Smrg  if test -n "$ac_ct_NMEDIT"; then
1449042a55b46Smrg  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
1449142a55b46Smrgelse
1449242a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1449342a55b46Smrgfor as_dir in $PATH
1449442a55b46Smrgdo
1449542a55b46Smrg  IFS=$as_save_IFS
144968ce07328Smrg  case $as_dir in #(((
144978ce07328Smrg    '') as_dir=./ ;;
144988ce07328Smrg    */) ;;
144998ce07328Smrg    *) as_dir=$as_dir/ ;;
145008ce07328Smrg  esac
1450142a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
145028ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1450342a55b46Smrg    ac_cv_prog_ac_ct_NMEDIT="nmedit"
145048ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1450542a55b46Smrg    break 2
14506c582b7e3Smrg  fi
1450742a55b46Smrgdone
1450842a55b46Smrg  done
1450942a55b46SmrgIFS=$as_save_IFS
14510c582b7e3Smrg
1451142a55b46Smrgfi
1451242a55b46Smrgfi
1451342a55b46Smrgac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
1451442a55b46Smrgif test -n "$ac_ct_NMEDIT"; then
145158ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
145168ce07328Smrgprintf "%s\n" "$ac_ct_NMEDIT" >&6; }
1451742a55b46Smrgelse
145188ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
145198ce07328Smrgprintf "%s\n" "no" >&6; }
1452042a55b46Smrgfi
14521c582b7e3Smrg
1452242a55b46Smrg  if test "x$ac_ct_NMEDIT" = x; then
1452342a55b46Smrg    NMEDIT=":"
1452442a55b46Smrg  else
1452542a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1452642a55b46Smrgyes:)
145278ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
145288ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1452942a55b46Smrgac_tool_warned=yes ;;
14530c582b7e3Smrgesac
1453142a55b46Smrg    NMEDIT=$ac_ct_NMEDIT
1453242a55b46Smrg  fi
1453342a55b46Smrgelse
1453442a55b46Smrg  NMEDIT="$ac_cv_prog_NMEDIT"
1453542a55b46Smrgfi
14536c582b7e3Smrg
1453742a55b46Smrg    if test -n "$ac_tool_prefix"; then
1453842a55b46Smrg  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
1453942a55b46Smrgset dummy ${ac_tool_prefix}lipo; ac_word=$2
145408ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
145418ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
145428ce07328Smrgif test ${ac_cv_prog_LIPO+y}
145438ce07328Smrgthen :
145448ce07328Smrg  printf %s "(cached) " >&6
145458ce07328Smrgelse $as_nop
1454642a55b46Smrg  if test -n "$LIPO"; then
1454742a55b46Smrg  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
1454842a55b46Smrgelse
1454942a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1455042a55b46Smrgfor as_dir in $PATH
1455142a55b46Smrgdo
1455242a55b46Smrg  IFS=$as_save_IFS
145538ce07328Smrg  case $as_dir in #(((
145548ce07328Smrg    '') as_dir=./ ;;
145558ce07328Smrg    */) ;;
145568ce07328Smrg    *) as_dir=$as_dir/ ;;
145578ce07328Smrg  esac
1455842a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
145598ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1456042a55b46Smrg    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
145618ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1456242a55b46Smrg    break 2
1456342a55b46Smrg  fi
1456442a55b46Smrgdone
1456542a55b46Smrg  done
1456642a55b46SmrgIFS=$as_save_IFS
14567c582b7e3Smrg
1456842a55b46Smrgfi
1456942a55b46Smrgfi
1457042a55b46SmrgLIPO=$ac_cv_prog_LIPO
1457142a55b46Smrgif test -n "$LIPO"; then
145728ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
145738ce07328Smrgprintf "%s\n" "$LIPO" >&6; }
1457442a55b46Smrgelse
145758ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
145768ce07328Smrgprintf "%s\n" "no" >&6; }
1457742a55b46Smrgfi
14578c582b7e3Smrg
14579c582b7e3Smrg
1458042a55b46Smrgfi
1458142a55b46Smrgif test -z "$ac_cv_prog_LIPO"; then
1458242a55b46Smrg  ac_ct_LIPO=$LIPO
1458342a55b46Smrg  # Extract the first word of "lipo", so it can be a program name with args.
1458442a55b46Smrgset dummy lipo; ac_word=$2
145858ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
145868ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
145878ce07328Smrgif test ${ac_cv_prog_ac_ct_LIPO+y}
145888ce07328Smrgthen :
145898ce07328Smrg  printf %s "(cached) " >&6
145908ce07328Smrgelse $as_nop
1459142a55b46Smrg  if test -n "$ac_ct_LIPO"; then
1459242a55b46Smrg  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
1459342a55b46Smrgelse
1459442a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1459542a55b46Smrgfor as_dir in $PATH
1459642a55b46Smrgdo
1459742a55b46Smrg  IFS=$as_save_IFS
145988ce07328Smrg  case $as_dir in #(((
145998ce07328Smrg    '') as_dir=./ ;;
146008ce07328Smrg    */) ;;
146018ce07328Smrg    *) as_dir=$as_dir/ ;;
146028ce07328Smrg  esac
1460342a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
146048ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1460542a55b46Smrg    ac_cv_prog_ac_ct_LIPO="lipo"
146068ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1460742a55b46Smrg    break 2
1460842a55b46Smrg  fi
1460942a55b46Smrgdone
1461042a55b46Smrg  done
1461142a55b46SmrgIFS=$as_save_IFS
14612c582b7e3Smrg
1461342a55b46Smrgfi
1461442a55b46Smrgfi
1461542a55b46Smrgac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
1461642a55b46Smrgif test -n "$ac_ct_LIPO"; then
146178ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
146188ce07328Smrgprintf "%s\n" "$ac_ct_LIPO" >&6; }
1461942a55b46Smrgelse
146208ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
146218ce07328Smrgprintf "%s\n" "no" >&6; }
1462242a55b46Smrgfi
14623c582b7e3Smrg
1462442a55b46Smrg  if test "x$ac_ct_LIPO" = x; then
1462542a55b46Smrg    LIPO=":"
14626c582b7e3Smrg  else
1462742a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1462842a55b46Smrgyes:)
146298ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
146308ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1463142a55b46Smrgac_tool_warned=yes ;;
1463242a55b46Smrgesac
1463342a55b46Smrg    LIPO=$ac_ct_LIPO
14634c582b7e3Smrg  fi
1463542a55b46Smrgelse
1463642a55b46Smrg  LIPO="$ac_cv_prog_LIPO"
1463742a55b46Smrgfi
14638c582b7e3Smrg
1463942a55b46Smrg    if test -n "$ac_tool_prefix"; then
1464042a55b46Smrg  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
1464142a55b46Smrgset dummy ${ac_tool_prefix}otool; ac_word=$2
146428ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
146438ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
146448ce07328Smrgif test ${ac_cv_prog_OTOOL+y}
146458ce07328Smrgthen :
146468ce07328Smrg  printf %s "(cached) " >&6
146478ce07328Smrgelse $as_nop
1464842a55b46Smrg  if test -n "$OTOOL"; then
1464942a55b46Smrg  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
1465042a55b46Smrgelse
1465142a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1465242a55b46Smrgfor as_dir in $PATH
1465342a55b46Smrgdo
1465442a55b46Smrg  IFS=$as_save_IFS
146558ce07328Smrg  case $as_dir in #(((
146568ce07328Smrg    '') as_dir=./ ;;
146578ce07328Smrg    */) ;;
146588ce07328Smrg    *) as_dir=$as_dir/ ;;
146598ce07328Smrg  esac
1466042a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
146618ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1466242a55b46Smrg    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
146638ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1466442a55b46Smrg    break 2
1466542a55b46Smrg  fi
1466642a55b46Smrgdone
1466742a55b46Smrg  done
1466842a55b46SmrgIFS=$as_save_IFS
14669c582b7e3Smrg
1467042a55b46Smrgfi
1467142a55b46Smrgfi
1467242a55b46SmrgOTOOL=$ac_cv_prog_OTOOL
1467342a55b46Smrgif test -n "$OTOOL"; then
146748ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
146758ce07328Smrgprintf "%s\n" "$OTOOL" >&6; }
1467642a55b46Smrgelse
146778ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
146788ce07328Smrgprintf "%s\n" "no" >&6; }
1467942a55b46Smrgfi
14680c582b7e3Smrg
14681c582b7e3Smrg
1468242a55b46Smrgfi
1468342a55b46Smrgif test -z "$ac_cv_prog_OTOOL"; then
1468442a55b46Smrg  ac_ct_OTOOL=$OTOOL
1468542a55b46Smrg  # Extract the first word of "otool", so it can be a program name with args.
1468642a55b46Smrgset dummy otool; ac_word=$2
146878ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
146888ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
146898ce07328Smrgif test ${ac_cv_prog_ac_ct_OTOOL+y}
146908ce07328Smrgthen :
146918ce07328Smrg  printf %s "(cached) " >&6
146928ce07328Smrgelse $as_nop
1469342a55b46Smrg  if test -n "$ac_ct_OTOOL"; then
1469442a55b46Smrg  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
1469542a55b46Smrgelse
1469642a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1469742a55b46Smrgfor as_dir in $PATH
1469842a55b46Smrgdo
1469942a55b46Smrg  IFS=$as_save_IFS
147008ce07328Smrg  case $as_dir in #(((
147018ce07328Smrg    '') as_dir=./ ;;
147028ce07328Smrg    */) ;;
147038ce07328Smrg    *) as_dir=$as_dir/ ;;
147048ce07328Smrg  esac
1470542a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
147068ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1470742a55b46Smrg    ac_cv_prog_ac_ct_OTOOL="otool"
147088ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1470942a55b46Smrg    break 2
1471042a55b46Smrg  fi
1471142a55b46Smrgdone
1471242a55b46Smrg  done
1471342a55b46SmrgIFS=$as_save_IFS
14714c582b7e3Smrg
1471542a55b46Smrgfi
1471642a55b46Smrgfi
1471742a55b46Smrgac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
1471842a55b46Smrgif test -n "$ac_ct_OTOOL"; then
147198ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
147208ce07328Smrgprintf "%s\n" "$ac_ct_OTOOL" >&6; }
1472142a55b46Smrgelse
147228ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
147238ce07328Smrgprintf "%s\n" "no" >&6; }
1472442a55b46Smrgfi
14725c582b7e3Smrg
1472642a55b46Smrg  if test "x$ac_ct_OTOOL" = x; then
1472742a55b46Smrg    OTOOL=":"
1472842a55b46Smrg  else
1472942a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1473042a55b46Smrgyes:)
147318ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
147328ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1473342a55b46Smrgac_tool_warned=yes ;;
1473442a55b46Smrgesac
1473542a55b46Smrg    OTOOL=$ac_ct_OTOOL
1473642a55b46Smrg  fi
1473742a55b46Smrgelse
1473842a55b46Smrg  OTOOL="$ac_cv_prog_OTOOL"
1473942a55b46Smrgfi
14740c582b7e3Smrg
1474142a55b46Smrg    if test -n "$ac_tool_prefix"; then
1474242a55b46Smrg  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
1474342a55b46Smrgset dummy ${ac_tool_prefix}otool64; ac_word=$2
147448ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
147458ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
147468ce07328Smrgif test ${ac_cv_prog_OTOOL64+y}
147478ce07328Smrgthen :
147488ce07328Smrg  printf %s "(cached) " >&6
147498ce07328Smrgelse $as_nop
1475042a55b46Smrg  if test -n "$OTOOL64"; then
1475142a55b46Smrg  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
1475242a55b46Smrgelse
1475342a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1475442a55b46Smrgfor as_dir in $PATH
1475542a55b46Smrgdo
1475642a55b46Smrg  IFS=$as_save_IFS
147578ce07328Smrg  case $as_dir in #(((
147588ce07328Smrg    '') as_dir=./ ;;
147598ce07328Smrg    */) ;;
147608ce07328Smrg    *) as_dir=$as_dir/ ;;
147618ce07328Smrg  esac
1476242a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
147638ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1476442a55b46Smrg    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
147658ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1476642a55b46Smrg    break 2
1476742a55b46Smrg  fi
1476842a55b46Smrgdone
1476942a55b46Smrg  done
1477042a55b46SmrgIFS=$as_save_IFS
14771c582b7e3Smrg
1477242a55b46Smrgfi
1477342a55b46Smrgfi
1477442a55b46SmrgOTOOL64=$ac_cv_prog_OTOOL64
1477542a55b46Smrgif test -n "$OTOOL64"; then
147768ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
147778ce07328Smrgprintf "%s\n" "$OTOOL64" >&6; }
1477842a55b46Smrgelse
147798ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
147808ce07328Smrgprintf "%s\n" "no" >&6; }
1478142a55b46Smrgfi
14782c582b7e3Smrg
14783c582b7e3Smrg
1478442a55b46Smrgfi
1478542a55b46Smrgif test -z "$ac_cv_prog_OTOOL64"; then
1478642a55b46Smrg  ac_ct_OTOOL64=$OTOOL64
1478742a55b46Smrg  # Extract the first word of "otool64", so it can be a program name with args.
1478842a55b46Smrgset dummy otool64; ac_word=$2
147898ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
147908ce07328Smrgprintf %s "checking for $ac_word... " >&6; }
147918ce07328Smrgif test ${ac_cv_prog_ac_ct_OTOOL64+y}
147928ce07328Smrgthen :
147938ce07328Smrg  printf %s "(cached) " >&6
147948ce07328Smrgelse $as_nop
1479542a55b46Smrg  if test -n "$ac_ct_OTOOL64"; then
1479642a55b46Smrg  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
1479742a55b46Smrgelse
1479842a55b46Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1479942a55b46Smrgfor as_dir in $PATH
1480042a55b46Smrgdo
1480142a55b46Smrg  IFS=$as_save_IFS
148028ce07328Smrg  case $as_dir in #(((
148038ce07328Smrg    '') as_dir=./ ;;
148048ce07328Smrg    */) ;;
148058ce07328Smrg    *) as_dir=$as_dir/ ;;
148068ce07328Smrg  esac
1480742a55b46Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
148088ce07328Smrg  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
1480942a55b46Smrg    ac_cv_prog_ac_ct_OTOOL64="otool64"
148108ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
1481142a55b46Smrg    break 2
1481242a55b46Smrg  fi
1481342a55b46Smrgdone
1481442a55b46Smrg  done
1481542a55b46SmrgIFS=$as_save_IFS
14816c582b7e3Smrg
1481742a55b46Smrgfi
1481842a55b46Smrgfi
1481942a55b46Smrgac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
1482042a55b46Smrgif test -n "$ac_ct_OTOOL64"; then
148218ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
148228ce07328Smrgprintf "%s\n" "$ac_ct_OTOOL64" >&6; }
1482342a55b46Smrgelse
148248ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
148258ce07328Smrgprintf "%s\n" "no" >&6; }
1482642a55b46Smrgfi
14827c582b7e3Smrg
1482842a55b46Smrg  if test "x$ac_ct_OTOOL64" = x; then
1482942a55b46Smrg    OTOOL64=":"
14830c582b7e3Smrg  else
1483142a55b46Smrg    case $cross_compiling:$ac_tool_warned in
1483242a55b46Smrgyes:)
148338ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
148348ce07328Smrgprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1483542a55b46Smrgac_tool_warned=yes ;;
1483642a55b46Smrgesac
1483742a55b46Smrg    OTOOL64=$ac_ct_OTOOL64
14838c582b7e3Smrg  fi
1483942a55b46Smrgelse
1484042a55b46Smrg  OTOOL64="$ac_cv_prog_OTOOL64"
1484142a55b46Smrgfi
1484242a55b46Smrg
1484342a55b46Smrg
1484442a55b46Smrg
1484542a55b46Smrg
14846c582b7e3Smrg
14847c582b7e3Smrg
14848c582b7e3Smrg
14849c582b7e3Smrg
14850c582b7e3Smrg
14851c582b7e3Smrg
14852c582b7e3Smrg
14853c582b7e3Smrg
14854c582b7e3Smrg
14855c582b7e3Smrg
14856c582b7e3Smrg
14857c582b7e3Smrg
14858c582b7e3Smrg
14859c582b7e3Smrg
14860c582b7e3Smrg
14861c582b7e3Smrg
14862c582b7e3Smrg
14863c582b7e3Smrg
14864c582b7e3Smrg
14865c582b7e3Smrg
14866c582b7e3Smrg
14867c582b7e3Smrg
14868c582b7e3Smrg
148698ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
148708ce07328Smrgprintf %s "checking for -single_module linker flag... " >&6; }
148718ce07328Smrgif test ${lt_cv_apple_cc_single_mod+y}
148728ce07328Smrgthen :
148738ce07328Smrg  printf %s "(cached) " >&6
148748ce07328Smrgelse $as_nop
1487542a55b46Smrg  lt_cv_apple_cc_single_mod=no
14876e3d74329Smrg      if test -z "$LT_MULTI_MODULE"; then
1487742a55b46Smrg	# By default we will add the -single_module flag. You can override
1487842a55b46Smrg	# by either setting the environment variable LT_MULTI_MODULE
1487942a55b46Smrg	# non-empty at configure time, or by adding -multi_module to the
1488042a55b46Smrg	# link flags.
1488142a55b46Smrg	rm -rf libconftest.dylib*
1488242a55b46Smrg	echo "int foo(void){return 1;}" > conftest.c
1488342a55b46Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1488442a55b46Smrg-dynamiclib -Wl,-single_module conftest.c" >&5
1488542a55b46Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1488642a55b46Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1488742a55b46Smrg        _lt_result=$?
1488842a55b46Smrg	# If there is a non-empty error log, and "single_module"
1488942a55b46Smrg	# appears in it, assume the flag caused a linker warning
1489042a55b46Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
1489142a55b46Smrg	  cat conftest.err >&5
1489242a55b46Smrg	# Otherwise, if the output was created with a 0 exit code from
1489342a55b46Smrg	# the compiler, it worked.
14894e3d74329Smrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1489542a55b46Smrg	  lt_cv_apple_cc_single_mod=yes
1489642a55b46Smrg	else
1489742a55b46Smrg	  cat conftest.err >&5
1489842a55b46Smrg	fi
1489942a55b46Smrg	rm -rf libconftest.dylib*
1490042a55b46Smrg	rm -f conftest.*
1490142a55b46Smrg      fi
1490219019ffeSmrgfi
149038ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
149048ce07328Smrgprintf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
1490519019ffeSmrg
149068ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
149078ce07328Smrgprintf %s "checking for -exported_symbols_list linker flag... " >&6; }
149088ce07328Smrgif test ${lt_cv_ld_exported_symbols_list+y}
149098ce07328Smrgthen :
149108ce07328Smrg  printf %s "(cached) " >&6
149118ce07328Smrgelse $as_nop
1491242a55b46Smrg  lt_cv_ld_exported_symbols_list=no
1491342a55b46Smrg      save_LDFLAGS=$LDFLAGS
1491442a55b46Smrg      echo "_main" > conftest.sym
1491542a55b46Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1491642a55b46Smrg      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1491742a55b46Smrg/* end confdefs.h.  */
1491819019ffeSmrg
1491942a55b46Smrgint
149208ce07328Smrgmain (void)
1492142a55b46Smrg{
1492219019ffeSmrg
1492342a55b46Smrg  ;
1492442a55b46Smrg  return 0;
1492542a55b46Smrg}
1492642a55b46Smrg_ACEOF
149278ce07328Smrgif ac_fn_c_try_link "$LINENO"
149288ce07328Smrgthen :
1492942a55b46Smrg  lt_cv_ld_exported_symbols_list=yes
149308ce07328Smrgelse $as_nop
1493142a55b46Smrg  lt_cv_ld_exported_symbols_list=no
14932c582b7e3Smrgfi
149338ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1493442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
14935e3d74329Smrg	LDFLAGS=$save_LDFLAGS
14936c582b7e3Smrg
1493742a55b46Smrgfi
149388ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
149398ce07328Smrgprintf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
14940c582b7e3Smrg
149418ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
149428ce07328Smrgprintf %s "checking for -force_load linker flag... " >&6; }
149438ce07328Smrgif test ${lt_cv_ld_force_load+y}
149448ce07328Smrgthen :
149458ce07328Smrg  printf %s "(cached) " >&6
149468ce07328Smrgelse $as_nop
1494742a55b46Smrg  lt_cv_ld_force_load=no
1494842a55b46Smrg      cat > conftest.c << _LT_EOF
1494942a55b46Smrgint forced_loaded() { return 2;}
1495042a55b46Smrg_LT_EOF
1495142a55b46Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
1495242a55b46Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
149538ce07328Smrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
149548ce07328Smrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&5
1495542a55b46Smrg      echo "$RANLIB libconftest.a" >&5
1495642a55b46Smrg      $RANLIB libconftest.a 2>&5
1495742a55b46Smrg      cat > conftest.c << _LT_EOF
1495842a55b46Smrgint main() { return 0;}
1495942a55b46Smrg_LT_EOF
1496042a55b46Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
1496142a55b46Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1496242a55b46Smrg      _lt_result=$?
1496342a55b46Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
1496442a55b46Smrg	cat conftest.err >&5
14965e3d74329Smrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1496642a55b46Smrg	lt_cv_ld_force_load=yes
1496742a55b46Smrg      else
1496842a55b46Smrg	cat conftest.err >&5
1496942a55b46Smrg      fi
1497042a55b46Smrg        rm -f conftest.err libconftest.a conftest conftest.c
1497142a55b46Smrg        rm -rf conftest.dSYM
1497242a55b46Smrg
1497342a55b46Smrgfi
149748ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
149758ce07328Smrgprintf "%s\n" "$lt_cv_ld_force_load" >&6; }
1497642a55b46Smrg    case $host_os in
1497742a55b46Smrg    rhapsody* | darwin1.[012])
14978e3d74329Smrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1497942a55b46Smrg    darwin1.*)
14980e3d74329Smrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
149818ce07328Smrg    darwin*)
149828ce07328Smrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
149838ce07328Smrg        10.[012],*|,*powerpc*-darwin[5-8]*)
149848ce07328Smrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
149858ce07328Smrg        *)
149868ce07328Smrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1498742a55b46Smrg      esac
1498842a55b46Smrg    ;;
1498942a55b46Smrg  esac
14990e3d74329Smrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
1499142a55b46Smrg      _lt_dar_single_mod='$single_module'
1499242a55b46Smrg    fi
14993e3d74329Smrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
14994e3d74329Smrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1499542a55b46Smrg    else
14996e3d74329Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1499742a55b46Smrg    fi
14998e3d74329Smrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1499942a55b46Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
1500042a55b46Smrg    else
1500142a55b46Smrg      _lt_dsymutil=
1500242a55b46Smrg    fi
1500342a55b46Smrg    ;;
1500442a55b46Smrg  esac
1500542a55b46Smrg
15006e3d74329Smrg# func_munge_path_list VARIABLE PATH
15007e3d74329Smrg# -----------------------------------
15008e3d74329Smrg# VARIABLE is name of variable containing _space_ separated list of
15009e3d74329Smrg# directories to be munged by the contents of PATH, which is string
15010e3d74329Smrg# having a format:
15011e3d74329Smrg# "DIR[:DIR]:"
15012e3d74329Smrg#       string "DIR[ DIR]" will be prepended to VARIABLE
15013e3d74329Smrg# ":DIR[:DIR]"
15014e3d74329Smrg#       string "DIR[ DIR]" will be appended to VARIABLE
15015e3d74329Smrg# "DIRP[:DIRP]::[DIRA:]DIRA"
15016e3d74329Smrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
15017e3d74329Smrg#       "DIRA[ DIRA]" will be appended to VARIABLE
15018e3d74329Smrg# "DIR[:DIR]"
15019e3d74329Smrg#       VARIABLE will be replaced by "DIR[ DIR]"
15020e3d74329Smrgfunc_munge_path_list ()
15021e3d74329Smrg{
15022e3d74329Smrg    case x$2 in
15023e3d74329Smrg    x)
15024e3d74329Smrg        ;;
15025e3d74329Smrg    *:)
15026e3d74329Smrg        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
15027e3d74329Smrg        ;;
15028e3d74329Smrg    x:*)
15029e3d74329Smrg        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
15030e3d74329Smrg        ;;
15031e3d74329Smrg    *::*)
15032e3d74329Smrg        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
15033e3d74329Smrg        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
15034e3d74329Smrg        ;;
15035e3d74329Smrg    *)
15036e3d74329Smrg        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
15037e3d74329Smrg        ;;
15038e3d74329Smrg    esac
15039e3d74329Smrg}
15040e3d74329Smrg
150418ce07328Smrgac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
1504242a55b46Smrg"
150438ce07328Smrgif test "x$ac_cv_header_dlfcn_h" = xyes
150448ce07328Smrgthen :
150458ce07328Smrg  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
1504642a55b46Smrg
15047c582b7e3Smrgfi
15048c582b7e3Smrg
1504942a55b46Smrg
1505042a55b46Smrg
1505142a55b46Smrg
1505242a55b46Smrg
1505342a55b46Smrg# Set options
1505442a55b46Smrg
1505542a55b46Smrg
1505642a55b46Smrg
1505742a55b46Smrg        enable_dlopen=no
1505842a55b46Smrg
1505942a55b46Smrg
1506042a55b46Smrg  enable_win32_dll=no
1506142a55b46Smrg
1506242a55b46Smrg
1506342a55b46Smrg            # Check whether --enable-shared was given.
150648ce07328Smrgif test ${enable_shared+y}
150658ce07328Smrgthen :
1506642a55b46Smrg  enableval=$enable_shared; p=${PACKAGE-default}
1506742a55b46Smrg    case $enableval in
1506842a55b46Smrg    yes) enable_shared=yes ;;
1506942a55b46Smrg    no) enable_shared=no ;;
1507042a55b46Smrg    *)
1507142a55b46Smrg      enable_shared=no
1507242a55b46Smrg      # Look at the argument we got.  We use all the common list separators.
15073e3d74329Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
1507442a55b46Smrg      for pkg in $enableval; do
15075e3d74329Smrg	IFS=$lt_save_ifs
1507642a55b46Smrg	if test "X$pkg" = "X$p"; then
1507742a55b46Smrg	  enable_shared=yes
1507842a55b46Smrg	fi
1507942a55b46Smrg      done
15080e3d74329Smrg      IFS=$lt_save_ifs
1508142a55b46Smrg      ;;
1508242a55b46Smrg    esac
150838ce07328Smrgelse $as_nop
1508442a55b46Smrg  enable_shared=yes
15085c582b7e3Smrgfi
15086c582b7e3Smrg
15087c582b7e3Smrg
15088c582b7e3Smrg
15089c582b7e3Smrg
15090c582b7e3Smrg
15091c582b7e3Smrg
15092c582b7e3Smrg
15093c582b7e3Smrg
15094c582b7e3Smrg
15095c582b7e3Smrg
15096c582b7e3Smrg
1509742a55b46Smrg# Check whether --with-pic was given.
150988ce07328Smrgif test ${with_pic+y}
150998ce07328Smrgthen :
1510042a55b46Smrg  withval=$with_pic; lt_p=${PACKAGE-default}
1510142a55b46Smrg    case $withval in
1510242a55b46Smrg    yes|no) pic_mode=$withval ;;
1510342a55b46Smrg    *)
1510442a55b46Smrg      pic_mode=default
1510542a55b46Smrg      # Look at the argument we got.  We use all the common list separators.
15106e3d74329Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
1510742a55b46Smrg      for lt_pkg in $withval; do
15108e3d74329Smrg	IFS=$lt_save_ifs
1510942a55b46Smrg	if test "X$lt_pkg" = "X$lt_p"; then
1511042a55b46Smrg	  pic_mode=yes
1511142a55b46Smrg	fi
1511242a55b46Smrg      done
15113e3d74329Smrg      IFS=$lt_save_ifs
1511442a55b46Smrg      ;;
1511542a55b46Smrg    esac
151168ce07328Smrgelse $as_nop
1511742a55b46Smrg  pic_mode=default
1511842a55b46Smrgfi
1511942a55b46Smrg
1512042a55b46Smrg
1512142a55b46Smrg
15122c582b7e3Smrg
15123c582b7e3Smrg
15124c582b7e3Smrg
15125c582b7e3Smrg
15126c582b7e3Smrg
1512742a55b46Smrg  # Check whether --enable-fast-install was given.
151288ce07328Smrgif test ${enable_fast_install+y}
151298ce07328Smrgthen :
1513042a55b46Smrg  enableval=$enable_fast_install; p=${PACKAGE-default}
1513142a55b46Smrg    case $enableval in
1513242a55b46Smrg    yes) enable_fast_install=yes ;;
1513342a55b46Smrg    no) enable_fast_install=no ;;
1513442a55b46Smrg    *)
1513542a55b46Smrg      enable_fast_install=no
1513642a55b46Smrg      # Look at the argument we got.  We use all the common list separators.
15137e3d74329Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
1513842a55b46Smrg      for pkg in $enableval; do
15139e3d74329Smrg	IFS=$lt_save_ifs
1514042a55b46Smrg	if test "X$pkg" = "X$p"; then
1514142a55b46Smrg	  enable_fast_install=yes
1514242a55b46Smrg	fi
1514342a55b46Smrg      done
15144e3d74329Smrg      IFS=$lt_save_ifs
1514542a55b46Smrg      ;;
1514642a55b46Smrg    esac
151478ce07328Smrgelse $as_nop
1514842a55b46Smrg  enable_fast_install=yes
1514942a55b46Smrgfi
15150c582b7e3Smrg
15151c582b7e3Smrg
15152c582b7e3Smrg
15153c582b7e3Smrg
15154c582b7e3Smrg
15155c582b7e3Smrg
15156c582b7e3Smrg
15157c582b7e3Smrg
15158e3d74329Smrg  shared_archive_member_spec=
15159e3d74329Smrgcase $host,$enable_shared in
15160e3d74329Smrgpower*-*-aix[5-9]*,yes)
151618ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
151628ce07328Smrgprintf %s "checking which variant of shared library versioning to provide... " >&6; }
15163e3d74329Smrg
15164e3d74329Smrg# Check whether --with-aix-soname was given.
151658ce07328Smrgif test ${with_aix_soname+y}
151668ce07328Smrgthen :
15167e3d74329Smrg  withval=$with_aix_soname; case $withval in
15168e3d74329Smrg    aix|svr4|both)
15169e3d74329Smrg      ;;
15170e3d74329Smrg    *)
15171e3d74329Smrg      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
15172e3d74329Smrg      ;;
15173e3d74329Smrg    esac
15174e3d74329Smrg    lt_cv_with_aix_soname=$with_aix_soname
151758ce07328Smrgelse $as_nop
151768ce07328Smrg  if test ${lt_cv_with_aix_soname+y}
151778ce07328Smrgthen :
151788ce07328Smrg  printf %s "(cached) " >&6
151798ce07328Smrgelse $as_nop
15180e3d74329Smrg  lt_cv_with_aix_soname=aix
15181e3d74329Smrgfi
15182e3d74329Smrg
15183e3d74329Smrg    with_aix_soname=$lt_cv_with_aix_soname
15184e3d74329Smrgfi
15185e3d74329Smrg
151868ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
151878ce07328Smrgprintf "%s\n" "$with_aix_soname" >&6; }
15188e3d74329Smrg  if test aix != "$with_aix_soname"; then
15189e3d74329Smrg    # For the AIX way of multilib, we name the shared archive member
15190e3d74329Smrg    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
15191e3d74329Smrg    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
15192e3d74329Smrg    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
15193e3d74329Smrg    # the AIX toolchain works better with OBJECT_MODE set (default 32).
15194e3d74329Smrg    if test 64 = "${OBJECT_MODE-32}"; then
15195e3d74329Smrg      shared_archive_member_spec=shr_64
15196e3d74329Smrg    else
15197e3d74329Smrg      shared_archive_member_spec=shr
15198e3d74329Smrg    fi
15199e3d74329Smrg  fi
15200e3d74329Smrg  ;;
15201e3d74329Smrg*)
15202e3d74329Smrg  with_aix_soname=aix
15203e3d74329Smrg  ;;
15204e3d74329Smrgesac
15205e3d74329Smrg
15206e3d74329Smrg
15207e3d74329Smrg
15208e3d74329Smrg
15209e3d74329Smrg
15210e3d74329Smrg
15211e3d74329Smrg
15212c582b7e3Smrg
15213c582b7e3Smrg
15214c582b7e3Smrg
1521542a55b46Smrg# This can be used to rebuild libtool when needed
15216e3d74329SmrgLIBTOOL_DEPS=$ltmain
15217c582b7e3Smrg
1521842a55b46Smrg# Always use our own libtool.
1521942a55b46SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
15220c582b7e3Smrg
15221c582b7e3Smrg
15222c582b7e3Smrg
15223c582b7e3Smrg
15224c582b7e3Smrg
15225c582b7e3Smrg
15226c582b7e3Smrg
15227c582b7e3Smrg
15228c582b7e3Smrg
15229c582b7e3Smrg
15230c582b7e3Smrg
15231c582b7e3Smrg
15232c582b7e3Smrg
15233c582b7e3Smrg
15234c582b7e3Smrg
15235c582b7e3Smrg
15236c582b7e3Smrg
15237c582b7e3Smrg
15238c582b7e3Smrg
15239c582b7e3Smrg
15240c582b7e3Smrg
15241c582b7e3Smrg
15242c582b7e3Smrg
15243c582b7e3Smrg
15244c582b7e3Smrg
15245c582b7e3Smrg
15246c582b7e3Smrg
15247c582b7e3Smrg
15248c582b7e3Smrg
15249c582b7e3Smrg
1525042a55b46Smrgtest -z "$LN_S" && LN_S="ln -s"
15251c582b7e3Smrg
15252c582b7e3Smrg
15253c582b7e3Smrg
15254c582b7e3Smrg
15255c582b7e3Smrg
15256c582b7e3Smrg
15257c582b7e3Smrg
1525819019ffeSmrg
15259c582b7e3Smrg
15260c582b7e3Smrg
15261c582b7e3Smrg
15262c582b7e3Smrg
15263c582b7e3Smrg
15264c582b7e3Smrg
15265e3d74329Smrgif test -n "${ZSH_VERSION+set}"; then
1526642a55b46Smrg   setopt NO_GLOB_SUBST
1526742a55b46Smrgfi
15268c582b7e3Smrg
152698ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
152708ce07328Smrgprintf %s "checking for objdir... " >&6; }
152718ce07328Smrgif test ${lt_cv_objdir+y}
152728ce07328Smrgthen :
152738ce07328Smrg  printf %s "(cached) " >&6
152748ce07328Smrgelse $as_nop
1527542a55b46Smrg  rm -f .libs 2>/dev/null
1527642a55b46Smrgmkdir .libs 2>/dev/null
1527742a55b46Smrgif test -d .libs; then
1527842a55b46Smrg  lt_cv_objdir=.libs
1527942a55b46Smrgelse
1528042a55b46Smrg  # MS-DOS does not allow filenames that begin with a dot.
1528142a55b46Smrg  lt_cv_objdir=_libs
1528242a55b46Smrgfi
1528342a55b46Smrgrmdir .libs 2>/dev/null
1528442a55b46Smrgfi
152858ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
152868ce07328Smrgprintf "%s\n" "$lt_cv_objdir" >&6; }
1528742a55b46Smrgobjdir=$lt_cv_objdir
15288c582b7e3Smrg
15289c582b7e3Smrg
15290c582b7e3Smrg
15291c582b7e3Smrg
15292c582b7e3Smrg
152938ce07328Smrgprintf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
15294c582b7e3Smrg
15295c582b7e3Smrg
15296c582b7e3Smrg
15297c582b7e3Smrg
1529842a55b46Smrgcase $host_os in
1529942a55b46Smrgaix3*)
1530042a55b46Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
1530142a55b46Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
1530242a55b46Smrg  # vanish in a puff of smoke.
15303e3d74329Smrg  if test set != "${COLLECT_NAMES+set}"; then
1530442a55b46Smrg    COLLECT_NAMES=
1530542a55b46Smrg    export COLLECT_NAMES
1530642a55b46Smrg  fi
1530742a55b46Smrg  ;;
1530842a55b46Smrgesac
15309c582b7e3Smrg
1531042a55b46Smrg# Global variables:
1531142a55b46Smrgofile=libtool
1531242a55b46Smrgcan_build_shared=yes
15313c582b7e3Smrg
153148ce07328Smrg# All known linkers require a '.a' archive for static linking (except MSVC and
153158ce07328Smrg# ICC, which need '.lib').
1531642a55b46Smrglibext=a
15317c582b7e3Smrg
15318e3d74329Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
15319c582b7e3Smrg
15320e3d74329Smrgold_CC=$CC
15321e3d74329Smrgold_CFLAGS=$CFLAGS
15322c582b7e3Smrg
1532342a55b46Smrg# Set sane defaults for various variables
1532442a55b46Smrgtest -z "$CC" && CC=cc
1532542a55b46Smrgtest -z "$LTCC" && LTCC=$CC
1532642a55b46Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1532742a55b46Smrgtest -z "$LD" && LD=ld
1532842a55b46Smrgtest -z "$ac_objext" && ac_objext=o
15329c582b7e3Smrg
15330e3d74329Smrgfunc_cc_basename $compiler
15331e3d74329Smrgcc_basename=$func_cc_basename_result
15332c582b7e3Smrg
15333c582b7e3Smrg
1533442a55b46Smrg# Only perform the check for file, if the check method requires it
1533542a55b46Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
1533642a55b46Smrgcase $deplibs_check_method in
1533742a55b46Smrgfile_magic*)
1533842a55b46Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
153398ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
153408ce07328Smrgprintf %s "checking for ${ac_tool_prefix}file... " >&6; }
153418ce07328Smrgif test ${lt_cv_path_MAGIC_CMD+y}
153428ce07328Smrgthen :
153438ce07328Smrg  printf %s "(cached) " >&6
153448ce07328Smrgelse $as_nop
1534542a55b46Smrg  case $MAGIC_CMD in
1534642a55b46Smrg[\\/*] |  ?:[\\/]*)
15347e3d74329Smrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
1534842a55b46Smrg  ;;
1534942a55b46Smrg*)
15350e3d74329Smrg  lt_save_MAGIC_CMD=$MAGIC_CMD
15351e3d74329Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
1535242a55b46Smrg  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
1535342a55b46Smrg  for ac_dir in $ac_dummy; do
15354e3d74329Smrg    IFS=$lt_save_ifs
1535542a55b46Smrg    test -z "$ac_dir" && ac_dir=.
15356e3d74329Smrg    if test -f "$ac_dir/${ac_tool_prefix}file"; then
15357e3d74329Smrg      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
1535842a55b46Smrg      if test -n "$file_magic_test_file"; then
1535942a55b46Smrg	case $deplibs_check_method in
1536042a55b46Smrg	"file_magic "*)
1536142a55b46Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
15362e3d74329Smrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
1536342a55b46Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1536442a55b46Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
1536542a55b46Smrg	    :
1536642a55b46Smrg	  else
1536742a55b46Smrg	    cat <<_LT_EOF 1>&2
15368c582b7e3Smrg
1536942a55b46Smrg*** Warning: the command libtool uses to detect shared libraries,
1537042a55b46Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
1537142a55b46Smrg*** The result is that libtool may fail to recognize shared libraries
1537242a55b46Smrg*** as such.  This will affect the creation of libtool libraries that
1537342a55b46Smrg*** depend on shared libraries, but programs linked with such libtool
1537442a55b46Smrg*** libraries will work regardless of this problem.  Nevertheless, you
1537542a55b46Smrg*** may want to report the problem to your system manager and/or to
1537642a55b46Smrg*** bug-libtool@gnu.org
1537742a55b46Smrg
1537842a55b46Smrg_LT_EOF
1537942a55b46Smrg	  fi ;;
1538042a55b46Smrg	esac
1538142a55b46Smrg      fi
1538242a55b46Smrg      break
1538342a55b46Smrg    fi
1538442a55b46Smrg  done
15385e3d74329Smrg  IFS=$lt_save_ifs
15386e3d74329Smrg  MAGIC_CMD=$lt_save_MAGIC_CMD
1538742a55b46Smrg  ;;
1538842a55b46Smrgesac
1538942a55b46Smrgfi
1539042a55b46Smrg
15391e3d74329SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
1539242a55b46Smrgif test -n "$MAGIC_CMD"; then
153938ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
153948ce07328Smrgprintf "%s\n" "$MAGIC_CMD" >&6; }
1539542a55b46Smrgelse
153968ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
153978ce07328Smrgprintf "%s\n" "no" >&6; }
1539842a55b46Smrgfi
15399c582b7e3Smrg
15400c582b7e3Smrg
15401c582b7e3Smrg
15402c582b7e3Smrg
15403c582b7e3Smrg
1540442a55b46Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
1540542a55b46Smrg  if test -n "$ac_tool_prefix"; then
154068ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
154078ce07328Smrgprintf %s "checking for file... " >&6; }
154088ce07328Smrgif test ${lt_cv_path_MAGIC_CMD+y}
154098ce07328Smrgthen :
154108ce07328Smrg  printf %s "(cached) " >&6
154118ce07328Smrgelse $as_nop
1541242a55b46Smrg  case $MAGIC_CMD in
1541342a55b46Smrg[\\/*] |  ?:[\\/]*)
15414e3d74329Smrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
1541542a55b46Smrg  ;;
1541642a55b46Smrg*)
15417e3d74329Smrg  lt_save_MAGIC_CMD=$MAGIC_CMD
15418e3d74329Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
1541942a55b46Smrg  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
1542042a55b46Smrg  for ac_dir in $ac_dummy; do
15421e3d74329Smrg    IFS=$lt_save_ifs
1542242a55b46Smrg    test -z "$ac_dir" && ac_dir=.
15423e3d74329Smrg    if test -f "$ac_dir/file"; then
15424e3d74329Smrg      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
1542542a55b46Smrg      if test -n "$file_magic_test_file"; then
1542642a55b46Smrg	case $deplibs_check_method in
1542742a55b46Smrg	"file_magic "*)
1542842a55b46Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
15429e3d74329Smrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
1543042a55b46Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1543142a55b46Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
1543242a55b46Smrg	    :
1543342a55b46Smrg	  else
1543442a55b46Smrg	    cat <<_LT_EOF 1>&2
15435c582b7e3Smrg
1543642a55b46Smrg*** Warning: the command libtool uses to detect shared libraries,
1543742a55b46Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
1543842a55b46Smrg*** The result is that libtool may fail to recognize shared libraries
1543942a55b46Smrg*** as such.  This will affect the creation of libtool libraries that
1544042a55b46Smrg*** depend on shared libraries, but programs linked with such libtool
1544142a55b46Smrg*** libraries will work regardless of this problem.  Nevertheless, you
1544242a55b46Smrg*** may want to report the problem to your system manager and/or to
1544342a55b46Smrg*** bug-libtool@gnu.org
15444c582b7e3Smrg
1544542a55b46Smrg_LT_EOF
1544642a55b46Smrg	  fi ;;
1544742a55b46Smrg	esac
1544842a55b46Smrg      fi
1544942a55b46Smrg      break
1545042a55b46Smrg    fi
1545142a55b46Smrg  done
15452e3d74329Smrg  IFS=$lt_save_ifs
15453e3d74329Smrg  MAGIC_CMD=$lt_save_MAGIC_CMD
1545442a55b46Smrg  ;;
1545542a55b46Smrgesac
1545642a55b46Smrgfi
15457c582b7e3Smrg
15458e3d74329SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
1545942a55b46Smrgif test -n "$MAGIC_CMD"; then
154608ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
154618ce07328Smrgprintf "%s\n" "$MAGIC_CMD" >&6; }
1546242a55b46Smrgelse
154638ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
154648ce07328Smrgprintf "%s\n" "no" >&6; }
1546542a55b46Smrgfi
15466c582b7e3Smrg
15467c582b7e3Smrg
1546842a55b46Smrg  else
1546942a55b46Smrg    MAGIC_CMD=:
15470c582b7e3Smrg  fi
15471c582b7e3Smrgfi
15472c582b7e3Smrg
1547342a55b46Smrg  fi
1547442a55b46Smrg  ;;
1547542a55b46Smrgesac
1547642a55b46Smrg
1547742a55b46Smrg# Use C for the default configuration in the libtool script
15478c582b7e3Smrg
15479e3d74329Smrglt_save_CC=$CC
15480c582b7e3Smrgac_ext=c
15481c582b7e3Smrgac_cpp='$CPP $CPPFLAGS'
15482c582b7e3Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15483c582b7e3Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15484c582b7e3Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
15485c582b7e3Smrg
15486c582b7e3Smrg
1548742a55b46Smrg# Source file extension for C test sources.
1548842a55b46Smrgac_ext=c
15489c582b7e3Smrg
1549042a55b46Smrg# Object file extension for compiled C test sources.
15491c582b7e3Smrgobjext=o
1549242a55b46Smrgobjext=$objext
15493c582b7e3Smrg
15494c582b7e3Smrg# Code to be used in simple compile tests
1549542a55b46Smrglt_simple_compile_test_code="int some_variable = 0;"
15496c582b7e3Smrg
15497c582b7e3Smrg# Code to be used in simple link tests
1549842a55b46Smrglt_simple_link_test_code='int main(){return(0);}'
1549942a55b46Smrg
1550042a55b46Smrg
1550142a55b46Smrg
1550242a55b46Smrg
1550342a55b46Smrg
15504c582b7e3Smrg
15505c582b7e3Smrg
15506c582b7e3Smrg# If no C compiler was specified, use CC.
15507c582b7e3SmrgLTCC=${LTCC-"$CC"}
15508c582b7e3Smrg
15509c582b7e3Smrg# If no C compiler flags were specified, use CFLAGS.
15510c582b7e3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
15511c582b7e3Smrg
15512c582b7e3Smrg# Allow CC to be a program name with arguments.
15513c582b7e3Smrgcompiler=$CC
15514c582b7e3Smrg
1551542a55b46Smrg# Save the default compiler, since it gets overwritten when the other
1551642a55b46Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
1551742a55b46Smrgcompiler_DEFAULT=$CC
15518c582b7e3Smrg
15519c582b7e3Smrg# save warnings/boilerplate of simple test code
15520c582b7e3Smrgac_outfile=conftest.$ac_objext
15521c582b7e3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
15522c582b7e3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
15523c582b7e3Smrg_lt_compiler_boilerplate=`cat conftest.err`
1552442a55b46Smrg$RM conftest*
15525c582b7e3Smrg
15526c582b7e3Smrgac_outfile=conftest.$ac_objext
15527c582b7e3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
15528c582b7e3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
15529c582b7e3Smrg_lt_linker_boilerplate=`cat conftest.err`
1553042a55b46Smrg$RM -r conftest*
15531c582b7e3Smrg
15532c582b7e3Smrg
1553342a55b46Smrgif test -n "$compiler"; then
15534c582b7e3Smrg
1553542a55b46Smrglt_prog_compiler_no_builtin_flag=
15536c582b7e3Smrg
15537e3d74329Smrgif test yes = "$GCC"; then
1553842a55b46Smrg  case $cc_basename in
1553942a55b46Smrg  nvcc*)
1554042a55b46Smrg    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
1554142a55b46Smrg  *)
1554242a55b46Smrg    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
1554342a55b46Smrg  esac
15544c582b7e3Smrg
155458ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
155468ce07328Smrgprintf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
155478ce07328Smrgif test ${lt_cv_prog_compiler_rtti_exceptions+y}
155488ce07328Smrgthen :
155498ce07328Smrg  printf %s "(cached) " >&6
155508ce07328Smrgelse $as_nop
15551c582b7e3Smrg  lt_cv_prog_compiler_rtti_exceptions=no
1555242a55b46Smrg   ac_outfile=conftest.$ac_objext
15553c582b7e3Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15554e3d74329Smrg   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
15555c582b7e3Smrg   # Insert the option either (1) after the last *FLAGS variable, or
15556c582b7e3Smrg   # (2) before a word containing "conftest.", or (3) at the end.
15557c582b7e3Smrg   # Note that $ac_compile itself does not contain backslashes and begins
15558c582b7e3Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
15559c582b7e3Smrg   # The option is referenced via a variable to avoid confusing sed.
15560c582b7e3Smrg   lt_compile=`echo "$ac_compile" | $SED \
15561c582b7e3Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15562c582b7e3Smrg   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15563c582b7e3Smrg   -e 's:$: $lt_compiler_flag:'`
1556442a55b46Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15565c582b7e3Smrg   (eval "$lt_compile" 2>conftest.err)
15566c582b7e3Smrg   ac_status=$?
15567c582b7e3Smrg   cat conftest.err >&5
1556842a55b46Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15569c582b7e3Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
15570c582b7e3Smrg     # The compiler can only warn and ignore the option if not recognized
15571c582b7e3Smrg     # So say no if there are warnings other than the usual output.
1557242a55b46Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
15573c582b7e3Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15574c582b7e3Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
15575c582b7e3Smrg       lt_cv_prog_compiler_rtti_exceptions=yes
15576c582b7e3Smrg     fi
15577c582b7e3Smrg   fi
1557842a55b46Smrg   $RM conftest*
15579c582b7e3Smrg
15580c582b7e3Smrgfi
155818ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
155828ce07328Smrgprintf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
15583c582b7e3Smrg
15584e3d74329Smrgif test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
1558542a55b46Smrg    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
15586c582b7e3Smrgelse
15587c582b7e3Smrg    :
15588c582b7e3Smrgfi
15589c582b7e3Smrg
15590c582b7e3Smrgfi
15591c582b7e3Smrg
15592c582b7e3Smrg
1559342a55b46Smrg
1559442a55b46Smrg
1559542a55b46Smrg
1559642a55b46Smrg
1559742a55b46Smrg  lt_prog_compiler_wl=
1559842a55b46Smrglt_prog_compiler_pic=
1559942a55b46Smrglt_prog_compiler_static=
1560042a55b46Smrg
15601c582b7e3Smrg
15602e3d74329Smrg  if test yes = "$GCC"; then
1560342a55b46Smrg    lt_prog_compiler_wl='-Wl,'
1560442a55b46Smrg    lt_prog_compiler_static='-static'
15605c582b7e3Smrg
15606c582b7e3Smrg    case $host_os in
15607c582b7e3Smrg      aix*)
15608c582b7e3Smrg      # All AIX code is PIC.
15609e3d74329Smrg      if test ia64 = "$host_cpu"; then
15610c582b7e3Smrg	# AIX 5 now supports IA64 processor
1561142a55b46Smrg	lt_prog_compiler_static='-Bstatic'
15612c582b7e3Smrg      fi
15613e3d74329Smrg      lt_prog_compiler_pic='-fPIC'
15614c582b7e3Smrg      ;;
15615c582b7e3Smrg
15616c582b7e3Smrg    amigaos*)
1561742a55b46Smrg      case $host_cpu in
1561842a55b46Smrg      powerpc)
1561942a55b46Smrg            # see comment about AmigaOS4 .so support
1562042a55b46Smrg            lt_prog_compiler_pic='-fPIC'
1562142a55b46Smrg        ;;
1562242a55b46Smrg      m68k)
1562342a55b46Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
15624e3d74329Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
15625e3d74329Smrg            # like '-m68040'.
1562642a55b46Smrg            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
1562742a55b46Smrg        ;;
1562842a55b46Smrg      esac
15629c582b7e3Smrg      ;;
15630c582b7e3Smrg
15631c582b7e3Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
15632c582b7e3Smrg      # PIC is the default for these OSes.
15633c582b7e3Smrg      ;;
15634c582b7e3Smrg
1563542a55b46Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
15636c582b7e3Smrg      # This hack is so that the source file can tell whether it is being
15637c582b7e3Smrg      # built for inclusion in a dll (and should export symbols for example).
15638c582b7e3Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
15639c582b7e3Smrg      # (--disable-auto-import) libraries
1564042a55b46Smrg      lt_prog_compiler_pic='-DDLL_EXPORT'
15641e3d74329Smrg      case $host_os in
15642e3d74329Smrg      os2*)
15643e3d74329Smrg	lt_prog_compiler_static='$wl-static'
15644e3d74329Smrg	;;
15645e3d74329Smrg      esac
15646c582b7e3Smrg      ;;
15647c582b7e3Smrg
15648c582b7e3Smrg    darwin* | rhapsody*)
15649c582b7e3Smrg      # PIC is the default on this platform
15650c582b7e3Smrg      # Common symbols not allowed in MH_DYLIB files
1565142a55b46Smrg      lt_prog_compiler_pic='-fno-common'
1565242a55b46Smrg      ;;
1565342a55b46Smrg
1565442a55b46Smrg    haiku*)
1565542a55b46Smrg      # PIC is the default for Haiku.
1565642a55b46Smrg      # The "-static" flag exists, but is broken.
1565742a55b46Smrg      lt_prog_compiler_static=
1565842a55b46Smrg      ;;
1565942a55b46Smrg
1566042a55b46Smrg    hpux*)
1566142a55b46Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
1566242a55b46Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
1566342a55b46Smrg      # sets the default TLS model and affects inlining.
1566442a55b46Smrg      case $host_cpu in
1566542a55b46Smrg      hppa*64*)
1566642a55b46Smrg	# +Z the default
1566742a55b46Smrg	;;
1566842a55b46Smrg      *)
1566942a55b46Smrg	lt_prog_compiler_pic='-fPIC'
1567042a55b46Smrg	;;
1567142a55b46Smrg      esac
15672c582b7e3Smrg      ;;
15673c582b7e3Smrg
15674c582b7e3Smrg    interix[3-9]*)
15675c582b7e3Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
15676c582b7e3Smrg      # Instead, we relocate shared libraries at runtime.
15677c582b7e3Smrg      ;;
15678c582b7e3Smrg
15679c582b7e3Smrg    msdosdjgpp*)
15680c582b7e3Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
15681c582b7e3Smrg      # on systems that don't support them.
1568242a55b46Smrg      lt_prog_compiler_can_build_shared=no
15683c582b7e3Smrg      enable_shared=no
15684c582b7e3Smrg      ;;
15685c582b7e3Smrg
1568642a55b46Smrg    *nto* | *qnx*)
1568742a55b46Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
1568842a55b46Smrg      # it will coredump.
1568942a55b46Smrg      lt_prog_compiler_pic='-fPIC -shared'
1569042a55b46Smrg      ;;
1569142a55b46Smrg
15692c582b7e3Smrg    sysv4*MP*)
15693c582b7e3Smrg      if test -d /usr/nec; then
1569442a55b46Smrg	lt_prog_compiler_pic=-Kconform_pic
15695c582b7e3Smrg      fi
15696c582b7e3Smrg      ;;
15697c582b7e3Smrg
1569842a55b46Smrg    *)
1569942a55b46Smrg      lt_prog_compiler_pic='-fPIC'
15700c582b7e3Smrg      ;;
1570142a55b46Smrg    esac
15702c582b7e3Smrg
1570342a55b46Smrg    case $cc_basename in
1570442a55b46Smrg    nvcc*) # Cuda Compiler Driver 2.2
1570542a55b46Smrg      lt_prog_compiler_wl='-Xlinker '
1570642a55b46Smrg      if test -n "$lt_prog_compiler_pic"; then
1570742a55b46Smrg        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
1570842a55b46Smrg      fi
15709c582b7e3Smrg      ;;
15710c582b7e3Smrg    esac
15711c582b7e3Smrg  else
15712c582b7e3Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
15713c582b7e3Smrg    case $host_os in
15714c582b7e3Smrg    aix*)
1571542a55b46Smrg      lt_prog_compiler_wl='-Wl,'
15716e3d74329Smrg      if test ia64 = "$host_cpu"; then
15717c582b7e3Smrg	# AIX 5 now supports IA64 processor
1571842a55b46Smrg	lt_prog_compiler_static='-Bstatic'
15719c582b7e3Smrg      else
1572042a55b46Smrg	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
15721c582b7e3Smrg      fi
15722c582b7e3Smrg      ;;
15723c582b7e3Smrg
15724e3d74329Smrg    darwin* | rhapsody*)
15725e3d74329Smrg      # PIC is the default on this platform
15726e3d74329Smrg      # Common symbols not allowed in MH_DYLIB files
15727e3d74329Smrg      lt_prog_compiler_pic='-fno-common'
15728e3d74329Smrg      case $cc_basename in
15729e3d74329Smrg      nagfor*)
15730e3d74329Smrg        # NAG Fortran compiler
15731e3d74329Smrg        lt_prog_compiler_wl='-Wl,-Wl,,'
15732e3d74329Smrg        lt_prog_compiler_pic='-PIC'
15733e3d74329Smrg        lt_prog_compiler_static='-Bstatic'
15734e3d74329Smrg        ;;
15735e3d74329Smrg      esac
15736e3d74329Smrg      ;;
15737e3d74329Smrg
1573842a55b46Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
15739c582b7e3Smrg      # This hack is so that the source file can tell whether it is being
15740c582b7e3Smrg      # built for inclusion in a dll (and should export symbols for example).
1574142a55b46Smrg      lt_prog_compiler_pic='-DDLL_EXPORT'
15742e3d74329Smrg      case $host_os in
15743e3d74329Smrg      os2*)
15744e3d74329Smrg	lt_prog_compiler_static='$wl-static'
15745e3d74329Smrg	;;
15746e3d74329Smrg      esac
15747c582b7e3Smrg      ;;
15748c582b7e3Smrg
15749c582b7e3Smrg    hpux9* | hpux10* | hpux11*)
1575042a55b46Smrg      lt_prog_compiler_wl='-Wl,'
15751c582b7e3Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
15752c582b7e3Smrg      # not for PA HP-UX.
15753c582b7e3Smrg      case $host_cpu in
15754c582b7e3Smrg      hppa*64*|ia64*)
15755c582b7e3Smrg	# +Z the default
15756c582b7e3Smrg	;;
15757c582b7e3Smrg      *)
1575842a55b46Smrg	lt_prog_compiler_pic='+Z'
15759c582b7e3Smrg	;;
15760c582b7e3Smrg      esac
15761c582b7e3Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
15762e3d74329Smrg      lt_prog_compiler_static='$wl-a ${wl}archive'
15763c582b7e3Smrg      ;;
15764c582b7e3Smrg
15765c582b7e3Smrg    irix5* | irix6* | nonstopux*)
1576642a55b46Smrg      lt_prog_compiler_wl='-Wl,'
15767c582b7e3Smrg      # PIC (with -KPIC) is the default.
1576842a55b46Smrg      lt_prog_compiler_static='-non_shared'
15769c582b7e3Smrg      ;;
15770c582b7e3Smrg
157710496e070Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15772c582b7e3Smrg      case $cc_basename in
15773e3d74329Smrg      # old Intel for x86_64, which still supported -KPIC.
1577442a55b46Smrg      ecc*)
1577542a55b46Smrg	lt_prog_compiler_wl='-Wl,'
1577642a55b46Smrg	lt_prog_compiler_pic='-KPIC'
1577742a55b46Smrg	lt_prog_compiler_static='-static'
1577842a55b46Smrg        ;;
1577942a55b46Smrg      # icc used to be incompatible with GCC.
1578042a55b46Smrg      # ICC 10 doesn't accept -KPIC any more.
1578142a55b46Smrg      icc* | ifort*)
1578242a55b46Smrg	lt_prog_compiler_wl='-Wl,'
1578342a55b46Smrg	lt_prog_compiler_pic='-fPIC'
1578442a55b46Smrg	lt_prog_compiler_static='-static'
15785c582b7e3Smrg        ;;
1578642a55b46Smrg      # Lahey Fortran 8.1.
1578742a55b46Smrg      lf95*)
1578842a55b46Smrg	lt_prog_compiler_wl='-Wl,'
1578942a55b46Smrg	lt_prog_compiler_pic='--shared'
1579042a55b46Smrg	lt_prog_compiler_static='--static'
1579142a55b46Smrg	;;
1579242a55b46Smrg      nagfor*)
1579342a55b46Smrg	# NAG Fortran compiler
1579442a55b46Smrg	lt_prog_compiler_wl='-Wl,-Wl,,'
1579542a55b46Smrg	lt_prog_compiler_pic='-PIC'
1579642a55b46Smrg	lt_prog_compiler_static='-Bstatic'
1579742a55b46Smrg	;;
15798e3d74329Smrg      tcc*)
15799e3d74329Smrg	# Fabrice Bellard et al's Tiny C Compiler
15800e3d74329Smrg	lt_prog_compiler_wl='-Wl,'
15801e3d74329Smrg	lt_prog_compiler_pic='-fPIC'
15802e3d74329Smrg	lt_prog_compiler_static='-static'
15803e3d74329Smrg	;;
1580442a55b46Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
15805c582b7e3Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
15806c582b7e3Smrg	# which looks to be a dead project)
1580742a55b46Smrg	lt_prog_compiler_wl='-Wl,'
1580842a55b46Smrg	lt_prog_compiler_pic='-fpic'
1580942a55b46Smrg	lt_prog_compiler_static='-Bstatic'
15810c582b7e3Smrg        ;;
15811c582b7e3Smrg      ccc*)
1581242a55b46Smrg        lt_prog_compiler_wl='-Wl,'
15813c582b7e3Smrg        # All Alpha code is PIC.
1581442a55b46Smrg        lt_prog_compiler_static='-non_shared'
15815c582b7e3Smrg        ;;
1581642a55b46Smrg      xl* | bgxl* | bgf* | mpixl*)
1581742a55b46Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
1581842a55b46Smrg	lt_prog_compiler_wl='-Wl,'
1581942a55b46Smrg	lt_prog_compiler_pic='-qpic'
1582042a55b46Smrg	lt_prog_compiler_static='-qstaticlink'
1582142a55b46Smrg	;;
15822c582b7e3Smrg      *)
158238ce07328Smrg	case `$CC -V 2>&1 | $SED 5q` in
1582442a55b46Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
1582542a55b46Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
1582642a55b46Smrg	  lt_prog_compiler_pic='-KPIC'
1582742a55b46Smrg	  lt_prog_compiler_static='-Bstatic'
1582842a55b46Smrg	  lt_prog_compiler_wl=''
1582942a55b46Smrg	  ;;
1583042a55b46Smrg	*Sun\ F* | *Sun*Fortran*)
1583142a55b46Smrg	  lt_prog_compiler_pic='-KPIC'
1583242a55b46Smrg	  lt_prog_compiler_static='-Bstatic'
1583342a55b46Smrg	  lt_prog_compiler_wl='-Qoption ld '
1583442a55b46Smrg	  ;;
15835c582b7e3Smrg	*Sun\ C*)
15836c582b7e3Smrg	  # Sun C 5.9
1583742a55b46Smrg	  lt_prog_compiler_pic='-KPIC'
1583842a55b46Smrg	  lt_prog_compiler_static='-Bstatic'
1583942a55b46Smrg	  lt_prog_compiler_wl='-Wl,'
15840c582b7e3Smrg	  ;;
1584142a55b46Smrg        *Intel*\ [CF]*Compiler*)
1584242a55b46Smrg	  lt_prog_compiler_wl='-Wl,'
1584342a55b46Smrg	  lt_prog_compiler_pic='-fPIC'
1584442a55b46Smrg	  lt_prog_compiler_static='-static'
1584542a55b46Smrg	  ;;
1584642a55b46Smrg	*Portland\ Group*)
1584742a55b46Smrg	  lt_prog_compiler_wl='-Wl,'
1584842a55b46Smrg	  lt_prog_compiler_pic='-fpic'
1584942a55b46Smrg	  lt_prog_compiler_static='-Bstatic'
15850c582b7e3Smrg	  ;;
15851c582b7e3Smrg	esac
15852c582b7e3Smrg	;;
15853c582b7e3Smrg      esac
15854c582b7e3Smrg      ;;
15855c582b7e3Smrg
1585642a55b46Smrg    newsos6)
1585742a55b46Smrg      lt_prog_compiler_pic='-KPIC'
1585842a55b46Smrg      lt_prog_compiler_static='-Bstatic'
1585942a55b46Smrg      ;;
1586042a55b46Smrg
1586142a55b46Smrg    *nto* | *qnx*)
1586242a55b46Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
1586342a55b46Smrg      # it will coredump.
1586442a55b46Smrg      lt_prog_compiler_pic='-fPIC -shared'
1586542a55b46Smrg      ;;
1586642a55b46Smrg
15867c582b7e3Smrg    osf3* | osf4* | osf5*)
1586842a55b46Smrg      lt_prog_compiler_wl='-Wl,'
15869c582b7e3Smrg      # All OSF/1 code is PIC.
1587042a55b46Smrg      lt_prog_compiler_static='-non_shared'
15871c582b7e3Smrg      ;;
15872c582b7e3Smrg
15873c582b7e3Smrg    rdos*)
1587442a55b46Smrg      lt_prog_compiler_static='-non_shared'
15875c582b7e3Smrg      ;;
15876c582b7e3Smrg
15877c582b7e3Smrg    solaris*)
1587842a55b46Smrg      lt_prog_compiler_pic='-KPIC'
1587942a55b46Smrg      lt_prog_compiler_static='-Bstatic'
15880c582b7e3Smrg      case $cc_basename in
1588142a55b46Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
1588242a55b46Smrg	lt_prog_compiler_wl='-Qoption ld ';;
15883c582b7e3Smrg      *)
1588442a55b46Smrg	lt_prog_compiler_wl='-Wl,';;
15885c582b7e3Smrg      esac
15886c582b7e3Smrg      ;;
15887c582b7e3Smrg
15888c582b7e3Smrg    sunos4*)
1588942a55b46Smrg      lt_prog_compiler_wl='-Qoption ld '
1589042a55b46Smrg      lt_prog_compiler_pic='-PIC'
1589142a55b46Smrg      lt_prog_compiler_static='-Bstatic'
15892c582b7e3Smrg      ;;
15893c582b7e3Smrg
15894c582b7e3Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
1589542a55b46Smrg      lt_prog_compiler_wl='-Wl,'
1589642a55b46Smrg      lt_prog_compiler_pic='-KPIC'
1589742a55b46Smrg      lt_prog_compiler_static='-Bstatic'
15898c582b7e3Smrg      ;;
15899c582b7e3Smrg
15900c582b7e3Smrg    sysv4*MP*)
15901e3d74329Smrg      if test -d /usr/nec; then
1590242a55b46Smrg	lt_prog_compiler_pic='-Kconform_pic'
1590342a55b46Smrg	lt_prog_compiler_static='-Bstatic'
15904c582b7e3Smrg      fi
15905c582b7e3Smrg      ;;
15906c582b7e3Smrg
15907c582b7e3Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
1590842a55b46Smrg      lt_prog_compiler_wl='-Wl,'
1590942a55b46Smrg      lt_prog_compiler_pic='-KPIC'
1591042a55b46Smrg      lt_prog_compiler_static='-Bstatic'
15911c582b7e3Smrg      ;;
15912c582b7e3Smrg
15913c582b7e3Smrg    unicos*)
1591442a55b46Smrg      lt_prog_compiler_wl='-Wl,'
1591542a55b46Smrg      lt_prog_compiler_can_build_shared=no
15916c582b7e3Smrg      ;;
15917c582b7e3Smrg
15918c582b7e3Smrg    uts4*)
1591942a55b46Smrg      lt_prog_compiler_pic='-pic'
1592042a55b46Smrg      lt_prog_compiler_static='-Bstatic'
15921c582b7e3Smrg      ;;
15922c582b7e3Smrg
15923c582b7e3Smrg    *)
1592442a55b46Smrg      lt_prog_compiler_can_build_shared=no
15925c582b7e3Smrg      ;;
15926c582b7e3Smrg    esac
15927c582b7e3Smrg  fi
15928c582b7e3Smrg
1592942a55b46Smrgcase $host_os in
15930e3d74329Smrg  # For platforms that do not support PIC, -DPIC is meaningless:
1593142a55b46Smrg  *djgpp*)
1593242a55b46Smrg    lt_prog_compiler_pic=
1593342a55b46Smrg    ;;
1593442a55b46Smrg  *)
1593542a55b46Smrg    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
1593642a55b46Smrg    ;;
1593742a55b46Smrgesac
1593842a55b46Smrg
159398ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
159408ce07328Smrgprintf %s "checking for $compiler option to produce PIC... " >&6; }
159418ce07328Smrgif test ${lt_cv_prog_compiler_pic+y}
159428ce07328Smrgthen :
159438ce07328Smrg  printf %s "(cached) " >&6
159448ce07328Smrgelse $as_nop
1594542a55b46Smrg  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
1594642a55b46Smrgfi
159478ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
159488ce07328Smrgprintf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
1594942a55b46Smrglt_prog_compiler_pic=$lt_cv_prog_compiler_pic
15950c582b7e3Smrg
15951c582b7e3Smrg#
15952c582b7e3Smrg# Check to make sure the PIC flag actually works.
15953c582b7e3Smrg#
1595442a55b46Smrgif test -n "$lt_prog_compiler_pic"; then
159558ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
159568ce07328Smrgprintf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
159578ce07328Smrgif test ${lt_cv_prog_compiler_pic_works+y}
159588ce07328Smrgthen :
159598ce07328Smrg  printf %s "(cached) " >&6
159608ce07328Smrgelse $as_nop
1596142a55b46Smrg  lt_cv_prog_compiler_pic_works=no
1596242a55b46Smrg   ac_outfile=conftest.$ac_objext
15963c582b7e3Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15964e3d74329Smrg   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
15965c582b7e3Smrg   # Insert the option either (1) after the last *FLAGS variable, or
15966c582b7e3Smrg   # (2) before a word containing "conftest.", or (3) at the end.
15967c582b7e3Smrg   # Note that $ac_compile itself does not contain backslashes and begins
15968c582b7e3Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
15969c582b7e3Smrg   # The option is referenced via a variable to avoid confusing sed.
15970c582b7e3Smrg   lt_compile=`echo "$ac_compile" | $SED \
15971c582b7e3Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15972c582b7e3Smrg   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15973c582b7e3Smrg   -e 's:$: $lt_compiler_flag:'`
1597442a55b46Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15975c582b7e3Smrg   (eval "$lt_compile" 2>conftest.err)
15976c582b7e3Smrg   ac_status=$?
15977c582b7e3Smrg   cat conftest.err >&5
1597842a55b46Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15979c582b7e3Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
15980c582b7e3Smrg     # The compiler can only warn and ignore the option if not recognized
15981c582b7e3Smrg     # So say no if there are warnings other than the usual output.
1598242a55b46Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
15983c582b7e3Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15984c582b7e3Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1598542a55b46Smrg       lt_cv_prog_compiler_pic_works=yes
15986c582b7e3Smrg     fi
15987c582b7e3Smrg   fi
1598842a55b46Smrg   $RM conftest*
15989c582b7e3Smrg
15990c582b7e3Smrgfi
159918ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
159928ce07328Smrgprintf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
15993c582b7e3Smrg
15994e3d74329Smrgif test yes = "$lt_cv_prog_compiler_pic_works"; then
1599542a55b46Smrg    case $lt_prog_compiler_pic in
15996c582b7e3Smrg     "" | " "*) ;;
1599742a55b46Smrg     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
15998c582b7e3Smrg     esac
15999c582b7e3Smrgelse
1600042a55b46Smrg    lt_prog_compiler_pic=
1600142a55b46Smrg     lt_prog_compiler_can_build_shared=no
16002c582b7e3Smrgfi
16003c582b7e3Smrg
16004c582b7e3Smrgfi
1600542a55b46Smrg
1600642a55b46Smrg
1600742a55b46Smrg
1600842a55b46Smrg
1600942a55b46Smrg
1601042a55b46Smrg
1601142a55b46Smrg
1601242a55b46Smrg
1601342a55b46Smrg
1601442a55b46Smrg
16015c582b7e3Smrg
16016c582b7e3Smrg#
16017c582b7e3Smrg# Check to make sure the static flag actually works.
16018c582b7e3Smrg#
1601942a55b46Smrgwl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
160208ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
160218ce07328Smrgprintf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
160228ce07328Smrgif test ${lt_cv_prog_compiler_static_works+y}
160238ce07328Smrgthen :
160248ce07328Smrg  printf %s "(cached) " >&6
160258ce07328Smrgelse $as_nop
1602642a55b46Smrg  lt_cv_prog_compiler_static_works=no
16027e3d74329Smrg   save_LDFLAGS=$LDFLAGS
16028c582b7e3Smrg   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
16029c582b7e3Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
16030c582b7e3Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16031c582b7e3Smrg     # The linker can only warn and ignore the option if not recognized
16032c582b7e3Smrg     # So say no if there are warnings
16033c582b7e3Smrg     if test -s conftest.err; then
16034c582b7e3Smrg       # Append any errors to the config.log.
16035c582b7e3Smrg       cat conftest.err 1>&5
1603642a55b46Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
16037c582b7e3Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16038c582b7e3Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
1603942a55b46Smrg         lt_cv_prog_compiler_static_works=yes
16040c582b7e3Smrg       fi
16041c582b7e3Smrg     else
1604242a55b46Smrg       lt_cv_prog_compiler_static_works=yes
16043c582b7e3Smrg     fi
16044c582b7e3Smrg   fi
1604542a55b46Smrg   $RM -r conftest*
16046e3d74329Smrg   LDFLAGS=$save_LDFLAGS
16047c582b7e3Smrg
16048c582b7e3Smrgfi
160498ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
160508ce07328Smrgprintf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
16051c582b7e3Smrg
16052e3d74329Smrgif test yes = "$lt_cv_prog_compiler_static_works"; then
16053c582b7e3Smrg    :
16054c582b7e3Smrgelse
1605542a55b46Smrg    lt_prog_compiler_static=
1605642a55b46Smrgfi
1605742a55b46Smrg
1605842a55b46Smrg
1605942a55b46Smrg
1606042a55b46Smrg
1606142a55b46Smrg
1606242a55b46Smrg
1606342a55b46Smrg
160648ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
160658ce07328Smrgprintf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
160668ce07328Smrgif test ${lt_cv_prog_compiler_c_o+y}
160678ce07328Smrgthen :
160688ce07328Smrg  printf %s "(cached) " >&6
160698ce07328Smrgelse $as_nop
1607042a55b46Smrg  lt_cv_prog_compiler_c_o=no
1607142a55b46Smrg   $RM -r conftest 2>/dev/null
1607242a55b46Smrg   mkdir conftest
1607342a55b46Smrg   cd conftest
1607442a55b46Smrg   mkdir out
1607542a55b46Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1607642a55b46Smrg
1607742a55b46Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1607842a55b46Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1607942a55b46Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1608042a55b46Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1608142a55b46Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1608242a55b46Smrg   lt_compile=`echo "$ac_compile" | $SED \
1608342a55b46Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1608442a55b46Smrg   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
1608542a55b46Smrg   -e 's:$: $lt_compiler_flag:'`
1608642a55b46Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
1608742a55b46Smrg   (eval "$lt_compile" 2>out/conftest.err)
1608842a55b46Smrg   ac_status=$?
1608942a55b46Smrg   cat out/conftest.err >&5
1609042a55b46Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1609142a55b46Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1609242a55b46Smrg   then
1609342a55b46Smrg     # The compiler can only warn and ignore the option if not recognized
1609442a55b46Smrg     # So say no if there are warnings
1609542a55b46Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1609642a55b46Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1609742a55b46Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1609842a55b46Smrg       lt_cv_prog_compiler_c_o=yes
1609942a55b46Smrg     fi
1610042a55b46Smrg   fi
1610142a55b46Smrg   chmod u+w . 2>&5
1610242a55b46Smrg   $RM conftest*
1610342a55b46Smrg   # SGI C++ compiler will create directory out/ii_files/ for
1610442a55b46Smrg   # template instantiation
1610542a55b46Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1610642a55b46Smrg   $RM out/* && rmdir out
1610742a55b46Smrg   cd ..
1610842a55b46Smrg   $RM -r conftest
1610942a55b46Smrg   $RM conftest*
1611042a55b46Smrg
16111c582b7e3Smrgfi
161128ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
161138ce07328Smrgprintf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
1611442a55b46Smrg
1611542a55b46Smrg
1611642a55b46Smrg
16117c582b7e3Smrg
16118c582b7e3Smrg
1611942a55b46Smrg
161208ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
161218ce07328Smrgprintf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
161228ce07328Smrgif test ${lt_cv_prog_compiler_c_o+y}
161238ce07328Smrgthen :
161248ce07328Smrg  printf %s "(cached) " >&6
161258ce07328Smrgelse $as_nop
1612642a55b46Smrg  lt_cv_prog_compiler_c_o=no
1612742a55b46Smrg   $RM -r conftest 2>/dev/null
16128c582b7e3Smrg   mkdir conftest
16129c582b7e3Smrg   cd conftest
16130c582b7e3Smrg   mkdir out
16131c582b7e3Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16132c582b7e3Smrg
16133c582b7e3Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
16134c582b7e3Smrg   # Insert the option either (1) after the last *FLAGS variable, or
16135c582b7e3Smrg   # (2) before a word containing "conftest.", or (3) at the end.
16136c582b7e3Smrg   # Note that $ac_compile itself does not contain backslashes and begins
16137c582b7e3Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
16138c582b7e3Smrg   lt_compile=`echo "$ac_compile" | $SED \
16139c582b7e3Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16140c582b7e3Smrg   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16141c582b7e3Smrg   -e 's:$: $lt_compiler_flag:'`
1614242a55b46Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
16143c582b7e3Smrg   (eval "$lt_compile" 2>out/conftest.err)
16144c582b7e3Smrg   ac_status=$?
16145c582b7e3Smrg   cat out/conftest.err >&5
1614642a55b46Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16147c582b7e3Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
16148c582b7e3Smrg   then
16149c582b7e3Smrg     # The compiler can only warn and ignore the option if not recognized
16150c582b7e3Smrg     # So say no if there are warnings
1615142a55b46Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
16152c582b7e3Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16153c582b7e3Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1615442a55b46Smrg       lt_cv_prog_compiler_c_o=yes
16155c582b7e3Smrg     fi
16156c582b7e3Smrg   fi
16157c582b7e3Smrg   chmod u+w . 2>&5
1615842a55b46Smrg   $RM conftest*
16159c582b7e3Smrg   # SGI C++ compiler will create directory out/ii_files/ for
16160c582b7e3Smrg   # template instantiation
1616142a55b46Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1616242a55b46Smrg   $RM out/* && rmdir out
16163c582b7e3Smrg   cd ..
1616442a55b46Smrg   $RM -r conftest
1616542a55b46Smrg   $RM conftest*
16166c582b7e3Smrg
16167c582b7e3Smrgfi
161688ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
161698ce07328Smrgprintf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
1617042a55b46Smrg
1617142a55b46Smrg
16172c582b7e3Smrg
16173c582b7e3Smrg
16174e3d74329Smrghard_links=nottested
16175e3d74329Smrgif test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
16176c582b7e3Smrg  # do not overwrite the value of need_locks provided by the user
161778ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
161788ce07328Smrgprintf %s "checking if we can lock with hard links... " >&6; }
16179c582b7e3Smrg  hard_links=yes
1618042a55b46Smrg  $RM conftest*
16181c582b7e3Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
16182c582b7e3Smrg  touch conftest.a
16183c582b7e3Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
16184c582b7e3Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
161858ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
161868ce07328Smrgprintf "%s\n" "$hard_links" >&6; }
16187e3d74329Smrg  if test no = "$hard_links"; then
161888ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
161898ce07328Smrgprintf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
16190c582b7e3Smrg    need_locks=warn
16191c582b7e3Smrg  fi
16192c582b7e3Smrgelse
16193c582b7e3Smrg  need_locks=no
16194c582b7e3Smrgfi
16195c582b7e3Smrg
1619642a55b46Smrg
1619742a55b46Smrg
1619842a55b46Smrg
1619942a55b46Smrg
1620042a55b46Smrg
162018ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
162028ce07328Smrgprintf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
16203c582b7e3Smrg
16204c582b7e3Smrg  runpath_var=
1620542a55b46Smrg  allow_undefined_flag=
1620642a55b46Smrg  always_export_symbols=no
1620742a55b46Smrg  archive_cmds=
1620842a55b46Smrg  archive_expsym_cmds=
1620942a55b46Smrg  compiler_needs_object=no
1621042a55b46Smrg  enable_shared_with_static_runtimes=no
1621142a55b46Smrg  export_dynamic_flag_spec=
1621242a55b46Smrg  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
1621342a55b46Smrg  hardcode_automatic=no
1621442a55b46Smrg  hardcode_direct=no
1621542a55b46Smrg  hardcode_direct_absolute=no
1621642a55b46Smrg  hardcode_libdir_flag_spec=
1621742a55b46Smrg  hardcode_libdir_separator=
1621842a55b46Smrg  hardcode_minus_L=no
1621942a55b46Smrg  hardcode_shlibpath_var=unsupported
1622042a55b46Smrg  inherit_rpath=no
1622142a55b46Smrg  link_all_deplibs=unknown
1622242a55b46Smrg  module_cmds=
1622342a55b46Smrg  module_expsym_cmds=
1622442a55b46Smrg  old_archive_from_new_cmds=
1622542a55b46Smrg  old_archive_from_expsyms_cmds=
1622642a55b46Smrg  thread_safe_flag_spec=
1622742a55b46Smrg  whole_archive_flag_spec=
16228c582b7e3Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
16229c582b7e3Smrg  # included in the symbol list
1623042a55b46Smrg  include_expsyms=
16231c582b7e3Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
16232e3d74329Smrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
16233e3d74329Smrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
16234e3d74329Smrg  # as well as any symbol that contains 'd'.
1623542a55b46Smrg  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
16236c582b7e3Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
16237c582b7e3Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
16238c582b7e3Smrg  # the symbol is explicitly referenced.  Since portable code cannot
16239c582b7e3Smrg  # rely on this symbol name, it's probably fine to never include it in
16240c582b7e3Smrg  # preloaded symbol tables.
1624119019ffeSmrg  # Exclude shared library initialization/finalization symbols.
16242c582b7e3Smrg  extract_expsyms_cmds=
16243c582b7e3Smrg
16244c582b7e3Smrg  case $host_os in
1624542a55b46Smrg  cygwin* | mingw* | pw32* | cegcc*)
162468ce07328Smrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
16247c582b7e3Smrg    # When not using gcc, we currently assume that we are using
162488ce07328Smrg    # Microsoft Visual C++ or Intel C++ Compiler.
16249e3d74329Smrg    if test yes != "$GCC"; then
16250c582b7e3Smrg      with_gnu_ld=no
16251c582b7e3Smrg    fi
16252c582b7e3Smrg    ;;
16253c582b7e3Smrg  interix*)
162548ce07328Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
16255c582b7e3Smrg    with_gnu_ld=yes
16256c582b7e3Smrg    ;;
16257e3d74329Smrg  openbsd* | bitrig*)
16258c582b7e3Smrg    with_gnu_ld=no
16259c582b7e3Smrg    ;;
16260c582b7e3Smrg  esac
16261c582b7e3Smrg
1626242a55b46Smrg  ld_shlibs=yes
1626342a55b46Smrg
1626442a55b46Smrg  # On some targets, GNU ld is compatible enough with the native linker
1626542a55b46Smrg  # that we're better off using the native interface for both.
1626642a55b46Smrg  lt_use_gnu_ld_interface=no
16267e3d74329Smrg  if test yes = "$with_gnu_ld"; then
1626842a55b46Smrg    case $host_os in
1626942a55b46Smrg      aix*)
1627042a55b46Smrg	# The AIX port of GNU ld has always aspired to compatibility
1627142a55b46Smrg	# with the native linker.  However, as the warning in the GNU ld
1627242a55b46Smrg	# block says, versions before 2.19.5* couldn't really create working
1627342a55b46Smrg	# shared libraries, regardless of the interface used.
1627442a55b46Smrg	case `$LD -v 2>&1` in
1627542a55b46Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
1627642a55b46Smrg	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
1627742a55b46Smrg	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
1627842a55b46Smrg	  *)
1627942a55b46Smrg	    lt_use_gnu_ld_interface=yes
1628042a55b46Smrg	    ;;
1628142a55b46Smrg	esac
1628242a55b46Smrg	;;
1628342a55b46Smrg      *)
1628442a55b46Smrg	lt_use_gnu_ld_interface=yes
1628542a55b46Smrg	;;
1628642a55b46Smrg    esac
1628742a55b46Smrg  fi
1628842a55b46Smrg
16289e3d74329Smrg  if test yes = "$lt_use_gnu_ld_interface"; then
16290c582b7e3Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
16291e3d74329Smrg    wlarc='$wl'
16292c582b7e3Smrg
16293c582b7e3Smrg    # Set some defaults for GNU ld with shared library support. These
16294c582b7e3Smrg    # are reset later if shared libraries are not supported. Putting them
16295c582b7e3Smrg    # here allows them to be overridden if necessary.
16296c582b7e3Smrg    runpath_var=LD_RUN_PATH
16297e3d74329Smrg    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
16298e3d74329Smrg    export_dynamic_flag_spec='$wl--export-dynamic'
16299c582b7e3Smrg    # ancient GNU ld didn't support --whole-archive et. al.
1630042a55b46Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
16301e3d74329Smrg      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
1630242a55b46Smrg    else
1630342a55b46Smrg      whole_archive_flag_spec=
16304c582b7e3Smrg    fi
16305c582b7e3Smrg    supports_anon_versioning=no
163068ce07328Smrg    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
1630742a55b46Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
16308c582b7e3Smrg      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
16309c582b7e3Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
16310c582b7e3Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
16311c582b7e3Smrg      *\ 2.11.*) ;; # other 2.11 versions
16312c582b7e3Smrg      *) supports_anon_versioning=yes ;;
16313c582b7e3Smrg    esac
16314c582b7e3Smrg
16315c582b7e3Smrg    # See if GNU ld supports shared libraries.
16316c582b7e3Smrg    case $host_os in
1631719019ffeSmrg    aix[3-9]*)
16318c582b7e3Smrg      # On AIX/PPC, the GNU linker is very broken
16319e3d74329Smrg      if test ia64 != "$host_cpu"; then
1632042a55b46Smrg	ld_shlibs=no
1632142a55b46Smrg	cat <<_LT_EOF 1>&2
16322c582b7e3Smrg
1632342a55b46Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
16324c582b7e3Smrg*** to be unable to reliably create shared libraries on AIX.
16325c582b7e3Smrg*** Therefore, libtool is disabling shared libraries support.  If you
1632642a55b46Smrg*** really care for shared libraries, you may want to install binutils
1632742a55b46Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
1632842a55b46Smrg*** You will then need to restart the configuration process.
16329c582b7e3Smrg
1633042a55b46Smrg_LT_EOF
16331c582b7e3Smrg      fi
16332c582b7e3Smrg      ;;
16333c582b7e3Smrg
16334c582b7e3Smrg    amigaos*)
1633542a55b46Smrg      case $host_cpu in
1633642a55b46Smrg      powerpc)
1633742a55b46Smrg            # see comment about AmigaOS4 .so support
16338e3d74329Smrg            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1633942a55b46Smrg            archive_expsym_cmds=''
1634042a55b46Smrg        ;;
1634142a55b46Smrg      m68k)
1634242a55b46Smrg            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1634342a55b46Smrg            hardcode_libdir_flag_spec='-L$libdir'
1634442a55b46Smrg            hardcode_minus_L=yes
1634542a55b46Smrg        ;;
1634642a55b46Smrg      esac
16347c582b7e3Smrg      ;;
16348c582b7e3Smrg
16349c582b7e3Smrg    beos*)
1635042a55b46Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
1635142a55b46Smrg	allow_undefined_flag=unsupported
16352c582b7e3Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
16353c582b7e3Smrg	# support --undefined.  This deserves some investigation.  FIXME
16354e3d74329Smrg	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16355c582b7e3Smrg      else
1635642a55b46Smrg	ld_shlibs=no
16357c582b7e3Smrg      fi
16358c582b7e3Smrg      ;;
16359c582b7e3Smrg
1636042a55b46Smrg    cygwin* | mingw* | pw32* | cegcc*)
1636142a55b46Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
16362c582b7e3Smrg      # as there is no search path for DLLs.
1636342a55b46Smrg      hardcode_libdir_flag_spec='-L$libdir'
16364e3d74329Smrg      export_dynamic_flag_spec='$wl--export-all-symbols'
1636542a55b46Smrg      allow_undefined_flag=unsupported
1636642a55b46Smrg      always_export_symbols=no
1636742a55b46Smrg      enable_shared_with_static_runtimes=yes
1636842a55b46Smrg      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
1636942a55b46Smrg      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
1637042a55b46Smrg
1637142a55b46Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
16372e3d74329Smrg        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
16373e3d74329Smrg	# If the export-symbols file already is a .def file, use it as
16374e3d74329Smrg	# is; otherwise, prepend EXPORTS...
16375e3d74329Smrg	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
16376e3d74329Smrg          cp $export_symbols $output_objdir/$soname.def;
16377e3d74329Smrg        else
16378e3d74329Smrg          echo EXPORTS > $output_objdir/$soname.def;
16379e3d74329Smrg          cat $export_symbols >> $output_objdir/$soname.def;
16380e3d74329Smrg        fi~
16381e3d74329Smrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
16382c582b7e3Smrg      else
1638342a55b46Smrg	ld_shlibs=no
16384c582b7e3Smrg      fi
16385c582b7e3Smrg      ;;
16386c582b7e3Smrg
1638742a55b46Smrg    haiku*)
16388e3d74329Smrg      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1638942a55b46Smrg      link_all_deplibs=yes
1639042a55b46Smrg      ;;
1639142a55b46Smrg
16392e3d74329Smrg    os2*)
16393e3d74329Smrg      hardcode_libdir_flag_spec='-L$libdir'
16394e3d74329Smrg      hardcode_minus_L=yes
16395e3d74329Smrg      allow_undefined_flag=unsupported
16396e3d74329Smrg      shrext_cmds=.dll
16397e3d74329Smrg      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
16398e3d74329Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
16399e3d74329Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
16400e3d74329Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
16401e3d74329Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
16402e3d74329Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
16403e3d74329Smrg	emximp -o $lib $output_objdir/$libname.def'
16404e3d74329Smrg      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
16405e3d74329Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
16406e3d74329Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
16407e3d74329Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
16408e3d74329Smrg	prefix_cmds="$SED"~
16409e3d74329Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
16410e3d74329Smrg	  prefix_cmds="$prefix_cmds -e 1d";
16411e3d74329Smrg	fi~
16412e3d74329Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
16413e3d74329Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
16414e3d74329Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
16415e3d74329Smrg	emximp -o $lib $output_objdir/$libname.def'
16416e3d74329Smrg      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
16417e3d74329Smrg      enable_shared_with_static_runtimes=yes
164188ce07328Smrg      file_list_spec='@'
16419e3d74329Smrg      ;;
16420e3d74329Smrg
16421c582b7e3Smrg    interix[3-9]*)
1642242a55b46Smrg      hardcode_direct=no
1642342a55b46Smrg      hardcode_shlibpath_var=no
16424e3d74329Smrg      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
16425e3d74329Smrg      export_dynamic_flag_spec='$wl-E'
16426c582b7e3Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
16427c582b7e3Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
16428c582b7e3Smrg      # default) and relocated if they conflict, which is a slow very memory
16429c582b7e3Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
16430c582b7e3Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
16431c582b7e3Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
16432e3d74329Smrg      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
164338ce07328Smrg      archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
16434c582b7e3Smrg      ;;
16435c582b7e3Smrg
1643642a55b46Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
1643742a55b46Smrg      tmp_diet=no
16438e3d74329Smrg      if test linux-dietlibc = "$host_os"; then
1643942a55b46Smrg	case $cc_basename in
1644042a55b46Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
1644142a55b46Smrg	esac
1644242a55b46Smrg      fi
1644342a55b46Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
16444e3d74329Smrg	 && test no = "$tmp_diet"
1644542a55b46Smrg      then
1644642a55b46Smrg	tmp_addflag=' $pic_flag'
1644742a55b46Smrg	tmp_sharedflag='-shared'
16448c582b7e3Smrg	case $cc_basename,$host_cpu in
1644942a55b46Smrg        pgcc*)				# Portland Group C compiler
16450e3d74329Smrg	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
16451c582b7e3Smrg	  tmp_addflag=' $pic_flag'
16452c582b7e3Smrg	  ;;
1645342a55b46Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
1645442a55b46Smrg					# Portland Group f77 and f90 compilers
16455e3d74329Smrg	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
16456c582b7e3Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
1645742a55b46Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
16458c582b7e3Smrg	  tmp_addflag=' -i_dynamic' ;;
16459c582b7e3Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
16460c582b7e3Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
16461c582b7e3Smrg	ifc* | ifort*)			# Intel Fortran compiler
16462c582b7e3Smrg	  tmp_addflag=' -nofor_main' ;;
1646342a55b46Smrg	lf95*)				# Lahey Fortran 8.1
1646442a55b46Smrg	  whole_archive_flag_spec=
1646542a55b46Smrg	  tmp_sharedflag='--shared' ;;
16466e3d74329Smrg        nagfor*)                        # NAGFOR 5.3
16467e3d74329Smrg          tmp_sharedflag='-Wl,-shared' ;;
1646842a55b46Smrg	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
1646942a55b46Smrg	  tmp_sharedflag='-qmkshrobj'
1647042a55b46Smrg	  tmp_addflag= ;;
1647142a55b46Smrg	nvcc*)	# Cuda Compiler Driver 2.2
16472e3d74329Smrg	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
1647342a55b46Smrg	  compiler_needs_object=yes
1647442a55b46Smrg	  ;;
16475c582b7e3Smrg	esac
164768ce07328Smrg	case `$CC -V 2>&1 | $SED 5q` in
16477c582b7e3Smrg	*Sun\ C*)			# Sun C 5.9
16478e3d74329Smrg	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
1647942a55b46Smrg	  compiler_needs_object=yes
16480c582b7e3Smrg	  tmp_sharedflag='-G' ;;
16481c582b7e3Smrg	*Sun\ F*)			# Sun Fortran 8.3
16482c582b7e3Smrg	  tmp_sharedflag='-G' ;;
16483c582b7e3Smrg	esac
16484e3d74329Smrg	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16485c582b7e3Smrg
16486e3d74329Smrg        if test yes = "$supports_anon_versioning"; then
1648742a55b46Smrg          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
164888ce07328Smrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
16489e3d74329Smrg            echo "local: *; };" >> $output_objdir/$libname.ver~
16490e3d74329Smrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
1649142a55b46Smrg        fi
1649242a55b46Smrg
1649342a55b46Smrg	case $cc_basename in
16494e3d74329Smrg	tcc*)
16495e3d74329Smrg	  export_dynamic_flag_spec='-rdynamic'
16496e3d74329Smrg	  ;;
1649742a55b46Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
1649842a55b46Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
1649942a55b46Smrg	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
16500e3d74329Smrg	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1650142a55b46Smrg	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
16502e3d74329Smrg	  if test yes = "$supports_anon_versioning"; then
1650342a55b46Smrg	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
165048ce07328Smrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
16505e3d74329Smrg              echo "local: *; };" >> $output_objdir/$libname.ver~
16506e3d74329Smrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
1650742a55b46Smrg	  fi
1650842a55b46Smrg	  ;;
1650942a55b46Smrg	esac
16510c582b7e3Smrg      else
1651142a55b46Smrg        ld_shlibs=no
16512c582b7e3Smrg      fi
16513c582b7e3Smrg      ;;
16514c582b7e3Smrg
165158ce07328Smrg    netbsd*)
1651642a55b46Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1651742a55b46Smrg	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
16518c582b7e3Smrg	wlarc=
16519c582b7e3Smrg      else
16520e3d74329Smrg	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16521e3d74329Smrg	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16522c582b7e3Smrg      fi
16523c582b7e3Smrg      ;;
16524c582b7e3Smrg
16525c582b7e3Smrg    solaris*)
1652642a55b46Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
1652742a55b46Smrg	ld_shlibs=no
1652842a55b46Smrg	cat <<_LT_EOF 1>&2
16529c582b7e3Smrg
16530c582b7e3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
16531c582b7e3Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
16532c582b7e3Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
16533c582b7e3Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
16534c582b7e3Smrg*** your PATH or compiler configuration so that the native linker is
16535c582b7e3Smrg*** used, and then restart.
16536c582b7e3Smrg
1653742a55b46Smrg_LT_EOF
1653842a55b46Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
16539e3d74329Smrg	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16540e3d74329Smrg	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16541c582b7e3Smrg      else
1654242a55b46Smrg	ld_shlibs=no
16543c582b7e3Smrg      fi
16544c582b7e3Smrg      ;;
16545c582b7e3Smrg
16546c582b7e3Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
16547c582b7e3Smrg      case `$LD -v 2>&1` in
16548c582b7e3Smrg        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
1654942a55b46Smrg	ld_shlibs=no
16550c582b7e3Smrg	cat <<_LT_EOF 1>&2
16551c582b7e3Smrg
16552e3d74329Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
16553c582b7e3Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
16554c582b7e3Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
16555c582b7e3Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
16556c582b7e3Smrg*** your PATH or compiler configuration so that the native linker is
16557c582b7e3Smrg*** used, and then restart.
16558c582b7e3Smrg
16559c582b7e3Smrg_LT_EOF
16560c582b7e3Smrg	;;
16561c582b7e3Smrg	*)
1656242a55b46Smrg	  # For security reasons, it is highly recommended that you always
1656342a55b46Smrg	  # use absolute paths for naming shared libraries, and exclude the
1656442a55b46Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
1656542a55b46Smrg	  # requires that you compile everything twice, which is a pain.
1656642a55b46Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
16567e3d74329Smrg	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
16568e3d74329Smrg	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16569e3d74329Smrg	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16570c582b7e3Smrg	  else
1657142a55b46Smrg	    ld_shlibs=no
16572c582b7e3Smrg	  fi
16573c582b7e3Smrg	;;
16574c582b7e3Smrg      esac
16575c582b7e3Smrg      ;;
16576c582b7e3Smrg
16577c582b7e3Smrg    sunos4*)
1657842a55b46Smrg      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
16579c582b7e3Smrg      wlarc=
1658042a55b46Smrg      hardcode_direct=yes
1658142a55b46Smrg      hardcode_shlibpath_var=no
16582c582b7e3Smrg      ;;
16583c582b7e3Smrg
16584c582b7e3Smrg    *)
1658542a55b46Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
16586e3d74329Smrg	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
16587e3d74329Smrg	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
16588c582b7e3Smrg      else
1658942a55b46Smrg	ld_shlibs=no
16590c582b7e3Smrg      fi
16591c582b7e3Smrg      ;;
16592c582b7e3Smrg    esac
16593c582b7e3Smrg
16594e3d74329Smrg    if test no = "$ld_shlibs"; then
16595c582b7e3Smrg      runpath_var=
1659642a55b46Smrg      hardcode_libdir_flag_spec=
1659742a55b46Smrg      export_dynamic_flag_spec=
1659842a55b46Smrg      whole_archive_flag_spec=
16599c582b7e3Smrg    fi
16600c582b7e3Smrg  else
16601c582b7e3Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
16602c582b7e3Smrg    case $host_os in
16603c582b7e3Smrg    aix3*)
1660442a55b46Smrg      allow_undefined_flag=unsupported
1660542a55b46Smrg      always_export_symbols=yes
1660642a55b46Smrg      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
16607c582b7e3Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
16608c582b7e3Smrg      # are no directories specified by -L.
1660942a55b46Smrg      hardcode_minus_L=yes
16610e3d74329Smrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
16611c582b7e3Smrg	# Neither direct hardcoding nor static linking is supported with a
16612c582b7e3Smrg	# broken collect2.
1661342a55b46Smrg	hardcode_direct=unsupported
16614c582b7e3Smrg      fi
16615c582b7e3Smrg      ;;
16616c582b7e3Smrg
1661719019ffeSmrg    aix[4-9]*)
16618e3d74329Smrg      if test ia64 = "$host_cpu"; then
16619c582b7e3Smrg	# On IA64, the linker does run time linking by default, so we don't
16620c582b7e3Smrg	# have to do anything special.
16621c582b7e3Smrg	aix_use_runtimelinking=no
16622c582b7e3Smrg	exp_sym_flag='-Bexport'
16623e3d74329Smrg	no_entry_flag=
16624c582b7e3Smrg      else
16625c582b7e3Smrg	# If we're using GNU nm, then we don't want the "-C" option.
16626e3d74329Smrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
16627e3d74329Smrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
16628e3d74329Smrg	# weak defined symbols like other global defined symbols, whereas
16629e3d74329Smrg	# GNU nm marks them as "W".
16630e3d74329Smrg	# While the 'weak' keyword is ignored in the Export File, we need
16631e3d74329Smrg	# it in the Import File for the 'aix-soname' feature, so we have
16632e3d74329Smrg	# to replace the "-B" option with "-P" for AIX nm.
1663342a55b46Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
16634e3d74329Smrg	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
16635c582b7e3Smrg	else
166368ce07328Smrg	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
16637c582b7e3Smrg	fi
16638c582b7e3Smrg	aix_use_runtimelinking=no
16639c582b7e3Smrg
16640c582b7e3Smrg	# Test if we are trying to use run time linking or normal
16641c582b7e3Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
16642e3d74329Smrg	# have runtime linking enabled, and use it for executables.
16643e3d74329Smrg	# For shared libraries, we enable/disable runtime linking
16644e3d74329Smrg	# depending on the kind of the shared library created -
16645e3d74329Smrg	# when "with_aix_soname,aix_use_runtimelinking" is:
16646e3d74329Smrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
16647e3d74329Smrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
16648e3d74329Smrg	#            lib.a           static archive
16649e3d74329Smrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
16650e3d74329Smrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
16651e3d74329Smrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
16652e3d74329Smrg	#            lib.a(lib.so.V) shared, rtl:no
16653e3d74329Smrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
16654e3d74329Smrg	#            lib.a           static archive
1665519019ffeSmrg	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
16656c582b7e3Smrg	  for ld_flag in $LDFLAGS; do
16657e3d74329Smrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
1665842a55b46Smrg	    aix_use_runtimelinking=yes
1665942a55b46Smrg	    break
1666042a55b46Smrg	  fi
16661c582b7e3Smrg	  done
16662e3d74329Smrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
16663e3d74329Smrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
16664e3d74329Smrg	    # so we don't have lib.a shared libs to link our executables.
16665e3d74329Smrg	    # We have to force runtime linking in this case.
16666e3d74329Smrg	    aix_use_runtimelinking=yes
16667e3d74329Smrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
16668e3d74329Smrg	  fi
16669c582b7e3Smrg	  ;;
16670c582b7e3Smrg	esac
16671c582b7e3Smrg
16672c582b7e3Smrg	exp_sym_flag='-bexport'
16673c582b7e3Smrg	no_entry_flag='-bnoentry'
16674c582b7e3Smrg      fi
16675c582b7e3Smrg
16676c582b7e3Smrg      # When large executables or shared objects are built, AIX ld can
16677c582b7e3Smrg      # have problems creating the table of contents.  If linking a library
16678c582b7e3Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
16679c582b7e3Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
16680c582b7e3Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
16681c582b7e3Smrg
1668242a55b46Smrg      archive_cmds=''
1668342a55b46Smrg      hardcode_direct=yes
1668442a55b46Smrg      hardcode_direct_absolute=yes
1668542a55b46Smrg      hardcode_libdir_separator=':'
1668642a55b46Smrg      link_all_deplibs=yes
16687e3d74329Smrg      file_list_spec='$wl-f,'
16688e3d74329Smrg      case $with_aix_soname,$aix_use_runtimelinking in
16689e3d74329Smrg      aix,*) ;; # traditional, no import file
16690e3d74329Smrg      svr4,* | *,yes) # use import file
16691e3d74329Smrg	# The Import File defines what to hardcode.
16692e3d74329Smrg	hardcode_direct=no
16693e3d74329Smrg	hardcode_direct_absolute=no
16694e3d74329Smrg	;;
16695e3d74329Smrg      esac
16696c582b7e3Smrg
16697e3d74329Smrg      if test yes = "$GCC"; then
16698c582b7e3Smrg	case $host_os in aix4.[012]|aix4.[012].*)
16699c582b7e3Smrg	# We only want to do this on AIX 4.2 and lower, the check
16700c582b7e3Smrg	# below for broken collect2 doesn't work under 4.3+
16701e3d74329Smrg	  collect2name=`$CC -print-prog-name=collect2`
1670242a55b46Smrg	  if test -f "$collect2name" &&
1670342a55b46Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
16704c582b7e3Smrg	  then
1670542a55b46Smrg	  # We have reworked collect2
1670642a55b46Smrg	  :
16707c582b7e3Smrg	  else
1670842a55b46Smrg	  # We have old collect2
1670942a55b46Smrg	  hardcode_direct=unsupported
1671042a55b46Smrg	  # It fails to find uninstalled libraries when the uninstalled
1671142a55b46Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
1671242a55b46Smrg	  # to unsupported forces relinking
1671342a55b46Smrg	  hardcode_minus_L=yes
1671442a55b46Smrg	  hardcode_libdir_flag_spec='-L$libdir'
1671542a55b46Smrg	  hardcode_libdir_separator=
16716c582b7e3Smrg	  fi
16717c582b7e3Smrg	  ;;
16718c582b7e3Smrg	esac
16719c582b7e3Smrg	shared_flag='-shared'
16720e3d74329Smrg	if test yes = "$aix_use_runtimelinking"; then
16721e3d74329Smrg	  shared_flag="$shared_flag "'$wl-G'
16722c582b7e3Smrg	fi
16723e3d74329Smrg	# Need to ensure runtime linking is disabled for the traditional
16724e3d74329Smrg	# shared library, or the linker may eventually find shared libraries
16725e3d74329Smrg	# /with/ Import File - we do not want to mix them.
16726e3d74329Smrg	shared_flag_aix='-shared'
16727e3d74329Smrg	shared_flag_svr4='-shared $wl-G'
16728c582b7e3Smrg      else
16729c582b7e3Smrg	# not using gcc
16730e3d74329Smrg	if test ia64 = "$host_cpu"; then
1673142a55b46Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
1673242a55b46Smrg	# chokes on -Wl,-G. The following line is correct:
16733c582b7e3Smrg	  shared_flag='-G'
16734c582b7e3Smrg	else
16735e3d74329Smrg	  if test yes = "$aix_use_runtimelinking"; then
16736e3d74329Smrg	    shared_flag='$wl-G'
16737c582b7e3Smrg	  else
16738e3d74329Smrg	    shared_flag='$wl-bM:SRE'
16739c582b7e3Smrg	  fi
16740e3d74329Smrg	  shared_flag_aix='$wl-bM:SRE'
16741e3d74329Smrg	  shared_flag_svr4='$wl-G'
16742c582b7e3Smrg	fi
16743c582b7e3Smrg      fi
16744c582b7e3Smrg
16745e3d74329Smrg      export_dynamic_flag_spec='$wl-bexpall'
16746c582b7e3Smrg      # It seems that -bexpall does not export symbols beginning with
16747c582b7e3Smrg      # underscore (_), so it is better to generate a list of symbols to export.
1674842a55b46Smrg      always_export_symbols=yes
16749e3d74329Smrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
16750c582b7e3Smrg	# Warning - without using the other runtime loading flags (-brtl),
16751c582b7e3Smrg	# -berok will link without error, but may produce a broken library.
1675242a55b46Smrg	allow_undefined_flag='-berok'
1675342a55b46Smrg        # Determine the default libpath from the value encoded in an
1675442a55b46Smrg        # empty executable.
16755e3d74329Smrg        if test set = "${lt_cv_aix_libpath+set}"; then
1675642a55b46Smrg  aix_libpath=$lt_cv_aix_libpath
1675742a55b46Smrgelse
167588ce07328Smrg  if test ${lt_cv_aix_libpath_+y}
167598ce07328Smrgthen :
167608ce07328Smrg  printf %s "(cached) " >&6
167618ce07328Smrgelse $as_nop
1676242a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16763c582b7e3Smrg/* end confdefs.h.  */
16764c582b7e3Smrg
16765c582b7e3Smrgint
167668ce07328Smrgmain (void)
16767c582b7e3Smrg{
16768c582b7e3Smrg
16769c582b7e3Smrg  ;
16770c582b7e3Smrg  return 0;
16771c582b7e3Smrg}
16772c582b7e3Smrg_ACEOF
167738ce07328Smrgif ac_fn_c_try_link "$LINENO"
167748ce07328Smrgthen :
16775c582b7e3Smrg
1677642a55b46Smrg  lt_aix_libpath_sed='
1677742a55b46Smrg      /Import File Strings/,/^$/ {
1677842a55b46Smrg	  /^0/ {
1677942a55b46Smrg	      s/^0  *\([^ ]*\) *$/\1/
1678042a55b46Smrg	      p
1678142a55b46Smrg	  }
1678242a55b46Smrg      }'
1678342a55b46Smrg  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1678442a55b46Smrg  # Check for a 64-bit object if we didn't find anything.
1678542a55b46Smrg  if test -z "$lt_cv_aix_libpath_"; then
1678642a55b46Smrg    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1678742a55b46Smrg  fi
16788c582b7e3Smrgfi
167898ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1679042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1679142a55b46Smrg  if test -z "$lt_cv_aix_libpath_"; then
16792e3d74329Smrg    lt_cv_aix_libpath_=/usr/lib:/lib
1679342a55b46Smrg  fi
16794c582b7e3Smrg
16795c582b7e3Smrgfi
16796c582b7e3Smrg
1679742a55b46Smrg  aix_libpath=$lt_cv_aix_libpath_
1679842a55b46Smrgfi
16799c582b7e3Smrg
16800e3d74329Smrg        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
16801e3d74329Smrg        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
1680242a55b46Smrg      else
16803e3d74329Smrg	if test ia64 = "$host_cpu"; then
16804e3d74329Smrg	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
1680542a55b46Smrg	  allow_undefined_flag="-z nodefs"
16806e3d74329Smrg	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
16807c582b7e3Smrg	else
1680842a55b46Smrg	 # Determine the default libpath from the value encoded in an
1680942a55b46Smrg	 # empty executable.
16810e3d74329Smrg	 if test set = "${lt_cv_aix_libpath+set}"; then
1681142a55b46Smrg  aix_libpath=$lt_cv_aix_libpath
1681242a55b46Smrgelse
168138ce07328Smrg  if test ${lt_cv_aix_libpath_+y}
168148ce07328Smrgthen :
168158ce07328Smrg  printf %s "(cached) " >&6
168168ce07328Smrgelse $as_nop
1681742a55b46Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16818c582b7e3Smrg/* end confdefs.h.  */
16819c582b7e3Smrg
16820c582b7e3Smrgint
168218ce07328Smrgmain (void)
16822c582b7e3Smrg{
16823c582b7e3Smrg
16824c582b7e3Smrg  ;
16825c582b7e3Smrg  return 0;
1682642a55b46Smrg}
1682742a55b46Smrg_ACEOF
168288ce07328Smrgif ac_fn_c_try_link "$LINENO"
168298ce07328Smrgthen :
16830c582b7e3Smrg
1683142a55b46Smrg  lt_aix_libpath_sed='
1683242a55b46Smrg      /Import File Strings/,/^$/ {
1683342a55b46Smrg	  /^0/ {
1683442a55b46Smrg	      s/^0  *\([^ ]*\) *$/\1/
1683542a55b46Smrg	      p
1683642a55b46Smrg	  }
1683742a55b46Smrg      }'
1683842a55b46Smrg  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1683942a55b46Smrg  # Check for a 64-bit object if we didn't find anything.
1684042a55b46Smrg  if test -z "$lt_cv_aix_libpath_"; then
1684142a55b46Smrg    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1684242a55b46Smrg  fi
16843c582b7e3Smrgfi
168448ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1684542a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1684642a55b46Smrg  if test -z "$lt_cv_aix_libpath_"; then
16847e3d74329Smrg    lt_cv_aix_libpath_=/usr/lib:/lib
1684842a55b46Smrg  fi
16849c582b7e3Smrg
16850c582b7e3Smrgfi
16851c582b7e3Smrg
1685242a55b46Smrg  aix_libpath=$lt_cv_aix_libpath_
1685342a55b46Smrgfi
16854c582b7e3Smrg
16855e3d74329Smrg	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
16856c582b7e3Smrg	  # Warning - without using the other run time loading flags,
16857c582b7e3Smrg	  # -berok will link without error, but may produce a broken library.
16858e3d74329Smrg	  no_undefined_flag=' $wl-bernotok'
16859e3d74329Smrg	  allow_undefined_flag=' $wl-berok'
16860e3d74329Smrg	  if test yes = "$with_gnu_ld"; then
1686142a55b46Smrg	    # We only use this code for GNU lds that support --whole-archive.
16862e3d74329Smrg	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
1686342a55b46Smrg	  else
1686442a55b46Smrg	    # Exported symbols can be pulled into shared objects from archives
1686542a55b46Smrg	    whole_archive_flag_spec='$convenience'
1686642a55b46Smrg	  fi
1686742a55b46Smrg	  archive_cmds_need_lc=yes
16868e3d74329Smrg	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
16869e3d74329Smrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
16870e3d74329Smrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
16871e3d74329Smrg	  if test svr4 != "$with_aix_soname"; then
16872e3d74329Smrg	    # This is similar to how AIX traditionally builds its shared libraries.
16873e3d74329Smrg	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
16874e3d74329Smrg	  fi
16875e3d74329Smrg	  if test aix != "$with_aix_soname"; then
16876e3d74329Smrg	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
16877e3d74329Smrg	  else
16878e3d74329Smrg	    # used by -dlpreopen to get the symbols
16879e3d74329Smrg	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
16880e3d74329Smrg	  fi
16881e3d74329Smrg	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
16882c582b7e3Smrg	fi
16883c582b7e3Smrg      fi
16884c582b7e3Smrg      ;;
16885c582b7e3Smrg
16886c582b7e3Smrg    amigaos*)
1688742a55b46Smrg      case $host_cpu in
1688842a55b46Smrg      powerpc)
1688942a55b46Smrg            # see comment about AmigaOS4 .so support
16890e3d74329Smrg            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1689142a55b46Smrg            archive_expsym_cmds=''
1689242a55b46Smrg        ;;
1689342a55b46Smrg      m68k)
1689442a55b46Smrg            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1689542a55b46Smrg            hardcode_libdir_flag_spec='-L$libdir'
1689642a55b46Smrg            hardcode_minus_L=yes
1689742a55b46Smrg        ;;
1689842a55b46Smrg      esac
16899c582b7e3Smrg      ;;
16900c582b7e3Smrg
16901c582b7e3Smrg    bsdi[45]*)
1690242a55b46Smrg      export_dynamic_flag_spec=-rdynamic
16903c582b7e3Smrg      ;;
16904c582b7e3Smrg
1690542a55b46Smrg    cygwin* | mingw* | pw32* | cegcc*)
16906c582b7e3Smrg      # When not using gcc, we currently assume that we are using
169078ce07328Smrg      # Microsoft Visual C++ or Intel C++ Compiler.
16908c582b7e3Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
16909c582b7e3Smrg      # no search path for DLLs.
16910c582b7e3Smrg      case $cc_basename in
169118ce07328Smrg      cl* | icl*)
169128ce07328Smrg	# Native MSVC or ICC
1691342a55b46Smrg	hardcode_libdir_flag_spec=' '
1691442a55b46Smrg	allow_undefined_flag=unsupported
1691542a55b46Smrg	always_export_symbols=yes
1691642a55b46Smrg	file_list_spec='@'
1691742a55b46Smrg	# Tell ltmain to make .lib files, not .a files.
1691842a55b46Smrg	libext=lib
1691942a55b46Smrg	# Tell ltmain to make .dll files, not .so files.
16920e3d74329Smrg	shrext_cmds=.dll
1692142a55b46Smrg	# FIXME: Setting linknames here is a bad hack.
16922e3d74329Smrg	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
16923e3d74329Smrg	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
16924e3d74329Smrg            cp "$export_symbols" "$output_objdir/$soname.def";
16925e3d74329Smrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
16926e3d74329Smrg          else
16927e3d74329Smrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
16928e3d74329Smrg          fi~
16929e3d74329Smrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
16930e3d74329Smrg          linknames='
1693142a55b46Smrg	# The linker will not automatically build a static lib if we build a DLL.
1693242a55b46Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
1693342a55b46Smrg	enable_shared_with_static_runtimes=yes
1693442a55b46Smrg	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
1693542a55b46Smrg	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
1693642a55b46Smrg	# Don't use ranlib
1693742a55b46Smrg	old_postinstall_cmds='chmod 644 $oldlib'
1693842a55b46Smrg	postlink_cmds='lt_outputfile="@OUTPUT@"~
16939e3d74329Smrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
16940e3d74329Smrg          case $lt_outputfile in
16941e3d74329Smrg            *.exe|*.EXE) ;;
16942e3d74329Smrg            *)
16943e3d74329Smrg              lt_outputfile=$lt_outputfile.exe
16944e3d74329Smrg              lt_tool_outputfile=$lt_tool_outputfile.exe
16945e3d74329Smrg              ;;
16946e3d74329Smrg          esac~
16947e3d74329Smrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
16948e3d74329Smrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
16949e3d74329Smrg            $RM "$lt_outputfile.manifest";
16950e3d74329Smrg          fi'
1695142a55b46Smrg	;;
1695242a55b46Smrg      *)
169538ce07328Smrg	# Assume MSVC and ICC wrapper
1695442a55b46Smrg	hardcode_libdir_flag_spec=' '
1695542a55b46Smrg	allow_undefined_flag=unsupported
1695642a55b46Smrg	# Tell ltmain to make .lib files, not .a files.
1695742a55b46Smrg	libext=lib
1695842a55b46Smrg	# Tell ltmain to make .dll files, not .so files.
16959e3d74329Smrg	shrext_cmds=.dll
1696042a55b46Smrg	# FIXME: Setting linknames here is a bad hack.
1696142a55b46Smrg	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
1696242a55b46Smrg	# The linker will automatically build a .lib file if we build a DLL.
1696342a55b46Smrg	old_archive_from_new_cmds='true'
1696442a55b46Smrg	# FIXME: Should let the user specify the lib program.
1696542a55b46Smrg	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
1696642a55b46Smrg	enable_shared_with_static_runtimes=yes
1696742a55b46Smrg	;;
16968c582b7e3Smrg      esac
16969c582b7e3Smrg      ;;
16970c582b7e3Smrg
1697142a55b46Smrg    darwin* | rhapsody*)
1697242a55b46Smrg
1697342a55b46Smrg
1697442a55b46Smrg  archive_cmds_need_lc=no
1697542a55b46Smrg  hardcode_direct=no
1697642a55b46Smrg  hardcode_automatic=yes
1697742a55b46Smrg  hardcode_shlibpath_var=unsupported
16978e3d74329Smrg  if test yes = "$lt_cv_ld_force_load"; then
16979e3d74329Smrg    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1698042a55b46Smrg
1698142a55b46Smrg  else
1698242a55b46Smrg    whole_archive_flag_spec=''
1698342a55b46Smrg  fi
1698442a55b46Smrg  link_all_deplibs=yes
16985e3d74329Smrg  allow_undefined_flag=$_lt_dar_allow_undefined
1698642a55b46Smrg  case $cc_basename in
16987e3d74329Smrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1698842a55b46Smrg     *) _lt_dar_can_shared=$GCC ;;
1698942a55b46Smrg  esac
16990e3d74329Smrg  if test yes = "$_lt_dar_can_shared"; then
1699142a55b46Smrg    output_verbose_link_cmd=func_echo_all
16992e3d74329Smrg    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
16993e3d74329Smrg    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
169948ce07328Smrg    archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
169958ce07328Smrg    module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
1699642a55b46Smrg
1699742a55b46Smrg  else
1699842a55b46Smrg  ld_shlibs=no
1699942a55b46Smrg  fi
1700042a55b46Smrg
17001c582b7e3Smrg      ;;
17002c582b7e3Smrg
1700342a55b46Smrg    dgux*)
1700442a55b46Smrg      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1700542a55b46Smrg      hardcode_libdir_flag_spec='-L$libdir'
1700642a55b46Smrg      hardcode_shlibpath_var=no
17007c582b7e3Smrg      ;;
17008c582b7e3Smrg
17009c582b7e3Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17010c582b7e3Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
17011c582b7e3Smrg    # does not break anything, and helps significantly (at the cost of a little
17012c582b7e3Smrg    # extra space).
17013c582b7e3Smrg    freebsd2.2*)
1701442a55b46Smrg      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1701542a55b46Smrg      hardcode_libdir_flag_spec='-R$libdir'
1701642a55b46Smrg      hardcode_direct=yes
1701742a55b46Smrg      hardcode_shlibpath_var=no
17018c582b7e3Smrg      ;;
17019c582b7e3Smrg
17020c582b7e3Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1702142a55b46Smrg    freebsd2.*)
1702242a55b46Smrg      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1702342a55b46Smrg      hardcode_direct=yes
1702442a55b46Smrg      hardcode_minus_L=yes
1702542a55b46Smrg      hardcode_shlibpath_var=no
17026c582b7e3Smrg      ;;
17027c582b7e3Smrg
17028c582b7e3Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
170298ce07328Smrg    freebsd* | dragonfly* | midnightbsd*)
1703042a55b46Smrg      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
1703142a55b46Smrg      hardcode_libdir_flag_spec='-R$libdir'
1703242a55b46Smrg      hardcode_direct=yes
1703342a55b46Smrg      hardcode_shlibpath_var=no
17034c582b7e3Smrg      ;;
17035c582b7e3Smrg
17036c582b7e3Smrg    hpux9*)
17037e3d74329Smrg      if test yes = "$GCC"; then
17038e3d74329Smrg	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17039c582b7e3Smrg      else
17040e3d74329Smrg	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
17041c582b7e3Smrg      fi
17042e3d74329Smrg      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1704342a55b46Smrg      hardcode_libdir_separator=:
1704442a55b46Smrg      hardcode_direct=yes
17045c582b7e3Smrg
17046c582b7e3Smrg      # hardcode_minus_L: Not really in the search PATH,
17047c582b7e3Smrg      # but as the default location of the library.
1704842a55b46Smrg      hardcode_minus_L=yes
17049e3d74329Smrg      export_dynamic_flag_spec='$wl-E'
17050c582b7e3Smrg      ;;
17051c582b7e3Smrg
17052c582b7e3Smrg    hpux10*)
17053e3d74329Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
17054e3d74329Smrg	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17055c582b7e3Smrg      else
1705642a55b46Smrg	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17057c582b7e3Smrg      fi
17058e3d74329Smrg      if test no = "$with_gnu_ld"; then
17059e3d74329Smrg	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1706042a55b46Smrg	hardcode_libdir_separator=:
1706142a55b46Smrg	hardcode_direct=yes
1706242a55b46Smrg	hardcode_direct_absolute=yes
17063e3d74329Smrg	export_dynamic_flag_spec='$wl-E'
17064c582b7e3Smrg	# hardcode_minus_L: Not really in the search PATH,
17065c582b7e3Smrg	# but as the default location of the library.
1706642a55b46Smrg	hardcode_minus_L=yes
17067c582b7e3Smrg      fi
17068c582b7e3Smrg      ;;
17069c582b7e3Smrg
17070c582b7e3Smrg    hpux11*)
17071e3d74329Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
17072c582b7e3Smrg	case $host_cpu in
17073c582b7e3Smrg	hppa*64*)
17074e3d74329Smrg	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
17075c582b7e3Smrg	  ;;
17076c582b7e3Smrg	ia64*)
17077e3d74329Smrg	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17078c582b7e3Smrg	  ;;
17079c582b7e3Smrg	*)
17080e3d74329Smrg	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17081c582b7e3Smrg	  ;;
17082c582b7e3Smrg	esac
17083c582b7e3Smrg      else
17084c582b7e3Smrg	case $host_cpu in
17085c582b7e3Smrg	hppa*64*)
17086e3d74329Smrg	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
17087c582b7e3Smrg	  ;;
17088c582b7e3Smrg	ia64*)
17089e3d74329Smrg	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17090c582b7e3Smrg	  ;;
17091c582b7e3Smrg	*)
1709242a55b46Smrg
1709342a55b46Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
1709442a55b46Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
170958ce07328Smrg	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
170968ce07328Smrgprintf %s "checking if $CC understands -b... " >&6; }
170978ce07328Smrgif test ${lt_cv_prog_compiler__b+y}
170988ce07328Smrgthen :
170998ce07328Smrg  printf %s "(cached) " >&6
171008ce07328Smrgelse $as_nop
1710142a55b46Smrg  lt_cv_prog_compiler__b=no
17102e3d74329Smrg   save_LDFLAGS=$LDFLAGS
1710342a55b46Smrg   LDFLAGS="$LDFLAGS -b"
1710442a55b46Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1710542a55b46Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1710642a55b46Smrg     # The linker can only warn and ignore the option if not recognized
1710742a55b46Smrg     # So say no if there are warnings
1710842a55b46Smrg     if test -s conftest.err; then
1710942a55b46Smrg       # Append any errors to the config.log.
1711042a55b46Smrg       cat conftest.err 1>&5
1711142a55b46Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1711242a55b46Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1711342a55b46Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
1711442a55b46Smrg         lt_cv_prog_compiler__b=yes
1711542a55b46Smrg       fi
1711642a55b46Smrg     else
1711742a55b46Smrg       lt_cv_prog_compiler__b=yes
1711842a55b46Smrg     fi
1711942a55b46Smrg   fi
1712042a55b46Smrg   $RM -r conftest*
17121e3d74329Smrg   LDFLAGS=$save_LDFLAGS
1712242a55b46Smrg
1712342a55b46Smrgfi
171248ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
171258ce07328Smrgprintf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
1712642a55b46Smrg
17127e3d74329Smrgif test yes = "$lt_cv_prog_compiler__b"; then
17128e3d74329Smrg    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1712942a55b46Smrgelse
1713042a55b46Smrg    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
1713142a55b46Smrgfi
1713242a55b46Smrg
17133c582b7e3Smrg	  ;;
17134c582b7e3Smrg	esac
17135c582b7e3Smrg      fi
17136e3d74329Smrg      if test no = "$with_gnu_ld"; then
17137e3d74329Smrg	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1713842a55b46Smrg	hardcode_libdir_separator=:
17139c582b7e3Smrg
17140c582b7e3Smrg	case $host_cpu in
17141c582b7e3Smrg	hppa*64*|ia64*)
1714242a55b46Smrg	  hardcode_direct=no
1714342a55b46Smrg	  hardcode_shlibpath_var=no
17144c582b7e3Smrg	  ;;
17145c582b7e3Smrg	*)
1714642a55b46Smrg	  hardcode_direct=yes
1714742a55b46Smrg	  hardcode_direct_absolute=yes
17148e3d74329Smrg	  export_dynamic_flag_spec='$wl-E'
17149c582b7e3Smrg
17150c582b7e3Smrg	  # hardcode_minus_L: Not really in the search PATH,
17151c582b7e3Smrg	  # but as the default location of the library.
1715242a55b46Smrg	  hardcode_minus_L=yes
17153c582b7e3Smrg	  ;;
17154c582b7e3Smrg	esac
17155c582b7e3Smrg      fi
17156c582b7e3Smrg      ;;
17157c582b7e3Smrg
17158c582b7e3Smrg    irix5* | irix6* | nonstopux*)
17159e3d74329Smrg      if test yes = "$GCC"; then
17160e3d74329Smrg	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
1716142a55b46Smrg	# Try to use the -exported_symbol ld option, if it does not
1716242a55b46Smrg	# work, assume that -exports_file does not work either and
1716342a55b46Smrg	# implicitly export all symbols.
1716442a55b46Smrg	# This should be the same for all languages, so no per-tag cache variable.
171658ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
171668ce07328Smrgprintf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
171678ce07328Smrgif test ${lt_cv_irix_exported_symbol+y}
171688ce07328Smrgthen :
171698ce07328Smrg  printf %s "(cached) " >&6
171708ce07328Smrgelse $as_nop
17171e3d74329Smrg  save_LDFLAGS=$LDFLAGS
17172e3d74329Smrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
1717342a55b46Smrg	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1717442a55b46Smrg/* end confdefs.h.  */
1717542a55b46Smrgint foo (void) { return 0; }
1717642a55b46Smrg_ACEOF
171778ce07328Smrgif ac_fn_c_try_link "$LINENO"
171788ce07328Smrgthen :
1717942a55b46Smrg  lt_cv_irix_exported_symbol=yes
171808ce07328Smrgelse $as_nop
1718142a55b46Smrg  lt_cv_irix_exported_symbol=no
1718242a55b46Smrgfi
171838ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1718442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
17185e3d74329Smrg           LDFLAGS=$save_LDFLAGS
1718642a55b46Smrgfi
171878ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
171888ce07328Smrgprintf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
17189e3d74329Smrg	if test yes = "$lt_cv_irix_exported_symbol"; then
17190e3d74329Smrg          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
1719142a55b46Smrg	fi
17192c582b7e3Smrg      else
17193e3d74329Smrg	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17194e3d74329Smrg	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
17195c582b7e3Smrg      fi
1719642a55b46Smrg      archive_cmds_need_lc='no'
17197e3d74329Smrg      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1719842a55b46Smrg      hardcode_libdir_separator=:
1719942a55b46Smrg      inherit_rpath=yes
1720042a55b46Smrg      link_all_deplibs=yes
17201c582b7e3Smrg      ;;
17202c582b7e3Smrg
17203e3d74329Smrg    linux*)
17204e3d74329Smrg      case $cc_basename in
17205e3d74329Smrg      tcc*)
17206e3d74329Smrg	# Fabrice Bellard et al's Tiny C Compiler
17207e3d74329Smrg	ld_shlibs=yes
17208e3d74329Smrg	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17209e3d74329Smrg	;;
17210e3d74329Smrg      esac
17211e3d74329Smrg      ;;
17212e3d74329Smrg
172138ce07328Smrg    netbsd*)
1721442a55b46Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1721542a55b46Smrg	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
17216c582b7e3Smrg      else
1721742a55b46Smrg	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
17218c582b7e3Smrg      fi
1721942a55b46Smrg      hardcode_libdir_flag_spec='-R$libdir'
1722042a55b46Smrg      hardcode_direct=yes
1722142a55b46Smrg      hardcode_shlibpath_var=no
17222c582b7e3Smrg      ;;
17223c582b7e3Smrg
17224c582b7e3Smrg    newsos6)
1722542a55b46Smrg      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1722642a55b46Smrg      hardcode_direct=yes
17227e3d74329Smrg      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1722842a55b46Smrg      hardcode_libdir_separator=:
1722942a55b46Smrg      hardcode_shlibpath_var=no
1723042a55b46Smrg      ;;
1723142a55b46Smrg
1723242a55b46Smrg    *nto* | *qnx*)
17233c582b7e3Smrg      ;;
17234c582b7e3Smrg
17235e3d74329Smrg    openbsd* | bitrig*)
17236c582b7e3Smrg      if test -f /usr/libexec/ld.so; then
1723742a55b46Smrg	hardcode_direct=yes
1723842a55b46Smrg	hardcode_shlibpath_var=no
1723942a55b46Smrg	hardcode_direct_absolute=yes
17240e3d74329Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
1724142a55b46Smrg	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17242e3d74329Smrg	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
17243e3d74329Smrg	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
17244e3d74329Smrg	  export_dynamic_flag_spec='$wl-E'
17245c582b7e3Smrg	else
17246e3d74329Smrg	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17247e3d74329Smrg	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
1724842a55b46Smrg	fi
17249c582b7e3Smrg      else
1725042a55b46Smrg	ld_shlibs=no
17251c582b7e3Smrg      fi
17252c582b7e3Smrg      ;;
17253c582b7e3Smrg
17254c582b7e3Smrg    os2*)
1725542a55b46Smrg      hardcode_libdir_flag_spec='-L$libdir'
1725642a55b46Smrg      hardcode_minus_L=yes
1725742a55b46Smrg      allow_undefined_flag=unsupported
17258e3d74329Smrg      shrext_cmds=.dll
17259e3d74329Smrg      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17260e3d74329Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17261e3d74329Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17262e3d74329Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
17263e3d74329Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
17264e3d74329Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17265e3d74329Smrg	emximp -o $lib $output_objdir/$libname.def'
17266e3d74329Smrg      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
17267e3d74329Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
17268e3d74329Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
17269e3d74329Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
17270e3d74329Smrg	prefix_cmds="$SED"~
17271e3d74329Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
17272e3d74329Smrg	  prefix_cmds="$prefix_cmds -e 1d";
17273e3d74329Smrg	fi~
17274e3d74329Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
17275e3d74329Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
17276e3d74329Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
17277e3d74329Smrg	emximp -o $lib $output_objdir/$libname.def'
17278e3d74329Smrg      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
17279e3d74329Smrg      enable_shared_with_static_runtimes=yes
172808ce07328Smrg      file_list_spec='@'
17281c582b7e3Smrg      ;;
17282c582b7e3Smrg
17283c582b7e3Smrg    osf3*)
17284e3d74329Smrg      if test yes = "$GCC"; then
17285e3d74329Smrg	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
17286e3d74329Smrg	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17287c582b7e3Smrg      else
1728842a55b46Smrg	allow_undefined_flag=' -expect_unresolved \*'
17289e3d74329Smrg	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
17290c582b7e3Smrg      fi
1729142a55b46Smrg      archive_cmds_need_lc='no'
17292e3d74329Smrg      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1729342a55b46Smrg      hardcode_libdir_separator=:
17294c582b7e3Smrg      ;;
17295c582b7e3Smrg
17296c582b7e3Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
17297e3d74329Smrg      if test yes = "$GCC"; then
17298e3d74329Smrg	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
17299e3d74329Smrg	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
17300e3d74329Smrg	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
17301c582b7e3Smrg      else
1730242a55b46Smrg	allow_undefined_flag=' -expect_unresolved \*'
17303e3d74329Smrg	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1730442a55b46Smrg	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
17305e3d74329Smrg          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
17306c582b7e3Smrg
17307c582b7e3Smrg	# Both c and cxx compiler support -rpath directly
1730842a55b46Smrg	hardcode_libdir_flag_spec='-rpath $libdir'
17309c582b7e3Smrg      fi
1731042a55b46Smrg      archive_cmds_need_lc='no'
1731142a55b46Smrg      hardcode_libdir_separator=:
17312c582b7e3Smrg      ;;
17313c582b7e3Smrg
17314c582b7e3Smrg    solaris*)
1731542a55b46Smrg      no_undefined_flag=' -z defs'
17316e3d74329Smrg      if test yes = "$GCC"; then
17317e3d74329Smrg	wlarc='$wl'
17318e3d74329Smrg	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
1731942a55b46Smrg	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17320e3d74329Smrg          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
17321c582b7e3Smrg      else
1732242a55b46Smrg	case `$CC -V 2>&1` in
1732342a55b46Smrg	*"Compilers 5.0"*)
1732442a55b46Smrg	  wlarc=''
17325e3d74329Smrg	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
1732642a55b46Smrg	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17327e3d74329Smrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
1732842a55b46Smrg	  ;;
1732942a55b46Smrg	*)
17330e3d74329Smrg	  wlarc='$wl'
17331e3d74329Smrg	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
1733242a55b46Smrg	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
17333e3d74329Smrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1733442a55b46Smrg	  ;;
1733542a55b46Smrg	esac
17336c582b7e3Smrg      fi
1733742a55b46Smrg      hardcode_libdir_flag_spec='-R$libdir'
1733842a55b46Smrg      hardcode_shlibpath_var=no
17339c582b7e3Smrg      case $host_os in
17340c582b7e3Smrg      solaris2.[0-5] | solaris2.[0-5].*) ;;
17341c582b7e3Smrg      *)
17342c582b7e3Smrg	# The compiler driver will combine and reorder linker options,
17343e3d74329Smrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
17344c582b7e3Smrg	# but is careful enough not to reorder.
1734542a55b46Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
17346e3d74329Smrg	if test yes = "$GCC"; then
17347e3d74329Smrg	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
17348c582b7e3Smrg	else
1734942a55b46Smrg	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
17350c582b7e3Smrg	fi
17351c582b7e3Smrg	;;
17352c582b7e3Smrg      esac
1735342a55b46Smrg      link_all_deplibs=yes
17354c582b7e3Smrg      ;;
17355c582b7e3Smrg
17356c582b7e3Smrg    sunos4*)
17357e3d74329Smrg      if test sequent = "$host_vendor"; then
17358c582b7e3Smrg	# Use $CC to link under sequent, because it throws in some extra .o
17359c582b7e3Smrg	# files that make .init and .fini sections work.
17360e3d74329Smrg	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17361c582b7e3Smrg      else
1736242a55b46Smrg	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17363c582b7e3Smrg      fi
1736442a55b46Smrg      hardcode_libdir_flag_spec='-L$libdir'
1736542a55b46Smrg      hardcode_direct=yes
1736642a55b46Smrg      hardcode_minus_L=yes
1736742a55b46Smrg      hardcode_shlibpath_var=no
17368c582b7e3Smrg      ;;
17369c582b7e3Smrg
17370c582b7e3Smrg    sysv4)
17371c582b7e3Smrg      case $host_vendor in
17372c582b7e3Smrg	sni)
1737342a55b46Smrg	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1737442a55b46Smrg	  hardcode_direct=yes # is this really true???
17375c582b7e3Smrg	;;
17376c582b7e3Smrg	siemens)
17377c582b7e3Smrg	  ## LD is ld it makes a PLAMLIB
17378c582b7e3Smrg	  ## CC just makes a GrossModule.
1737942a55b46Smrg	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1738042a55b46Smrg	  reload_cmds='$CC -r -o $output$reload_objs'
1738142a55b46Smrg	  hardcode_direct=no
17382c582b7e3Smrg        ;;
17383c582b7e3Smrg	motorola)
1738442a55b46Smrg	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1738542a55b46Smrg	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
17386c582b7e3Smrg	;;
17387c582b7e3Smrg      esac
17388c582b7e3Smrg      runpath_var='LD_RUN_PATH'
1738942a55b46Smrg      hardcode_shlibpath_var=no
17390c582b7e3Smrg      ;;
17391c582b7e3Smrg
17392c582b7e3Smrg    sysv4.3*)
1739342a55b46Smrg      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1739442a55b46Smrg      hardcode_shlibpath_var=no
1739542a55b46Smrg      export_dynamic_flag_spec='-Bexport'
17396c582b7e3Smrg      ;;
17397c582b7e3Smrg
17398c582b7e3Smrg    sysv4*MP*)
17399c582b7e3Smrg      if test -d /usr/nec; then
1740042a55b46Smrg	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1740142a55b46Smrg	hardcode_shlibpath_var=no
17402c582b7e3Smrg	runpath_var=LD_RUN_PATH
17403c582b7e3Smrg	hardcode_runpath_var=yes
1740442a55b46Smrg	ld_shlibs=yes
17405c582b7e3Smrg      fi
17406c582b7e3Smrg      ;;
17407c582b7e3Smrg
17408c582b7e3Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
17409e3d74329Smrg      no_undefined_flag='$wl-z,text'
1741042a55b46Smrg      archive_cmds_need_lc=no
1741142a55b46Smrg      hardcode_shlibpath_var=no
1741242a55b46Smrg      runpath_var='LD_RUN_PATH'
1741342a55b46Smrg
17414e3d74329Smrg      if test yes = "$GCC"; then
17415e3d74329Smrg	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17416e3d74329Smrg	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1741742a55b46Smrg      else
17418e3d74329Smrg	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17419e3d74329Smrg	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1742042a55b46Smrg      fi
1742142a55b46Smrg      ;;
1742242a55b46Smrg
1742342a55b46Smrg    sysv5* | sco3.2v5* | sco5v6*)
17424e3d74329Smrg      # Note: We CANNOT use -z defs as we might desire, because we do not
1742542a55b46Smrg      # link with -lc, and that would cause any symbols used from libc to
1742642a55b46Smrg      # always be unresolved, which means just about no library would
1742742a55b46Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
1742842a55b46Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
1742942a55b46Smrg      # as -z defs.
17430e3d74329Smrg      no_undefined_flag='$wl-z,text'
17431e3d74329Smrg      allow_undefined_flag='$wl-z,nodefs'
1743242a55b46Smrg      archive_cmds_need_lc=no
1743342a55b46Smrg      hardcode_shlibpath_var=no
17434e3d74329Smrg      hardcode_libdir_flag_spec='$wl-R,$libdir'
1743542a55b46Smrg      hardcode_libdir_separator=':'
1743642a55b46Smrg      link_all_deplibs=yes
17437e3d74329Smrg      export_dynamic_flag_spec='$wl-Bexport'
17438c582b7e3Smrg      runpath_var='LD_RUN_PATH'
17439c582b7e3Smrg
17440e3d74329Smrg      if test yes = "$GCC"; then
17441e3d74329Smrg	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17442e3d74329Smrg	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17443c582b7e3Smrg      else
17444e3d74329Smrg	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17445e3d74329Smrg	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17446c582b7e3Smrg      fi
17447c582b7e3Smrg      ;;
17448c582b7e3Smrg
1744942a55b46Smrg    uts4*)
1745042a55b46Smrg      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1745142a55b46Smrg      hardcode_libdir_flag_spec='-L$libdir'
1745242a55b46Smrg      hardcode_shlibpath_var=no
1745342a55b46Smrg      ;;
1745442a55b46Smrg
1745542a55b46Smrg    *)
1745642a55b46Smrg      ld_shlibs=no
1745742a55b46Smrg      ;;
1745842a55b46Smrg    esac
1745942a55b46Smrg
17460e3d74329Smrg    if test sni = "$host_vendor"; then
1746142a55b46Smrg      case $host in
1746242a55b46Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
17463e3d74329Smrg	export_dynamic_flag_spec='$wl-Blargedynsym'
1746442a55b46Smrg	;;
1746542a55b46Smrg      esac
1746642a55b46Smrg    fi
1746742a55b46Smrg  fi
1746842a55b46Smrg
174698ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
174708ce07328Smrgprintf "%s\n" "$ld_shlibs" >&6; }
17471e3d74329Smrgtest no = "$ld_shlibs" && can_build_shared=no
1747242a55b46Smrg
1747342a55b46Smrgwith_gnu_ld=$with_gnu_ld
1747442a55b46Smrg
1747542a55b46Smrg
1747642a55b46Smrg
1747742a55b46Smrg
1747842a55b46Smrg
1747942a55b46Smrg
1748042a55b46Smrg
1748142a55b46Smrg
1748242a55b46Smrg
1748342a55b46Smrg
17484c582b7e3Smrg
17485c582b7e3Smrg
17486c582b7e3Smrg
17487c582b7e3Smrg
17488c582b7e3Smrg
17489c582b7e3Smrg#
17490c582b7e3Smrg# Do we need to explicitly link libc?
17491c582b7e3Smrg#
1749242a55b46Smrgcase "x$archive_cmds_need_lc" in
17493c582b7e3Smrgx|xyes)
17494c582b7e3Smrg  # Assume -lc should be added
1749542a55b46Smrg  archive_cmds_need_lc=yes
17496c582b7e3Smrg
17497e3d74329Smrg  if test yes,yes = "$GCC,$enable_shared"; then
1749842a55b46Smrg    case $archive_cmds in
17499c582b7e3Smrg    *'~'*)
17500c582b7e3Smrg      # FIXME: we may have to deal with multi-command sequences.
17501c582b7e3Smrg      ;;
17502c582b7e3Smrg    '$CC '*)
17503c582b7e3Smrg      # Test whether the compiler implicitly links with -lc since on some
17504c582b7e3Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
17505c582b7e3Smrg      # to ld, don't add -lc before -lgcc.
175068ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
175078ce07328Smrgprintf %s "checking whether -lc should be explicitly linked in... " >&6; }
175088ce07328Smrgif test ${lt_cv_archive_cmds_need_lc+y}
175098ce07328Smrgthen :
175108ce07328Smrg  printf %s "(cached) " >&6
175118ce07328Smrgelse $as_nop
1751242a55b46Smrg  $RM conftest*
1751342a55b46Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17514c582b7e3Smrg
1751542a55b46Smrg	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17516c582b7e3Smrg  (eval $ac_compile) 2>&5
17517c582b7e3Smrg  ac_status=$?
175188ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1751942a55b46Smrg  test $ac_status = 0; } 2>conftest.err; then
1752042a55b46Smrg	  soname=conftest
1752142a55b46Smrg	  lib=conftest
1752242a55b46Smrg	  libobjs=conftest.$ac_objext
1752342a55b46Smrg	  deplibs=
1752442a55b46Smrg	  wl=$lt_prog_compiler_wl
1752542a55b46Smrg	  pic_flag=$lt_prog_compiler_pic
1752642a55b46Smrg	  compiler_flags=-v
1752742a55b46Smrg	  linker_flags=-v
1752842a55b46Smrg	  verstring=
1752942a55b46Smrg	  output_objdir=.
1753042a55b46Smrg	  libname=conftest
1753142a55b46Smrg	  lt_save_allow_undefined_flag=$allow_undefined_flag
1753242a55b46Smrg	  allow_undefined_flag=
1753342a55b46Smrg	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
1753442a55b46Smrg  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
17535c582b7e3Smrg  ac_status=$?
175368ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1753742a55b46Smrg  test $ac_status = 0; }
1753842a55b46Smrg	  then
1753942a55b46Smrg	    lt_cv_archive_cmds_need_lc=no
1754042a55b46Smrg	  else
1754142a55b46Smrg	    lt_cv_archive_cmds_need_lc=yes
1754242a55b46Smrg	  fi
1754342a55b46Smrg	  allow_undefined_flag=$lt_save_allow_undefined_flag
1754442a55b46Smrg	else
1754542a55b46Smrg	  cat conftest.err 1>&5
1754642a55b46Smrg	fi
1754742a55b46Smrg	$RM conftest*
1754842a55b46Smrg
1754942a55b46Smrgfi
175508ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
175518ce07328Smrgprintf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
1755242a55b46Smrg      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
17553c582b7e3Smrg      ;;
17554c582b7e3Smrg    esac
17555c582b7e3Smrg  fi
17556c582b7e3Smrg  ;;
17557c582b7e3Smrgesac
17558c582b7e3Smrg
17559c582b7e3Smrg
17560c582b7e3Smrg
17561c582b7e3Smrg
17562c582b7e3Smrg
17563c582b7e3Smrg
17564c582b7e3Smrg
17565c582b7e3Smrg
17566c582b7e3Smrg
17567c582b7e3Smrg
17568c582b7e3Smrg
17569c582b7e3Smrg
17570c582b7e3Smrg
17571c582b7e3Smrg
17572c582b7e3Smrg
17573c582b7e3Smrg
17574c582b7e3Smrg
17575c582b7e3Smrg
17576c582b7e3Smrg
17577c582b7e3Smrg
17578c582b7e3Smrg
17579c582b7e3Smrg
17580c582b7e3Smrg
17581c582b7e3Smrg
17582c582b7e3Smrg
17583c582b7e3Smrg
17584c582b7e3Smrg
17585c582b7e3Smrg
17586c582b7e3Smrg
17587c582b7e3Smrg
17588c582b7e3Smrg
17589c582b7e3Smrg
17590c582b7e3Smrg
17591c582b7e3Smrg
17592c582b7e3Smrg
17593c582b7e3Smrg
17594c582b7e3Smrg
17595c582b7e3Smrg
17596c582b7e3Smrg
17597c582b7e3Smrg
17598c582b7e3Smrg
1759919019ffeSmrg
1760019019ffeSmrg
1760119019ffeSmrg
17602c582b7e3Smrg
17603c582b7e3Smrg
17604c582b7e3Smrg
17605c582b7e3Smrg
17606c582b7e3Smrg
17607c582b7e3Smrg
17608c582b7e3Smrg
17609c582b7e3Smrg
17610c582b7e3Smrg
17611c582b7e3Smrg
17612c582b7e3Smrg
17613c582b7e3Smrg
17614c582b7e3Smrg
17615c582b7e3Smrg
17616c582b7e3Smrg
17617c582b7e3Smrg
17618c582b7e3Smrg
17619c582b7e3Smrg
17620c582b7e3Smrg
17621c582b7e3Smrg
17622c582b7e3Smrg
17623c582b7e3Smrg
17624c582b7e3Smrg
17625c582b7e3Smrg
17626c582b7e3Smrg
17627c582b7e3Smrg
17628c582b7e3Smrg
17629c582b7e3Smrg
17630c582b7e3Smrg
17631c582b7e3Smrg
17632c582b7e3Smrg
17633c582b7e3Smrg
17634c582b7e3Smrg
17635c582b7e3Smrg
17636c582b7e3Smrg
17637c582b7e3Smrg
17638c582b7e3Smrg
17639c582b7e3Smrg
17640c582b7e3Smrg
17641c582b7e3Smrg
17642c582b7e3Smrg
17643c582b7e3Smrg
17644c582b7e3Smrg
17645c582b7e3Smrg
17646c582b7e3Smrg
17647c582b7e3Smrg
17648c582b7e3Smrg
17649c582b7e3Smrg
17650c582b7e3Smrg
17651c582b7e3Smrg
17652c582b7e3Smrg
17653c582b7e3Smrg
17654c582b7e3Smrg
17655c582b7e3Smrg
17656c582b7e3Smrg
17657c582b7e3Smrg
17658c582b7e3Smrg
17659c582b7e3Smrg
17660c582b7e3Smrg
17661c582b7e3Smrg
17662c582b7e3Smrg
17663c582b7e3Smrg
17664c582b7e3Smrg
17665c582b7e3Smrg
17666c582b7e3Smrg
17667c582b7e3Smrg
17668c582b7e3Smrg
17669c582b7e3Smrg
1767019019ffeSmrg
17671c582b7e3Smrg
17672c582b7e3Smrg
17673c582b7e3Smrg
17674c582b7e3Smrg
17675c582b7e3Smrg
17676c582b7e3Smrg
17677c582b7e3Smrg
17678c582b7e3Smrg
17679c582b7e3Smrg
17680c582b7e3Smrg
17681c582b7e3Smrg
17682c582b7e3Smrg
17683c582b7e3Smrg
17684c582b7e3Smrg
17685c582b7e3Smrg
17686c582b7e3Smrg
17687c582b7e3Smrg
17688c582b7e3Smrg
17689c582b7e3Smrg
17690c582b7e3Smrg
17691c582b7e3Smrg
17692c582b7e3Smrg
17693c582b7e3Smrg
17694c582b7e3Smrg
17695c582b7e3Smrg
17696c582b7e3Smrg
17697c582b7e3Smrg
17698c582b7e3Smrg
17699c582b7e3Smrg
17700c582b7e3Smrg
17701c582b7e3Smrg
17702c582b7e3Smrg
17703c582b7e3Smrg
17704c582b7e3Smrg
17705c582b7e3Smrg
1770642a55b46Smrg
1770742a55b46Smrg
1770842a55b46Smrg
1770942a55b46Smrg
177108ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
177118ce07328Smrgprintf %s "checking dynamic linker characteristics... " >&6; }
1771242a55b46Smrg
17713e3d74329Smrgif test yes = "$GCC"; then
1771442a55b46Smrg  case $host_os in
17715e3d74329Smrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
17716e3d74329Smrg    *) lt_awk_arg='/^libraries:/' ;;
1771742a55b46Smrg  esac
1771842a55b46Smrg  case $host_os in
17719e3d74329Smrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
17720e3d74329Smrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
1772142a55b46Smrg  esac
1772242a55b46Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
1772342a55b46Smrg  case $lt_search_path_spec in
1772442a55b46Smrg  *\;*)
1772542a55b46Smrg    # if the path contains ";" then we assume it to be the separator
1772642a55b46Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
1772742a55b46Smrg    # assumed that no part of a normal pathname contains ";" but that should
1772842a55b46Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
1772942a55b46Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
1773042a55b46Smrg    ;;
1773142a55b46Smrg  *)
1773242a55b46Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
1773342a55b46Smrg    ;;
1773442a55b46Smrg  esac
1773542a55b46Smrg  # Ok, now we have the path, separated by spaces, we can step through it
17736e3d74329Smrg  # and add multilib dir if necessary...
1773742a55b46Smrg  lt_tmp_lt_search_path_spec=
17738e3d74329Smrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
17739e3d74329Smrg  # ...but if some path component already ends with the multilib dir we assume
17740e3d74329Smrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
17741e3d74329Smrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
17742e3d74329Smrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
17743e3d74329Smrg    lt_multi_os_dir=
17744e3d74329Smrg    ;;
17745e3d74329Smrg  esac
1774642a55b46Smrg  for lt_sys_path in $lt_search_path_spec; do
17747e3d74329Smrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
17748e3d74329Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
17749e3d74329Smrg    elif test -n "$lt_multi_os_dir"; then
1775042a55b46Smrg      test -d "$lt_sys_path" && \
1775142a55b46Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1775242a55b46Smrg    fi
1775342a55b46Smrg  done
1775442a55b46Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
17755e3d74329SmrgBEGIN {RS = " "; FS = "/|\n";} {
17756e3d74329Smrg  lt_foo = "";
17757e3d74329Smrg  lt_count = 0;
1775842a55b46Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
1775942a55b46Smrg    if ($lt_i != "" && $lt_i != ".") {
1776042a55b46Smrg      if ($lt_i == "..") {
1776142a55b46Smrg        lt_count++;
1776242a55b46Smrg      } else {
1776342a55b46Smrg        if (lt_count == 0) {
17764e3d74329Smrg          lt_foo = "/" $lt_i lt_foo;
1776542a55b46Smrg        } else {
1776642a55b46Smrg          lt_count--;
1776742a55b46Smrg        }
1776842a55b46Smrg      }
1776942a55b46Smrg    }
1777042a55b46Smrg  }
1777142a55b46Smrg  if (lt_foo != "") { lt_freq[lt_foo]++; }
1777242a55b46Smrg  if (lt_freq[lt_foo] == 1) { print lt_foo; }
1777342a55b46Smrg}'`
1777442a55b46Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
1777542a55b46Smrg  # for these hosts.
1777642a55b46Smrg  case $host_os in
1777742a55b46Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
17778e3d74329Smrg      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
1777942a55b46Smrg  esac
1778042a55b46Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
1778142a55b46Smrgelse
1778242a55b46Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1778342a55b46Smrgfi
1778442a55b46Smrglibrary_names_spec=
1778542a55b46Smrglibname_spec='lib$name'
1778642a55b46Smrgsoname_spec=
17787e3d74329Smrgshrext_cmds=.so
1778842a55b46Smrgpostinstall_cmds=
1778942a55b46Smrgpostuninstall_cmds=
1779042a55b46Smrgfinish_cmds=
1779142a55b46Smrgfinish_eval=
1779242a55b46Smrgshlibpath_var=
1779342a55b46Smrgshlibpath_overrides_runpath=unknown
1779442a55b46Smrgversion_type=none
1779542a55b46Smrgdynamic_linker="$host_os ld.so"
1779642a55b46Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
1779742a55b46Smrgneed_lib_prefix=unknown
1779842a55b46Smrghardcode_into_libs=no
1779942a55b46Smrg
1780042a55b46Smrg# when you set need_version to no, make sure it does not cause -set_version
1780142a55b46Smrg# flags to be left without arguments
1780242a55b46Smrgneed_version=unknown
1780342a55b46Smrg
17804e3d74329Smrg
17805e3d74329Smrg
1780642a55b46Smrgcase $host_os in
1780742a55b46Smrgaix3*)
1780842a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
17809e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
1781042a55b46Smrg  shlibpath_var=LIBPATH
1781142a55b46Smrg
1781242a55b46Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
17813e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1781442a55b46Smrg  ;;
1781542a55b46Smrg
1781642a55b46Smrgaix[4-9]*)
1781742a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1781842a55b46Smrg  need_lib_prefix=no
1781942a55b46Smrg  need_version=no
1782042a55b46Smrg  hardcode_into_libs=yes
17821e3d74329Smrg  if test ia64 = "$host_cpu"; then
1782242a55b46Smrg    # AIX 5 supports IA64
17823e3d74329Smrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
1782442a55b46Smrg    shlibpath_var=LD_LIBRARY_PATH
1782542a55b46Smrg  else
1782642a55b46Smrg    # With GCC up to 2.95.x, collect2 would create an import file
1782742a55b46Smrg    # for dependence libraries.  The import file would start with
17828e3d74329Smrg    # the line '#! .'.  This would cause the generated library to
17829e3d74329Smrg    # depend on '.', always an invalid library.  This was fixed in
1783042a55b46Smrg    # development snapshots of GCC prior to 3.0.
1783142a55b46Smrg    case $host_os in
1783242a55b46Smrg      aix4 | aix4.[01] | aix4.[01].*)
1783342a55b46Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1783442a55b46Smrg	   echo ' yes '
17835e3d74329Smrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
1783642a55b46Smrg	:
1783742a55b46Smrg      else
1783842a55b46Smrg	can_build_shared=no
1783942a55b46Smrg      fi
1784042a55b46Smrg      ;;
1784142a55b46Smrg    esac
17842e3d74329Smrg    # Using Import Files as archive members, it is possible to support
17843e3d74329Smrg    # filename-based versioning of shared library archives on AIX. While
17844e3d74329Smrg    # this would work for both with and without runtime linking, it will
17845e3d74329Smrg    # prevent static linking of such archives. So we do filename-based
17846e3d74329Smrg    # shared library versioning with .so extension only, which is used
17847e3d74329Smrg    # when both runtime linking and shared linking is enabled.
17848e3d74329Smrg    # Unfortunately, runtime linking may impact performance, so we do
17849e3d74329Smrg    # not want this to be the default eventually. Also, we use the
17850e3d74329Smrg    # versioned .so libs for executables only if there is the -brtl
17851e3d74329Smrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
17852e3d74329Smrg    # To allow for filename-based versioning support, we need to create
17853e3d74329Smrg    # libNAME.so.V as an archive file, containing:
17854e3d74329Smrg    # *) an Import File, referring to the versioned filename of the
17855e3d74329Smrg    #    archive as well as the shared archive member, telling the
17856e3d74329Smrg    #    bitwidth (32 or 64) of that shared object, and providing the
17857e3d74329Smrg    #    list of exported symbols of that shared object, eventually
17858e3d74329Smrg    #    decorated with the 'weak' keyword
17859e3d74329Smrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
17860e3d74329Smrg    #    it being seen by the linker.
17861e3d74329Smrg    # At run time we better use the real file rather than another symlink,
17862e3d74329Smrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
17863e3d74329Smrg
17864e3d74329Smrg    case $with_aix_soname,$aix_use_runtimelinking in
17865e3d74329Smrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
1786642a55b46Smrg    # soname into executable. Probably we can add versioning support to
1786742a55b46Smrg    # collect2, so additional links can be useful in future.
17868e3d74329Smrg    aix,yes) # traditional libtool
17869e3d74329Smrg      dynamic_linker='AIX unversionable lib.so'
1787042a55b46Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1787142a55b46Smrg      # instead of lib<name>.a to let people know that these are not
1787242a55b46Smrg      # typical AIX shared libraries.
17873e3d74329Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
17874e3d74329Smrg      ;;
17875e3d74329Smrg    aix,no) # traditional AIX only
17876e3d74329Smrg      dynamic_linker='AIX lib.a(lib.so.V)'
1787742a55b46Smrg      # We preserve .a as extension for shared libraries through AIX4.2
1787842a55b46Smrg      # and later when we are not doing run time linking.
17879e3d74329Smrg      library_names_spec='$libname$release.a $libname.a'
17880e3d74329Smrg      soname_spec='$libname$release$shared_ext$major'
17881e3d74329Smrg      ;;
17882e3d74329Smrg    svr4,*) # full svr4 only
17883e3d74329Smrg      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
17884e3d74329Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
17885e3d74329Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
17886e3d74329Smrg      shlibpath_overrides_runpath=yes
17887e3d74329Smrg      ;;
17888e3d74329Smrg    *,yes) # both, prefer svr4
17889e3d74329Smrg      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
17890e3d74329Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
17891e3d74329Smrg      # unpreferred sharedlib libNAME.a needs extra handling
17892e3d74329Smrg      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
17893e3d74329Smrg      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
17894e3d74329Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
17895e3d74329Smrg      shlibpath_overrides_runpath=yes
17896e3d74329Smrg      ;;
17897e3d74329Smrg    *,no) # both, prefer aix
17898e3d74329Smrg      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
17899e3d74329Smrg      library_names_spec='$libname$release.a $libname.a'
17900e3d74329Smrg      soname_spec='$libname$release$shared_ext$major'
17901e3d74329Smrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
17902e3d74329Smrg      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
17903e3d74329Smrg      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
17904e3d74329Smrg      ;;
17905e3d74329Smrg    esac
1790642a55b46Smrg    shlibpath_var=LIBPATH
1790742a55b46Smrg  fi
1790842a55b46Smrg  ;;
1790942a55b46Smrg
1791042a55b46Smrgamigaos*)
1791142a55b46Smrg  case $host_cpu in
1791242a55b46Smrg  powerpc)
1791342a55b46Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
1791442a55b46Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
17915e3d74329Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1791642a55b46Smrg    ;;
1791742a55b46Smrg  m68k)
1791842a55b46Smrg    library_names_spec='$libname.ixlibrary $libname.a'
1791942a55b46Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
17920e3d74329Smrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
1792142a55b46Smrg    ;;
1792242a55b46Smrg  esac
1792342a55b46Smrg  ;;
1792442a55b46Smrg
1792542a55b46Smrgbeos*)
17926e3d74329Smrg  library_names_spec='$libname$shared_ext'
1792742a55b46Smrg  dynamic_linker="$host_os ld.so"
1792842a55b46Smrg  shlibpath_var=LIBRARY_PATH
1792942a55b46Smrg  ;;
1793042a55b46Smrg
1793142a55b46Smrgbsdi[45]*)
1793242a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1793342a55b46Smrg  need_version=no
17934e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
17935e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1793642a55b46Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1793742a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1793842a55b46Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1793942a55b46Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1794042a55b46Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
1794142a55b46Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1794242a55b46Smrg  # libtool to hard-code these into programs
1794342a55b46Smrg  ;;
1794442a55b46Smrg
1794542a55b46Smrgcygwin* | mingw* | pw32* | cegcc*)
1794642a55b46Smrg  version_type=windows
17947e3d74329Smrg  shrext_cmds=.dll
1794842a55b46Smrg  need_version=no
1794942a55b46Smrg  need_lib_prefix=no
1795042a55b46Smrg
1795142a55b46Smrg  case $GCC,$cc_basename in
1795242a55b46Smrg  yes,*)
1795342a55b46Smrg    # gcc
1795442a55b46Smrg    library_names_spec='$libname.dll.a'
1795542a55b46Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
17956e3d74329Smrg    postinstall_cmds='base_file=`basename \$file`~
17957e3d74329Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1795842a55b46Smrg      dldir=$destdir/`dirname \$dlpath`~
1795942a55b46Smrg      test -d \$dldir || mkdir -p \$dldir~
1796042a55b46Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
1796142a55b46Smrg      chmod a+x \$dldir/$dlname~
1796242a55b46Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
1796342a55b46Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
1796442a55b46Smrg      fi'
1796542a55b46Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1796642a55b46Smrg      dlpath=$dir/\$dldll~
1796742a55b46Smrg       $RM \$dlpath'
1796842a55b46Smrg    shlibpath_overrides_runpath=yes
1796942a55b46Smrg
1797042a55b46Smrg    case $host_os in
1797142a55b46Smrg    cygwin*)
1797242a55b46Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
179738ce07328Smrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1797442a55b46Smrg
1797542a55b46Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
1797642a55b46Smrg      ;;
1797742a55b46Smrg    mingw* | cegcc*)
1797842a55b46Smrg      # MinGW DLLs use traditional 'lib' prefix
17979e3d74329Smrg      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1798042a55b46Smrg      ;;
1798142a55b46Smrg    pw32*)
1798242a55b46Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
179838ce07328Smrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1798442a55b46Smrg      ;;
1798542a55b46Smrg    esac
1798642a55b46Smrg    dynamic_linker='Win32 ld.exe'
1798742a55b46Smrg    ;;
1798842a55b46Smrg
179898ce07328Smrg  *,cl* | *,icl*)
179908ce07328Smrg    # Native MSVC or ICC
1799142a55b46Smrg    libname_spec='$name'
17992e3d74329Smrg    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
17993e3d74329Smrg    library_names_spec='$libname.dll.lib'
1799442a55b46Smrg
1799542a55b46Smrg    case $build_os in
1799642a55b46Smrg    mingw*)
1799742a55b46Smrg      sys_lib_search_path_spec=
1799842a55b46Smrg      lt_save_ifs=$IFS
1799942a55b46Smrg      IFS=';'
1800042a55b46Smrg      for lt_path in $LIB
1800142a55b46Smrg      do
1800242a55b46Smrg        IFS=$lt_save_ifs
1800342a55b46Smrg        # Let DOS variable expansion print the short 8.3 style file name.
1800442a55b46Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
1800542a55b46Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
1800642a55b46Smrg      done
1800742a55b46Smrg      IFS=$lt_save_ifs
1800842a55b46Smrg      # Convert to MSYS style.
180098ce07328Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
1801042a55b46Smrg      ;;
1801142a55b46Smrg    cygwin*)
1801242a55b46Smrg      # Convert to unix form, then to dos form, then back to unix form
1801342a55b46Smrg      # but this time dos style (no spaces!) so that the unix form looks
1801442a55b46Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
1801542a55b46Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
1801642a55b46Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
1801742a55b46Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1801842a55b46Smrg      ;;
1801942a55b46Smrg    *)
18020e3d74329Smrg      sys_lib_search_path_spec=$LIB
1802142a55b46Smrg      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
1802242a55b46Smrg        # It is most probably a Windows format PATH.
1802342a55b46Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1802442a55b46Smrg      else
1802542a55b46Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1802642a55b46Smrg      fi
1802742a55b46Smrg      # FIXME: find the short name or the path components, as spaces are
1802842a55b46Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
1802942a55b46Smrg      ;;
1803042a55b46Smrg    esac
1803142a55b46Smrg
1803242a55b46Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
18033e3d74329Smrg    postinstall_cmds='base_file=`basename \$file`~
18034e3d74329Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1803542a55b46Smrg      dldir=$destdir/`dirname \$dlpath`~
1803642a55b46Smrg      test -d \$dldir || mkdir -p \$dldir~
1803742a55b46Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
1803842a55b46Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1803942a55b46Smrg      dlpath=$dir/\$dldll~
1804042a55b46Smrg       $RM \$dlpath'
1804142a55b46Smrg    shlibpath_overrides_runpath=yes
1804242a55b46Smrg    dynamic_linker='Win32 link.exe'
1804342a55b46Smrg    ;;
1804442a55b46Smrg
1804542a55b46Smrg  *)
180468ce07328Smrg    # Assume MSVC and ICC wrapper
18047e3d74329Smrg    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
1804842a55b46Smrg    dynamic_linker='Win32 ld.exe'
1804942a55b46Smrg    ;;
1805042a55b46Smrg  esac
1805142a55b46Smrg  # FIXME: first we should search . and the directory the executable is in
1805242a55b46Smrg  shlibpath_var=PATH
1805342a55b46Smrg  ;;
1805442a55b46Smrg
1805542a55b46Smrgdarwin* | rhapsody*)
1805642a55b46Smrg  dynamic_linker="$host_os dyld"
1805742a55b46Smrg  version_type=darwin
1805842a55b46Smrg  need_lib_prefix=no
1805942a55b46Smrg  need_version=no
18060e3d74329Smrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
18061e3d74329Smrg  soname_spec='$libname$release$major$shared_ext'
1806242a55b46Smrg  shlibpath_overrides_runpath=yes
1806342a55b46Smrg  shlibpath_var=DYLD_LIBRARY_PATH
1806442a55b46Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1806542a55b46Smrg
1806642a55b46Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
1806742a55b46Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1806842a55b46Smrg  ;;
1806942a55b46Smrg
1807042a55b46Smrgdgux*)
1807142a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1807242a55b46Smrg  need_lib_prefix=no
1807342a55b46Smrg  need_version=no
18074e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18075e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1807642a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1807742a55b46Smrg  ;;
1807842a55b46Smrg
180798ce07328Smrgfreebsd* | dragonfly* | midnightbsd*)
1808042a55b46Smrg  # DragonFly does not have aout.  When/if they implement a new
1808142a55b46Smrg  # versioning mechanism, adjust this.
1808242a55b46Smrg  if test -x /usr/bin/objformat; then
1808342a55b46Smrg    objformat=`/usr/bin/objformat`
1808442a55b46Smrg  else
1808542a55b46Smrg    case $host_os in
1808642a55b46Smrg    freebsd[23].*) objformat=aout ;;
1808742a55b46Smrg    *) objformat=elf ;;
1808842a55b46Smrg    esac
1808942a55b46Smrg  fi
18090cd241713Smrg  version_type=freebsd-$objformat
1809142a55b46Smrg  case $version_type in
1809242a55b46Smrg    freebsd-elf*)
18093e3d74329Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18094e3d74329Smrg      soname_spec='$libname$release$shared_ext$major'
1809542a55b46Smrg      need_version=no
1809642a55b46Smrg      need_lib_prefix=no
1809742a55b46Smrg      ;;
1809842a55b46Smrg    freebsd-*)
18099e3d74329Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1810042a55b46Smrg      need_version=yes
1810142a55b46Smrg      ;;
1810242a55b46Smrg  esac
1810342a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1810442a55b46Smrg  case $host_os in
1810542a55b46Smrg  freebsd2.*)
1810642a55b46Smrg    shlibpath_overrides_runpath=yes
1810742a55b46Smrg    ;;
1810842a55b46Smrg  freebsd3.[01]* | freebsdelf3.[01]*)
1810942a55b46Smrg    shlibpath_overrides_runpath=yes
1811042a55b46Smrg    hardcode_into_libs=yes
1811142a55b46Smrg    ;;
1811242a55b46Smrg  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
1811342a55b46Smrg  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
1811442a55b46Smrg    shlibpath_overrides_runpath=no
1811542a55b46Smrg    hardcode_into_libs=yes
1811642a55b46Smrg    ;;
1811742a55b46Smrg  *) # from 4.6 on, and DragonFly
1811842a55b46Smrg    shlibpath_overrides_runpath=yes
1811942a55b46Smrg    hardcode_into_libs=yes
1812042a55b46Smrg    ;;
1812142a55b46Smrg  esac
1812242a55b46Smrg  ;;
1812342a55b46Smrg
1812442a55b46Smrghaiku*)
1812542a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1812642a55b46Smrg  need_lib_prefix=no
1812742a55b46Smrg  need_version=no
1812842a55b46Smrg  dynamic_linker="$host_os runtime_loader"
18129e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18130e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1813142a55b46Smrg  shlibpath_var=LIBRARY_PATH
18132e3d74329Smrg  shlibpath_overrides_runpath=no
1813342a55b46Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
1813442a55b46Smrg  hardcode_into_libs=yes
1813542a55b46Smrg  ;;
1813642a55b46Smrg
1813742a55b46Smrghpux9* | hpux10* | hpux11*)
1813842a55b46Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
1813942a55b46Smrg  # link against other versions.
1814042a55b46Smrg  version_type=sunos
1814142a55b46Smrg  need_lib_prefix=no
1814242a55b46Smrg  need_version=no
1814342a55b46Smrg  case $host_cpu in
1814442a55b46Smrg  ia64*)
1814542a55b46Smrg    shrext_cmds='.so'
1814642a55b46Smrg    hardcode_into_libs=yes
1814742a55b46Smrg    dynamic_linker="$host_os dld.so"
1814842a55b46Smrg    shlibpath_var=LD_LIBRARY_PATH
1814942a55b46Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18150e3d74329Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18151e3d74329Smrg    soname_spec='$libname$release$shared_ext$major'
18152e3d74329Smrg    if test 32 = "$HPUX_IA64_MODE"; then
1815342a55b46Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18154e3d74329Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
1815542a55b46Smrg    else
1815642a55b46Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18157e3d74329Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
1815842a55b46Smrg    fi
1815942a55b46Smrg    ;;
1816042a55b46Smrg  hppa*64*)
1816142a55b46Smrg    shrext_cmds='.sl'
1816242a55b46Smrg    hardcode_into_libs=yes
1816342a55b46Smrg    dynamic_linker="$host_os dld.sl"
1816442a55b46Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1816542a55b46Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18166e3d74329Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18167e3d74329Smrg    soname_spec='$libname$release$shared_ext$major'
1816842a55b46Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1816942a55b46Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1817042a55b46Smrg    ;;
1817142a55b46Smrg  *)
1817242a55b46Smrg    shrext_cmds='.sl'
1817342a55b46Smrg    dynamic_linker="$host_os dld.sl"
1817442a55b46Smrg    shlibpath_var=SHLIB_PATH
1817542a55b46Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
18176e3d74329Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18177e3d74329Smrg    soname_spec='$libname$release$shared_ext$major'
1817842a55b46Smrg    ;;
1817942a55b46Smrg  esac
1818042a55b46Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
1818142a55b46Smrg  postinstall_cmds='chmod 555 $lib'
1818242a55b46Smrg  # or fails outright, so override atomically:
1818342a55b46Smrg  install_override_mode=555
1818442a55b46Smrg  ;;
1818542a55b46Smrg
1818642a55b46Smrginterix[3-9]*)
1818742a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1818842a55b46Smrg  need_lib_prefix=no
1818942a55b46Smrg  need_version=no
18190e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18191e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1819242a55b46Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1819342a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1819442a55b46Smrg  shlibpath_overrides_runpath=no
1819542a55b46Smrg  hardcode_into_libs=yes
1819642a55b46Smrg  ;;
1819742a55b46Smrg
1819842a55b46Smrgirix5* | irix6* | nonstopux*)
1819942a55b46Smrg  case $host_os in
1820042a55b46Smrg    nonstopux*) version_type=nonstopux ;;
1820142a55b46Smrg    *)
18202e3d74329Smrg	if test yes = "$lt_cv_prog_gnu_ld"; then
1820342a55b46Smrg		version_type=linux # correct to gnu/linux during the next big refactor
1820442a55b46Smrg	else
1820542a55b46Smrg		version_type=irix
1820642a55b46Smrg	fi ;;
1820742a55b46Smrg  esac
1820842a55b46Smrg  need_lib_prefix=no
1820942a55b46Smrg  need_version=no
18210e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
18211e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
1821242a55b46Smrg  case $host_os in
1821342a55b46Smrg  irix5* | nonstopux*)
1821442a55b46Smrg    libsuff= shlibsuff=
1821542a55b46Smrg    ;;
1821642a55b46Smrg  *)
1821742a55b46Smrg    case $LD in # libtool.m4 will add one of these switches to LD
1821842a55b46Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1821942a55b46Smrg      libsuff= shlibsuff= libmagic=32-bit;;
1822042a55b46Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1822142a55b46Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
1822242a55b46Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1822342a55b46Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1822442a55b46Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
1822542a55b46Smrg    esac
1822642a55b46Smrg    ;;
1822742a55b46Smrg  esac
1822842a55b46Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1822942a55b46Smrg  shlibpath_overrides_runpath=no
18230e3d74329Smrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
18231e3d74329Smrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
1823242a55b46Smrg  hardcode_into_libs=yes
1823342a55b46Smrg  ;;
1823442a55b46Smrg
1823542a55b46Smrg# No shared lib support for Linux oldld, aout, or coff.
1823642a55b46Smrglinux*oldld* | linux*aout* | linux*coff*)
1823742a55b46Smrg  dynamic_linker=no
1823842a55b46Smrg  ;;
1823942a55b46Smrg
18240e3d74329Smrglinux*android*)
18241e3d74329Smrg  version_type=none # Android doesn't support versioned libraries.
18242e3d74329Smrg  need_lib_prefix=no
18243e3d74329Smrg  need_version=no
18244e3d74329Smrg  library_names_spec='$libname$release$shared_ext'
18245e3d74329Smrg  soname_spec='$libname$release$shared_ext'
18246e3d74329Smrg  finish_cmds=
18247e3d74329Smrg  shlibpath_var=LD_LIBRARY_PATH
18248e3d74329Smrg  shlibpath_overrides_runpath=yes
18249e3d74329Smrg
18250e3d74329Smrg  # This implies no fast_install, which is unacceptable.
18251e3d74329Smrg  # Some rework will be needed to allow for fast_install
18252e3d74329Smrg  # before this can be enabled.
18253e3d74329Smrg  hardcode_into_libs=yes
18254e3d74329Smrg
18255e3d74329Smrg  dynamic_linker='Android linker'
18256e3d74329Smrg  # Don't embed -rpath directories since the linker doesn't support them.
18257e3d74329Smrg  hardcode_libdir_flag_spec='-L$libdir'
18258e3d74329Smrg  ;;
18259e3d74329Smrg
1826042a55b46Smrg# This must be glibc/ELF.
182610496e070Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
1826242a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1826342a55b46Smrg  need_lib_prefix=no
1826442a55b46Smrg  need_version=no
18265e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18266e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1826742a55b46Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1826842a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1826942a55b46Smrg  shlibpath_overrides_runpath=no
1827042a55b46Smrg
1827142a55b46Smrg  # Some binutils ld are patched to set DT_RUNPATH
182728ce07328Smrg  if test ${lt_cv_shlibpath_overrides_runpath+y}
182738ce07328Smrgthen :
182748ce07328Smrg  printf %s "(cached) " >&6
182758ce07328Smrgelse $as_nop
1827642a55b46Smrg  lt_cv_shlibpath_overrides_runpath=no
1827742a55b46Smrg    save_LDFLAGS=$LDFLAGS
1827842a55b46Smrg    save_libdir=$libdir
1827942a55b46Smrg    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
1828042a55b46Smrg	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
1828142a55b46Smrg    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1828242a55b46Smrg/* end confdefs.h.  */
1828342a55b46Smrg
1828442a55b46Smrgint
182858ce07328Smrgmain (void)
1828642a55b46Smrg{
1828742a55b46Smrg
1828842a55b46Smrg  ;
1828942a55b46Smrg  return 0;
1829042a55b46Smrg}
1829142a55b46Smrg_ACEOF
182928ce07328Smrgif ac_fn_c_try_link "$LINENO"
182938ce07328Smrgthen :
182948ce07328Smrg  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
182958ce07328Smrgthen :
1829642a55b46Smrg  lt_cv_shlibpath_overrides_runpath=yes
1829742a55b46Smrgfi
1829842a55b46Smrgfi
182998ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1830042a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1830142a55b46Smrg    LDFLAGS=$save_LDFLAGS
1830242a55b46Smrg    libdir=$save_libdir
1830342a55b46Smrg
1830442a55b46Smrgfi
1830542a55b46Smrg
1830642a55b46Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
1830742a55b46Smrg
1830842a55b46Smrg  # This implies no fast_install, which is unacceptable.
1830942a55b46Smrg  # Some rework will be needed to allow for fast_install
1831042a55b46Smrg  # before this can be enabled.
1831142a55b46Smrg  hardcode_into_libs=yes
1831242a55b46Smrg
18313e3d74329Smrg  # Ideally, we could use ldconfig to report *all* directores which are
18314e3d74329Smrg  # searched for libraries, however this is still not possible.  Aside from not
18315e3d74329Smrg  # being certain /sbin/ldconfig is available, command
18316e3d74329Smrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
18317e3d74329Smrg  # even though it is searched at run-time.  Try to do the best guess by
18318e3d74329Smrg  # appending ld.so.conf contents (and includes) to the search path.
1831942a55b46Smrg  if test -f /etc/ld.so.conf; then
1832042a55b46Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
183210496e070Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1832242a55b46Smrg  fi
1832342a55b46Smrg
1832442a55b46Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
1832542a55b46Smrg  # powerpc, because MkLinux only supported shared libraries with the
1832642a55b46Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
1832742a55b46Smrg  # most powerpc-linux boxes support dynamic linking these days and
1832842a55b46Smrg  # people can always --disable-shared, the test was removed, and we
1832942a55b46Smrg  # assume the GNU/Linux dynamic linker is in use.
183308ce07328Smrg  dynamic_linker='GNU/Linux ld.so'
18331cd241713Smrg  ;;
18332cd241713Smrg
1833342a55b46Smrgnetbsd*)
1833442a55b46Smrg  version_type=sunos
1833542a55b46Smrg  need_lib_prefix=no
1833642a55b46Smrg  need_version=no
1833742a55b46Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
18338e3d74329Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1833942a55b46Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1834042a55b46Smrg    dynamic_linker='NetBSD (a.out) ld.so'
1834142a55b46Smrg  else
18342e3d74329Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18343e3d74329Smrg    soname_spec='$libname$release$shared_ext$major'
1834442a55b46Smrg    dynamic_linker='NetBSD ld.elf_so'
1834542a55b46Smrg  fi
1834642a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1834742a55b46Smrg  shlibpath_overrides_runpath=yes
1834842a55b46Smrg  hardcode_into_libs=yes
1834942a55b46Smrg  ;;
1835042a55b46Smrg
1835142a55b46Smrgnewsos6)
1835242a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
18353e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1835442a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1835542a55b46Smrg  shlibpath_overrides_runpath=yes
1835642a55b46Smrg  ;;
1835742a55b46Smrg
1835842a55b46Smrg*nto* | *qnx*)
1835942a55b46Smrg  version_type=qnx
1836042a55b46Smrg  need_lib_prefix=no
1836142a55b46Smrg  need_version=no
18362e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18363e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1836442a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1836542a55b46Smrg  shlibpath_overrides_runpath=no
1836642a55b46Smrg  hardcode_into_libs=yes
1836742a55b46Smrg  dynamic_linker='ldqnx.so'
1836842a55b46Smrg  ;;
1836942a55b46Smrg
18370e3d74329Smrgopenbsd* | bitrig*)
1837142a55b46Smrg  version_type=sunos
18372e3d74329Smrg  sys_lib_dlsearch_path_spec=/usr/lib
1837342a55b46Smrg  need_lib_prefix=no
18374e3d74329Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
18375e3d74329Smrg    need_version=no
1837642a55b46Smrg  else
18377e3d74329Smrg    need_version=yes
1837842a55b46Smrg  fi
18379e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
18380e3d74329Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18381e3d74329Smrg  shlibpath_var=LD_LIBRARY_PATH
18382e3d74329Smrg  shlibpath_overrides_runpath=yes
1838342a55b46Smrg  ;;
1838442a55b46Smrg
1838542a55b46Smrgos2*)
1838642a55b46Smrg  libname_spec='$name'
18387e3d74329Smrg  version_type=windows
18388e3d74329Smrg  shrext_cmds=.dll
18389e3d74329Smrg  need_version=no
1839042a55b46Smrg  need_lib_prefix=no
18391e3d74329Smrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
18392e3d74329Smrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
18393e3d74329Smrg    v=$($ECHO $release$versuffix | tr -d .-);
18394e3d74329Smrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
18395e3d74329Smrg    $ECHO $n$v`$shared_ext'
18396e3d74329Smrg  library_names_spec='${libname}_dll.$libext'
1839742a55b46Smrg  dynamic_linker='OS/2 ld.exe'
18398e3d74329Smrg  shlibpath_var=BEGINLIBPATH
18399e3d74329Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
18400e3d74329Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18401e3d74329Smrg  postinstall_cmds='base_file=`basename \$file`~
18402e3d74329Smrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
18403e3d74329Smrg    dldir=$destdir/`dirname \$dlpath`~
18404e3d74329Smrg    test -d \$dldir || mkdir -p \$dldir~
18405e3d74329Smrg    $install_prog $dir/$dlname \$dldir/$dlname~
18406e3d74329Smrg    chmod a+x \$dldir/$dlname~
18407e3d74329Smrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
18408e3d74329Smrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
18409e3d74329Smrg    fi'
18410e3d74329Smrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
18411e3d74329Smrg    dlpath=$dir/\$dldll~
18412e3d74329Smrg    $RM \$dlpath'
1841342a55b46Smrg  ;;
1841442a55b46Smrg
1841542a55b46Smrgosf3* | osf4* | osf5*)
1841642a55b46Smrg  version_type=osf
1841742a55b46Smrg  need_lib_prefix=no
1841842a55b46Smrg  need_version=no
18419e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
18420e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1842142a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1842242a55b46Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18423e3d74329Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1842442a55b46Smrg  ;;
1842542a55b46Smrg
1842642a55b46Smrgrdos*)
1842742a55b46Smrg  dynamic_linker=no
1842842a55b46Smrg  ;;
1842942a55b46Smrg
1843042a55b46Smrgsolaris*)
1843142a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1843242a55b46Smrg  need_lib_prefix=no
1843342a55b46Smrg  need_version=no
18434e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18435e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1843642a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1843742a55b46Smrg  shlibpath_overrides_runpath=yes
1843842a55b46Smrg  hardcode_into_libs=yes
1843942a55b46Smrg  # ldd complains unless libraries are executable
1844042a55b46Smrg  postinstall_cmds='chmod +x $lib'
1844142a55b46Smrg  ;;
1844242a55b46Smrg
1844342a55b46Smrgsunos4*)
1844442a55b46Smrg  version_type=sunos
18445e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1844642a55b46Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1844742a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1844842a55b46Smrg  shlibpath_overrides_runpath=yes
18449e3d74329Smrg  if test yes = "$with_gnu_ld"; then
1845042a55b46Smrg    need_lib_prefix=no
18451c582b7e3Smrg  fi
1845242a55b46Smrg  need_version=yes
1845342a55b46Smrg  ;;
18454c582b7e3Smrg
1845542a55b46Smrgsysv4 | sysv4.3*)
1845642a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
18457e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18458e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1845942a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1846042a55b46Smrg  case $host_vendor in
1846142a55b46Smrg    sni)
1846242a55b46Smrg      shlibpath_overrides_runpath=no
1846342a55b46Smrg      need_lib_prefix=no
1846442a55b46Smrg      runpath_var=LD_RUN_PATH
1846542a55b46Smrg      ;;
1846642a55b46Smrg    siemens)
1846742a55b46Smrg      need_lib_prefix=no
1846842a55b46Smrg      ;;
1846942a55b46Smrg    motorola)
1847042a55b46Smrg      need_lib_prefix=no
1847142a55b46Smrg      need_version=no
1847242a55b46Smrg      shlibpath_overrides_runpath=no
1847342a55b46Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1847442a55b46Smrg      ;;
1847542a55b46Smrg  esac
1847642a55b46Smrg  ;;
18477c582b7e3Smrg
1847842a55b46Smrgsysv4*MP*)
18479e3d74329Smrg  if test -d /usr/nec; then
1848042a55b46Smrg    version_type=linux # correct to gnu/linux during the next big refactor
18481e3d74329Smrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
18482e3d74329Smrg    soname_spec='$libname$shared_ext.$major'
1848342a55b46Smrg    shlibpath_var=LD_LIBRARY_PATH
1848442a55b46Smrg  fi
1848542a55b46Smrg  ;;
18486c582b7e3Smrg
1848742a55b46Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18488e3d74329Smrg  version_type=sco
1848942a55b46Smrg  need_lib_prefix=no
1849042a55b46Smrg  need_version=no
18491e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
18492e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1849342a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1849442a55b46Smrg  shlibpath_overrides_runpath=yes
1849542a55b46Smrg  hardcode_into_libs=yes
18496e3d74329Smrg  if test yes = "$with_gnu_ld"; then
1849742a55b46Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1849842a55b46Smrg  else
1849942a55b46Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1850042a55b46Smrg    case $host_os in
1850142a55b46Smrg      sco3.2v5*)
1850242a55b46Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18503c582b7e3Smrg	;;
1850442a55b46Smrg    esac
1850542a55b46Smrg  fi
1850642a55b46Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
1850742a55b46Smrg  ;;
1850842a55b46Smrg
1850942a55b46Smrgtpf*)
1851042a55b46Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
1851142a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
1851242a55b46Smrg  need_lib_prefix=no
1851342a55b46Smrg  need_version=no
18514e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1851542a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1851642a55b46Smrg  shlibpath_overrides_runpath=no
1851742a55b46Smrg  hardcode_into_libs=yes
1851842a55b46Smrg  ;;
18519c582b7e3Smrg
1852042a55b46Smrguts4*)
1852142a55b46Smrg  version_type=linux # correct to gnu/linux during the next big refactor
18522e3d74329Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
18523e3d74329Smrg  soname_spec='$libname$release$shared_ext$major'
1852442a55b46Smrg  shlibpath_var=LD_LIBRARY_PATH
1852542a55b46Smrg  ;;
18526c582b7e3Smrg
1852742a55b46Smrg*)
1852842a55b46Smrg  dynamic_linker=no
1852942a55b46Smrg  ;;
1853042a55b46Smrgesac
185318ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
185328ce07328Smrgprintf "%s\n" "$dynamic_linker" >&6; }
18533e3d74329Smrgtest no = "$dynamic_linker" && can_build_shared=no
18534c582b7e3Smrg
1853542a55b46Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18536e3d74329Smrgif test yes = "$GCC"; then
1853742a55b46Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1853842a55b46Smrgfi
18539c582b7e3Smrg
18540e3d74329Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
18541e3d74329Smrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
1854242a55b46Smrgfi
18543e3d74329Smrg
18544e3d74329Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
18545e3d74329Smrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
1854642a55b46Smrgfi
18547c582b7e3Smrg
18548e3d74329Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
18549e3d74329Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
18550e3d74329Smrg
18551e3d74329Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
18552e3d74329Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
18553e3d74329Smrg
18554e3d74329Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
18555e3d74329Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
18556e3d74329Smrg
18557e3d74329Smrg
18558e3d74329Smrg
18559e3d74329Smrg
18560e3d74329Smrg
18561e3d74329Smrg
18562c582b7e3Smrg
18563c582b7e3Smrg
18564c582b7e3Smrg
18565c582b7e3Smrg
18566c582b7e3Smrg
18567c582b7e3Smrg
18568c582b7e3Smrg
18569c582b7e3Smrg
18570c582b7e3Smrg
18571c582b7e3Smrg
18572c582b7e3Smrg
18573c582b7e3Smrg
18574c582b7e3Smrg
18575c582b7e3Smrg
18576c582b7e3Smrg
18577c582b7e3Smrg
18578c582b7e3Smrg
18579c582b7e3Smrg
18580c582b7e3Smrg
18581c582b7e3Smrg
18582c582b7e3Smrg
18583c582b7e3Smrg
18584c582b7e3Smrg
18585c582b7e3Smrg
18586c582b7e3Smrg
18587c582b7e3Smrg
18588c582b7e3Smrg
18589c582b7e3Smrg
18590c582b7e3Smrg
18591c582b7e3Smrg
18592c582b7e3Smrg
18593c582b7e3Smrg
18594c582b7e3Smrg
18595c582b7e3Smrg
18596c582b7e3Smrg
18597c582b7e3Smrg
18598c582b7e3Smrg
18599c582b7e3Smrg
18600c582b7e3Smrg
18601c582b7e3Smrg
18602c582b7e3Smrg
18603c582b7e3Smrg
18604c582b7e3Smrg
18605c582b7e3Smrg
18606c582b7e3Smrg
18607c582b7e3Smrg
18608c582b7e3Smrg
18609c582b7e3Smrg
18610c582b7e3Smrg
18611c582b7e3Smrg
18612c582b7e3Smrg
18613c582b7e3Smrg
18614c582b7e3Smrg
18615c582b7e3Smrg
18616c582b7e3Smrg
18617c582b7e3Smrg
18618c582b7e3Smrg
18619c582b7e3Smrg
18620c582b7e3Smrg
18621c582b7e3Smrg
18622c582b7e3Smrg
18623c582b7e3Smrg
18624c582b7e3Smrg
18625c582b7e3Smrg
18626c582b7e3Smrg
18627c582b7e3Smrg
18628c582b7e3Smrg
18629c582b7e3Smrg
18630c582b7e3Smrg
18631c582b7e3Smrg
18632c582b7e3Smrg
18633c582b7e3Smrg
18634c582b7e3Smrg
1863519019ffeSmrg
18636c582b7e3Smrg
18637c582b7e3Smrg
18638c582b7e3Smrg
18639c582b7e3Smrg
18640c582b7e3Smrg
18641c582b7e3Smrg
18642c582b7e3Smrg
18643c582b7e3Smrg
18644c582b7e3Smrg
18645c582b7e3Smrg
18646c582b7e3Smrg
18647c582b7e3Smrg
18648c582b7e3Smrg
18649c582b7e3Smrg
18650c582b7e3Smrg
18651c582b7e3Smrg
18652c582b7e3Smrg
186538ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
186548ce07328Smrgprintf %s "checking how to hardcode library paths into programs... " >&6; }
1865542a55b46Smrghardcode_action=
1865642a55b46Smrgif test -n "$hardcode_libdir_flag_spec" ||
1865742a55b46Smrg   test -n "$runpath_var" ||
18658e3d74329Smrg   test yes = "$hardcode_automatic"; then
1865942a55b46Smrg
1866042a55b46Smrg  # We can hardcode non-existent directories.
18661e3d74329Smrg  if test no != "$hardcode_direct" &&
1866242a55b46Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1866342a55b46Smrg     # have to relink, otherwise we might link with an installed library
1866442a55b46Smrg     # when we should be linking with a yet-to-be-installed one
18665e3d74329Smrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
18666e3d74329Smrg     test no != "$hardcode_minus_L"; then
1866742a55b46Smrg    # Linking always hardcodes the temporary library directory.
1866842a55b46Smrg    hardcode_action=relink
1866942a55b46Smrg  else
1867042a55b46Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1867142a55b46Smrg    hardcode_action=immediate
1867242a55b46Smrg  fi
1867342a55b46Smrgelse
1867442a55b46Smrg  # We cannot hardcode anything, or else we can only hardcode existing
1867542a55b46Smrg  # directories.
1867642a55b46Smrg  hardcode_action=unsupported
1867742a55b46Smrgfi
186788ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
186798ce07328Smrgprintf "%s\n" "$hardcode_action" >&6; }
18680c582b7e3Smrg
18681e3d74329Smrgif test relink = "$hardcode_action" ||
18682e3d74329Smrg   test yes = "$inherit_rpath"; then
1868342a55b46Smrg  # Fast installation is not supported
1868442a55b46Smrg  enable_fast_install=no
18685e3d74329Smrgelif test yes = "$shlibpath_overrides_runpath" ||
18686e3d74329Smrg     test no = "$enable_shared"; then
1868742a55b46Smrg  # Fast installation is not necessary
1868842a55b46Smrg  enable_fast_install=needless
1868942a55b46Smrgfi
18690c582b7e3Smrg
18691c582b7e3Smrg
18692c582b7e3Smrg
18693c582b7e3Smrg
18694c582b7e3Smrg
18695c582b7e3Smrg
18696e3d74329Smrg  if test yes != "$enable_dlopen"; then
1869742a55b46Smrg  enable_dlopen=unknown
1869842a55b46Smrg  enable_dlopen_self=unknown
1869942a55b46Smrg  enable_dlopen_self_static=unknown
1870042a55b46Smrgelse
1870142a55b46Smrg  lt_cv_dlopen=no
1870242a55b46Smrg  lt_cv_dlopen_libs=
18703c582b7e3Smrg
1870442a55b46Smrg  case $host_os in
1870542a55b46Smrg  beos*)
18706e3d74329Smrg    lt_cv_dlopen=load_add_on
1870742a55b46Smrg    lt_cv_dlopen_libs=
1870842a55b46Smrg    lt_cv_dlopen_self=yes
1870942a55b46Smrg    ;;
18710c582b7e3Smrg
1871142a55b46Smrg  mingw* | pw32* | cegcc*)
18712e3d74329Smrg    lt_cv_dlopen=LoadLibrary
1871342a55b46Smrg    lt_cv_dlopen_libs=
1871442a55b46Smrg    ;;
18715c582b7e3Smrg
1871642a55b46Smrg  cygwin*)
18717e3d74329Smrg    lt_cv_dlopen=dlopen
1871842a55b46Smrg    lt_cv_dlopen_libs=
1871942a55b46Smrg    ;;
18720c582b7e3Smrg
1872142a55b46Smrg  darwin*)
18722e3d74329Smrg    # if libdl is installed we need to link against it
187238ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
187248ce07328Smrgprintf %s "checking for dlopen in -ldl... " >&6; }
187258ce07328Smrgif test ${ac_cv_lib_dl_dlopen+y}
187268ce07328Smrgthen :
187278ce07328Smrg  printf %s "(cached) " >&6
187288ce07328Smrgelse $as_nop
1872942a55b46Smrg  ac_check_lib_save_LIBS=$LIBS
1873042a55b46SmrgLIBS="-ldl  $LIBS"
1873142a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1873242a55b46Smrg/* end confdefs.h.  */
18733c582b7e3Smrg
1873442a55b46Smrg/* Override any GCC internal prototype to avoid an error.
1873542a55b46Smrg   Use char because int might match the return type of a GCC
1873642a55b46Smrg   builtin and then its argument prototype would still apply.  */
1873742a55b46Smrgchar dlopen ();
1873842a55b46Smrgint
187398ce07328Smrgmain (void)
1874042a55b46Smrg{
1874142a55b46Smrgreturn dlopen ();
1874242a55b46Smrg  ;
1874342a55b46Smrg  return 0;
1874442a55b46Smrg}
1874542a55b46Smrg_ACEOF
187468ce07328Smrgif ac_fn_c_try_link "$LINENO"
187478ce07328Smrgthen :
1874842a55b46Smrg  ac_cv_lib_dl_dlopen=yes
187498ce07328Smrgelse $as_nop
1875042a55b46Smrg  ac_cv_lib_dl_dlopen=no
1875142a55b46Smrgfi
187528ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1875342a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1875442a55b46SmrgLIBS=$ac_check_lib_save_LIBS
1875542a55b46Smrgfi
187568ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
187578ce07328Smrgprintf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
187588ce07328Smrgif test "x$ac_cv_lib_dl_dlopen" = xyes
187598ce07328Smrgthen :
18760e3d74329Smrg  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
187618ce07328Smrgelse $as_nop
18762c582b7e3Smrg
18763e3d74329Smrg    lt_cv_dlopen=dyld
1876442a55b46Smrg    lt_cv_dlopen_libs=
1876542a55b46Smrg    lt_cv_dlopen_self=yes
18766c582b7e3Smrg
1876742a55b46Smrgfi
18768c582b7e3Smrg
1876942a55b46Smrg    ;;
18770c582b7e3Smrg
18771e3d74329Smrg  tpf*)
18772e3d74329Smrg    # Don't try to run any link tests for TPF.  We know it's impossible
18773e3d74329Smrg    # because TPF is a cross-compiler, and we know how we open DSOs.
18774e3d74329Smrg    lt_cv_dlopen=dlopen
18775e3d74329Smrg    lt_cv_dlopen_libs=
18776e3d74329Smrg    lt_cv_dlopen_self=no
18777e3d74329Smrg    ;;
18778e3d74329Smrg
1877942a55b46Smrg  *)
1878042a55b46Smrg    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
187818ce07328Smrgif test "x$ac_cv_func_shl_load" = xyes
187828ce07328Smrgthen :
18783e3d74329Smrg  lt_cv_dlopen=shl_load
187848ce07328Smrgelse $as_nop
187858ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
187868ce07328Smrgprintf %s "checking for shl_load in -ldld... " >&6; }
187878ce07328Smrgif test ${ac_cv_lib_dld_shl_load+y}
187888ce07328Smrgthen :
187898ce07328Smrg  printf %s "(cached) " >&6
187908ce07328Smrgelse $as_nop
1879142a55b46Smrg  ac_check_lib_save_LIBS=$LIBS
1879242a55b46SmrgLIBS="-ldld  $LIBS"
1879342a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1879442a55b46Smrg/* end confdefs.h.  */
18795c582b7e3Smrg
1879642a55b46Smrg/* Override any GCC internal prototype to avoid an error.
1879742a55b46Smrg   Use char because int might match the return type of a GCC
1879842a55b46Smrg   builtin and then its argument prototype would still apply.  */
1879942a55b46Smrgchar shl_load ();
1880042a55b46Smrgint
188018ce07328Smrgmain (void)
1880242a55b46Smrg{
1880342a55b46Smrgreturn shl_load ();
1880442a55b46Smrg  ;
1880542a55b46Smrg  return 0;
1880642a55b46Smrg}
1880742a55b46Smrg_ACEOF
188088ce07328Smrgif ac_fn_c_try_link "$LINENO"
188098ce07328Smrgthen :
1881042a55b46Smrg  ac_cv_lib_dld_shl_load=yes
188118ce07328Smrgelse $as_nop
1881242a55b46Smrg  ac_cv_lib_dld_shl_load=no
1881342a55b46Smrgfi
188148ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1881542a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1881642a55b46SmrgLIBS=$ac_check_lib_save_LIBS
1881742a55b46Smrgfi
188188ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
188198ce07328Smrgprintf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
188208ce07328Smrgif test "x$ac_cv_lib_dld_shl_load" = xyes
188218ce07328Smrgthen :
18822e3d74329Smrg  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
188238ce07328Smrgelse $as_nop
1882442a55b46Smrg  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
188258ce07328Smrgif test "x$ac_cv_func_dlopen" = xyes
188268ce07328Smrgthen :
18827e3d74329Smrg  lt_cv_dlopen=dlopen
188288ce07328Smrgelse $as_nop
188298ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
188308ce07328Smrgprintf %s "checking for dlopen in -ldl... " >&6; }
188318ce07328Smrgif test ${ac_cv_lib_dl_dlopen+y}
188328ce07328Smrgthen :
188338ce07328Smrg  printf %s "(cached) " >&6
188348ce07328Smrgelse $as_nop
1883542a55b46Smrg  ac_check_lib_save_LIBS=$LIBS
1883642a55b46SmrgLIBS="-ldl  $LIBS"
1883742a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883842a55b46Smrg/* end confdefs.h.  */
18839c582b7e3Smrg
1884042a55b46Smrg/* Override any GCC internal prototype to avoid an error.
1884142a55b46Smrg   Use char because int might match the return type of a GCC
1884242a55b46Smrg   builtin and then its argument prototype would still apply.  */
1884342a55b46Smrgchar dlopen ();
1884442a55b46Smrgint
188458ce07328Smrgmain (void)
1884642a55b46Smrg{
1884742a55b46Smrgreturn dlopen ();
1884842a55b46Smrg  ;
1884942a55b46Smrg  return 0;
1885042a55b46Smrg}
1885142a55b46Smrg_ACEOF
188528ce07328Smrgif ac_fn_c_try_link "$LINENO"
188538ce07328Smrgthen :
1885442a55b46Smrg  ac_cv_lib_dl_dlopen=yes
188558ce07328Smrgelse $as_nop
1885642a55b46Smrg  ac_cv_lib_dl_dlopen=no
18857c582b7e3Smrgfi
188588ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1885942a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1886042a55b46SmrgLIBS=$ac_check_lib_save_LIBS
18861c582b7e3Smrgfi
188628ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
188638ce07328Smrgprintf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
188648ce07328Smrgif test "x$ac_cv_lib_dl_dlopen" = xyes
188658ce07328Smrgthen :
18866e3d74329Smrg  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
188678ce07328Smrgelse $as_nop
188688ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
188698ce07328Smrgprintf %s "checking for dlopen in -lsvld... " >&6; }
188708ce07328Smrgif test ${ac_cv_lib_svld_dlopen+y}
188718ce07328Smrgthen :
188728ce07328Smrg  printf %s "(cached) " >&6
188738ce07328Smrgelse $as_nop
1887442a55b46Smrg  ac_check_lib_save_LIBS=$LIBS
1887542a55b46SmrgLIBS="-lsvld  $LIBS"
1887642a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887742a55b46Smrg/* end confdefs.h.  */
18878c582b7e3Smrg
1887942a55b46Smrg/* Override any GCC internal prototype to avoid an error.
1888042a55b46Smrg   Use char because int might match the return type of a GCC
1888142a55b46Smrg   builtin and then its argument prototype would still apply.  */
1888242a55b46Smrgchar dlopen ();
1888342a55b46Smrgint
188848ce07328Smrgmain (void)
1888542a55b46Smrg{
1888642a55b46Smrgreturn dlopen ();
1888742a55b46Smrg  ;
1888842a55b46Smrg  return 0;
1888942a55b46Smrg}
1889042a55b46Smrg_ACEOF
188918ce07328Smrgif ac_fn_c_try_link "$LINENO"
188928ce07328Smrgthen :
1889342a55b46Smrg  ac_cv_lib_svld_dlopen=yes
188948ce07328Smrgelse $as_nop
1889542a55b46Smrg  ac_cv_lib_svld_dlopen=no
1889642a55b46Smrgfi
188978ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1889842a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1889942a55b46SmrgLIBS=$ac_check_lib_save_LIBS
1890042a55b46Smrgfi
189018ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
189028ce07328Smrgprintf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
189038ce07328Smrgif test "x$ac_cv_lib_svld_dlopen" = xyes
189048ce07328Smrgthen :
18905e3d74329Smrg  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
189068ce07328Smrgelse $as_nop
189078ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
189088ce07328Smrgprintf %s "checking for dld_link in -ldld... " >&6; }
189098ce07328Smrgif test ${ac_cv_lib_dld_dld_link+y}
189108ce07328Smrgthen :
189118ce07328Smrg  printf %s "(cached) " >&6
189128ce07328Smrgelse $as_nop
1891342a55b46Smrg  ac_check_lib_save_LIBS=$LIBS
1891442a55b46SmrgLIBS="-ldld  $LIBS"
1891542a55b46Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891642a55b46Smrg/* end confdefs.h.  */
18917c582b7e3Smrg
1891842a55b46Smrg/* Override any GCC internal prototype to avoid an error.
1891942a55b46Smrg   Use char because int might match the return type of a GCC
1892042a55b46Smrg   builtin and then its argument prototype would still apply.  */
1892142a55b46Smrgchar dld_link ();
1892242a55b46Smrgint
189238ce07328Smrgmain (void)
1892442a55b46Smrg{
1892542a55b46Smrgreturn dld_link ();
1892642a55b46Smrg  ;
1892742a55b46Smrg  return 0;
1892842a55b46Smrg}
1892942a55b46Smrg_ACEOF
189308ce07328Smrgif ac_fn_c_try_link "$LINENO"
189318ce07328Smrgthen :
1893242a55b46Smrg  ac_cv_lib_dld_dld_link=yes
189338ce07328Smrgelse $as_nop
1893442a55b46Smrg  ac_cv_lib_dld_dld_link=no
1893542a55b46Smrgfi
189368ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
1893742a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
1893842a55b46SmrgLIBS=$ac_check_lib_save_LIBS
1893942a55b46Smrgfi
189408ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
189418ce07328Smrgprintf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
189428ce07328Smrgif test "x$ac_cv_lib_dld_dld_link" = xyes
189438ce07328Smrgthen :
18944e3d74329Smrg  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
1894542a55b46Smrgfi
18946c582b7e3Smrg
18947c582b7e3Smrg
1894842a55b46Smrgfi
18949c582b7e3Smrg
18950c582b7e3Smrg
1895142a55b46Smrgfi
18952c582b7e3Smrg
18953c582b7e3Smrg
1895442a55b46Smrgfi
18955c582b7e3Smrg
18956c582b7e3Smrg
1895742a55b46Smrgfi
18958c582b7e3Smrg
18959c582b7e3Smrg
1896042a55b46Smrgfi
18961c582b7e3Smrg
1896242a55b46Smrg    ;;
1896342a55b46Smrg  esac
18964c582b7e3Smrg
18965e3d74329Smrg  if test no = "$lt_cv_dlopen"; then
1896642a55b46Smrg    enable_dlopen=no
18967e3d74329Smrg  else
18968e3d74329Smrg    enable_dlopen=yes
1896942a55b46Smrg  fi
18970c582b7e3Smrg
1897142a55b46Smrg  case $lt_cv_dlopen in
1897242a55b46Smrg  dlopen)
18973e3d74329Smrg    save_CPPFLAGS=$CPPFLAGS
18974e3d74329Smrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
18975c582b7e3Smrg
18976e3d74329Smrg    save_LDFLAGS=$LDFLAGS
1897742a55b46Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
18978c582b7e3Smrg
18979e3d74329Smrg    save_LIBS=$LIBS
1898042a55b46Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
18981c582b7e3Smrg
189828ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
189838ce07328Smrgprintf %s "checking whether a program can dlopen itself... " >&6; }
189848ce07328Smrgif test ${lt_cv_dlopen_self+y}
189858ce07328Smrgthen :
189868ce07328Smrg  printf %s "(cached) " >&6
189878ce07328Smrgelse $as_nop
18988e3d74329Smrg  	  if test yes = "$cross_compiling"; then :
1898942a55b46Smrg  lt_cv_dlopen_self=cross
18990c582b7e3Smrgelse
1899142a55b46Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1899242a55b46Smrg  lt_status=$lt_dlunknown
1899342a55b46Smrg  cat > conftest.$ac_ext <<_LT_EOF
1899442a55b46Smrg#line $LINENO "configure"
1899542a55b46Smrg#include "confdefs.h"
18996c582b7e3Smrg
1899742a55b46Smrg#if HAVE_DLFCN_H
1899842a55b46Smrg#include <dlfcn.h>
1899942a55b46Smrg#endif
19000c582b7e3Smrg
1900142a55b46Smrg#include <stdio.h>
19002c582b7e3Smrg
1900342a55b46Smrg#ifdef RTLD_GLOBAL
1900442a55b46Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1900542a55b46Smrg#else
1900642a55b46Smrg#  ifdef DL_GLOBAL
1900742a55b46Smrg#    define LT_DLGLOBAL		DL_GLOBAL
1900842a55b46Smrg#  else
1900942a55b46Smrg#    define LT_DLGLOBAL		0
1901042a55b46Smrg#  endif
1901142a55b46Smrg#endif
19012c582b7e3Smrg
1901342a55b46Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1901442a55b46Smrg   find out it does not work in some platform. */
1901542a55b46Smrg#ifndef LT_DLLAZY_OR_NOW
1901642a55b46Smrg#  ifdef RTLD_LAZY
1901742a55b46Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1901842a55b46Smrg#  else
1901942a55b46Smrg#    ifdef DL_LAZY
1902042a55b46Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1902142a55b46Smrg#    else
1902242a55b46Smrg#      ifdef RTLD_NOW
1902342a55b46Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1902442a55b46Smrg#      else
1902542a55b46Smrg#        ifdef DL_NOW
1902642a55b46Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1902742a55b46Smrg#        else
1902842a55b46Smrg#          define LT_DLLAZY_OR_NOW	0
1902942a55b46Smrg#        endif
1903042a55b46Smrg#      endif
1903142a55b46Smrg#    endif
1903242a55b46Smrg#  endif
1903342a55b46Smrg#endif
19034c582b7e3Smrg
19035e3d74329Smrg/* When -fvisibility=hidden is used, assume the code has been annotated
1903642a55b46Smrg   correspondingly for the symbols needed.  */
19037e3d74329Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1903842a55b46Smrgint fnord () __attribute__((visibility("default")));
1903942a55b46Smrg#endif
19040c582b7e3Smrg
1904142a55b46Smrgint fnord () { return 42; }
1904242a55b46Smrgint main ()
1904342a55b46Smrg{
1904442a55b46Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1904542a55b46Smrg  int status = $lt_dlunknown;
19046c582b7e3Smrg
1904742a55b46Smrg  if (self)
1904842a55b46Smrg    {
1904942a55b46Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1905042a55b46Smrg      else
1905142a55b46Smrg        {
1905242a55b46Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1905342a55b46Smrg          else puts (dlerror ());
1905442a55b46Smrg	}
1905542a55b46Smrg      /* dlclose (self); */
1905642a55b46Smrg    }
1905742a55b46Smrg  else
1905842a55b46Smrg    puts (dlerror ());
19059c582b7e3Smrg
1906042a55b46Smrg  return status;
1906142a55b46Smrg}
1906242a55b46Smrg_LT_EOF
1906342a55b46Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
1906442a55b46Smrg  (eval $ac_link) 2>&5
1906542a55b46Smrg  ac_status=$?
190668ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19067e3d74329Smrg  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
1906842a55b46Smrg    (./conftest; exit; ) >&5 2>/dev/null
1906942a55b46Smrg    lt_status=$?
1907042a55b46Smrg    case x$lt_status in
1907142a55b46Smrg      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
1907242a55b46Smrg      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
1907342a55b46Smrg      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
1907442a55b46Smrg    esac
1907542a55b46Smrg  else :
1907642a55b46Smrg    # compilation failed
1907742a55b46Smrg    lt_cv_dlopen_self=no
19078c582b7e3Smrg  fi
19079c582b7e3Smrgfi
1908042a55b46Smrgrm -fr conftest*
19081c582b7e3Smrg
19082c582b7e3Smrg
19083c582b7e3Smrgfi
190848ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
190858ce07328Smrgprintf "%s\n" "$lt_cv_dlopen_self" >&6; }
1908642a55b46Smrg
19087e3d74329Smrg    if test yes = "$lt_cv_dlopen_self"; then
1908842a55b46Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
190898ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
190908ce07328Smrgprintf %s "checking whether a statically linked program can dlopen itself... " >&6; }
190918ce07328Smrgif test ${lt_cv_dlopen_self_static+y}
190928ce07328Smrgthen :
190938ce07328Smrg  printf %s "(cached) " >&6
190948ce07328Smrgelse $as_nop
19095e3d74329Smrg  	  if test yes = "$cross_compiling"; then :
1909642a55b46Smrg  lt_cv_dlopen_self_static=cross
19097c582b7e3Smrgelse
1909842a55b46Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1909942a55b46Smrg  lt_status=$lt_dlunknown
1910042a55b46Smrg  cat > conftest.$ac_ext <<_LT_EOF
1910142a55b46Smrg#line $LINENO "configure"
1910242a55b46Smrg#include "confdefs.h"
19103c582b7e3Smrg
1910442a55b46Smrg#if HAVE_DLFCN_H
1910542a55b46Smrg#include <dlfcn.h>
1910642a55b46Smrg#endif
19107c582b7e3Smrg
1910842a55b46Smrg#include <stdio.h>
19109c582b7e3Smrg
1911042a55b46Smrg#ifdef RTLD_GLOBAL
1911142a55b46Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1911242a55b46Smrg#else
1911342a55b46Smrg#  ifdef DL_GLOBAL
1911442a55b46Smrg#    define LT_DLGLOBAL		DL_GLOBAL
1911542a55b46Smrg#  else
1911642a55b46Smrg#    define LT_DLGLOBAL		0
1911742a55b46Smrg#  endif
1911842a55b46Smrg#endif
19119c582b7e3Smrg
1912042a55b46Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1912142a55b46Smrg   find out it does not work in some platform. */
1912242a55b46Smrg#ifndef LT_DLLAZY_OR_NOW
1912342a55b46Smrg#  ifdef RTLD_LAZY
1912442a55b46Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1912542a55b46Smrg#  else
1912642a55b46Smrg#    ifdef DL_LAZY
1912742a55b46Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1912842a55b46Smrg#    else
1912942a55b46Smrg#      ifdef RTLD_NOW
1913042a55b46Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1913142a55b46Smrg#      else
1913242a55b46Smrg#        ifdef DL_NOW
1913342a55b46Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1913442a55b46Smrg#        else
1913542a55b46Smrg#          define LT_DLLAZY_OR_NOW	0
1913642a55b46Smrg#        endif
1913742a55b46Smrg#      endif
1913842a55b46Smrg#    endif
1913942a55b46Smrg#  endif
1914042a55b46Smrg#endif
19141c582b7e3Smrg
19142e3d74329Smrg/* When -fvisibility=hidden is used, assume the code has been annotated
1914342a55b46Smrg   correspondingly for the symbols needed.  */
19144e3d74329Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1914542a55b46Smrgint fnord () __attribute__((visibility("default")));
1914642a55b46Smrg#endif
19147c582b7e3Smrg
1914842a55b46Smrgint fnord () { return 42; }
1914942a55b46Smrgint main ()
1915042a55b46Smrg{
1915142a55b46Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1915242a55b46Smrg  int status = $lt_dlunknown;
19153c582b7e3Smrg
1915442a55b46Smrg  if (self)
1915542a55b46Smrg    {
1915642a55b46Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1915742a55b46Smrg      else
1915842a55b46Smrg        {
1915942a55b46Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1916042a55b46Smrg          else puts (dlerror ());
1916142a55b46Smrg	}
1916242a55b46Smrg      /* dlclose (self); */
1916342a55b46Smrg    }
19164c582b7e3Smrg  else
1916542a55b46Smrg    puts (dlerror ());
1916642a55b46Smrg
1916742a55b46Smrg  return status;
1916842a55b46Smrg}
1916942a55b46Smrg_LT_EOF
1917042a55b46Smrg  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
1917142a55b46Smrg  (eval $ac_link) 2>&5
1917242a55b46Smrg  ac_status=$?
191738ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19174e3d74329Smrg  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
1917542a55b46Smrg    (./conftest; exit; ) >&5 2>/dev/null
1917642a55b46Smrg    lt_status=$?
1917742a55b46Smrg    case x$lt_status in
1917842a55b46Smrg      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
1917942a55b46Smrg      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
1918042a55b46Smrg      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
1918142a55b46Smrg    esac
1918242a55b46Smrg  else :
1918342a55b46Smrg    # compilation failed
1918442a55b46Smrg    lt_cv_dlopen_self_static=no
19185c582b7e3Smrg  fi
19186c582b7e3Smrgfi
1918742a55b46Smrgrm -fr conftest*
1918842a55b46Smrg
1918942a55b46Smrg
1919042a55b46Smrgfi
191918ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
191928ce07328Smrgprintf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
1919342a55b46Smrg    fi
1919442a55b46Smrg
19195e3d74329Smrg    CPPFLAGS=$save_CPPFLAGS
19196e3d74329Smrg    LDFLAGS=$save_LDFLAGS
19197e3d74329Smrg    LIBS=$save_LIBS
1919842a55b46Smrg    ;;
1919942a55b46Smrg  esac
1920042a55b46Smrg
1920142a55b46Smrg  case $lt_cv_dlopen_self in
1920242a55b46Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1920342a55b46Smrg  *) enable_dlopen_self=unknown ;;
1920442a55b46Smrg  esac
1920542a55b46Smrg
1920642a55b46Smrg  case $lt_cv_dlopen_self_static in
1920742a55b46Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1920842a55b46Smrg  *) enable_dlopen_self_static=unknown ;;
1920942a55b46Smrg  esac
1921042a55b46Smrgfi
19211c582b7e3Smrg
19212c582b7e3Smrg
19213c582b7e3Smrg
19214c582b7e3Smrg
19215c582b7e3Smrg
19216c582b7e3Smrg
19217c582b7e3Smrg
19218c582b7e3Smrg
19219c582b7e3Smrg
19220c582b7e3Smrg
19221c582b7e3Smrg
19222c582b7e3Smrg
19223c582b7e3Smrg
19224c582b7e3Smrg
19225c582b7e3Smrg
1922642a55b46Smrg
1922742a55b46Smrg
1922842a55b46Smrgstriplib=
1922942a55b46Smrgold_striplib=
192308ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
192318ce07328Smrgprintf %s "checking whether stripping libraries is possible... " >&6; }
192328ce07328Smrgif test -z "$STRIP"; then
192338ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
192348ce07328Smrgprintf "%s\n" "no" >&6; }
192358ce07328Smrgelse
192368ce07328Smrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
192378ce07328Smrg    old_striplib="$STRIP --strip-debug"
192388ce07328Smrg    striplib="$STRIP --strip-unneeded"
192398ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
192408ce07328Smrgprintf "%s\n" "yes" >&6; }
192418ce07328Smrg  else
192428ce07328Smrg    case $host_os in
192438ce07328Smrg    darwin*)
192448ce07328Smrg      # FIXME - insert some real tests, host_os isn't really good enough
1924542a55b46Smrg      striplib="$STRIP -x"
1924642a55b46Smrg      old_striplib="$STRIP -S"
192478ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
192488ce07328Smrgprintf "%s\n" "yes" >&6; }
192498ce07328Smrg      ;;
192508ce07328Smrg    freebsd*)
192518ce07328Smrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
192528ce07328Smrg        old_striplib="$STRIP --strip-debug"
192538ce07328Smrg        striplib="$STRIP --strip-unneeded"
192548ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
192558ce07328Smrgprintf "%s\n" "yes" >&6; }
192568ce07328Smrg      else
192578ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
192588ce07328Smrgprintf "%s\n" "no" >&6; }
192598ce07328Smrg      fi
192608ce07328Smrg      ;;
192618ce07328Smrg    *)
192628ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
192638ce07328Smrgprintf "%s\n" "no" >&6; }
192648ce07328Smrg      ;;
192658ce07328Smrg    esac
192668ce07328Smrg  fi
1926742a55b46Smrgfi
19268c582b7e3Smrg
19269c582b7e3Smrg
19270c582b7e3Smrg
19271c582b7e3Smrg
19272c582b7e3Smrg
19273c582b7e3Smrg
19274c582b7e3Smrg
19275c582b7e3Smrg
19276c582b7e3Smrg
19277c582b7e3Smrg
19278c582b7e3Smrg
19279c582b7e3Smrg
19280e3d74329Smrg  # Report what library types will actually be built
192818ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
192828ce07328Smrgprintf %s "checking if libtool supports shared libraries... " >&6; }
192838ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
192848ce07328Smrgprintf "%s\n" "$can_build_shared" >&6; }
1928542a55b46Smrg
192868ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
192878ce07328Smrgprintf %s "checking whether to build shared libraries... " >&6; }
19288e3d74329Smrg  test no = "$can_build_shared" && enable_shared=no
1928942a55b46Smrg
1929042a55b46Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
1929142a55b46Smrg  # are all built from PIC.
1929242a55b46Smrg  case $host_os in
1929342a55b46Smrg  aix3*)
19294e3d74329Smrg    test yes = "$enable_shared" && enable_static=no
1929542a55b46Smrg    if test -n "$RANLIB"; then
1929642a55b46Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
1929742a55b46Smrg      postinstall_cmds='$RANLIB $lib'
1929842a55b46Smrg    fi
1929942a55b46Smrg    ;;
1930042a55b46Smrg
1930142a55b46Smrg  aix[4-9]*)
19302e3d74329Smrg    if test ia64 != "$host_cpu"; then
19303e3d74329Smrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
19304e3d74329Smrg      yes,aix,yes) ;;			# shared object as lib.so file only
19305e3d74329Smrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
19306e3d74329Smrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
19307e3d74329Smrg      esac
1930842a55b46Smrg    fi
1930942a55b46Smrg    ;;
1931042a55b46Smrg  esac
193118ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
193128ce07328Smrgprintf "%s\n" "$enable_shared" >&6; }
19313c582b7e3Smrg
193148ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
193158ce07328Smrgprintf %s "checking whether to build static libraries... " >&6; }
1931642a55b46Smrg  # Make sure either enable_shared or enable_static is yes.
19317e3d74329Smrg  test yes = "$enable_shared" || enable_static=yes
193188ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
193198ce07328Smrgprintf "%s\n" "$enable_static" >&6; }
19320c582b7e3Smrg
19321c582b7e3Smrg
19322c582b7e3Smrg
19323c582b7e3Smrg
1932442a55b46Smrgfi
19325c582b7e3Smrgac_ext=c
19326c582b7e3Smrgac_cpp='$CPP $CPPFLAGS'
19327c582b7e3Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19328c582b7e3Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19329c582b7e3Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
19330c582b7e3Smrg
19331e3d74329SmrgCC=$lt_save_CC
19332c582b7e3Smrg
19333c582b7e3Smrg
1933419019ffeSmrg
19335c582b7e3Smrg
19336c582b7e3Smrg
19337c582b7e3Smrg
19338c582b7e3Smrg
1933942a55b46Smrg
1934042a55b46Smrg
1934142a55b46Smrg
1934242a55b46Smrg
1934342a55b46Smrg
1934442a55b46Smrg
1934542a55b46Smrg
1934642a55b46Smrg
1934742a55b46Smrg        ac_config_commands="$ac_config_commands libtool"
1934842a55b46Smrg
1934942a55b46Smrg
1935042a55b46Smrg
1935142a55b46Smrg
1935242a55b46Smrg# Only expand once:
19353c582b7e3Smrg
19354c582b7e3Smrg
19355c582b7e3Smrg
19356c582b7e3Smrgif test "x$GCC" = "xyes"; then
19357c582b7e3Smrg	CPPFLAGS="$CPPFLAGS -Wall"
19358c582b7e3Smrgfi
19359c582b7e3Smrg
19360c582b7e3Smrg
19361c582b7e3Smrg
1936242a55b46Smrg# Define a configure option for an alternate module directory
19363c582b7e3Smrg
19364c582b7e3Smrg# Check whether --with-xorg-module-dir was given.
193658ce07328Smrgif test ${with_xorg_module_dir+y}
193668ce07328Smrgthen :
19367c582b7e3Smrg  withval=$with_xorg_module_dir; moduledir="$withval"
193688ce07328Smrgelse $as_nop
19369c582b7e3Smrg  moduledir="$libdir/xorg/modules"
19370c582b7e3Smrgfi
19371c582b7e3Smrg
19372c582b7e3Smrg
19373c582b7e3Smrg# Check whether --enable-dri was given.
193748ce07328Smrgif test ${enable_dri+y}
193758ce07328Smrgthen :
19376c582b7e3Smrg  enableval=$enable_dri; DRI="$enableval"
193778ce07328Smrgelse $as_nop
19378c582b7e3Smrg  DRI=auto
19379c582b7e3Smrgfi
19380c582b7e3Smrg
19381c582b7e3Smrg
1938242a55b46Smrg# Check whether --enable-exa was given.
193838ce07328Smrgif test ${enable_exa+y}
193848ce07328Smrgthen :
1938542a55b46Smrg  enableval=$enable_exa; EXA="$enableval"
193868ce07328Smrgelse $as_nop
1938742a55b46Smrg  EXA=yes
19388c582b7e3Smrgfi
19389c582b7e3Smrg
1939042a55b46Smrg
1939142a55b46Smrg# Store the list of server defined optional extensions in REQUIRED_MODULES
19392c582b7e3Smrg
19393c582b7e3Smrg
19394c582b7e3Smrg	SAVE_CFLAGS="$CFLAGS"
1939542a55b46Smrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
1939642a55b46Smrg	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19397c582b7e3Smrg/* end confdefs.h.  */
19398c582b7e3Smrg
19399c582b7e3Smrg#include "xorg-server.h"
19400c582b7e3Smrg#if !defined RANDR
19401c582b7e3Smrg#error RANDR not defined
19402c582b7e3Smrg#endif
19403c582b7e3Smrg
19404c582b7e3Smrgint
194058ce07328Smrgmain (void)
19406c582b7e3Smrg{
19407c582b7e3Smrg
19408c582b7e3Smrg  ;
19409c582b7e3Smrg  return 0;
19410c582b7e3Smrg}
19411c582b7e3Smrg_ACEOF
194128ce07328Smrgif ac_fn_c_try_compile "$LINENO"
194138ce07328Smrgthen :
19414c582b7e3Smrg  _EXT_CHECK=yes
194158ce07328Smrgelse $as_nop
1941642a55b46Smrg  _EXT_CHECK=no
19417c582b7e3Smrgfi
194188ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19419c582b7e3Smrg	CFLAGS="$SAVE_CFLAGS"
194208ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RANDR is defined" >&5
194218ce07328Smrgprintf %s "checking if RANDR is defined... " >&6; }
194228ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5
194238ce07328Smrgprintf "%s\n" "$_EXT_CHECK" >&6; }
19424c582b7e3Smrg	if test "$_EXT_CHECK" != no; then
19425c582b7e3Smrg		REQUIRED_MODULES="$REQUIRED_MODULES randrproto"
19426c582b7e3Smrg	fi
19427c582b7e3Smrg
19428c582b7e3Smrg
1942942a55b46Smrg
19430c582b7e3Smrg	SAVE_CFLAGS="$CFLAGS"
1943142a55b46Smrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
1943242a55b46Smrg	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19433c582b7e3Smrg/* end confdefs.h.  */
19434c582b7e3Smrg
19435c582b7e3Smrg#include "xorg-server.h"
19436c582b7e3Smrg#if !defined RENDER
19437c582b7e3Smrg#error RENDER not defined
19438c582b7e3Smrg#endif
19439c582b7e3Smrg
19440c582b7e3Smrgint
194418ce07328Smrgmain (void)
19442c582b7e3Smrg{
19443c582b7e3Smrg
19444c582b7e3Smrg  ;
19445c582b7e3Smrg  return 0;
19446c582b7e3Smrg}
19447c582b7e3Smrg_ACEOF
194488ce07328Smrgif ac_fn_c_try_compile "$LINENO"
194498ce07328Smrgthen :
19450c582b7e3Smrg  _EXT_CHECK=yes
194518ce07328Smrgelse $as_nop
1945242a55b46Smrg  _EXT_CHECK=no
19453c582b7e3Smrgfi
194548ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19455c582b7e3Smrg	CFLAGS="$SAVE_CFLAGS"
194568ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RENDER is defined" >&5
194578ce07328Smrgprintf %s "checking if RENDER is defined... " >&6; }
194588ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5
194598ce07328Smrgprintf "%s\n" "$_EXT_CHECK" >&6; }
19460c582b7e3Smrg	if test "$_EXT_CHECK" != no; then
19461c582b7e3Smrg		REQUIRED_MODULES="$REQUIRED_MODULES renderproto"
19462c582b7e3Smrg	fi
19463c582b7e3Smrg
19464c582b7e3Smrg
1946542a55b46Smrg
19466c582b7e3Smrg	SAVE_CFLAGS="$CFLAGS"
1946742a55b46Smrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
1946842a55b46Smrg	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19469c582b7e3Smrg/* end confdefs.h.  */
19470c582b7e3Smrg
19471c582b7e3Smrg#include "xorg-server.h"
19472c582b7e3Smrg#if !defined XV
19473c582b7e3Smrg#error XV not defined
19474c582b7e3Smrg#endif
19475c582b7e3Smrg
19476c582b7e3Smrgint
194778ce07328Smrgmain (void)
19478c582b7e3Smrg{
19479c582b7e3Smrg
19480c582b7e3Smrg  ;
19481c582b7e3Smrg  return 0;
19482c582b7e3Smrg}
19483c582b7e3Smrg_ACEOF
194848ce07328Smrgif ac_fn_c_try_compile "$LINENO"
194858ce07328Smrgthen :
19486c582b7e3Smrg  _EXT_CHECK=yes
194878ce07328Smrgelse $as_nop
1948842a55b46Smrg  _EXT_CHECK=no
19489c582b7e3Smrgfi
194908ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19491c582b7e3Smrg	CFLAGS="$SAVE_CFLAGS"
194928ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if XV is defined" >&5
194938ce07328Smrgprintf %s "checking if XV is defined... " >&6; }
194948ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5
194958ce07328Smrgprintf "%s\n" "$_EXT_CHECK" >&6; }
19496c582b7e3Smrg	if test "$_EXT_CHECK" != no; then
19497c582b7e3Smrg		REQUIRED_MODULES="$REQUIRED_MODULES videoproto"
19498c582b7e3Smrg	fi
19499c582b7e3Smrg
19500c582b7e3Smrg
1950142a55b46Smrg
19502c582b7e3Smrg	SAVE_CFLAGS="$CFLAGS"
1950342a55b46Smrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
1950442a55b46Smrg	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19505c582b7e3Smrg/* end confdefs.h.  */
19506c582b7e3Smrg
19507c582b7e3Smrg#include "xorg-server.h"
19508c582b7e3Smrg#if !defined XF86MISC
19509c582b7e3Smrg#error XF86MISC not defined
19510c582b7e3Smrg#endif
19511c582b7e3Smrg
19512c582b7e3Smrgint
195138ce07328Smrgmain (void)
19514c582b7e3Smrg{
19515c582b7e3Smrg
19516c582b7e3Smrg  ;
19517c582b7e3Smrg  return 0;
19518c582b7e3Smrg}
19519c582b7e3Smrg_ACEOF
195208ce07328Smrgif ac_fn_c_try_compile "$LINENO"
195218ce07328Smrgthen :
19522c582b7e3Smrg  _EXT_CHECK=yes
195238ce07328Smrgelse $as_nop
1952442a55b46Smrg  _EXT_CHECK=no
19525c582b7e3Smrgfi
195268ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19527c582b7e3Smrg	CFLAGS="$SAVE_CFLAGS"
195288ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if XF86MISC is defined" >&5
195298ce07328Smrgprintf %s "checking if XF86MISC is defined... " >&6; }
195308ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5
195318ce07328Smrgprintf "%s\n" "$_EXT_CHECK" >&6; }
19532c582b7e3Smrg	if test "$_EXT_CHECK" != no; then
19533c582b7e3Smrg		REQUIRED_MODULES="$REQUIRED_MODULES xf86miscproto"
19534c582b7e3Smrg	fi
19535c582b7e3Smrg
19536c582b7e3Smrg
1953742a55b46Smrg
19538c582b7e3Smrg	SAVE_CFLAGS="$CFLAGS"
1953942a55b46Smrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
1954042a55b46Smrg	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19541c582b7e3Smrg/* end confdefs.h.  */
19542c582b7e3Smrg
19543c582b7e3Smrg#include "xorg-server.h"
19544c582b7e3Smrg#if !defined DPMSExtension
19545c582b7e3Smrg#error DPMSExtension not defined
19546c582b7e3Smrg#endif
19547c582b7e3Smrg
19548c582b7e3Smrgint
195498ce07328Smrgmain (void)
19550c582b7e3Smrg{
19551c582b7e3Smrg
19552c582b7e3Smrg  ;
19553c582b7e3Smrg  return 0;
19554c582b7e3Smrg}
19555c582b7e3Smrg_ACEOF
195568ce07328Smrgif ac_fn_c_try_compile "$LINENO"
195578ce07328Smrgthen :
19558c582b7e3Smrg  _EXT_CHECK=yes
195598ce07328Smrgelse $as_nop
1956042a55b46Smrg  _EXT_CHECK=no
19561c582b7e3Smrgfi
195628ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19563c582b7e3Smrg	CFLAGS="$SAVE_CFLAGS"
195648ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if DPMSExtension is defined" >&5
195658ce07328Smrgprintf %s "checking if DPMSExtension is defined... " >&6; }
195668ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5
195678ce07328Smrgprintf "%s\n" "$_EXT_CHECK" >&6; }
19568c582b7e3Smrg	if test "$_EXT_CHECK" != no; then
19569c582b7e3Smrg		REQUIRED_MODULES="$REQUIRED_MODULES xextproto"
19570c582b7e3Smrg	fi
19571c582b7e3Smrg
19572c582b7e3Smrg
1957342a55b46Smrg# Obtain compiler/linker options for the driver dependencies
19574c582b7e3Smrg
19575c582b7e3Smrgpkg_failed=no
195768ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XORG" >&5
195778ce07328Smrgprintf %s "checking for XORG... " >&6; }
19578c582b7e3Smrg
19579c582b7e3Smrgif test -n "$XORG_CFLAGS"; then
19580c582b7e3Smrg    pkg_cv_XORG_CFLAGS="$XORG_CFLAGS"
19581c582b7e3Smrg elif test -n "$PKG_CONFIG"; then
19582c582b7e3Smrg    if test -n "$PKG_CONFIG" && \
195838ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.3 xproto fontsproto \$REQUIRED_MODULES\""; } >&5
19584e3d74329Smrg  ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES") 2>&5
19585c582b7e3Smrg  ac_status=$?
195868ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1958742a55b46Smrg  test $ac_status = 0; }; then
19588e3d74329Smrg  pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES" 2>/dev/null`
195890496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
19590c582b7e3Smrgelse
19591c582b7e3Smrg  pkg_failed=yes
19592c582b7e3Smrgfi
19593c582b7e3Smrg else
19594c582b7e3Smrg    pkg_failed=untried
19595c582b7e3Smrgfi
19596c582b7e3Smrgif test -n "$XORG_LIBS"; then
19597c582b7e3Smrg    pkg_cv_XORG_LIBS="$XORG_LIBS"
19598c582b7e3Smrg elif test -n "$PKG_CONFIG"; then
19599c582b7e3Smrg    if test -n "$PKG_CONFIG" && \
196008ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.3 xproto fontsproto \$REQUIRED_MODULES\""; } >&5
19601e3d74329Smrg  ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES") 2>&5
19602c582b7e3Smrg  ac_status=$?
196038ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1960442a55b46Smrg  test $ac_status = 0; }; then
19605e3d74329Smrg  pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES" 2>/dev/null`
196060496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
19607c582b7e3Smrgelse
19608c582b7e3Smrg  pkg_failed=yes
19609c582b7e3Smrgfi
19610c582b7e3Smrg else
19611c582b7e3Smrg    pkg_failed=untried
19612c582b7e3Smrgfi
19613c582b7e3Smrg
19614c582b7e3Smrg
19615c582b7e3Smrg
19616c582b7e3Smrgif test $pkg_failed = yes; then
196178ce07328Smrg   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
196188ce07328Smrgprintf "%s\n" "no" >&6; }
19619c582b7e3Smrg
19620c582b7e3Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19621c582b7e3Smrg        _pkg_short_errors_supported=yes
19622c582b7e3Smrgelse
19623c582b7e3Smrg        _pkg_short_errors_supported=no
19624c582b7e3Smrgfi
19625c582b7e3Smrg        if test $_pkg_short_errors_supported = yes; then
19626e3d74329Smrg	        XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES" 2>&1`
19627c582b7e3Smrg        else
19628e3d74329Smrg	        XORG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES" 2>&1`
19629c582b7e3Smrg        fi
19630c582b7e3Smrg	# Put the nasty error message in config.log where it belongs
19631c582b7e3Smrg	echo "$XORG_PKG_ERRORS" >&5
19632c582b7e3Smrg
19633e3d74329Smrg	as_fn_error $? "Package requirements (xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES) were not met:
19634c582b7e3Smrg
19635c582b7e3Smrg$XORG_PKG_ERRORS
19636c582b7e3Smrg
19637c582b7e3SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
19638c582b7e3Smrginstalled software in a non-standard prefix.
19639c582b7e3Smrg
19640c582b7e3SmrgAlternatively, you may set the environment variables XORG_CFLAGS
19641c582b7e3Smrgand XORG_LIBS to avoid the need to call pkg-config.
1964242a55b46SmrgSee the pkg-config man page for more details." "$LINENO" 5
19643c582b7e3Smrgelif test $pkg_failed = untried; then
196448ce07328Smrg     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
196458ce07328Smrgprintf "%s\n" "no" >&6; }
196468ce07328Smrg	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
196478ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
1964842a55b46Smrgas_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
19649c582b7e3Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
19650c582b7e3Smrgpath to pkg-config.
19651c582b7e3Smrg
19652c582b7e3SmrgAlternatively, you may set the environment variables XORG_CFLAGS
19653c582b7e3Smrgand XORG_LIBS to avoid the need to call pkg-config.
19654c582b7e3SmrgSee the pkg-config man page for more details.
19655c582b7e3Smrg
19656c582b7e3SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.
1965742a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
19658c582b7e3Smrgelse
19659c582b7e3Smrg	XORG_CFLAGS=$pkg_cv_XORG_CFLAGS
19660c582b7e3Smrg	XORG_LIBS=$pkg_cv_XORG_LIBS
196618ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
196628ce07328Smrgprintf "%s\n" "yes" >&6; }
1966342a55b46Smrg
19664c582b7e3Smrgfi
1966519019ffeSmrg
1966619019ffeSmrgpkg_failed=no
196678ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5
196688ce07328Smrgprintf %s "checking for XEXT... " >&6; }
1966919019ffeSmrg
1967019019ffeSmrgif test -n "$XEXT_CFLAGS"; then
1967119019ffeSmrg    pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS"
1967219019ffeSmrg elif test -n "$PKG_CONFIG"; then
1967319019ffeSmrg    if test -n "$PKG_CONFIG" && \
196748ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5
1967519019ffeSmrg  ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5
1967619019ffeSmrg  ac_status=$?
196778ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1967842a55b46Smrg  test $ac_status = 0; }; then
1967919019ffeSmrg  pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xextproto >= 7.0.99.1" 2>/dev/null`
196800496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
1968119019ffeSmrgelse
1968219019ffeSmrg  pkg_failed=yes
1968319019ffeSmrgfi
1968419019ffeSmrg else
1968519019ffeSmrg    pkg_failed=untried
1968619019ffeSmrgfi
1968719019ffeSmrgif test -n "$XEXT_LIBS"; then
1968819019ffeSmrg    pkg_cv_XEXT_LIBS="$XEXT_LIBS"
1968919019ffeSmrg elif test -n "$PKG_CONFIG"; then
1969019019ffeSmrg    if test -n "$PKG_CONFIG" && \
196918ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5
1969219019ffeSmrg  ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5
1969319019ffeSmrg  ac_status=$?
196948ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1969542a55b46Smrg  test $ac_status = 0; }; then
1969619019ffeSmrg  pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xextproto >= 7.0.99.1" 2>/dev/null`
196970496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
1969819019ffeSmrgelse
1969919019ffeSmrg  pkg_failed=yes
1970019019ffeSmrgfi
1970119019ffeSmrg else
1970219019ffeSmrg    pkg_failed=untried
1970319019ffeSmrgfi
1970419019ffeSmrg
1970519019ffeSmrg
1970619019ffeSmrg
1970719019ffeSmrgif test $pkg_failed = yes; then
197088ce07328Smrg   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
197098ce07328Smrgprintf "%s\n" "no" >&6; }
1971019019ffeSmrg
1971119019ffeSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1971219019ffeSmrg        _pkg_short_errors_supported=yes
1971319019ffeSmrgelse
1971419019ffeSmrg        _pkg_short_errors_supported=no
1971519019ffeSmrgfi
1971619019ffeSmrg        if test $_pkg_short_errors_supported = yes; then
197170496e070Smrg	        XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xextproto >= 7.0.99.1" 2>&1`
1971819019ffeSmrg        else
197190496e070Smrg	        XEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xextproto >= 7.0.99.1" 2>&1`
1972019019ffeSmrg        fi
1972119019ffeSmrg	# Put the nasty error message in config.log where it belongs
1972219019ffeSmrg	echo "$XEXT_PKG_ERRORS" >&5
1972319019ffeSmrg
1972442a55b46Smrg	HAVE_XEXTPROTO_71="no"
1972519019ffeSmrgelif test $pkg_failed = untried; then
197268ce07328Smrg     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
197278ce07328Smrgprintf "%s\n" "no" >&6; }
1972819019ffeSmrg	HAVE_XEXTPROTO_71="no"
1972919019ffeSmrgelse
1973019019ffeSmrg	XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS
1973119019ffeSmrg	XEXT_LIBS=$pkg_cv_XEXT_LIBS
197328ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
197338ce07328Smrgprintf "%s\n" "yes" >&6; }
1973419019ffeSmrg	HAVE_XEXTPROTO_71="yes";
197358ce07328Smrgprintf "%s\n" "#define HAVE_XEXTPROTO_71 1" >>confdefs.h
1973619019ffeSmrg
1973719019ffeSmrgfi
1973819019ffeSmrg if  test "$HAVE_XEXTPROTO_71" = "yes" ; then
1973919019ffeSmrg  HAVE_XEXTPROTO_71_TRUE=
1974019019ffeSmrg  HAVE_XEXTPROTO_71_FALSE='#'
1974119019ffeSmrgelse
1974219019ffeSmrg  HAVE_XEXTPROTO_71_TRUE='#'
1974342a55b46Smrg  HAVE_XEXTPROTO_71_FALSE=
19744c582b7e3Smrgfi
19745c582b7e3Smrg
1974642a55b46Smrgsdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
19747c582b7e3Smrg
1974842a55b46Smrg# Checks for libraries.
19749c582b7e3Smrg
19750c582b7e3Smrgif test "$DRI" != no; then
19751cd241713Smrg	if test -f "${sdkdir}/dri.h"; then
19752cd241713Smrg		have_dri_h="yes"
19753cd241713Smrg	else
19754cd241713Smrg		have_dri_h="no"
19755cd241713Smrg	fi
19756cd241713Smrg	if test -f "${sdkdir}/sarea.h"; then
19757cd241713Smrg		have_sarea_h="yes"
19758cd241713Smrg	else
19759cd241713Smrg		have_sarea_h="no"
19760cd241713Smrg	fi
19761cd241713Smrg	if test -f "${sdkdir}/dristruct.h"; then
19762cd241713Smrg		have_dristruct_h="yes"
19763cd241713Smrg	else
19764cd241713Smrg		have_dristruct_h="no"
19765cd241713Smrg	fi
19766cd241713Smrg	if test -f "${sdkdir}/damage.h"; then
19767cd241713Smrg		have_damage_h="yes"
19768cd241713Smrg	else
19769cd241713Smrg		have_damage_h="no"
19770cd241713Smrg	fi
1977142a55b46Smrgfi
1977242a55b46Smrg
197738ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to include DRI support" >&5
197748ce07328Smrgprintf %s "checking whether to include DRI support... " >&6; }
1977542a55b46Smrgif test x$DRI = xauto; then
1977642a55b46Smrg	if test "$have_dri_h" = yes -a \
1977742a55b46Smrg                "$have_sarea_h" = yes -a \
1977842a55b46Smrg                "$have_dristruct_h" = yes; then
1977942a55b46Smrg		DRI="yes"
1978042a55b46Smrg	else
1978142a55b46Smrg		DRI="no"
1978242a55b46Smrg	fi
1978342a55b46Smrgfi
197848ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DRI" >&5
197858ce07328Smrgprintf "%s\n" "$DRI" >&6; }
1978642a55b46Smrg
1978742a55b46Smrg if test x$DRI = xyes; then
1978842a55b46Smrg  DRI_TRUE=
1978942a55b46Smrg  DRI_FALSE='#'
1979042a55b46Smrgelse
1979142a55b46Smrg  DRI_TRUE='#'
1979242a55b46Smrg  DRI_FALSE=
1979342a55b46Smrgfi
1979442a55b46Smrg
1979542a55b46Smrgif test "$DRI" = yes; then
1979642a55b46Smrg
1979742a55b46Smrgpkg_failed=no
197988ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DRI" >&5
197998ce07328Smrgprintf %s "checking for DRI... " >&6; }
1980042a55b46Smrg
1980142a55b46Smrgif test -n "$DRI_CFLAGS"; then
1980242a55b46Smrg    pkg_cv_DRI_CFLAGS="$DRI_CFLAGS"
1980342a55b46Smrg elif test -n "$PKG_CONFIG"; then
1980442a55b46Smrg    if test -n "$PKG_CONFIG" && \
198058ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto\""; } >&5
1980642a55b46Smrg  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto") 2>&5
1980742a55b46Smrg  ac_status=$?
198088ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1980942a55b46Smrg  test $ac_status = 0; }; then
1981042a55b46Smrg  pkg_cv_DRI_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.2 xf86driproto" 2>/dev/null`
198110496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
1981242a55b46Smrgelse
1981342a55b46Smrg  pkg_failed=yes
1981442a55b46Smrgfi
1981542a55b46Smrg else
1981642a55b46Smrg    pkg_failed=untried
1981742a55b46Smrgfi
1981842a55b46Smrgif test -n "$DRI_LIBS"; then
1981942a55b46Smrg    pkg_cv_DRI_LIBS="$DRI_LIBS"
1982042a55b46Smrg elif test -n "$PKG_CONFIG"; then
1982142a55b46Smrg    if test -n "$PKG_CONFIG" && \
198228ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.2 xf86driproto\""; } >&5
1982342a55b46Smrg  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.2 xf86driproto") 2>&5
1982442a55b46Smrg  ac_status=$?
198258ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1982642a55b46Smrg  test $ac_status = 0; }; then
1982742a55b46Smrg  pkg_cv_DRI_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.2 xf86driproto" 2>/dev/null`
198280496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
1982942a55b46Smrgelse
1983042a55b46Smrg  pkg_failed=yes
1983142a55b46Smrgfi
1983242a55b46Smrg else
1983342a55b46Smrg    pkg_failed=untried
1983442a55b46Smrgfi
1983542a55b46Smrg
1983642a55b46Smrg
1983742a55b46Smrg
1983842a55b46Smrgif test $pkg_failed = yes; then
198398ce07328Smrg   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
198408ce07328Smrgprintf "%s\n" "no" >&6; }
1984142a55b46Smrg
1984242a55b46Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1984342a55b46Smrg        _pkg_short_errors_supported=yes
1984442a55b46Smrgelse
1984542a55b46Smrg        _pkg_short_errors_supported=no
1984642a55b46Smrgfi
1984742a55b46Smrg        if test $_pkg_short_errors_supported = yes; then
198480496e070Smrg	        DRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm >= 2.2 xf86driproto" 2>&1`
1984942a55b46Smrg        else
198500496e070Smrg	        DRI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm >= 2.2 xf86driproto" 2>&1`
1985142a55b46Smrg        fi
1985242a55b46Smrg	# Put the nasty error message in config.log where it belongs
1985342a55b46Smrg	echo "$DRI_PKG_ERRORS" >&5
1985442a55b46Smrg
1985542a55b46Smrg	as_fn_error $? "Package requirements (libdrm >= 2.2 xf86driproto) were not met:
1985642a55b46Smrg
1985742a55b46Smrg$DRI_PKG_ERRORS
1985842a55b46Smrg
1985942a55b46SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
1986042a55b46Smrginstalled software in a non-standard prefix.
1986142a55b46Smrg
1986242a55b46SmrgAlternatively, you may set the environment variables DRI_CFLAGS
1986342a55b46Smrgand DRI_LIBS to avoid the need to call pkg-config.
1986442a55b46SmrgSee the pkg-config man page for more details." "$LINENO" 5
1986542a55b46Smrgelif test $pkg_failed = untried; then
198668ce07328Smrg     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
198678ce07328Smrgprintf "%s\n" "no" >&6; }
198688ce07328Smrg	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
198698ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
1987042a55b46Smrgas_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
1987142a55b46Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
1987242a55b46Smrgpath to pkg-config.
1987342a55b46Smrg
1987442a55b46SmrgAlternatively, you may set the environment variables DRI_CFLAGS
1987542a55b46Smrgand DRI_LIBS to avoid the need to call pkg-config.
1987642a55b46SmrgSee the pkg-config man page for more details.
1987742a55b46Smrg
1987842a55b46SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.
1987942a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
1988042a55b46Smrgelse
1988142a55b46Smrg	DRI_CFLAGS=$pkg_cv_DRI_CFLAGS
1988242a55b46Smrg	DRI_LIBS=$pkg_cv_DRI_LIBS
198838ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
198848ce07328Smrgprintf "%s\n" "yes" >&6; }
1988542a55b46Smrg
1988642a55b46Smrgfi
1988742a55b46Smrg
198888ce07328Smrgprintf "%s\n" "#define R128DRI 1" >>confdefs.h
1988942a55b46Smrg
1989042a55b46Smrg
198918ce07328Smrgprintf "%s\n" "#define R128DRI_DEVEL 1" >>confdefs.h
1989242a55b46Smrg
1989342a55b46Smrgfi
1989442a55b46Smrg
1989542a55b46SmrgSAVE_CPPFLAGS="$CPPFLAGS"
1989642a55b46SmrgCPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
1989742a55b46Smrg# Properly handle EXA.
198988ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable EXA support" >&5
198998ce07328Smrgprintf %s "checking whether to enable EXA support... " >&6; }
1990042a55b46Smrgif test "x$EXA" = xyes; then
199018ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
199028ce07328Smrgprintf "%s\n" "yes" >&6; }
199038ce07328Smrg        if test -f "${sdkdir}/exa.h"
199048ce07328Smrgthen :
1990542a55b46Smrg  have_exa_h="yes"
199068ce07328Smrgelse $as_nop
1990742a55b46Smrg  have_exa_h="no"
1990842a55b46Smrgfi
1990942a55b46Smrgelse
199108ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
199118ce07328Smrgprintf "%s\n" "no" >&6; }
1991242a55b46Smrgfi
1991342a55b46Smrg
1991442a55b46SmrgSAVE_CPPFLAGS="$CPPFLAGS"
1991542a55b46SmrgCPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
1991642a55b46Smrgif test "x$have_exa_h" = xyes; then
199178ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether EXA version is at least 2.0.0" >&5
199188ce07328Smrgprintf %s "checking whether EXA version is at least 2.0.0... " >&6; }
199198ce07328Smrg        ac_ext=c
199208ce07328Smrgac_cpp='$CPP $CPPFLAGS'
199218ce07328Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
199228ce07328Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
199238ce07328Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
199248ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
199258ce07328Smrgprintf %s "checking how to run the C preprocessor... " >&6; }
199268ce07328Smrg# On Suns, sometimes $CPP names a directory.
199278ce07328Smrgif test -n "$CPP" && test -d "$CPP"; then
199288ce07328Smrg  CPP=
199298ce07328Smrgfi
199308ce07328Smrgif test -z "$CPP"; then
199318ce07328Smrg  if test ${ac_cv_prog_CPP+y}
199328ce07328Smrgthen :
199338ce07328Smrg  printf %s "(cached) " >&6
199348ce07328Smrgelse $as_nop
199358ce07328Smrg      # Double quotes because $CC needs to be expanded
199368ce07328Smrg    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
199378ce07328Smrg    do
199388ce07328Smrg      ac_preproc_ok=false
199398ce07328Smrgfor ac_c_preproc_warn_flag in '' yes
199408ce07328Smrgdo
199418ce07328Smrg  # Use a header file that comes with gcc, so configuring glibc
199428ce07328Smrg  # with a fresh cross-compiler works.
199438ce07328Smrg  # On the NeXT, cc -E runs the code through the compiler's parser,
199448ce07328Smrg  # not just through cpp. "Syntax error" is here to catch this case.
199458ce07328Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
199468ce07328Smrg/* end confdefs.h.  */
199478ce07328Smrg#include <limits.h>
199488ce07328Smrg		     Syntax error
199498ce07328Smrg_ACEOF
199508ce07328Smrgif ac_fn_c_try_cpp "$LINENO"
199518ce07328Smrgthen :
199528ce07328Smrg
199538ce07328Smrgelse $as_nop
199548ce07328Smrg  # Broken: fails on valid input.
199558ce07328Smrgcontinue
199568ce07328Smrgfi
199578ce07328Smrgrm -f conftest.err conftest.i conftest.$ac_ext
199588ce07328Smrg
199598ce07328Smrg  # OK, works on sane cases.  Now check whether nonexistent headers
199608ce07328Smrg  # can be detected and how.
199618ce07328Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
199628ce07328Smrg/* end confdefs.h.  */
199638ce07328Smrg#include <ac_nonexistent.h>
199648ce07328Smrg_ACEOF
199658ce07328Smrgif ac_fn_c_try_cpp "$LINENO"
199668ce07328Smrgthen :
199678ce07328Smrg  # Broken: success on invalid input.
199688ce07328Smrgcontinue
199698ce07328Smrgelse $as_nop
199708ce07328Smrg  # Passes both tests.
199718ce07328Smrgac_preproc_ok=:
199728ce07328Smrgbreak
199738ce07328Smrgfi
199748ce07328Smrgrm -f conftest.err conftest.i conftest.$ac_ext
199758ce07328Smrg
199768ce07328Smrgdone
199778ce07328Smrg# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
199788ce07328Smrgrm -f conftest.i conftest.err conftest.$ac_ext
199798ce07328Smrgif $ac_preproc_ok
199808ce07328Smrgthen :
199818ce07328Smrg  break
199828ce07328Smrgfi
199838ce07328Smrg
199848ce07328Smrg    done
199858ce07328Smrg    ac_cv_prog_CPP=$CPP
199868ce07328Smrg
199878ce07328Smrgfi
199888ce07328Smrg  CPP=$ac_cv_prog_CPP
199898ce07328Smrgelse
199908ce07328Smrg  ac_cv_prog_CPP=$CPP
199918ce07328Smrgfi
199928ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
199938ce07328Smrgprintf "%s\n" "$CPP" >&6; }
199948ce07328Smrgac_preproc_ok=false
199958ce07328Smrgfor ac_c_preproc_warn_flag in '' yes
199968ce07328Smrgdo
199978ce07328Smrg  # Use a header file that comes with gcc, so configuring glibc
199988ce07328Smrg  # with a fresh cross-compiler works.
199998ce07328Smrg  # On the NeXT, cc -E runs the code through the compiler's parser,
200008ce07328Smrg  # not just through cpp. "Syntax error" is here to catch this case.
200018ce07328Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
200028ce07328Smrg/* end confdefs.h.  */
200038ce07328Smrg#include <limits.h>
200048ce07328Smrg		     Syntax error
200058ce07328Smrg_ACEOF
200068ce07328Smrgif ac_fn_c_try_cpp "$LINENO"
200078ce07328Smrgthen :
200088ce07328Smrg
200098ce07328Smrgelse $as_nop
200108ce07328Smrg  # Broken: fails on valid input.
200118ce07328Smrgcontinue
200128ce07328Smrgfi
200138ce07328Smrgrm -f conftest.err conftest.i conftest.$ac_ext
200148ce07328Smrg
200158ce07328Smrg  # OK, works on sane cases.  Now check whether nonexistent headers
200168ce07328Smrg  # can be detected and how.
200178ce07328Smrg  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
200188ce07328Smrg/* end confdefs.h.  */
200198ce07328Smrg#include <ac_nonexistent.h>
200208ce07328Smrg_ACEOF
200218ce07328Smrgif ac_fn_c_try_cpp "$LINENO"
200228ce07328Smrgthen :
200238ce07328Smrg  # Broken: success on invalid input.
200248ce07328Smrgcontinue
200258ce07328Smrgelse $as_nop
200268ce07328Smrg  # Passes both tests.
200278ce07328Smrgac_preproc_ok=:
200288ce07328Smrgbreak
200298ce07328Smrgfi
200308ce07328Smrgrm -f conftest.err conftest.i conftest.$ac_ext
200318ce07328Smrg
200328ce07328Smrgdone
200338ce07328Smrg# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
200348ce07328Smrgrm -f conftest.i conftest.err conftest.$ac_ext
200358ce07328Smrgif $ac_preproc_ok
200368ce07328Smrgthen :
200378ce07328Smrg
200388ce07328Smrgelse $as_nop
200398ce07328Smrg  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
200408ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
200418ce07328Smrgas_fn_error $? "C preprocessor \"$CPP\" fails sanity check
200428ce07328SmrgSee \`config.log' for more details" "$LINENO" 5; }
200438ce07328Smrgfi
200448ce07328Smrg
200458ce07328Smrgac_ext=c
200468ce07328Smrgac_cpp='$CPP $CPPFLAGS'
200478ce07328Smrgac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
200488ce07328Smrgac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
200498ce07328Smrgac_compiler_gnu=$ac_cv_c_compiler_gnu
200508ce07328Smrg
200518ce07328Smrg
200528ce07328Smrgcat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005342a55b46Smrg/* end confdefs.h.  */
2005442a55b46Smrg
20055e3d74329Smrg#include "xorg-server.h"
2005642a55b46Smrg#include "exa.h"
2005742a55b46Smrg#if EXA_VERSION_MAJOR < 2
2005842a55b46Smrg#error OLD EXA!
2005942a55b46Smrg#endif
2006042a55b46Smrg
2006142a55b46Smrgint
200628ce07328Smrgmain (void)
2006342a55b46Smrg{
2006442a55b46Smrg
2006542a55b46Smrg  ;
2006642a55b46Smrg  return 0;
2006742a55b46Smrg}
2006842a55b46Smrg_ACEOF
200698ce07328Smrgif ac_fn_c_try_cpp "$LINENO"
200708ce07328Smrgthen :
2007142a55b46Smrg  USE_EXA=yes
200728ce07328Smrgelse $as_nop
2007342a55b46Smrg  USE_EXA=no
2007442a55b46Smrgfi
2007542a55b46Smrgrm -f conftest.err conftest.i conftest.$ac_ext
200768ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_EXA" >&5
200778ce07328Smrgprintf "%s\n" "$USE_EXA" >&6; }
2007842a55b46Smrg
2007942a55b46Smrg        if test "x$USE_EXA" = xyes; then
2008042a55b46Smrg
200818ce07328Smrgprintf "%s\n" "#define USE_EXA 1" >>confdefs.h
2008242a55b46Smrg
2008342a55b46Smrg        fi
2008442a55b46Smrgfi
2008542a55b46Smrg
200868ce07328Smrgac_fn_check_decl "$LINENO" "XSERVER_LIBPCIACCESS" "ac_cv_have_decl_XSERVER_LIBPCIACCESS" "#include \"xorg-server.h\"
200878ce07328Smrg" "$ac_c_undeclared_builtin_options" "CFLAGS"
200888ce07328Smrgif test "x$ac_cv_have_decl_XSERVER_LIBPCIACCESS" = xyes
200898ce07328Smrgthen :
2009042a55b46Smrg  XSERVER_LIBPCIACCESS=yes
200918ce07328Smrgelse $as_nop
2009242a55b46Smrg  XSERVER_LIBPCIACCESS=no
2009342a55b46Smrgfi
2009442a55b46SmrgCPPFLAGS="$SAVE_CPPFLAGS"
2009542a55b46Smrg
2009642a55b46Smrg# Check whether --enable-xaa was given.
200978ce07328Smrgif test ${enable_xaa+y}
200988ce07328Smrgthen :
2009942a55b46Smrg  enableval=$enable_xaa; XAA="$enableval"
201008ce07328Smrgelse $as_nop
2010142a55b46Smrg  XAA=auto
2010242a55b46Smrgfi
2010342a55b46Smrg
2010442a55b46Smrgif test "x$XAA" != xno; then
2010542a55b46Smrg        save_CFLAGS=$CFLAGS
2010642a55b46Smrg        save_CPPFLAGS=$CPPFLAGS
2010742a55b46Smrg        CFLAGS=$XORG_CFLAGS
2010842a55b46Smrg        CPPFLAGS="$XORG_CFLAGS"
201098ce07328Smrg               for ac_header in xaa.h
2011042a55b46Smrgdo :
201118ce07328Smrg  ac_fn_c_check_header_compile "$LINENO" "xaa.h" "ac_cv_header_xaa_h" "$ac_includes_default"
201128ce07328Smrgif test "x$ac_cv_header_xaa_h" = xyes
201138ce07328Smrgthen :
201148ce07328Smrg  printf "%s\n" "#define HAVE_XAA_H 1" >>confdefs.h
2011542a55b46Smrg XAA=yes
201168ce07328Smrgelse $as_nop
2011742a55b46Smrg  XAA=no
2011842a55b46Smrgfi
2011942a55b46Smrg
2012042a55b46Smrgdone
2012142a55b46Smrg        CFLAGS=$save_CFLAGS
2012242a55b46Smrg        CPPFLAGS=$save_CPPFLAGS
2012342a55b46Smrgfi
201248ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to include XAA support" >&5
201258ce07328Smrgprintf %s "checking whether to include XAA support... " >&6; }
2012642a55b46Smrg if test "x$XAA" = xyes; then
2012742a55b46Smrg  XAA_TRUE=
2012842a55b46Smrg  XAA_FALSE='#'
2012942a55b46Smrgelse
2013042a55b46Smrg  XAA_TRUE='#'
2013142a55b46Smrg  XAA_FALSE=
2013242a55b46Smrgfi
2013342a55b46Smrg
201348ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XAA" >&5
201358ce07328Smrgprintf "%s\n" "$XAA" >&6; }
2013642a55b46Smrg
2013742a55b46Smrg if test "x$USE_EXA" = xyes; then
2013842a55b46Smrg  USE_EXA_TRUE=
2013942a55b46Smrg  USE_EXA_FALSE='#'
2014042a55b46Smrgelse
2014142a55b46Smrg  USE_EXA_TRUE='#'
2014242a55b46Smrg  USE_EXA_FALSE=
2014342a55b46Smrgfi
2014442a55b46Smrg
2014542a55b46Smrg
2014642a55b46Smrgif test "x$XSERVER_LIBPCIACCESS" = xyes; then
2014742a55b46Smrg
2014842a55b46Smrgpkg_failed=no
201498ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5
201508ce07328Smrgprintf %s "checking for PCIACCESS... " >&6; }
2015142a55b46Smrg
2015242a55b46Smrgif test -n "$PCIACCESS_CFLAGS"; then
2015342a55b46Smrg    pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS"
2015442a55b46Smrg elif test -n "$PKG_CONFIG"; then
2015542a55b46Smrg    if test -n "$PKG_CONFIG" && \
201568ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5
2015742a55b46Smrg  ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5
2015842a55b46Smrg  ac_status=$?
201598ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2016042a55b46Smrg  test $ac_status = 0; }; then
2016142a55b46Smrg  pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.8.0" 2>/dev/null`
201620496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
2016342a55b46Smrgelse
2016442a55b46Smrg  pkg_failed=yes
2016542a55b46Smrgfi
2016642a55b46Smrg else
2016742a55b46Smrg    pkg_failed=untried
2016842a55b46Smrgfi
2016942a55b46Smrgif test -n "$PCIACCESS_LIBS"; then
2017042a55b46Smrg    pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS"
2017142a55b46Smrg elif test -n "$PKG_CONFIG"; then
2017242a55b46Smrg    if test -n "$PKG_CONFIG" && \
201738ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5
2017442a55b46Smrg  ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5
2017542a55b46Smrg  ac_status=$?
201768ce07328Smrg  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2017742a55b46Smrg  test $ac_status = 0; }; then
2017842a55b46Smrg  pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.8.0" 2>/dev/null`
201790496e070Smrg		      test "x$?" != "x0" && pkg_failed=yes
2018042a55b46Smrgelse
2018142a55b46Smrg  pkg_failed=yes
2018242a55b46Smrgfi
2018342a55b46Smrg else
2018442a55b46Smrg    pkg_failed=untried
2018542a55b46Smrgfi
2018642a55b46Smrg
2018742a55b46Smrg
2018842a55b46Smrg
2018942a55b46Smrgif test $pkg_failed = yes; then
201908ce07328Smrg   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
201918ce07328Smrgprintf "%s\n" "no" >&6; }
2019242a55b46Smrg
2019342a55b46Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2019442a55b46Smrg        _pkg_short_errors_supported=yes
2019542a55b46Smrgelse
2019642a55b46Smrg        _pkg_short_errors_supported=no
2019742a55b46Smrgfi
2019842a55b46Smrg        if test $_pkg_short_errors_supported = yes; then
201990496e070Smrg	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pciaccess >= 0.8.0" 2>&1`
2020042a55b46Smrg        else
202010496e070Smrg	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pciaccess >= 0.8.0" 2>&1`
2020242a55b46Smrg        fi
2020342a55b46Smrg	# Put the nasty error message in config.log where it belongs
2020442a55b46Smrg	echo "$PCIACCESS_PKG_ERRORS" >&5
2020542a55b46Smrg
2020642a55b46Smrg	as_fn_error $? "Package requirements (pciaccess >= 0.8.0) were not met:
2020742a55b46Smrg
2020842a55b46Smrg$PCIACCESS_PKG_ERRORS
2020942a55b46Smrg
2021042a55b46SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
2021142a55b46Smrginstalled software in a non-standard prefix.
2021242a55b46Smrg
2021342a55b46SmrgAlternatively, you may set the environment variables PCIACCESS_CFLAGS
2021442a55b46Smrgand PCIACCESS_LIBS to avoid the need to call pkg-config.
2021542a55b46SmrgSee the pkg-config man page for more details." "$LINENO" 5
2021642a55b46Smrgelif test $pkg_failed = untried; then
202178ce07328Smrg     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
202188ce07328Smrgprintf "%s\n" "no" >&6; }
202198ce07328Smrg	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
202208ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2022142a55b46Smrgas_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
2022242a55b46Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
2022342a55b46Smrgpath to pkg-config.
2022442a55b46Smrg
2022542a55b46SmrgAlternatively, you may set the environment variables PCIACCESS_CFLAGS
2022642a55b46Smrgand PCIACCESS_LIBS to avoid the need to call pkg-config.
2022742a55b46SmrgSee the pkg-config man page for more details.
2022842a55b46Smrg
2022942a55b46SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.
2023042a55b46SmrgSee \`config.log' for more details" "$LINENO" 5; }
2023142a55b46Smrgelse
2023242a55b46Smrg	PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS
2023342a55b46Smrg	PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS
202348ce07328Smrg        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
202358ce07328Smrgprintf "%s\n" "yes" >&6; }
2023642a55b46Smrg
20237c582b7e3Smrgfi
2023842a55b46Smrg    XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
20239c582b7e3Smrgfi
2024042a55b46Smrg if test "x$XSERVER_LIBPCIACCESS" = xyes; then
2024142a55b46Smrg  XSERVER_LIBPCIACCESS_TRUE=
2024242a55b46Smrg  XSERVER_LIBPCIACCESS_FALSE='#'
20243c582b7e3Smrgelse
2024442a55b46Smrg  XSERVER_LIBPCIACCESS_TRUE='#'
2024542a55b46Smrg  XSERVER_LIBPCIACCESS_FALSE=
20246c582b7e3Smrgfi
20247c582b7e3Smrg
20248c582b7e3Smrg
2024942a55b46Smrg# Checks for headers/macros for byte swapping
2025042a55b46Smrg# Known variants:
2025142a55b46Smrg#	<byteswap.h> bswap_16, bswap_32, bswap_64  (glibc)
2025242a55b46Smrg#	<sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
2025342a55b46Smrg#	<sys/endian.h> bswap16, bswap32, bswap64 (other BSD's)
2025442a55b46Smrg#	and a fallback to local macros if none of the above are found
2025542a55b46Smrg
2025642a55b46Smrg# if <byteswap.h> is found, assume it's the correct version
202578ce07328Smrgac_fn_c_check_header_compile "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
202588ce07328Smrgif test "x$ac_cv_header_byteswap_h" = xyes
202598ce07328Smrgthen :
202608ce07328Smrg  printf "%s\n" "#define HAVE_BYTESWAP_H 1" >>confdefs.h
2026142a55b46Smrg
20262c582b7e3Smrgfi
20263c582b7e3Smrg
2026442a55b46Smrg
2026542a55b46Smrg# if <sys/endian.h> is found, have to check which version
202668ce07328Smrgac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default"
202678ce07328Smrgif test "x$ac_cv_header_sys_endian_h" = xyes
202688ce07328Smrgthen :
2026942a55b46Smrg  HAVE_SYS_ENDIAN_H="yes"
202708ce07328Smrgelse $as_nop
2027142a55b46Smrg  HAVE_SYS_ENDIAN_H="no"
20272c582b7e3Smrgfi
20273c582b7e3Smrg
20274c582b7e3Smrg
2027542a55b46Smrgif test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then
202768ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __swap16 variant of <sys/endian.h> byteswapping macros" >&5
202778ce07328Smrgprintf %s "checking for __swap16 variant of <sys/endian.h> byteswapping macros... " >&6; }
2027842a55b46Smrg	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027942a55b46Smrg/* end confdefs.h.  */
2028042a55b46Smrg
2028142a55b46Smrg#include <sys/types.h>
2028242a55b46Smrg#include <sys/endian.h>
2028342a55b46Smrg
2028442a55b46Smrgint
202858ce07328Smrgmain (void)
2028642a55b46Smrg{
2028742a55b46Smrg
2028842a55b46Smrgint a = 1, b;
2028942a55b46Smrgb = __swap16(a);
2029042a55b46Smrg
2029142a55b46Smrg  ;
2029242a55b46Smrg  return 0;
2029342a55b46Smrg}
2029442a55b46Smrg
2029542a55b46Smrg_ACEOF
202968ce07328Smrgif ac_fn_c_try_link "$LINENO"
202978ce07328Smrgthen :
2029842a55b46Smrg  SYS_ENDIAN__SWAP='yes'
202998ce07328Smrgelse $as_nop
2030042a55b46Smrg  SYS_ENDIAN__SWAP='no'
20301c582b7e3Smrgfi
203028ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
2030342a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
203048ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN__SWAP" >&5
203058ce07328Smrgprintf "%s\n" "$SYS_ENDIAN__SWAP" >&6; }
2030642a55b46Smrg
203078ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bswap16 variant of <sys/endian.h> byteswapping macros" >&5
203088ce07328Smrgprintf %s "checking for bswap16 variant of <sys/endian.h> byteswapping macros... " >&6; }
2030942a55b46Smrg	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031042a55b46Smrg/* end confdefs.h.  */
2031142a55b46Smrg
2031242a55b46Smrg#include <sys/types.h>
2031342a55b46Smrg#include <sys/endian.h>
2031442a55b46Smrg
2031542a55b46Smrgint
203168ce07328Smrgmain (void)
2031742a55b46Smrg{
2031842a55b46Smrg
2031942a55b46Smrgint a = 1, b;
2032042a55b46Smrgb = bswap16(a);
2032142a55b46Smrg
2032242a55b46Smrg  ;
2032342a55b46Smrg  return 0;
2032442a55b46Smrg}
2032542a55b46Smrg
2032642a55b46Smrg_ACEOF
203278ce07328Smrgif ac_fn_c_try_link "$LINENO"
203288ce07328Smrgthen :
2032942a55b46Smrg  SYS_ENDIAN_BSWAP='yes'
203308ce07328Smrgelse $as_nop
2033142a55b46Smrg  SYS_ENDIAN_BSWAP='no'
20332c582b7e3Smrgfi
203338ce07328Smrgrm -f core conftest.err conftest.$ac_objext conftest.beam \
2033442a55b46Smrg    conftest$ac_exeext conftest.$ac_ext
203358ce07328Smrg	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN_BSWAP" >&5
203368ce07328Smrgprintf "%s\n" "$SYS_ENDIAN_BSWAP" >&6; }
2033742a55b46Smrg
2033842a55b46Smrg	if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
2033942a55b46Smrg		USE_SYS_ENDIAN_H=yes
2034042a55b46Smrg		BSWAP=bswap
2034142a55b46Smrg	else
2034242a55b46Smrg		if test "$SYS_ENDIAN__SWAP" = "yes" ; then
2034342a55b46Smrg			USE_SYS_ENDIAN_H=yes
2034442a55b46Smrg			BSWAP=__swap
2034542a55b46Smrg		else
2034642a55b46Smrg			USE_SYS_ENDIAN_H=no
2034742a55b46Smrg		fi
2034842a55b46Smrg	fi
2034942a55b46Smrg
2035042a55b46Smrg	if test "$USE_SYS_ENDIAN_H" = "yes" ; then
2035142a55b46Smrg
203528ce07328Smrgprintf "%s\n" "#define USE_SYS_ENDIAN_H 1" >>confdefs.h
2035342a55b46Smrg
2035442a55b46Smrg
203558ce07328Smrgprintf "%s\n" "#define bswap_16 ${BSWAP}16" >>confdefs.h
2035642a55b46Smrg
2035742a55b46Smrg
203588ce07328Smrgprintf "%s\n" "#define bswap_32 ${BSWAP}32" >>confdefs.h
2035942a55b46Smrg
2036042a55b46Smrg
203618ce07328Smrgprintf "%s\n" "#define bswap_64 ${BSWAP}64" >>confdefs.h
2036242a55b46Smrg
2036342a55b46Smrg	fi
20364c582b7e3Smrgfi
20365c582b7e3Smrg
20366c582b7e3Smrg
20367c582b7e3Smrg
2036842a55b46SmrgDRIVER_NAME=r128
20369c582b7e3Smrg
2037042a55b46Smrg
203718ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Please change the Driver line in xorg.conf from \"ati\" to \"r128\" or install
2037242a55b46Smrgthe ati wrapper as well:
2037342a55b46Smrg    git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati
2037442a55b46Smrg" >&5
203758ce07328Smrgprintf "%s\n" "$as_me: Please change the Driver line in xorg.conf from \"ati\" to \"r128\" or install
2037642a55b46Smrgthe ati wrapper as well:
2037742a55b46Smrg    git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati
2037842a55b46Smrg" >&6;}
2037942a55b46Smrg
2038042a55b46Smrgac_config_files="$ac_config_files Makefile src/Makefile man/Makefile"
2038142a55b46Smrg
2038242a55b46Smrgcat >confcache <<\_ACEOF
2038342a55b46Smrg# This file is a shell script that caches the results of configure
2038442a55b46Smrg# tests run on this system so they can be shared between configure
2038542a55b46Smrg# scripts and configure runs, see configure's option --config-cache.
2038642a55b46Smrg# It is not useful on other systems.  If it contains results you don't
2038742a55b46Smrg# want to keep, you may remove or edit it.
2038842a55b46Smrg#
2038942a55b46Smrg# config.status only pays attention to the cache file if you give it
2039042a55b46Smrg# the --recheck option to rerun configure.
2039142a55b46Smrg#
2039242a55b46Smrg# `ac_cv_env_foo' variables (set or unset) will be overridden when
2039342a55b46Smrg# loading this file, other *unset* `ac_cv_foo' will be assigned the
2039442a55b46Smrg# following values.
2039542a55b46Smrg
2039642a55b46Smrg_ACEOF
2039742a55b46Smrg
2039842a55b46Smrg# The following way of writing the cache mishandles newlines in values,
2039942a55b46Smrg# but we know of no workaround that is simple, portable, and efficient.
2040042a55b46Smrg# So, we kill variables containing newlines.
2040142a55b46Smrg# Ultrix sh set writes to stderr and can't be redirected directly,
2040242a55b46Smrg# and sets the high bit in the cache file unless we assign to the vars.
2040342a55b46Smrg(
2040442a55b46Smrg  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
2040542a55b46Smrg    eval ac_val=\$$ac_var
2040642a55b46Smrg    case $ac_val in #(
2040742a55b46Smrg    *${as_nl}*)
2040842a55b46Smrg      case $ac_var in #(
204098ce07328Smrg      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
204108ce07328Smrgprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2041142a55b46Smrg      esac
2041242a55b46Smrg      case $ac_var in #(
2041342a55b46Smrg      _ | IFS | as_nl) ;; #(
2041442a55b46Smrg      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2041542a55b46Smrg      *) { eval $ac_var=; unset $ac_var;} ;;
2041642a55b46Smrg      esac ;;
2041742a55b46Smrg    esac
2041842a55b46Smrg  done
2041942a55b46Smrg
2042042a55b46Smrg  (set) 2>&1 |
2042142a55b46Smrg    case $as_nl`(ac_space=' '; set) 2>&1` in #(
2042242a55b46Smrg    *${as_nl}ac_space=\ *)
2042342a55b46Smrg      # `set' does not quote correctly, so add quotes: double-quote
2042442a55b46Smrg      # substitution turns \\\\ into \\, and sed turns \\ into \.
2042542a55b46Smrg      sed -n \
2042642a55b46Smrg	"s/'/'\\\\''/g;
2042742a55b46Smrg	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
2042842a55b46Smrg      ;; #(
2042942a55b46Smrg    *)
2043042a55b46Smrg      # `set' quotes correctly as required by POSIX, so do not add quotes.
2043142a55b46Smrg      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2043242a55b46Smrg      ;;
2043342a55b46Smrg    esac |
2043442a55b46Smrg    sort
2043542a55b46Smrg) |
2043642a55b46Smrg  sed '
2043742a55b46Smrg     /^ac_cv_env_/b end
2043842a55b46Smrg     t clear
2043942a55b46Smrg     :clear
204408ce07328Smrg     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
2044142a55b46Smrg     t end
2044242a55b46Smrg     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
2044342a55b46Smrg     :end' >>confcache
2044442a55b46Smrgif diff "$cache_file" confcache >/dev/null 2>&1; then :; else
2044542a55b46Smrg  if test -w "$cache_file"; then
2044642a55b46Smrg    if test "x$cache_file" != "x/dev/null"; then
204478ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
204488ce07328Smrgprintf "%s\n" "$as_me: updating cache $cache_file" >&6;}
2044942a55b46Smrg      if test ! -f "$cache_file" || test -h "$cache_file"; then
2045042a55b46Smrg	cat confcache >"$cache_file"
2045142a55b46Smrg      else
2045242a55b46Smrg        case $cache_file in #(
2045342a55b46Smrg        */* | ?:*)
2045442a55b46Smrg	  mv -f confcache "$cache_file"$$ &&
2045542a55b46Smrg	  mv -f "$cache_file"$$ "$cache_file" ;; #(
2045642a55b46Smrg        *)
2045742a55b46Smrg	  mv -f confcache "$cache_file" ;;
2045842a55b46Smrg	esac
2045942a55b46Smrg      fi
2046042a55b46Smrg    fi
2046142a55b46Smrg  else
204628ce07328Smrg    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
204638ce07328Smrgprintf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
2046442a55b46Smrg  fi
2046542a55b46Smrgfi
2046642a55b46Smrgrm -f confcache
2046742a55b46Smrg
2046842a55b46Smrgtest "x$prefix" = xNONE && prefix=$ac_default_prefix
2046942a55b46Smrg# Let make expand exec_prefix.
2047042a55b46Smrgtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2047142a55b46Smrg
2047242a55b46SmrgDEFS=-DHAVE_CONFIG_H
2047342a55b46Smrg
2047442a55b46Smrgac_libobjs=
2047542a55b46Smrgac_ltlibobjs=
2047642a55b46SmrgU=
2047742a55b46Smrgfor ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
2047842a55b46Smrg  # 1. Remove the extension, and $U if already installed.
2047942a55b46Smrg  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
204808ce07328Smrg  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
2048142a55b46Smrg  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
2048242a55b46Smrg  #    will be set to the directory where LIBOBJS objects are built.
2048342a55b46Smrg  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
2048442a55b46Smrg  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
2048542a55b46Smrgdone
2048642a55b46SmrgLIBOBJS=$ac_libobjs
2048742a55b46Smrg
2048842a55b46SmrgLTLIBOBJS=$ac_ltlibobjs
2048942a55b46Smrg
2049042a55b46Smrg
204918ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
204928ce07328Smrgprintf %s "checking that generated files are newer than configure... " >&6; }
20493e3d74329Smrg   if test -n "$am_sleep_pid"; then
20494e3d74329Smrg     # Hide warnings about reused PIDs.
20495e3d74329Smrg     wait $am_sleep_pid 2>/dev/null
20496e3d74329Smrg   fi
204978ce07328Smrg   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
204988ce07328Smrgprintf "%s\n" "done" >&6; }
2049942a55b46Smrg if test -n "$EXEEXT"; then
2050042a55b46Smrg  am__EXEEXT_TRUE=
2050142a55b46Smrg  am__EXEEXT_FALSE='#'
20502c582b7e3Smrgelse
2050342a55b46Smrg  am__EXEEXT_TRUE='#'
2050442a55b46Smrg  am__EXEEXT_FALSE=
2050542a55b46Smrgfi
2050642a55b46Smrg
2050742a55b46Smrgif test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
2050842a55b46Smrg  as_fn_error $? "conditional \"AMDEP\" was never defined.
2050942a55b46SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
2051042a55b46Smrgfi
2051142a55b46Smrgif test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
2051242a55b46Smrg  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
2051342a55b46SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
2051442a55b46Smrgfi
2051542a55b46Smrgif test -z "${HAVE_XEXTPROTO_71_TRUE}" && test -z "${HAVE_XEXTPROTO_71_FALSE}"; then
2051642a55b46Smrg  as_fn_error $? "conditional \"HAVE_XEXTPROTO_71\" was never defined.
2051742a55b46SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
2051842a55b46Smrgfi
2051942a55b46Smrgif test -z "${DRI_TRUE}" && test -z "${DRI_FALSE}"; then
2052042a55b46Smrg  as_fn_error $? "conditional \"DRI\" was never defined.
2052142a55b46SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
2052242a55b46Smrgfi
2052342a55b46Smrgif test -z "${XAA_TRUE}" && test -z "${XAA_FALSE}"; then
2052442a55b46Smrg  as_fn_error $? "conditional \"XAA\" was never defined.
2052542a55b46SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
2052642a55b46Smrgfi
2052742a55b46Smrgif test -z "${USE_EXA_TRUE}" && test -z "${USE_EXA_FALSE}"; then
2052842a55b46Smrg  as_fn_error $? "conditional \"USE_EXA\" was never defined.
2052942a55b46SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
2053042a55b46Smrgfi
2053142a55b46Smrgif test -z "${XSERVER_LIBPCIACCESS_TRUE}" && test -z "${XSERVER_LIBPCIACCESS_FALSE}"; then
2053242a55b46Smrg  as_fn_error $? "conditional \"XSERVER_LIBPCIACCESS\" was never defined.
2053342a55b46SmrgUsually this means the macro was only invoked conditionally." "$LINENO" 5
20534c582b7e3Smrgfi
20535c582b7e3Smrg
2053642a55b46Smrg: "${CONFIG_STATUS=./config.status}"
2053742a55b46Smrgac_write_fail=0
2053842a55b46Smrgac_clean_files_save=$ac_clean_files
2053942a55b46Smrgac_clean_files="$ac_clean_files $CONFIG_STATUS"
205408ce07328Smrg{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
205418ce07328Smrgprintf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
2054242a55b46Smrgas_write_fail=0
2054342a55b46Smrgcat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
2054442a55b46Smrg#! $SHELL
2054542a55b46Smrg# Generated by $as_me.
2054642a55b46Smrg# Run this file to recreate the current configuration.
2054742a55b46Smrg# Compiler output produced by configure, useful for debugging
2054842a55b46Smrg# configure, is in config.log if it exists.
20549c582b7e3Smrg
2055042a55b46Smrgdebug=false
2055142a55b46Smrgac_cs_recheck=false
2055242a55b46Smrgac_cs_silent=false
20553c582b7e3Smrg
2055442a55b46SmrgSHELL=\${CONFIG_SHELL-$SHELL}
2055542a55b46Smrgexport SHELL
2055642a55b46Smrg_ASEOF
2055742a55b46Smrgcat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
2055842a55b46Smrg## -------------------- ##
2055942a55b46Smrg## M4sh Initialization. ##
2056042a55b46Smrg## -------------------- ##
20561c582b7e3Smrg
2056242a55b46Smrg# Be more Bourne compatible
2056342a55b46SmrgDUALCASE=1; export DUALCASE # for MKS sh
205648ce07328Smrgas_nop=:
205658ce07328Smrgif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
205668ce07328Smrgthen :
2056742a55b46Smrg  emulate sh
2056842a55b46Smrg  NULLCMD=:
2056942a55b46Smrg  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2057042a55b46Smrg  # is contrary to our usage.  Disable this feature.
2057142a55b46Smrg  alias -g '${1+"$@"}'='"$@"'
2057242a55b46Smrg  setopt NO_GLOB_SUBST
205738ce07328Smrgelse $as_nop
2057442a55b46Smrg  case `(set -o) 2>/dev/null` in #(
2057542a55b46Smrg  *posix*) :
2057642a55b46Smrg    set -o posix ;; #(
2057742a55b46Smrg  *) :
2057842a55b46Smrg     ;;
2057942a55b46Smrgesac
2058042a55b46Smrgfi
20581c582b7e3Smrg
20582c582b7e3Smrg
205838ce07328Smrg
205848ce07328Smrg# Reset variables that may have inherited troublesome values from
205858ce07328Smrg# the environment.
205868ce07328Smrg
205878ce07328Smrg# IFS needs to be set, to space, tab, and newline, in precisely that order.
205888ce07328Smrg# (If _AS_PATH_WALK were called with IFS unset, it would have the
205898ce07328Smrg# side effect of setting IFS to empty, thus disabling word splitting.)
205908ce07328Smrg# Quoting is to prevent editors from complaining about space-tab.
2059142a55b46Smrgas_nl='
2059242a55b46Smrg'
2059342a55b46Smrgexport as_nl
205948ce07328SmrgIFS=" ""	$as_nl"
205958ce07328Smrg
205968ce07328SmrgPS1='$ '
205978ce07328SmrgPS2='> '
205988ce07328SmrgPS4='+ '
205998ce07328Smrg
206008ce07328Smrg# Ensure predictable behavior from utilities with locale-dependent output.
206018ce07328SmrgLC_ALL=C
206028ce07328Smrgexport LC_ALL
206038ce07328SmrgLANGUAGE=C
206048ce07328Smrgexport LANGUAGE
206058ce07328Smrg
206068ce07328Smrg# We cannot yet rely on "unset" to work, but we need these variables
206078ce07328Smrg# to be unset--not just set to an empty or harmless value--now, to
206088ce07328Smrg# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
206098ce07328Smrg# also avoids known problems related to "unset" and subshell syntax
206108ce07328Smrg# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
206118ce07328Smrgfor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
206128ce07328Smrgdo eval test \${$as_var+y} \
206138ce07328Smrg  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
206148ce07328Smrgdone
206158ce07328Smrg
206168ce07328Smrg# Ensure that fds 0, 1, and 2 are open.
206178ce07328Smrgif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
206188ce07328Smrgif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
206198ce07328Smrgif (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
20620c582b7e3Smrg
2062142a55b46Smrg# The user is always right.
206228ce07328Smrgif ${PATH_SEPARATOR+false} :; then
2062342a55b46Smrg  PATH_SEPARATOR=:
2062442a55b46Smrg  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
2062542a55b46Smrg    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
2062642a55b46Smrg      PATH_SEPARATOR=';'
2062742a55b46Smrg  }
2062842a55b46Smrgfi
20629c582b7e3Smrg
20630c582b7e3Smrg
2063142a55b46Smrg# Find who we are.  Look in the path if we contain no directory separator.
2063242a55b46Smrgas_myself=
2063342a55b46Smrgcase $0 in #((
2063442a55b46Smrg  *[\\/]* ) as_myself=$0 ;;
2063542a55b46Smrg  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2063642a55b46Smrgfor as_dir in $PATH
2063742a55b46Smrgdo
2063842a55b46Smrg  IFS=$as_save_IFS
206398ce07328Smrg  case $as_dir in #(((
206408ce07328Smrg    '') as_dir=./ ;;
206418ce07328Smrg    */) ;;
206428ce07328Smrg    *) as_dir=$as_dir/ ;;
206438ce07328Smrg  esac
206448ce07328Smrg    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
2064542a55b46Smrg  done
2064642a55b46SmrgIFS=$as_save_IFS
20647c582b7e3Smrg
2064842a55b46Smrg     ;;
2064942a55b46Smrgesac
2065042a55b46Smrg# We did not find ourselves, most probably we were run as `sh COMMAND'
2065142a55b46Smrg# in which case we are not to be found in the path.
2065242a55b46Smrgif test "x$as_myself" = x; then
2065342a55b46Smrg  as_myself=$0
2065442a55b46Smrgfi
2065542a55b46Smrgif test ! -f "$as_myself"; then
206568ce07328Smrg  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
2065742a55b46Smrg  exit 1
20658c582b7e3Smrgfi
20659c582b7e3Smrg
20660c582b7e3Smrg
20661c582b7e3Smrg
2066242a55b46Smrg# as_fn_error STATUS ERROR [LINENO LOG_FD]
2066342a55b46Smrg# ----------------------------------------
2066442a55b46Smrg# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
2066542a55b46Smrg# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
2066642a55b46Smrg# script with STATUS, using 1 if that was 0.
2066742a55b46Smrgas_fn_error ()
2066842a55b46Smrg{
2066942a55b46Smrg  as_status=$1; test $as_status -eq 0 && as_status=1
2067042a55b46Smrg  if test "$4"; then
2067142a55b46Smrg    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
206728ce07328Smrg    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
2067342a55b46Smrg  fi
206748ce07328Smrg  printf "%s\n" "$as_me: error: $2" >&2
2067542a55b46Smrg  as_fn_exit $as_status
2067642a55b46Smrg} # as_fn_error
20677c582b7e3Smrg
2067842a55b46Smrg
206798ce07328Smrg
2068042a55b46Smrg# as_fn_set_status STATUS
2068142a55b46Smrg# -----------------------
2068242a55b46Smrg# Set $? to STATUS, without forking.
2068342a55b46Smrgas_fn_set_status ()
20684c582b7e3Smrg{
2068542a55b46Smrg  return $1
2068642a55b46Smrg} # as_fn_set_status
20687c582b7e3Smrg
2068842a55b46Smrg# as_fn_exit STATUS
2068942a55b46Smrg# -----------------
2069042a55b46Smrg# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
2069142a55b46Smrgas_fn_exit ()
2069242a55b46Smrg{
2069342a55b46Smrg  set +e
2069442a55b46Smrg  as_fn_set_status $1
2069542a55b46Smrg  exit $1
2069642a55b46Smrg} # as_fn_exit
2069742a55b46Smrg
2069842a55b46Smrg# as_fn_unset VAR
2069942a55b46Smrg# ---------------
2070042a55b46Smrg# Portably unset VAR.
2070142a55b46Smrgas_fn_unset ()
2070242a55b46Smrg{
2070342a55b46Smrg  { eval $1=; unset $1;}
20704c582b7e3Smrg}
2070542a55b46Smrgas_unset=as_fn_unset
207068ce07328Smrg
2070742a55b46Smrg# as_fn_append VAR VALUE
2070842a55b46Smrg# ----------------------
2070942a55b46Smrg# Append the text in VALUE to the end of the definition contained in VAR. Take
2071042a55b46Smrg# advantage of any shell optimizations that allow amortized linear growth over
2071142a55b46Smrg# repeated appends, instead of the typical quadratic growth present in naive
2071242a55b46Smrg# implementations.
207138ce07328Smrgif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
207148ce07328Smrgthen :
2071542a55b46Smrg  eval 'as_fn_append ()
2071642a55b46Smrg  {
2071742a55b46Smrg    eval $1+=\$2
2071842a55b46Smrg  }'
207198ce07328Smrgelse $as_nop
2072042a55b46Smrg  as_fn_append ()
2072142a55b46Smrg  {
2072242a55b46Smrg    eval $1=\$$1\$2
2072342a55b46Smrg  }
2072442a55b46Smrgfi # as_fn_append
2072542a55b46Smrg
2072642a55b46Smrg# as_fn_arith ARG...
2072742a55b46Smrg# ------------------
2072842a55b46Smrg# Perform arithmetic evaluation on the ARGs, and store the result in the
2072942a55b46Smrg# global $as_val. Take advantage of shells that can avoid forks. The arguments
2073042a55b46Smrg# must be portable across $(()) and expr.
207318ce07328Smrgif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
207328ce07328Smrgthen :
2073342a55b46Smrg  eval 'as_fn_arith ()
2073442a55b46Smrg  {
2073542a55b46Smrg    as_val=$(( $* ))
2073642a55b46Smrg  }'
207378ce07328Smrgelse $as_nop
2073842a55b46Smrg  as_fn_arith ()
2073942a55b46Smrg  {
2074042a55b46Smrg    as_val=`expr "$@" || test $? -eq 1`
2074142a55b46Smrg  }
2074242a55b46Smrgfi # as_fn_arith
20743c582b7e3Smrg
20744c582b7e3Smrg
2074542a55b46Smrgif expr a : '\(a\)' >/dev/null 2>&1 &&
2074642a55b46Smrg   test "X`expr 00001 : '.*\(...\)'`" = X001; then
2074742a55b46Smrg  as_expr=expr
20748c582b7e3Smrgelse
2074942a55b46Smrg  as_expr=false
20750c582b7e3Smrgfi
20751c582b7e3Smrg
2075242a55b46Smrgif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
2075342a55b46Smrg  as_basename=basename
2075442a55b46Smrgelse
2075542a55b46Smrg  as_basename=false
2075642a55b46Smrgfi
20757c582b7e3Smrg
2075842a55b46Smrgif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
2075942a55b46Smrg  as_dirname=dirname
20760c582b7e3Smrgelse
2076142a55b46Smrg  as_dirname=false
20762c582b7e3Smrgfi
20763c582b7e3Smrg
2076442a55b46Smrgas_me=`$as_basename -- "$0" ||
2076542a55b46Smrg$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
2076642a55b46Smrg	 X"$0" : 'X\(//\)$' \| \
2076742a55b46Smrg	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
207688ce07328Smrgprintf "%s\n" X/"$0" |
2076942a55b46Smrg    sed '/^.*\/\([^/][^/]*\)\/*$/{
2077042a55b46Smrg	    s//\1/
2077142a55b46Smrg	    q
2077242a55b46Smrg	  }
2077342a55b46Smrg	  /^X\/\(\/\/\)$/{
2077442a55b46Smrg	    s//\1/
2077542a55b46Smrg	    q
2077642a55b46Smrg	  }
2077742a55b46Smrg	  /^X\/\(\/\).*/{
2077842a55b46Smrg	    s//\1/
2077942a55b46Smrg	    q
2078042a55b46Smrg	  }
2078142a55b46Smrg	  s/.*/./; q'`
20782c582b7e3Smrg
2078342a55b46Smrg# Avoid depending upon Character Ranges.
2078442a55b46Smrgas_cr_letters='abcdefghijklmnopqrstuvwxyz'
2078542a55b46Smrgas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
2078642a55b46Smrgas_cr_Letters=$as_cr_letters$as_cr_LETTERS
2078742a55b46Smrgas_cr_digits='0123456789'
2078842a55b46Smrgas_cr_alnum=$as_cr_Letters$as_cr_digits
20789c582b7e3Smrg
207908ce07328Smrg
207918ce07328Smrg# Determine whether it's possible to make 'echo' print without a newline.
207928ce07328Smrg# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
207938ce07328Smrg# for compatibility with existing Makefiles.
2079442a55b46SmrgECHO_C= ECHO_N= ECHO_T=
2079542a55b46Smrgcase `echo -n x` in #(((((
2079642a55b46Smrg-n*)
2079742a55b46Smrg  case `echo 'xy\c'` in
2079842a55b46Smrg  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
2079942a55b46Smrg  xy)  ECHO_C='\c';;
2080042a55b46Smrg  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
2080142a55b46Smrg       ECHO_T='	';;
2080242a55b46Smrg  esac;;
2080342a55b46Smrg*)
2080442a55b46Smrg  ECHO_N='-n';;
2080542a55b46Smrgesac
20806c582b7e3Smrg
208078ce07328Smrg# For backward compatibility with old third-party macros, we provide
208088ce07328Smrg# the shell variables $as_echo and $as_echo_n.  New code should use
208098ce07328Smrg# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
208108ce07328Smrgas_echo='printf %s\n'
208118ce07328Smrgas_echo_n='printf %s'
208128ce07328Smrg
2081342a55b46Smrgrm -f conf$$ conf$$.exe conf$$.file
2081442a55b46Smrgif test -d conf$$.dir; then
2081542a55b46Smrg  rm -f conf$$.dir/conf$$.file
20816c582b7e3Smrgelse
2081742a55b46Smrg  rm -f conf$$.dir
2081842a55b46Smrg  mkdir conf$$.dir 2>/dev/null
20819c582b7e3Smrgfi
2082042a55b46Smrgif (echo >conf$$.file) 2>/dev/null; then
2082142a55b46Smrg  if ln -s conf$$.file conf$$ 2>/dev/null; then
2082242a55b46Smrg    as_ln_s='ln -s'
2082342a55b46Smrg    # ... but there are two gotchas:
2082442a55b46Smrg    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
2082542a55b46Smrg    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
208260496e070Smrg    # In both cases, we have to default to `cp -pR'.
2082742a55b46Smrg    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
208280496e070Smrg      as_ln_s='cp -pR'
2082942a55b46Smrg  elif ln conf$$.file conf$$ 2>/dev/null; then
2083042a55b46Smrg    as_ln_s=ln
2083142a55b46Smrg  else
208320496e070Smrg    as_ln_s='cp -pR'
2083342a55b46Smrg  fi
2083442a55b46Smrgelse
208350496e070Smrg  as_ln_s='cp -pR'
20836c582b7e3Smrgfi
2083742a55b46Smrgrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
2083842a55b46Smrgrmdir conf$$.dir 2>/dev/null
20839c582b7e3Smrg
20840c582b7e3Smrg
2084142a55b46Smrg# as_fn_mkdir_p
2084242a55b46Smrg# -------------
2084342a55b46Smrg# Create "$as_dir" as a directory, including parents if necessary.
2084442a55b46Smrgas_fn_mkdir_p ()
2084542a55b46Smrg{
20846c582b7e3Smrg
2084742a55b46Smrg  case $as_dir in #(
2084842a55b46Smrg  -*) as_dir=./$as_dir;;
2084942a55b46Smrg  esac
2085042a55b46Smrg  test -d "$as_dir" || eval $as_mkdir_p || {
2085142a55b46Smrg    as_dirs=
2085242a55b46Smrg    while :; do
2085342a55b46Smrg      case $as_dir in #(
208548ce07328Smrg      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
2085542a55b46Smrg      *) as_qdir=$as_dir;;
2085642a55b46Smrg      esac
2085742a55b46Smrg      as_dirs="'$as_qdir' $as_dirs"
2085842a55b46Smrg      as_dir=`$as_dirname -- "$as_dir" ||
2085942a55b46Smrg$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2086042a55b46Smrg	 X"$as_dir" : 'X\(//\)[^/]' \| \
2086142a55b46Smrg	 X"$as_dir" : 'X\(//\)$' \| \
2086242a55b46Smrg	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
208638ce07328Smrgprintf "%s\n" X"$as_dir" |
2086442a55b46Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2086542a55b46Smrg	    s//\1/
2086642a55b46Smrg	    q
2086742a55b46Smrg	  }
2086842a55b46Smrg	  /^X\(\/\/\)[^/].*/{
2086942a55b46Smrg	    s//\1/
2087042a55b46Smrg	    q
2087142a55b46Smrg	  }
2087242a55b46Smrg	  /^X\(\/\/\)$/{
2087342a55b46Smrg	    s//\1/
2087442a55b46Smrg	    q
2087542a55b46Smrg	  }
2087642a55b46Smrg	  /^X\(\/\).*/{
2087742a55b46Smrg	    s//\1/
2087842a55b46Smrg	    q
2087942a55b46Smrg	  }
2088042a55b46Smrg	  s/.*/./; q'`
2088142a55b46Smrg      test -d "$as_dir" && break
2088242a55b46Smrg    done
2088342a55b46Smrg    test -z "$as_dirs" || eval "mkdir $as_dirs"
2088442a55b46Smrg  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20885c582b7e3Smrg
2088642a55b46Smrg
2088742a55b46Smrg} # as_fn_mkdir_p
2088842a55b46Smrgif mkdir -p . 2>/dev/null; then
2088942a55b46Smrg  as_mkdir_p='mkdir -p "$as_dir"'
20890c582b7e3Smrgelse
2089142a55b46Smrg  test -d ./-p && rmdir ./-p
2089242a55b46Smrg  as_mkdir_p=false
20893c582b7e3Smrgfi
20894c582b7e3Smrg
208950496e070Smrg
208960496e070Smrg# as_fn_executable_p FILE
208970496e070Smrg# -----------------------
208980496e070Smrg# Test if FILE is an executable regular file.
208990496e070Smrgas_fn_executable_p ()
209000496e070Smrg{
209010496e070Smrg  test -f "$1" && test -x "$1"
209020496e070Smrg} # as_fn_executable_p
209030496e070Smrgas_test_x='test -x'
209040496e070Smrgas_executable_p=as_fn_executable_p
20905c582b7e3Smrg
2090642a55b46Smrg# Sed expression to map a string onto a valid CPP name.
2090742a55b46Smrgas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20908c582b7e3Smrg
2090942a55b46Smrg# Sed expression to map a string onto a valid variable name.
2091042a55b46Smrgas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20911c582b7e3Smrg
20912c582b7e3Smrg
2091342a55b46Smrgexec 6>&1
2091442a55b46Smrg## ----------------------------------- ##
2091542a55b46Smrg## Main body of $CONFIG_STATUS script. ##
2091642a55b46Smrg## ----------------------------------- ##
2091742a55b46Smrg_ASEOF
2091842a55b46Smrgtest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20919c582b7e3Smrg
2092042a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2092142a55b46Smrg# Save the log message, to keep $0 and so on meaningful, and to
2092242a55b46Smrg# report actual input values of CONFIG_FILES etc. instead of their
2092342a55b46Smrg# values after options handling.
2092442a55b46Smrgac_log="
209258ce07328SmrgThis file was extended by xf86-video-r128 $as_me 6.12.1, which was
209268ce07328Smrggenerated by GNU Autoconf 2.71.  Invocation command line was
20927c582b7e3Smrg
2092842a55b46Smrg  CONFIG_FILES    = $CONFIG_FILES
2092942a55b46Smrg  CONFIG_HEADERS  = $CONFIG_HEADERS
2093042a55b46Smrg  CONFIG_LINKS    = $CONFIG_LINKS
2093142a55b46Smrg  CONFIG_COMMANDS = $CONFIG_COMMANDS
2093242a55b46Smrg  $ $0 $@
20933c582b7e3Smrg
2093442a55b46Smrgon `(hostname || uname -n) 2>/dev/null | sed 1q`
2093542a55b46Smrg"
20936c582b7e3Smrg
2093742a55b46Smrg_ACEOF
20938c582b7e3Smrg
2093942a55b46Smrgcase $ac_config_files in *"
2094042a55b46Smrg"*) set x $ac_config_files; shift; ac_config_files=$*;;
2094142a55b46Smrgesac
20942c582b7e3Smrg
2094342a55b46Smrgcase $ac_config_headers in *"
2094442a55b46Smrg"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
2094542a55b46Smrgesac
20946c582b7e3Smrg
20947c582b7e3Smrg
2094842a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2094942a55b46Smrg# Files that config.status was made for.
2095042a55b46Smrgconfig_files="$ac_config_files"
2095142a55b46Smrgconfig_headers="$ac_config_headers"
2095242a55b46Smrgconfig_commands="$ac_config_commands"
20953c582b7e3Smrg
2095442a55b46Smrg_ACEOF
20955c582b7e3Smrg
2095642a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2095742a55b46Smrgac_cs_usage="\
2095842a55b46Smrg\`$as_me' instantiates files and other configuration actions
2095942a55b46Smrgfrom templates according to the current configuration.  Unless the files
2096042a55b46Smrgand actions are specified as TAGs, all are instantiated by default.
20961c582b7e3Smrg
2096242a55b46SmrgUsage: $0 [OPTION]... [TAG]...
20963c582b7e3Smrg
2096442a55b46Smrg  -h, --help       print this help, then exit
2096542a55b46Smrg  -V, --version    print version number and configuration settings, then exit
2096642a55b46Smrg      --config     print configuration, then exit
2096742a55b46Smrg  -q, --quiet, --silent
2096842a55b46Smrg                   do not print progress messages
2096942a55b46Smrg  -d, --debug      don't remove temporary files
2097042a55b46Smrg      --recheck    update $as_me by reconfiguring in the same conditions
2097142a55b46Smrg      --file=FILE[:TEMPLATE]
2097242a55b46Smrg                   instantiate the configuration file FILE
2097342a55b46Smrg      --header=FILE[:TEMPLATE]
2097442a55b46Smrg                   instantiate the configuration header FILE
20975c582b7e3Smrg
2097642a55b46SmrgConfiguration files:
2097742a55b46Smrg$config_files
20978c582b7e3Smrg
2097942a55b46SmrgConfiguration headers:
2098042a55b46Smrg$config_headers
20981c582b7e3Smrg
2098242a55b46SmrgConfiguration commands:
2098342a55b46Smrg$config_commands
20984c582b7e3Smrg
209858ce07328SmrgReport bugs to <https://gitlab.freedesktop.org/xorg/driver/xf86-video-r128/-/issues>."
20986c582b7e3Smrg
2098742a55b46Smrg_ACEOF
209888ce07328Smrgac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
209898ce07328Smrgac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
2099042a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
209918ce07328Smrgac_cs_config='$ac_cs_config_escaped'
2099242a55b46Smrgac_cs_version="\\
209938ce07328Smrgxf86-video-r128 config.status 6.12.1
209948ce07328Smrgconfigured by $0, generated by GNU Autoconf 2.71,
2099542a55b46Smrg  with options \\"\$ac_cs_config\\"
20996c582b7e3Smrg
209978ce07328SmrgCopyright (C) 2021 Free Software Foundation, Inc.
2099842a55b46SmrgThis config.status script is free software; the Free Software Foundation
2099942a55b46Smrggives unlimited permission to copy, distribute and modify it."
21000c582b7e3Smrg
2100142a55b46Smrgac_pwd='$ac_pwd'
2100242a55b46Smrgsrcdir='$srcdir'
2100342a55b46SmrgINSTALL='$INSTALL'
2100442a55b46SmrgMKDIR_P='$MKDIR_P'
2100542a55b46SmrgAWK='$AWK'
2100642a55b46Smrgtest -n "\$AWK" || AWK=awk
2100742a55b46Smrg_ACEOF
21008c582b7e3Smrg
2100942a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2101042a55b46Smrg# The default lists apply if the user does not specify any file.
2101142a55b46Smrgac_need_defaults=:
2101242a55b46Smrgwhile test $# != 0
2101342a55b46Smrgdo
2101442a55b46Smrg  case $1 in
2101542a55b46Smrg  --*=?*)
2101642a55b46Smrg    ac_option=`expr "X$1" : 'X\([^=]*\)='`
2101742a55b46Smrg    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
2101842a55b46Smrg    ac_shift=:
2101942a55b46Smrg    ;;
2102042a55b46Smrg  --*=)
2102142a55b46Smrg    ac_option=`expr "X$1" : 'X\([^=]*\)='`
2102242a55b46Smrg    ac_optarg=
2102342a55b46Smrg    ac_shift=:
2102442a55b46Smrg    ;;
2102542a55b46Smrg  *)
2102642a55b46Smrg    ac_option=$1
2102742a55b46Smrg    ac_optarg=$2
2102842a55b46Smrg    ac_shift=shift
2102942a55b46Smrg    ;;
2103042a55b46Smrg  esac
21031c582b7e3Smrg
2103242a55b46Smrg  case $ac_option in
2103342a55b46Smrg  # Handling of the options.
2103442a55b46Smrg  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2103542a55b46Smrg    ac_cs_recheck=: ;;
2103642a55b46Smrg  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
210378ce07328Smrg    printf "%s\n" "$ac_cs_version"; exit ;;
2103842a55b46Smrg  --config | --confi | --conf | --con | --co | --c )
210398ce07328Smrg    printf "%s\n" "$ac_cs_config"; exit ;;
2104042a55b46Smrg  --debug | --debu | --deb | --de | --d | -d )
2104142a55b46Smrg    debug=: ;;
2104242a55b46Smrg  --file | --fil | --fi | --f )
2104342a55b46Smrg    $ac_shift
2104442a55b46Smrg    case $ac_optarg in
210458ce07328Smrg    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
2104642a55b46Smrg    '') as_fn_error $? "missing file argument" ;;
21047c582b7e3Smrg    esac
2104842a55b46Smrg    as_fn_append CONFIG_FILES " '$ac_optarg'"
2104942a55b46Smrg    ac_need_defaults=false;;
2105042a55b46Smrg  --header | --heade | --head | --hea )
2105142a55b46Smrg    $ac_shift
2105242a55b46Smrg    case $ac_optarg in
210538ce07328Smrg    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21054c582b7e3Smrg    esac
2105542a55b46Smrg    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
2105642a55b46Smrg    ac_need_defaults=false;;
2105742a55b46Smrg  --he | --h)
2105842a55b46Smrg    # Conflict between --help and --header
2105942a55b46Smrg    as_fn_error $? "ambiguous option: \`$1'
2106042a55b46SmrgTry \`$0 --help' for more information.";;
2106142a55b46Smrg  --help | --hel | -h )
210628ce07328Smrg    printf "%s\n" "$ac_cs_usage"; exit ;;
2106342a55b46Smrg  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2106442a55b46Smrg  | -silent | --silent | --silen | --sile | --sil | --si | --s)
2106542a55b46Smrg    ac_cs_silent=: ;;
21066c582b7e3Smrg
2106742a55b46Smrg  # This is an error.
2106842a55b46Smrg  -*) as_fn_error $? "unrecognized option: \`$1'
2106942a55b46SmrgTry \`$0 --help' for more information." ;;
21070c582b7e3Smrg
2107142a55b46Smrg  *) as_fn_append ac_config_targets " $1"
2107242a55b46Smrg     ac_need_defaults=false ;;
21073c582b7e3Smrg
2107442a55b46Smrg  esac
2107542a55b46Smrg  shift
2107642a55b46Smrgdone
21077c582b7e3Smrg
2107842a55b46Smrgac_configure_extra_args=
21079c582b7e3Smrg
2108042a55b46Smrgif $ac_cs_silent; then
2108142a55b46Smrg  exec 6>/dev/null
2108242a55b46Smrg  ac_configure_extra_args="$ac_configure_extra_args --silent"
2108342a55b46Smrgfi
21084c582b7e3Smrg
2108542a55b46Smrg_ACEOF
2108642a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2108742a55b46Smrgif \$ac_cs_recheck; then
210880496e070Smrg  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
2108942a55b46Smrg  shift
210908ce07328Smrg  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
2109142a55b46Smrg  CONFIG_SHELL='$SHELL'
2109242a55b46Smrg  export CONFIG_SHELL
2109342a55b46Smrg  exec "\$@"
2109442a55b46Smrgfi
21095c582b7e3Smrg
2109642a55b46Smrg_ACEOF
2109742a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2109842a55b46Smrgexec 5>>config.log
2109942a55b46Smrg{
2110042a55b46Smrg  echo
2110142a55b46Smrg  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
2110242a55b46Smrg## Running $as_me. ##
2110342a55b46Smrg_ASBOX
211048ce07328Smrg  printf "%s\n" "$ac_log"
2110542a55b46Smrg} >&5
21106c582b7e3Smrg
2110742a55b46Smrg_ACEOF
2110842a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2110942a55b46Smrg#
2111042a55b46Smrg# INIT-COMMANDS
2111142a55b46Smrg#
211128ce07328SmrgAMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
21113c582b7e3Smrg
21114c582b7e3Smrg
2111542a55b46Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
2111642a55b46Smrg# if CDPATH is set.
2111742a55b46Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21118c582b7e3Smrg
2111942a55b46Smrgsed_quote_subst='$sed_quote_subst'
2112042a55b46Smrgdouble_quote_subst='$double_quote_subst'
2112142a55b46Smrgdelay_variable_subst='$delay_variable_subst'
2112242a55b46Smrgenable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
2112342a55b46Smrgmacro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
2112442a55b46Smrgmacro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
2112542a55b46Smrgenable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
2112642a55b46Smrgpic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
2112742a55b46Smrgenable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
21128e3d74329Smrgshared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
2112942a55b46SmrgSHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
2113042a55b46SmrgECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
2113142a55b46SmrgPATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
2113242a55b46Smrghost_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
2113342a55b46Smrghost='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
2113442a55b46Smrghost_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
2113542a55b46Smrgbuild_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
2113642a55b46Smrgbuild='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
2113742a55b46Smrgbuild_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
2113842a55b46SmrgSED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
2113942a55b46SmrgXsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
2114042a55b46SmrgGREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
2114142a55b46SmrgEGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
2114242a55b46SmrgFGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
2114342a55b46SmrgLD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
2114442a55b46SmrgNM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
2114542a55b46SmrgLN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
2114642a55b46Smrgmax_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
2114742a55b46Smrgac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
2114842a55b46Smrgexeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
2114942a55b46Smrglt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
2115042a55b46Smrglt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
2115142a55b46Smrglt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
2115242a55b46Smrglt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
2115342a55b46Smrglt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
2115442a55b46Smrgreload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
2115542a55b46Smrgreload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
211568ce07328SmrgFILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
2115742a55b46SmrgOBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
2115842a55b46Smrgdeplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
2115942a55b46Smrgfile_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
2116042a55b46Smrgfile_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
2116142a55b46Smrgwant_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
2116242a55b46SmrgDLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
2116342a55b46Smrgsharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
2116442a55b46SmrgAR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
211658ce07328Smrglt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
2116642a55b46SmrgAR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
2116742a55b46Smrgarchiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
2116842a55b46SmrgSTRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
2116942a55b46SmrgRANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
2117042a55b46Smrgold_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
2117142a55b46Smrgold_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
2117242a55b46Smrgold_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
2117342a55b46Smrglock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
2117442a55b46SmrgCC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
2117542a55b46SmrgCFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
2117642a55b46Smrgcompiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
2117742a55b46SmrgGCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
2117842a55b46Smrglt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
2117942a55b46Smrglt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
21180e3d74329Smrglt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
2118142a55b46Smrglt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
2118242a55b46Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
21183e3d74329Smrglt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
2118442a55b46Smrgnm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
2118542a55b46Smrglt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
21186e3d74329Smrglt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
2118742a55b46Smrgobjdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
2118842a55b46SmrgMAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
2118942a55b46Smrglt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
2119042a55b46Smrglt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
2119142a55b46Smrglt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
2119242a55b46Smrglt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
2119342a55b46Smrglt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
2119442a55b46Smrgneed_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
2119542a55b46SmrgMANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
2119642a55b46SmrgDSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
2119742a55b46SmrgNMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
2119842a55b46SmrgLIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
2119942a55b46SmrgOTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
2120042a55b46SmrgOTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
2120142a55b46Smrglibext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
2120242a55b46Smrgshrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
2120342a55b46Smrgextract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
2120442a55b46Smrgarchive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
2120542a55b46Smrgenable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
2120642a55b46Smrgexport_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
2120742a55b46Smrgwhole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
2120842a55b46Smrgcompiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
2120942a55b46Smrgold_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
2121042a55b46Smrgold_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
2121142a55b46Smrgarchive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
2121242a55b46Smrgarchive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
2121342a55b46Smrgmodule_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
2121442a55b46Smrgmodule_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
2121542a55b46Smrgwith_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
2121642a55b46Smrgallow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
2121742a55b46Smrgno_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
2121842a55b46Smrghardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
2121942a55b46Smrghardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
2122042a55b46Smrghardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
2122142a55b46Smrghardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
2122242a55b46Smrghardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
2122342a55b46Smrghardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
2122442a55b46Smrghardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
2122542a55b46Smrginherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
2122642a55b46Smrglink_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
2122742a55b46Smrgalways_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
2122842a55b46Smrgexport_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
2122942a55b46Smrgexclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
2123042a55b46Smrginclude_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
2123142a55b46Smrgprelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
2123242a55b46Smrgpostlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
2123342a55b46Smrgfile_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
2123442a55b46Smrgvariables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
2123542a55b46Smrgneed_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
2123642a55b46Smrgneed_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
2123742a55b46Smrgversion_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
2123842a55b46Smrgrunpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
2123942a55b46Smrgshlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
2124042a55b46Smrgshlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
2124142a55b46Smrglibname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
2124242a55b46Smrglibrary_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
2124342a55b46Smrgsoname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
2124442a55b46Smrginstall_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
2124542a55b46Smrgpostinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
2124642a55b46Smrgpostuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
2124742a55b46Smrgfinish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
2124842a55b46Smrgfinish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
2124942a55b46Smrghardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
2125042a55b46Smrgsys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
21251e3d74329Smrgconfigure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
21252e3d74329Smrgconfigure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
2125342a55b46Smrghardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
2125442a55b46Smrgenable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
2125542a55b46Smrgenable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
2125642a55b46Smrgenable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
2125742a55b46Smrgold_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
2125842a55b46Smrgstriplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
2125942a55b46Smrg
2126042a55b46SmrgLTCC='$LTCC'
2126142a55b46SmrgLTCFLAGS='$LTCFLAGS'
2126242a55b46Smrgcompiler='$compiler_DEFAULT'
2126342a55b46Smrg
2126442a55b46Smrg# A function that is used when there is no print builtin or printf.
2126542a55b46Smrgfunc_fallback_echo ()
2126642a55b46Smrg{
2126742a55b46Smrg  eval 'cat <<_LTECHO_EOF
2126842a55b46Smrg\$1
2126942a55b46Smrg_LTECHO_EOF'
2127042a55b46Smrg}
21271c582b7e3Smrg
2127242a55b46Smrg# Quote evaled strings.
2127342a55b46Smrgfor var in SHELL \
2127442a55b46SmrgECHO \
2127542a55b46SmrgPATH_SEPARATOR \
2127642a55b46SmrgSED \
2127742a55b46SmrgGREP \
2127842a55b46SmrgEGREP \
2127942a55b46SmrgFGREP \
2128042a55b46SmrgLD \
2128142a55b46SmrgNM \
2128242a55b46SmrgLN_S \
2128342a55b46Smrglt_SP2NL \
2128442a55b46Smrglt_NL2SP \
2128542a55b46Smrgreload_flag \
212868ce07328SmrgFILECMD \
2128742a55b46SmrgOBJDUMP \
2128842a55b46Smrgdeplibs_check_method \
2128942a55b46Smrgfile_magic_cmd \
2129042a55b46Smrgfile_magic_glob \
2129142a55b46Smrgwant_nocaseglob \
2129242a55b46SmrgDLLTOOL \
2129342a55b46Smrgsharedlib_from_linklib_cmd \
2129442a55b46SmrgAR \
2129542a55b46Smrgarchiver_list_spec \
2129642a55b46SmrgSTRIP \
2129742a55b46SmrgRANLIB \
2129842a55b46SmrgCC \
2129942a55b46SmrgCFLAGS \
2130042a55b46Smrgcompiler \
2130142a55b46Smrglt_cv_sys_global_symbol_pipe \
2130242a55b46Smrglt_cv_sys_global_symbol_to_cdecl \
21303e3d74329Smrglt_cv_sys_global_symbol_to_import \
2130442a55b46Smrglt_cv_sys_global_symbol_to_c_name_address \
2130542a55b46Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
21306e3d74329Smrglt_cv_nm_interface \
2130742a55b46Smrgnm_file_list_spec \
21308e3d74329Smrglt_cv_truncate_bin \
2130942a55b46Smrglt_prog_compiler_no_builtin_flag \
2131042a55b46Smrglt_prog_compiler_pic \
2131142a55b46Smrglt_prog_compiler_wl \
2131242a55b46Smrglt_prog_compiler_static \
2131342a55b46Smrglt_cv_prog_compiler_c_o \
2131442a55b46Smrgneed_locks \
2131542a55b46SmrgMANIFEST_TOOL \
2131642a55b46SmrgDSYMUTIL \
2131742a55b46SmrgNMEDIT \
2131842a55b46SmrgLIPO \
2131942a55b46SmrgOTOOL \
2132042a55b46SmrgOTOOL64 \
2132142a55b46Smrgshrext_cmds \
2132242a55b46Smrgexport_dynamic_flag_spec \
2132342a55b46Smrgwhole_archive_flag_spec \
2132442a55b46Smrgcompiler_needs_object \
2132542a55b46Smrgwith_gnu_ld \
2132642a55b46Smrgallow_undefined_flag \
2132742a55b46Smrgno_undefined_flag \
2132842a55b46Smrghardcode_libdir_flag_spec \
2132942a55b46Smrghardcode_libdir_separator \
2133042a55b46Smrgexclude_expsyms \
2133142a55b46Smrginclude_expsyms \
2133242a55b46Smrgfile_list_spec \
2133342a55b46Smrgvariables_saved_for_relink \
2133442a55b46Smrglibname_spec \
2133542a55b46Smrglibrary_names_spec \
2133642a55b46Smrgsoname_spec \
2133742a55b46Smrginstall_override_mode \
2133842a55b46Smrgfinish_eval \
2133942a55b46Smrgold_striplib \
2134042a55b46Smrgstriplib; do
2134142a55b46Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2134242a55b46Smrg    *[\\\\\\\`\\"\\\$]*)
21343e3d74329Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2134442a55b46Smrg      ;;
2134542a55b46Smrg    *)
2134642a55b46Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2134742a55b46Smrg      ;;
2134842a55b46Smrg    esac
2134942a55b46Smrgdone
21350c582b7e3Smrg
2135142a55b46Smrg# Double-quote double-evaled strings.
2135242a55b46Smrgfor var in reload_cmds \
2135342a55b46Smrgold_postinstall_cmds \
2135442a55b46Smrgold_postuninstall_cmds \
2135542a55b46Smrgold_archive_cmds \
2135642a55b46Smrgextract_expsyms_cmds \
2135742a55b46Smrgold_archive_from_new_cmds \
2135842a55b46Smrgold_archive_from_expsyms_cmds \
2135942a55b46Smrgarchive_cmds \
2136042a55b46Smrgarchive_expsym_cmds \
2136142a55b46Smrgmodule_cmds \
2136242a55b46Smrgmodule_expsym_cmds \
2136342a55b46Smrgexport_symbols_cmds \
2136442a55b46Smrgprelink_cmds \
2136542a55b46Smrgpostlink_cmds \
2136642a55b46Smrgpostinstall_cmds \
2136742a55b46Smrgpostuninstall_cmds \
2136842a55b46Smrgfinish_cmds \
2136942a55b46Smrgsys_lib_search_path_spec \
21370e3d74329Smrgconfigure_time_dlsearch_path \
21371e3d74329Smrgconfigure_time_lt_sys_library_path; do
2137242a55b46Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2137342a55b46Smrg    *[\\\\\\\`\\"\\\$]*)
21374e3d74329Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2137542a55b46Smrg      ;;
2137642a55b46Smrg    *)
2137742a55b46Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2137842a55b46Smrg      ;;
2137942a55b46Smrg    esac
2138042a55b46Smrgdone
21381c582b7e3Smrg
2138242a55b46Smrgac_aux_dir='$ac_aux_dir'
21383c582b7e3Smrg
21384e3d74329Smrg# See if we are running on zsh, and set the options that allow our
2138542a55b46Smrg# commands through without removal of \ escapes INIT.
21386e3d74329Smrgif test -n "\${ZSH_VERSION+set}"; then
2138742a55b46Smrg   setopt NO_GLOB_SUBST
21388c582b7e3Smrgfi
21389c582b7e3Smrg
21390c582b7e3Smrg
2139142a55b46Smrg    PACKAGE='$PACKAGE'
2139242a55b46Smrg    VERSION='$VERSION'
2139342a55b46Smrg    RM='$RM'
2139442a55b46Smrg    ofile='$ofile'
21395c582b7e3Smrg
21396c582b7e3Smrg
21397c582b7e3Smrg
21398c582b7e3Smrg
21399c582b7e3Smrg_ACEOF
21400c582b7e3Smrg
2140142a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21402c582b7e3Smrg
2140342a55b46Smrg# Handling of arguments.
2140442a55b46Smrgfor ac_config_target in $ac_config_targets
2140542a55b46Smrgdo
2140642a55b46Smrg  case $ac_config_target in
2140742a55b46Smrg    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
2140842a55b46Smrg    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
2140942a55b46Smrg    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
2141042a55b46Smrg    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
2141142a55b46Smrg    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
2141242a55b46Smrg    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
21413c582b7e3Smrg
2141442a55b46Smrg  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
2141542a55b46Smrg  esac
2141642a55b46Smrgdone
21417c582b7e3Smrg
21418c582b7e3Smrg
2141942a55b46Smrg# If the user did not use the arguments to specify the items to instantiate,
2142042a55b46Smrg# then the envvar interface is used.  Set only those that are not.
2142142a55b46Smrg# We use the long form for the default assignment because of an extremely
2142242a55b46Smrg# bizarre bug on SunOS 4.1.3.
2142342a55b46Smrgif $ac_need_defaults; then
214248ce07328Smrg  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
214258ce07328Smrg  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
214268ce07328Smrg  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
21427c582b7e3Smrgfi
21428c582b7e3Smrg
2142942a55b46Smrg# Have a temporary directory for convenience.  Make it in the build tree
2143042a55b46Smrg# simply because there is no reason against having it here, and in addition,
2143142a55b46Smrg# creating and moving files from /tmp can sometimes cause problems.
2143242a55b46Smrg# Hook for its removal unless debugging.
2143342a55b46Smrg# Note that there is a small window in which the directory will not be cleaned:
2143442a55b46Smrg# after its creation but before its name has been assigned to `$tmp'.
2143542a55b46Smrg$debug ||
2143642a55b46Smrg{
2143742a55b46Smrg  tmp= ac_tmp=
2143842a55b46Smrg  trap 'exit_status=$?
2143942a55b46Smrg  : "${ac_tmp:=$tmp}"
2144042a55b46Smrg  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
2144142a55b46Smrg' 0
2144242a55b46Smrg  trap 'as_fn_exit 1' 1 2 13 15
2144342a55b46Smrg}
2144442a55b46Smrg# Create a (secure) tmp directory for tmp files.
21445c582b7e3Smrg
2144642a55b46Smrg{
2144742a55b46Smrg  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
2144842a55b46Smrg  test -d "$tmp"
2144942a55b46Smrg}  ||
2145042a55b46Smrg{
2145142a55b46Smrg  tmp=./conf$$-$RANDOM
2145242a55b46Smrg  (umask 077 && mkdir "$tmp")
2145342a55b46Smrg} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
2145442a55b46Smrgac_tmp=$tmp
21455c582b7e3Smrg
2145642a55b46Smrg# Set up the scripts for CONFIG_FILES section.
2145742a55b46Smrg# No need to generate them if there are no CONFIG_FILES.
2145842a55b46Smrg# This happens for instance with `./config.status config.h'.
2145942a55b46Smrgif test -n "$CONFIG_FILES"; then
21460c582b7e3Smrg
21461c582b7e3Smrg
2146242a55b46Smrgac_cr=`echo X | tr X '\015'`
2146342a55b46Smrg# On cygwin, bash can eat \r inside `` if the user requested igncr.
2146442a55b46Smrg# But we know of no other shell where ac_cr would be empty at this
2146542a55b46Smrg# point, so we can use a bashism as a fallback.
2146642a55b46Smrgif test "x$ac_cr" = x; then
2146742a55b46Smrg  eval ac_cr=\$\'\\r\'
21468c582b7e3Smrgfi
2146942a55b46Smrgac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
2147042a55b46Smrgif test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
2147142a55b46Smrg  ac_cs_awk_cr='\\r'
21472c582b7e3Smrgelse
2147342a55b46Smrg  ac_cs_awk_cr=$ac_cr
21474c582b7e3Smrgfi
21475c582b7e3Smrg
2147642a55b46Smrgecho 'BEGIN {' >"$ac_tmp/subs1.awk" &&
2147742a55b46Smrg_ACEOF
21478c582b7e3Smrg
21479c582b7e3Smrg
2148042a55b46Smrg{
2148142a55b46Smrg  echo "cat >conf$$subs.awk <<_ACEOF" &&
2148242a55b46Smrg  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
2148342a55b46Smrg  echo "_ACEOF"
2148442a55b46Smrg} >conf$$subs.sh ||
2148542a55b46Smrg  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
2148642a55b46Smrgac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
2148742a55b46Smrgac_delim='%!_!# '
2148842a55b46Smrgfor ac_last_try in false false false false false :; do
2148942a55b46Smrg  . ./conf$$subs.sh ||
2149042a55b46Smrg    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
21491c582b7e3Smrg
2149242a55b46Smrg  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
2149342a55b46Smrg  if test $ac_delim_n = $ac_delim_num; then
2149442a55b46Smrg    break
2149542a55b46Smrg  elif $ac_last_try; then
2149642a55b46Smrg    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
2149742a55b46Smrg  else
2149842a55b46Smrg    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
2149942a55b46Smrg  fi
2150042a55b46Smrgdone
2150142a55b46Smrgrm -f conf$$subs.sh
21502c582b7e3Smrg
2150342a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2150442a55b46Smrgcat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
2150542a55b46Smrg_ACEOF
2150642a55b46Smrgsed -n '
2150742a55b46Smrgh
2150842a55b46Smrgs/^/S["/; s/!.*/"]=/
2150942a55b46Smrgp
2151042a55b46Smrgg
2151142a55b46Smrgs/^[^!]*!//
2151242a55b46Smrg:repl
2151342a55b46Smrgt repl
2151442a55b46Smrgs/'"$ac_delim"'$//
2151542a55b46Smrgt delim
2151642a55b46Smrg:nl
2151742a55b46Smrgh
2151842a55b46Smrgs/\(.\{148\}\)..*/\1/
2151942a55b46Smrgt more1
2152042a55b46Smrgs/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
2152142a55b46Smrgp
2152242a55b46Smrgn
2152342a55b46Smrgb repl
2152442a55b46Smrg:more1
2152542a55b46Smrgs/["\\]/\\&/g; s/^/"/; s/$/"\\/
2152642a55b46Smrgp
2152742a55b46Smrgg
2152842a55b46Smrgs/.\{148\}//
2152942a55b46Smrgt nl
2153042a55b46Smrg:delim
2153142a55b46Smrgh
2153242a55b46Smrgs/\(.\{148\}\)..*/\1/
2153342a55b46Smrgt more2
2153442a55b46Smrgs/["\\]/\\&/g; s/^/"/; s/$/"/
2153542a55b46Smrgp
2153642a55b46Smrgb
2153742a55b46Smrg:more2
2153842a55b46Smrgs/["\\]/\\&/g; s/^/"/; s/$/"\\/
2153942a55b46Smrgp
2154042a55b46Smrgg
2154142a55b46Smrgs/.\{148\}//
2154242a55b46Smrgt delim
2154342a55b46Smrg' <conf$$subs.awk | sed '
2154442a55b46Smrg/^[^""]/{
2154542a55b46Smrg  N
2154642a55b46Smrg  s/\n//
2154742a55b46Smrg}
2154842a55b46Smrg' >>$CONFIG_STATUS || ac_write_fail=1
2154942a55b46Smrgrm -f conf$$subs.awk
2155042a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2155142a55b46Smrg_ACAWK
2155242a55b46Smrgcat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
2155342a55b46Smrg  for (key in S) S_is_set[key] = 1
2155442a55b46Smrg  FS = ""
21555c582b7e3Smrg
2155642a55b46Smrg}
2155742a55b46Smrg{
2155842a55b46Smrg  line = $ 0
2155942a55b46Smrg  nfields = split(line, field, "@")
2156042a55b46Smrg  substed = 0
2156142a55b46Smrg  len = length(field[1])
2156242a55b46Smrg  for (i = 2; i < nfields; i++) {
2156342a55b46Smrg    key = field[i]
2156442a55b46Smrg    keylen = length(key)
2156542a55b46Smrg    if (S_is_set[key]) {
2156642a55b46Smrg      value = S[key]
2156742a55b46Smrg      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
2156842a55b46Smrg      len += length(value) + length(field[++i])
2156942a55b46Smrg      substed = 1
2157042a55b46Smrg    } else
2157142a55b46Smrg      len += 1 + keylen
2157242a55b46Smrg  }
21573c582b7e3Smrg
2157442a55b46Smrg  print line
2157542a55b46Smrg}
21576c582b7e3Smrg
2157742a55b46Smrg_ACAWK
2157842a55b46Smrg_ACEOF
2157942a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2158042a55b46Smrgif sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
2158142a55b46Smrg  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
21582c582b7e3Smrgelse
2158342a55b46Smrg  cat
2158442a55b46Smrgfi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
2158542a55b46Smrg  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
2158642a55b46Smrg_ACEOF
21587c582b7e3Smrg
2158842a55b46Smrg# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
2158942a55b46Smrg# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
2159042a55b46Smrg# trailing colons and then remove the whole line if VPATH becomes empty
2159142a55b46Smrg# (actually we leave an empty line to preserve line numbers).
2159242a55b46Smrgif test "x$srcdir" = x.; then
2159342a55b46Smrg  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
2159442a55b46Smrgh
2159542a55b46Smrgs///
2159642a55b46Smrgs/^/:/
2159742a55b46Smrgs/[	 ]*$/:/
2159842a55b46Smrgs/:\$(srcdir):/:/g
2159942a55b46Smrgs/:\${srcdir}:/:/g
2160042a55b46Smrgs/:@srcdir@:/:/g
2160142a55b46Smrgs/^:*//
2160242a55b46Smrgs/:*$//
2160342a55b46Smrgx
2160442a55b46Smrgs/\(=[	 ]*\).*/\1/
2160542a55b46SmrgG
2160642a55b46Smrgs/\n//
2160742a55b46Smrgs/^[^=]*=[	 ]*$//
2160842a55b46Smrg}'
21609c582b7e3Smrgfi
21610c582b7e3Smrg
2161142a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2161242a55b46Smrgfi # test -n "$CONFIG_FILES"
2161342a55b46Smrg
2161442a55b46Smrg# Set up the scripts for CONFIG_HEADERS section.
2161542a55b46Smrg# No need to generate them if there are no CONFIG_HEADERS.
2161642a55b46Smrg# This happens for instance with `./config.status Makefile'.
2161742a55b46Smrgif test -n "$CONFIG_HEADERS"; then
2161842a55b46Smrgcat >"$ac_tmp/defines.awk" <<\_ACAWK ||
2161942a55b46SmrgBEGIN {
2162042a55b46Smrg_ACEOF
21621c582b7e3Smrg
2162242a55b46Smrg# Transform confdefs.h into an awk script `defines.awk', embedded as
2162342a55b46Smrg# here-document in config.status, that substitutes the proper values into
2162442a55b46Smrg# config.h.in to produce config.h.
21625c582b7e3Smrg
2162642a55b46Smrg# Create a delimiter string that does not exist in confdefs.h, to ease
2162742a55b46Smrg# handling of long lines.
2162842a55b46Smrgac_delim='%!_!# '
2162942a55b46Smrgfor ac_last_try in false false :; do
2163042a55b46Smrg  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
2163142a55b46Smrg  if test -z "$ac_tt"; then
2163242a55b46Smrg    break
2163342a55b46Smrg  elif $ac_last_try; then
2163442a55b46Smrg    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
2163542a55b46Smrg  else
2163642a55b46Smrg    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
2163742a55b46Smrg  fi
2163842a55b46Smrgdone
21639c582b7e3Smrg
2164042a55b46Smrg# For the awk script, D is an array of macro values keyed by name,
2164142a55b46Smrg# likewise P contains macro parameters if any.  Preserve backslash
2164242a55b46Smrg# newline sequences.
21643c582b7e3Smrg
2164442a55b46Smrgac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
2164542a55b46Smrgsed -n '
2164642a55b46Smrgs/.\{148\}/&'"$ac_delim"'/g
2164742a55b46Smrgt rset
2164842a55b46Smrg:rset
2164942a55b46Smrgs/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
2165042a55b46Smrgt def
2165142a55b46Smrgd
2165242a55b46Smrg:def
2165342a55b46Smrgs/\\$//
2165442a55b46Smrgt bsnl
2165542a55b46Smrgs/["\\]/\\&/g
2165642a55b46Smrgs/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
2165742a55b46SmrgD["\1"]=" \3"/p
2165842a55b46Smrgs/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
2165942a55b46Smrgd
2166042a55b46Smrg:bsnl
2166142a55b46Smrgs/["\\]/\\&/g
2166242a55b46Smrgs/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
2166342a55b46SmrgD["\1"]=" \3\\\\\\n"\\/p
2166442a55b46Smrgt cont
2166542a55b46Smrgs/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
2166642a55b46Smrgt cont
2166742a55b46Smrgd
2166842a55b46Smrg:cont
2166942a55b46Smrgn
2167042a55b46Smrgs/.\{148\}/&'"$ac_delim"'/g
2167142a55b46Smrgt clear
2167242a55b46Smrg:clear
2167342a55b46Smrgs/\\$//
2167442a55b46Smrgt bsnlc
2167542a55b46Smrgs/["\\]/\\&/g; s/^/"/; s/$/"/p
2167642a55b46Smrgd
2167742a55b46Smrg:bsnlc
2167842a55b46Smrgs/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
2167942a55b46Smrgb cont
2168042a55b46Smrg' <confdefs.h | sed '
2168142a55b46Smrgs/'"$ac_delim"'/"\\\
2168242a55b46Smrg"/g' >>$CONFIG_STATUS || ac_write_fail=1
21683c582b7e3Smrg
2168442a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2168542a55b46Smrg  for (key in D) D_is_set[key] = 1
2168642a55b46Smrg  FS = ""
2168742a55b46Smrg}
2168842a55b46Smrg/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
2168942a55b46Smrg  line = \$ 0
2169042a55b46Smrg  split(line, arg, " ")
2169142a55b46Smrg  if (arg[1] == "#") {
2169242a55b46Smrg    defundef = arg[2]
2169342a55b46Smrg    mac1 = arg[3]
2169442a55b46Smrg  } else {
2169542a55b46Smrg    defundef = substr(arg[1], 2)
2169642a55b46Smrg    mac1 = arg[2]
2169742a55b46Smrg  }
2169842a55b46Smrg  split(mac1, mac2, "(") #)
2169942a55b46Smrg  macro = mac2[1]
2170042a55b46Smrg  prefix = substr(line, 1, index(line, defundef) - 1)
2170142a55b46Smrg  if (D_is_set[macro]) {
2170242a55b46Smrg    # Preserve the white space surrounding the "#".
2170342a55b46Smrg    print prefix "define", macro P[macro] D[macro]
2170442a55b46Smrg    next
2170542a55b46Smrg  } else {
2170642a55b46Smrg    # Replace #undef with comments.  This is necessary, for example,
2170742a55b46Smrg    # in the case of _POSIX_SOURCE, which is predefined and required
2170842a55b46Smrg    # on some systems where configure will not decide to define it.
2170942a55b46Smrg    if (defundef == "undef") {
2171042a55b46Smrg      print "/*", prefix defundef, macro, "*/"
2171142a55b46Smrg      next
2171242a55b46Smrg    }
2171342a55b46Smrg  }
2171442a55b46Smrg}
2171542a55b46Smrg{ print }
2171642a55b46Smrg_ACAWK
2171742a55b46Smrg_ACEOF
2171842a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2171942a55b46Smrg  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
2172042a55b46Smrgfi # test -n "$CONFIG_HEADERS"
21721c582b7e3Smrg
21722c582b7e3Smrg
2172342a55b46Smrgeval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
2172442a55b46Smrgshift
2172542a55b46Smrgfor ac_tag
2172642a55b46Smrgdo
2172742a55b46Smrg  case $ac_tag in
2172842a55b46Smrg  :[FHLC]) ac_mode=$ac_tag; continue;;
2172942a55b46Smrg  esac
2173042a55b46Smrg  case $ac_mode$ac_tag in
2173142a55b46Smrg  :[FHL]*:*);;
2173242a55b46Smrg  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
2173342a55b46Smrg  :[FH]-) ac_tag=-:-;;
2173442a55b46Smrg  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
2173542a55b46Smrg  esac
2173642a55b46Smrg  ac_save_IFS=$IFS
2173742a55b46Smrg  IFS=:
2173842a55b46Smrg  set x $ac_tag
2173942a55b46Smrg  IFS=$ac_save_IFS
2174042a55b46Smrg  shift
2174142a55b46Smrg  ac_file=$1
2174242a55b46Smrg  shift
21743c582b7e3Smrg
2174442a55b46Smrg  case $ac_mode in
2174542a55b46Smrg  :L) ac_source=$1;;
2174642a55b46Smrg  :[FH])
2174742a55b46Smrg    ac_file_inputs=
2174842a55b46Smrg    for ac_f
2174942a55b46Smrg    do
2175042a55b46Smrg      case $ac_f in
2175142a55b46Smrg      -) ac_f="$ac_tmp/stdin";;
2175242a55b46Smrg      *) # Look for the file first in the build tree, then in the source tree
2175342a55b46Smrg	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
2175442a55b46Smrg	 # because $ac_f cannot contain `:'.
2175542a55b46Smrg	 test -f "$ac_f" ||
2175642a55b46Smrg	   case $ac_f in
2175742a55b46Smrg	   [\\/$]*) false;;
2175842a55b46Smrg	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
2175942a55b46Smrg	   esac ||
2176042a55b46Smrg	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
2176142a55b46Smrg      esac
217628ce07328Smrg      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
2176342a55b46Smrg      as_fn_append ac_file_inputs " '$ac_f'"
2176442a55b46Smrg    done
21765c582b7e3Smrg
2176642a55b46Smrg    # Let's still pretend it is `configure' which instantiates (i.e., don't
2176742a55b46Smrg    # use $as_me), people would be surprised to read:
2176842a55b46Smrg    #    /* config.h.  Generated by config.status.  */
2176942a55b46Smrg    configure_input='Generated from '`
217708ce07328Smrg	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
2177142a55b46Smrg	`' by configure.'
2177242a55b46Smrg    if test x"$ac_file" != x-; then
2177342a55b46Smrg      configure_input="$ac_file.  $configure_input"
217748ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
217758ce07328Smrgprintf "%s\n" "$as_me: creating $ac_file" >&6;}
2177642a55b46Smrg    fi
2177742a55b46Smrg    # Neutralize special characters interpreted by sed in replacement strings.
2177842a55b46Smrg    case $configure_input in #(
2177942a55b46Smrg    *\&* | *\|* | *\\* )
217808ce07328Smrg       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
2178142a55b46Smrg       sed 's/[\\\\&|]/\\\\&/g'`;; #(
2178242a55b46Smrg    *) ac_sed_conf_input=$configure_input;;
2178342a55b46Smrg    esac
2178419019ffeSmrg
2178542a55b46Smrg    case $ac_tag in
2178642a55b46Smrg    *:-:* | *:-) cat >"$ac_tmp/stdin" \
2178742a55b46Smrg      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
2178842a55b46Smrg    esac
2178942a55b46Smrg    ;;
2179042a55b46Smrg  esac
2179119019ffeSmrg
2179242a55b46Smrg  ac_dir=`$as_dirname -- "$ac_file" ||
2179342a55b46Smrg$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2179442a55b46Smrg	 X"$ac_file" : 'X\(//\)[^/]' \| \
2179542a55b46Smrg	 X"$ac_file" : 'X\(//\)$' \| \
2179642a55b46Smrg	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
217978ce07328Smrgprintf "%s\n" X"$ac_file" |
2179842a55b46Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2179942a55b46Smrg	    s//\1/
2180042a55b46Smrg	    q
2180142a55b46Smrg	  }
2180242a55b46Smrg	  /^X\(\/\/\)[^/].*/{
2180342a55b46Smrg	    s//\1/
2180442a55b46Smrg	    q
2180542a55b46Smrg	  }
2180642a55b46Smrg	  /^X\(\/\/\)$/{
2180742a55b46Smrg	    s//\1/
2180842a55b46Smrg	    q
2180942a55b46Smrg	  }
2181042a55b46Smrg	  /^X\(\/\).*/{
2181142a55b46Smrg	    s//\1/
2181242a55b46Smrg	    q
2181342a55b46Smrg	  }
2181442a55b46Smrg	  s/.*/./; q'`
2181542a55b46Smrg  as_dir="$ac_dir"; as_fn_mkdir_p
2181642a55b46Smrg  ac_builddir=.
2181719019ffeSmrg
2181842a55b46Smrgcase "$ac_dir" in
2181942a55b46Smrg.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2182042a55b46Smrg*)
218218ce07328Smrg  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2182242a55b46Smrg  # A ".." for each directory in $ac_dir_suffix.
218238ce07328Smrg  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2182442a55b46Smrg  case $ac_top_builddir_sub in
2182542a55b46Smrg  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2182642a55b46Smrg  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2182742a55b46Smrg  esac ;;
2182842a55b46Smrgesac
2182942a55b46Smrgac_abs_top_builddir=$ac_pwd
2183042a55b46Smrgac_abs_builddir=$ac_pwd$ac_dir_suffix
2183142a55b46Smrg# for backward compatibility:
2183242a55b46Smrgac_top_builddir=$ac_top_build_prefix
2183319019ffeSmrg
2183442a55b46Smrgcase $srcdir in
2183542a55b46Smrg  .)  # We are building in place.
2183642a55b46Smrg    ac_srcdir=.
2183742a55b46Smrg    ac_top_srcdir=$ac_top_builddir_sub
2183842a55b46Smrg    ac_abs_top_srcdir=$ac_pwd ;;
2183942a55b46Smrg  [\\/]* | ?:[\\/]* )  # Absolute name.
2184042a55b46Smrg    ac_srcdir=$srcdir$ac_dir_suffix;
2184142a55b46Smrg    ac_top_srcdir=$srcdir
2184242a55b46Smrg    ac_abs_top_srcdir=$srcdir ;;
2184342a55b46Smrg  *) # Relative name.
2184442a55b46Smrg    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2184542a55b46Smrg    ac_top_srcdir=$ac_top_build_prefix$srcdir
2184642a55b46Smrg    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2184742a55b46Smrgesac
2184842a55b46Smrgac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21849c582b7e3Smrg
21850c582b7e3Smrg
2185142a55b46Smrg  case $ac_mode in
2185242a55b46Smrg  :F)
2185342a55b46Smrg  #
2185442a55b46Smrg  # CONFIG_FILE
2185542a55b46Smrg  #
21856c582b7e3Smrg
2185742a55b46Smrg  case $INSTALL in
2185842a55b46Smrg  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
2185942a55b46Smrg  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
2186042a55b46Smrg  esac
2186142a55b46Smrg  ac_MKDIR_P=$MKDIR_P
2186242a55b46Smrg  case $MKDIR_P in
2186342a55b46Smrg  [\\/$]* | ?:[\\/]* ) ;;
2186442a55b46Smrg  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
2186542a55b46Smrg  esac
21866c582b7e3Smrg_ACEOF
21867c582b7e3Smrg
2186842a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2186942a55b46Smrg# If the template does not know about datarootdir, expand it.
2187042a55b46Smrg# FIXME: This hack should be removed a few years after 2.60.
2187142a55b46Smrgac_datarootdir_hack=; ac_datarootdir_seen=
2187242a55b46Smrgac_sed_dataroot='
2187342a55b46Smrg/datarootdir/ {
2187442a55b46Smrg  p
2187542a55b46Smrg  q
2187642a55b46Smrg}
2187742a55b46Smrg/@datadir@/p
2187842a55b46Smrg/@docdir@/p
2187942a55b46Smrg/@infodir@/p
2188042a55b46Smrg/@localedir@/p
2188142a55b46Smrg/@mandir@/p'
2188242a55b46Smrgcase `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
2188342a55b46Smrg*datarootdir*) ac_datarootdir_seen=yes;;
2188442a55b46Smrg*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
218858ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
218868ce07328Smrgprintf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
2188742a55b46Smrg_ACEOF
2188842a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2188942a55b46Smrg  ac_datarootdir_hack='
2189042a55b46Smrg  s&@datadir@&$datadir&g
2189142a55b46Smrg  s&@docdir@&$docdir&g
2189242a55b46Smrg  s&@infodir@&$infodir&g
2189342a55b46Smrg  s&@localedir@&$localedir&g
2189442a55b46Smrg  s&@mandir@&$mandir&g
2189542a55b46Smrg  s&\\\${datarootdir}&$datarootdir&g' ;;
2189642a55b46Smrgesac
2189742a55b46Smrg_ACEOF
21898c582b7e3Smrg
2189942a55b46Smrg# Neutralize VPATH when `$srcdir' = `.'.
2190042a55b46Smrg# Shell code in configure.ac might set extrasub.
2190142a55b46Smrg# FIXME: do we really want to maintain this feature?
2190242a55b46Smrgcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2190342a55b46Smrgac_sed_extra="$ac_vpsub
2190442a55b46Smrg$extrasub
2190542a55b46Smrg_ACEOF
2190642a55b46Smrgcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
2190742a55b46Smrg:t
2190842a55b46Smrg/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
2190942a55b46Smrgs|@configure_input@|$ac_sed_conf_input|;t t
2191042a55b46Smrgs&@top_builddir@&$ac_top_builddir_sub&;t t
2191142a55b46Smrgs&@top_build_prefix@&$ac_top_build_prefix&;t t
2191242a55b46Smrgs&@srcdir@&$ac_srcdir&;t t
2191342a55b46Smrgs&@abs_srcdir@&$ac_abs_srcdir&;t t
2191442a55b46Smrgs&@top_srcdir@&$ac_top_srcdir&;t t
2191542a55b46Smrgs&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
2191642a55b46Smrgs&@builddir@&$ac_builddir&;t t
2191742a55b46Smrgs&@abs_builddir@&$ac_abs_builddir&;t t
2191842a55b46Smrgs&@abs_top_builddir@&$ac_abs_top_builddir&;t t
2191942a55b46Smrgs&@INSTALL@&$ac_INSTALL&;t t
2192042a55b46Smrgs&@MKDIR_P@&$ac_MKDIR_P&;t t
2192142a55b46Smrg$ac_datarootdir_hack
2192242a55b46Smrg"
2192342a55b46Smrgeval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
2192442a55b46Smrg  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
2192542a55b46Smrg
2192642a55b46Smrgtest -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
2192742a55b46Smrg  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
2192842a55b46Smrg  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
2192942a55b46Smrg      "$ac_tmp/out"`; test -z "$ac_out"; } &&
219308ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
2193142a55b46Smrgwhich seems to be undefined.  Please make sure it is defined" >&5
219328ce07328Smrgprintf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
2193342a55b46Smrgwhich seems to be undefined.  Please make sure it is defined" >&2;}
2193442a55b46Smrg
2193542a55b46Smrg  rm -f "$ac_tmp/stdin"
2193642a55b46Smrg  case $ac_file in
2193742a55b46Smrg  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
2193842a55b46Smrg  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
2193942a55b46Smrg  esac \
2194042a55b46Smrg  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
2194142a55b46Smrg ;;
2194242a55b46Smrg  :H)
2194342a55b46Smrg  #
2194442a55b46Smrg  # CONFIG_HEADER
2194542a55b46Smrg  #
2194642a55b46Smrg  if test x"$ac_file" != x-; then
2194742a55b46Smrg    {
219488ce07328Smrg      printf "%s\n" "/* $configure_input  */" >&1 \
2194942a55b46Smrg      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
2195042a55b46Smrg    } >"$ac_tmp/config.h" \
2195142a55b46Smrg      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
2195242a55b46Smrg    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
219538ce07328Smrg      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
219548ce07328Smrgprintf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
2195542a55b46Smrg    else
2195642a55b46Smrg      rm -f "$ac_file"
2195742a55b46Smrg      mv "$ac_tmp/config.h" "$ac_file" \
2195842a55b46Smrg	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
2195942a55b46Smrg    fi
21960c582b7e3Smrg  else
219618ce07328Smrg    printf "%s\n" "/* $configure_input  */" >&1 \
2196242a55b46Smrg      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
2196342a55b46Smrg      || as_fn_error $? "could not create -" "$LINENO" 5
21964c582b7e3Smrg  fi
2196542a55b46Smrg# Compute "$ac_file"'s index in $config_headers.
2196642a55b46Smrg_am_arg="$ac_file"
2196742a55b46Smrg_am_stamp_count=1
2196842a55b46Smrgfor _am_header in $config_headers :; do
2196942a55b46Smrg  case $_am_header in
2197042a55b46Smrg    $_am_arg | $_am_arg:* )
2197142a55b46Smrg      break ;;
2197242a55b46Smrg    * )
2197342a55b46Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2197442a55b46Smrg  esac
2197542a55b46Smrgdone
2197642a55b46Smrgecho "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
2197742a55b46Smrg$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2197842a55b46Smrg	 X"$_am_arg" : 'X\(//\)[^/]' \| \
2197942a55b46Smrg	 X"$_am_arg" : 'X\(//\)$' \| \
2198042a55b46Smrg	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
219818ce07328Smrgprintf "%s\n" X"$_am_arg" |
2198242a55b46Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2198342a55b46Smrg	    s//\1/
2198442a55b46Smrg	    q
2198542a55b46Smrg	  }
2198642a55b46Smrg	  /^X\(\/\/\)[^/].*/{
2198742a55b46Smrg	    s//\1/
2198842a55b46Smrg	    q
2198942a55b46Smrg	  }
2199042a55b46Smrg	  /^X\(\/\/\)$/{
2199142a55b46Smrg	    s//\1/
2199242a55b46Smrg	    q
2199342a55b46Smrg	  }
2199442a55b46Smrg	  /^X\(\/\).*/{
2199542a55b46Smrg	    s//\1/
2199642a55b46Smrg	    q
2199742a55b46Smrg	  }
2199842a55b46Smrg	  s/.*/./; q'`/stamp-h$_am_stamp_count
2199942a55b46Smrg ;;
22000c582b7e3Smrg
220018ce07328Smrg  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
220028ce07328Smrgprintf "%s\n" "$as_me: executing $ac_file commands" >&6;}
2200342a55b46Smrg ;;
2200442a55b46Smrg  esac
22005c582b7e3Smrg
22006c582b7e3Smrg
2200742a55b46Smrg  case $ac_file$ac_mode in
2200842a55b46Smrg    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
22009e3d74329Smrg  # Older Autoconf quotes --file arguments for eval, but not when files
2201042a55b46Smrg  # are listed without --file.  Let's play safe and only enable the eval
2201142a55b46Smrg  # if we detect the quoting.
220128ce07328Smrg  # TODO: see whether this extra hack can be removed once we start
220138ce07328Smrg  # requiring Autoconf 2.70 or later.
220148ce07328Smrg  case $CONFIG_FILES in #(
220158ce07328Smrg  *\'*) :
220168ce07328Smrg    eval set x "$CONFIG_FILES" ;; #(
220178ce07328Smrg  *) :
220188ce07328Smrg    set x $CONFIG_FILES ;; #(
220198ce07328Smrg  *) :
220208ce07328Smrg     ;;
220218ce07328Smrgesac
2202242a55b46Smrg  shift
220238ce07328Smrg  # Used to flag and report bootstrapping failures.
220248ce07328Smrg  am_rc=0
220258ce07328Smrg  for am_mf
2202642a55b46Smrg  do
2202742a55b46Smrg    # Strip MF so we end up with the name of the file.
220288ce07328Smrg    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
220298ce07328Smrg    # Check whether this is an Automake generated Makefile which includes
220308ce07328Smrg    # dependency-tracking related rules and includes.
220318ce07328Smrg    # Grep'ing the whole file directly is not great: AIX grep has a line
2203242a55b46Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
220338ce07328Smrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
220348ce07328Smrg      || continue
220358ce07328Smrg    am_dirpart=`$as_dirname -- "$am_mf" ||
220368ce07328Smrg$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
220378ce07328Smrg	 X"$am_mf" : 'X\(//\)[^/]' \| \
220388ce07328Smrg	 X"$am_mf" : 'X\(//\)$' \| \
220398ce07328Smrg	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
220408ce07328Smrgprintf "%s\n" X"$am_mf" |
2204142a55b46Smrg    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2204242a55b46Smrg	    s//\1/
2204342a55b46Smrg	    q
2204442a55b46Smrg	  }
2204542a55b46Smrg	  /^X\(\/\/\)[^/].*/{
2204642a55b46Smrg	    s//\1/
2204742a55b46Smrg	    q
2204842a55b46Smrg	  }
2204942a55b46Smrg	  /^X\(\/\/\)$/{
2205042a55b46Smrg	    s//\1/
2205142a55b46Smrg	    q
2205242a55b46Smrg	  }
2205342a55b46Smrg	  /^X\(\/\).*/{
2205442a55b46Smrg	    s//\1/
2205542a55b46Smrg	    q
2205642a55b46Smrg	  }
2205742a55b46Smrg	  s/.*/./; q'`
220588ce07328Smrg    am_filepart=`$as_basename -- "$am_mf" ||
220598ce07328Smrg$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
220608ce07328Smrg	 X"$am_mf" : 'X\(//\)$' \| \
220618ce07328Smrg	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
220628ce07328Smrgprintf "%s\n" X/"$am_mf" |
220638ce07328Smrg    sed '/^.*\/\([^/][^/]*\)\/*$/{
2206442a55b46Smrg	    s//\1/
2206542a55b46Smrg	    q
2206642a55b46Smrg	  }
220678ce07328Smrg	  /^X\/\(\/\/\)$/{
2206842a55b46Smrg	    s//\1/
2206942a55b46Smrg	    q
2207042a55b46Smrg	  }
220718ce07328Smrg	  /^X\/\(\/\).*/{
2207242a55b46Smrg	    s//\1/
2207342a55b46Smrg	    q
2207442a55b46Smrg	  }
2207542a55b46Smrg	  s/.*/./; q'`
220768ce07328Smrg    { echo "$as_me:$LINENO: cd "$am_dirpart" \
220778ce07328Smrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
220788ce07328Smrg        | $MAKE -f - am--depfiles" >&5
220798ce07328Smrg   (cd "$am_dirpart" \
220808ce07328Smrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
220818ce07328Smrg        | $MAKE -f - am--depfiles) >&5 2>&5
220828ce07328Smrg   ac_status=$?
220838ce07328Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&5
220848ce07328Smrg   (exit $ac_status); } || am_rc=$?
2208542a55b46Smrg  done
220868ce07328Smrg  if test $am_rc -ne 0; then
220878ce07328Smrg    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
220888ce07328Smrgprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
220898ce07328Smrgas_fn_error $? "Something went wrong bootstrapping makefile fragments
220908ce07328Smrg    for automatic dependency tracking.  If GNU make was not used, consider
220918ce07328Smrg    re-running the configure script with MAKE=\"gmake\" (or whatever is
220928ce07328Smrg    necessary).  You can also try re-running configure with the
220938ce07328Smrg    '--disable-dependency-tracking' option to at least be able to build
220948ce07328Smrg    the package (albeit without support for automatic dependency tracking).
220958ce07328SmrgSee \`config.log' for more details" "$LINENO" 5; }
220968ce07328Smrg  fi
220978ce07328Smrg  { am_dirpart=; unset am_dirpart;}
220988ce07328Smrg  { am_filepart=; unset am_filepart;}
220998ce07328Smrg  { am_mf=; unset am_mf;}
221008ce07328Smrg  { am_rc=; unset am_rc;}
221018ce07328Smrg  rm -f conftest-deps.mk
2210242a55b46Smrg}
2210342a55b46Smrg ;;
2210442a55b46Smrg    "libtool":C)
22105c582b7e3Smrg
22106e3d74329Smrg    # See if we are running on zsh, and set the options that allow our
2210742a55b46Smrg    # commands through without removal of \ escapes.
22108e3d74329Smrg    if test -n "${ZSH_VERSION+set}"; then
2210942a55b46Smrg      setopt NO_GLOB_SUBST
2211042a55b46Smrg    fi
22111c582b7e3Smrg
22112e3d74329Smrg    cfgfile=${ofile}T
2211342a55b46Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2211442a55b46Smrg    $RM "$cfgfile"
2211519019ffeSmrg
2211642a55b46Smrg    cat <<_LT_EOF >> "$cfgfile"
22117c582b7e3Smrg#! $SHELL
22118e3d74329Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION
2211942a55b46Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2212042a55b46Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
22121e3d74329Smrg
22122e3d74329Smrg# Provide generalized library-building support services.
22123e3d74329Smrg# Written by Gordon Matzigkeit, 1996
22124e3d74329Smrg
22125e3d74329Smrg# Copyright (C) 2014 Free Software Foundation, Inc.
22126e3d74329Smrg# This is free software; see the source for copying conditions.  There is NO
22127e3d74329Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22128e3d74329Smrg
22129e3d74329Smrg# GNU Libtool is free software; you can redistribute it and/or modify
22130e3d74329Smrg# it under the terms of the GNU General Public License as published by
22131e3d74329Smrg# the Free Software Foundation; either version 2 of of the License, or
22132e3d74329Smrg# (at your option) any later version.
2213342a55b46Smrg#
22134e3d74329Smrg# As a special exception to the GNU General Public License, if you
22135e3d74329Smrg# distribute this file as part of a program or library that is built
22136e3d74329Smrg# using GNU Libtool, you may include this file under the  same
22137e3d74329Smrg# distribution terms that you use for the rest of that program.
2213842a55b46Smrg#
22139e3d74329Smrg# GNU Libtool is distributed in the hope that it will be useful, but
22140e3d74329Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
2214142a55b46Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2214242a55b46Smrg# GNU General Public License for more details.
2214342a55b46Smrg#
2214442a55b46Smrg# You should have received a copy of the GNU General Public License
22145e3d74329Smrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22146c582b7e3Smrg
22147c582b7e3Smrg
2214842a55b46Smrg# The names of the tagged configurations supported by this script.
22149e3d74329Smrgavailable_tags=''
22150e3d74329Smrg
22151e3d74329Smrg# Configured defaults for sys_lib_dlsearch_path munging.
22152e3d74329Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
22153c582b7e3Smrg
2215442a55b46Smrg# ### BEGIN LIBTOOL CONFIG
22155c582b7e3Smrg
2215642a55b46Smrg# Whether or not to build static libraries.
2215742a55b46Smrgbuild_old_libs=$enable_static
2215819019ffeSmrg
2215942a55b46Smrg# Which release of libtool.m4 was used?
2216042a55b46Smrgmacro_version=$macro_version
2216142a55b46Smrgmacro_revision=$macro_revision
22162c582b7e3Smrg
2216342a55b46Smrg# Whether or not to build shared libraries.
2216442a55b46Smrgbuild_libtool_libs=$enable_shared
22165c582b7e3Smrg
2216642a55b46Smrg# What type of objects to build.
2216742a55b46Smrgpic_mode=$pic_mode
22168c582b7e3Smrg
2216942a55b46Smrg# Whether or not to optimize for fast installation.
2217042a55b46Smrgfast_install=$enable_fast_install
22171c582b7e3Smrg
22172e3d74329Smrg# Shared archive member basename,for filename based shared library versioning on AIX.
22173e3d74329Smrgshared_archive_member_spec=$shared_archive_member_spec
22174e3d74329Smrg
2217542a55b46Smrg# Shell to use when invoking shell scripts.
2217642a55b46SmrgSHELL=$lt_SHELL
22177c582b7e3Smrg
2217842a55b46Smrg# An echo program that protects backslashes.
2217942a55b46SmrgECHO=$lt_ECHO
22180c582b7e3Smrg
2218142a55b46Smrg# The PATH separator for the build system.
2218242a55b46SmrgPATH_SEPARATOR=$lt_PATH_SEPARATOR
22183c582b7e3Smrg
2218442a55b46Smrg# The host system.
2218542a55b46Smrghost_alias=$host_alias
2218642a55b46Smrghost=$host
2218742a55b46Smrghost_os=$host_os
22188c582b7e3Smrg
2218942a55b46Smrg# The build system.
2219042a55b46Smrgbuild_alias=$build_alias
2219142a55b46Smrgbuild=$build
2219242a55b46Smrgbuild_os=$build_os
22193c582b7e3Smrg
2219442a55b46Smrg# A sed program that does not truncate output.
2219542a55b46SmrgSED=$lt_SED
22196c582b7e3Smrg
2219742a55b46Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2219842a55b46SmrgXsed="\$SED -e 1s/^X//"
22199c582b7e3Smrg
2220042a55b46Smrg# A grep program that handles long lines.
2220142a55b46SmrgGREP=$lt_GREP
22202c582b7e3Smrg
2220342a55b46Smrg# An ERE matcher.
2220442a55b46SmrgEGREP=$lt_EGREP
22205c582b7e3Smrg
2220642a55b46Smrg# A literal string matcher.
2220742a55b46SmrgFGREP=$lt_FGREP
22208c582b7e3Smrg
2220942a55b46Smrg# A BSD- or MS-compatible name lister.
2221042a55b46SmrgNM=$lt_NM
22211c582b7e3Smrg
2221242a55b46Smrg# Whether we need soft or hard links.
2221342a55b46SmrgLN_S=$lt_LN_S
22214c582b7e3Smrg
2221542a55b46Smrg# What is the maximum length of a command?
2221642a55b46Smrgmax_cmd_len=$max_cmd_len
22217c582b7e3Smrg
2221842a55b46Smrg# Object file suffix (normally "o").
2221942a55b46Smrgobjext=$ac_objext
22220c582b7e3Smrg
2222142a55b46Smrg# Executable file suffix (normally "").
2222242a55b46Smrgexeext=$exeext
22223c582b7e3Smrg
2222442a55b46Smrg# whether the shell understands "unset".
2222542a55b46Smrglt_unset=$lt_unset
22226c582b7e3Smrg
2222742a55b46Smrg# turn spaces into newlines.
2222842a55b46SmrgSP2NL=$lt_lt_SP2NL
22229c582b7e3Smrg
2223042a55b46Smrg# turn newlines into spaces.
2223142a55b46SmrgNL2SP=$lt_lt_NL2SP
22232c582b7e3Smrg
2223342a55b46Smrg# convert \$build file names to \$host format.
2223442a55b46Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
22235c582b7e3Smrg
2223642a55b46Smrg# convert \$build files to toolchain format.
2223742a55b46Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
22238c582b7e3Smrg
222398ce07328Smrg# A file(cmd) program that detects file types.
222408ce07328SmrgFILECMD=$lt_FILECMD
222418ce07328Smrg
2224242a55b46Smrg# An object symbol dumper.
2224342a55b46SmrgOBJDUMP=$lt_OBJDUMP
22244c582b7e3Smrg
2224542a55b46Smrg# Method to check whether dependent libraries are shared objects.
2224642a55b46Smrgdeplibs_check_method=$lt_deplibs_check_method
22247c582b7e3Smrg
2224842a55b46Smrg# Command to use when deplibs_check_method = "file_magic".
2224942a55b46Smrgfile_magic_cmd=$lt_file_magic_cmd
22250c582b7e3Smrg
2225142a55b46Smrg# How to find potential files when deplibs_check_method = "file_magic".
2225242a55b46Smrgfile_magic_glob=$lt_file_magic_glob
22253c582b7e3Smrg
2225442a55b46Smrg# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
2225542a55b46Smrgwant_nocaseglob=$lt_want_nocaseglob
22256c582b7e3Smrg
2225742a55b46Smrg# DLL creation program.
2225842a55b46SmrgDLLTOOL=$lt_DLLTOOL
22259c582b7e3Smrg
2226042a55b46Smrg# Command to associate shared and link libraries.
2226142a55b46Smrgsharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
22262c582b7e3Smrg
2226342a55b46Smrg# The archiver.
2226442a55b46SmrgAR=$lt_AR
22265c582b7e3Smrg
222668ce07328Smrg# Flags to create an archive (by configure).
222678ce07328Smrglt_ar_flags=$lt_ar_flags
222688ce07328Smrg
2226942a55b46Smrg# Flags to create an archive.
222708ce07328SmrgAR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
2227119019ffeSmrg
2227242a55b46Smrg# How to feed a file listing to the archiver.
2227342a55b46Smrgarchiver_list_spec=$lt_archiver_list_spec
2227419019ffeSmrg
2227542a55b46Smrg# A symbol stripping program.
2227642a55b46SmrgSTRIP=$lt_STRIP
2227719019ffeSmrg
2227842a55b46Smrg# Commands used to install an old-style archive.
2227942a55b46SmrgRANLIB=$lt_RANLIB
2228042a55b46Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
2228142a55b46Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
22282c582b7e3Smrg
2228342a55b46Smrg# Whether to use a lock for old archive extraction.
2228442a55b46Smrglock_old_archive_extraction=$lock_old_archive_extraction
22285c582b7e3Smrg
2228642a55b46Smrg# A C compiler.
2228742a55b46SmrgLTCC=$lt_CC
22288c582b7e3Smrg
2228942a55b46Smrg# LTCC compiler flags.
2229042a55b46SmrgLTCFLAGS=$lt_CFLAGS
22291c582b7e3Smrg
2229242a55b46Smrg# Take the output of nm and produce a listing of raw symbols and C names.
2229342a55b46Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
22294c582b7e3Smrg
2229542a55b46Smrg# Transform the output of nm in a proper C declaration.
2229642a55b46Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
22297c582b7e3Smrg
22298e3d74329Smrg# Transform the output of nm into a list of symbols to manually relocate.
22299e3d74329Smrgglobal_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
22300e3d74329Smrg
2230142a55b46Smrg# Transform the output of nm in a C name address pair.
2230242a55b46Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
22303c582b7e3Smrg
2230442a55b46Smrg# Transform the output of nm in a C name address pair when lib prefix is needed.
2230542a55b46Smrgglobal_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
22306c582b7e3Smrg
22307e3d74329Smrg# The name lister interface.
22308e3d74329Smrgnm_interface=$lt_lt_cv_nm_interface
22309e3d74329Smrg
2231042a55b46Smrg# Specify filename containing input files for \$NM.
2231142a55b46Smrgnm_file_list_spec=$lt_nm_file_list_spec
22312c582b7e3Smrg
22313e3d74329Smrg# The root where to search for dependent libraries,and where our libraries should be installed.
2231442a55b46Smrglt_sysroot=$lt_sysroot
22315c582b7e3Smrg
22316e3d74329Smrg# Command to truncate a binary pipe.
22317e3d74329Smrglt_truncate_bin=$lt_lt_cv_truncate_bin
22318e3d74329Smrg
2231942a55b46Smrg# The name of the directory that contains temporary libtool files.
2232042a55b46Smrgobjdir=$objdir
22321c582b7e3Smrg
2232242a55b46Smrg# Used to examine libraries when file_magic_cmd begins with "file".
2232342a55b46SmrgMAGIC_CMD=$MAGIC_CMD
22324c582b7e3Smrg
2232542a55b46Smrg# Must we lock files when doing compilation?
2232642a55b46Smrgneed_locks=$lt_need_locks
22327c582b7e3Smrg
2232842a55b46Smrg# Manifest tool.
2232942a55b46SmrgMANIFEST_TOOL=$lt_MANIFEST_TOOL
22330c582b7e3Smrg
2233142a55b46Smrg# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
2233242a55b46SmrgDSYMUTIL=$lt_DSYMUTIL
22333c582b7e3Smrg
2233442a55b46Smrg# Tool to change global to local symbols on Mac OS X.
2233542a55b46SmrgNMEDIT=$lt_NMEDIT
22336c582b7e3Smrg
2233742a55b46Smrg# Tool to manipulate fat objects and archives on Mac OS X.
2233842a55b46SmrgLIPO=$lt_LIPO
22339c582b7e3Smrg
2234042a55b46Smrg# ldd/readelf like tool for Mach-O binaries on Mac OS X.
2234142a55b46SmrgOTOOL=$lt_OTOOL
22342c582b7e3Smrg
2234342a55b46Smrg# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
2234442a55b46SmrgOTOOL64=$lt_OTOOL64
22345c582b7e3Smrg
2234642a55b46Smrg# Old archive suffix (normally "a").
2234742a55b46Smrglibext=$libext
22348c582b7e3Smrg
2234942a55b46Smrg# Shared library suffix (normally ".so").
2235042a55b46Smrgshrext_cmds=$lt_shrext_cmds
22351c582b7e3Smrg
2235242a55b46Smrg# The commands to extract the exported symbol list from a shared archive.
2235342a55b46Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
2235442a55b46Smrg
2235542a55b46Smrg# Variables whose values should be saved in libtool wrapper scripts and
2235642a55b46Smrg# restored at link time.
2235742a55b46Smrgvariables_saved_for_relink=$lt_variables_saved_for_relink
2235842a55b46Smrg
2235942a55b46Smrg# Do we need the "lib" prefix for modules?
2236042a55b46Smrgneed_lib_prefix=$need_lib_prefix
2236142a55b46Smrg
2236242a55b46Smrg# Do we need a version for libraries?
2236342a55b46Smrgneed_version=$need_version
2236442a55b46Smrg
2236542a55b46Smrg# Library versioning type.
2236642a55b46Smrgversion_type=$version_type
2236742a55b46Smrg
2236842a55b46Smrg# Shared library runtime path variable.
2236942a55b46Smrgrunpath_var=$runpath_var
2237042a55b46Smrg
2237142a55b46Smrg# Shared library path variable.
2237242a55b46Smrgshlibpath_var=$shlibpath_var
2237342a55b46Smrg
2237442a55b46Smrg# Is shlibpath searched before the hard-coded library search path?
2237542a55b46Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
22376c582b7e3Smrg
2237742a55b46Smrg# Format of library name prefix.
2237842a55b46Smrglibname_spec=$lt_libname_spec
22379c582b7e3Smrg
2238042a55b46Smrg# List of archive names.  First name is the real one, the rest are links.
2238142a55b46Smrg# The last name is the one that the linker finds with -lNAME
2238242a55b46Smrglibrary_names_spec=$lt_library_names_spec
22383c582b7e3Smrg
2238442a55b46Smrg# The coded name of the library, if different from the real name.
2238542a55b46Smrgsoname_spec=$lt_soname_spec
22386c582b7e3Smrg
2238742a55b46Smrg# Permission mode override for installation of shared libraries.
2238842a55b46Smrginstall_override_mode=$lt_install_override_mode
22389c582b7e3Smrg
2239042a55b46Smrg# Command to use after installation of a shared archive.
2239142a55b46Smrgpostinstall_cmds=$lt_postinstall_cmds
22392c582b7e3Smrg
2239342a55b46Smrg# Command to use after uninstallation of a shared archive.
2239442a55b46Smrgpostuninstall_cmds=$lt_postuninstall_cmds
22395c582b7e3Smrg
2239642a55b46Smrg# Commands used to finish a libtool library installation in a directory.
2239742a55b46Smrgfinish_cmds=$lt_finish_cmds
22398c582b7e3Smrg
2239942a55b46Smrg# As "finish_cmds", except a single script fragment to be evaled but
2240042a55b46Smrg# not shown.
2240142a55b46Smrgfinish_eval=$lt_finish_eval
22402c582b7e3Smrg
2240342a55b46Smrg# Whether we should hardcode library paths into libraries.
2240442a55b46Smrghardcode_into_libs=$hardcode_into_libs
22405c582b7e3Smrg
2240642a55b46Smrg# Compile-time system search path for libraries.
2240742a55b46Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
22408c582b7e3Smrg
22409e3d74329Smrg# Detected run-time system search path for libraries.
22410e3d74329Smrgsys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
22411e3d74329Smrg
22412e3d74329Smrg# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
22413e3d74329Smrgconfigure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
22414c582b7e3Smrg
2241542a55b46Smrg# Whether dlopen is supported.
2241642a55b46Smrgdlopen_support=$enable_dlopen
22417c582b7e3Smrg
2241842a55b46Smrg# Whether dlopen of programs is supported.
2241942a55b46Smrgdlopen_self=$enable_dlopen_self
22420c582b7e3Smrg
2242142a55b46Smrg# Whether dlopen of statically linked programs is supported.
2242242a55b46Smrgdlopen_self_static=$enable_dlopen_self_static
22423c582b7e3Smrg
2242442a55b46Smrg# Commands to strip libraries.
2242542a55b46Smrgold_striplib=$lt_old_striplib
2242642a55b46Smrgstriplib=$lt_striplib
22427c582b7e3Smrg
2242819019ffeSmrg
2242942a55b46Smrg# The linker used to build libraries.
2243042a55b46SmrgLD=$lt_LD
2243119019ffeSmrg
2243242a55b46Smrg# How to create reloadable object files.
2243342a55b46Smrgreload_flag=$lt_reload_flag
2243442a55b46Smrgreload_cmds=$lt_reload_cmds
22435c582b7e3Smrg
2243642a55b46Smrg# Commands used to build an old-style archive.
2243742a55b46Smrgold_archive_cmds=$lt_old_archive_cmds
22438c582b7e3Smrg
2243942a55b46Smrg# A language specific compiler.
2244042a55b46SmrgCC=$lt_compiler
22441c582b7e3Smrg
2244242a55b46Smrg# Is the compiler the GNU compiler?
2244342a55b46Smrgwith_gcc=$GCC
22444c582b7e3Smrg
2244542a55b46Smrg# Compiler flag to turn off builtin functions.
2244642a55b46Smrgno_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
2244719019ffeSmrg
2244842a55b46Smrg# Additional compiler flags for building library objects.
2244942a55b46Smrgpic_flag=$lt_lt_prog_compiler_pic
2245019019ffeSmrg
2245142a55b46Smrg# How to pass a linker flag through the compiler.
2245242a55b46Smrgwl=$lt_lt_prog_compiler_wl
2245319019ffeSmrg
2245442a55b46Smrg# Compiler flag to prevent dynamic linking.
2245542a55b46Smrglink_static_flag=$lt_lt_prog_compiler_static
2245619019ffeSmrg
2245742a55b46Smrg# Does compiler simultaneously support -c and -o options?
2245842a55b46Smrgcompiler_c_o=$lt_lt_cv_prog_compiler_c_o
2245919019ffeSmrg
2246042a55b46Smrg# Whether or not to add -lc for building shared libraries.
2246142a55b46Smrgbuild_libtool_need_lc=$archive_cmds_need_lc
2246219019ffeSmrg
2246342a55b46Smrg# Whether or not to disallow shared libs when runtime libs are static.
2246442a55b46Smrgallow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
22465c582b7e3Smrg
2246642a55b46Smrg# Compiler flag to allow reflexive dlopens.
2246742a55b46Smrgexport_dynamic_flag_spec=$lt_export_dynamic_flag_spec
22468c582b7e3Smrg
2246942a55b46Smrg# Compiler flag to generate shared objects directly from archives.
2247042a55b46Smrgwhole_archive_flag_spec=$lt_whole_archive_flag_spec
22471c582b7e3Smrg
2247242a55b46Smrg# Whether the compiler copes with passing no objects directly.
2247342a55b46Smrgcompiler_needs_object=$lt_compiler_needs_object
22474c582b7e3Smrg
2247542a55b46Smrg# Create an old-style archive from a shared archive.
2247642a55b46Smrgold_archive_from_new_cmds=$lt_old_archive_from_new_cmds
22477c582b7e3Smrg
2247842a55b46Smrg# Create a temporary old-style archive to link instead of a shared archive.
2247942a55b46Smrgold_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
22480c582b7e3Smrg
2248142a55b46Smrg# Commands used to build a shared archive.
2248242a55b46Smrgarchive_cmds=$lt_archive_cmds
2248342a55b46Smrgarchive_expsym_cmds=$lt_archive_expsym_cmds
22484c582b7e3Smrg
2248542a55b46Smrg# Commands used to build a loadable module if different from building
2248642a55b46Smrg# a shared archive.
2248742a55b46Smrgmodule_cmds=$lt_module_cmds
2248842a55b46Smrgmodule_expsym_cmds=$lt_module_expsym_cmds
22489c582b7e3Smrg
2249042a55b46Smrg# Whether we are building with GNU ld or not.
2249142a55b46Smrgwith_gnu_ld=$lt_with_gnu_ld
22492c582b7e3Smrg
2249342a55b46Smrg# Flag that allows shared libraries with undefined symbols to be built.
2249442a55b46Smrgallow_undefined_flag=$lt_allow_undefined_flag
22495c582b7e3Smrg
2249642a55b46Smrg# Flag that enforces no undefined symbols.
2249742a55b46Smrgno_undefined_flag=$lt_no_undefined_flag
22498c582b7e3Smrg
2249942a55b46Smrg# Flag to hardcode \$libdir into a binary during linking.
2250042a55b46Smrg# This must work even if \$libdir does not exist
2250142a55b46Smrghardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
22502c582b7e3Smrg
2250342a55b46Smrg# Whether we need a single "-rpath" flag with a separated argument.
2250442a55b46Smrghardcode_libdir_separator=$lt_hardcode_libdir_separator
2250542a55b46Smrg
22506e3d74329Smrg# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
2250742a55b46Smrg# DIR into the resulting binary.
2250842a55b46Smrghardcode_direct=$hardcode_direct
2250942a55b46Smrg
22510e3d74329Smrg# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
2251142a55b46Smrg# DIR into the resulting binary and the resulting library dependency is
22512e3d74329Smrg# "absolute",i.e impossible to change by setting \$shlibpath_var if the
2251342a55b46Smrg# library is relocated.
2251442a55b46Smrghardcode_direct_absolute=$hardcode_direct_absolute
2251542a55b46Smrg
2251642a55b46Smrg# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
2251742a55b46Smrg# into the resulting binary.
2251842a55b46Smrghardcode_minus_L=$hardcode_minus_L
2251942a55b46Smrg
2252042a55b46Smrg# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
2252142a55b46Smrg# into the resulting binary.
2252242a55b46Smrghardcode_shlibpath_var=$hardcode_shlibpath_var
22523c582b7e3Smrg
2252442a55b46Smrg# Set to "yes" if building a shared library automatically hardcodes DIR
2252542a55b46Smrg# into the library and all subsequent libraries and executables linked
2252642a55b46Smrg# against it.
2252742a55b46Smrghardcode_automatic=$hardcode_automatic
22528c582b7e3Smrg
2252942a55b46Smrg# Set to yes if linker adds runtime paths of dependent libraries
2253042a55b46Smrg# to runtime path list.
2253142a55b46Smrginherit_rpath=$inherit_rpath
22532c582b7e3Smrg
2253342a55b46Smrg# Whether libtool must link a program against all its dependency libraries.
2253442a55b46Smrglink_all_deplibs=$link_all_deplibs
22535c582b7e3Smrg
2253642a55b46Smrg# Set to "yes" if exported symbols are required.
2253742a55b46Smrgalways_export_symbols=$always_export_symbols
22538c582b7e3Smrg
2253942a55b46Smrg# The commands to list exported symbols.
2254042a55b46Smrgexport_symbols_cmds=$lt_export_symbols_cmds
22541c582b7e3Smrg
2254242a55b46Smrg# Symbols that should not be listed in the preloaded symbols.
2254342a55b46Smrgexclude_expsyms=$lt_exclude_expsyms
2254442a55b46Smrg
2254542a55b46Smrg# Symbols that must always be exported.
2254642a55b46Smrginclude_expsyms=$lt_include_expsyms
2254742a55b46Smrg
2254842a55b46Smrg# Commands necessary for linking programs (against libraries) with templates.
2254942a55b46Smrgprelink_cmds=$lt_prelink_cmds
2255042a55b46Smrg
2255142a55b46Smrg# Commands necessary for finishing linking programs.
2255242a55b46Smrgpostlink_cmds=$lt_postlink_cmds
2255342a55b46Smrg
2255442a55b46Smrg# Specify filename containing input files.
2255542a55b46Smrgfile_list_spec=$lt_file_list_spec
2255642a55b46Smrg
2255742a55b46Smrg# How to hardcode a shared library path into an executable.
2255842a55b46Smrghardcode_action=$hardcode_action
2255942a55b46Smrg
2256042a55b46Smrg# ### END LIBTOOL CONFIG
2256142a55b46Smrg
22562e3d74329Smrg_LT_EOF
22563e3d74329Smrg
22564e3d74329Smrg    cat <<'_LT_EOF' >> "$cfgfile"
22565e3d74329Smrg
22566e3d74329Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
22567e3d74329Smrg
22568e3d74329Smrg# func_munge_path_list VARIABLE PATH
22569e3d74329Smrg# -----------------------------------
22570e3d74329Smrg# VARIABLE is name of variable containing _space_ separated list of
22571e3d74329Smrg# directories to be munged by the contents of PATH, which is string
22572e3d74329Smrg# having a format:
22573e3d74329Smrg# "DIR[:DIR]:"
22574e3d74329Smrg#       string "DIR[ DIR]" will be prepended to VARIABLE
22575e3d74329Smrg# ":DIR[:DIR]"
22576e3d74329Smrg#       string "DIR[ DIR]" will be appended to VARIABLE
22577e3d74329Smrg# "DIRP[:DIRP]::[DIRA:]DIRA"
22578e3d74329Smrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
22579e3d74329Smrg#       "DIRA[ DIRA]" will be appended to VARIABLE
22580e3d74329Smrg# "DIR[:DIR]"
22581e3d74329Smrg#       VARIABLE will be replaced by "DIR[ DIR]"
22582e3d74329Smrgfunc_munge_path_list ()
22583e3d74329Smrg{
22584e3d74329Smrg    case x$2 in
22585e3d74329Smrg    x)
22586e3d74329Smrg        ;;
22587e3d74329Smrg    *:)
22588e3d74329Smrg        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
22589e3d74329Smrg        ;;
22590e3d74329Smrg    x:*)
22591e3d74329Smrg        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
22592e3d74329Smrg        ;;
22593e3d74329Smrg    *::*)
22594e3d74329Smrg        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
22595e3d74329Smrg        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
22596e3d74329Smrg        ;;
22597e3d74329Smrg    *)
22598e3d74329Smrg        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
22599e3d74329Smrg        ;;
22600e3d74329Smrg    esac
22601e3d74329Smrg}
22602e3d74329Smrg
22603e3d74329Smrg
22604e3d74329Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
22605e3d74329Smrgfunc_cc_basename ()
22606e3d74329Smrg{
22607e3d74329Smrg    for cc_temp in $*""; do
22608e3d74329Smrg      case $cc_temp in
22609e3d74329Smrg        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
22610e3d74329Smrg        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
22611e3d74329Smrg        \-*) ;;
22612e3d74329Smrg        *) break;;
22613e3d74329Smrg      esac
22614e3d74329Smrg    done
22615e3d74329Smrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
22616e3d74329Smrg}
22617e3d74329Smrg
22618e3d74329Smrg
22619e3d74329Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE
22620e3d74329Smrg
2262142a55b46Smrg_LT_EOF
2262242a55b46Smrg
2262342a55b46Smrg  case $host_os in
2262442a55b46Smrg  aix3*)
2262542a55b46Smrg    cat <<\_LT_EOF >> "$cfgfile"
2262642a55b46Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
2262742a55b46Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
2262842a55b46Smrg# vanish in a puff of smoke.
22629e3d74329Smrgif test set != "${COLLECT_NAMES+set}"; then
2263042a55b46Smrg  COLLECT_NAMES=
2263142a55b46Smrg  export COLLECT_NAMES
2263242a55b46Smrgfi
2263342a55b46Smrg_LT_EOF
2263442a55b46Smrg    ;;
22635c582b7e3Smrg  esac
2263642a55b46Smrg
2263742a55b46Smrg
226388ce07328Smrg
22639e3d74329Smrgltmain=$ac_aux_dir/ltmain.sh
2264042a55b46Smrg
2264142a55b46Smrg
2264242a55b46Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
2264342a55b46Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2264442a55b46Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
2264542a55b46Smrg  # is reportedly fixed, but why not run on old versions too?
226468ce07328Smrg  $SED '$q' "$ltmain" >> "$cfgfile" \
2264742a55b46Smrg     || (rm -f "$cfgfile"; exit 1)
2264842a55b46Smrg
2264942a55b46Smrg   mv -f "$cfgfile" "$ofile" ||
2265042a55b46Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2265142a55b46Smrg  chmod +x "$ofile"
2265242a55b46Smrg
22653c582b7e3Smrg ;;
22654c582b7e3Smrg
22655c582b7e3Smrg  esac
22656c582b7e3Smrgdone # for ac_tag
22657c582b7e3Smrg
22658c582b7e3Smrg
2265942a55b46Smrgas_fn_exit 0
22660c582b7e3Smrg_ACEOF
22661c582b7e3Smrgac_clean_files=$ac_clean_files_save
22662c582b7e3Smrg
2266319019ffeSmrgtest $ac_write_fail = 0 ||
2266442a55b46Smrg  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
2266519019ffeSmrg
22666c582b7e3Smrg
22667c582b7e3Smrg# configure is writing to config.log, and then calls config.status.
22668c582b7e3Smrg# config.status does its own redirection, appending to config.log.
22669c582b7e3Smrg# Unfortunately, on DOS this fails, as config.log is still kept open
22670c582b7e3Smrg# by configure, so config.status won't be able to write to it; its
22671c582b7e3Smrg# output is simply discarded.  So we exec the FD to /dev/null,
22672c582b7e3Smrg# effectively closing config.log, so it can be properly (re)opened and
22673c582b7e3Smrg# appended to by config.status.  When coming back to configure, we
22674c582b7e3Smrg# need to make the FD available again.
22675c582b7e3Smrgif test "$no_create" != yes; then
22676c582b7e3Smrg  ac_cs_success=:
22677c582b7e3Smrg  ac_config_status_args=
22678c582b7e3Smrg  test "$silent" = yes &&
22679c582b7e3Smrg    ac_config_status_args="$ac_config_status_args --quiet"
22680c582b7e3Smrg  exec 5>/dev/null
22681c582b7e3Smrg  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22682c582b7e3Smrg  exec 5>>config.log
22683c582b7e3Smrg  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22684c582b7e3Smrg  # would make configure fail if this is the last instruction.
2268542a55b46Smrg  $ac_cs_success || as_fn_exit 1
22686c582b7e3Smrgfi
2268719019ffeSmrgif test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
226888ce07328Smrg  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
226898ce07328Smrgprintf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
2269019019ffeSmrgfi
22691c582b7e3Smrg
226928ce07328Smrg
22693