#!/bin/sh
# Site script for configure. It is resourced via $CONFIG_SITE environment varaible.

# If user did not specify libdir, guess the correct target:
# Use lib64 for 64 bit bi-arch targets, keep the default for the rest.
if test "$libdir" = '${exec_prefix}/lib' ; then

	ac_config_site_64bit_host=NONE

	case "$host" in
	"" )
		# User did not specify host target.
		# The native platform i386 is not a bi-arch platform.
		# There is no need to check for compatible sub-architecture.
		ac_config_site_64bit_host=NONE

		;;
	*x86_64* | *ppc64* | *s390x* )
		ac_config_site_64bit_host=YES
		;;
	esac

	if test "x$ac_config_site_64bit_host" = xYES; then
		libdir='${exec_prefix}/lib64'
	fi
fi

# If user did not specify libexecdir, set the correct target:
# Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.

if test "$libexecdir" = '${exec_prefix}/libexec' ; then
	libexecdir='${exec_prefix}/lib'
fi

# Continue with the standard behavior of configure defined in AC_SITE_LOAD:
if test "x$prefix" != xNONE; then
	ac_site_file1=$prefix/share/config.site
	ac_site_file2=$prefix/etc/config.site
else
	ac_site_file1=$ac_default_prefix/share/config.site
	ac_site_file2=$ac_default_prefix/etc/config.site
fi
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
	test "x$ac_site_file" = xNONE && continue
	if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
		{ $as_echo "/usr/share/site/i686-pc-linux-gnu:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "/usr/share/site/i686-pc-linux-gnu: loading site script $ac_site_file" >&6;}
		sed 's/^/| /' "$ac_site_file" >&5
		. "$ac_site_file" \
			|| { { $as_echo "/usr/share/site/i686-pc-linux-gnu:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "/usr/share/site/i686-pc-linux-gnu: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
See \`config.log' for more details" "$LINENO" 5; }
	fi
done
