Skip to content

Latest commit

 

History

History
6763 lines (6080 loc) · 238 KB

acinclude.m4

File metadata and controls

6763 lines (6080 loc) · 238 KB
 
Oct 21, 1999
Oct 21, 1999
1
2
3
4
5
6
7
8
9
10
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
Aug 24, 2004
Aug 24, 2004
11
AC_DEFUN([AM_PATH_SDL],
Oct 21, 1999
Oct 21, 1999
12
13
14
15
16
17
18
19
20
21
22
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
May 1, 2006
May 1, 2006
23
24
25
26
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
fi
Oct 21, 1999
Oct 21, 1999
27
28
fi
if test x$sdl_prefix != x ; then
May 1, 2006
May 1, 2006
29
30
31
32
sdl_args="$sdl_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_prefix/bin/sdl-config
fi
Oct 21, 1999
Oct 21, 1999
33
34
fi
May 1, 2006
May 1, 2006
35
36
37
if test "x$prefix" != xNONE; then
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
fi
Aug 24, 2004
Aug 24, 2004
38
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
Oct 21, 1999
Oct 21, 1999
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes
else
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
Mar 19, 2006
Mar 19, 2006
56
ac_save_CXXFLAGS="$CXXFLAGS"
Oct 21, 1999
Oct 21, 1999
57
58
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
Mar 19, 2006
Mar 19, 2006
59
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
Oct 21, 1999
Oct 21, 1999
60
61
62
63
64
65
66
67
68
69
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl-config to some extent
dnl
rm -f conf.sdltest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Dec 21, 1999
Dec 21, 1999
70
#include "SDL.h"
Oct 21, 1999
Oct 21, 1999
71
72
73
74
75
76
77
78
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
Aug 10, 2000
Aug 10, 2000
79
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
Oct 21, 1999
Oct 21, 1999
80
81
82
83
84
85
86
87
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
Aug 10, 2000
Aug 10, 2000
88
int main (int argc, char *argv[])
Oct 21, 1999
Oct 21, 1999
89
90
91
92
{
int major, minor, micro;
char *tmp_version;
Aug 10, 2000
Aug 10, 2000
93
/* This hangs on some systems (?)
Oct 21, 1999
Oct 21, 1999
94
system ("touch conf.sdltest");
Aug 10, 2000
Aug 10, 2000
95
96
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
Oct 21, 1999
Oct 21, 1999
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
if (($sdl_major_version > major) ||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
Mar 19, 2006
Mar 19, 2006
125
CXXFLAGS="$ac_save_CXXFLAGS"
Oct 21, 1999
Oct 21, 1999
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
echo "*** The sdl-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SDL_CONFIG environment variable to the"
echo "*** full path to sdl-config."
else
if test -f conf.sdltest ; then
:
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
Mar 19, 2006
Mar 19, 2006
145
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
Oct 21, 1999
Oct 21, 1999
146
147
148
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
Dec 21, 1999
Dec 21, 1999
149
#include "SDL.h"
Sep 7, 2001
Sep 7, 2001
150
151
152
153
154
int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
Oct 21, 1999
Oct 21, 1999
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
Mar 19, 2006
Mar 19, 2006
170
CXXFLAGS="$ac_save_CXXFLAGS"
Oct 21, 1999
Oct 21, 1999
171
172
173
174
175
176
177
178
179
180
181
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])
Aug 24, 2004
Aug 24, 2004
182
183
##############################################################################
Apr 5, 2001
Apr 5, 2001
184
185
186
187
188
189
190
191
192
193
194
195
# Configure paths for SMPEG
# Nicolas Vignal 11/19/2000
# stolen from Sam Lantinga
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_SMPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [,
ACTION-IF-NOT-FOUND]]])
dnl Test for SMPEG, and define SMPEG_CFLAGS and SMPEG_LIBS
dnl
Aug 24, 2004
Aug 24, 2004
196
AC_DEFUN([AM_PATH_SMPEG],
Apr 5, 2001
Apr 5, 2001
197
198
199
[dnl
dnl Get the cflags and libraries from the smpeg-config script
dnl
Sep 18, 2003
Sep 18, 2003
200
AC_ARG_WITH(smpeg-prefix,[ --with-smpeg-prefix=PFX Prefix where SMPEG is installed (optional)],
Apr 5, 2001
Apr 5, 2001
201
smpeg_prefix="$withval", smpeg_prefix="")
Sep 18, 2003
Sep 18, 2003
202
AC_ARG_WITH(smpeg-exec-prefix,[ --with-smpeg-exec-prefix=PFX Exec prefix where SMPEG is installed (optional)],
Apr 5, 2001
Apr 5, 2001
203
smpeg_exec_prefix="$withval", smpeg_exec_prefix="")
Sep 18, 2003
Sep 18, 2003
204
AC_ARG_ENABLE(smpegtest, [ --disable-smpegtest Do not try to compile and run a test SMPEG program],
Apr 5, 2001
Apr 5, 2001
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
, enable_smpegtest=yes)
if test x$smpeg_exec_prefix != x ; then
smpeg_args="$smpeg_args --exec-prefix=$smpeg_exec_prefix"
if test x${SMPEG_CONFIG+set} != xset ; then
SMPEG_CONFIG=$smpeg_exec_prefix/bin/smpeg-config
fi
fi
if test x$smpeg_prefix != x ; then
smpeg_args="$smpeg_args --prefix=$smpeg_prefix"
if test x${SMPEG_CONFIG+set} != xset ; then
SMPEG_CONFIG=$smpeg_prefix/bin/smpeg-config
fi
fi
AC_PATH_PROG(SMPEG_CONFIG, smpeg-config, no)
min_smpeg_version=ifelse([$1], ,0.2.7,$1)
AC_MSG_CHECKING(for SMPEG - version >= $min_smpeg_version)
no_smpeg=""
if test "$SMPEG_CONFIG" = "no" ; then
no_smpeg=yes
else
SMPEG_CFLAGS=`$SMPEG_CONFIG $smpegconf_args --cflags`
SMPEG_LIBS=`$SMPEG_CONFIG $smpegconf_args --libs`
smpeg_major_version=`$SMPEG_CONFIG $smpeg_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
smpeg_minor_version=`$SMPEG_CONFIG $smpeg_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
smpeg_micro_version=`$SMPEG_CONFIG $smpeg_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_smpegtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SMPEG is sufficiently new. (Also sanity
dnl checks the results of smpeg-config to some extent
dnl
rm -f conf.smpegtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "smpeg.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.smpegtest");
*/
{ FILE *fp = fopen("conf.smpegtest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_smpeg_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_smpeg_version");
exit(1);
}
if (($smpeg_major_version > major) ||
(($smpeg_major_version == major) && ($smpeg_minor_version > minor)) ||
Sep 18, 2003
Sep 18, 2003
287
(($smpeg_major_version == major) && ($smpeg_minor_version == minor) && ($smpeg_micro_version >= micro)))
Apr 5, 2001
Apr 5, 2001
288
289
290
291
292
{
return 0;
}
else
{
Sep 18, 2003
Sep 18, 2003
293
294
printf("\n*** 'smpeg-config --version' returned %d.%d.%d, but the minimum version\n", $smpeg_major_version, $smpeg_minor_version, $smpeg_micro_version);
printf("*** of SMPEG required is %d.%d.%d. If smpeg-config is correct, then it is\n", major, minor, micro);
Apr 5, 2001
Apr 5, 2001
295
printf("*** best to upgrade to the required version.\n");
Sep 18, 2003
Sep 18, 2003
296
297
printf("*** If smpeg-config was wrong, set the environment variable SMPEG_CONFIG\n");
printf("*** to point to the correct copy of smpeg-config, and remove the file\n");
Apr 5, 2001
Apr 5, 2001
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_smpeg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_smpeg" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SMPEG_CONFIG" = "no" ; then
Sep 18, 2003
Sep 18, 2003
314
315
316
echo "*** The smpeg-config script installed by SMPEG could not be found"
echo "*** If SMPEG was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SMPEG_CONFIG environment variable to the"
Apr 5, 2001
Apr 5, 2001
317
318
319
320
321
322
323
324
325
326
327
328
echo "*** full path to smpeg-config."
else
if test -f conf.smpegtest ; then
:
else
echo "*** Could not run SMPEG test program, checking why..."
CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include "smpeg.h"
], [ return 0; ],
Sep 18, 2003
Sep 18, 2003
329
330
331
332
333
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SMPEG or finding the wrong"
echo "*** version of SMPEG. If it is not finding SMPEG, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
Apr 5, 2001
Apr 5, 2001
334
335
echo "*** is required on your system"
echo "***"
Sep 18, 2003
Sep 18, 2003
336
337
338
339
340
341
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SMPEG was incorrectly installed"
echo "*** or that you have moved SMPEG since it was installed. In the latter case, you"
echo "*** may want to edit the smpeg-config script: $SMPEG_CONFIG" ])
Apr 5, 2001
Apr 5, 2001
342
343
344
345
346
347
348
349
350
351
352
353
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SMPEG_CFLAGS=""
SMPEG_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SMPEG_CFLAGS)
AC_SUBST(SMPEG_LIBS)
rm -f conf.smpegtest
])
Nov 19, 2003
Nov 19, 2003
354
Aug 24, 2004
Aug 24, 2004
355
##############################################################################
Apr 30, 2006
Apr 30, 2006
356
# Based on libtool-1.5.22
Nov 19, 2003
Nov 19, 2003
357
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Apr 30, 2006
Apr 30, 2006
358
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
Nov 19, 2003
Nov 19, 2003
359
## Free Software Foundation, Inc.
Oct 25, 1999
Oct 25, 1999
360
361
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
##
Apr 30, 2006
Apr 30, 2006
362
363
364
## This file is free software; the Free Software Foundation gives
## unlimited permission to copy and/or distribute it, with or without
## modifications, as long as this notice is preserved.
Oct 25, 1999
Oct 25, 1999
365
Apr 30, 2006
Apr 30, 2006
366
# serial 48 AC_PROG_LIBTOOL
Nov 19, 2003
Nov 19, 2003
367
368
369
370
371
372
373
374
375
376
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
# -----------------------------------------------------------
# If this macro is not defined by Autoconf, define it here.
m4_ifdef([AC_PROVIDE_IFELSE],
[],
[m4_define([AC_PROVIDE_IFELSE],
[m4_ifdef([AC_PROVIDE_$1],
[$2], [$3])])])
Oct 25, 1999
Oct 25, 1999
377
378
Nov 19, 2003
Nov 19, 2003
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# AC_PROG_LIBTOOL
# ---------------
AC_DEFUN([AC_PROG_LIBTOOL],
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[AC_LIBTOOL_CXX],
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
])])
dnl And a similar setup for Fortran 77 support
AC_PROVIDE_IFELSE([AC_PROG_F77],
[AC_LIBTOOL_F77],
[define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
])])
Oct 25, 1999
Oct 25, 1999
394
Nov 19, 2003
Nov 19, 2003
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
[AC_LIBTOOL_GCJ],
[ifdef([AC_PROG_GCJ],
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
ifdef([A][M_PROG_GCJ],
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
ifdef([LT_AC_PROG_GCJ],
[define([LT_AC_PROG_GCJ],
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
])])# AC_PROG_LIBTOOL
# _AC_PROG_LIBTOOL
# ----------------
AC_DEFUN([_AC_PROG_LIBTOOL],
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
Oct 25, 1999
Oct 25, 1999
421
422
# This can be used to rebuild libtool when needed
Nov 19, 2003
Nov 19, 2003
423
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
Oct 25, 1999
Oct 25, 1999
424
425
426
427
428
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
Nov 19, 2003
Nov 19, 2003
429
430
431
# Prevent multiple expansion
define([AC_PROG_LIBTOOL], [])
])# _AC_PROG_LIBTOOL
Oct 25, 1999
Oct 25, 1999
432
Nov 19, 2003
Nov 19, 2003
433
434
435
436
437
# AC_LIBTOOL_SETUP
# ----------------
AC_DEFUN([AC_LIBTOOL_SETUP],
[AC_PREREQ(2.50)dnl
Oct 25, 1999
Oct 25, 1999
438
439
440
441
442
443
444
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
Nov 19, 2003
Nov 19, 2003
445
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
Oct 25, 1999
Oct 25, 1999
446
AC_REQUIRE([AC_PROG_NM])dnl
Nov 19, 2003
Nov 19, 2003
447
Oct 25, 1999
Oct 25, 1999
448
AC_REQUIRE([AC_PROG_LN_S])dnl
Nov 19, 2003
Nov 19, 2003
449
450
451
452
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
Oct 25, 1999
Oct 25, 1999
453
454
dnl
Nov 19, 2003
Nov 19, 2003
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
AC_LIBTOOL_SYS_MAX_CMD_LEN
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
AC_LIBTOOL_OBJDIR
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
_LT_AC_PROG_ECHO_BACKSLASH
case $host_os in
aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
;;
esac
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Apr 30, 2006
Apr 30, 2006
476
Xsed='sed -e 1s/^X//'
Nov 19, 2003
Nov 19, 2003
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
# Same as above, but do not quote variable references.
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'
# Constants:
rm="rm -f"
# Global variables:
default_ofile=libtool
can_build_shared=yes
Apr 30, 2006
Apr 30, 2006
496
# All known linkers require a `.a' archive for static linking (except MSVC,
Nov 19, 2003
Nov 19, 2003
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# which needs '.lib').
libext=a
ltmain="$ac_aux_dir/ltmain.sh"
ofile="$default_ofile"
with_gnu_ld="$lt_cv_prog_gnu_ld"
AC_CHECK_TOOL(AR, ar, false)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
old_CC="$CC"
old_CFLAGS="$CFLAGS"
# Set sane defaults for various variables
test -z "$AR" && AR=ar
test -z "$AR_FLAGS" && AR_FLAGS=cru
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
Apr 30, 2006
Apr 30, 2006
516
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
Nov 19, 2003
Nov 19, 2003
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
test -z "$MAGIC_CMD" && MAGIC_CMD=file
test -z "$NM" && NM=nm
test -z "$SED" && SED=sed
test -z "$OBJDUMP" && OBJDUMP=objdump
test -z "$RANLIB" && RANLIB=:
test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
Apr 30, 2006
Apr 30, 2006
536
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
Nov 19, 2003
Nov 19, 2003
537
538
;;
*)
Apr 30, 2006
Apr 30, 2006
539
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
Nov 19, 2003
Nov 19, 2003
540
541
542
543
544
;;
esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi
Apr 30, 2006
Apr 30, 2006
545
_LT_CC_BASENAME([$compiler])
Aug 24, 2004
Aug 24, 2004
546
Nov 19, 2003
Nov 19, 2003
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
AC_PATH_MAGIC
fi
;;
esac
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
enable_win32_dll=yes, enable_win32_dll=no)
AC_ARG_ENABLE([libtool-lock],
[AC_HELP_STRING([--disable-libtool-lock],
[avoid locking (might break parallel builds)])])
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
AC_ARG_WITH([pic],
[AC_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=default
# Use C for the default configuration in the libtool script
tagname=
AC_LIBTOOL_LANG_C_CONFIG
_LT_AC_TAGCONFIG
])# AC_LIBTOOL_SETUP
# _LT_AC_SYS_COMPILER
# -------------------
AC_DEFUN([_LT_AC_SYS_COMPILER],
[AC_REQUIRE([AC_PROG_CC])dnl
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
Apr 30, 2006
Apr 30, 2006
587
588
589
# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
Nov 19, 2003
Nov 19, 2003
590
591
592
593
594
# Allow CC to be a program name with arguments.
compiler=$CC
])# _LT_AC_SYS_COMPILER
Apr 30, 2006
Apr 30, 2006
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
# _LT_CC_BASENAME(CC)
# -------------------
# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
AC_DEFUN([_LT_CC_BASENAME],
[for cc_temp in $1""; do
case $cc_temp in
compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
])
# _LT_COMPILER_BOILERPLATE
# ------------------------
# Check for compiler boilerplate output or warnings with
# the simple compiler test code.
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_COMPILER_BOILERPLATE
# _LT_LINKER_BOILERPLATE
# ----------------------
# Check for linker boilerplate output or warnings with
# the simple link test code.
AC_DEFUN([_LT_LINKER_BOILERPLATE],
[ac_outfile=conftest.$ac_objext
printf "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
])# _LT_LINKER_BOILERPLATE
Nov 19, 2003
Nov 19, 2003
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# _LT_AC_SYS_LIBPATH_AIX
# ----------------------
# Links a minimal program and checks the executable
# for the system default hardcoded library path. In most cases,
# this is /usr/lib:/lib, but when the MPI compilers are used
# the location of the communication and MPI libs are included too.
# If we don't find anything, use the default library path according
# to the aix ld manual.
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
# Check for a 64-bit object if we didn't find anything.
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`; fi],[])
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
])# _LT_AC_SYS_LIBPATH_AIX
# _LT_AC_SHELL_INIT(ARG)
# ----------------------
AC_DEFUN([_LT_AC_SHELL_INIT],
[ifdef([AC_DIVERSION_NOTICE],
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
[AC_DIVERT_PUSH(NOTICE)])
$1
AC_DIVERT_POP
])# _LT_AC_SHELL_INIT
# _LT_AC_PROG_ECHO_BACKSLASH
# --------------------------
# Add some code to the start of the generated configure script which
# will find an echo command which doesn't interpret backslashes.
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
[_LT_AC_SHELL_INIT([
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
case X$ECHO in
X*--fallback-echo)
# Remove one level of quotation (which was required for Make).
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
;;
Aug 10, 2000
Aug 10, 2000
681
esac
Oct 25, 1999
Oct 25, 1999
682
Nov 19, 2003
Nov 19, 2003
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
echo=${ECHO-echo}
if test "X[$]1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X[$]1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
# Yippee, $echo works!
:
else
# Restart under the correct shell.
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
fi
if test "X[$]1" = X--fallback-echo; then
# used as fallback echo
shift
cat <<EOF
[$]*
EOF
exit 0
fi
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
Aug 24, 2004
Aug 24, 2004
709
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Nov 19, 2003
Nov 19, 2003
710
711
712
713
714
715
if test -z "$ECHO"; then
if test "X${echo_test_string+set}" != Xset; then
# find a string as large as possible, as long as the shell can cope with it
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
Apr 30, 2006
Apr 30, 2006
716
717
if (echo_test_string=`eval $cmd`) 2>/dev/null &&
echo_test_string=`eval $cmd` &&
Nov 19, 2003
Nov 19, 2003
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
then
break
fi
done
fi
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
:
else
# The Solaris, AIX, and Digital Unix default echo programs unquote
# backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
#
# So, first we look for a working echo in the user's PATH.
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for dir in $PATH /usr/ucb; do
IFS="$lt_save_ifs"
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
echo="$dir/echo"
break
fi
done
IFS="$lt_save_ifs"
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
# This shell has a builtin print -r that does the trick.
echo='print -r'
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
test "X$CONFIG_SHELL" != X/bin/ksh; then
# If we have ksh, try running configure again with it.
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
export ORIGINAL_CONFIG_SHELL
CONFIG_SHELL=/bin/ksh
export CONFIG_SHELL
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
else
# Try using printf.
echo='printf %s\n'
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
# Cool, printf works
:
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
test "X$echo_testing_string" = 'X\t' &&
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
export CONFIG_SHELL
SHELL="$CONFIG_SHELL"
export SHELL
echo="$CONFIG_SHELL [$]0 --fallback-echo"
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
test "X$echo_testing_string" = 'X\t' &&
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
echo="$CONFIG_SHELL [$]0 --fallback-echo"
else
# maybe with a smaller string...
prev=:
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
then
break
fi
prev="$cmd"
done
if test "$prev" != 'sed 50q "[$]0"'; then
echo_test_string=`eval $prev`
export echo_test_string
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
else
# Oops. We lost completely, so just stick with echo.
echo=echo
fi
fi
fi
fi
fi
fi
# Copy echo and quote the copy suitably for passing to libtool from
# the Makefile, instead of quoting the original, which is used later.
ECHO=$echo
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
fi
AC_SUBST(ECHO)
])])# _LT_AC_PROG_ECHO_BACKSLASH
# _LT_AC_LOCK
# -----------
AC_DEFUN([_LT_AC_LOCK],
[AC_ARG_ENABLE([libtool-lock],
[AC_HELP_STRING([--disable-libtool-lock],
[avoid locking (might break parallel builds)])])
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
Oct 25, 1999
Oct 25, 1999
830
831
832
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
Nov 19, 2003
Nov 19, 2003
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE="32"
;;
*ELF-64*)
HPUX_IA64_MODE="64"
;;
esac
fi
rm -rf conftest*
;;
Oct 25, 1999
Oct 25, 1999
849
850
851
852
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
Nov 19, 2003
Nov 19, 2003
853
854
855
856
857
858
859
860
861
862
863
864
865
866
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
*N32*)
LD="${LD-ld} -melf32bmipn32"
;;
*64-bit*)
LD="${LD-ld} -melf64bmip"
;;
esac
else
case `/usr/bin/file conftest.$ac_objext` in
Oct 25, 1999
Oct 25, 1999
867
868
869
870
871
872
873
874
875
876
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
Nov 19, 2003
Nov 19, 2003
877
878
879
880
881
882
883
884
885
fi
fi
rm -rf conftest*
;;
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
Apr 30, 2006
Apr 30, 2006
886
case `/usr/bin/file conftest.o` in
Nov 19, 2003
Nov 19, 2003
887
888
889
890
891
*32-bit*)
case $host in
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
Aug 24, 2004
Aug 24, 2004
892
ppc64-*linux*|powerpc64-*linux*)
Nov 19, 2003
Nov 19, 2003
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
LD="${LD-ld} -m elf_s390"
;;
sparc64-*linux*)
LD="${LD-ld} -m elf32_sparc"
;;
esac
;;
*64-bit*)
case $host in
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*)
LD="${LD-ld} -m elf64_s390"
;;
sparc*-*linux*)
LD="${LD-ld} -m elf64_sparc"
;;
esac
;;
esac
Oct 25, 1999
Oct 25, 1999
920
921
922
923
924
925
926
927
928
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Nov 19, 2003
Nov 19, 2003
929
930
931
[AC_LANG_PUSH(C)
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_POP])
Oct 25, 1999
Oct 25, 1999
932
933
934
935
936
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
Apr 30, 2006
Apr 30, 2006
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
sparc*-*solaris*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
*) LD="${LD-ld} -64" ;;
esac
;;
esac
fi
rm -rf conftest*
;;
Nov 19, 2003
Nov 19, 2003
953
954
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
Oct 25, 1999
Oct 25, 1999
955
956
957
958
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
Nov 19, 2003
Nov 19, 2003
959
])
Oct 25, 1999
Oct 25, 1999
960
961
esac
Nov 19, 2003
Nov 19, 2003
962
need_locks="$enable_libtool_lock"
Oct 25, 1999
Oct 25, 1999
963
Nov 19, 2003
Nov 19, 2003
964
965
966
967
968
969
970
971
])# _LT_AC_LOCK
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
# ----------------------------------------------------------------
# Check whether the given compiler option works
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
Aug 24, 2004
Aug 24, 2004
972
973
[AC_REQUIRE([LT_AC_PROG_SED])
AC_CACHE_CHECK([$1], [$2],
Nov 19, 2003
Nov 19, 2003
974
975
976
977
978
979
980
981
982
983
[$2=no
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$3"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
# with a dollar sign (not a hyphen), so the echo should work correctly.
# The option is referenced via a variable to avoid confusing sed.
lt_compile=`echo "$ac_compile" | $SED \
Apr 30, 2006
Apr 30, 2006
984
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Nov 19, 2003
Nov 19, 2003
985
986
987
988
989
990
991
992
993
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&AS_MESSAGE_LOG_FD
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
Apr 30, 2006
Apr 30, 2006
994
995
996
997
# So say no if there are warnings other than the usual output.
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
Nov 19, 2003
Nov 19, 2003
998
999
1000
$2=yes
fi
fi