~ubuntu-branches/ubuntu/intrepid/syslog-ng/intrepid

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): SZALAY Attila
  • Date: 2006-10-25 22:06:48 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061025220648-t39ltx1h9iyyikzs
Tags: 2.0rc3-2
Fixed NULL dereference when (Closes: #384021)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1033
1033
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1034
1034
fi
1035
1035
if test -n "$PKG_CONFIG"; then
1036
 
        _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
 
1036
        _pkg_min_version=m4_default([$1], [0.9.0])
1037
1037
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1038
1038
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1039
1039
                AC_MSG_RESULT([yes])
1069
1069
# ---------------------------------------------
1070
1070
m4_define([_PKG_CONFIG],
1071
1071
[if test -n "$PKG_CONFIG"; then
 
1072
    if test -n "$$1"; then
 
1073
        pkg_cv_[]$1="$$1"
 
1074
    else
1072
1075
        PKG_CHECK_EXISTS([$3],
1073
1076
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1074
1077
                         [pkg_failed=yes])
 
1078
    fi
1075
1079
else
1076
1080
        pkg_failed=untried
1077
1081
fi[]dnl
1078
1082
])# _PKG_CONFIG
1079
1083
 
 
1084
# _PKG_SHORT_ERRORS_SUPPORTED
 
1085
# -----------------------------
 
1086
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
1087
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
1088
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
1089
        _pkg_short_errors_supported=yes
 
1090
else
 
1091
        _pkg_short_errors_supported=no
 
1092
fi[]dnl
 
1093
])# _PKG_SHORT_ERRORS_SUPPORTED
 
1094
 
 
1095
 
1080
1096
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1081
1097
# [ACTION-IF-NOT-FOUND])
1082
1098
#
1098
1114
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1099
1115
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1100
1116
 
 
1117
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
1118
and $1[]_LIBS to avoid the need to call pkg-config.
 
1119
See the pkg-config man page for more details.])
 
1120
 
1101
1121
if test $pkg_failed = yes; then
1102
 
        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
1122
        _PKG_SHORT_ERRORS_SUPPORTED
 
1123
        if test $_pkg_short_errors_supported = yes; then
 
1124
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
1125
        else 
 
1126
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
1127
        fi
1103
1128
        # Put the nasty error message in config.log where it belongs
1104
 
        echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
 
1129
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1105
1130
 
1106
1131
        ifelse([$4], , [AC_MSG_ERROR(dnl
1107
 
[Package requirements ($2) were not met.
 
1132
[Package requirements ($2) were not met:
 
1133
 
 
1134
$$1_PKG_ERRORS
 
1135
 
1108
1136
Consider adjusting the PKG_CONFIG_PATH environment variable if you
1109
1137
installed software in a non-standard prefix.
1110
1138
 
1111
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
1112
 
to avoid the need to call pkg-config.  See the pkg-config man page for
1113
 
more details.])],
 
1139
_PKG_TEXT
 
1140
])],
1114
1141
                [$4])
1115
1142
elif test $pkg_failed = untried; then
1116
1143
        ifelse([$4], , [AC_MSG_FAILURE(dnl
1118
1145
is in your PATH or set the PKG_CONFIG environment variable to the full
1119
1146
path to pkg-config.
1120
1147
 
1121
 
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
1122
 
to avoid the need to call pkg-config.  See the pkg-config man page for
1123
 
more details.
 
1148
_PKG_TEXT
1124
1149
 
1125
1150
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1126
1151
                [$4])