5eaeb51
#! /bin/sh
4f5c8eb
#
4f5c8eb
# Wrapper script for mysql_config to support multilib
4f5c8eb
#
4f5c8eb
# This command respects setarch
4f5c8eb
4f5c8eb
bits=$(rpm --eval %__isa_bits)
4f5c8eb
4f5c8eb
case $bits in
4f5c8eb
    32|64) status=known ;;
4f5c8eb
        *) status=unknown ;;
4f5c8eb
esac
4f5c8eb
4f5c8eb
if [ "$status" = "unknown" ] ; then
4f5c8eb
    echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits"
4f5c8eb
    exit 1
4f5c8eb
fi
4f5c8eb
4f5c8eb
5eaeb51
if [ -x @bindir@/mysql_config-$bits ] ; then
5eaeb51
    @bindir@/mysql_config-$bits "$@"
4f5c8eb
else
5eaeb51
    echo "$0: error: needed binary: @bindir@/mysql_config-$bits is missing"
4f5c8eb
    exit 1
4f5c8eb
fi
4f5c8eb