#! /usr/bin/sh

# Choose between GCC and XLC
if [ -z "${LT_GCC}" ]; then
    LT_GCC="yes"
    case $CC in
        *xlc*|*xlC*)
            LT_GCC="no";;
    esac
    case $CXX in
        *xlc*|*xlC*)
            LT_GCC="no";;
    esac
fi

if [ -z "${LT_IS64}" ]; then
	LT_IS64="yes"
	case "$CC $CFLAGS $CXX $CXXFLAGS $CPPFLAGS $FCFLAGS" in
   		*-maix64*)
			LT_IS64="yes";;
		*)
			LT_IS64="no";;
	esac
fi

# gcc 32 or 64 bit scripts can't be called libtool.gcc.32 or
# libtool.gcc.64, because autoconf's scripts checking
# libtool version will return 32 or 64, instead of the
# correct version.
if [ "${LT_GCC}" == "yes" ]; then
	if [ "${LT_IS64}" == "yes" ]; then
		/opt/freeware/bin/libtool.gcc.sixtyfour $*
	else
		/opt/freeware/bin/libtool.gcc.thirtytwo $*
	fi
else
    /opt/freeware/bin/libtool.xlc $*
fi
