[libbluray-devel] build: cleanup pkg-config checks.
Petri Hintukainen
phintuka at users.sourceforge.net
Tue Feb 19 16:10:35 CET 2013
On pe, 2013-02-15 at 04:07 +0100, Diego Elio Pettenò wrote:
> libbluray | branch: flameeyes | Diego Elio Pettenò <flameeyes at flameeyes.eu> | Thu Feb 14 17:57:35 2013 -0800| [fdec5c45d32ddce958034b523a6fc7c74053a1be] | committer: Diego Elio Pettenò
>
> build: cleanup pkg-config checks.
>
> Avoid trying being a smartass when pkg-config is not found, it's rare
> enough that it shouldn't really matter.
>
> > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=fdec5c45d32ddce958034b523a6fc7c74053a1be
> ---
>
> configure.ac | 48 +++++++++++++-----------------------------------
> 1 file changed, 13 insertions(+), 35 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 6662991..0125941 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -47,8 +47,6 @@ esac
> dnl messages
> library_not_found="Could not find required library!"
> function_not_found="Could not find required function!"
> -libxml2_missing="Could not find libxml2 - disclib meta parser disabled."
> -pkg_config_missing="Could not find pkg-config. Assuming..."
>
> dnl configure options
> AC_ARG_VAR([JDK_HOME], [Path to the JDK @<:@default=/usr/lib/jvm/java-6-openjdk@:>@])
> @@ -75,17 +73,11 @@ AC_ARG_ENABLE([bdjava],
> [use_bdjava=$enableval],
> [use_bdjava=no])
>
> -AC_ARG_ENABLE([libxml2],
> - [AS_HELP_STRING([--enable-libxml2],
> - [enable libxml2 support (default is yes)])],
> - [use_libxml2=$enableval],
> - [use_libxml2=yes])
> +AC_ARG_WITH([libxml2],
> + [AS_HELP_STRING([--without-libxml2], [build without libxml2 support @<:@default=with@:>@])])
>
> -AC_ARG_ENABLE([freetype],
> - [AS_HELP_STRING([--enable-freetype],
> - [enable FreeType support for BD-J (default is yes)])],
> - [use_freetype=$enableval],
> - [use_freetype=yes])
> +AC_ARG_WITH([freetype],
> + [AS_HELP_STRING([--without-freetype], [build without freetype support @<:@default=with@:>@])])
>
> AC_ARG_WITH([bdj-type],
> [AS_HELP_STRING([--with-bdj-type=TYPE],
> @@ -139,32 +131,18 @@ if test "${SYS}" != "mingw32" ; then
> [AC_MSG_ERROR($library_not_found)])])
> fi
>
> -dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
> -AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
> -
> dnl libxml2 for metadata parser
> -if test "x$use_libxml2" = "xyes"; then
> - if test "x$HAVE_PKG_CONFIG" = "xyes"; then
> - PKG_CHECK_MODULES([LIBXML2], libxml-2.0 >= 2.6,
> - [AC_DEFINE([HAVE_LIBXML2], [1],
> - [Define to 1 if libxml2 is to be used for metadata parsing])],
> - [AC_MSG_NOTICE($libxml2_missing)])
> - else
> - AC_MSG_NOTICE($pkg_config_missing $libxml2_missing)
> - fi
> -fi
> +AS_IF([test "x$with_libxml2" != "xno"], [
> + PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6],
> + [AC_DEFINE([HAVE_LIBXML2], [1],
> + [Define to 1 if libxml2 is to be used for metadata parsing])])
> +])
>
> dnl FreeType2
> -if test x"$use_bdjava" != x"no"; then
> - if test x"$use_freetype" != x"no"; then
> - PKG_CHECK_MODULES([FT2], [freetype2], [use_freetype=yes], [use_freetype=no])
> - if test x"$use_freetype" = x"no"; then
> - AC_MSG_ERROR([FreeType2 support requested but FreeType2 library not found])
> - elif test x"$use_freetype" = x"yes"; then
> - AC_DEFINE([HAVE_FT2], 1, [Define this if you have FreeType2 library])
> - fi
> - fi
> -fi
> +AS_IF([test x"$use_bdjava" != x"no" -a x"$use_freetype" != x"no"], [
use_freetype is not defined anymore, should be with_freetype ?
There are also some other places where use_freetype / use_libxml2 are
used.
> + PKG_CHECK_MODULES([FT2], [freetype2],
> + [AC_DEFINE([HAVE_FT2], 1, [Define this if you have FreeType2 library])])
> +])
>
> CC_CHECK_CFLAGS_APPEND([-Wall -Wdisabled-optimization -Wpointer-arith ]dnl
> [-Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef ]dnl
>
> _______________________________________________
> libbluray-devel mailing list
> libbluray-devel at videolan.org
> http://mailman.videolan.org/listinfo/libbluray-devel
More information about the libbluray-devel
mailing list