summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/libxine.pc.in12
-rw-r--r--misc/xine-config69
-rw-r--r--misc/xine-config.in123
3 files changed, 81 insertions, 123 deletions
diff --git a/misc/libxine.pc.in b/misc/libxine.pc.in
index 623d2b657..a6565bad0 100644
--- a/misc/libxine.pc.in
+++ b/misc/libxine.pc.in
@@ -3,6 +3,18 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+
+xinelibdir=@xinelibdir@
+xinedatadir=@xinedatadir@
+
+acflags=@XINE_ACFLAGS@
+plugindir=@XINE_PLUGINDIR@
+scriptdir=@XINE_SCRIPTPATH@
+localedir=@XINE_LOCALEDIR@
+objcflags=@OBJCFLAGS@
+
Name: libxine
Description: The xine engine library
Version: @XINE_MAJOR@.@XINE_MINOR@.@XINE_SUB@@XINE_PATCH@
diff --git a/misc/xine-config b/misc/xine-config
new file mode 100644
index 000000000..f5993f471
--- /dev/null
+++ b/misc/xine-config
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+#
+
+unset prefix
+unset exec_prefix
+unset args
+
+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"
+ ;;
+ --prefix|--exec-prefix)
+ ;;
+ --version)
+ args="$args${args+ }--modversion"
+ ;;
+ --cflags|--libs)
+ args="$args${args+ }$1"
+ ;;
+ --acflags|--plugindir|--datadir|--scriptdir|--localedir|--objcflags)
+ args="$args${args+ }--variable=${1#--}"
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+exec pkg-config "${prefix+--define-variable=prefix=}$prefix" \
+ "${exec_prefix+--define-variable=exc_prefix=}$exec_prefix" \
+ $args libxine
diff --git a/misc/xine-config.in b/misc/xine-config.in
deleted file mode 100644
index 8f25d5cc5..000000000
--- a/misc/xine-config.in
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/bin/sh
-#
-#
-
-prefix=@XINE_CONFIG_PREFIX@
-exec_prefix=@exec_prefix@
-exec_prefix_set=no
-
-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=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- case $1 in
- --prefix=*)
- prefix=$optarg
- if test $exec_prefix_set = no ; then
- exec_prefix=$optarg
- fi
- ;;
- --prefix)
- echo_prefix=yes
- ;;
- --exec-prefix=*)
- exec_prefix=$optarg
- exec_prefix_set=yes
- ;;
- --exec-prefix)
- echo_exec_prefix=yes
- ;;
- --version)
- echo @XINE_MAJOR@.@XINE_MINOR@.@XINE_SUB@@XINE_PATCH@
- ;;
- --acflags)
- echo_acflags=yes
- ;;
- --cflags)
- echo_cflags=yes
- ;;
- --libs)
- echo_libs=yes
- ;;
- --plugindir)
- echo_plugindir=yes
- ;;
- --datadir)
- echo_datadir=yes
- ;;
- --scriptdir)
- echo_scriptdir=yes
- ;;
- --localedir)
- echo_localedir=yes
- ;;
- --objcflags)
- echo_objcflags=yes
- ;;
- *)
- usage 1 1>&2
- ;;
- esac
- shift
-done
-
-if test "$echo_prefix" = "yes"; then
- echo $prefix
-fi
-
-if test "$echo_exec_prefix" = "yes"; then
- echo $exec_prefix
-fi
-
-if test "$echo_acflags" = "yes"; then
- echo "@XINE_ACFLAGS@"
-fi
-
-if test "$echo_cflags" = "yes"; then
- echo -I@includedir@ @PTHREAD_CFLAGS@
-fi
-
-if test "$echo_libs" = "yes"; then
- echo -L@libdir@ -lxine @ZLIB_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@ @LIBICONV@ @RT_LIBS@
-fi
-if test "$echo_plugindir" = "yes"; then
- echo "@XINE_PLUGINPATH@"
-fi
-if test "$echo_datadir" = "yes"; then
- echo "@XINE_DATADIR@"
-fi
-if test "$echo_scriptdir" = "yes"; then
- echo "@XINE_SCRIPTPATH@"
-fi
-if test "$echo_localedir" = "yes"; then
- echo "@XINE_LOCALEPATH@"
-fi
-if test "$echo_objcflags" = "yes"; then
- echo "@OBJCFLAGS@"
-fi