~ubuntu-branches/ubuntu/trusty/pangomm/trusty-proposed

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2011-11-17 01:43:19 UTC
  • mfrom: (1.2.3)
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: package-import@ubuntu.com-20111117014319-f1fkbllernpb5mi9
* New upstream release.
* debian/watch:
  - Track .xz tarballs.
* Bump debhelper compatibility level to 8.
* debian/control.in:
  - Bump Standards-Version to 3.9.2. No further changes.
  - Set pkg-gnome-maintainers@lists.alioth.debian.org as Maintainer.
* Stop installing libtool .la files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1033
1033
AC_SUBST([am__untar])
1034
1034
]) # _AM_PROG_TAR
1035
1035
 
 
1036
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
1037
# serial 1 (pkg-config-0.24)
 
1038
 
1039
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
 
1040
#
 
1041
# This program is free software; you can redistribute it and/or modify
 
1042
# it under the terms of the GNU General Public License as published by
 
1043
# the Free Software Foundation; either version 2 of the License, or
 
1044
# (at your option) any later version.
 
1045
#
 
1046
# This program is distributed in the hope that it will be useful, but
 
1047
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
1048
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
1049
# General Public License for more details.
 
1050
#
 
1051
# You should have received a copy of the GNU General Public License
 
1052
# along with this program; if not, write to the Free Software
 
1053
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
1054
#
 
1055
# As a special exception to the GNU General Public License, if you
 
1056
# distribute this file as part of a program that contains a
 
1057
# configuration script generated by Autoconf, you may include it under
 
1058
# the same distribution terms that you use for the rest of that program.
 
1059
 
 
1060
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
1061
# ----------------------------------
 
1062
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
1063
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
1064
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
 
1065
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
 
1066
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
 
1067
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
 
1068
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
 
1069
 
 
1070
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
1071
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 
1072
fi
 
1073
if test -n "$PKG_CONFIG"; then
 
1074
        _pkg_min_version=m4_default([$1], [0.9.0])
 
1075
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
1076
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
1077
                AC_MSG_RESULT([yes])
 
1078
        else
 
1079
                AC_MSG_RESULT([no])
 
1080
                PKG_CONFIG=""
 
1081
        fi
 
1082
fi[]dnl
 
1083
])# PKG_PROG_PKG_CONFIG
 
1084
 
 
1085
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
1086
#
 
1087
# Check to see whether a particular set of modules exists.  Similar
 
1088
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
1089
#
 
1090
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1091
# only at the first occurence in configure.ac, so if the first place
 
1092
# it's called might be skipped (such as if it is within an "if", you
 
1093
# have to call PKG_CHECK_EXISTS manually
 
1094
# --------------------------------------------------------------
 
1095
AC_DEFUN([PKG_CHECK_EXISTS],
 
1096
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1097
if test -n "$PKG_CONFIG" && \
 
1098
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
1099
  m4_default([$2], [:])
 
1100
m4_ifvaln([$3], [else
 
1101
  $3])dnl
 
1102
fi])
 
1103
 
 
1104
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
1105
# ---------------------------------------------
 
1106
m4_define([_PKG_CONFIG],
 
1107
[if test -n "$$1"; then
 
1108
    pkg_cv_[]$1="$$1"
 
1109
 elif test -n "$PKG_CONFIG"; then
 
1110
    PKG_CHECK_EXISTS([$3],
 
1111
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
 
1112
                      test "x$?" != "x0" && pkg_failed=yes ],
 
1113
                     [pkg_failed=yes])
 
1114
 else
 
1115
    pkg_failed=untried
 
1116
fi[]dnl
 
1117
])# _PKG_CONFIG
 
1118
 
 
1119
# _PKG_SHORT_ERRORS_SUPPORTED
 
1120
# -----------------------------
 
1121
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
1122
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1123
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
1124
        _pkg_short_errors_supported=yes
 
1125
else
 
1126
        _pkg_short_errors_supported=no
 
1127
fi[]dnl
 
1128
])# _PKG_SHORT_ERRORS_SUPPORTED
 
1129
 
 
1130
 
 
1131
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
1132
# [ACTION-IF-NOT-FOUND])
 
