summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac20
-rw-r--r--doc/hackersguide/internals.docbook2
-rw-r--r--doc/hackersguide/library.docbook2
-rw-r--r--doc/man/en/xine-config.141
-rw-r--r--m4/xine.m438
-rw-r--r--misc/.hgignore1
-rw-r--r--misc/libxine.pc.in12
-rw-r--r--misc/xine-config72
-rw-r--r--misc/xine-config.in123
10 files changed, 143 insertions, 171 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d65d6bbe..4301066d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
xine-lib (1.1.90) (Unreleased)
* Add support for VDR.
+ * xine-config is deprecated in favour of pkg-config libxine.
+ Use "pkgconfig --variable=foo libxine" where you previously used
+ "xine-config --foo".
* Reorder and modify public structures to reduce the holes caused by padding
especially on 64-bit architectures.
* Remove the buttons array from video_overlay, as the feature linked to that
diff --git a/configure.ac b/configure.ac
index 76e7fde6f..9c63e4f4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -978,9 +978,14 @@ makeexpand () {
echo "$i"
}
-XINE_PLUGINDIR="$libdir/xine/plugins/$XINE_MAJOR.$XINE_MINOR.$XINE_SUB"
-XINE_FONTDIR="${datadir}/xine/libxine$XINE_MAJOR/fonts"
-XINE_LOCALEDIR="${datadir}/locale"
+xinelibdir='${libdir}/xine'
+xinedatadir='${datadir}/xine'
+AC_SUBST(xinelibdir)
+AC_SUBST(xinedatadir)
+
+XINE_PLUGINDIR="\${xinelibdir}/plugins/$XINE_MAJOR.$XINE_MINOR.$XINE_SUB"
+XINE_FONTDIR="\${xinedatadir}/libxine$XINE_MAJOR/fonts"
+XINE_LOCALEDIR='${datadir}/locale'
XINE_REL_PLUGINDIR="`makeexpand "$XINE_PLUGINDIR"`"
XINE_REL_PLUGINDIR="`makeexpand "$XINE_REL_PLUGINDIR" | sed -e "s,^${prefix}/,,"`"
XINE_REL_FONTDIR="`makeexpand "$XINE_FONTDIR" | sed -e "s,^${prefix}/,,"`"
@@ -1024,16 +1029,18 @@ AC_SUBST(XINE_FONTDIR)
AC_SUBST(XINE_LOCALEDIR)
dnl Where aclocal m4 files should be installed
-XINE_ACFLAGS="-I `makeexpand "${datarootdir}/aclocal"`"
+xine_acflags='-I ${datarootdir}/aclocal'
+XINE_ACFLAGS="-I ${datarootdir}/aclocal"
AC_DEFINE_UNQUOTED([XINE_ACFLAGS], ["$XINE_ACFLAGS"], [Path where aclocal m4 files will be.])
+AC_SUBST(xine_acflags)
AC_SUBST(XINE_ACFLAGS)
dnl Where architecture independent data (e.g. logo) will/should be installed
-XINE_DATADIR="`makeexpand "${datarootdir}/xine"`"
+XINE_DATADIR="\${xinedatadir}"
AC_SUBST(XINE_DATADIR)
dnl Where scripts will/should be installed.
-eval XINE_SCRIPTPATH="$XINE_DATADIR/xine/scripts"
+XINE_SCRIPTPATH="\${xinedatadir}/scripts"
AC_SUBST(XINE_SCRIPTPATH)
@@ -1145,7 +1152,6 @@ misc/build_rpms.sh
misc/fonts/Makefile
misc/libxine.pc
misc/relchk.sh
-misc/xine-config
misc/xine-lib.spec
po/Makefile.in
src/Makefile
diff --git a/doc/hackersguide/internals.docbook b/doc/hackersguide/internals.docbook
index 7018f3202..1ee508bc3 100644
--- a/doc/hackersguide/internals.docbook
+++ b/doc/hackersguide/internals.docbook
@@ -161,7 +161,7 @@
</para>
<para>
The default value for XINE_PLUGINDIR can be obtained using the
- <command>xine-config --plugindir</command> command.
+ <command>pkg-config --variable=plugindir libxine</command> command.
</para>
</sect2>
<sect2>
diff --git a/doc/hackersguide/library.docbook b/doc/hackersguide/library.docbook
index de27f9e46..03a863c39 100644
--- a/doc/hackersguide/library.docbook
+++ b/doc/hackersguide/library.docbook
@@ -69,7 +69,7 @@
*/
/*
- * compile-command: "gcc -Wall -O2 `xine-config --cflags` `xine-config --libs` -L/usr/X11R6/lib -lX11 -lm -o xinimin xinimin.c"
+ * compile-command: "gcc -Wall -O2 `pkg-config --cflags --libs libxine` -L/usr/X11R6/lib -lX11 -lm -o xinimin xinimin.c"
*/
#include &lt;stdio.h&gt;
diff --git a/doc/man/en/xine-config.1 b/doc/man/en/xine-config.1
index 0a2d8bcc6..d8accae0d 100644
--- a/doc/man/en/xine-config.1
+++ b/doc/man/en/xine-config.1
@@ -6,7 +6,9 @@ xine-config - script to get information about the installed version of libxine
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags] [\-\-plugindir] [\-\-skindir]
.SH DESCRIPTION
.PP
-\fIxine-config\fP is a tool that is used to determine
+\fIxine\-config is DEPRECATED. Use pkg\-config instead.\fP
+.PP
+\fIxine\-config\fP is a tool that is used to determine
the compiler and linker flags that should be used to compile
and link programs that use \fIlibxine\fP. It can also be used to determine
the directories where \fIlibxine\fP expects plugins and skins.
@@ -15,42 +17,39 @@ by the .m4 macros for GNU autoconf that are included with \fIxine-lib\fP.
.
.SH OPTIONS
.l
-\fIxine-config\fP accepts the following options:
+\fIxine-config\fP accepts the following options, passing them on (possibly
+modified) to \fIpkg-config libxine\fP:
.TP 8
.B \-\-version
-Print the currently installed version of \fIlibxine\fP on the standard output.
-.TP 8
-.B \-\-libs
-Print the linker flags that are necessary to link \fIlibxine\fP to a program.
+\-\-modversion
.TP 8
-.B \-\-cflags
-Print the compiler flags that are necessary to compile a program that uses
-\fIlibxine\fP.
+.B \-\-libs \fP&\fB \-\-cflags
+Passed on unmodified.
.TP 8
.B \-\-plugindir
+\-\-variable=plugindir
+.br
Print the directory where \fIlibxine\fP plugins are stored/expected.
.TP 8
-.B \-\-skindir
-Print the directory in which \fIlibxine\fP skins are stored/expected.
-.TP 8
.B \-\-prefix=PREFIX
+\-\-define-variable=prefix=PREFIX
+.br
If specified, use PREFIX instead of the installation prefix that \fIxine-lib\fP
-was built with when computing the output for the \-\-cflags and
-\-\-libs options. This option is also used for the exec prefix
-if \-\-exec\-prefix was not specified. This option must be specified
-before any \-\-libs or \-\-cflags options.
+was built with. This option is also used for the exec prefix if
+\-\-exec\-prefix was not specified.
+
.TP 8
.B \-\-exec\-prefix=PREFIX
+\-\-define-variable=exec_prefix=PREFIX
+.br
If specified, use PREFIX instead of the installation exec prefix that
-\fIxine-lib\fP was built with when computing the output for the \-\-cflags
-and \-\-libs options. This option must be specified before any
-\-\-libs or \-\-cflags options.
+\fIxine-lib\fP was built with.
.SH SEE ALSO
.BR xine-lib (3),
.BR xine (1)
.SH COPYRIGHT
-Copyright \(co 2001 Siggi Langauf/the xine project, based on the man page
-for gtk-config, \(co 1998 Owen Taylor
+Copyright \(co 2001 Siggi Langauf, \(co 2001-2007 the xine project. Based on
+the man page for gtk-config, \(co 1998 Owen Taylor
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
diff --git a/m4/xine.m4 b/m4/xine.m4
index 336a2d7d2..3aa8c79c5 100644
--- a/m4/xine.m4
+++ b/m4/xine.m4
@@ -47,11 +47,13 @@ dnl AM_PATH_XINE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
dnl Test for XINE, and define XINE_CFLAGS and XINE_LIBS
dnl
AC_DEFUN([AM_PATH_XINE], [
- AC_ARG_VAR([XINE_CONFIG], [Full path to xine-config])
+ AC_REQUIRE([PKG_CHECK_MODULES])
+
+ AC_ARG_VAR([XINE_CONFIG], [Full path to xine-config (xine-lib < 1.2)])
AC_ARG_WITH([xine-prefix],
- [AS_HELP_STRING([--with-xine-prefix], [prefix where xine-lib is installed (optional)])])
+ [AS_HELP_STRING([--with-xine-prefix], [prefix where xine-lib is installed (optional, xine-lib < 1.2)])])
AC_ARG_WITH([xine-exec-prefix],
- [AS_HELP_STRING([--with-xine-exec-prefix], [exec prefix where xine-lib is installed (optional)])])
+ [AS_HELP_STRING([--with-xine-exec-prefix], [exec prefix where xine-lib is installed (optional, xine-lib < 1.2)])])
xine_config_args=""
if test x"$with_xine_exec_prefix" != x""; then
@@ -65,15 +67,19 @@ AC_DEFUN([AM_PATH_XINE], [
min_xine_version=ifelse([$1], , [0.5.0], [$1])
AC_PATH_TOOL([XINE_CONFIG], [xine-config], [no])
- AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
if test x"$XINE_CONFIG" = x"no"; then
- AC_MSG_RESULT([unknown])
- AC_MSG_NOTICE([
-*** If xine-lib was installed in PREFIX, make sure PREFIX/bin is in your path,
-*** or set the XINE_CONFIG environment variable to the full path to the
-*** xine-config shell script.
- ])
+ min_xine_version=ifelse([$1], , [1.2.0], [$1])
+ PKG_CHECK_MODULES([XINE], [libxine >= $min_xine_version],
+ [XINE_VERSION="`"$PKG_CONFIG" --modversion libxine`"
+ XINE_ACFLAGS="`"$PKG_CONFIG" --variable=acflags libxine`"
+ xine_data_dir="`"$PKG_CONFIG" --variable=datadir libxine`"
+ xine_script_dir="`"$PKG_CONFIG" --variable=scriptdir libxine`"
+ xine_plugin_dir="`"$PKG_CONFIG" --variable=plugindir libxine`"
+ xine_locale_dir="`"$PKG_CONFIG" --variable=localedir libxine`"
+ $2],
+ [$3])
else
+ AC_MSG_CHECKING([for XINE-LIB version >= $min_xine_version])
XINE_CFLAGS="`$XINE_CONFIG $xine_config_args --cflags`"
XINE_LIBS="`$XINE_CONFIG $xine_config_args --libs`"
XINE_VERSION="`$XINE_CONFIG $xine_config_args --version`"
@@ -85,7 +91,9 @@ AC_DEFUN([AM_PATH_XINE], [
_XINE_VERSION_CHECK([$min_xine_version], [$XINE_VERSION],
[xine_version_ok=yes; AC_MSG_RESULT([yes, $XINE_VERSION])],
[xine_version_ok=no; AC_MSG_RESULT([no, $XINE_VERSION])])
- if test x"$xine_version_ok" != x"yes"; then
+ if test x"$xine_version_ok" = x"yes"; then
+ ifelse([$2], , [:], [$2])
+ else
AC_MSG_NOTICE([
*** You need a version of xine-lib newer than $XINE_VERSION.
*** The latest version of xine-lib is always available from:
@@ -99,15 +107,11 @@ AC_DEFUN([AM_PATH_XINE], [
*** to modify your LD_LIBRARY_PATH enviroment variable, or edit
*** /etc/ld.so.conf so that the correct libraries are found at run-time.
])
+ ifelse([$3], , [:], [$3])
fi
fi
+
AC_SUBST(XINE_CFLAGS)
AC_SUBST(XINE_LIBS)
AC_SUBST(XINE_ACFLAGS)
-
- if test x"$xine_version_ok" = x"yes"; then
- ifelse([$2], , [:], [$2])
- else
- ifelse([$3], , [:], [$3])
- fi
])
diff --git a/misc/.hgignore b/misc/.hgignore
index e126a36c8..319895304 100644
--- a/misc/.hgignore
+++ b/misc/.hgignore
@@ -2,5 +2,4 @@ SlackBuild
build_rpms.sh
libxine.pc
relchk.sh
-xine-config
xine-lib.spec
diff --git a/misc/libxine.pc.in b/misc/libxine.pc.in
index c27e8aa94..cb66d6b19 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@
diff --git a/misc/xine-config b/misc/xine-config
new file mode 100644
index 000000000..12424fbd3
--- /dev/null
+++ b/misc/xine-config
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+#
+
+unset prefix
+unset exec_prefix
+unset args
+
+usage()
+{
+ cat <<EOF
+Usage: xine-config [OPTIONS] [LIBRARIES]
+ DEPRECATED. Use pkg-config instead.
+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
+
+echo 'xine-config is DEPRECATED. Use pkg-config instead.' >&2
+
+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 8d288b22b..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@
- ;;
- --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