~ubuntu-branches/ubuntu/trusty/xauth/trusty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Stone
  • Date: 2006-01-04 13:29:30 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060104132930-hfneda1uarkpsvfp
Tags: 1:1.0.1-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
931
931
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
932
932
fi
933
933
if test -n "$PKG_CONFIG"; then
934
 
        _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
 
934
        _pkg_min_version=m4_default([$1], [0.9.0])
935
935
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
936
936
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
937
937
                AC_MSG_RESULT([yes])
967
967
# ---------------------------------------------
968
968
m4_define([_PKG_CONFIG],
969
969
[if test -n "$PKG_CONFIG"; then
 
970
    if test -n "$$1"; then
 
971
        pkg_cv_[]$1="$$1"
 
972
    else
970
973
        PKG_CHECK_EXISTS([$3],
971
974
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
972
975
                         [pkg_failed=yes])
 
976
    fi
973
977
else
974
978
        pkg_failed=untried
975
979
fi[]dnl
976
980
])# _PKG_CONFIG
977
981
 
 
982
# _PKG_SHORT_ERRORS_SUPPORTED
 
983
# -----------------------------
 
984
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
985
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
986
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
987
        _pkg_short_errors_supported=yes
 
988
else
 
989
        _pkg_short_errors_supported=no
 
990
fi[]dnl
 
991
])# _PKG_SHORT_ERRORS_SUPPORTED
 
992
 
 
993
 
978
994
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
979
995
# [ACTION-IF-NOT-FOUND])
980
996
#
996
1012
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
997
1013
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
998
1014
 
 
1015
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
1016
and $1[]_LIBS to avoid the need to call pkg-config.
 
1017
See the pkg-config man page for more details.])
 
1018
 
999
1019
if test $pkg_failed = yes; then
1000
 
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
1020
        _PKG_SHORT_ERRORS_SUPPORTED
 
1021
        if test $_pkg_short_errors_supported = yes; then
 
1022
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
1023
        else 
 
1024
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
1025
        fi
1001
1026
        # Put the nasty error message in config.log where it belongs
1002
 
        echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
 
1027
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1003
1028
 
1004
1029
        ifelse([$4], , [AC_MSG_ERROR(dnl
1005
 
[Package requirements ($2) were not met.
 
1030
[Package requirements ($2) were not met:
 
1031
 
 
1032
$$1_PKG_ERRORS
 
1033
 
1006
1034
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1007
1035
installed software in a non-standard prefix.
1008
1036
 
1009
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
1010
 
to avoid the need to call pkg-config.  See the pkg-config man page for
1011
 
more details.])],
 
1037
_PKG_TEXT
 
1038
])],
1012
1039
                [$4])
1013
1040
elif test $pkg_failed = untried; then
1014
1041
        ifelse([$4], , [AC_MSG_FAILURE(dnl
1016
1043
is in your PATH or set the PKG_CONFIG environment variable to the full
1017
1044
path to pkg-config.
1018
1045
 
1019
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
1020
 
to avoid the need to call pkg-config.  See the pkg-config man page for
1021
 
more details.
 
1046
_PKG_TEXT
1022
1047
 
1023
1048
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1024
1049
                [$4])