1133
#
 
1134
#
 
1135
# Note that if there is a possibility the first call to
 
1136
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
1137
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
1138
#
 
1139
#
 
1140
# --------------------------------------------------------------
 
1141
AC_DEFUN([PKG_CHECK_MODULES],
 
1142
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
1143
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
1144
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
1145
 
 
1146
pkg_failed=no
 
1147
AC_MSG_CHECKING([for $1])
 
1148
 
 
1149
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
1150
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
1151
 
 
1152
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
1153
and $1[]_LIBS to avoid the need to call pkg-config.
 
1154
See the pkg-config man page for more details.])
 
1155
 
 
1156
if test $pkg_failed = yes; then
 
1157
        AC_MSG_RESULT([no])
 
1158
        _PKG_SHORT_ERRORS_SUPPORTED
 
1159
        if test $_pkg_short_errors_supported = yes; then
 
1160
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
 
1161
        else 
 
1162
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
 
1163
        fi
 
1164
        # Put the nasty error message in config.log where it belongs
 
1165
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
1166
 
 
1167
        m4_default([$4], [AC_MSG_ERROR(
 
1168
[Package requirements ($2) were not met:
 
1169
 
 
1170
$$1_PKG_ERRORS
 
1171
 
 
1172
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
1173
installed software in a non-standard prefix.
 
1174
 
 
1175
_PKG_TEXT])[]dnl
 
1176
        ])
 
1177
elif test $pkg_failed = untried; then
 
1178
        AC_MSG_RESULT([no])
 
1179
        m4_default([$4], [AC_MSG_FAILURE(
 
1180
[The pkg-config script could not be found or is too old.  Make sure it
 
1181
is in your PATH or set the PKG_CONFIG environment variable to the full
 
1182
path to pkg-config.
 
1183
 
 
1184
_PKG_TEXT
 
1185
 
 
1186
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
 
1187
        ])
 
1188
else
 
1189
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
1190
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
1191
        AC_MSG_RESULT([yes])
 
1192
        $3
 
1193
fi[]dnl
 
1194
])# PKG_CHECK_MODULES
 
1195
 
1036
1196
 
1037
1197
#serial 20090814
1038
1198
 
1462
1622
AC_MSG_RESULT([$mm_all_flags])[]dnl
1463
1623
])
1464
1624
 
1465
 
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1466
 
# serial 1 (pkg-config-0.24)
1467
 
1468
 
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1469
 
#
1470
 
# This program is free software; you can redistribute it and/or modify
1471
 
# it under the terms of the GNU General Public License as published by
1472
 
# the Free Software Foundation; either version 2 of the License, or
1473
 
# (at your option) any later version.
1474
 
#
1475
 
# This program is distributed in the hope that it will be useful, but
1476
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
1477
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1478
 
# General Public License for more details.
1479
 
#
1480
 
# You should have received a copy of the GNU General Public License
1481
 
# along with this program; if not, write to the Free Software
1482
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1483
 
#
1484
 
# As a special exception to the GNU General Public License, if you
1485
 
# distribute this file as part of a program that contains a
1486
 
# configuration script generated by Autoconf, you may include it under
1487
 
# the same distribution terms that you use for the rest of that program.
1488
 
 
1489
 
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1490
 
# ----------------------------------
1491
 
AC_DEFUN([PKG_PROG_PKG_CONFIG],
1492
 
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1493
 
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1494
 
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1495
 
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1496
 
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1497
 
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1498
 
 
1499
 
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1500
 
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1501
 
fi
1502
 
if test -n "$PKG_CONFIG"; then
1503
 
        _pkg_min_version=m4_default([$1], [0.9.0])
1504
 
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1505
 
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1506
 
                AC_MSG_RESULT([yes])
1507
 
        else
1508
 
                AC_MSG_RESULT([no])
1509
 
                PKG_CONFIG=""
1510
 
        fi
1511
 
fi[]dnl
1512
 
])# PKG_PROG_PKG_CONFIG
1513
 
 
1514
 
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1515
 
#
1516
 
# Check to see whether a particular set of modules exists.  Similar
1517
 
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1518
 
