~ubuntu-branches/ubuntu/dapper/lasso/dapper

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Loic Pefferkorn
  • Date: 2005-11-25 19:20:59 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051125192059-m4894lhpynmkrmwr
Tags: 0.6.3-4ubuntu1
Resynchronise with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5972
5972
fi[]dnl
5973
5973
])# PKG_PROG_PKG_CONFIG
5974
5974
 
 
5975
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
5976
#
 
5977
# Check to see whether a particular set of modules exists.  Similar
 
5978
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
5979
#
 
5980
#
 
5981
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
5982
# this or PKG_CHECK_MODULES is called, or make sure to call
 
5983
# PKG_CHECK_EXISTS manually
 
5984
# --------------------------------------------------------------
 
5985
AC_DEFUN([PKG_CHECK_EXISTS],
 
5986
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
5987
if test -n "$PKG_CONFIG" && \
 
5988
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
5989
  m4_ifval([$2], [$2], [:])
 
5990
m4_ifvaln([$3], [else
 
5991
  $3])dnl
 
5992
fi])
 
5993
 
 
5994
 
5975
5995
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
5976
5996
# ---------------------------------------------
5977
5997
m4_define([_PKG_CONFIG],
5978
 
[if test "x$ac_cv_env_[]$1[]_set" = "xset"; then
5979
 
        pkg_cv_[]$1=$ac_cv_env_[]$1[]_value
5980
 
elif test -n "$PKG_CONFIG"; then
5981
 
        if AC_RUN_LOG([$PKG_CONFIG --exists "$3" >/dev/null 2>&1]); then
5982
 
                pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
5983
 
        else
5984
 
                pkg_failed=yes
5985
 
        fi
 
5998
[if test -n "$PKG_CONFIG"; then
 
5999
        PKG_CHECK_EXISTS([$3],
 
6000
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
6001
                         [pkg_failed=yes])
5986
6002
else
5987
6003
        pkg_failed=untried
5988
6004
fi[]dnl
5994
6010
#
5995
6011
# Note that if there is a possibility the first call to
5996
6012
# PKG_CHECK_MODULES might not happen, you should be sure to include an
5997
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.in
 
6013
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
5998
6014
#
5999
6015
#
6000
6016
# --------------------------------------------------------------
6004
6020
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6005
6021
 
6006
6022
pkg_failed=no
6007
 
AC_CACHE_CHECK([for $1][_CFLAGS], [pkg_cv_][$1][_CFLAGS],
6008
 
        [_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])])
6009
 
AC_CACHE_CHECK([for $1][_LIBS], [pkg_cv_][$1][_LIBS],
6010
 
        [_PKG_CONFIG([$1][_LIBS], [libs], [$2])])
 
6023
AC_MSG_CHECKING([for $1])
 
6024
 
 
6025
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
6026
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6011
6027
 
6012
6028
if test $pkg_failed = yes; then
6013
6029
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6038
6054
else
6039
6055
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6040
6056
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
6057
        AC_MSG_RESULT([yes])
6041
6058
        ifelse([$3], , :, [$3])
6042
6059
fi[]dnl
6043
6060
])# PKG_CHECK_MODULES