#!/bin/sh
#
# gphoto2-config

# this particular shell script calls arch specific script to avoid
# multilib conflicts

# Supported arches ix86 ia64 ppc ppc64 s390 s390x x86_64

arch=`arch`
echo $arch | grep -q i.86
if [ $? -eq 0 ] ; then
    gphoto2-config-i386 $*
    exit 0
fi
if [ "$arch" = "ia64" ] ; then
    gphoto2-config-ia64 $*
    exit 0
fi
if [ "$arch" = "ppc" ] ; then
    gphoto2-config-ppc $*
    exit 0
fi
if [ "$arch" = "ppc64" ] ; then
    gphoto2-config-ppc64 $*
    exit 0
fi
if [ "$arch" = "s390" ] ; then
    gphoto2-config-s390 $*
    exit 0
fi
if [ "$arch" = "s390x" ] ; then
    gphoto2-config-s390x $*
    exit 0
fi
if [ "$arch" = "x86_64" ] ; then
    gphoto2-config-x86_64 $*
    exit 0
fi

echo "Cannot determine architecture"
