diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-10-10 15:40:44 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-10-10 15:40:44 +0100 |
commit | 14f890ace90e06b92985d23b310caf1864f920ec (patch) | |
tree | 7bc2b4456b16ecba496347a1535ce407b082f52a /m4 | |
parent | 562b7dcefad5d0acd7c906dfa97107e8be8ff536 (diff) | |
download | xine-lib-14f890ace90e06b92985d23b310caf1864f920ec.tar.gz xine-lib-14f890ace90e06b92985d23b310caf1864f920ec.tar.bz2 |
Deprecate xine-config and re-implement it in terms of "pkg-config libxine".
xine-config is no longer a build-time generated file.
--HG--
rename : misc/xine-config.in => misc/xine-config
Diffstat (limited to 'm4')
-rw-r--r-- | m4/xine.m4 | 38 |
1 files changed, 21 insertions, 17 deletions
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 ]) |