$NetBSD: patch-configure,v 1.3 2016/09/19 05:33:15 mef Exp $

Don't create broken or non-portable binaries. This code isn't even
performance critical.

--- configure~	2016-05-20 17:26:30.000000000 +0900
+++ configure	2016-09-19 14:20:56.000000000 +0900
@@ -7735,381 +7735,6 @@ $as_echo_n "checking for preferred warni
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${warnflags}" >&5
 $as_echo "${warnflags}" >&6; }
 
-
-
-
-	case " ${CFLAGS} ${EXTRA_CFLAGS} " in
-	(*" -O"[0-9]" "*)
-		;;
-	(*" -Os "*)
-		;;
-	(*" -Og "*)
-		;;
-	(*" -Ofast "*)
-		;;
-	(*" -O "*)
-		;;
-	(*)
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -O3" >&5
-$as_echo_n "checking whether C compiler accepts -O3... " >&6; }
-
-	## store werror status, then turn -Werror on
-	save_ac_c_werror_flag="${ac_c_werror_flag}"
-
-ac_c_werror_flag=yes
-
-	if ${sxe_cv_c_flag__O3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  		sxe_save_FLAGS="${CFLAGS}"
-		CFLAGS="-O3"
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval sxe_cv_c_flag__O3="yes"
-else
-  eval sxe_cv_c_flag__O3="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-		CFLAGS="${sxe_save_FLAGS}"
-
-fi
-
-	eval sxe_check_flag=$sxe_cv_c_flag__O3
-	ac_c_werror_flag="${save_ac_c_werror_flag}"
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sxe_check_flag}" >&5
-$as_echo "${sxe_check_flag}" >&6; }
-	if test "${sxe_check_flag}" = "yes"; then
-		:
-
-			optiflags="${optiflags} -O3"
-	else
-		:
-
-	fi
-
-		;;
-	esac
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -ipo" >&5
-$as_echo_n "checking whether C compiler accepts -ipo... " >&6; }
-
-	## store werror status, then turn -Werror on
-	save_ac_c_werror_flag="${ac_c_werror_flag}"
-
-ac_c_werror_flag=yes
-
-	if ${sxe_cv_c_flag__ipo+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  		sxe_save_FLAGS="${CFLAGS}"
-		CFLAGS="-ipo"
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval sxe_cv_c_flag__ipo="yes"
-else
-  eval sxe_cv_c_flag__ipo="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-		CFLAGS="${sxe_save_FLAGS}"
-
-fi
-
-	eval sxe_check_flag=$sxe_cv_c_flag__ipo
-	ac_c_werror_flag="${save_ac_c_werror_flag}"
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sxe_check_flag}" >&5
-$as_echo "${sxe_check_flag}" >&6; }
-	if test "${sxe_check_flag}" = "yes"; then
-		:
-
-		optiflags="${optiflags} -ipo"
-
-		if test -n "$ac_tool_prefix"; then
-  for ac_prog in xiar ar
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$AR" && break
-  done
-fi
-if test -z "$AR"; then
-  ac_ct_AR=$AR
-  for ac_prog in xiar ar
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_AR="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_AR" && break
-done
-
-  if test "x$ac_ct_AR" = x; then
-    AR="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-fi
-
-		if test -n "$ac_tool_prefix"; then
-  for ac_prog in xild ld
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LD"; then
-  ac_cv_prog_LD="$LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_LD="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-LD=$ac_cv_prog_LD
-if test -n "$LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$LD" && break
-  done
-fi
-if test -z "$LD"; then
-  ac_ct_LD=$LD
-  for ac_prog in xild ld
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_LD"; then
-  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_LD="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LD=$ac_cv_prog_ac_ct_LD
-if test -n "$ac_ct_LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
-$as_echo "$ac_ct_LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_LD" && break
-done
-
-  if test "x$ac_ct_LD" = x; then
-    LD="false"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    LD=$ac_ct_LD
-  fi
-fi
-
-
-		## fiddle with xiar and xild params, kick ansi aliasing warnings
-		if test "${ac_cv_prog_ac_ct_AR}" = "xiar"; then
-			AR="${AR} -qdiag-disable=2102"
-		fi
-		if test "${ac_cv_prog_ac_ct_LD}" = "xild"; then
-			LD="${LD} -qdiag-disable=2102"
-		fi
-
-	else
-		:
-
-	fi
-
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -no-prec-div" >&5
-$as_echo_n "checking whether C compiler accepts -no-prec-div... " >&6; }
-
-	## store werror status, then turn -Werror on
-	save_ac_c_werror_flag="${ac_c_werror_flag}"
-
-ac_c_werror_flag=yes
-
-	if ${sxe_cv_c_flag__no_prec_div+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  		sxe_save_FLAGS="${CFLAGS}"
-		CFLAGS="-no-prec-div"
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval sxe_cv_c_flag__no_prec_div="yes"
-else
-  eval sxe_cv_c_flag__no_prec_div="no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-		CFLAGS="${sxe_save_FLAGS}"
-
-fi
-
-	eval sxe_check_flag=$sxe_cv_c_flag__no_prec_div
-	ac_c_werror_flag="${save_ac_c_werror_flag}"
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${sxe_check_flag}" >&5
-$as_echo "${sxe_check_flag}" >&6; }
-	if test "${sxe_check_flag}" = "yes"; then
-		:
-
-		optiflags="${optiflags} -no-prec-div"
-	else
-		:
-
-	fi
-
-
-
 	SXE_CFLAGS="${SXE_CFLAGS} ${debugflags} ${optiflags} ${warnflags}"
 
 		## default flags for needed features
