6
6
Autoconf Macro: ax_warning_default_pkgconfig
8
8
<link rel="stylesheet" type="text/css" href="autoconf-archive.css">
9
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
11
12
<table summary="web navigation" style="width:100%;">
14
<td style="width:25%;" align="center" valign="top">
16
"http://autoconf-archive.cryp.to/ax_warning_default_pkgconfig.m4">Download
19
<td style="width:25%;" align="center" valign="top">
21
"http://git.cryp.to/autoconf-archive?a=history;f=ax_warning_default_pkgconfig.m4">
24
<td style="width:25%;" align="center" valign="top">
25
<a href="macros-by-category.html">Category Index</a>
27
<td style="width:25%;" align="center" valign="top">
15
<td style="width:33%;" align="center" valign="top">
16
<a href="macros-by-category.html">Macros by Category</a>
18
<td style="width:33%;" align="center" valign="top">
20
"http://git.cryp.to/autoconf-archive/history/master:/ax_warning_default_pkgconfig.m4">
23
<td style="width:33%;" align="center" valign="top">
28
24
<form method="get" action="http://www.google.com/search">
30
26
<input name="sitesearch" value="autoconf-archive.cryp.to" type=
31
"hidden"><a href="http://www.google.com/">Search</a>: <input name="q"
32
size="10" maxlength="255" type="text">
27
"hidden">Search: <input name="q" maxlength="255" type="text">
88
Guido U. Draheim <guidod@gmx.de>
100
<img src="group28-xrefs.png" alt="group28-xrefs.png" usemap=
101
"#group28"><map id="group28" name="group28">
102
<area shape="poly" href="ax_expand_prefix.html" title="ax_expand_prefix"
104
"658,65 652,58 636,51 610,46 578,43 543,41 507,43 475,46 449,51 433,58 427,65 433,73 449,79 475,85 507,88 543,89 578,88 610,85 636,79 652,73">
105
<area shape="poly" href="ax_warning_default_aclocaldir.html" title=
106
"ax_warning_default_aclocaldir" alt="" coords=
107
"376,29 367,22 341,15 300,10 249,7 192,5 135,7 84,10 43,15 17,22 8,29 17,37 43,43 84,49 135,52 192,53 249,52 300,49 341,43 367,37">
108
<area shape="poly" href="ax_warning_default_pkgconfig.html" title=
109
"ax_warning_default_pkgconfig" alt="" coords=
110
"378,101 369,94 343,87 301,82 249,79 192,77 135,79 83,82 41,87 15,94 6,101 15,109 41,115 83,121 135,124 192,125 249,124 301,121 343,115 369,109">
117
<pre class="m4source">
118
AC_DEFUN([AX_WARNING_DEFAULT_PKGCONFIGDIR],[dnl
119
AC_REQUIRE([AX_EXPAND_PREFIX])dnl
120
AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_dir])dnl
121
AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
122
AS_VAR_PUSHDEF([LOC],[ax_warning_default_pkgconfig_loc])dnl
123
LOC='m4_if([$2],,[${libdir}/pkgconfig],[$2])'
124
m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"])
125
if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
126
AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
128
if test "$PKG_CONFIG" = "no"
129
then DIR="/" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
130
else BIN=`AS_DIRNAME(["$DIR"])` ;
131
if test -d "$BIN/lib/pkgconfig" ; then
132
DIR="$BIN/lib/pkgconfig"
133
else BIN=`AS_DIRNAME(["$DIR"])`
134
if test -d "$BIN/lib/pkgconfig" ; then
135
DIR="$BIN/lib/pkgconfig"
137
if test -d "/usr/lib/pkgconfig" ; then
138
DIR="/usr/lib/pkgconfig"
143
AC_RUN_LOG([: last pkgconfig dir is assumed as "$DIR"])
144
DIR=`eval "echo $DIR"`
145
DIR=`eval "echo $DIR"`
146
LOC=`eval "echo $LOC"`
147
LOC=`eval "echo $LOC"`
148
LOC=`eval "echo $LOC"`
149
LOC=`eval "echo $LOC"`
150
for DIR in `echo "$PKG_CONFIG_PATH:$DIR" | sed -e 's,:, ,g'` ; do
151
AC_RUN_LOG([: test ".$LOC" = ".$DIR"])
152
test ".$LOC" = ".$DIR" && break
154
if test "$LOC" != "$DIR" ; then
155
m4_ifval([$4],[$4],[dnl
156
AC_MSG_NOTICE([warning: m4_if([$1],,[pkgconfigdir],[$1])=$LOC dnl
158
AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR])
159
cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF
160
pkgconfigdir: the m4_if([$1],,[default pkgconfigdir],[$1 value]) of $LOC
161
pkgconfigdir: is not listed in the dirlist where pkg-config will look for
162
pkgconfigdir: package-configs - you can override the install-path using
163
pkgconfigdir: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR
164
pkgconfigdir: or set/append the directory to the environment variable
165
pkgconfigdir: PKG_CONFIG_PATH="$LOC"
167
m4_ifvaln([$5],[$5])])dnl
168
m4_ifvaln([$3],[else $3])dnl
170
AS_VAR_POPDEF([LOC])dnl
171
AS_VAR_POPDEF([BIN])dnl
172
AS_VAR_POPDEF([DIR])dnl
175
AC_DEFUN([AX_ENABLE_DEFAULT_PKGCONFIGDIR],[dnl
176
AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl
177
AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_def])dnl
178
AS_VAR_PUSHDEF([DEF],[ax_warning_default_pkgconfig_def])dnl
179
AC_ARG_ENABLE([enable-default-pkgconfigdir],
180
[ --enable-default-pkgconfigdir(=PATH) override the libdir/pkgconfig default])
181
test ".$enable_default_pkgconfigdir" = "." && enable_default_pkgconfigdir="no"
182
case ".$enable_default_pkgconfigdir" in
183
.no) DIR='m4_if([$2],,[${libdir}/pkgconfig],[$2])' ;;
185
if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4
186
AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no])
188
if test "$PKG_CONFIG" = "no"
189
then DIR="/tmp" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig"
190
else BIN=`AS_DIRNAME(["$DIR"])` ;
191
if test -d "$BIN/lib/pkgconfig" ; then
192
DIR="$BIN/lib/pkgconfig"
193
else BIN=`AS_DIRNAME(["$DIR"])`
194
if test -d "$BIN/lib/pkgconfig" ; then
195
DIR="$BIN/lib/pkgconfig"
197
if test -d "/usr/lib/pkgconfig" ; then
198
DIR="/usr/lib/pkgconfig"
203
*) DIR="$enable_default_pkgconfigdir" ;;
205
AX_WARNING_DEFAULT_PKGCONFIGDIR([$1],[$DEF],[$3],[$4],[$5])
206
m4_if([$1],,[pkgconfigdir],[$1])="$ax_warning_default_pkgconfig_dir"
207
AC_SUBST(m4_if([$1],,[pkgconfigdir],[$1]))
208
AS_VAR_POPDEF([DEF])dnl
209
AS_VAR_POPDEF([DIR])dnl
210
AS_VAR_POPDEF([BIN])dnl
218
<span style="white-space:nowrap;">Copyright © 2008 Guido U. Draheim
219
<guidod@gmx.de></span>
84
"http://autoconf-archive.cryp.to/ax_warning_default_pkgconfig.m4">http://autoconf-archive.cryp.to/ax_warning_default_pkgconfig.m4</a>
90
<p style="white-space:nowrap;">
91
Copyright © 2008 Guido U. Draheim <guidod@gmx.de>
221
94
This program is free software; you can redistribute it and/or modify it
222
95
under the terms of the GNU General Public License as published by the Free