#
1519
 
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1520
 
# only at the first occurence in configure.ac, so if the first place
1521
 
# it's called might be skipped (such as if it is within an "if", you
1522
 
# have to call PKG_CHECK_EXISTS manually
1523
 
# --------------------------------------------------------------
1524
 
AC_DEFUN([PKG_CHECK_EXISTS],
1525
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1526
 
if test -n "$PKG_CONFIG" && \
1527
 
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1528
 
  m4_default([$2], [:])
1529
 
m4_ifvaln([$3], [else
1530
 
  $3])dnl
1531
 
fi])
1532
 
 
1533
 
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1534
 
# ---------------------------------------------
1535
 
m4_define([_PKG_CONFIG],
1536
 
[if test -n "$$1"; then
1537
 
    pkg_cv_[]$1="$$1"
1538
 
 elif test -n "$PKG_CONFIG"; then
1539
 
    PKG_CHECK_EXISTS([$3],
1540
 
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1541
 
                      test "x$?" != "x0" && pkg_failed=yes ],
1542
 
                     [pkg_failed=yes])
1543
 
 else
1544
 
    pkg_failed=untried
1545
 
fi[]dnl
1546
 
])# _PKG_CONFIG
1547
 
 
1548
 
# _PKG_SHORT_ERRORS_SUPPORTED
1549
 
# -----------------------------
1550
 
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1551
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1552
 
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1553
 
        _pkg_short_errors_supported=yes
1554
 
else
1555
 
        _pkg_short_errors_supported=no
1556
 
fi[]dnl
1557
 
])# _PKG_SHORT_ERRORS_SUPPORTED
1558
 
 
1559
 
 
1560
 
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1561
 
# [ACTION-IF-NOT-FOUND])
1562
 
#
1563
 
#
1564
 
# Note that if there is a possibility the first call to
1565
 
# PKG_CHECK_MODULES might not happen, you should be sure to include an
1566
 
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1567
 
#
1568
 
#
1569
 
# --------------------------------------------------------------
1570
 
AC_DEFUN([PKG_CHECK_MODULES],
1571
 
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1572
 
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1573
 
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1574
 
 
1575
 
pkg_failed=no
1576
 
AC_MSG_CHECKING([for $1])
1577
 
 
1578
 
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1579
 
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1580
 
 
1581
 
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1582
 
and $1[]_LIBS to avoid the need to call pkg-config.
1583
 
See the pkg-config man page for more details.])
1584
 
 
1585
 
if test $pkg_failed = yes; then
1586
 
        AC_MSG_RESULT([no])
1587
 
        _PKG_SHORT_ERRORS_SUPPORTED
1588
 
        if test $_pkg_short_errors_supported = yes; then
1589
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1590
 
        else 
1591
 
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1592
 
        fi
1593
 
        # Put the nasty error message in config.log where it belongs
1594
 
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1595
 
 
1596
 
        m4_default([$4], [AC_MSG_ERROR(
1597
 
[Package requirements ($2) were not met:
1598
 
 
1599
 
$$1_PKG_ERRORS
1600
 
 
1601
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1602
 
installed software in a non-standard prefix.
1603
 
 
1604
 
_PKG_TEXT])[]dnl
1605
 
        ])
1606
 
elif test $pkg_failed = untried; then
1607
 
        AC_MSG_RESULT([no])
1608
 
        m4_default([$4], [AC_MSG_FAILURE(
1609
 
[The pkg-config script could not be found or is too old.  Make sure it
1610
 
is in your PATH or set the PKG_CONFIG environment variable to the full
1611
 
path to pkg-config.
1612
 
 
1613
 
_PKG_TEXT
1614
 
 
1615
 
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1616
 
        ])
1617
 
else
1618
 
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1619
 
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1620
 
        AC_MSG_RESULT([yes])
1621
 
        $3
1622
 
fi[]dnl
1623
 
])# PKG_CHECK_MODULES
1624
 
 
1625
1625
m4_include([build/libtool.m4])
1626
1626
m4_include([build/ltoptions.m4])
1627
1627
m4_include([build/ltsugar.m4])