1 |
# generated automatically by aclocal 1.8.5 -*- Autoconf -*- |
2 |
|
3 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
4 |
# Free Software Foundation, Inc. |
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 |
|
14 |
# Configure paths for SDL |
15 |
# Sam Lantinga 9/21/99 |
16 |
# stolen from Manish Singh |
17 |
# stolen back from Frank Belew |
18 |
# stolen from Manish Singh |
19 |
# Shamelessly stolen from Owen Taylor |
20 |
|
21 |
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) |
22 |
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS |
23 |
dnl |
24 |
AC_DEFUN([AM_PATH_SDL], |
25 |
[dnl |
26 |
dnl Get the cflags and libraries from the sdl-config script |
27 |
dnl |
28 |
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], |
29 |
sdl_prefix="$withval", sdl_prefix="") |
30 |
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)], |
31 |
sdl_exec_prefix="$withval", sdl_exec_prefix="") |
32 |
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], |
33 |
, enable_sdltest=yes) |
34 |
|
35 |
if test x$sdl_exec_prefix != x ; then |
36 |
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" |
37 |
if test x${SDL_CONFIG+set} != xset ; then |
38 |
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config |
39 |
fi |
40 |
fi |
41 |
if test x$sdl_prefix != x ; then |
42 |
sdl_args="$sdl_args --prefix=$sdl_prefix" |
43 |
if test x${SDL_CONFIG+set} != xset ; then |
44 |
SDL_CONFIG=$sdl_prefix/bin/sdl-config |
45 |
fi |
46 |
fi |
47 |
|
48 |
if test "x$prefix" != xNONE; then |
49 |
PATH="$prefix/bin:$prefix/usr/bin:$PATH" |
50 |
fi |
51 |
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) |
52 |
min_sdl_version=ifelse([$1], ,0.11.0,$1) |
53 |
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) |
54 |
no_sdl="" |
55 |
if test "$SDL_CONFIG" = "no" ; then |
56 |
no_sdl=yes |
57 |
else |
58 |
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` |
59 |
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` |
60 |
|
61 |
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ |
62 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
63 |
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ |
64 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
65 |
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ |
66 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
67 |
if test "x$enable_sdltest" = "xyes" ; then |
68 |
ac_save_CFLAGS="$CFLAGS" |
69 |
ac_save_CXXFLAGS="$CXXFLAGS" |
70 |
ac_save_LIBS="$LIBS" |
71 |
CFLAGS="$CFLAGS $SDL_CFLAGS" |
72 |
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" |
73 |
LIBS="$LIBS $SDL_LIBS" |
74 |
dnl |
75 |
dnl Now check if the installed SDL is sufficiently new. (Also sanity |
76 |
dnl checks the results of sdl-config to some extent |
77 |
dnl |
78 |
rm -f conf.sdltest |
79 |
AC_TRY_RUN([ |
80 |
#include <stdio.h> |
81 |
#include <stdlib.h> |
82 |
#include <string.h> |
83 |
#include "SDL.h" |
84 |
|
85 |
char* |
86 |
my_strdup (char *str) |
87 |
{ |
88 |
char *new_str; |
89 |
|
90 |
if (str) |
91 |
{ |
92 |
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); |
93 |
strcpy (new_str, str); |
94 |
} |
95 |
else |
96 |
new_str = NULL; |
97 |
|
98 |
return new_str; |
99 |
} |
100 |
|
101 |
int main (int argc, char *argv[]) |
102 |
{ |
103 |
int major, minor, micro; |
104 |
char *tmp_version; |
105 |
|
106 |
/* This hangs on some systems (?) |
107 |
system ("touch conf.sdltest"); |
108 |
*/ |
109 |
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } |
110 |
|
111 |
/* HP/UX 9 (%@#!) writes to sscanf strings */ |
112 |
tmp_version = my_strdup("$min_sdl_version"); |
113 |
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { |
114 |
printf("%s, bad version string\n", "$min_sdl_version"); |
115 |
exit(1); |
116 |
} |
117 |
|
118 |
if (($sdl_major_version > major) || |
119 |
(($sdl_major_version == major) && ($sdl_minor_version > minor)) || |
120 |
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro))) |
121 |
{ |
122 |
return 0; |
123 |
} |
124 |
else |
125 |
{ |
126 |
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version); |
127 |
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro); |
128 |
printf("*** best to upgrade to the required version.\n"); |
129 |
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n"); |
130 |
printf("*** to point to the correct copy of sdl-config, and remove the file\n"); |
131 |
printf("*** config.cache before re-running configure\n"); |
132 |
return 1; |
133 |
} |
134 |
} |
135 |
|
136 |
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
137 |
CFLAGS="$ac_save_CFLAGS" |
138 |
CXXFLAGS="$ac_save_CXXFLAGS" |
139 |
LIBS="$ac_save_LIBS" |
140 |
fi |
141 |
fi |
142 |
if test "x$no_sdl" = x ; then |
143 |
AC_MSG_RESULT(yes) |
144 |
ifelse([$2], , :, [$2]) |
145 |
else |
146 |
AC_MSG_RESULT(no) |
147 |
if test "$SDL_CONFIG" = "no" ; then |
148 |
echo "*** The sdl-config script installed by SDL could not be found" |
149 |
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" |
150 |
echo "*** your path, or set the SDL_CONFIG environment variable to the" |
151 |
echo "*** full path to sdl-config." |
152 |
else |
153 |
if test -f conf.sdltest ; then |
154 |
: |
155 |
else |
156 |
echo "*** Could not run SDL test program, checking why..." |
157 |
CFLAGS="$CFLAGS $SDL_CFLAGS" |
158 |
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" |
159 |
LIBS="$LIBS $SDL_LIBS" |
160 |
AC_TRY_LINK([ |
161 |
#include <stdio.h> |
162 |
#include "SDL.h" |
163 |
|
164 |
int main(int argc, char *argv[]) |
165 |
{ return 0; } |
166 |
#undef main |
167 |
#define main K_and_R_C_main |
168 |
], [ return 0; ], |
169 |
[ echo "*** The test program compiled, but did not run. This usually means" |
170 |
echo "*** that the run-time linker is not finding SDL or finding the wrong" |
171 |
echo "*** version of SDL. If it is not finding SDL, you'll need to set your" |
172 |
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
173 |
echo "*** to the installed location Also, make sure you have run ldconfig if that" |
174 |
echo "*** is required on your system" |
175 |
echo "***" |
176 |
echo "*** If you have an old version installed, it is best to remove it, although" |
177 |
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], |
178 |
[ echo "*** The test program failed to compile or link. See the file config.log for the" |
179 |
echo "*** exact error that occured. This usually means SDL was incorrectly installed" |
180 |
echo "*** or that you have moved SDL since it was installed. In the latter case, you" |
181 |
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) |
182 |
CFLAGS="$ac_save_CFLAGS" |
183 |
CXXFLAGS="$ac_save_CXXFLAGS" |
184 |
LIBS="$ac_save_LIBS" |
185 |
fi |
186 |
fi |
187 |
SDL_CFLAGS="" |
188 |
SDL_LIBS="" |
189 |
ifelse([$3], , :, [$3]) |
190 |
fi |
191 |
AC_SUBST(SDL_CFLAGS) |
192 |
AC_SUBST(SDL_LIBS) |
193 |
rm -f conf.sdltest |
194 |
]) |
195 |
|
196 |
# -*- Autoconf -*- |
197 |
# Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
198 |
# Generated from amversion.in; do not edit by hand. |
199 |
|
200 |
# This program is free software; you can redistribute it and/or modify |
201 |
# it under the terms of the GNU General Public License as published by |
202 |
# the Free Software Foundation; either version 2, or (at your option) |
203 |
# any later version. |
204 |
|
205 |
# This program is distributed in the hope that it will be useful, |
206 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
207 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
208 |
# GNU General Public License for more details. |
209 |
|
210 |
# You should have received a copy of the GNU General Public License |
211 |
# along with this program; if not, write to the Free Software |
212 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
213 |
|
214 |
# AM_AUTOMAKE_VERSION(VERSION) |
215 |
# ---------------------------- |
216 |
# Automake X.Y traces this macro to ensure aclocal.m4 has been |
217 |
# generated from the m4 files accompanying Automake X.Y. |
218 |
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) |
219 |
|
220 |
# AM_SET_CURRENT_AUTOMAKE_VERSION |
221 |
# ------------------------------- |
222 |
# Call AM_AUTOMAKE_VERSION so it can be traced. |
223 |
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
224 |
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
225 |
[AM_AUTOMAKE_VERSION([1.8.5])]) |
226 |
|
227 |
# Figure out how to run the assembler. -*- Autoconf -*- |
228 |
|
229 |
# serial 3 |
230 |
|
231 |
# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. |
232 |
|
233 |
# This program is free software; you can redistribute it and/or modify |
234 |
# it under the terms of the GNU General Public License as published by |
235 |
# the Free Software Foundation; either version 2, or (at your option) |
236 |
# any later version. |
237 |
|
238 |
# This program is distributed in the hope that it will be useful, |
239 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
240 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
241 |
# GNU General Public License for more details. |
242 |
|
243 |
# You should have received a copy of the GNU General Public License |
244 |
# along with this program; if not, write to the Free Software |
245 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
246 |
# 02111-1307, USA. |
247 |
|
248 |
# AM_PROG_AS |
249 |
# ---------- |
250 |
AC_DEFUN([AM_PROG_AS], |
251 |
[# By default we simply use the C compiler to build assembly code. |
252 |
AC_REQUIRE([AC_PROG_CC]) |
253 |
test "${CCAS+set}" = set || CCAS=$CC |
254 |
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS |
255 |
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) |
256 |
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) |
257 |
]) |
258 |
|
259 |
# AM_AUX_DIR_EXPAND |
260 |
|
261 |
# Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
262 |
|
263 |
# This program is free software; you can redistribute it and/or modify |
264 |
# it under the terms of the GNU General Public License as published by |
265 |
# the Free Software Foundation; either version 2, or (at your option) |
266 |
# any later version. |
267 |
|
268 |
# This program is distributed in the hope that it will be useful, |
269 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
270 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
271 |
# GNU General Public License for more details. |
272 |
|
273 |
# You should have received a copy of the GNU General Public License |
274 |
# along with this program; if not, write to the Free Software |
275 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
276 |
# 02111-1307, USA. |
277 |
|
278 |
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
279 |
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
280 |
# `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
281 |
# |
282 |
# Of course, Automake must honor this variable whenever it calls a |
283 |
# tool from the auxiliary directory. The problem is that $srcdir (and |
284 |
# therefore $ac_aux_dir as well) can be either absolute or relative, |
285 |
# depending on how configure is run. This is pretty annoying, since |
286 |
# it makes $ac_aux_dir quite unusable in subdirectories: in the top |
287 |
# source directory, any form will work fine, but in subdirectories a |
288 |
# relative path needs to be adjusted first. |
289 |
# |
290 |
# $ac_aux_dir/missing |
291 |
# fails when called from a subdirectory if $ac_aux_dir is relative |
292 |
# $top_srcdir/$ac_aux_dir/missing |
293 |
# fails if $ac_aux_dir is absolute, |
294 |
# fails when called from a subdirectory in a VPATH build with |
295 |
# a relative $ac_aux_dir |
296 |
# |
297 |
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
298 |
# are both prefixed by $srcdir. In an in-source build this is usually |
299 |
# harmless because $srcdir is `.', but things will broke when you |
300 |
# start a VPATH build or use an absolute $srcdir. |
301 |
# |
302 |
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
303 |
# iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
304 |
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
305 |
# and then we would define $MISSING as |
306 |
# MISSING="\${SHELL} $am_aux_dir/missing" |
307 |
# This will work as long as MISSING is not called from configure, because |
308 |
# unfortunately $(top_srcdir) has no meaning in configure. |
309 |
# However there are other variables, like CC, which are often used in |
310 |
# configure, and could therefore not use this "fixed" $ac_aux_dir. |
311 |
# |
312 |
# Another solution, used here, is to always expand $ac_aux_dir to an |
313 |
# absolute PATH. The drawback is that using absolute paths prevent a |
314 |
# configured tree to be moved without reconfiguration. |
315 |
|
316 |
AC_DEFUN([AM_AUX_DIR_EXPAND], |
317 |
[dnl Rely on autoconf to set up CDPATH properly. |
318 |
AC_PREREQ([2.50])dnl |
319 |
# expand $ac_aux_dir to an absolute path |
320 |
am_aux_dir=`cd $ac_aux_dir && pwd` |
321 |
]) |
322 |
|
323 |
# AM_CONDITIONAL -*- Autoconf -*- |
324 |
|
325 |
# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
326 |
|
327 |
# This program is free software; you can redistribute it and/or modify |
328 |
# it under the terms of the GNU General Public License as published by |
329 |
# the Free Software Foundation; either version 2, or (at your option) |
330 |
# any later version. |
331 |
|
332 |
# This program is distributed in the hope that it will be useful, |
333 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
334 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
335 |
# GNU General Public License for more details. |
336 |
|
337 |
# You should have received a copy of the GNU General Public License |
338 |
# along with this program; if not, write to the Free Software |
339 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
340 |
# 02111-1307, USA. |
341 |
|
342 |
# serial 6 |
343 |
|
344 |
# AM_CONDITIONAL(NAME, SHELL-CONDITION) |
345 |
# ------------------------------------- |
346 |
# Define a conditional. |
347 |
AC_DEFUN([AM_CONDITIONAL], |
348 |
[AC_PREREQ(2.52)dnl |
349 |
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
350 |
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
351 |
AC_SUBST([$1_TRUE]) |
352 |
AC_SUBST([$1_FALSE]) |
353 |
if $2; then |
354 |
$1_TRUE= |
355 |
$1_FALSE='#' |
356 |
else |
357 |
$1_TRUE='#' |
358 |
$1_FALSE= |
359 |
fi |
360 |
AC_CONFIG_COMMANDS_PRE( |
361 |
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
362 |
AC_MSG_ERROR([conditional "$1" was never defined. |
363 |
Usually this means the macro was only invoked conditionally.]) |
364 |
fi])]) |
365 |
|
366 |
# serial 7 -*- Autoconf -*- |
367 |
|
368 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 |
369 |
# Free Software Foundation, Inc. |
370 |
|
371 |
# This program is free software; you can redistribute it and/or modify |
372 |
# it under the terms of the GNU General Public License as published by |
373 |
# the Free Software Foundation; either version 2, or (at your option) |
374 |
# any later version. |
375 |
|
376 |
# This program is distributed in the hope that it will be useful, |
377 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
378 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
379 |
# GNU General Public License for more details. |
380 |
|
381 |
# You should have received a copy of the GNU General Public License |
382 |
# along with this program; if not, write to the Free Software |
383 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
384 |
# 02111-1307, USA. |
385 |
|
386 |
|
387 |
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
388 |
# written in clear, in which case automake, when reading aclocal.m4, |
389 |
# will think it sees a *use*, and therefore will trigger all it's |
390 |
# C support machinery. Also note that it means that autoscan, seeing |
391 |
# CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
392 |
|
393 |
|
394 |
|
395 |
# _AM_DEPENDENCIES(NAME) |
396 |
# ---------------------- |
397 |
# See how the compiler implements dependency checking. |
398 |
# NAME is "CC", "CXX", "GCJ", or "OBJC". |
399 |
# We try a few techniques and use that to set a single cache variable. |
400 |
# |
401 |
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
402 |
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
403 |
# dependency, and given that the user is not expected to run this macro, |
404 |
# just rely on AC_PROG_CC. |
405 |
AC_DEFUN([_AM_DEPENDENCIES], |
406 |
[AC_REQUIRE([AM_SET_DEPDIR])dnl |
407 |
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
408 |
AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
409 |
AC_REQUIRE([AM_DEP_TRACK])dnl |
410 |
|
411 |
ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
412 |
[$1], CXX, [depcc="$CXX" am_compiler_list=], |
413 |
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
414 |
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
415 |
[depcc="$$1" am_compiler_list=]) |
416 |
|
417 |
AC_CACHE_CHECK([dependency style of $depcc], |
418 |
[am_cv_$1_dependencies_compiler_type], |
419 |
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
420 |
# We make a subdir and do the tests there. Otherwise we can end up |
421 |
# making bogus files that we don't know about and never remove. For |
422 |
# instance it was reported that on HP-UX the gcc test will end up |
423 |
# making a dummy file named `D' -- because `-MD' means `put the output |
424 |
# in D'. |
425 |
mkdir conftest.dir |
426 |
# Copy depcomp to subdir because otherwise we won't find it if we're |
427 |
# using a relative directory. |
428 |
cp "$am_depcomp" conftest.dir |
429 |
cd conftest.dir |
430 |
# We will build objects and dependencies in a subdirectory because |
431 |
# it helps to detect inapplicable dependency modes. For instance |
432 |
# both Tru64's cc and ICC support -MD to output dependencies as a |
433 |
# side effect of compilation, but ICC will put the dependencies in |
434 |
# the current directory while Tru64 will put them in the object |
435 |
# directory. |
436 |
mkdir sub |
437 |
|
438 |
am_cv_$1_dependencies_compiler_type=none |
439 |
if test "$am_compiler_list" = ""; then |
440 |
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
441 |
fi |
442 |
for depmode in $am_compiler_list; do |
443 |
# Setup a source with many dependencies, because some compilers |
444 |
# like to wrap large dependency lists on column 80 (with \), and |
445 |
# we should not choose a depcomp mode which is confused by this. |
446 |
# |
447 |
# We need to recreate these files for each test, as the compiler may |
448 |
# overwrite some of them when testing with obscure command lines. |
449 |
# This happens at least with the AIX C compiler. |
450 |
: > sub/conftest.c |
451 |
for i in 1 2 3 4 5 6; do |
452 |
echo '#include "conftst'$i'.h"' >> sub/conftest.c |
453 |
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
454 |
# Solaris 8's {/usr,}/bin/sh. |
455 |
touch sub/conftst$i.h |
456 |
done |
457 |
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
458 |
|
459 |
case $depmode in |
460 |
nosideeffect) |
461 |
# after this tag, mechanisms are not by side-effect, so they'll |
462 |
# only be used when explicitly requested |
463 |
if test "x$enable_dependency_tracking" = xyes; then |
464 |
continue |
465 |
else |
466 |
break |
467 |
fi |
468 |
;; |
469 |
none) break ;; |
470 |
esac |
471 |
# We check with `-c' and `-o' for the sake of the "dashmstdout" |
472 |
# mode. It turns out that the SunPro C++ compiler does not properly |
473 |
# handle `-M -o', and we need to detect this. |
474 |
if depmode=$depmode \ |
475 |
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ |
476 |
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
477 |
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ |
478 |
>/dev/null 2>conftest.err && |
479 |
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
480 |
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && |
481 |
${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
482 |
# icc doesn't choke on unknown options, it will just issue warnings |
483 |
# or remarks (even with -Werror). So we grep stderr for any message |
484 |
# that says an option was ignored or not supported. |
485 |
# When given -MP, icc 7.0 and 7.1 complain thusly: |
486 |
# icc: Command line warning: ignoring option '-M'; no argument required |
487 |
# The diagnosis changed in icc 8.0: |
488 |
# icc: Command line remark: option '-MP' not supported |
489 |
if (grep 'ignoring option' conftest.err || |
490 |
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
491 |
am_cv_$1_dependencies_compiler_type=$depmode |
492 |
break |
493 |
fi |
494 |
fi |
495 |
done |
496 |
|
497 |
cd .. |
498 |
rm -rf conftest.dir |
499 |
else |
500 |
am_cv_$1_dependencies_compiler_type=none |
501 |
fi |
502 |
]) |
503 |
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
504 |
AM_CONDITIONAL([am__fastdep$1], [ |
505 |
test "x$enable_dependency_tracking" != xno \ |
506 |
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
507 |
]) |
508 |
|
509 |
|
510 |
# AM_SET_DEPDIR |
511 |
# ------------- |
512 |
# Choose a directory name for dependency files. |
513 |
# This macro is AC_REQUIREd in _AM_DEPENDENCIES |
514 |
AC_DEFUN([AM_SET_DEPDIR], |
515 |
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
516 |
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
517 |
]) |
518 |
|
519 |
|
520 |
# AM_DEP_TRACK |
521 |
# ------------ |
522 |
AC_DEFUN([AM_DEP_TRACK], |
523 |
[AC_ARG_ENABLE(dependency-tracking, |
524 |
[ --disable-dependency-tracking speeds up one-time build |
525 |
--enable-dependency-tracking do not reject slow dependency extractors]) |
526 |
if test "x$enable_dependency_tracking" != xno; then |
527 |
am_depcomp="$ac_aux_dir/depcomp" |
528 |
AMDEPBACKSLASH='\' |
529 |
fi |
530 |
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
531 |
AC_SUBST([AMDEPBACKSLASH]) |
532 |
]) |
533 |
|
534 |
# Generate code to set up dependency tracking. -*- Autoconf -*- |
535 |
|
536 |
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
537 |
|
538 |
# This program is free software; you can redistribute it and/or modify |
539 |
# it under the terms of the GNU General Public License as published by |
540 |
# the Free Software Foundation; either version 2, or (at your option) |
541 |
# any later version. |
542 |
|
543 |
# This program is distributed in the hope that it will be useful, |
544 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
545 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
546 |
# GNU General Public License for more details. |
547 |
|
548 |
# You should have received a copy of the GNU General Public License |
549 |
# along with this program; if not, write to the Free Software |
550 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
551 |
# 02111-1307, USA. |
552 |
|
553 |
#serial 2 |
554 |
|
555 |
# _AM_OUTPUT_DEPENDENCY_COMMANDS |
556 |
# ------------------------------ |
557 |
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
558 |
[for mf in $CONFIG_FILES; do |
559 |
# Strip MF so we end up with the name of the file. |
560 |
mf=`echo "$mf" | sed -e 's/:.*$//'` |
561 |
# Check whether this is an Automake generated Makefile or not. |
562 |
# We used to match only the files named `Makefile.in', but |
563 |
# some people rename them; so instead we look at the file content. |
564 |
# Grep'ing the first line is not enough: some people post-process |
565 |
# each Makefile.in and add a new line on top of each file to say so. |
566 |
# So let's grep whole file. |
567 |
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then |
568 |
dirpart=`AS_DIRNAME("$mf")` |
569 |
else |
570 |
continue |
571 |
fi |
572 |
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue |
573 |
# Extract the definition of DEP_FILES from the Makefile without |
574 |
# running `make'. |
575 |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
576 |
test -z "$DEPDIR" && continue |
577 |
# When using ansi2knr, U may be empty or an underscore; expand it |
578 |
U=`sed -n 's/^U = //p' < "$mf"` |
579 |
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" |
580 |
# We invoke sed twice because it is the simplest approach to |
581 |
# changing $(DEPDIR) to its actual value in the expansion. |
582 |
for file in `sed -n ' |
583 |
/^DEP_FILES = .*\\\\$/ { |
584 |
s/^DEP_FILES = // |
585 |
:loop |
586 |
s/\\\\$// |
587 |
p |
588 |
n |
589 |
/\\\\$/ b loop |
590 |
p |
591 |
} |
592 |
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ |
593 |
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
594 |
# Make sure the directory exists. |
595 |
test -f "$dirpart/$file" && continue |
596 |
fdir=`AS_DIRNAME(["$file"])` |
597 |
AS_MKDIR_P([$dirpart/$fdir]) |
598 |
# echo "creating $dirpart/$file" |
599 |
echo '# dummy' > "$dirpart/$file" |
600 |
done |
601 |
done |
602 |
])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
603 |
|
604 |
|
605 |
# AM_OUTPUT_DEPENDENCY_COMMANDS |
606 |
# ----------------------------- |
607 |
# This macro should only be invoked once -- use via AC_REQUIRE. |
608 |
# |
609 |
# This code is only required when automatic dependency tracking |
610 |
# is enabled. FIXME. This creates each `.P' file that we will |
611 |
# need in order to bootstrap the dependency handling code. |
612 |
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
613 |
[AC_CONFIG_COMMANDS([depfiles], |
614 |
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
615 |
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
616 |
]) |
617 |
|
618 |
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- |
619 |
|
620 |
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
621 |
|
622 |
# This program is free software; you can redistribute it and/or modify |
623 |
# it under the terms of the GNU General Public License as published by |
624 |
# the Free Software Foundation; either version 2, or (at your option) |
625 |
# any later version. |
626 |
|
627 |
# This program is distributed in the hope that it will be useful, |
628 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
629 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
630 |
# GNU General Public License for more details. |
631 |
|
632 |
# You should have received a copy of the GNU General Public License |
633 |
# along with this program; if not, write to the Free Software |
634 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
635 |
# 02111-1307, USA. |
636 |
|
637 |
# serial 7 |
638 |
|
639 |
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. |
640 |
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) |
641 |
|
642 |
# Do all the work for Automake. -*- Autoconf -*- |
643 |
|
644 |
# This macro actually does too much some checks are only needed if |
645 |
# your package does certain things. But this isn't really a big deal. |
646 |
|
647 |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 |
648 |
# Free Software Foundation, Inc. |
649 |
|
650 |
# This program is free software; you can redistribute it and/or modify |
651 |
# it under the terms of the GNU General Public License as published by |
652 |
# the Free Software Foundation; either version 2, or (at your option) |
653 |
# any later version. |
654 |
|
655 |
# This program is distributed in the hope that it will be useful, |
656 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
657 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
658 |
# GNU General Public License for more details. |
659 |
|
660 |
# You should have received a copy of the GNU General Public License |
661 |
# along with this program; if not, write to the Free Software |
662 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
663 |
# 02111-1307, USA. |
664 |
|
665 |
# serial 11 |
666 |
|
667 |
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
668 |
# AM_INIT_AUTOMAKE([OPTIONS]) |
669 |
# ----------------------------------------------- |
670 |
# The call with PACKAGE and VERSION arguments is the old style |
671 |
# call (pre autoconf-2.50), which is being phased out. PACKAGE |
672 |
# and VERSION should now be passed to AC_INIT and removed from |
673 |
# the call to AM_INIT_AUTOMAKE. |
674 |
# We support both call styles for the transition. After |
675 |
# the next Automake release, Autoconf can make the AC_INIT |
676 |
# arguments mandatory, and then we can depend on a new Autoconf |
677 |
# release and drop the old call support. |
678 |
AC_DEFUN([AM_INIT_AUTOMAKE], |
679 |
[AC_PREREQ([2.58])dnl |
680 |
dnl Autoconf wants to disallow AM_ names. We explicitly allow |
681 |
dnl the ones we care about. |
682 |
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
683 |
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
684 |
AC_REQUIRE([AC_PROG_INSTALL])dnl |
685 |
# test to see if srcdir already configured |
686 |
if test "`cd $srcdir && pwd`" != "`pwd`" && |
687 |
test -f $srcdir/config.status; then |
688 |
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
689 |
fi |
690 |
|
691 |
# test whether we have cygpath |
692 |
if test -z "$CYGPATH_W"; then |
693 |
if (cygpath --version) >/dev/null 2>/dev/null; then |
694 |
CYGPATH_W='cygpath -w' |
695 |
else |
696 |
CYGPATH_W=echo |
697 |
fi |
698 |
fi |
699 |
AC_SUBST([CYGPATH_W]) |
700 |
|
701 |
# Define the identity of the package. |
702 |
dnl Distinguish between old-style and new-style calls. |
703 |
m4_ifval([$2], |
704 |
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
705 |
AC_SUBST([PACKAGE], [$1])dnl |
706 |
AC_SUBST([VERSION], [$2])], |
707 |
[_AM_SET_OPTIONS([$1])dnl |
708 |
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
709 |
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
710 |
|
711 |
_AM_IF_OPTION([no-define],, |
712 |
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
713 |
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
714 |
|
715 |
# Some tools Automake needs. |
716 |
AC_REQUIRE([AM_SANITY_CHECK])dnl |
717 |
AC_REQUIRE([AC_ARG_PROGRAM])dnl |
718 |
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
719 |
AM_MISSING_PROG(AUTOCONF, autoconf) |
720 |
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
721 |
AM_MISSING_PROG(AUTOHEADER, autoheader) |
722 |
AM_MISSING_PROG(MAKEINFO, makeinfo) |
723 |
AM_MISSING_PROG(AMTAR, tar) |
724 |
AM_PROG_INSTALL_SH |
725 |
AM_PROG_INSTALL_STRIP |
726 |
AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
727 |
# We need awk for the "check" target. The system "awk" is bad on |
728 |
# some platforms. |
729 |
AC_REQUIRE([AC_PROG_AWK])dnl |
730 |
AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
731 |
AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
732 |
|
733 |
_AM_IF_OPTION([no-dependencies],, |
734 |
[AC_PROVIDE_IFELSE([AC_PROG_CC], |
735 |
[_AM_DEPENDENCIES(CC)], |
736 |
[define([AC_PROG_CC], |
737 |
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
738 |
AC_PROVIDE_IFELSE([AC_PROG_CXX], |
739 |
[_AM_DEPENDENCIES(CXX)], |
740 |
[define([AC_PROG_CXX], |
741 |
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
742 |
]) |
743 |
]) |
744 |
|
745 |
|
746 |
# When config.status generates a header, we must update the stamp-h file. |
747 |
# This file resides in the same directory as the config header |
748 |
# that is generated. The stamp files are numbered to have different names. |
749 |
|
750 |
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
751 |
# loop where config.status creates the headers, so we can generate |
752 |
# our stamp files there. |
753 |
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
754 |
[# Compute $1's index in $config_headers. |
755 |
_am_stamp_count=1 |
756 |
for _am_header in $config_headers :; do |
757 |
case $_am_header in |
758 |
$1 | $1:* ) |
759 |
break ;; |
760 |
* ) |
761 |
_am_stamp_count=`expr $_am_stamp_count + 1` ;; |
762 |
esac |
763 |
done |
764 |
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) |
765 |
|
766 |
# AM_PROG_INSTALL_SH |
767 |
# ------------------ |
768 |
# Define $install_sh. |
769 |
|
770 |
# Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
771 |
|
772 |
# This program is free software; you can redistribute it and/or modify |
773 |
# it under the terms of the GNU General Public License as published by |
774 |
# the Free Software Foundation; either version 2, or (at your option) |
775 |
# any later version. |
776 |
|
777 |
# This program is distributed in the hope that it will be useful, |
778 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
779 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
780 |
# GNU General Public License for more details. |
781 |
|
782 |
# You should have received a copy of the GNU General Public License |
783 |
# along with this program; if not, write to the Free Software |
784 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
785 |
# 02111-1307, USA. |
786 |
|
787 |
AC_DEFUN([AM_PROG_INSTALL_SH], |
788 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
789 |
install_sh=${install_sh-"$am_aux_dir/install-sh"} |
790 |
AC_SUBST(install_sh)]) |
791 |
|
792 |
# -*- Autoconf -*- |
793 |
# Copyright (C) 2003 Free Software Foundation, Inc. |
794 |
|
795 |
# This program is free software; you can redistribute it and/or modify |
796 |
# it under the terms of the GNU General Public License as published by |
797 |
# the Free Software Foundation; either version 2, or (at your option) |
798 |
# any later version. |
799 |
|
800 |
# This program is distributed in the hope that it will be useful, |
801 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
802 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
803 |
# GNU General Public License for more details. |
804 |
|
805 |
# You should have received a copy of the GNU General Public License |
806 |
# along with this program; if not, write to the Free Software |
807 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
808 |
# 02111-1307, USA. |
809 |
|
810 |
# serial 1 |
811 |
|
812 |
# Check whether the underlying file-system supports filenames |
813 |
# with a leading dot. For instance MS-DOS doesn't. |
814 |
AC_DEFUN([AM_SET_LEADING_DOT], |
815 |
[rm -rf .tst 2>/dev/null |
816 |
mkdir .tst 2>/dev/null |
817 |
if test -d .tst; then |
818 |
am__leading_dot=. |
819 |
else |
820 |
am__leading_dot=_ |
821 |
fi |
822 |
rmdir .tst 2>/dev/null |
823 |
AC_SUBST([am__leading_dot])]) |
824 |
|
825 |
|
826 |
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 |
827 |
# Free Software Foundation, Inc. |
828 |
|
829 |
# This program is free software; you can redistribute it and/or modify |
830 |
# it under the terms of the GNU General Public License as published by |
831 |
# the Free Software Foundation; either version 2, or (at your option) |
832 |
# any later version. |
833 |
|
834 |
# This program is distributed in the hope that it will be useful, |
835 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
836 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
837 |
# GNU General Public License for more details. |
838 |
|
839 |
# You should have received a copy of the GNU General Public License |
840 |
# along with this program; if not, write to the Free Software |
841 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
842 |
# 02111-1307, USA. |
843 |
|
844 |
# serial 4 |
845 |
|
846 |
# AM_PROG_LEX |
847 |
# ----------- |
848 |
# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a |
849 |
# "missing" invocation, for better error output. |
850 |
AC_DEFUN([AM_PROG_LEX], |
851 |
[AC_PREREQ(2.50)dnl |
852 |
AC_REQUIRE([AM_MISSING_HAS_RUN])dnl |
853 |
AC_REQUIRE([AC_PROG_LEX])dnl |
854 |
if test "$LEX" = :; then |
855 |
LEX=${am_missing_run}flex |
856 |
fi]) |
857 |
|
858 |
# Check to see how 'make' treats includes. -*- Autoconf -*- |
859 |
|
860 |
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
861 |
|
862 |
# This program is free software; you can redistribute it and/or modify |
863 |
# it under the terms of the GNU General Public License as published by |
864 |
# the Free Software Foundation; either version 2, or (at your option) |
865 |
# any later version. |
866 |
|
867 |
# This program is distributed in the hope that it will be useful, |
868 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
869 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
870 |
# GNU General Public License for more details. |
871 |
|
872 |
# You should have received a copy of the GNU General Public License |
873 |
# along with this program; if not, write to the Free Software |
874 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
875 |
# 02111-1307, USA. |
876 |
|
877 |
# serial 2 |
878 |
|
879 |
# AM_MAKE_INCLUDE() |
880 |
# ----------------- |
881 |
# Check to see how make treats includes. |
882 |
AC_DEFUN([AM_MAKE_INCLUDE], |
883 |
[am_make=${MAKE-make} |
884 |
cat > confinc << 'END' |
885 |
am__doit: |
886 |
@echo done |
887 |
.PHONY: am__doit |
888 |
END |
889 |
# If we don't find an include directive, just comment out the code. |
890 |
AC_MSG_CHECKING([for style of include used by $am_make]) |
891 |
am__include="#" |
892 |
am__quote= |
893 |
_am_result=none |
894 |
# First try GNU make style include. |
895 |
echo "include confinc" > confmf |
896 |
# We grep out `Entering directory' and `Leaving directory' |
897 |
# messages which can occur if `w' ends up in MAKEFLAGS. |
898 |
# In particular we don't look at `^make:' because GNU make might |
899 |
# be invoked under some other name (usually "gmake"), in which |
900 |
# case it prints its new name instead of `make'. |
901 |
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then |
902 |
am__include=include |
903 |
am__quote= |
904 |
_am_result=GNU |
905 |
fi |
906 |
# Now try BSD make style include. |
907 |
if test "$am__include" = "#"; then |
908 |
echo '.include "confinc"' > confmf |
909 |
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
910 |
am__include=.include |
911 |
am__quote="\"" |
912 |
_am_result=BSD |
913 |
fi |
914 |
fi |
915 |
AC_SUBST([am__include]) |
916 |
AC_SUBST([am__quote]) |
917 |
AC_MSG_RESULT([$_am_result]) |
918 |
rm -f confinc confmf |
919 |
]) |
920 |
|
921 |
# -*- Autoconf -*- |
922 |
|
923 |
|
924 |
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. |
925 |
|
926 |
# This program is free software; you can redistribute it and/or modify |
927 |
# it under the terms of the GNU General Public License as published by |
928 |
# the Free Software Foundation; either version 2, or (at your option) |
929 |
# any later version. |
930 |
|
931 |
# This program is distributed in the hope that it will be useful, |
932 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
933 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
934 |
# GNU General Public License for more details. |
935 |
|
936 |
# You should have received a copy of the GNU General Public License |
937 |
# along with this program; if not, write to the Free Software |
938 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
939 |
# 02111-1307, USA. |
940 |
|
941 |
# serial 3 |
942 |
|
943 |
# AM_MISSING_PROG(NAME, PROGRAM) |
944 |
# ------------------------------ |
945 |
AC_DEFUN([AM_MISSING_PROG], |
946 |
[AC_REQUIRE([AM_MISSING_HAS_RUN]) |
947 |
$1=${$1-"${am_missing_run}$2"} |
948 |
AC_SUBST($1)]) |
949 |
|
950 |
|
951 |
# AM_MISSING_HAS_RUN |
952 |
# ------------------ |
953 |
# Define MISSING if not defined so far and test if it supports --run. |
954 |
# If it does, set am_missing_run to use it, otherwise, to nothing. |
955 |
AC_DEFUN([AM_MISSING_HAS_RUN], |
956 |
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
957 |
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
958 |
# Use eval to expand $SHELL |
959 |
if eval "$MISSING --run true"; then |
960 |
am_missing_run="$MISSING --run " |
961 |
else |
962 |
am_missing_run= |
963 |
AC_MSG_WARN([`missing' script is too old or missing]) |
964 |
fi |
965 |
]) |
966 |
|
967 |
# AM_PROG_MKDIR_P |
968 |
# --------------- |
969 |
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. |
970 |
|
971 |
# Copyright (C) 2003, 2004 Free Software Foundation, Inc. |
972 |
|
973 |
# This program is free software; you can redistribute it and/or modify |
974 |
# it under the terms of the GNU General Public License as published by |
975 |
# the Free Software Foundation; either version 2, or (at your option) |
976 |
# any later version. |
977 |
|
978 |
# This program is distributed in the hope that it will be useful, |
979 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
980 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
981 |
# GNU General Public License for more details. |
982 |
|
983 |
# You should have received a copy of the GNU General Public License |
984 |
# along with this program; if not, write to the Free Software |
985 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
986 |
# 02111-1307, USA. |
987 |
|
988 |
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories |
989 |
# created by `make install' are always world readable, even if the |
990 |
# installer happens to have an overly restrictive umask (e.g. 077). |
991 |
# This was a mistake. There are at least two reasons why we must not |
992 |
# use `-m 0755': |
993 |
# - it causes special bits like SGID to be ignored, |
994 |
# - it may be too restrictive (some setups expect 775 directories). |
995 |
# |
996 |
# Do not use -m 0755 and let people choose whatever they expect by |
997 |
# setting umask. |
998 |
# |
999 |
# We cannot accept any implementation of `mkdir' that recognizes `-p'. |
1000 |
# Some implementations (such as Solaris 8's) are not thread-safe: if a |
1001 |
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' |
1002 |
# concurrently, both version can detect that a/ is missing, but only |
1003 |
# one can create it and the other will error out. Consequently we |
1004 |
# restrict ourselves to GNU make (using the --version option ensures |
1005 |
# this.) |
1006 |
AC_DEFUN([AM_PROG_MKDIR_P], |
1007 |
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then |
1008 |
# Keeping the `.' argument allows $(mkdir_p) to be used without |
1009 |
# argument. Indeed, we sometimes output rules like |
1010 |
# $(mkdir_p) $(somedir) |
1011 |
# where $(somedir) is conditionally defined. |
1012 |
# (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more |
1013 |
# expensive solution, as it forces Make to start a sub-shell.) |
1014 |
mkdir_p='mkdir -p -- .' |
1015 |
else |
1016 |
# On NextStep and OpenStep, the `mkdir' command does not |
1017 |
# recognize any option. It will interpret all options as |
1018 |
# directories to create, and then abort because `.' already |
1019 |
# exists. |
1020 |
for d in ./-p ./--version; |
1021 |
do |
1022 |
test -d $d && rmdir $d |
1023 |
done |
1024 |
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. |
1025 |
if test -f "$ac_aux_dir/mkinstalldirs"; then |
1026 |
mkdir_p='$(mkinstalldirs)' |
1027 |
else |
1028 |
mkdir_p='$(install_sh) -d' |
1029 |
fi |
1030 |
fi |
1031 |
AC_SUBST([mkdir_p])]) |
1032 |
|
1033 |
# Helper functions for option handling. -*- Autoconf -*- |
1034 |
|
1035 |
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. |
1036 |
|
1037 |
# This program is free software; you can redistribute it and/or modify |
1038 |
# it under the terms of the GNU General Public License as published by |
1039 |
# the Free Software Foundation; either version 2, or (at your option) |
1040 |
# any later version. |
1041 |
|
1042 |
# This program is distributed in the hope that it will be useful, |
1043 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1044 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1045 |
# GNU General Public License for more details. |
1046 |
|
1047 |
# You should have received a copy of the GNU General Public License |
1048 |
# along with this program; if not, write to the Free Software |
1049 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
1050 |
# 02111-1307, USA. |
1051 |
|
1052 |
# serial 2 |
1053 |
|
1054 |
# _AM_MANGLE_OPTION(NAME) |
1055 |
# ----------------------- |
1056 |
AC_DEFUN([_AM_MANGLE_OPTION], |
1057 |
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
1058 |
|
1059 |
# _AM_SET_OPTION(NAME) |
1060 |
# ------------------------------ |
1061 |
# Set option NAME. Presently that only means defining a flag for this option. |
1062 |
AC_DEFUN([_AM_SET_OPTION], |
1063 |
[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
1064 |
|
1065 |
# _AM_SET_OPTIONS(OPTIONS) |
1066 |
# ---------------------------------- |
1067 |
# OPTIONS is a space-separated list of Automake options. |
1068 |
AC_DEFUN([_AM_SET_OPTIONS], |
1069 |
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
1070 |
|
1071 |
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
1072 |
# ------------------------------------------- |
1073 |
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
1074 |
AC_DEFUN([_AM_IF_OPTION], |
1075 |
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
1076 |
|
1077 |
# |
1078 |
# Check to make sure that the build environment is sane. |
1079 |
# |
1080 |
|
1081 |
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. |
1082 |
|
1083 |
# This program is free software; you can redistribute it and/or modify |
1084 |
# it under the terms of the GNU General Public License as published by |
1085 |
# the Free Software Foundation; either version 2, or (at your option) |
1086 |
# any later version. |
1087 |
|
1088 |
# This program is distributed in the hope that it will be useful, |
1089 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1090 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1091 |
# GNU General Public License for more details. |
1092 |
|
1093 |
# You should have received a copy of the GNU General Public License |
1094 |
# along with this program; if not, write to the Free Software |
1095 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
1096 |
# 02111-1307, USA. |
1097 |
|
1098 |
# serial 3 |
1099 |
|
1100 |
# AM_SANITY_CHECK |
1101 |
# --------------- |
1102 |
AC_DEFUN([AM_SANITY_CHECK], |
1103 |
[AC_MSG_CHECKING([whether build environment is sane]) |
1104 |
# Just in case |
1105 |
sleep 1 |
1106 |
echo timestamp > conftest.file |
1107 |
# Do `set' in a subshell so we don't clobber the current shell's |
1108 |
# arguments. Must try -L first in case configure is actually a |
1109 |
# symlink; some systems play weird games with the mod time of symlinks |
1110 |
# (eg FreeBSD returns the mod time of the symlink's containing |
1111 |
# directory). |
1112 |
if ( |
1113 |
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
1114 |
if test "$[*]" = "X"; then |
1115 |
# -L didn't work. |
1116 |
set X `ls -t $srcdir/configure conftest.file` |
1117 |
fi |
1118 |
rm -f conftest.file |
1119 |
if test "$[*]" != "X $srcdir/configure conftest.file" \ |
1120 |
&& test "$[*]" != "X conftest.file $srcdir/configure"; then |
1121 |
|
1122 |
# If neither matched, then we have a broken ls. This can happen |
1123 |
# if, for instance, CONFIG_SHELL is bash and it inherits a |
1124 |
# broken ls alias from the environment. This has actually |
1125 |
# happened. Such a system could not be considered "sane". |
1126 |
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
1127 |
alias in your environment]) |
1128 |
fi |
1129 |
|
1130 |
test "$[2]" = conftest.file |
1131 |
) |
1132 |
then |
1133 |
# Ok. |
1134 |
: |
1135 |
else |
1136 |
AC_MSG_ERROR([newly created file is older than distributed files! |
1137 |
Check your system clock]) |
1138 |
fi |
1139 |
AC_MSG_RESULT(yes)]) |
1140 |
|
1141 |
# AM_PROG_INSTALL_STRIP |
1142 |
|
1143 |
# Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
1144 |
|
1145 |
# This program is free software; you can redistribute it and/or modify |
1146 |
# it under the terms of the GNU General Public License as published by |
1147 |
# the Free Software Foundation; either version 2, or (at your option) |
1148 |
# any later version. |
1149 |
|
1150 |
# This program is distributed in the hope that it will be useful, |
1151 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1152 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1153 |
# GNU General Public License for more details. |
1154 |
|
1155 |
# You should have received a copy of the GNU General Public License |
1156 |
# along with this program; if not, write to the Free Software |
1157 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
1158 |
# 02111-1307, USA. |
1159 |
|
1160 |
# One issue with vendor `install' (even GNU) is that you can't |
1161 |
# specify the program used to strip binaries. This is especially |
1162 |
# annoying in cross-compiling environments, where the build's strip |
1163 |
# is unlikely to handle the host's binaries. |
1164 |
# Fortunately install-sh will honor a STRIPPROG variable, so we |
1165 |
# always use install-sh in `make install-strip', and initialize |
1166 |
# STRIPPROG with the value of the STRIP variable (set by the user). |
1167 |
AC_DEFUN([AM_PROG_INSTALL_STRIP], |
1168 |
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
1169 |
# Installed binaries are usually stripped using `strip' when the user |
1170 |
# run `make install-strip'. However `strip' might not be the right |
1171 |
# tool to use in cross-compilation environments, therefore Automake |
1172 |
# will honor the `STRIP' environment variable to overrule this program. |
1173 |
dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
1174 |
if test "$cross_compiling" != no; then |
1175 |
AC_CHECK_TOOL([STRIP], [strip], :) |
1176 |
fi |
1177 |
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
1178 |
AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
1179 |
|