314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
1 |
# generated automatically by aclocal 1.11.1 -*- Autoconf -*- |
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
2 |
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
3 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
4 |
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
5 |
# This file is free software; the Free Software Foundation |
6 |
# gives unlimited permission to copy and/or distribute it, |
|
7 |
# with or without modifications, as long as this notice is preserved. |
|
8 |
||
9 |
# This program is distributed in the hope that it will be useful, |
|
10 |
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
|
11 |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
|
12 |
# PARTICULAR PURPOSE. |
|
13 |
||
152
by Evan Dandrea, Evan Dandrea, Colin Watson
[ Evan Dandrea ] |
14 |
m4_ifndef([AC_AUTOCONF_VERSION], |
15 |
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
|
314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
16 |
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, |
17 |
[m4_warning([this file was generated for autoconf 2.65. |
|
152
by Evan Dandrea, Evan Dandrea, Colin Watson
[ Evan Dandrea ] |
18 |
You have another version of autoconf. It may work, but is not guaranteed to.
|
19 |
If you have problems, you may need to regenerate the build system entirely.
|
|
20 |
To do so, use the procedure documented by the package, typically `autoreconf'.])]) |
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
21 |
|
331.1.15
by Evan Dandrea, Mario Limonciello, Bilal Akhtar, Evan Dandrea
[ Mario Limonciello ] |
22 |
# Configure paths for GTK+ |
23 |
# Owen Taylor 1997-2001 |
|
24 |
||
25 |
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
|
26 |
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, |
|
27 |
dnl pass to pkg-config |
|
28 |
dnl
|
|
29 |
AC_DEFUN([AM_PATH_GTK_2_0], |
|
30 |
[dnl |
|
31 |
dnl Get the cflags and libraries from pkg-config
|
|
32 |
dnl
|
|
33 |
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program], |
|
34 |
, enable_gtktest=yes) |
|
35 |
||
36 |
pkg_config_args=gtk+-2.0 |
|
37 |
for module in . $4 |
|
38 |
do |
|
39 |
case "$module" in |
|
40 |
gthread) |
|
41 |
pkg_config_args="$pkg_config_args gthread-2.0" |
|
42 |
;; |
|
43 |
esac |
|
44 |
done |
|
45 |
||
46 |
no_gtk="" |
|
47 |
||
48 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
|
49 |
||
50 |
if test x$PKG_CONFIG != xno ; then |
|
51 |
if pkg-config --atleast-pkgconfig-version 0.7 ; then |
|
52 |
: |
|
53 |
else |
|
54 |
echo "*** pkg-config too old; version 0.7 or better required." |
|
55 |
no_gtk=yes |
|
56 |
PKG_CONFIG=no |
|
57 |
fi |
|
58 |
else |
|
59 |
no_gtk=yes |
|
60 |
fi |
|
61 |
||
62 |
min_gtk_version=ifelse([$1], ,2.0.0,$1) |
|
63 |
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version) |
|
64 |
||
65 |
if test x$PKG_CONFIG != xno ; then |
|
66 |
## don't try to run the test against uninstalled libtool libs |
|
67 |
if $PKG_CONFIG --uninstalled $pkg_config_args; then
|
|
68 |
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
|
|
69 |
enable_gtktest=no
|
|
70 |
fi
|
|
71 |
||
72 |
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
|
|
73 |
:
|
|
74 |
else
|
|
75 |
no_gtk=yes
|
|
76 |
fi
|
|
77 |
fi
|
|
78 |
||
79 |
if test x"$no_gtk" = x ; then
|
|
80 |
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
|
|
81 |
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
|
|
82 |
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
|
|
83 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
|
84 |
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
|
|
85 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
|
86 |
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
|
|
87 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
|
88 |
if test "x$enable_gtktest" = "xyes" ; then
|
|
89 |
ac_save_CFLAGS="$CFLAGS"
|
|
90 |
ac_save_LIBS="$LIBS"
|
|
91 |
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
|
92 |
LIBS="$GTK_LIBS $LIBS"
|
|
93 |
dnl
|
|
94 |
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
|
|
95 |
dnl checks the results of pkg-config to some extent)
|
|
96 |
dnl
|
|
97 |
rm -f conf.gtktest
|
|
98 |
AC_TRY_RUN([
|
|
99 |
#include <gtk/gtk.h>
|
|
100 |
#include <stdio.h>
|
|
101 |
#include <stdlib.h>
|
|
102 |
||
103 |
int
|
|
104 |
main ()
|
|
105 |
{
|
|
106 |
int major, minor, micro;
|
|
107 |
char *tmp_version;
|
|
108 |
||
109 |
fclose (fopen ("conf.gtktest", "w"));
|
|
110 |
||
111 |
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
|
112 |
tmp_version = g_strdup("$min_gtk_version");
|
|
113 |
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
114 |
printf("%s, bad version string\n", "$min_gtk_version");
|
|
115 |
exit(1);
|
|
116 |
}
|
|
117 |
||
118 |
if ((gtk_major_version != $gtk_config_major_version) ||
|
|
119 |
(gtk_minor_version != $gtk_config_minor_version) ||
|
|
120 |
(gtk_micro_version != $gtk_config_micro_version))
|
|
121 |
{
|
|
122 |
printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", |
|
123 |
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
|
124 |
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
125 |
printf ("*** was found! If pkg-config was correct, then it is best\n");
|
|
126 |
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
|
127 |
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
|
128 |
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
|
129 |
printf("*** required on your system.\n");
|
|
130 |
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
|
|
131 |
printf("*** to point to the correct configuration files\n");
|
|
132 |
}
|
|
133 |
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
|
134 |
(gtk_minor_version != GTK_MINOR_VERSION) ||
|
|
135 |
(gtk_micro_version != GTK_MICRO_VERSION))
|
|
136 |
{
|
|
137 |
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
|
138 |
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
|
139 |
printf("*** library (version %d.%d.%d)\n",
|
|
140 |
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
141 |
}
|
|
142 |
else
|
|
143 |
{
|
|
144 |
if ((gtk_major_version > major) ||
|
|
145 |
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
|
146 |
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
|
147 |
{
|
|
148 |
return 0;
|
|
149 |
}
|
|
150 |
else
|
|
151 |
{
|
|
152 |
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
|
153 |
gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
154 |
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
|
155 |
major, minor, micro);
|
|
156 |
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
|
157 |
printf("***\n");
|
|
158 |
printf("*** If you have already installed a sufficiently new version, this error\n");
|
|
159 |
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
|
|
160 |
printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
|
161 |
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
|
|
162 |
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
|
|
163 |
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
|
164 |
printf("*** so that the correct libraries are found at run-time))\n");
|
|
165 |
}
|
|
166 |
}
|
|
167 |
return 1;
|
|
168 |
}
|
|
169 |
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
170 |
CFLAGS="$ac_save_CFLAGS"
|
|
171 |
LIBS="$ac_save_LIBS"
|
|
172 |
fi
|
|
173 |
fi
|
|
174 |
if test "x$no_gtk" = x ; then
|
|
175 |
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
|
|
176 |
ifelse([$2], , :, [$2])
|
|
177 |
else
|
|
178 |
AC_MSG_RESULT(no)
|
|
179 |
if test "$PKG_CONFIG" = "no" ; then
|
|
180 |
echo "*** A new enough version of pkg-config was not found."
|
|
181 |
echo "*** See http://pkgconfig.sourceforge.net"
|
|
182 |
else
|
|
183 |
if test -f conf.gtktest ; then
|
|
184 |
:
|
|
185 |
else
|
|
186 |
echo "*** Could not run GTK+ test program, checking why..."
|
|
187 |
ac_save_CFLAGS="$CFLAGS"
|
|
188 |
ac_save_LIBS="$LIBS"
|
|
189 |
CFLAGS="$CFLAGS $GTK_CFLAGS"
|
|
190 |
LIBS="$LIBS $GTK_LIBS"
|
|
191 |
AC_TRY_LINK([
|
|
192 |
#include <gtk/gtk.h>
|
|
193 |
#include <stdio.h>
|
|
194 |
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
|
195 |
[ echo "*** The test program compiled, but did not run. This usually means"
|
|
196 |
echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
|
|
197 |
echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" |
|
198 |
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
|
199 |
echo "*** to the installed location Also, make sure you have run ldconfig if that" |
|
200 |
echo "*** is required on your system" |
|
201 |
echo "***" |
|
202 |
echo "*** If you have an old version installed, it is best to remove it, although" |
|
203 |
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], |
|
204 |
[ echo "*** The test program failed to compile or link. See the file config.log for the" |
|
205 |
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) |
|
206 |
CFLAGS="$ac_save_CFLAGS" |
|
207 |
LIBS="$ac_save_LIBS" |
|
208 |
fi
|
|
209 |
fi
|
|
210 |
GTK_CFLAGS=""
|
|
211 |
GTK_LIBS=""
|
|
212 |
ifelse([$3], , :, [$3])
|
|
213 |
fi
|
|
214 |
AC_SUBST(GTK_CFLAGS)
|
|
215 |
AC_SUBST(GTK_LIBS)
|
|
216 |
rm -f conf.gtktest
|
|
217 |
])
|
|
218 |
||
219 |
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
|
220 |
#
|
|
221 |
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
|
222 |
#
|
|
223 |
# This program is free software; you can redistribute it and/or modify
|
|
224 |
# it under the terms of the GNU General Public License as published by
|
|
225 |
# the Free Software Foundation; either version 2 of the License, or
|
|
226 |
# (at your option) any later version.
|
|
227 |
#
|
|
228 |
# This program is distributed in the hope that it will be useful, but
|
|
229 |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
230 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
231 |
# General Public License for more details.
|
|
232 |
#
|
|
233 |
# You should have received a copy of the GNU General Public License
|
|
234 |
# along with this program; if not, write to the Free Software
|
|
235 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
236 |
#
|
|
237 |
# As a special exception to the GNU General Public License, if you
|
|
238 |
# distribute this file as part of a program that contains a
|
|
239 |
# configuration script generated by Autoconf, you may include it under
|
|
240 |
# the same distribution terms that you use for the rest of that program.
|
|
241 |
||
242 |
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
|
243 |
# ----------------------------------
|
|
244 |
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
|
245 |
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
|
246 |
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
|
|
247 |
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
|
|
248 |
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
|
249 |
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
|
250 |
fi
|
|
251 |
if test -n "$PKG_CONFIG"; then |
|
252 |
_pkg_min_version=m4_default([$1], [0.9.0])
|
|
253 |
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
|
254 |
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
|
255 |
AC_MSG_RESULT([yes])
|
|
256 |
else
|
|
257 |
AC_MSG_RESULT([no])
|
|
258 |
PKG_CONFIG=""
|
|
259 |
fi
|
|
260 |
|
|
261 |
fi[]dnl
|
|
262 |
])# PKG_PROG_PKG_CONFIG
|
|
263 |
||
264 |
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
265 |
#
|
|
266 |
# Check to see whether a particular set of modules exists. Similar
|
|
267 |
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
|
|
268 |
#
|
|
269 |
#
|
|
270 |
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
|
|
271 |
# this or PKG_CHECK_MODULES is called, or make sure to call
|
|
272 |
# PKG_CHECK_EXISTS manually
|
|
273 |
# --------------------------------------------------------------
|
|
274 |
AC_DEFUN([PKG_CHECK_EXISTS],
|
|
275 |
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
276 |
if test -n "$PKG_CONFIG" && \ |
|
277 |
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
|
278 |
m4_ifval([$2], [$2], [:])
|
|
279 |
m4_ifvaln([$3], [else
|
|
280 |
$3])dnl
|
|
281 |
fi])
|
|
282 |
||
283 |
||
284 |
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
|
285 |
# ---------------------------------------------
|
|
286 |
m4_define([_PKG_CONFIG],
|
|
287 |
[if test -n "$PKG_CONFIG"; then |
|
288 |
if test -n "$$1"; then |
|
289 |
pkg_cv_[]$1="$$1" |
|
290 |
else
|
|
291 |
PKG_CHECK_EXISTS([$3],
|
|
292 |
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], |
|
293 |
[pkg_failed=yes])
|
|
294 |
fi
|
|
295 |
else
|
|
296 |
pkg_failed=untried
|
|
297 |
fi[]dnl
|
|
298 |
])# _PKG_CONFIG
|
|
299 |
||
300 |
# _PKG_SHORT_ERRORS_SUPPORTED
|
|
301 |
# -----------------------------
|
|
302 |
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
|
303 |
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
|
304 |
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
|
305 |
_pkg_short_errors_supported=yes
|
|
306 |
else
|
|
307 |
_pkg_short_errors_supported=no
|
|
308 |
fi[]dnl
|
|
309 |
])# _PKG_SHORT_ERRORS_SUPPORTED
|
|
310 |
||
311 |
||
312 |
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
|
313 |
# [ACTION-IF-NOT-FOUND])
|
|
314 |
#
|
|
315 |
#
|
|
316 |
# Note that if there is a possibility the first call to
|
|
317 |
# PKG_CHECK_MODULES might not happen, you should be sure to include an
|
|
318 |
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
|
319 |
#
|
|
320 |
#
|
|
321 |
# --------------------------------------------------------------
|
|
322 |
AC_DEFUN([PKG_CHECK_MODULES],
|
|
323 |
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
|
324 |
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
|
325 |
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
|
326 |
||
327 |
pkg_failed=no
|
|
328 |
AC_MSG_CHECKING([for $1])
|
|
329 |
||
330 |
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
|
331 |
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
|
332 |
||
333 |
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
|
334 |
and $1[]_LIBS to avoid the need to call pkg-config.
|
|
335 |
See the pkg-config man page for more details.])
|
|
336 |
||
337 |
if test $pkg_failed = yes; then
|
|
338 |
_PKG_SHORT_ERRORS_SUPPORTED
|
|
339 |
if test $_pkg_short_errors_supported = yes; then
|
|
340 |
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` |
|
341 |
else
|
|
342 |
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
|
343 |
fi
|
|
344 |
# Put the nasty error message in config.log where it belongs
|
|
345 |
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
|
346 |
||
347 |
ifelse([$4], , [AC_MSG_ERROR(dnl
|
|
348 |
[Package requirements ($2) were not met:
|
|
349 |
||
350 |
$$1_PKG_ERRORS
|
|
351 |
||
352 |
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
|
353 |
installed software in a non-standard prefix.
|
|
354 |
||
355 |
_PKG_TEXT
|
|
356 |
])],
|
|
357 |
[AC_MSG_RESULT([no])
|
|
358 |
$4])
|
|
359 |
elif test $pkg_failed = untried; then
|
|
360 |
ifelse([$4], , [AC_MSG_FAILURE(dnl
|
|
361 |
[The pkg-config script could not be found or is too old. Make sure it
|
|
362 |
is in your PATH or set the PKG_CONFIG environment variable to the full
|
|
363 |
path to pkg-config.
|
|
364 |
||
365 |
_PKG_TEXT
|
|
366 |
||
367 |
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
|
|
368 |
[$4])
|
|
369 |
else
|
|
370 |
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
|
371 |
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
|
372 |
AC_MSG_RESULT([yes])
|
|
373 |
ifelse([$3], , :, [$3])
|
|
374 |
fi[]dnl
|
|
375 |
])# PKG_CHECK_MODULES
|
|
376 |
||
222
by Colin Watson
* Refactor architecture/subarchitecture detection slightly. |
377 |
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
378 |
#
|
379 |
# This file is free software; the Free Software Foundation
|
|
380 |
# gives unlimited permission to copy and/or distribute it,
|
|
381 |
# with or without modifications, as long as this notice is preserved.
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
382 |
|
383 |
# AM_AUTOMAKE_VERSION(VERSION)
|
|
384 |
# ----------------------------
|
|
385 |
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
|
386 |
# generated from the m4 files accompanying Automake X.Y.
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
387 |
# (This private macro should not be called outside this file.)
|
388 |
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
389 |
[am__api_version='1.11'
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
390 |
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
391 |
dnl require some minimum version. Point them to the right macro.
|
|
314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
392 |
m4_if([$1], [1.11.1], [],
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
393 |
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
394 |
])
|
|
395 |
||
396 |
# _AM_AUTOCONF_VERSION(VERSION)
|
|
397 |
# -----------------------------
|
|
398 |
# aclocal traces this macro to find the Autoconf version.
|
|
399 |
# This is a private macro too. Using m4_define simplifies
|
|
400 |
# the logic in aclocal, which can simply ignore this definition.
|
|
401 |
m4_define([_AM_AUTOCONF_VERSION], [])
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
402 |
|
403 |
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
|
404 |
# -------------------------------
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
405 |
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
222
by Colin Watson
* Refactor architecture/subarchitecture detection slightly. |
406 |
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
407 |
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
408 |
[AM_AUTOMAKE_VERSION([1.11.1])dnl
|
152
by Evan Dandrea, Evan Dandrea, Colin Watson
[ Evan Dandrea ] |
409 |
m4_ifndef([AC_AUTOCONF_VERSION],
|
410 |
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
|
222
by Colin Watson
* Refactor architecture/subarchitecture detection slightly. |
411 |
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
412 |
|
413 |
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
|
414 |
||
415 |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
|
416 |
#
|
|
417 |
# This file is free software; the Free Software Foundation
|
|
418 |
# gives unlimited permission to copy and/or distribute it,
|
|
419 |
# with or without modifications, as long as this notice is preserved.
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
420 |
|
421 |
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
|
422 |
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
|
|
423 |
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
|
|
424 |
#
|
|
425 |
# Of course, Automake must honor this variable whenever it calls a
|
|
426 |
# tool from the auxiliary directory. The problem is that $srcdir (and
|
|
427 |
# therefore $ac_aux_dir as well) can be either absolute or relative,
|
|
428 |
# depending on how configure is run. This is pretty annoying, since
|
|
429 |
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
|
|
430 |
# source directory, any form will work fine, but in subdirectories a
|
|
431 |
# relative path needs to be adjusted first.
|
|
432 |
#
|
|
433 |
# $ac_aux_dir/missing
|
|
434 |
# fails when called from a subdirectory if $ac_aux_dir is relative
|
|
435 |
# $top_srcdir/$ac_aux_dir/missing
|
|
436 |
# fails if $ac_aux_dir is absolute,
|
|
437 |
# fails when called from a subdirectory in a VPATH build with
|
|
438 |
# a relative $ac_aux_dir
|
|
439 |
#
|
|
440 |
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
|
|
441 |
# are both prefixed by $srcdir. In an in-source build this is usually
|
|
442 |
# harmless because $srcdir is `.', but things will broke when you
|
|
443 |
# start a VPATH build or use an absolute $srcdir.
|
|
444 |
#
|
|
445 |
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
|
|
446 |
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
|
|
447 |
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
|
448 |
# and then we would define $MISSING as
|
|
449 |
# MISSING="\${SHELL} $am_aux_dir/missing"
|
|
450 |
# This will work as long as MISSING is not called from configure, because
|
|
451 |
# unfortunately $(top_srcdir) has no meaning in configure.
|
|
452 |
# However there are other variables, like CC, which are often used in
|
|
453 |
# configure, and could therefore not use this "fixed" $ac_aux_dir.
|
|
454 |
#
|
|
455 |
# Another solution, used here, is to always expand $ac_aux_dir to an
|
|
456 |
# absolute PATH. The drawback is that using absolute paths prevent a
|
|
457 |
# configured tree to be moved without reconfiguration.
|
|
458 |
||
459 |
AC_DEFUN([AM_AUX_DIR_EXPAND],
|
|
460 |
[dnl Rely on autoconf to set up CDPATH properly.
|
|
461 |
AC_PREREQ([2.50])dnl
|
|
462 |
# expand $ac_aux_dir to an absolute path
|
|
463 |
am_aux_dir=`cd $ac_aux_dir && pwd`
|
|
464 |
])
|
|
465 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
466 |
# AM_CONDITIONAL -*- Autoconf -*-
|
467 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
468 |
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
469 |
# Free Software Foundation, Inc.
|
470 |
#
|
|
471 |
# This file is free software; the Free Software Foundation
|
|
472 |
# gives unlimited permission to copy and/or distribute it,
|
|
473 |
# with or without modifications, as long as this notice is preserved.
|
|
474 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
475 |
# serial 9
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
476 |
|
477 |
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
|
478 |
# -------------------------------------
|
|
479 |
# Define a conditional.
|
|
480 |
AC_DEFUN([AM_CONDITIONAL],
|
|
481 |
[AC_PREREQ(2.52)dnl
|
|
482 |
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
|
483 |
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
484 |
AC_SUBST([$1_TRUE])dnl
|
485 |
AC_SUBST([$1_FALSE])dnl
|
|
486 |
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
|
487 |
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
488 |
m4_define([_AM_COND_VALUE_$1], [$2])dnl
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
489 |
if $2; then
|
490 |
$1_TRUE=
|
|
491 |
$1_FALSE='#'
|
|
492 |
else
|
|
493 |
$1_TRUE='#'
|
|
494 |
$1_FALSE=
|
|
495 |
fi
|
|
496 |
AC_CONFIG_COMMANDS_PRE(
|
|
497 |
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
498 |
AC_MSG_ERROR([[conditional "$1" was never defined.
|
499 |
Usually this means the macro was only invoked conditionally.]])
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
500 |
fi])])
|
501 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
502 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
503 |
# Free Software Foundation, Inc.
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
504 |
#
|
505 |
# This file is free software; the Free Software Foundation
|
|
506 |
# gives unlimited permission to copy and/or distribute it,
|
|
507 |
# with or without modifications, as long as this notice is preserved.
|
|
508 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
509 |
# serial 10
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
510 |
|
511 |
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
|
512 |
# written in clear, in which case automake, when reading aclocal.m4,
|
|
513 |
# will think it sees a *use*, and therefore will trigger all it's
|
|
514 |
# C support machinery. Also note that it means that autoscan, seeing
|
|
515 |
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
|
516 |
||
517 |
||
518 |
# _AM_DEPENDENCIES(NAME)
|
|
519 |
# ----------------------
|
|
520 |
# See how the compiler implements dependency checking.
|
|
521 |
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
|
522 |
# We try a few techniques and use that to set a single cache variable.
|
|
523 |
#
|
|
524 |
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
|
525 |
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
|
526 |
# dependency, and given that the user is not expected to run this macro,
|
|
527 |
# just rely on AC_PROG_CC.
|
|
528 |
AC_DEFUN([_AM_DEPENDENCIES],
|
|
529 |
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
|
530 |
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
|
531 |
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
|
532 |
AC_REQUIRE([AM_DEP_TRACK])dnl
|
|
533 |
||
534 |
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
|
535 |
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
|
536 |
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
537 |
[$1], UPC, [depcc="$UPC" am_compiler_list=],
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
538 |
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
539 |
[depcc="$$1" am_compiler_list=])
|
|
540 |
||
541 |
AC_CACHE_CHECK([dependency style of $depcc],
|
|
542 |
[am_cv_$1_dependencies_compiler_type],
|
|
543 |
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
|
544 |
# We make a subdir and do the tests there. Otherwise we can end up
|
|
545 |
# making bogus files that we don't know about and never remove. For
|
|
546 |
# instance it was reported that on HP-UX the gcc test will end up
|
|
547 |
# making a dummy file named `D' -- because `-MD' means `put the output
|
|
548 |
# in D'.
|
|
549 |
mkdir conftest.dir
|
|
550 |
# Copy depcomp to subdir because otherwise we won't find it if we're
|
|
551 |
# using a relative directory.
|
|
552 |
cp "$am_depcomp" conftest.dir
|
|
553 |
cd conftest.dir
|
|
554 |
# We will build objects and dependencies in a subdirectory because
|
|
555 |
# it helps to detect inapplicable dependency modes. For instance
|
|
556 |
# both Tru64's cc and ICC support -MD to output dependencies as a
|
|
557 |
# side effect of compilation, but ICC will put the dependencies in
|
|
558 |
# the current directory while Tru64 will put them in the object
|
|
559 |
# directory.
|
|
560 |
mkdir sub
|
|
561 |
||
562 |
am_cv_$1_dependencies_compiler_type=none
|
|
563 |
if test "$am_compiler_list" = ""; then
|
|
564 |
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
|
565 |
fi
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
566 |
am__universal=false
|
567 |
m4_case([$1], [CC],
|
|
568 |
[case " $depcc " in #(
|
|
569 |
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
|
570 |
esac],
|
|
571 |
[CXX],
|
|
572 |
[case " $depcc " in #(
|
|
573 |
*\ -arch\ *\ -arch\ *) am__universal=true ;;
|
|
574 |
esac])
|
|
575 |
||
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
576 |
for depmode in $am_compiler_list; do
|
577 |
# Setup a source with many dependencies, because some compilers
|
|
578 |
# like to wrap large dependency lists on column 80 (with \), and
|
|
579 |
# we should not choose a depcomp mode which is confused by this.
|
|
580 |
#
|
|
581 |
# We need to recreate these files for each test, as the compiler may
|
|
582 |
# overwrite some of them when testing with obscure command lines.
|
|
583 |
# This happens at least with the AIX C compiler.
|
|
584 |
: > sub/conftest.c
|
|
585 |
for i in 1 2 3 4 5 6; do
|
|
586 |
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
|
587 |
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
|
588 |
# Solaris 8's {/usr,}/bin/sh.
|
|
589 |
touch sub/conftst$i.h
|
|
590 |
done
|
|
591 |
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
|
592 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
593 |
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
594 |
# mode. It turns out that the SunPro C++ compiler does not properly
|
|
595 |
# handle `-M -o', and we need to detect this. Also, some Intel
|
|
596 |
# versions had trouble with output in subdirs
|
|
597 |
am__obj=sub/conftest.${OBJEXT-o}
|
|
598 |
am__minus_obj="-o $am__obj"
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
599 |
case $depmode in
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
600 |
gcc)
|
601 |
# This depmode causes a compiler race in universal mode.
|
|
602 |
test "$am__universal" = false || continue
|
|
603 |
;;
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
604 |
nosideeffect)
|
605 |
# after this tag, mechanisms are not by side-effect, so they'll
|
|
606 |
# only be used when explicitly requested
|
|
607 |
if test "x$enable_dependency_tracking" = xyes; then
|
|
608 |
continue
|
|
609 |
else
|
|
610 |
break
|
|
611 |
fi
|
|
612 |
;;
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
613 |
msvisualcpp | msvcmsys)
|
614 |
# This compiler won't grok `-c -o', but also, the minuso test has
|
|
615 |
# not run yet. These depmodes are late enough in the game, and
|
|
616 |
# so weak that their functioning should not be impacted.
|
|
617 |
am__obj=conftest.${OBJEXT-o}
|
|
618 |
am__minus_obj=
|
|
619 |
;;
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
620 |
none) break ;;
|
621 |
esac
|
|
622 |
if depmode=$depmode \
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
623 |
source=sub/conftest.c object=$am__obj \
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
624 |
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
625 |
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
626 |
>/dev/null 2>conftest.err &&
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
627 |
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
628 |
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
629 |
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
630 |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
631 |
# icc doesn't choke on unknown options, it will just issue warnings
|
|
632 |
# or remarks (even with -Werror). So we grep stderr for any message
|
|
633 |
# that says an option was ignored or not supported.
|
|
634 |
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
|
635 |
# icc: Command line warning: ignoring option '-M'; no argument required
|
|
636 |
# The diagnosis changed in icc 8.0:
|
|
637 |
# icc: Command line remark: option '-MP' not supported
|
|
638 |
if (grep 'ignoring option' conftest.err ||
|
|
639 |
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
|
640 |
am_cv_$1_dependencies_compiler_type=$depmode
|
|
641 |
break
|
|
642 |
fi
|
|
643 |
fi
|
|
644 |
done
|
|
645 |
||
646 |
cd ..
|
|
647 |
rm -rf conftest.dir
|
|
648 |
else
|
|
649 |
am_cv_$1_dependencies_compiler_type=none
|
|
650 |
fi
|
|
651 |
])
|
|
652 |
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
|
653 |
AM_CONDITIONAL([am__fastdep$1], [
|
|
654 |
test "x$enable_dependency_tracking" != xno \
|
|
655 |
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
|
656 |
])
|
|
657 |
||
658 |
||
659 |
# AM_SET_DEPDIR
|
|
660 |
# -------------
|
|
661 |
# Choose a directory name for dependency files.
|
|
662 |
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
|
663 |
AC_DEFUN([AM_SET_DEPDIR],
|
|
664 |
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
|
665 |
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
|
666 |
])
|
|
667 |
||
668 |
||
669 |
# AM_DEP_TRACK
|
|
670 |
# ------------
|
|
671 |
AC_DEFUN([AM_DEP_TRACK],
|
|
672 |
[AC_ARG_ENABLE(dependency-tracking,
|
|
673 |
[ --disable-dependency-tracking speeds up one-time build
|
|
674 |
--enable-dependency-tracking do not reject slow dependency extractors])
|
|
675 |
if test "x$enable_dependency_tracking" != xno; then
|
|
676 |
am_depcomp="$ac_aux_dir/depcomp"
|
|
677 |
AMDEPBACKSLASH='\'
|
|
678 |
fi
|
|
679 |
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
680 |
AC_SUBST([AMDEPBACKSLASH])dnl
|
681 |
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
682 |
])
|
683 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
684 |
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
685 |
||
222
by Colin Watson
* Refactor architecture/subarchitecture detection slightly. |
686 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
687 |
# Free Software Foundation, Inc.
|
688 |
#
|
|
689 |
# This file is free software; the Free Software Foundation
|
|
690 |
# gives unlimited permission to copy and/or distribute it,
|
|
691 |
# with or without modifications, as long as this notice is preserved.
|
|
692 |
||
234
by Colin Watson, Mario Limonciello, Evan Dandrea, Colin Watson
[ Mario Limonciello ] |
693 |
#serial 5
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
694 |
|
695 |
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
|
696 |
# ------------------------------
|
|
697 |
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|
234
by Colin Watson, Mario Limonciello, Evan Dandrea, Colin Watson
[ Mario Limonciello ] |
698 |
[{
|
699 |
# Autoconf 2.62 quotes --file arguments for eval, but not when files
|
|
700 |
# are listed without --file. Let's play safe and only enable the eval
|
|
701 |
# if we detect the quoting.
|
|
702 |
case $CONFIG_FILES in
|
|
703 |
*\'*) eval set x "$CONFIG_FILES" ;;
|
|
704 |
*) set x $CONFIG_FILES ;;
|
|
705 |
esac
|
|
706 |
shift
|
|
707 |
for mf
|
|
708 |
do
|
|
709 |
# Strip MF so we end up with the name of the file.
|
|
710 |
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
|
711 |
# Check whether this is an Automake generated Makefile or not.
|
|
712 |
# We used to match only the files named `Makefile.in', but
|
|
713 |
# some people rename them; so instead we look at the file content.
|
|
714 |
# Grep'ing the first line is not enough: some people post-process
|
|
715 |
# each Makefile.in and add a new line on top of each file to say so.
|
|
716 |
# Grep'ing the whole file is not good either: AIX grep has a line
|
|
717 |
# limit of 2048, but all sed's we know have understand at least 4000.
|
|
718 |
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
|
|
719 |
dirpart=`AS_DIRNAME("$mf")`
|
|
720 |
else
|
|
721 |
continue
|
|
722 |
fi
|
|
723 |
# Extract the definition of DEPDIR, am__include, and am__quote
|
|
724 |
# from the Makefile without running `make'.
|
|
725 |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
|
726 |
test -z "$DEPDIR" && continue
|
|
727 |
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
|
728 |
test -z "am__include" && continue
|
|
729 |
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
|
730 |
# When using ansi2knr, U may be empty or an underscore; expand it
|
|
731 |
U=`sed -n 's/^U = //p' < "$mf"`
|
|
732 |
# Find all dependency output files, they are included files with
|
|
733 |
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
|
734 |
# simplest approach to changing $(DEPDIR) to its actual value in the
|
|
735 |
# expansion.
|
|
736 |
for file in `sed -n "
|
|
737 |
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
|
738 |
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
|
739 |
# Make sure the directory exists.
|
|
740 |
test -f "$dirpart/$file" && continue
|
|
741 |
fdir=`AS_DIRNAME(["$file"])`
|
|
742 |
AS_MKDIR_P([$dirpart/$fdir])
|
|
743 |
# echo "creating $dirpart/$file"
|
|
744 |
echo '# dummy' > "$dirpart/$file"
|
|
745 |
done
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
746 |
done
|
234
by Colin Watson, Mario Limonciello, Evan Dandrea, Colin Watson
[ Mario Limonciello ] |
747 |
}
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
748 |
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
749 |
||
750 |
||
751 |
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
|
752 |
# -----------------------------
|
|
753 |
# This macro should only be invoked once -- use via AC_REQUIRE.
|
|
754 |
#
|
|
755 |
# This code is only required when automatic dependency tracking
|
|
756 |
# is enabled. FIXME. This creates each `.P' file that we will
|
|
757 |
# need in order to bootstrap the dependency handling code.
|
|
758 |
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|
759 |
[AC_CONFIG_COMMANDS([depfiles],
|
|
760 |
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|
761 |
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
|
762 |
])
|
|
763 |
||
314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
764 |
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
|
765 |
# Free Software Foundation, Inc.
|
|
766 |
#
|
|
767 |
# This file is free software; the Free Software Foundation
|
|
768 |
# gives unlimited permission to copy and/or distribute it,
|
|
769 |
# with or without modifications, as long as this notice is preserved.
|
|
770 |
||
771 |
# serial 8
|
|
772 |
||
773 |
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
|
774 |
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
|
775 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
776 |
# Do all the work for Automake. -*- Autoconf -*-
|
777 |
||
778 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
779 |
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
780 |
#
|
781 |
# This file is free software; the Free Software Foundation
|
|
782 |
# gives unlimited permission to copy and/or distribute it,
|
|
783 |
# with or without modifications, as long as this notice is preserved.
|
|
784 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
785 |
# serial 16
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
786 |
|
787 |
# This macro actually does too much. Some checks are only needed if
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
788 |
# your package does certain things. But this isn't really a big deal.
|
789 |
||
790 |
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
|
|
791 |
# AM_INIT_AUTOMAKE([OPTIONS])
|
|
792 |
# -----------------------------------------------
|
|
793 |
# The call with PACKAGE and VERSION arguments is the old style
|
|
794 |
# call (pre autoconf-2.50), which is being phased out. PACKAGE
|
|
795 |
# and VERSION should now be passed to AC_INIT and removed from
|
|
796 |
# the call to AM_INIT_AUTOMAKE.
|
|
797 |
# We support both call styles for the transition. After
|
|
798 |
# the next Automake release, Autoconf can make the AC_INIT
|
|
799 |
# arguments mandatory, and then we can depend on a new Autoconf
|
|
800 |
# release and drop the old call support.
|
|
801 |
AC_DEFUN([AM_INIT_AUTOMAKE],
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
802 |
[AC_PREREQ([2.62])dnl
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
803 |
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
804 |
dnl the ones we care about.
|
|
805 |
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
|
806 |
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
|
807 |
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
808 |
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
809 |
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
|
810 |
# is not polluted with repeated "-I."
|
|
811 |
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
|
812 |
# test to see if srcdir already configured
|
|
813 |
if test -f $srcdir/config.status; then
|
|
814 |
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
|
815 |
fi
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
816 |
fi
|
817 |
||
818 |
# test whether we have cygpath
|
|
819 |
if test -z "$CYGPATH_W"; then
|
|
820 |
if (cygpath --version) >/dev/null 2>/dev/null; then
|
|
821 |
CYGPATH_W='cygpath -w'
|
|
822 |
else
|
|
823 |
CYGPATH_W=echo
|
|
824 |
fi
|
|
825 |
fi
|
|
826 |
AC_SUBST([CYGPATH_W])
|
|
827 |
||
828 |
# Define the identity of the package.
|
|
829 |
dnl Distinguish between old-style and new-style calls.
|
|
830 |
m4_ifval([$2],
|
|
831 |
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
|
832 |
AC_SUBST([PACKAGE], [$1])dnl
|
|
833 |
AC_SUBST([VERSION], [$2])],
|
|
834 |
[_AM_SET_OPTIONS([$1])dnl
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
835 |
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
836 |
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
|
837 |
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
838 |
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
839 |
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
|
840 |
||
841 |
_AM_IF_OPTION([no-define],,
|
|
842 |
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
|
843 |
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
|
|
844 |
||
845 |
# Some tools Automake needs.
|
|
846 |
AC_REQUIRE([AM_SANITY_CHECK])dnl
|
|
847 |
AC_REQUIRE([AC_ARG_PROGRAM])dnl
|
|
848 |
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
|
|
849 |
AM_MISSING_PROG(AUTOCONF, autoconf)
|
|
850 |
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
|
|
851 |
AM_MISSING_PROG(AUTOHEADER, autoheader)
|
|
852 |
AM_MISSING_PROG(MAKEINFO, makeinfo)
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
853 |
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
854 |
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
855 |
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
856 |
# We need awk for the "check" target. The system "awk" is bad on
|
|
857 |
# some platforms.
|
|
858 |
AC_REQUIRE([AC_PROG_AWK])dnl
|
|
859 |
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|
860 |
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
861 |
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
862 |
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
863 |
[_AM_PROG_TAR([v7])])])
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
864 |
_AM_IF_OPTION([no-dependencies],,
|
865 |
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
866 |
[_AM_DEPENDENCIES(CC)],
|
867 |
[define([AC_PROG_CC],
|
|
868 |
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
869 |
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
870 |
[_AM_DEPENDENCIES(CXX)],
|
871 |
[define([AC_PROG_CXX],
|
|
872 |
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
873 |
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
874 |
[_AM_DEPENDENCIES(OBJC)],
|
875 |
[define([AC_PROG_OBJC],
|
|
876 |
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
|
877 |
])
|
|
878 |
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
|
|
879 |
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
|
|
880 |
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
|
|
881 |
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
|
|
882 |
AC_CONFIG_COMMANDS_PRE(dnl
|
|
883 |
[m4_provide_if([_AM_COMPILER_EXEEXT],
|
|
884 |
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
|
|
885 |
])
|
|
886 |
||
887 |
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
|
|
888 |
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
|
|
889 |
dnl mangled by Autoconf and run in a shell conditional statement.
|
|
890 |
m4_define([_AC_COMPILER_EXEEXT],
|
|
891 |
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
892 |
|
893 |
||
894 |
# When config.status generates a header, we must update the stamp-h file.
|
|
895 |
# This file resides in the same directory as the config header
|
|
896 |
# that is generated. The stamp files are numbered to have different names.
|
|
897 |
||
898 |
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
|
899 |
# loop where config.status creates the headers, so we can generate
|
|
900 |
# our stamp files there.
|
|
901 |
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
|
902 |
[# Compute $1's index in $config_headers.
|
|
152
by Evan Dandrea, Evan Dandrea, Colin Watson
[ Evan Dandrea ] |
903 |
_am_arg=$1
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
904 |
_am_stamp_count=1
|
905 |
for _am_header in $config_headers :; do
|
|
906 |
case $_am_header in
|
|
152
by Evan Dandrea, Evan Dandrea, Colin Watson
[ Evan Dandrea ] |
907 |
$_am_arg | $_am_arg:* )
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
908 |
break ;;
|
909 |
* )
|
|
910 |
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
|
911 |
esac
|
|
912 |
done
|
|
152
by Evan Dandrea, Evan Dandrea, Colin Watson
[ Evan Dandrea ] |
913 |
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
914 |
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
915 |
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
916 |
#
|
917 |
# This file is free software; the Free Software Foundation
|
|
918 |
# gives unlimited permission to copy and/or distribute it,
|
|
919 |
# with or without modifications, as long as this notice is preserved.
|
|
920 |
||
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
921 |
# AM_PROG_INSTALL_SH
|
922 |
# ------------------
|
|
923 |
# Define $install_sh.
|
|
924 |
AC_DEFUN([AM_PROG_INSTALL_SH],
|
|
925 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
926 |
if test x"${install_sh}" != xset; then
|
927 |
case $am_aux_dir in
|
|
928 |
*\ * | *\ *)
|
|
929 |
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
|
|
930 |
*)
|
|
931 |
install_sh="\${SHELL} $am_aux_dir/install-sh"
|
|
932 |
esac
|
|
933 |
fi
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
934 |
AC_SUBST(install_sh)])
|
935 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
936 |
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
937 |
#
|
|
938 |
# This file is free software; the Free Software Foundation
|
|
939 |
# gives unlimited permission to copy and/or distribute it,
|
|
940 |
# with or without modifications, as long as this notice is preserved.
|
|
941 |
||
942 |
# serial 2
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
943 |
|
944 |
# Check whether the underlying file-system supports filenames
|
|
945 |
# with a leading dot. For instance MS-DOS doesn't.
|
|
946 |
AC_DEFUN([AM_SET_LEADING_DOT],
|
|
947 |
[rm -rf .tst 2>/dev/null
|
|
948 |
mkdir .tst 2>/dev/null
|
|
949 |
if test -d .tst; then
|
|
950 |
am__leading_dot=.
|
|
951 |
else
|
|
952 |
am__leading_dot=_
|
|
953 |
fi
|
|
954 |
rmdir .tst 2>/dev/null
|
|
955 |
AC_SUBST([am__leading_dot])])
|
|
956 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
957 |
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
958 |
# From Jim Meyering
|
959 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
960 |
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
961 |
# Free Software Foundation, Inc.
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
962 |
#
|
963 |
# This file is free software; the Free Software Foundation
|
|
964 |
# gives unlimited permission to copy and/or distribute it,
|
|
965 |
# with or without modifications, as long as this notice is preserved.
|
|
966 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
967 |
# serial 5
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
968 |
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
969 |
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
970 |
# ----------------------------------
|
|
971 |
# Control maintainer-specific portions of Makefiles.
|
|
972 |
# Default is to disable them, unless `enable' is passed literally.
|
|
973 |
# For symmetry, `disable' may be passed as well. Anyway, the user
|
|
974 |
# can override the default with the --enable/--disable switch.
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
975 |
AC_DEFUN([AM_MAINTAINER_MODE],
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
976 |
[m4_case(m4_default([$1], [disable]),
|
977 |
[enable], [m4_define([am_maintainer_other], [disable])],
|
|
978 |
[disable], [m4_define([am_maintainer_other], [enable])],
|
|
979 |
[m4_define([am_maintainer_other], [enable])
|
|
980 |
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
|
981 |
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
|
|
982 |
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
|
983 |
AC_ARG_ENABLE([maintainer-mode],
|
|
984 |
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
985 |
(and sometimes confusing) to the casual installer],
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
986 |
[USE_MAINTAINER_MODE=$enableval],
|
987 |
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
988 |
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
989 |
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
990 |
MAINT=$MAINTAINER_MODE_TRUE
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
991 |
AC_SUBST([MAINT])dnl
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
992 |
]
|
993 |
)
|
|
994 |
||
995 |
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
|
996 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
997 |
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
998 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
999 |
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1000 |
#
|
1001 |
# This file is free software; the Free Software Foundation
|
|
1002 |
# gives unlimited permission to copy and/or distribute it,
|
|
1003 |
# with or without modifications, as long as this notice is preserved.
|
|
1004 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1005 |
# serial 4
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1006 |
|
1007 |
# AM_MAKE_INCLUDE()
|
|
1008 |
# -----------------
|
|
1009 |
# Check to see how make treats includes.
|
|
1010 |
AC_DEFUN([AM_MAKE_INCLUDE],
|
|
1011 |
[am_make=${MAKE-make}
|
|
1012 |
cat > confinc << 'END'
|
|
1013 |
am__doit:
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1014 |
@echo this is the am__doit target
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1015 |
.PHONY: am__doit
|
1016 |
END
|
|
1017 |
# If we don't find an include directive, just comment out the code.
|
|
1018 |
AC_MSG_CHECKING([for style of include used by $am_make])
|
|
1019 |
am__include="#"
|
|
1020 |
am__quote=
|
|
1021 |
_am_result=none
|
|
1022 |
# First try GNU make style include.
|
|
1023 |
echo "include confinc" > confmf
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1024 |
# Ignore all kinds of additional output from `make'.
|
1025 |
case `$am_make -s -f confmf 2> /dev/null` in #(
|
|
1026 |
*the\ am__doit\ target*)
|
|
1027 |
am__include=include
|
|
1028 |
am__quote=
|
|
1029 |
_am_result=GNU
|
|
1030 |
;;
|
|
1031 |
esac
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1032 |
# Now try BSD make style include.
|
1033 |
if test "$am__include" = "#"; then
|
|
1034 |
echo '.include "confinc"' > confmf
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1035 |
case `$am_make -s -f confmf 2> /dev/null` in #(
|
1036 |
*the\ am__doit\ target*)
|
|
1037 |
am__include=.include
|
|
1038 |
am__quote="\""
|
|
1039 |
_am_result=BSD
|
|
1040 |
;;
|
|
1041 |
esac
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1042 |
fi
|
1043 |
AC_SUBST([am__include])
|
|
1044 |
AC_SUBST([am__quote])
|
|
1045 |
AC_MSG_RESULT([$_am_result])
|
|
1046 |
rm -f confinc confmf
|
|
1047 |
])
|
|
1048 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1049 |
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
1050 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1051 |
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1052 |
# Free Software Foundation, Inc.
|
1053 |
#
|
|
1054 |
# This file is free software; the Free Software Foundation
|
|
1055 |
# gives unlimited permission to copy and/or distribute it,
|
|
1056 |
# with or without modifications, as long as this notice is preserved.
|
|
1057 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1058 |
# serial 6
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1059 |
|
1060 |
# AM_MISSING_PROG(NAME, PROGRAM)
|
|
1061 |
# ------------------------------
|
|
1062 |
AC_DEFUN([AM_MISSING_PROG],
|
|
1063 |
[AC_REQUIRE([AM_MISSING_HAS_RUN])
|
|
1064 |
$1=${$1-"${am_missing_run}$2"}
|
|
1065 |
AC_SUBST($1)])
|
|
1066 |
||
1067 |
||
1068 |
# AM_MISSING_HAS_RUN
|
|
1069 |
# ------------------
|
|
1070 |
# Define MISSING if not defined so far and test if it supports --run.
|
|
1071 |
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
|
1072 |
AC_DEFUN([AM_MISSING_HAS_RUN],
|
|
1073 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1074 |
AC_REQUIRE_AUX_FILE([missing])dnl
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1075 |
if test x"${MISSING+set}" != xset; then
|
1076 |
case $am_aux_dir in
|
|
1077 |
*\ * | *\ *)
|
|
1078 |
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
|
|
1079 |
*)
|
|
1080 |
MISSING="\${SHELL} $am_aux_dir/missing" ;;
|
|
1081 |
esac
|
|
1082 |
fi
|
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1083 |
# Use eval to expand $SHELL
|
1084 |
if eval "$MISSING --run true"; then
|
|
1085 |
am_missing_run="$MISSING --run "
|
|
1086 |
else
|
|
1087 |
am_missing_run=
|
|
1088 |
AC_MSG_WARN([`missing' script is too old or missing])
|
|
1089 |
fi
|
|
1090 |
])
|
|
1091 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1092 |
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
1093 |
#
|
|
1094 |
# This file is free software; the Free Software Foundation
|
|
1095 |
# gives unlimited permission to copy and/or distribute it,
|
|
1096 |
# with or without modifications, as long as this notice is preserved.
|
|
1097 |
||
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1098 |
# AM_PROG_MKDIR_P
|
1099 |
# ---------------
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1100 |
# Check for `mkdir -p'.
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1101 |
AC_DEFUN([AM_PROG_MKDIR_P],
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1102 |
[AC_PREREQ([2.60])dnl
|
1103 |
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
|
1104 |
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
|
1105 |
dnl while keeping a definition of mkdir_p for backward compatibility.
|
|
1106 |
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
|
1107 |
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
|
1108 |
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
|
1109 |
dnl adjustment using top_builddir (which is defined more often than
|
|
1110 |
dnl MKDIR_P).
|
|
1111 |
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
|
1112 |
case $mkdir_p in
|
|
1113 |
[[\\/$]]* | ?:[[\\/]]*) ;;
|
|
1114 |
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; |
|
1115 |
esac
|
|
1116 |
]) |
|
1117 |
||
1118 |
# Helper functions for option handling. -*- Autoconf -*- |
|
1119 |
||
222
by Colin Watson
* Refactor architecture/subarchitecture detection slightly. |
1120 |
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. |
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1121 |
#
|
1122 |
# This file is free software; the Free Software Foundation |
|
1123 |
# gives unlimited permission to copy and/or distribute it, |
|
1124 |
# with or without modifications, as long as this notice is preserved. |
|
1125 |
||
222
by Colin Watson
* Refactor architecture/subarchitecture detection slightly. |
1126 |
# serial 4 |
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1127 |
|
1128 |
# _AM_MANGLE_OPTION(NAME) |
|
1129 |
# ----------------------- |
|
1130 |
AC_DEFUN([_AM_MANGLE_OPTION], |
|
1131 |
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
|
1132 |
||
1133 |
# _AM_SET_OPTION(NAME) |
|
1134 |
# ------------------------------ |
|
1135 |
# Set option NAME. Presently that only means defining a flag for this option. |
|
1136 |
AC_DEFUN([_AM_SET_OPTION], |
|
1137 |
[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
|
1138 |
||
1139 |
# _AM_SET_OPTIONS(OPTIONS) |
|
1140 |
# ---------------------------------- |
|
1141 |
# OPTIONS is a space-separated list of Automake options. |
|
1142 |
AC_DEFUN([_AM_SET_OPTIONS], |
|
222
by Colin Watson
* Refactor architecture/subarchitecture detection slightly. |
1143 |
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1144 |
|
1145 |
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
|
1146 |
# ------------------------------------------- |
|
1147 |
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
|
1148 |
AC_DEFUN([_AM_IF_OPTION], |
|
1149 |
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
|
1150 |
||
314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
1151 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 |
1152 |
# Free Software Foundation, Inc. |
|
1153 |
#
|
|
1154 |
# This file is free software; the Free Software Foundation |
|
1155 |
# gives unlimited permission to copy and/or distribute it, |
|
1156 |
# with or without modifications, as long as this notice is preserved. |
|
1157 |
||
1158 |
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
|
1159 |
# --------------------------------------------------------------------------- |
|
1160 |
# Adds support for distributing Python modules and packages. To |
|
1161 |
# install modules, copy them to $(pythondir), using the python_PYTHON |
|
1162 |
# automake variable. To install a package with the same name as the |
|
1163 |
# automake package, install to $(pkgpythondir), or use the |
|
1164 |
# pkgpython_PYTHON automake variable. |
|
1165 |
#
|
|
1166 |
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as |
|
1167 |
# locations to install python extension modules (shared libraries). |
|
1168 |
# Another macro is required to find the appropriate flags to compile |
|
1169 |
# extension modules. |
|
1170 |
#
|
|
1171 |
# If your package is configured with a different prefix to python, |
|
1172 |
# users will have to add the install directory to the PYTHONPATH |
|
1173 |
# environment variable, or create a .pth file (see the python |
|
1174 |
# documentation for details). |
|
1175 |
#
|
|
1176 |
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will |
|
1177 |
# cause an error if the version of python installed on the system |
|
1178 |
# doesn't meet the requirement. MINIMUM-VERSION should consist of |
|
1179 |
# numbers and dots only.
|
|
1180 |
AC_DEFUN([AM_PATH_PYTHON],
|
|
1181 |
[
|
|
1182 |
dnl Find a Python interpreter. Python versions prior to 2.0 are not
|
|
1183 |
dnl supported. (2.0 was released on October 16, 2000).
|
|
1184 |
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
|
|
1185 |
[python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
|
|
1186 |
python2.1 python2.0])
|
|
1187 |
||
1188 |
m4_if([$1],[],[
|
|
1189 |
dnl No version check is needed.
|
|
1190 |
# Find any Python interpreter.
|
|
1191 |
if test -z "$PYTHON"; then
|
|
1192 |
AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
|
|
1193 |
fi
|
|
1194 |
am_display_PYTHON=python
|
|
1195 |
], [
|
|
1196 |
dnl A version check is needed.
|
|
1197 |
if test -n "$PYTHON"; then
|
|
1198 |
# If the user set $PYTHON, use it and don't search something else. |
|
1199 |
AC_MSG_CHECKING([whether $PYTHON version >= $1]) |
|
1200 |
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], |
|
1201 |
[AC_MSG_RESULT(yes)], |
|
1202 |
[AC_MSG_ERROR(too old)]) |
|
1203 |
am_display_PYTHON=$PYTHON |
|
1204 |
else |
|
1205 |
# Otherwise, try each interpreter until we find one that satisfies |
|
1206 |
# VERSION. |
|
1207 |
AC_CACHE_CHECK([for a Python interpreter with version >= $1], |
|
1208 |
[am_cv_pathless_PYTHON],[ |
|
1209 |
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
|
|
1210 |
test "$am_cv_pathless_PYTHON" = none && break
|
|
1211 |
AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) |
|
1212 |
done]) |
|
1213 |
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. |
|
1214 |
if test "$am_cv_pathless_PYTHON" = none; then |
|
1215 |
PYTHON=: |
|
1216 |
else |
|
1217 |
AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) |
|
1218 |
fi |
|
1219 |
am_display_PYTHON=$am_cv_pathless_PYTHON |
|
1220 |
fi |
|
1221 |
]) |
|
1222 |
||
1223 |
if test "$PYTHON" = :; then |
|
1224 |
dnl Run any user-specified action, or abort. |
|
1225 |
m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) |
|
1226 |
else |
|
1227 |
||
1228 |
dnl Query Python for its version number. Getting [:3] seems to be |
|
1229 |
dnl the best way to do this; it's what "site.py" does in the standard |
|
1230 |
dnl library.
|
|
1231 |
||
1232 |
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
|
|
1233 |
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
|
|
1234 |
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
|
|
1235 |
||
1236 |
dnl Use the values of $prefix and $exec_prefix for the corresponding
|
|
1237 |
dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
|
|
1238 |
dnl distinct variables so they can be overridden if need be. However,
|
|
1239 |
dnl general consensus is that you shouldn't need this ability. |
|
1240 |
||
1241 |
AC_SUBST([PYTHON_PREFIX], ['${prefix}']) |
|
1242 |
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) |
|
1243 |
||
1244 |
dnl At times (like when building shared libraries) you may want |
|
1245 |
dnl to know which OS platform Python thinks this is. |
|
1246 |
||
1247 |
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], |
|
1248 |
[am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) |
|
1249 |
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) |
|
1250 |
||
1251 |
||
1252 |
dnl Set up 4 directories: |
|
1253 |
||
1254 |
dnl pythondir -- where to install python scripts. This is the |
|
1255 |
dnl site-packages directory, not the python standard library |
|
1256 |
dnl directory like in previous automake betas. This behavior |
|
1257 |
dnl is more consistent with lispdir.m4 for example. |
|
1258 |
dnl Query distutils for this directory. distutils does not exist in |
|
1259 |
dnl Python 1.5, so we fall back to the hardcoded directory if it |
|
1260 |
dnl doesn't work. |
|
1261 |
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
|
|
1262 |
[am_cv_python_pythondir],
|
|
1263 |
[if test "x$prefix" = xNONE
|
|
1264 |
then
|
|
1265 |
am_py_prefix=$ac_default_prefix
|
|
1266 |
else
|
|
1267 |
am_py_prefix=$prefix
|
|
1268 |
fi
|
|
1269 |
am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || |
|
1270 |
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
|
|
1271 |
case $am_cv_python_pythondir in
|
|
1272 |
$am_py_prefix*)
|
|
1273 |
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` |
|
1274 |
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
|
|
1275 |
;;
|
|
1276 |
*)
|
|
1277 |
case $am_py_prefix in
|
|
1278 |
/usr|/System*) ;;
|
|
1279 |
*)
|
|
1280 |
am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
|
|
1281 |
;;
|
|
1282 |
esac
|
|
1283 |
;;
|
|
1284 |
esac
|
|
1285 |
])
|
|
1286 |
AC_SUBST([pythondir], [$am_cv_python_pythondir])
|
|
1287 |
||
1288 |
dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
|
|
1289 |
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
|
|
1290 |
dnl more consistent with the rest of automake.
|
|
1291 |
||
1292 |
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
|
|
1293 |
||
1294 |
dnl pyexecdir -- directory for installing python extension modules
|
|
1295 |
dnl (shared libraries)
|
|
1296 |
dnl Query distutils for this directory. distutils does not exist in
|
|
1297 |
dnl Python 1.5, so we fall back to the hardcoded directory if it
|
|
1298 |
dnl doesn't work. |
|
1299 |
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], |
|
1300 |
[am_cv_python_pyexecdir], |
|
1301 |
[if test "x$exec_prefix" = xNONE |
|
1302 |
then
|
|
1303 |
am_py_exec_prefix=$am_py_prefix
|
|
1304 |
else
|
|
1305 |
am_py_exec_prefix=$exec_prefix
|
|
1306 |
fi
|
|
1307 |
am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
|
|
1308 |
echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
|
|
1309 |
case $am_cv_python_pyexecdir in
|
|
1310 |
$am_py_exec_prefix*)
|
|
1311 |
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
|
|
1312 |
am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
|
|
1313 |
;;
|
|
1314 |
*)
|
|
1315 |
case $am_py_exec_prefix in
|
|
1316 |
/usr|/System*) ;;
|
|
1317 |
*)
|
|
1318 |
am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
|
|
1319 |
;;
|
|
1320 |
esac
|
|
1321 |
;;
|
|
1322 |
esac
|
|
1323 |
]) |
|
1324 |
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) |
|
1325 |
||
1326 |
dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) |
|
1327 |
||
1328 |
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) |
|
1329 |
||
1330 |
dnl Run any user-specified action. |
|
1331 |
$2 |
|
1332 |
fi |
|
1333 |
||
1334 |
]) |
|
1335 |
||
1336 |
||
1337 |
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
|
1338 |
# --------------------------------------------------------------------------- |
|
1339 |
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. |
|
1340 |
# Run ACTION-IF-FALSE otherwise. |
|
1341 |
# This test uses sys.hexversion instead of the string equivalent (first |
|
1342 |
# word of sys.version), in order to cope with versions such as 2.2c1. |
|
1343 |
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). |
|
1344 |
AC_DEFUN([AM_PYTHON_CHECK_VERSION], |
|
1345 |
[prog="import sys |
|
1346 |
# split strings by '.' and convert to numeric. Append some zeros
|
|
1347 |
# because we need at least 4 digits for the hex conversion.
|
|
1348 |
# map returns an iterator in Python 3.0 and a list in 2.x
|
|
1349 |
minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] |
|
1350 |
minverhex = 0 |
|
1351 |
# xrange is not present in Python 3.0 and range returns an iterator |
|
1352 |
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] |
|
1353 |
sys.exit(sys.hexversion < minverhex)" |
|
1354 |
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) |
|
1355 |
||
1356 |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
|
1357 |
#
|
|
1358 |
# This file is free software; the Free Software Foundation
|
|
1359 |
# gives unlimited permission to copy and/or distribute it,
|
|
1360 |
# with or without modifications, as long as this notice is preserved.
|
|
1361 |
||
1362 |
# AM_RUN_LOG(COMMAND)
|
|
1363 |
# -------------------
|
|
1364 |
# Run COMMAND, save the exit status in ac_status, and log it.
|
|
1365 |
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
|
|
1366 |
AC_DEFUN([AM_RUN_LOG],
|
|
1367 |
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD |
|
1368 |
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
|
1369 |
ac_status=$?
|
|
1370 |
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
|
1371 |
(exit $ac_status); }])
|
|
1372 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1373 |
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
1374 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1375 |
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1376 |
# Free Software Foundation, Inc.
|
1377 |
#
|
|
1378 |
# This file is free software; the Free Software Foundation
|
|
1379 |
# gives unlimited permission to copy and/or distribute it,
|
|
1380 |
# with or without modifications, as long as this notice is preserved.
|
|
1381 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1382 |
# serial 5
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1383 |
|
1384 |
# AM_SANITY_CHECK
|
|
1385 |
# ---------------
|
|
1386 |
AC_DEFUN([AM_SANITY_CHECK],
|
|
1387 |
[AC_MSG_CHECKING([whether build environment is sane])
|
|
1388 |
# Just in case
|
|
1389 |
sleep 1
|
|
1390 |
echo timestamp > conftest.file
|
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1391 |
# Reject unsafe characters in $srcdir or the absolute working directory
|
1392 |
# name. Accept space and tab only in the latter.
|
|
1393 |
am_lf='
|
|
1394 |
'
|
|
1395 |
case `pwd` in
|
|
1396 |
*[[\\\"\#\$\&\'\`$am_lf]]*) |
|
1397 |
AC_MSG_ERROR([unsafe absolute working directory name]);;
|
|
1398 |
esac
|
|
1399 |
case $srcdir in
|
|
1400 |
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
|
1401 |
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; |
|
1402 |
esac
|
|
1403 |
||
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1404 |
# Do `set' in a subshell so we don't clobber the current shell's |
1405 |
# arguments. Must try -L first in case configure is actually a
|
|
1406 |
# symlink; some systems play weird games with the mod time of symlinks
|
|
1407 |
# (eg FreeBSD returns the mod time of the symlink's containing |
|
1408 |
# directory). |
|
1409 |
if ( |
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1410 |
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1411 |
if test "$[*]" = "X"; then |
1412 |
# -L didn't work. |
|
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1413 |
set X `ls -t "$srcdir/configure" conftest.file`
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1414 |
fi
|
1415 |
rm -f conftest.file
|
|
1416 |
if test "$[*]" != "X $srcdir/configure conftest.file" \
|
|
1417 |
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
|
|
1418 |
||
1419 |
# If neither matched, then we have a broken ls. This can happen
|
|
1420 |
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
|
1421 |
# broken ls alias from the environment. This has actually
|
|
1422 |
# happened. Such a system could not be considered "sane".
|
|
1423 |
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
|
1424 |
alias in your environment])
|
|
1425 |
fi
|
|
1426 |
||
1427 |
test "$[2]" = conftest.file
|
|
1428 |
)
|
|
1429 |
then
|
|
1430 |
# Ok.
|
|
1431 |
:
|
|
1432 |
else
|
|
1433 |
AC_MSG_ERROR([newly created file is older than distributed files!
|
|
1434 |
Check your system clock])
|
|
1435 |
fi
|
|
1436 |
AC_MSG_RESULT(yes)])
|
|
1437 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1438 |
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
1439 |
#
|
|
1440 |
# This file is free software; the Free Software Foundation
|
|
1441 |
# gives unlimited permission to copy and/or distribute it,
|
|
1442 |
# with or without modifications, as long as this notice is preserved.
|
|
1443 |
||
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1444 |
# AM_PROG_INSTALL_STRIP
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1445 |
# ---------------------
|
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1446 |
# One issue with vendor `install' (even GNU) is that you can't |
1447 |
# specify the program used to strip binaries. This is especially
|
|
1448 |
# annoying in cross-compiling environments, where the build's strip |
|
1449 |
# is unlikely to handle the host's binaries. |
|
1450 |
# Fortunately install-sh will honor a STRIPPROG variable, so we
|
|
1451 |
# always use install-sh in `make install-strip', and initialize |
|
1452 |
# STRIPPROG with the value of the STRIP variable (set by the user). |
|
1453 |
AC_DEFUN([AM_PROG_INSTALL_STRIP], |
|
1454 |
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
|
1455 |
# Installed binaries are usually stripped using `strip' when the user |
|
1456 |
# run `make install-strip'. However `strip' might not be the right |
|
1457 |
# tool to use in cross-compilation environments, therefore Automake
|
|
1458 |
# will honor the `STRIP' environment variable to overrule this program. |
|
1459 |
dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
|
1460 |
if test "$cross_compiling" != no; then |
|
1461 |
AC_CHECK_TOOL([STRIP], [strip], :) |
|
1462 |
fi
|
|
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1463 |
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
1
by Colin Watson
Rename from espresso to ubiquity, to better suggest an association with |
1464 |
AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1465 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1466 |
# Copyright (C) 2006, 2008 Free Software Foundation, Inc. |
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1467 |
#
|
1468 |
# This file is free software; the Free Software Foundation |
|
1469 |
# gives unlimited permission to copy and/or distribute it, |
|
1470 |
# with or without modifications, as long as this notice is preserved. |
|
1471 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1472 |
# serial 2 |
1473 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1474 |
# _AM_SUBST_NOTMAKE(VARIABLE) |
1475 |
# --------------------------- |
|
152
by Evan Dandrea, Evan Dandrea, Colin Watson
[ Evan Dandrea ] |
1476 |
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1477 |
# This macro is traced by Automake. |
1478 |
AC_DEFUN([_AM_SUBST_NOTMAKE]) |
|
1479 |
||
256
by Evan Dandrea, Colin Watson, Roman Shtylman, Evan Dandrea, Michael Terry
[ Colin Watson ] |
1480 |
# AM_SUBST_NOTMAKE(VARIABLE) |
1481 |
# --------------------------- |
|
1482 |
# Public sister of _AM_SUBST_NOTMAKE. |
|
1483 |
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
|
1484 |
||
79
by Colin Watson
* apt-install only attempts to install packages not already installed, |
1485 |
# Check how to create a tarball. -*- Autoconf -*- |
1486 |
||
1487 |
# Copyright (C) 2004, 2005 Free Software Foundation, Inc. |
|
1488 |
#
|
|
1489 |
# This file is free software; the Free Software Foundation |
|
1490 |
# gives unlimited permission to copy and/or distribute it, |
|
1491 |
# with or without modifications, as long as this notice is preserved. |
|
1492 |
||
1493 |
# serial 2 |
|
1494 |
||
1495 |
# _AM_PROG_TAR(FORMAT) |
|
1496 |
# -------------------- |
|
1497 |
# Check how to create a tarball in format FORMAT. |
|
1498 |
# FORMAT should be one of `v7', `ustar', or `pax'. |
|
1499 |
#
|
|
1500 |
# Substitute a variable $(am__tar) that is a command
|
|
1501 |
# writing to stdout a FORMAT-tarball containing the directory
|
|
1502 |
# $tardir.
|
|
1503 |
# tardir=directory && $(am__tar) > result.tar
|
|
1504 |
#
|
|
1505 |
# Substitute a variable $(am__untar) that extract such
|
|
1506 |
# a tarball read from stdin.
|
|
1507 |
# $(am__untar) < result.tar
|
|
1508 |
AC_DEFUN([_AM_PROG_TAR],
|
|
1509 |
[# Always define AMTAR for backward compatibility.
|
|
1510 |
AM_MISSING_PROG([AMTAR], [tar])
|
|
1511 |
m4_if([$1], [v7],
|
|
1512 |
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], |
|
1513 |
[m4_case([$1], [ustar],, [pax],,
|
|
1514 |
[m4_fatal([Unknown tar format])])
|
|
1515 |
AC_MSG_CHECKING([how to create a $1 tar archive])
|
|
1516 |
# Loop over all known methods to create a tar archive until one works.
|
|
1517 |
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
|
1518 |
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
|
|
1519 |
# Do not fold the above two line into one, because Tru64 sh and
|
|
1520 |
# Solaris sh will not grok spaces in the rhs of `-'. |
|
1521 |
for _am_tool in $_am_tools |
|
1522 |
do
|
|
1523 |
case $_am_tool in |
|
1524 |
gnutar) |
|
1525 |
for _am_tar in tar gnutar gtar; |
|
1526 |
do |
|
1527 |
AM_RUN_LOG([$_am_tar --version]) && break |
|
1528 |
done |
|
1529 |
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
|
1530 |
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
|
1531 |
am__untar="$_am_tar -xf -" |
|
1532 |
;; |
|
1533 |
plaintar) |
|
1534 |
# Must skip GNU tar: if it does not support --format= it doesn't create |
|
1535 |
# ustar tarball either.
|
|
1536 |
(tar --version) >/dev/null 2>&1 && continue
|
|
1537 |
am__tar='tar chf - "$$tardir"' |
|
1538 |
am__tar_='tar chf - "$tardir"' |
|
1539 |
am__untar='tar xf -' |
|
1540 |
;;
|
|
1541 |
pax)
|
|
1542 |
am__tar='pax -L -x $1 -w "$$tardir"' |
|
1543 |
am__tar_='pax -L -x $1 -w "$tardir"' |
|
1544 |
am__untar='pax -r' |
|
1545 |
;;
|
|
1546 |
cpio)
|
|
1547 |
am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
|
1548 |
am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
|
1549 |
am__untar='cpio -i -H $1 -d' |
|
1550 |
;; |
|
1551 |
none) |
|
1552 |
am__tar=false |
|
1553 |
am__tar_=false |
|
1554 |
am__untar=false |
|
1555 |
;; |
|
1556 |
esac |
|
1557 |
||
1558 |
# If the value was cached, stop now. We just wanted to have am__tar |
|
1559 |
# and am__untar set. |
|
1560 |
test -n "${am_cv_prog_tar_$1}" && break |
|
1561 |
||
1562 |
# tar/untar a dummy directory, and stop if the command works |
|
1563 |
rm -rf conftest.dir |
|
1564 |
mkdir conftest.dir |
|
1565 |
echo GrepMe > conftest.dir/file |
|
1566 |
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
|
1567 |
rm -rf conftest.dir |
|
1568 |
if test -s conftest.tar; then |
|
1569 |
AM_RUN_LOG([$am__untar <conftest.tar]) |
|
1570 |
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
|
1571 |
fi |
|
1572 |
done
|
|
1573 |
rm -rf conftest.dir |
|
1574 |
||
1575 |
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
|
1576 |
AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
|
1577 |
AC_SUBST([am__tar]) |
|
1578 |
AC_SUBST([am__untar]) |
|
1579 |
]) # _AM_PROG_TAR |
|
1580 |
||
331.1.15
by Evan Dandrea, Mario Limonciello, Bilal Akhtar, Evan Dandrea
[ Mario Limonciello ] |
1581 |
m4_include([m4/am-check-python-headers.m4]) |
18
by Colin Watson, Colin Watson, Scott James Remnant
[ Colin Watson ] |
1582 |
m4_include([m4/gettext.m4]) |
1583 |
m4_include([m4/iconv.m4]) |
|
155
by Jonathan Riddell, Colin Watson, Evan Dandrea, Jonathan Riddell
[ Colin Watson ] |
1584 |
m4_include([m4/intlmacosx.m4]) |
193
by Evan Dandrea, Colin Watson, Evan Dandrea, Emmet Hikory
[ Colin Watson ] |
1585 |
m4_include([m4/intltool.m4]) |
18
by Colin Watson, Colin Watson, Scott James Remnant
[ Colin Watson ] |
1586 |
m4_include([m4/lib-ld.m4]) |
1587 |
m4_include([m4/lib-link.m4]) |
|
1588 |
m4_include([m4/lib-prefix.m4]) |
|
314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
1589 |
m4_include([m4/libtool.m4]) |
1590 |
m4_include([m4/ltoptions.m4]) |
|
1591 |
m4_include([m4/ltsugar.m4]) |
|
1592 |
m4_include([m4/ltversion.m4]) |
|
1593 |
m4_include([m4/lt~obsolete.m4]) |
|
18
by Colin Watson, Colin Watson, Scott James Remnant
[ Colin Watson ] |
1594 |
m4_include([m4/nls.m4]) |
1595 |
m4_include([m4/po.m4]) |
|
1596 |
m4_include([m4/progtest.m4]) |
|
314
by Colin Watson, Didier Roche, Evan Dandrea, Colin Watson
[ Didier Roche ] |
1597 |
m4_include([m4/ubiquity-python.m4]) |