From: <li...@yo...> - 2007-10-13 14:57:43
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1192027244 -3600 # Node ID b6dde12275325f961354a0407f702b4ae65dfb69 # Parent a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 Deprecate xine-config and re-implement it in terms of "pkg-config libxine". xine-config is no longer a build-time generated file. diff -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 ChangeLog --- a/ChangeLog Wed Oct 10 15:40:44 2007 +0100 +++ b/ChangeLog Wed Oct 03 20:03:59 2007 +0100 @@ -1,5 +1,8 @@ xine-lib (1.1.90) (Unreleased) 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 -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 configure.ac --- a/configure.ac Wed Oct 10 15:40:44 2007 +0100 +++ b/configure.ac Wed Oct 03 20:03:59 2007 +0100 @@ -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_LOCALEDIR) 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/fonts/Makefile misc/fonts/Makefile misc/libxine.pc misc/relchk.sh -misc/xine-config misc/xine-lib.spec po/Makefile.in src/Makefile diff -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 doc/hackersguide/internals.docbook --- a/doc/hackersguide/internals.docbook Wed Oct 10 15:40:44 2007 +0100 +++ b/doc/hackersguide/internals.docbook Wed Oct 03 20:03:59 2007 +0100 @@ -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 -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 doc/hackersguide/library.docbook --- a/doc/hackersguide/library.docbook Wed Oct 10 15:40:44 2007 +0100 +++ b/doc/hackersguide/library.docbook Wed Oct 03 20:03:59 2007 +0100 @@ -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 <stdio.h> diff -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 doc/man/en/xine-config.1 --- a/doc/man/en/xine-config.1 Wed Oct 10 15:40:44 2007 +0100 +++ b/doc/man/en/xine-config.1 Wed Oct 03 20:03:59 2007 +0100 @@ -6,7 +6,9 @@ xine-config - script to get information [\-\-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 . .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. +\-\-modversion .TP 8 -.B \-\-libs -Print the linker flags that are necessary to link \fIlibxine\fP to a program. -.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 -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 m4/xine.m4 --- a/m4/xine.m4 Wed Oct 10 15:40:44 2007 +0100 +++ b/m4/xine.m4 Wed Oct 03 20:03:59 2007 +0100 @@ -47,11 +47,13 @@ dnl Test for XINE, and define XINE_CFLAG 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 -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 misc/.hgignore --- a/misc/.hgignore Wed Oct 10 15:40:44 2007 +0100 +++ b/misc/.hgignore Wed Oct 03 20:03:59 2007 +0100 @@ -2,5 +2,4 @@ build_rpms.sh build_rpms.sh libxine.pc relchk.sh -xine-config xine-lib.spec diff -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 misc/libxine.pc.in --- a/misc/libxine.pc.in Wed Oct 10 15:40:44 2007 +0100 +++ b/misc/libxine.pc.in Wed Oct 03 20:03:59 2007 +0100 @@ -2,6 +2,18 @@ exec_prefix=@exec_prefix@ 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 diff -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 misc/xine-config --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/misc/xine-config Wed Oct 03 20:03:59 2007 +0100 @@ -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 -r b6dde12275325f961354a0407f702b4ae65dfb69 -r a33843a7bc9d39a609ef55a4c71999ed5ba4dcb3 misc/xine-config.in --- a/misc/xine-config.in Wed Oct 10 15:40:44 2007 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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 |