Blame SOURCES/wx-config

d53e67
#! /bin/sh
d53e67
#
d53e67
# Multilib-aware wrapper for the wx-config script
d53e67
#
d53e67
# Usage: wx-config [--arch <arch>] <regular wx-config options>
d53e67
#
d53e67
Scott Talbert beccaf
version=3.2
Scott Talbert 0aea9e
d53e67
if [ $# -ge 2 ]; then
d53e67
    if [ $1 = "--arch" ]; then
d53e67
	arch=$2
d53e67
	shift 2
d53e67
    fi
d53e67
fi
d53e67
d53e67
if [ -z $arch ]; then
d53e67
    arch=`uname -m`
d53e67
fi
d53e67
d53e67
case $arch in
Scott Talbert 0aea9e
    i?86|ppc|s390|sparc|arm*|ia64|mips|mipsel|riscv32)
d53e67
        libdir=/usr/lib
d53e67
        ;;
Scott Talbert 0aea9e
    x86_64|ppc64|s390x|sparc64|aarch64|ppc64le|mips64*|riscv64)
d53e67
        libdir=/usr/lib64
d53e67
        ;;
d53e67
    *)
d53e67
        echo "Unsupported architecture '$arch'"
d53e67
        exit 8
d53e67
        ;;
d53e67
esac
d53e67
Scott Talbert 0aea9e
wxconfig=$libdir/wx/config/gtk3-unicode-$version
Scott Talbert 0aea9e
if [ ! -f $wxconfig ]; then
Scott Talbert 0aea9e
    wxconfig=$libdir/wx/config/gtk2-unicode-$version
Scott Talbert 0aea9e
fi
d53e67
# special case when using 32-bit userspace and 64-bit kernel
d53e67
if [ ! -f $wxconfig -a \( $arch = ppc64 -o $arch = sparc64 \) ]; then
Scott Talbert 0aea9e
    wxconfig=/usr/lib/wx/config/gtk3-unicode-$version
Scott Talbert 0aea9e
    if [ ! -f $wxconfig ]; then
Scott Talbert 0aea9e
        wxconfig=/usr/lib/wx/config/gtk2-unicode-$version
Scott Talbert 0aea9e
    fi
d53e67
fi
d53e67
d53e67
if [ -x $wxconfig ]; then
d53e67
    exec $wxconfig $@
d53e67
else
d53e67
    echo "wxGTK-devel isn't installed for architecture '$arch'"
d53e67
    exit 9
d53e67
fi