2009-11-20 12:45:25 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
|
|
|
# Multilib-aware wrapper for the wx-config script
|
|
|
|
#
|
2009-11-25 16:16:38 +00:00
|
|
|
# Usage: wx-config [--arch <arch>] <regular wx-config options>
|
2009-11-20 12:45:25 +00:00
|
|
|
#
|
|
|
|
|
2009-11-25 16:16:38 +00:00
|
|
|
if [ $# -ge 2 ]; then
|
|
|
|
if [ $1 = "--arch" ]; then
|
|
|
|
arch=$2
|
|
|
|
shift 2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z $arch ]; then
|
2009-11-20 12:45:25 +00:00
|
|
|
arch=`uname -m`
|
|
|
|
fi
|
|
|
|
|
|
|
|
case $arch in
|
|
|
|
i?86|ppc|s390|sparc|arm*|ia64)
|
|
|
|
libdir=/usr/lib
|
|
|
|
;;
|
2014-01-17 18:04:30 +00:00
|
|
|
x86_64|ppc64|ppc64le|s390x|sparc64|aarch64)
|
2009-11-20 12:45:25 +00:00
|
|
|
libdir=/usr/lib64
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Unsupported architecture '$arch'"
|
2009-11-25 16:16:38 +00:00
|
|
|
exit 8
|
2009-11-20 12:45:25 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
wxconfig=$libdir/wx/config/gtk2-unicode-release-2.8
|
2009-11-25 16:16:38 +00:00
|
|
|
# special case when using 32-bit userspace and 64-bit kernel
|
|
|
|
if [ ! -f $wxconfig -a \( $arch = ppc64 -o $arch = sparc64 \) ]; then
|
|
|
|
wxconfig=/usr/lib/wx/config/gtk2-unicode-release-2.8
|
|
|
|
fi
|
|
|
|
|
2009-11-20 12:45:25 +00:00
|
|
|
if [ -x $wxconfig ]; then
|
2009-11-25 16:16:38 +00:00
|
|
|
exec $wxconfig $@
|
2009-11-20 12:45:25 +00:00
|
|
|
else
|
|
|
|
echo "wxGTK-devel isn't installed for architecture '$arch'"
|
2009-11-25 16:16:38 +00:00
|
|
|
exit 9
|
2009-11-20 12:45:25 +00:00
|
|
|
fi
|