diff options
Diffstat (limited to 'misc/xine-config.in')
-rw-r--r-- | misc/xine-config.in | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/misc/xine-config.in b/misc/xine-config.in new file mode 100644 index 000000000..719d9667e --- /dev/null +++ b/misc/xine-config.in @@ -0,0 +1,75 @@ +#!/bin/sh +# +# + +unset prefix +unset exec_prefix +unset args + +PKG_CONFIG_PATH="$(cat <<'EOF' +@XINE_PKGCONFIG_DIR@ +EOF +)${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH" + +usage() +{ + cat <<EOF +Usage: xine-config [OPTIONS] [LIBRARIES] +Options: + [--prefix[=DIR]] + [--exec-prefix[=DIR]] + [--version] + [--libs] + [--acflags] + [--cflags] + [--plugindir] + [--datadir] + [--scriptdir] + [--localedir] + [--objcflags] +EOF + exit $1 +} + +if test $# -eq 0; then + usage 1 1>&2 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg="${1#--*=}" ;; + *) optarg= ;; + esac + + case "$1" in + --prefix=*) + prefix="$optarg" + if [ "$exec_prefix" = '' ]; then + exec_prefix="$optarg" + fi + ;; + --exec-prefix=*) + exec_prefix="$optarg" + ;; + --version) + args="$args${args+ }--modversion" + ;; + --cflags|--libs) + args="$args${args+ }$1" + ;; + --prefix|--acflags|--plugindir|--datadir|--scriptdir|--localedir|--objcflags) + args="$args${args+ }--variable=${1#--}" + ;; + --exec-prefix) + args="$args${args+ }--variable=exec_prefix" + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +exec pkg-config "${prefix+--define-variable=prefix=}$prefix" \ + "${exec_prefix+--define-variable=exec_prefix=}$exec_prefix" \ + $args libxine |