libusb-config revision 229
0N/A#!/bin/sh
594N/A
0N/Aprefix=/usr
0N/Aexec_prefix=${prefix}
0N/Aexec_prefix_set=no
0N/A
0N/Ausage()
0N/A{
0N/A cat <<EOF
0N/AUsage: libusb-config [OPTIONS] [LIBRARIES]
0N/AOptions:
0N/A [--prefix[=DIR]]
0N/A [--exec-prefix[=DIR]]
0N/A [--version]
0N/A [--libs]
0N/A [--cflags]
0N/AEOF
0N/A exit $1
0N/A}
0N/A
0N/Aif test $# -eq 0; then
0N/A usage 1 1>&2
0N/Afi
0N/A
0N/Awhile test $# -gt 0; do
0N/A case "$1" in
0N/A -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
0N/A *) optarg= ;;
0N/A esac
0N/A
0N/A case $1 in
0N/A --prefix=*)
0N/A prefix=$optarg
0N/A if test $exec_prefix_set = no ; then
0N/A exec_prefix=$optarg
0N/A fi
0N/A ;;
0N/A --prefix)
0N/A echo_prefix=yes
0N/A ;;
0N/A --exec-prefix=*)
0N/A exec_prefix=$optarg
0N/A exec_prefix_set=yes
0N/A ;;
0N/A --exec-prefix)
0N/A echo_exec_prefix=yes
0N/A ;;
0N/A --version)
0N/A echo 0.1.7
0N/A exit 0
0N/A ;;
0N/A --cflags)
0N/A if test "${prefix}/include" != /usr/include ; then
0N/A includes="-I${prefix}/include"
0N/A fi
0N/A echo_cflags=yes
0N/A ;;
0N/A --libs)
0N/A echo_libs=yes
0N/A ;;
0N/A *)
0N/A usage 1 1>&2
0N/A ;;
0N/A esac
0N/A shift
0N/Adone
0N/A
0N/Aif test "$echo_prefix" = "yes"; then
0N/A echo $prefix
0N/Afi
0N/Aif test "$echo_exec_prefix" = "yes"; then
0N/A echo $exec_prefix
0N/Afi
0N/Aif test "$echo_cflags" = "yes"; then
0N/A echo $includes
0N/Afi
0N/Aif test "$echo_libs" = "yes"; then
0N/A echo -L${exec_prefix}/lib -lusb
0N/Afi
0N/A