/[svn]/vendor/pxys2-2.0.0/libopas/aclocal.m4
ViewVC logotype

Contents of /vendor/pxys2-2.0.0/libopas/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3252 - (show annotations)
Wed Apr 2 20:41:43 2014 UTC (7 years ago) by michael
File size: 252562 byte(s)
- Imported pxys2-2.0.0

1 # aclocal.m4t generated automatically by aclocal 1.6.3 -*- Autoconf -*-
2
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
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 dnl AC_COMPILE_CHECK_SIZEOF
15 dnl Written by Kaveh Ghazi <ghazi@caip.rutgers.edu>
16 dnl
17 AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
18 [changequote(<<, >>)dnl
19 dnl The name to #define.
20 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
21 dnl The cache variable name.
22 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
23 changequote([, ])dnl
24 AC_MSG_CHECKING(size of $1)
25 AC_CACHE_VAL(AC_CV_NAME,
26 [for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
27 AC_TRY_COMPILE([#include "confdefs.h"
28 #include <sys/types.h>
29 $2
30 ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
31 if test x$AC_CV_NAME != x ; then break; fi
32 done
33 ])
34 if test x$AC_CV_NAME = x ; then
35 AC_MSG_ERROR([cannot determine a size for $1])
36 fi
37 AC_MSG_RESULT($AC_CV_NAME)
38 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
39 undefine([AC_TYPE_NAME])dnl
40 undefine([AC_CV_NAME])dnl
41 ])
42
43 dnl Written by Guido Draheim <guidod@gmx.de>
44 dnl
45 AC_DEFUN([AC_CREATE_STDINT_H],
46 [# ------ AC CREATE STDINT H -------------------------------------
47 AC_MSG_CHECKING([for stdint-types....])
48 ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
49 if test "$ac_stdint_h" = "stdint.h" ; then
50 AC_MSG_RESULT("(are you sure you want them in ./stdint.h?)")
51 elif test "$ac_stdint_h" = "inttypes.h" ; then
52 AC_MSG_RESULT("(are you sure you want them in ./inttypes.h?)")
53 else
54 AC_MSG_RESULT("(putting them into $ac_stdint_h)")
55 fi
56
57 inttype_headers=`echo inttypes.h sys/inttypes.h sys/inttypes.h $2 \
58 | sed -e 's/,/ /g'`
59
60 ac_cv_header_stdint_x="no-file"
61 ac_cv_header_stdint_o="no-file"
62 ac_cv_header_stdint_u="no-file"
63 for i in stdint.h $inttype_headers ; do
64 unset ac_cv_type_uintptr_t
65 unset ac_cv_type_uint64_t
66 _AC_CHECK_TYPE_NEW(uintptr_t,[ac_cv_header_stdint_x=$i],dnl
67 continue,[#include <$i>])
68 AC_CHECK_TYPE(uint64_t,[and64="(uint64_t too)"],[and64=""],[#include<$i>])
69 AC_MSG_RESULT(... seen our uintptr_t in $i $and64)
70 break;
71 done
72 if test "$ac_cv_header_stdint_x" = "no-file" ; then
73 for i in stdint.h $inttype_headers ; do
74 unset ac_cv_type_uint32_t
75 unset ac_cv_type_uint64_t
76 AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],dnl
77 continue,[#include <$i>])
78 AC_CHECK_TYPE(uint64_t,[and64="(uint64_t too)"],[and64=""],[#include<$i>])
79 AC_MSG_RESULT(... seen our uint32_t in $i $and64)
80 break;
81 done
82 if test "$ac_cv_header_stdint_o" = "no-file" ; then
83 for i in sys/types.h $inttype_headers ; do
84 unset ac_cv_type_u_int32_t
85 unset ac_cv_type_u_int64_t
86 AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],dnl
87 continue,[#include <$i>])
88 AC_CHECK_TYPE(uint64_t,[and64="(u_int64_t too)"],[and64=""],[#include<$i>])
89 AC_MSG_RESULT(... seen our u_int32_t in $i $and64)
90 break;
91 done
92 fi
93 fi
94
95 # ----------------- DONE inttypes.h checks MAYBE C basic types --------
96
97 if test "$ac_cv_header_stdint_x" = "no-file" ; then
98 AC_COMPILE_CHECK_SIZEOF(char)
99 AC_COMPILE_CHECK_SIZEOF(short)
100 AC_COMPILE_CHECK_SIZEOF(int)
101 AC_COMPILE_CHECK_SIZEOF(long)
102 AC_COMPILE_CHECK_SIZEOF(void*)
103 ac_cv_header_stdint_test="yes"
104 else
105 ac_cv_header_stdint_test="no"
106 fi
107
108 # ----------------- DONE inttypes.h checks START header -------------
109 _ac_stdint_h=AS_TR_CPP(_$ac_stdint_h)
110 AC_MSG_RESULT(creating $ac_stdint_h : $_ac_stdint_h)
111 echo "#ifndef" $_ac_stdint_h >$ac_stdint_h
112 echo "#define" $_ac_stdint_h "1" >>$ac_stdint_h
113 echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint_h
114 echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint_h
115 if test "$GCC" = "yes" ; then
116 echo "/* generated using a gnu compiler version" `$CC --version` "*/" \
117 >>$ac_stdint_h
118 else
119 echo "/* generated using $CC */" >>$ac_stdint_h
120 fi
121 echo "" >>$ac_stdint_h
122
123 if test "$ac_cv_header_stdint_x" != "no-file" ; then
124 ac_cv_header_stdint="$ac_cv_header_stdint_x"
125 elif test "$ac_cv_header_stdint_o" != "no-file" ; then
126 ac_cv_header_stdint="$ac_cv_header_stdint_o"
127 elif test "$ac_cv_header_stdint_u" != "no-file" ; then
128 ac_cv_header_stdint="$ac_cv_header_stdint_u"
129 else
130 ac_cv_header_stdint="stddef.h"
131 fi
132
133 # ----------------- See if int_least and int_fast types are present
134 unset ac_cv_type_int_least32_t
135 unset ac_cv_type_int_fast32_t
136 AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
137 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
138
139 if test "$ac_cv_header_stdint" != "stddef.h" ; then
140 if test "$ac_cv_header_stdint" != "stdint.h" ; then
141 AC_MSG_RESULT(..adding include stddef.h)
142 echo "#include <stddef.h>" >>$ac_stdint_h
143 fi ; fi
144 AC_MSG_RESULT(..adding include $ac_cv_header_stdint)
145 echo "#include <$ac_cv_header_stdint>" >>$ac_stdint_h
146 echo "" >>$ac_stdint_h
147
148 # ----------------- DONE header START basic int types -------------
149 if test "$ac_cv_header_stdint_x" = "no-file" ; then
150 AC_MSG_RESULT(... need to look at C basic types)
151 dnl ac_cv_header_stdint_test="yes" # moved up before creating the file
152 else
153 AC_MSG_RESULT(... seen good stdint.h inttypes)
154 dnl ac_cv_header_stdint_test="no" # moved up before creating the file
155 fi
156
157 if test "$ac_cv_header_stdint_u" != "no-file" ; then
158 AC_MSG_RESULT(... seen bsd/sysv typedefs)
159 cat >>$ac_stdint_h <<EOF
160
161 /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
162 typedef u_int8_t uint8_t;
163 typedef u_int16_t uint16_t;
164 typedef u_int32_t uint32_t;
165 EOF
166 cat >>$ac_stdint_h <<EOF
167
168 /* glibc compatibility */
169 #ifndef __int8_t_defined
170 #define __int8_t_defined
171 #endif
172 EOF
173 fi
174
175 ac_cv_sizeof_x="$ac_cv_sizeof_char:$ac_cv_sizeof_short"
176 ac_cv_sizeof_X="$ac_cv_sizeof_x:$ac_cv_sizeof_int"
177 ac_cv_sizeof_X="$ac_cv_sizeof_X:$ac_cv_sizeof_voidp:$ac_cv_sizeof_long"
178 if test "$ac_cv_header_stdint" = "stddef.h" ; then
179 # we must guess all the basic types. Apart from byte-adressable system,
180 # there a few 32-bit-only dsp-systems. nibble-addressable systems are way off.
181 cat >>$ac_stdint_h <<EOF
182 /* ------------ BITSPECIFIC INTTYPES SECTION --------------- */
183 EOF
184 t="typedefs for a"
185 case "$ac_cv_sizeof_X" in
186 1:2:2:2:4) AC_MSG_RESULT(..adding $t normal 16-bit system)
187 cat >>$ac_stdint_h <<EOF
188 /* a normal 16-bit system */
189 typedef unsigned char uint8_t;
190 typedef unsigned short uint16_t;
191 typedef unsigned long uint32_t;
192 #ifndef __int8_t_defined
193 #define __int8_t_defined
194 typedef char int8_t;
195 typedef short int16_t;
196 typedef long int32_t;
197 #endif
198 EOF
199 ;;
200 1:2:2:4:4) AC_MSG_RESULT(..adding $t 32-bit system derived from a 16-bit)
201 cat >>$ac_stdint_h <<EOF
202 /* a 32-bit system derived from a 16-bit */
203 typedef unsigned char uint8_t;
204 typedef unsigned short uint16_t;
205 typedef unsigned int uint32_t;
206 #ifndef __int8_t_defined
207 #define __int8_t_defined
208 typedef char int8_t;
209 typedef short int16_t;
210 typedef int int32_t;
211 #endif
212 EOF
213 ;;
214 1:2:4:4:4) AC_MSG_RESULT(..adding $t normal 32-bit system)
215 cat >>$ac_stdint_h <<EOF
216 /* a normal 32-bit system */
217 typedef unsigned char uint8_t;
218 typedef unsigned short uint16_t;
219 typedef unsigned int uint32_t;
220 #ifndef __int8_t_defined
221 #define __int8_t_defined
222 typedef char int8_t;
223 typedef short int16_t;
224 typedef int int32_t;
225 #endif
226 EOF
227 ;;
228 1:2:4:4:8) AC_MSG_RESULT(..adding $t 32-bit system prepared for 64-bit)
229 cat >>$ac_stdint_h <<EOF
230
231 /* a 32-bit system prepared for 64-bit */
232 typedef unsigned char uint8_t;
233 typedef unsigned short uint16_t;
234 typedef unsigned int uint32_t;
235 #ifndef __int8_t_defined
236 #define __int8_t_defined
237 typedef char int8_t;
238 typedef short int16_t;
239 typedef int int32_t;
240 #endif
241 EOF
242 ;;
243 1:2:4:8:8) AC_MSG_RESULT(..adding $t normal 64-bit system)
244 cat >>$ac_stdint_h <<EOF
245
246 /* a normal 64-bit system */
247 typedef unsigned char uint8_t;
248 typedef unsigned short uint16_t;
249 typedef unsigned int uint32_t;
250 #ifndef __int8_t_defined
251 #define __int8_t_defined
252 typedef char int8_t;
253 typedef short int16_t;
254 typedef int int32_t;
255 #endif
256 EOF
257 ;;
258 1:2:4:8:4) AC_MSG_RESULT(..adding $t 64-bit system derived from a 32-bit)
259 cat >>$ac_stdint_h <<EOF
260
261 /* a 64-bit system derived from a 32-bit system */
262 typedef unsigned char uint8_t;
263 typedef unsigned short uint16_t;
264 typedef unsigned int uint32_t;
265 #ifndef __int8_t_defined
266 #define __int8_t_defined
267 typedef char int8_t;
268 typedef short int16_t;
269 typedef int int32_t;
270 #endif
271 EOF
272 ;;
273 *)
274 AC_MSG_ERROR([ $ac_cv_sizeof_X dnl
275 what is that a system? contact the author, quick! http://ac-archive.sf.net])
276 exit 1
277 ;;
278 esac
279 fi
280
281 # ------------- DONE basic int types START int64_t types ------------
282 if test "$ac_cv_type_uint64_t" = "yes"
283 then AC_MSG_RESULT(... seen good uint64_t)
284 cat >>$ac_stdint_h <<EOF
285
286 /* system headers have good uint64_t */
287 #ifndef _HAVE_UINT64_T
288 #define _HAVE_UINT64_T
289 #endif
290 EOF
291
292 elif test "$ac_cv_type_u_int64_t" = "yes"
293 then AC_MSG_RESULT(..adding typedef u_int64_t uint64_t)
294 cat >>$ac_stdint_h <<EOF
295
296 /* system headers have an u_int64_t */
297 #ifndef _HAVE_UINT64_T
298 #define _HAVE_UINT64_T
299 typedef u_int64_t uint64_t;
300 #endif
301 EOF
302 else AC_MSG_RESULT(..adding generic uint64_t runtime checks)
303 cat >>$ac_stdint_h <<EOF
304
305 /* -------------------- 64 BIT GENERIC SECTION -------------------- */
306 /* here are some common heuristics using compiler runtime specifics */
307 #if defined __STDC_VERSION__ && defined __STDC_VERSION__ > 199901L
308
309 #ifndef _HAVE_UINT64_T
310 #define _HAVE_UINT64_T
311 typedef long long int64_t;
312 typedef unsigned long long uint64_t;
313 #endif
314
315 #elif !defined __STRICT_ANSI__
316 #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
317
318 #ifndef _HAVE_UINT64_T
319 #define _HAVE_UINT64_T
320 typedef __int64 int64_t;
321 typedef unsigned __int64 uint64_t;
322 #endif
323
324 #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
325 dnl /* note: all ELF-systems seem to have loff-support which needs 64-bit */
326
327 #if !defined _NO_LONGLONG
328 #ifndef _HAVE_UINT64_T
329 #define _HAVE_UINT64_T
330 typedef long long int64_t;
331 typedef unsigned long long uint64_t;
332 #endif
333 #endif
334
335 #elif defined __alpha || (defined __mips && defined _ABIN32)
336
337 #if !defined _NO_LONGLONG
338 #ifndef _HAVE_UINT64_T
339 #define _HAVE_UINT64_T
340 typedef long int64_t;
341 typedef unsigned long uint64_t;
342 #endif
343 #endif
344 /* compiler/cpu type ... or just ISO C99 */
345 #endif
346 #endif
347 EOF
348
349 # plus a default 64-bit for systems that are likely to be 64-bit ready
350 case "$ac_cv_sizeof_x:$ac_cv_sizeof_voidp:$ac_cv_sizeof_long" in
351 1:2:8:8) AC_MSG_RESULT(..adding uint64_t default, normal 64-bit system)
352 cat >>$ac_stdint_h <<EOF
353 /* DEFAULT: */
354 /* seen normal 64-bit system, CC has sizeof(long and void*) == 8 bytes */
355 #ifndef _HAVE_UINT64_T
356 #define _HAVE_UINT64_T
357 typedef long int64_t;
358 typedef unsigned long uint64_t;
359 #endif
360 EOF
361 ;;
362 1:2:4:8) AC_MSG_RESULT(..adding uint64_t default, typedef to long)
363 cat >>$ac_stdint_h <<EOF
364 /* DEFAULT: */
365 /* seen 32-bit system prepared for 64-bit, CC has sizeof(long) == 8 bytes */
366 #ifndef _HAVE_UINT64_T
367 #define _HAVE_UINT64_T
368 typedef long int64_t;
369 typedef unsigned long uint64_t;
370 #endif
371 EOF
372 ;;
373 1:2:8:4) AC_MSG_RESULT(..adding uint64_t default, typedef long long)
374 cat >>$ac_stdint_h <<EOF
375 /* DEFAULT: */
376 /* seen 64-bit derived from a 32-bit, CC has sizeof(long) == 4 bytes */
377 #ifndef _HAVE_UINT64_T
378 #define _HAVE_UINT64_T
379 typedef long long int64_t;
380 typedef unsigned long long uint64_t;
381 #endif
382 EOF
383 ;;
384 *)
385 cat >>$ac_stdint_h <<EOF
386 /* NOTE: */
387 /* the configure-checks for the basic types did not make us believe */
388 /* that we could add a fallback to a 'long long' typedef to int64_t */
389 EOF
390 esac
391 fi
392
393 # ------------- DONE int64_t types START intptr types ------------
394 if test "$ac_cv_header_stdint_x" = "no-file" ; then
395 cat >>$ac_stdint_h <<EOF
396
397 /* -------------------------- INPTR SECTION --------------------------- */
398 EOF
399 case "$ac_cv_sizeof_x:$ac_cv_sizeof_voidp" in
400 1:2:2)
401 a="int16_t" ; cat >>$ac_stdint_h <<EOF
402 /* we tested sizeof(void*) to be of 2 chars, hence we declare it 16-bit */
403
404 typedef uint16_t uintptr_t;
405 typedef int16_t intptr_t;
406 EOF
407 ;;
408 1:2:4)
409 a="int32_t" ; cat >>$ac_stdint_h <<EOF
410 /* we tested sizeof(void*) to be of 4 chars, hence we declare it 32-bit */
411
412 typedef uint32_t uintptr_t;
413 typedef int32_t intptr_t;
414 EOF
415 ;;
416 1:2:8)
417 a="int64_t" ; cat >>$ac_stdint_h <<EOF
418 /* we tested sizeof(void*) to be of 8 chars, hence we declare it 64-bit */
419
420 typedef uint64_t uintptr_t;
421 typedef int64_t intptr_t;
422 EOF
423 ;;
424 *)
425 a="long" ; cat >>$ac_stdint_h <<EOF
426 /* we tested sizeof(void*) but got no guess, hence we declare it as if long */
427
428 typedef unsigned long uintptr_t;
429 typedef long intptr_t;
430 EOF
431 ;;
432 esac
433 AC_MSG_RESULT(..adding typedef $a intptr_t)
434 fi
435
436 # ------------- DONE intptr types START int_least types ------------
437 if test "$ac_cv_type_int_least32_t" = "no"; then
438 AC_MSG_RESULT(..adding generic int_least-types)
439 cat >>$ac_stdint_h <<EOF
440
441 /* --------------GENERIC INT_LEAST ------------------ */
442
443 typedef int8_t int_least8_t;
444 typedef int16_t int_least16_t;
445 typedef int32_t int_least32_t;
446 #ifdef _HAVE_UINT64_T
447 typedef int64_t int_least64_t;
448 #endif
449
450 typedef uint8_t uint_least8_t;
451 typedef uint16_t uint_least16_t;
452 typedef uint32_t uint_least32_t;
453 #ifdef _HAVE_UINT64_T
454 typedef uint64_t uint_least64_t;
455 #endif
456 EOF
457 fi
458
459 # ------------- DONE intptr types START int_least types ------------
460 if test "$ac_cv_type_int_fast32_t" = "no"; then
461 AC_MSG_RESULT(..adding generic int_fast-types)
462 cat >>$ac_stdint_h <<EOF
463
464 /* --------------GENERIC INT_FAST ------------------ */
465
466 typedef int8_t int_fast8_t;
467 typedef int32_t int_fast16_t;
468 typedef int32_t int_fast32_t;
469 #ifdef _HAVE_UINT64_T
470 typedef int64_t int_fast64_t;
471 #endif
472
473 typedef uint8_t uint_fast8_t;
474 typedef uint32_t uint_fast16_t;
475 typedef uint32_t uint_fast32_t;
476 #ifdef _HAVE_UINT64_T
477 typedef uint64_t uint_fast64_t;
478 #endif
479 EOF
480 fi
481
482 if test "$ac_cv_header_stdint_x" = "no-file" ; then
483 cat >>$ac_stdint_h <<EOF
484
485 #ifdef _HAVE_UINT64_T
486 typedef int64_t intmax_t;
487 typedef uint64_t uintmax_t;
488 #else
489 typedef long int intmax_t;
490 typedef unsigned long uintmax_t;
491 #endif
492 EOF
493 fi
494
495 AC_MSG_RESULT(... DONE $ac_stdint_h)
496 cat >>$ac_stdint_h <<EOF
497
498 /* once */
499 #endif
500 #endif
501 EOF
502 ])
503
504 dnl quote from SunOS-5.8 sys/inttypes.h:
505 dnl Use at your own risk. As of February 1996, the committee is squarely
506 dnl behind the fixed sized types; the "least" and "fast" types are still being
507 dnl discussed. The probability that the "fast" types may be removed before
508 dnl the standard is finalized is high enough that they are not currently
509 dnl implemented.
510
511
512
513 # Do all the work for Automake. -*- Autoconf -*-
514
515 # This macro actually does too much some checks are only needed if
516 # your package does certain things. But this isn't really a big deal.
517
518 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
519 # Free Software Foundation, Inc.
520
521 # This program is free software; you can redistribute it and/or modify
522 # it under the terms of the GNU General Public License as published by
523 # the Free Software Foundation; either version 2, or (at your option)
524 # any later version.
525
526 # This program is distributed in the hope that it will be useful,
527 # but WITHOUT ANY WARRANTY; without even the implied warranty of
528 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
529 # GNU General Public License for more details.
530
531 # You should have received a copy of the GNU General Public License
532 # along with this program; if not, write to the Free Software
533 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
534 # 02111-1307, USA.
535
536 # serial 8
537
538 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
539 # written in clear, in which case automake, when reading aclocal.m4,
540 # will think it sees a *use*, and therefore will trigger all it's
541 # C support machinery. Also note that it means that autoscan, seeing
542 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
543
544
545 AC_PREREQ([2.52])
546
547 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
548 # the ones we care about.
549 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
550
551 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
552 # AM_INIT_AUTOMAKE([OPTIONS])
553 # -----------------------------------------------
554 # The call with PACKAGE and VERSION arguments is the old style
555 # call (pre autoconf-2.50), which is being phased out. PACKAGE
556 # and VERSION should now be passed to AC_INIT and removed from
557 # the call to AM_INIT_AUTOMAKE.
558 # We support both call styles for the transition. After
559 # the next Automake release, Autoconf can make the AC_INIT
560 # arguments mandatory, and then we can depend on a new Autoconf
561 # release and drop the old call support.
562 AC_DEFUN([AM_INIT_AUTOMAKE],
563 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
564 AC_REQUIRE([AC_PROG_INSTALL])dnl
565 # test to see if srcdir already configured
566 if test "`cd $srcdir && pwd`" != "`pwd`" &&
567 test -f $srcdir/config.status; then
568 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
569 fi
570
571 # Define the identity of the package.
572 dnl Distinguish between old-style and new-style calls.
573 m4_ifval([$2],
574 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
575 AC_SUBST([PACKAGE], [$1])dnl
576 AC_SUBST([VERSION], [$2])],
577 [_AM_SET_OPTIONS([$1])dnl
578 AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
579 AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
580
581 _AM_IF_OPTION([no-define],,
582 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
583 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
584
585 # Some tools Automake needs.
586 AC_REQUIRE([AM_SANITY_CHECK])dnl
587 AC_REQUIRE([AC_ARG_PROGRAM])dnl
588 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
589 AM_MISSING_PROG(AUTOCONF, autoconf)
590 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
591 AM_MISSING_PROG(AUTOHEADER, autoheader)
592 AM_MISSING_PROG(MAKEINFO, makeinfo)
593 AM_MISSING_PROG(AMTAR, tar)
594 AM_PROG_INSTALL_SH
595 AM_PROG_INSTALL_STRIP
596 # We need awk for the "check" target. The system "awk" is bad on
597 # some platforms.
598 AC_REQUIRE([AC_PROG_AWK])dnl
599 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
600
601 _AM_IF_OPTION([no-dependencies],,
602 [AC_PROVIDE_IFELSE([AC_PROG_][CC],
603 [_AM_DEPENDENCIES(CC)],
604 [define([AC_PROG_][CC],
605 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
606 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
607 [_AM_DEPENDENCIES(CXX)],
608 [define([AC_PROG_][CXX],
609 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
610 ])
611 ])
612
613 # Copyright 2002 Free Software Foundation, Inc.
614
615 # This program is free software; you can redistribute it and/or modify
616 # it under the terms of the GNU General Public License as published by
617 # the Free Software Foundation; either version 2, or (at your option)
618 # any later version.
619
620 # This program is distributed in the hope that it will be useful,
621 # but WITHOUT ANY WARRANTY; without even the implied warranty of
622 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
623 # GNU General Public License for more details.
624
625 # You should have received a copy of the GNU General Public License
626 # along with this program; if not, write to the Free Software
627 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
628
629 # AM_AUTOMAKE_VERSION(VERSION)
630 # ----------------------------
631 # Automake X.Y traces this macro to ensure aclocal.m4 has been
632 # generated from the m4 files accompanying Automake X.Y.
633 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
634
635 # AM_SET_CURRENT_AUTOMAKE_VERSION
636 # -------------------------------
637 # Call AM_AUTOMAKE_VERSION so it can be traced.
638 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
639 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
640 [AM_AUTOMAKE_VERSION([1.6.3])])
641
642 # Helper functions for option handling. -*- Autoconf -*-
643
644 # Copyright 2001, 2002 Free Software Foundation, Inc.
645
646 # This program is free software; you can redistribute it and/or modify
647 # it under the terms of the GNU General Public License as published by
648 # the Free Software Foundation; either version 2, or (at your option)
649 # any later version.
650
651 # This program is distributed in the hope that it will be useful,
652 # but WITHOUT ANY WARRANTY; without even the implied warranty of
653 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
654 # GNU General Public License for more details.
655
656 # You should have received a copy of the GNU General Public License
657 # along with this program; if not, write to the Free Software
658 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
659 # 02111-1307, USA.
660
661 # serial 2
662
663 # _AM_MANGLE_OPTION(NAME)
664 # -----------------------
665 AC_DEFUN([_AM_MANGLE_OPTION],
666 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
667
668 # _AM_SET_OPTION(NAME)
669 # ------------------------------
670 # Set option NAME. Presently that only means defining a flag for this option.
671 AC_DEFUN([_AM_SET_OPTION],
672 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
673
674 # _AM_SET_OPTIONS(OPTIONS)
675 # ----------------------------------
676 # OPTIONS is a space-separated list of Automake options.
677 AC_DEFUN([_AM_SET_OPTIONS],
678 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
679
680 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
681 # -------------------------------------------
682 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
683 AC_DEFUN([_AM_IF_OPTION],
684 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
685
686 #
687 # Check to make sure that the build environment is sane.
688 #
689
690 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
691
692 # This program is free software; you can redistribute it and/or modify
693 # it under the terms of the GNU General Public License as published by
694 # the Free Software Foundation; either version 2, or (at your option)
695 # any later version.
696
697 # This program is distributed in the hope that it will be useful,
698 # but WITHOUT ANY WARRANTY; without even the implied warranty of
699 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
700 # GNU General Public License for more details.
701
702 # You should have received a copy of the GNU General Public License
703 # along with this program; if not, write to the Free Software
704 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
705 # 02111-1307, USA.
706
707 # serial 3
708
709 # AM_SANITY_CHECK
710 # ---------------
711 AC_DEFUN([AM_SANITY_CHECK],
712 [AC_MSG_CHECKING([whether build environment is sane])
713 # Just in case
714 sleep 1
715 echo timestamp > conftest.file
716 # Do `set' in a subshell so we don't clobber the current shell's
717 # arguments. Must try -L first in case configure is actually a
718 # symlink; some systems play weird games with the mod time of symlinks
719 # (eg FreeBSD returns the mod time of the symlink's containing
720 # directory).
721 if (
722 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
723 if test "$[*]" = "X"; then
724 # -L didn't work.
725 set X `ls -t $srcdir/configure conftest.file`
726 fi
727 rm -f conftest.file
728 if test "$[*]" != "X $srcdir/configure conftest.file" \
729 && test "$[*]" != "X conftest.file $srcdir/configure"; then
730
731 # If neither matched, then we have a broken ls. This can happen
732 # if, for instance, CONFIG_SHELL is bash and it inherits a
733 # broken ls alias from the environment. This has actually
734 # happened. Such a system could not be considered "sane".
735 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
736 alias in your environment])
737 fi
738
739 test "$[2]" = conftest.file
740 )
741 then
742 # Ok.
743 :
744 else
745 AC_MSG_ERROR([newly created file is older than distributed files!
746 Check your system clock])
747 fi
748 AC_MSG_RESULT(yes)])
749
750 # -*- Autoconf -*-
751
752
753 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
754
755 # This program is free software; you can redistribute it and/or modify
756 # it under the terms of the GNU General Public License as published by
757 # the Free Software Foundation; either version 2, or (at your option)
758 # any later version.
759
760 # This program is distributed in the hope that it will be useful,
761 # but WITHOUT ANY WARRANTY; without even the implied warranty of
762 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
763 # GNU General Public License for more details.
764
765 # You should have received a copy of the GNU General Public License
766 # along with this program; if not, write to the Free Software
767 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
768 # 02111-1307, USA.
769
770 # serial 3
771
772 # AM_MISSING_PROG(NAME, PROGRAM)
773 # ------------------------------
774 AC_DEFUN([AM_MISSING_PROG],
775 [AC_REQUIRE([AM_MISSING_HAS_RUN])
776 $1=${$1-"${am_missing_run}$2"}
777 AC_SUBST($1)])
778
779
780 # AM_MISSING_HAS_RUN
781 # ------------------
782 # Define MISSING if not defined so far and test if it supports --run.
783 # If it does, set am_missing_run to use it, otherwise, to nothing.
784 AC_DEFUN([AM_MISSING_HAS_RUN],
785 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
786 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
787 # Use eval to expand $SHELL
788 if eval "$MISSING --run true"; then
789 am_missing_run="$MISSING --run "
790 else
791 am_missing_run=
792 AC_MSG_WARN([`missing' script is too old or missing])
793 fi
794 ])
795
796 # AM_AUX_DIR_EXPAND
797
798 # Copyright 2001 Free Software Foundation, Inc.
799
800 # This program is free software; you can redistribute it and/or modify
801 # it under the terms of the GNU General Public License as published by
802 # the Free Software Foundation; either version 2, or (at your option)
803 # any later version.
804
805 # This program is distributed in the hope that it will be useful,
806 # but WITHOUT ANY WARRANTY; without even the implied warranty of
807 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
808 # GNU General Public License for more details.
809
810 # You should have received a copy of the GNU General Public License
811 # along with this program; if not, write to the Free Software
812 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
813 # 02111-1307, USA.
814
815 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
816 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
817 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
818 #
819 # Of course, Automake must honor this variable whenever it calls a
820 # tool from the auxiliary directory. The problem is that $srcdir (and
821 # therefore $ac_aux_dir as well) can be either absolute or relative,
822 # depending on how configure is run. This is pretty annoying, since
823 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
824 # source directory, any form will work fine, but in subdirectories a
825 # relative path needs to be adjusted first.
826 #
827 # $ac_aux_dir/missing
828 # fails when called from a subdirectory if $ac_aux_dir is relative
829 # $top_srcdir/$ac_aux_dir/missing
830 # fails if $ac_aux_dir is absolute,
831 # fails when called from a subdirectory in a VPATH build with
832 # a relative $ac_aux_dir
833 #
834 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
835 # are both prefixed by $srcdir. In an in-source build this is usually
836 # harmless because $srcdir is `.', but things will broke when you
837 # start a VPATH build or use an absolute $srcdir.
838 #
839 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
840 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
841 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
842 # and then we would define $MISSING as
843 # MISSING="\${SHELL} $am_aux_dir/missing"
844 # This will work as long as MISSING is not called from configure, because
845 # unfortunately $(top_srcdir) has no meaning in configure.
846 # However there are other variables, like CC, which are often used in
847 # configure, and could therefore not use this "fixed" $ac_aux_dir.
848 #
849 # Another solution, used here, is to always expand $ac_aux_dir to an
850 # absolute PATH. The drawback is that using absolute paths prevent a
851 # configured tree to be moved without reconfiguration.
852
853 # Rely on autoconf to set up CDPATH properly.
854 AC_PREREQ([2.50])
855
856 AC_DEFUN([AM_AUX_DIR_EXPAND], [
857 # expand $ac_aux_dir to an absolute path
858 am_aux_dir=`cd $ac_aux_dir && pwd`
859 ])
860
861 # AM_PROG_INSTALL_SH
862 # ------------------
863 # Define $install_sh.
864
865 # Copyright 2001 Free Software Foundation, Inc.
866
867 # This program is free software; you can redistribute it and/or modify
868 # it under the terms of the GNU General Public License as published by
869 # the Free Software Foundation; either version 2, or (at your option)
870 # any later version.
871
872 # This program is distributed in the hope that it will be useful,
873 # but WITHOUT ANY WARRANTY; without even the implied warranty of
874 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
875 # GNU General Public License for more details.
876
877 # You should have received a copy of the GNU General Public License
878 # along with this program; if not, write to the Free Software
879 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
880 # 02111-1307, USA.
881
882 AC_DEFUN([AM_PROG_INSTALL_SH],
883 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
884 install_sh=${install_sh-"$am_aux_dir/install-sh"}
885 AC_SUBST(install_sh)])
886
887 # AM_PROG_INSTALL_STRIP
888
889 # Copyright 2001 Free Software Foundation, Inc.
890
891 # This program is free software; you can redistribute it and/or modify
892 # it under the terms of the GNU General Public License as published by
893 # the Free Software Foundation; either version 2, or (at your option)
894 # any later version.
895
896 # This program is distributed in the hope that it will be useful,
897 # but WITHOUT ANY WARRANTY; without even the implied warranty of
898 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
899 # GNU General Public License for more details.
900
901 # You should have received a copy of the GNU General Public License
902 # along with this program; if not, write to the Free Software
903 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
904 # 02111-1307, USA.
905
906 # One issue with vendor `install' (even GNU) is that you can't
907 # specify the program used to strip binaries. This is especially
908 # annoying in cross-compiling environments, where the build's strip
909 # is unlikely to handle the host's binaries.
910 # Fortunately install-sh will honor a STRIPPROG variable, so we
911 # always use install-sh in `make install-strip', and initialize
912 # STRIPPROG with the value of the STRIP variable (set by the user).
913 AC_DEFUN([AM_PROG_INSTALL_STRIP],
914 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
915 # Installed binaries are usually stripped using `strip' when the user
916 # run `make install-strip'. However `strip' might not be the right
917 # tool to use in cross-compilation environments, therefore Automake
918 # will honor the `STRIP' environment variable to overrule this program.
919 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
920 if test "$cross_compiling" != no; then
921 AC_CHECK_TOOL([STRIP], [strip], :)
922 fi
923 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
924 AC_SUBST([INSTALL_STRIP_PROGRAM])])
925
926 # serial 4 -*- Autoconf -*-
927
928 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
929
930 # This program is free software; you can redistribute it and/or modify
931 # it under the terms of the GNU General Public License as published by
932 # the Free Software Foundation; either version 2, or (at your option)
933 # any later version.
934
935 # This program is distributed in the hope that it will be useful,
936 # but WITHOUT ANY WARRANTY; without even the implied warranty of
937 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
938 # GNU General Public License for more details.
939
940 # You should have received a copy of the GNU General Public License
941 # along with this program; if not, write to the Free Software
942 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
943 # 02111-1307, USA.
944
945
946 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
947 # written in clear, in which case automake, when reading aclocal.m4,
948 # will think it sees a *use*, and therefore will trigger all it's
949 # C support machinery. Also note that it means that autoscan, seeing
950 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
951
952
953
954 # _AM_DEPENDENCIES(NAME)
955 # ----------------------
956 # See how the compiler implements dependency checking.
957 # NAME is "CC", "CXX", "GCJ", or "OBJC".
958 # We try a few techniques and use that to set a single cache variable.
959 #
960 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
961 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
962 # dependency, and given that the user is not expected to run this macro,
963 # just rely on AC_PROG_CC.
964 AC_DEFUN([_AM_DEPENDENCIES],
965 [AC_REQUIRE([AM_SET_DEPDIR])dnl
966 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
967 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
968 AC_REQUIRE([AM_DEP_TRACK])dnl
969
970 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
971 [$1], CXX, [depcc="$CXX" am_compiler_list=],
972 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
973 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
974 [depcc="$$1" am_compiler_list=])
975
976 AC_CACHE_CHECK([dependency style of $depcc],
977 [am_cv_$1_dependencies_compiler_type],
978 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
979 # We make a subdir and do the tests there. Otherwise we can end up
980 # making bogus files that we don't know about and never remove. For
981 # instance it was reported that on HP-UX the gcc test will end up
982 # making a dummy file named `D' -- because `-MD' means `put the output
983 # in D'.
984 mkdir conftest.dir
985 # Copy depcomp to subdir because otherwise we won't find it if we're
986 # using a relative directory.
987 cp "$am_depcomp" conftest.dir
988 cd conftest.dir
989
990 am_cv_$1_dependencies_compiler_type=none
991 if test "$am_compiler_list" = ""; then
992 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
993 fi
994 for depmode in $am_compiler_list; do
995 # We need to recreate these files for each test, as the compiler may
996 # overwrite some of them when testing with obscure command lines.
997 # This happens at least with the AIX C compiler.
998 echo '#include "conftest.h"' > conftest.c
999 echo 'int i;' > conftest.h
1000 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
1001
1002 case $depmode in
1003 nosideeffect)
1004 # after this tag, mechanisms are not by side-effect, so they'll
1005 # only be used when explicitly requested
1006 if test "x$enable_dependency_tracking" = xyes; then
1007 continue
1008 else
1009 break
1010 fi
1011 ;;
1012 none) break ;;
1013 esac
1014 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1015 # mode. It turns out that the SunPro C++ compiler does not properly
1016 # handle `-M -o', and we need to detect this.
1017 if depmode=$depmode \
1018 source=conftest.c object=conftest.o \
1019 depfile=conftest.Po tmpdepfile=conftest.TPo \
1020 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
1021 grep conftest.h conftest.Po > /dev/null 2>&1 &&
1022 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1023 am_cv_$1_dependencies_compiler_type=$depmode
1024 break
1025 fi
1026 done
1027
1028 cd ..
1029 rm -rf conftest.dir
1030 else
1031 am_cv_$1_dependencies_compiler_type=none
1032 fi
1033 ])
1034 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1035 ])
1036
1037
1038 # AM_SET_DEPDIR
1039 # -------------
1040 # Choose a directory name for dependency files.
1041 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1042 AC_DEFUN([AM_SET_DEPDIR],
1043 [rm -f .deps 2>/dev/null
1044 mkdir .deps 2>/dev/null
1045 if test -d .deps; then
1046 DEPDIR=.deps
1047 else
1048 # MS-DOS does not allow filenames that begin with a dot.
1049 DEPDIR=_deps
1050 fi
1051 rmdir .deps 2>/dev/null
1052 AC_SUBST([DEPDIR])
1053 ])
1054
1055
1056 # AM_DEP_TRACK
1057 # ------------
1058 AC_DEFUN([AM_DEP_TRACK],
1059 [AC_ARG_ENABLE(dependency-tracking,
1060 [ --disable-dependency-tracking Speeds up one-time builds
1061 --enable-dependency-tracking Do not reject slow dependency extractors])
1062 if test "x$enable_dependency_tracking" != xno; then
1063 am_depcomp="$ac_aux_dir/depcomp"
1064 AMDEPBACKSLASH='\'
1065 fi
1066 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1067 AC_SUBST([AMDEPBACKSLASH])
1068 ])
1069
1070 # Generate code to set up dependency tracking. -*- Autoconf -*-
1071
1072 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1073
1074 # This program is free software; you can redistribute it and/or modify
1075 # it under the terms of the GNU General Public License as published by
1076 # the Free Software Foundation; either version 2, or (at your option)
1077 # any later version.
1078
1079 # This program is distributed in the hope that it will be useful,
1080 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1081 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1082 # GNU General Public License for more details.
1083
1084 # You should have received a copy of the GNU General Public License
1085 # along with this program; if not, write to the Free Software
1086 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1087 # 02111-1307, USA.
1088
1089 #serial 2
1090
1091 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1092 # ------------------------------
1093 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1094 [for mf in $CONFIG_FILES; do
1095 # Strip MF so we end up with the name of the file.
1096 mf=`echo "$mf" | sed -e 's/:.*$//'`
1097 # Check whether this is an Automake generated Makefile or not.
1098 # We used to match only the files named `Makefile.in', but
1099 # some people rename them; so instead we look at the file content.
1100 # Grep'ing the first line is not enough: some people post-process
1101 # each Makefile.in and add a new line on top of each file to say so.
1102 # So let's grep whole file.
1103 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1104 dirpart=`AS_DIRNAME("$mf")`
1105 else
1106 continue
1107 fi
1108 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
1109 # Extract the definition of DEP_FILES from the Makefile without
1110 # running `make'.
1111 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1112 test -z "$DEPDIR" && continue
1113 # When using ansi2knr, U may be empty or an underscore; expand it
1114 U=`sed -n -e '/^U = / s///p' < "$mf"`
1115 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1116 # We invoke sed twice because it is the simplest approach to
1117 # changing $(DEPDIR) to its actual value in the expansion.
1118 for file in `sed -n -e '
1119 /^DEP_FILES = .*\\\\$/ {
1120 s/^DEP_FILES = //
1121 :loop
1122 s/\\\\$//
1123 p
1124 n
1125 /\\\\$/ b loop
1126 p
1127 }
1128 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1129 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1130 # Make sure the directory exists.
1131 test -f "$dirpart/$file" && continue
1132 fdir=`AS_DIRNAME(["$file"])`
1133 AS_MKDIR_P([$dirpart/$fdir])
1134 # echo "creating $dirpart/$file"
1135 echo '# dummy' > "$dirpart/$file"
1136 done
1137 done
1138 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1139
1140
1141 # AM_OUTPUT_DEPENDENCY_COMMANDS
1142 # -----------------------------
1143 # This macro should only be invoked once -- use via AC_REQUIRE.
1144 #
1145 # This code is only required when automatic dependency tracking
1146 # is enabled. FIXME. This creates each `.P' file that we will
1147 # need in order to bootstrap the dependency handling code.
1148 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1149 [AC_CONFIG_COMMANDS([depfiles],
1150 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1151 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1152 ])
1153
1154 # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
1155
1156 # This program is free software; you can redistribute it and/or modify
1157 # it under the terms of the GNU General Public License as published by
1158 # the Free Software Foundation; either version 2, or (at your option)
1159 # any later version.
1160
1161 # This program is distributed in the hope that it will be useful,
1162 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1163 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1164 # GNU General Public License for more details.
1165
1166 # You should have received a copy of the GNU General Public License
1167 # along with this program; if not, write to the Free Software
1168 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1169 # 02111-1307, USA.
1170
1171 # serial 2
1172
1173 # AM_MAKE_INCLUDE()
1174 # -----------------
1175 # Check to see how make treats includes.
1176 AC_DEFUN([AM_MAKE_INCLUDE],
1177 [am_make=${MAKE-make}
1178 cat > confinc << 'END'
1179 doit:
1180 @echo done
1181 END
1182 # If we don't find an include directive, just comment out the code.
1183 AC_MSG_CHECKING([for style of include used by $am_make])
1184 am__include="#"
1185 am__quote=
1186 _am_result=none
1187 # First try GNU make style include.
1188 echo "include confinc" > confmf
1189 # We grep out `Entering directory' and `Leaving directory'
1190 # messages which can occur if `w' ends up in MAKEFLAGS.
1191 # In particular we don't look at `^make:' because GNU make might
1192 # be invoked under some other name (usually "gmake"), in which
1193 # case it prints its new name instead of `make'.
1194 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
1195 am__include=include
1196 am__quote=
1197 _am_result=GNU
1198 fi
1199 # Now try BSD make style include.
1200 if test "$am__include" = "#"; then
1201 echo '.include "confinc"' > confmf
1202 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1203 am__include=.include
1204 am__quote="\""
1205 _am_result=BSD
1206 fi
1207 fi
1208 AC_SUBST(am__include)
1209 AC_SUBST(am__quote)
1210 AC_MSG_RESULT($_am_result)
1211 rm -f confinc confmf
1212 ])
1213
1214 # AM_CONDITIONAL -*- Autoconf -*-
1215
1216 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1217
1218 # This program is free software; you can redistribute it and/or modify
1219 # it under the terms of the GNU General Public License as published by
1220 # the Free Software Foundation; either version 2, or (at your option)
1221 # any later version.
1222
1223 # This program is distributed in the hope that it will be useful,
1224 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1226 # GNU General Public License for more details.
1227
1228 # You should have received a copy of the GNU General Public License
1229 # along with this program; if not, write to the Free Software
1230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1231 # 02111-1307, USA.
1232
1233 # serial 5
1234
1235 AC_PREREQ(2.52)
1236
1237 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
1238 # -------------------------------------
1239 # Define a conditional.
1240 AC_DEFUN([AM_CONDITIONAL],
1241 [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1242 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1243 AC_SUBST([$1_TRUE])
1244 AC_SUBST([$1_FALSE])
1245 if $2; then
1246 $1_TRUE=
1247 $1_FALSE='#'
1248 else
1249 $1_TRUE='#'
1250 $1_FALSE=
1251 fi
1252 AC_CONFIG_COMMANDS_PRE(
1253 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1254 AC_MSG_ERROR([conditional \"$1\" was never defined.
1255 Usually this means the macro was only invoked conditionally.])
1256 fi])])
1257
1258 # Add --enable-maintainer-mode option to configure.
1259 # From Jim Meyering
1260
1261 # Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
1262
1263 # This program is free software; you can redistribute it and/or modify
1264 # it under the terms of the GNU General Public License as published by
1265 # the Free Software Foundation; either version 2, or (at your option)
1266 # any later version.
1267
1268 # This program is distributed in the hope that it will be useful,
1269 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1270 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1271 # GNU General Public License for more details.
1272
1273 # You should have received a copy of the GNU General Public License
1274 # along with this program; if not, write to the Free Software
1275 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1276 # 02111-1307, USA.
1277
1278 # serial 1
1279
1280 AC_DEFUN([AM_MAINTAINER_MODE],
1281 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1282 dnl maintainer-mode is disabled by default
1283 AC_ARG_ENABLE(maintainer-mode,
1284 [ --enable-maintainer-mode enable make rules and dependencies not useful
1285 (and sometimes confusing) to the casual installer],
1286 USE_MAINTAINER_MODE=$enableval,
1287 USE_MAINTAINER_MODE=no)
1288 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1289 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1290 MAINT=$MAINTAINER_MODE_TRUE
1291 AC_SUBST(MAINT)dnl
1292 ]
1293 )
1294
1295 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1296
1297 # serial 47 AC_PROG_LIBTOOL
1298
1299
1300 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1301 # -----------------------------------------------------------
1302 # If this macro is not defined by Autoconf, define it here.
1303 m4_ifdef([AC_PROVIDE_IFELSE],
1304 [],
1305 [m4_define([AC_PROVIDE_IFELSE],
1306 [m4_ifdef([AC_PROVIDE_$1],
1307 [$2], [$3])])])
1308
1309
1310 # AC_PROG_LIBTOOL
1311 # ---------------
1312 AC_DEFUN([AC_PROG_LIBTOOL],
1313 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1314 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1315 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1316 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1317 [AC_LIBTOOL_CXX],
1318 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1319 ])])
1320 dnl And a similar setup for Fortran 77 support
1321 AC_PROVIDE_IFELSE([AC_PROG_F77],
1322 [AC_LIBTOOL_F77],
1323 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1324 ])])
1325
1326 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1327 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1328 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1329 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1330 [AC_LIBTOOL_GCJ],
1331 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1332 [AC_LIBTOOL_GCJ],
1333 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1334 [AC_LIBTOOL_GCJ],
1335 [ifdef([AC_PROG_GCJ],
1336 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1337 ifdef([A][M_PROG_GCJ],
1338 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1339 ifdef([LT_AC_PROG_GCJ],
1340 [define([LT_AC_PROG_GCJ],
1341 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1342 ])])# AC_PROG_LIBTOOL
1343
1344
1345 # _AC_PROG_LIBTOOL
1346 # ----------------
1347 AC_DEFUN([_AC_PROG_LIBTOOL],
1348 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1349 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1350 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1351 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1352
1353 # This can be used to rebuild libtool when needed
1354 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1355
1356 # Always use our own libtool.
1357 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1358 AC_SUBST(LIBTOOL)dnl
1359
1360 # Prevent multiple expansion
1361 define([AC_PROG_LIBTOOL], [])
1362 ])# _AC_PROG_LIBTOOL
1363
1364
1365 # AC_LIBTOOL_SETUP
1366 # ----------------
1367 AC_DEFUN([AC_LIBTOOL_SETUP],
1368 [AC_PREREQ(2.50)dnl
1369 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1370 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1371 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1372 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1373 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1374 AC_REQUIRE([AC_PROG_CC])dnl
1375 AC_REQUIRE([AC_PROG_LD])dnl
1376 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1377 AC_REQUIRE([AC_PROG_NM])dnl
1378
1379 AC_REQUIRE([AC_PROG_LN_S])dnl
1380 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1381 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1382 AC_REQUIRE([AC_OBJEXT])dnl
1383 AC_REQUIRE([AC_EXEEXT])dnl
1384 dnl
1385
1386 AC_LIBTOOL_SYS_MAX_CMD_LEN
1387 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1388 AC_LIBTOOL_OBJDIR
1389
1390 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1391 _LT_AC_PROG_ECHO_BACKSLASH
1392
1393 case $host_os in
1394 aix3*)
1395 # AIX sometimes has problems with the GCC collect2 program. For some
1396 # reason, if we set the COLLECT_NAMES environment variable, the problems
1397 # vanish in a puff of smoke.
1398 if test "X${COLLECT_NAMES+set}" != Xset; then
1399 COLLECT_NAMES=
1400 export COLLECT_NAMES
1401 fi
1402 ;;
1403 esac
1404
1405 # Sed substitution that helps us do robust quoting. It backslashifies
1406 # metacharacters that are still active within double-quoted strings.
1407 Xsed='sed -e s/^X//'
1408 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1409
1410 # Same as above, but do not quote variable references.
1411 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1412
1413 # Sed substitution to delay expansion of an escaped shell variable in a
1414 # double_quote_subst'ed string.
1415 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1416
1417 # Sed substitution to undo escaping of the cmd sep variable
1418 unescape_variable_subst='s/\\\(${_S_}\)/\1/g'
1419
1420 # Sed substitution to avoid accidental globbing in evaled expressions
1421 no_glob_subst='s/\*/\\\*/g'
1422
1423 # Constants:
1424 rm="rm -f"
1425
1426 # Global variables:
1427 default_ofile=libtool
1428 can_build_shared=yes
1429
1430 # All known linkers require a `.a' archive for static linking (except M$VC,
1431 # which needs '.lib').
1432 libext=a
1433 ltmain="$ac_aux_dir/ltmain.sh"
1434 ofile="$default_ofile"
1435 with_gnu_ld="$lt_cv_prog_gnu_ld"
1436
1437 AC_CHECK_TOOL(AR, ar, false)
1438 AC_CHECK_TOOL(RANLIB, ranlib, :)
1439 AC_CHECK_TOOL(STRIP, strip, :)
1440
1441 old_CC="$CC"
1442 old_CFLAGS="$CFLAGS"
1443
1444 # Set sane defaults for various variables
1445 test -z "$AR" && AR=ar
1446 test -z "$AR_FLAGS" && AR_FLAGS=cru
1447 test -z "$AS" && AS=as
1448 test -z "$CC" && CC=cc
1449 test -z "$LTCC" && LTCC=$CC
1450 test -z "$DLLTOOL" && DLLTOOL=dlltool
1451 test -z "$LD" && LD=ld
1452 test -z "$LN_S" && LN_S="ln -s"
1453 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1454 test -z "$NM" && NM=nm
1455 test -z "$SED" && SED=sed
1456 test -z "$OBJDUMP" && OBJDUMP=objdump
1457 test -z "$RANLIB" && RANLIB=:
1458 test -z "$STRIP" && STRIP=:
1459 test -z "$ac_objext" && ac_objext=o
1460
1461 # Determine commands to create old-style static archives.
1462 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1463 old_postinstall_cmds='chmod 644 $oldlib'
1464 old_postuninstall_cmds=
1465
1466 if test -n "$RANLIB"; then
1467 case $host_os in
1468 openbsd*)
1469 old_postinstall_cmds="\$RANLIB -t \$oldlib\${_S_}$old_postinstall_cmds"
1470 ;;
1471 *)
1472 old_postinstall_cmds="\$RANLIB \$oldlib\${_S_}$old_postinstall_cmds"
1473 ;;
1474 esac
1475 old_archive_cmds="$old_archive_cmds\${_S_}\$RANLIB \$oldlib"
1476 fi
1477
1478 # Only perform the check for file, if the check method requires it
1479 case $deplibs_check_method in
1480 file_magic*)
1481 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1482 AC_PATH_MAGIC
1483 fi
1484 ;;
1485 esac
1486
1487 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1488 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1489 enable_win32_dll=yes, enable_win32_dll=no)
1490
1491 AC_ARG_ENABLE([libtool-lock],
1492 [AC_HELP_STRING([--disable-libtool-lock],
1493 [avoid locking (might break parallel builds)])])
1494 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1495
1496 AC_ARG_WITH([pic],
1497 [AC_HELP_STRING([--with-pic],
1498 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1499 [pic_mode="$withval"],
1500 [pic_mode=default])
1501 test -z "$pic_mode" && pic_mode=default
1502
1503 # Use C for the default configuration in the libtool script
1504 tagname=
1505 AC_LIBTOOL_LANG_C_CONFIG
1506 _LT_AC_TAGCONFIG
1507 ])# AC_LIBTOOL_SETUP
1508
1509
1510 # _LT_AC_SYS_COMPILER
1511 # -------------------
1512 AC_DEFUN([_LT_AC_SYS_COMPILER],
1513 [AC_REQUIRE([AC_PROG_CC])dnl
1514
1515 # If no C compiler was specified, use CC.
1516 LTCC=${LTCC-"$CC"}
1517
1518 # Allow CC to be a program name with arguments.
1519 compiler=$CC
1520 ])# _LT_AC_SYS_COMPILER
1521
1522
1523 # _LT_AC_SYS_LIBPATH_AIX
1524 # ----------------------
1525 # Links a minimal program and checks the executable
1526 # for the system default hardcoded library path. In most cases,
1527 # this is /usr/lib:/lib, but when the MPI compilers are used
1528 # the location of the communication and MPI libs are included too.
1529 # If we don't find anything, use the default library path according
1530 # to the aix ld manual.
1531 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1532 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1533 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1534 }'`
1535 # Check for a 64-bit object if we didn't find anything.
1536 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; }
1537 }'`; fi],[])
1538 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1539 ])# _LT_AC_SYS_LIBPATH_AIX
1540
1541
1542 # _LT_AC_SHELL_INIT(ARG)
1543 # ----------------------
1544 AC_DEFUN([_LT_AC_SHELL_INIT],
1545 [ifdef([AC_DIVERSION_NOTICE],
1546 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1547 [AC_DIVERT_PUSH(NOTICE)])
1548 $1
1549 AC_DIVERT_POP
1550 ])# _LT_AC_SHELL_INIT
1551
1552
1553 # _LT_AC_PROG_ECHO_BACKSLASH
1554 # --------------------------
1555 # Add some code to the start of the generated configure script which
1556 # will find an echo command which doesn't interpret backslashes.
1557 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1558 [_LT_AC_SHELL_INIT([
1559 # Check that we are running under the correct shell.
1560 SHELL=${CONFIG_SHELL-/bin/sh}
1561
1562 case X$ECHO in
1563 X*--fallback-echo)
1564 # Remove one level of quotation (which was required for Make).
1565 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1566 ;;
1567 esac
1568
1569 echo=${ECHO-echo}
1570 if test "X[$]1" = X--no-reexec; then
1571 # Discard the --no-reexec flag, and continue.
1572 shift
1573 elif test "X[$]1" = X--fallback-echo; then
1574 # Avoid inline document here, it may be left over
1575 :
1576 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1577 # Yippee, $echo works!
1578 :
1579 else
1580 # Restart under the correct shell.
1581 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1582 fi
1583
1584 if test "X[$]1" = X--fallback-echo; then
1585 # used as fallback echo
1586 shift
1587 cat <<EOF
1588 [$]*
1589 EOF
1590 exit 0
1591 fi
1592
1593 # The HP-UX ksh and POSIX shell print the target directory to stdout
1594 # if CDPATH is set.
1595 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1596
1597 if test -z "$ECHO"; then
1598 if test "X${echo_test_string+set}" != Xset; then
1599 # find a string as large as possible, as long as the shell can cope with it
1600 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1601 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1602 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1603 echo_test_string="`eval $cmd`" &&
1604 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1605 then
1606 break
1607 fi
1608 done
1609 fi
1610
1611 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1612 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1613 test "X$echo_testing_string" = "X$echo_test_string"; then
1614 :
1615 else
1616 # The Solaris, AIX, and Digital Unix default echo programs unquote
1617 # backslashes. This makes it impossible to quote backslashes using
1618 # echo "$something" | sed 's/\\/\\\\/g'
1619 #
1620 # So, first we look for a working echo in the user's PATH.
1621
1622 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1623 for dir in $PATH /usr/ucb; do
1624 IFS="$lt_save_ifs"
1625 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1626 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1627 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1628 test "X$echo_testing_string" = "X$echo_test_string"; then
1629 echo="$dir/echo"
1630 break
1631 fi
1632 done
1633 IFS="$lt_save_ifs"
1634
1635 if test "X$echo" = Xecho; then
1636 # We didn't find a better echo, so look for alternatives.
1637 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1638 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1639 test "X$echo_testing_string" = "X$echo_test_string"; then
1640 # This shell has a builtin print -r that does the trick.
1641 echo='print -r'
1642 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1643 test "X$CONFIG_SHELL" != X/bin/ksh; then
1644 # If we have ksh, try running configure again with it.
1645 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1646 export ORIGINAL_CONFIG_SHELL
1647 CONFIG_SHELL=/bin/ksh
1648 export CONFIG_SHELL
1649 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1650 else
1651 # Try using printf.
1652 echo='printf %s\n'
1653 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1654 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1655 test "X$echo_testing_string" = "X$echo_test_string"; then
1656 # Cool, printf works
1657 :
1658 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1659 test "X$echo_testing_string" = 'X\t' &&
1660 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1661 test "X$echo_testing_string" = "X$echo_test_string"; then
1662 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1663 export CONFIG_SHELL
1664 SHELL="$CONFIG_SHELL"
1665 export SHELL
1666 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1667 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1668 test "X$echo_testing_string" = 'X\t' &&
1669 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1670 test "X$echo_testing_string" = "X$echo_test_string"; then
1671 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1672 else
1673 # maybe with a smaller string...
1674 prev=:
1675
1676 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1677 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1678 then
1679 break
1680 fi
1681 prev="$cmd"
1682 done
1683
1684 if test "$prev" != 'sed 50q "[$]0"'; then
1685 echo_test_string=`eval $prev`
1686 export echo_test_string
1687 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1688 else
1689 # Oops. We lost completely, so just stick with echo.
1690 echo=echo
1691 fi
1692 fi
1693 fi
1694 fi
1695 fi
1696 fi
1697
1698 # Copy echo and quote the copy suitably for passing to libtool from
1699 # the Makefile, instead of quoting the original, which is used later.
1700 ECHO=$echo
1701 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1702 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1703 fi
1704
1705 AC_SUBST(ECHO)
1706 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1707
1708
1709 # _LT_AC_LOCK
1710 # -----------
1711 AC_DEFUN([_LT_AC_LOCK],
1712 [AC_ARG_ENABLE([libtool-lock],
1713 [AC_HELP_STRING([--disable-libtool-lock],
1714 [avoid locking (might break parallel builds)])])
1715 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1716
1717 # Some flags need to be propagated to the compiler or linker for good
1718 # libtool support.
1719 case $host in
1720 ia64-*-hpux*)
1721 # Find out which ABI we are using.
1722 echo 'int i;' > conftest.$ac_ext
1723 if AC_TRY_EVAL(ac_compile); then
1724 case `/usr/bin/file conftest.$ac_objext` in
1725 *ELF-32*)
1726 HPUX_IA64_MODE="32"
1727 ;;
1728 *ELF-64*)
1729 HPUX_IA64_MODE="64"
1730 ;;
1731 esac
1732 fi
1733 rm -rf conftest*
1734 ;;
1735 *-*-irix6*)
1736 # Find out which ABI we are using.
1737 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1738 if AC_TRY_EVAL(ac_compile); then
1739 if test "$lt_cv_prog_gnu_ld" = yes; then
1740 case `/usr/bin/file conftest.$ac_objext` in
1741 *32-bit*)
1742 LD="${LD-ld} -melf32bsmip"
1743 ;;
1744 *N32*)
1745 LD="${LD-ld} -melf32bmipn32"
1746 ;;
1747 *64-bit*)
1748 LD="${LD-ld} -melf64bmip"
1749 ;;
1750 esac
1751 else
1752 case `/usr/bin/file conftest.$ac_objext` in
1753 *32-bit*)
1754 LD="${LD-ld} -32"
1755 ;;
1756 *N32*)
1757 LD="${LD-ld} -n32"
1758 ;;
1759 *64-bit*)
1760 LD="${LD-ld} -64"
1761 ;;
1762 esac
1763 fi
1764 fi
1765 rm -rf conftest*
1766 ;;
1767
1768 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1769 # Find out which ABI we are using.
1770 echo 'int i;' > conftest.$ac_ext
1771 if AC_TRY_EVAL(ac_compile); then
1772 case "`/usr/bin/file conftest.o`" in
1773 *32-bit*)
1774 case $host in
1775 x86_64-*linux*)
1776 LD="${LD-ld} -m elf_i386"
1777 ;;
1778 ppc64-*linux*)
1779 LD="${LD-ld} -m elf32ppclinux"
1780 ;;
1781 s390x-*linux*)
1782 LD="${LD-ld} -m elf_s390"
1783 ;;
1784 sparc64-*linux*)
1785 LD="${LD-ld} -m elf32_sparc"
1786 ;;
1787 esac
1788 ;;
1789 *64-bit*)
1790 case $host in
1791 x86_64-*linux*)
1792 LD="${LD-ld} -m elf_x86_64"
1793 ;;
1794 ppc*-*linux*|powerpc*-*linux*)
1795 LD="${LD-ld} -m elf64ppc"
1796 ;;
1797 s390*-*linux*)
1798 LD="${LD-ld} -m elf64_s390"
1799 ;;
1800 sparc*-*linux*)
1801 LD="${LD-ld} -m elf64_sparc"
1802 ;;
1803 esac
1804 ;;
1805 esac
1806 fi
1807 rm -rf conftest*
1808 ;;
1809
1810 *-*-sco3.2v5*)
1811 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1812 SAVE_CFLAGS="$CFLAGS"
1813 CFLAGS="$CFLAGS -belf"
1814 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1815 [AC_LANG_PUSH(C)
1816 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1817 AC_LANG_POP])
1818 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1819 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1820 CFLAGS="$SAVE_CFLAGS"
1821 fi
1822 ;;
1823 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1824 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1825 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1826 AC_CHECK_TOOL(AS, as, false)
1827 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1828 ;;
1829 ])
1830 esac
1831
1832 need_locks="$enable_libtool_lock"
1833
1834 ])# _LT_AC_LOCK
1835
1836
1837 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1838 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1839 # ----------------------------------------------------------------
1840 # Check whether the given compiler option works
1841 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1842 [AC_CACHE_CHECK([$1], [$2],
1843 [$2=no
1844 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1845 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1846 lt_compiler_flag="$3"
1847 # Insert the option either (1) after the last *FLAGS variable, or
1848 # (2) before a word containing "conftest.", or (3) at the end.
1849 # Note that $ac_compile itself does not contain backslashes and begins
1850 # with a dollar sign (not a hyphen), so the echo should work correctly.
1851 # The option is referenced via a variable to avoid confusing sed.
1852 lt_compile=`echo "$ac_compile" | $SED \
1853 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1854 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1855 -e 's:$: $lt_compiler_flag:'`
1856 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1857 (eval "$lt_compile" 2>conftest.err)
1858 ac_status=$?
1859 cat conftest.err >&AS_MESSAGE_LOG_FD
1860 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1861 if (exit $ac_status) && test -s "$ac_outfile"; then
1862 # The compiler can only warn and ignore the option if not recognized
1863 # So say no if there are warnings
1864 if test ! -s conftest.err; then
1865 $2=yes
1866 fi
1867 fi
1868 $rm conftest*
1869 ])
1870
1871 if test x"[$]$2" = xyes; then
1872 ifelse([$5], , :, [$5])
1873 else
1874 ifelse([$6], , :, [$6])
1875 fi
1876 ])# AC_LIBTOOL_COMPILER_OPTION
1877
1878
1879 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1880 # [ACTION-SUCCESS], [ACTION-FAILURE])
1881 # ------------------------------------------------------------
1882 # Check whether the given compiler option works
1883 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1884 [AC_CACHE_CHECK([$1], [$2],
1885 [$2=no
1886 save_LDFLAGS="$LDFLAGS"
1887 LDFLAGS="$LDFLAGS $3"
1888 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1889 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1890 # The compiler can only warn and ignore the option if not recognized
1891 # So say no if there are warnings
1892 if test -s conftest.err; then
1893 # Append any errors to the config.log.
1894 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1895 else
1896 $2=yes
1897 fi
1898 fi
1899 $rm conftest*
1900 LDFLAGS="$save_LDFLAGS"
1901 ])
1902
1903 if test x"[$]$2" = xyes; then
1904 ifelse([$4], , :, [$4])
1905 else
1906 ifelse([$5], , :, [$5])
1907 fi
1908 ])# AC_LIBTOOL_LINKER_OPTION
1909
1910
1911 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1912 # --------------------------
1913 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1914 [# find the maximum length of command line arguments
1915 AC_MSG_CHECKING([the maximum length of command line arguments])
1916 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1917 i=0
1918 testring="ABCD"
1919
1920 case $build_os in
1921 msdosdjgpp*)
1922 # On DJGPP, this test can blow up pretty badly due to problems in libc
1923 # (any single argument exceeding 2000 bytes causes a buffer overrun
1924 # during glob expansion). Even if it were fixed, the result of this
1925 # check would be larger than it should be.
1926 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1927 ;;
1928
1929 gnu*)
1930 # Under GNU Hurd, this test is not required because there is
1931 # no limit to the length of command line arguments.
1932 # Libtool will interpret -1 as no limit whatsoever
1933 lt_cv_sys_max_cmd_len=-1;
1934 ;;
1935
1936 cygwin* | mingw*)
1937 # On Win9x/ME, this test blows up -- it succeeds, but takes
1938 # about 5 minutes as the teststring grows exponentially.
1939 # Worse, since 9x/ME are not pre-emptively multitasking,
1940 # you end up with a "frozen" computer, even though with patience
1941 # the test eventually succeeds (with a max line length of 256k).
1942 # Instead, let's just punt: use the minimum linelength reported by
1943 # all of the supported platforms: 8192 (on NT/2K/XP).
1944 lt_cv_sys_max_cmd_len=8192;
1945 ;;
1946
1947 *)
1948 # If test is not a shell built-in, we'll probably end up computing a
1949 # maximum length that is only half of the actual maximum length, but
1950 # we can't tell.
1951 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1952 = "XX$testring") >/dev/null 2>&1 &&
1953 new_result=`expr "X$testring" : ".*" 2>&1` &&
1954 lt_cv_sys_max_cmd_len=$new_result &&
1955 test $i != 17 # 1/2 MB should be enough
1956 do
1957 i=`expr $i + 1`
1958 testring=$testring$testring
1959 done
1960 testring=
1961 # Add a significant safety factor because C++ compilers can tack on massive
1962 # amounts of additional arguments before passing them to the linker.
1963 # It appears as though 1/2 is a usable value.
1964 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1965 ;;
1966 esac
1967 ])
1968 if test -n $lt_cv_sys_max_cmd_len ; then
1969 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1970 else
1971 AC_MSG_RESULT(none)
1972 fi
1973 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1974
1975
1976 # _LT_AC_CHECK_DLFCN
1977 # --------------------
1978 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1979 [AC_CHECK_HEADERS(dlfcn.h)dnl
1980 ])# _LT_AC_CHECK_DLFCN
1981
1982
1983 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1984 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1985 # ------------------------------------------------------------------
1986 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1987 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1988 if test "$cross_compiling" = yes; then :
1989 [$4]
1990 else
1991 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1992 lt_status=$lt_dlunknown
1993 cat > conftest.$ac_ext <<EOF
1994 [#line __oline__ "configure"
1995 #include "confdefs.h"
1996
1997 #if HAVE_DLFCN_H
1998 #include <dlfcn.h>
1999 #endif
2000
2001 #include <stdio.h>
2002
2003 #ifdef RTLD_GLOBAL
2004 # define LT_DLGLOBAL RTLD_GLOBAL
2005 #else
2006 # ifdef DL_GLOBAL
2007 # define LT_DLGLOBAL DL_GLOBAL
2008 # else
2009 # define LT_DLGLOBAL 0
2010 # endif
2011 #endif
2012
2013 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2014 find out it does not work in some platform. */
2015 #ifndef LT_DLLAZY_OR_NOW
2016 # ifdef RTLD_LAZY
2017 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2018 # else
2019 # ifdef DL_LAZY
2020 # define LT_DLLAZY_OR_NOW DL_LAZY
2021 # else
2022 # ifdef RTLD_NOW
2023 # define LT_DLLAZY_OR_NOW RTLD_NOW
2024 # else
2025 # ifdef DL_NOW
2026 # define LT_DLLAZY_OR_NOW DL_NOW
2027 # else
2028 # define LT_DLLAZY_OR_NOW 0
2029 # endif
2030 # endif
2031 # endif
2032 # endif
2033 #endif
2034
2035 #ifdef __cplusplus
2036 extern "C" void exit (int);
2037 #endif
2038
2039 void fnord() { int i=42;}
2040 int main ()
2041 {
2042 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2043 int status = $lt_dlunknown;
2044
2045 if (self)
2046 {
2047 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2048 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2049 /* dlclose (self); */
2050 }
2051
2052 exit (status);
2053 }]
2054 EOF
2055 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2056 (./conftest; exit; ) 2>/dev/null
2057 lt_status=$?
2058 case x$lt_status in
2059 x$lt_dlno_uscore) $1 ;;
2060 x$lt_dlneed_uscore) $2 ;;
2061 x$lt_unknown|x*) $3 ;;
2062 esac
2063 else :
2064 # compilation failed
2065 $3
2066 fi
2067 fi
2068 rm -fr conftest*
2069 ])# _LT_AC_TRY_DLOPEN_SELF
2070
2071
2072 # AC_LIBTOOL_DLOPEN_SELF
2073 # -------------------
2074 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2075 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2076 if test "x$enable_dlopen" != xyes; then
2077 enable_dlopen=unknown
2078 enable_dlopen_self=unknown
2079 enable_dlopen_self_static=unknown
2080 else
2081 lt_cv_dlopen=no
2082 lt_cv_dlopen_libs=
2083
2084 case $host_os in
2085 beos*)
2086 lt_cv_dlopen="load_add_on"
2087 lt_cv_dlopen_libs=
2088 lt_cv_dlopen_self=yes
2089 ;;
2090
2091 mingw* | pw32*)
2092 lt_cv_dlopen="LoadLibrary"
2093 lt_cv_dlopen_libs=
2094 ;;
2095
2096 cygwin*)
2097 lt_cv_dlopen="dlopen"
2098 lt_cv_dlopen_libs=
2099 ;;
2100
2101 darwin*)
2102 # if libdl is installed we need to link against it
2103 AC_CHECK_LIB([dl], [dlopen],
2104 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2105 lt_cv_dlopen="dyld"
2106 lt_cv_dlopen_libs=
2107 lt_cv_dlopen_self=yes
2108 ])
2109 ;;
2110
2111 *)
2112 AC_CHECK_FUNC([shl_load],
2113 [lt_cv_dlopen="shl_load"],
2114 [AC_CHECK_LIB([dld], [shl_load],
2115 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2116 [AC_CHECK_FUNC([dlopen],
2117 [lt_cv_dlopen="dlopen"],
2118 [AC_CHECK_LIB([dl], [dlopen],
2119 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2120 [AC_CHECK_LIB([svld], [dlopen],
2121 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2122 [AC_CHECK_LIB([dld], [dld_link],
2123 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2124 ])
2125 ])
2126 ])
2127 ])
2128 ])
2129 ;;
2130 esac
2131
2132 if test "x$lt_cv_dlopen" != xno; then
2133 enable_dlopen=yes
2134 else
2135 enable_dlopen=no
2136 fi
2137
2138 case $lt_cv_dlopen in
2139 dlopen)
2140 save_CPPFLAGS="$CPPFLAGS"
2141 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2142
2143 save_LDFLAGS="$LDFLAGS"
2144 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2145
2146 save_LIBS="$LIBS"
2147 LIBS="$lt_cv_dlopen_libs $LIBS"
2148
2149 AC_CACHE_CHECK([whether a program can dlopen itself],
2150 lt_cv_dlopen_self, [dnl
2151 _LT_AC_TRY_DLOPEN_SELF(
2152 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2153 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2154 ])
2155
2156 if test "x$lt_cv_dlopen_self" = xyes; then
2157 LDFLAGS="$LDFLAGS $link_static_flag"
2158 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2159 lt_cv_dlopen_self_static, [dnl
2160 _LT_AC_TRY_DLOPEN_SELF(
2161 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2162 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2163 ])
2164 fi
2165
2166 CPPFLAGS="$save_CPPFLAGS"
2167 LDFLAGS="$save_LDFLAGS"
2168 LIBS="$save_LIBS"
2169 ;;
2170 esac
2171
2172 case $lt_cv_dlopen_self in
2173 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2174 *) enable_dlopen_self=unknown ;;
2175 esac
2176
2177 case $lt_cv_dlopen_self_static in
2178 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2179 *) enable_dlopen_self_static=unknown ;;
2180 esac
2181 fi
2182 ])# AC_LIBTOOL_DLOPEN_SELF
2183
2184
2185 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2186 # ---------------------------------
2187 # Check to see if options -c and -o are simultaneously supported by compiler
2188 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2189 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2190 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2191 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2192 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2193 $rm -r conftest 2>/dev/null
2194 mkdir conftest
2195 cd conftest
2196 mkdir out
2197 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2198
2199 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2200 # that will create temporary files in the current directory regardless of
2201 # the output directory. Thus, making CWD read-only will cause this test
2202 # to fail, enabling locking or at least warning the user not to do parallel
2203 # builds.
2204 chmod -w .
2205
2206 lt_compiler_flag="-o out/conftest2.$ac_objext"
2207 # Insert the option either (1) after the last *FLAGS variable, or
2208 # (2) before a word containing "conftest.", or (3) at the end.
2209 # Note that $ac_compile itself does not contain backslashes and begins
2210 # with a dollar sign (not a hyphen), so the echo should work correctly.
2211 lt_compile=`echo "$ac_compile" | $SED \
2212 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
2213 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2214 -e 's:$: $lt_compiler_flag:'`
2215 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2216 (eval "$lt_compile" 2>out/conftest.err)
2217 ac_status=$?
2218 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2219 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2220 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2221 then
2222 # The compiler can only warn and ignore the option if not recognized
2223 # So say no if there are warnings
2224 if test ! -s out/conftest.err; then
2225 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2226 fi
2227 fi
2228 chmod u+w .
2229 $rm conftest* out/*
2230 rmdir out
2231 cd ..
2232 rmdir conftest
2233 $rm conftest*
2234 ])
2235 ])# AC_LIBTOOL_PROG_CC_C_O
2236
2237
2238 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2239 # -----------------------------------------
2240 # Check to see if we can do hard links to lock some files if needed
2241 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2242 [AC_REQUIRE([_LT_AC_LOCK])dnl
2243
2244 hard_links="nottested"
2245 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2246 # do not overwrite the value of need_locks provided by the user
2247 AC_MSG_CHECKING([if we can lock with hard links])
2248 hard_links=yes
2249 $rm conftest*
2250 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2251 touch conftest.a
2252 ln conftest.a conftest.b 2>&5 || hard_links=no
2253 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2254 AC_MSG_RESULT([$hard_links])
2255 if test "$hard_links" = no; then
2256 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2257 need_locks=warn
2258 fi
2259 else
2260 need_locks=no
2261 fi
2262 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2263
2264
2265 # AC_LIBTOOL_OBJDIR
2266 # -----------------
2267 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2268 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2269 [rm -f .libs 2>/dev/null
2270 mkdir .libs 2>/dev/null
2271 if test -d .libs; then
2272 lt_cv_objdir=.libs
2273 else
2274 # MS-DOS does not allow filenames that begin with a dot.
2275 lt_cv_objdir=_libs
2276 fi
2277 rmdir .libs 2>/dev/null])
2278 objdir=$lt_cv_objdir
2279 ])# AC_LIBTOOL_OBJDIR
2280
2281
2282 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2283 # ----------------------------------------------
2284 # Check hardcoding attributes.
2285 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2286 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2287 _LT_AC_TAGVAR(hardcode_action, $1)=
2288 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2289 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
2290 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
2291
2292 # We can hardcode non-existant directories.
2293 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2294 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2295 # have to relink, otherwise we might link with an installed library
2296 # when we should be linking with a yet-to-be-installed one
2297 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2298 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2299 # Linking always hardcodes the temporary library directory.
2300 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2301 else
2302 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2303 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2304 fi
2305 else
2306 # We cannot hardcode anything, or else we can only hardcode existing
2307 # directories.
2308 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2309 fi
2310 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2311
2312 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2313 # Fast installation is not supported
2314 enable_fast_install=no
2315 elif test "$shlibpath_overrides_runpath" = yes ||
2316 test "$enable_shared" = no; then
2317 # Fast installation is not necessary
2318 enable_fast_install=needless
2319 fi
2320 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2321
2322
2323 # AC_LIBTOOL_SYS_LIB_STRIP
2324 # ------------------------
2325 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2326 [striplib=
2327 old_striplib=
2328 AC_MSG_CHECKING([whether stripping libraries is possible])
2329 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2330 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2331 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2332 AC_MSG_RESULT([yes])
2333 else
2334 # FIXME - insert some real tests, host_os isn't really good enough
2335 case $host_os in
2336 NOT-darwin*)
2337 if test -n "$STRIP" ; then
2338 striplib="$STRIP -x"
2339 AC_MSG_RESULT([yes])
2340 else
2341 AC_MSG_RESULT([no])
2342 fi
2343 ;;
2344 *)
2345 AC_MSG_RESULT([no])
2346 ;;
2347 esac
2348 fi
2349 ])# AC_LIBTOOL_SYS_LIB_STRIP
2350
2351
2352 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2353 # -----------------------------
2354 # PORTME Fill in your ld.so characteristics
2355 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2356 [AC_MSG_CHECKING([dynamic linker characteristics])
2357 library_names_spec=
2358 libname_spec='lib$name'
2359 soname_spec=
2360 shrext=".so"
2361 postinstall_cmds=
2362 postuninstall_cmds=
2363 finish_cmds=
2364 finish_eval=
2365 shlibpath_var=
2366 shlibpath_overrides_runpath=unknown
2367 version_type=none
2368 dynamic_linker="$host_os ld.so"
2369 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2370 if test "$GCC" = yes; then
2371 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2372 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2373 # if the path contains ";" then we assume it to be the separator
2374 # otherwise default to the standard path separator (i.e. ":") - it is
2375 # assumed that no part of a normal pathname contains ";" but that should
2376 # okay in the real world where ";" in dirpaths is itself problematic.
2377 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2378 else
2379 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2380 fi
2381 else
2382 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2383 fi
2384 need_lib_prefix=unknown
2385 hardcode_into_libs=no
2386
2387 # when you set need_version to no, make sure it does not cause -set_version
2388 # flags to be left without arguments
2389 need_version=unknown
2390
2391 case $host_os in
2392 aix3*)
2393 version_type=linux
2394 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2395 shlibpath_var=LIBPATH
2396
2397 # AIX 3 has no versioning support, so we append a major version to the name.
2398 soname_spec='${libname}${release}${shared_ext}$major'
2399 ;;
2400
2401 aix4* | aix5*)
2402 version_type=linux
2403 need_lib_prefix=no
2404 need_version=no
2405 hardcode_into_libs=yes
2406 if test "$host_cpu" = ia64; then
2407 # AIX 5 supports IA64
2408 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2409 shlibpath_var=LD_LIBRARY_PATH
2410 else
2411 # With GCC up to 2.95.x, collect2 would create an import file
2412 # for dependence libraries. The import file would start with
2413 # the line `#! .'. This would cause the generated library to
2414 # depend on `.', always an invalid library. This was fixed in
2415 # development snapshots of GCC prior to 3.0.
2416 case $host_os in
2417 aix4 | aix4.[[01]] | aix4.[[01]].*)
2418 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2419 echo ' yes '
2420 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2421 :
2422 else
2423 can_build_shared=no
2424 fi
2425 ;;
2426 esac
2427 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2428 # soname into executable. Probably we can add versioning support to
2429 # collect2, so additional links can be useful in future.
2430 if test "$aix_use_runtimelinking" = yes; then
2431 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2432 # instead of lib<name>.a to let people know that these are not
2433 # typical AIX shared libraries.
2434 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2435 else
2436 # We preserve .a as extension for shared libraries through AIX4.2
2437 # and later when we are not doing run time linking.
2438 library_names_spec='${libname}${release}.a $libname.a'
2439 soname_spec='${libname}${release}${shared_ext}$major'
2440 fi
2441 shlibpath_var=LIBPATH
2442 fi
2443 ;;
2444
2445 amigaos*)
2446 library_names_spec='$libname.ixlibrary $libname.a'
2447 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2448 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
2449 ;;
2450
2451 beos*)
2452 library_names_spec='${libname}${shared_ext}'
2453 dynamic_linker="$host_os ld.so"
2454 shlibpath_var=LIBRARY_PATH
2455 ;;
2456
2457 bsdi4*)
2458 version_type=linux
2459 need_version=no
2460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2461 soname_spec='${libname}${release}${shared_ext}$major'
2462 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2463 shlibpath_var=LD_LIBRARY_PATH
2464 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2465 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2466 # the default ld.so.conf also contains /usr/contrib/lib and
2467 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2468 # libtool to hard-code these into programs
2469 ;;
2470
2471 cygwin* | mingw* | pw32*)
2472 version_type=windows
2473 shrext=".dll"
2474 need_version=no
2475 need_lib_prefix=no
2476
2477 case $GCC,$host_os in
2478 yes,cygwin* | yes,mingw* | yes,pw32*)
2479 library_names_spec='$libname.dll.a'
2480 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2481 postinstall_cmds='base_file=`basename \${file}`${_S_}
2482 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`${_S_}
2483 dldir=$destdir/`dirname \$dlpath`${_S_}
2484 test -d \$dldir || mkdir -p \$dldir${_S_}
2485 $install_prog $dir/$dlname \$dldir/$dlname'
2486 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`${_S_}
2487 dlpath=$dir/\$dldll${_S_}
2488 $rm \$dlpath'
2489 shlibpath_overrides_runpath=yes
2490
2491 case $host_os in
2492 cygwin*)
2493 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2494 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2495 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
2496 ;;
2497 mingw*)
2498 # MinGW DLLs use traditional 'lib' prefix
2499 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2500 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2501 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2502 # It is most probably a Windows format PATH printed by
2503 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2504 # path with ; separators, and with drive letters. We can handle the
2505 # drive letters (cygwin fileutils understands them), so leave them,
2506 # especially as we might pass files found there to a mingw objdump,
2507 # which wouldn't understand a cygwinified path. Ahh.
2508 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2509 else
2510 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2511 fi
2512 ;;
2513 pw32*)
2514 # pw32 DLLs use 'pw' prefix rather than 'lib'
2515 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2516 ;;
2517 esac
2518 ;;
2519
2520 *)
2521 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2522 ;;
2523 esac
2524 dynamic_linker='Win32 ld.exe'
2525 # FIXME: first we should search . and the directory the executable is in
2526 shlibpath_var=PATH
2527 ;;
2528
2529 darwin* | rhapsody*)
2530 dynamic_linker="$host_os dyld"
2531 version_type=darwin
2532 need_lib_prefix=no
2533 need_version=no
2534 # FIXME: Relying on posixy $() will cause problems for
2535 # cross-compilation, but unfortunately the echo tests do not
2536 # yet detect zsh echo's removal of \ escapes.
2537 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext ${libname}${release}${versuffix}$shared_ext'
2538 soname_spec='${libname}${release}${major}$shared_ext'
2539 shlibpath_overrides_runpath=yes
2540 shlibpath_var=DYLD_LIBRARY_PATH
2541 shrext='$(test .$module = .yes && echo .so || echo .dylib)'
2542 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2543 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
2544 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2545 fi
2546 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2547 ;;
2548
2549 dgux*)
2550 version_type=linux
2551 need_lib_prefix=no
2552 need_version=no
2553 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2554 soname_spec='${libname}${release}${shared_ext}$major'
2555 shlibpath_var=LD_LIBRARY_PATH
2556 ;;
2557
2558 freebsd1*)
2559 dynamic_linker=no
2560 ;;
2561
2562 freebsd*)
2563 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2564 version_type=freebsd-$objformat
2565 case $version_type in
2566 freebsd-elf*)
2567 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2568 need_version=no
2569 need_lib_prefix=no
2570 ;;
2571 freebsd-*)
2572 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2573 need_version=yes
2574 ;;
2575 esac
2576 shlibpath_var=LD_LIBRARY_PATH
2577 case $host_os in
2578 freebsd2*)
2579 shlibpath_overrides_runpath=yes
2580 ;;
2581 freebsd3.[01]* | freebsdelf3.[01]*)
2582 shlibpath_overrides_runpath=yes
2583 hardcode_into_libs=yes
2584 ;;
2585 *) # from 3.2 on
2586 shlibpath_overrides_runpath=no
2587 hardcode_into_libs=yes
2588 ;;
2589 esac
2590 ;;
2591
2592 gnu*)
2593 version_type=linux
2594 need_lib_prefix=no
2595 need_version=no
2596 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2597 soname_spec='${libname}${release}${shared_ext}$major'
2598 shlibpath_var=LD_LIBRARY_PATH
2599 hardcode_into_libs=yes
2600 ;;
2601
2602 hpux9* | hpux10* | hpux11*)
2603 # Give a soname corresponding to the major version so that dld.sl refuses to
2604 # link against other versions.
2605 version_type=sunos
2606 need_lib_prefix=no
2607 need_version=no
2608 case "$host_cpu" in
2609 ia64*)
2610 shrext='.so'
2611 hardcode_into_libs=yes
2612 dynamic_linker="$host_os dld.so"
2613 shlibpath_var=LD_LIBRARY_PATH
2614 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2616 soname_spec='${libname}${release}${shared_ext}$major'
2617 if test "X$HPUX_IA64_MODE" = X32; then
2618 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2619 else
2620 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2621 fi
2622 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2623 ;;
2624 hppa*64*)
2625 shrext='.sl'
2626 hardcode_into_libs=yes
2627 dynamic_linker="$host_os dld.sl"
2628 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2629 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2630 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2631 soname_spec='${libname}${release}${shared_ext}$major'
2632 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2633 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2634 ;;
2635 *)
2636 shrext='.sl'
2637 dynamic_linker="$host_os dld.sl"
2638 shlibpath_var=SHLIB_PATH
2639 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2641 soname_spec='${libname}${release}${shared_ext}$major'
2642 ;;
2643 esac
2644 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2645 postinstall_cmds='chmod 555 $lib'
2646 ;;
2647
2648 irix5* | irix6* | nonstopux*)
2649 case $host_os in
2650 nonstopux*) version_type=nonstopux ;;
2651 *)
2652 if test "$lt_cv_prog_gnu_ld" = yes; then
2653 version_type=linux
2654 else
2655 version_type=irix
2656 fi ;;
2657 esac
2658 need_lib_prefix=no
2659 need_version=no
2660 soname_spec='${libname}${release}${shared_ext}$major'
2661 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2662 case $host_os in
2663 irix5* | nonstopux*)
2664 libsuff= shlibsuff=
2665 ;;
2666 *)
2667 case $LD in # libtool.m4 will add one of these switches to LD
2668 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2669 libsuff= shlibsuff= libmagic=32-bit;;
2670 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2671 libsuff=32 shlibsuff=N32 libmagic=N32;;
2672 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2673 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2674 *) libsuff= shlibsuff= libmagic=never-match;;
2675 esac
2676 ;;
2677 esac
2678 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2679 shlibpath_overrides_runpath=no
2680 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2681 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2682 hardcode_into_libs=yes
2683 ;;
2684
2685 # No shared lib support for Linux oldld, aout, or coff.
2686 linux*oldld* | linux*aout* | linux*coff*)
2687 dynamic_linker=no
2688 ;;
2689
2690 # This must be Linux ELF.
2691 linux*)
2692 version_type=linux
2693 need_lib_prefix=no
2694 need_version=no
2695 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2696 soname_spec='${libname}${release}${shared_ext}$major'
2697 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2698 shlibpath_var=LD_LIBRARY_PATH
2699 shlibpath_overrides_runpath=no
2700 # This implies no fast_install, which is unacceptable.
2701 # Some rework will be needed to allow for fast_install
2702 # before this can be enabled.
2703 hardcode_into_libs=yes
2704
2705 # We used to test for /lib/ld.so.1 and disable shared libraries on
2706 # powerpc, because MkLinux only supported shared libraries with the
2707 # GNU dynamic linker. Since this was broken with cross compilers,
2708 # most powerpc-linux boxes support dynamic linking these days and
2709 # people can always --disable-shared, the test was removed, and we
2710 # assume the GNU/Linux dynamic linker is in use.
2711 dynamic_linker='GNU/Linux ld.so'
2712 ;;
2713
2714 netbsd*)
2715 version_type=sunos
2716 need_lib_prefix=no
2717 need_version=no
2718 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2719 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2720 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2721 dynamic_linker='NetBSD (a.out) ld.so'
2722 else
2723 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
2724 soname_spec='${libname}${release}${shared_ext}$major'
2725 dynamic_linker='NetBSD ld.elf_so'
2726 fi
2727 shlibpath_var=LD_LIBRARY_PATH
2728 shlibpath_overrides_runpath=yes
2729 hardcode_into_libs=yes
2730 ;;
2731
2732 newsos6)
2733 version_type=linux
2734 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2735 shlibpath_var=LD_LIBRARY_PATH
2736 shlibpath_overrides_runpath=yes
2737 ;;
2738
2739 nto-qnx)
2740 version_type=linux
2741 need_lib_prefix=no
2742 need_version=no
2743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2744 soname_spec='${libname}${release}${shared_ext}$major'
2745 shlibpath_var=LD_LIBRARY_PATH
2746 shlibpath_overrides_runpath=yes
2747 ;;
2748
2749 openbsd*)
2750 version_type=sunos
2751 need_lib_prefix=no
2752 need_version=no
2753 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2754 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2755 shlibpath_var=LD_LIBRARY_PATH
2756 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2757 case $host_os in
2758 openbsd2.[[89]] | openbsd2.[[89]].*)
2759 shlibpath_overrides_runpath=no
2760 ;;
2761 *)
2762 shlibpath_overrides_runpath=yes
2763 ;;
2764 esac
2765 else
2766 shlibpath_overrides_runpath=yes
2767 fi
2768 ;;
2769
2770 os2*)
2771 libname_spec='$name'
2772 shrext=".dll"
2773 need_lib_prefix=no
2774 library_names_spec='$libname${shared_ext} $libname.a'
2775 dynamic_linker='OS/2 ld.exe'
2776 shlibpath_var=LIBPATH
2777 ;;
2778
2779 osf3* | osf4* | osf5*)
2780 version_type=osf
2781 need_lib_prefix=no
2782 need_version=no
2783 soname_spec='${libname}${release}${shared_ext}$major'
2784 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2785 shlibpath_var=LD_LIBRARY_PATH
2786 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2787 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2788 ;;
2789
2790 sco3.2v5*)
2791 version_type=osf
2792 soname_spec='${libname}${release}${shared_ext}$major'
2793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2794 shlibpath_var=LD_LIBRARY_PATH
2795 ;;
2796
2797 solaris*)
2798 version_type=linux
2799 need_lib_prefix=no
2800 need_version=no
2801 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2802 soname_spec='${libname}${release}${shared_ext}$major'
2803 shlibpath_var=LD_LIBRARY_PATH
2804 shlibpath_overrides_runpath=yes
2805 hardcode_into_libs=yes
2806 # ldd complains unless libraries are executable
2807 postinstall_cmds='chmod +x $lib'
2808 ;;
2809
2810 sunos4*)
2811 version_type=sunos
2812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2813 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2814 shlibpath_var=LD_LIBRARY_PATH
2815 shlibpath_overrides_runpath=yes
2816 if test "$with_gnu_ld" = yes; then
2817 need_lib_prefix=no
2818 fi
2819 need_version=yes
2820 ;;
2821
2822 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2823 version_type=linux
2824 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2825 soname_spec='${libname}${release}${shared_ext}$major'
2826 shlibpath_var=LD_LIBRARY_PATH
2827 case $host_vendor in
2828 sni)
2829 shlibpath_overrides_runpath=no
2830 need_lib_prefix=no
2831 export_dynamic_flag_spec='${wl}-Blargedynsym'
2832 runpath_var=LD_RUN_PATH
2833 ;;
2834 siemens)
2835 need_lib_prefix=no
2836 ;;
2837 motorola)
2838 need_lib_prefix=no
2839 need_version=no
2840 shlibpath_overrides_runpath=no
2841 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2842 ;;
2843 esac
2844 ;;
2845
2846 sysv4*MP*)
2847 if test -d /usr/nec ;then
2848 version_type=linux
2849 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2850 soname_spec='$libname${shared_ext}.$major'
2851 shlibpath_var=LD_LIBRARY_PATH
2852 fi
2853 ;;
2854
2855 uts4*)
2856 version_type=linux
2857 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2858 soname_spec='${libname}${release}${shared_ext}$major'
2859 shlibpath_var=LD_LIBRARY_PATH
2860 ;;
2861
2862 *)
2863 dynamic_linker=no
2864 ;;
2865 esac
2866 AC_MSG_RESULT([$dynamic_linker])
2867 test "$dynamic_linker" = no && can_build_shared=no
2868 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2869
2870
2871 # _LT_AC_TAGCONFIG
2872 # ----------------
2873 AC_DEFUN([_LT_AC_TAGCONFIG],
2874 [AC_ARG_WITH([tags],
2875 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2876 [include additional configurations @<:@automatic@:>@])],
2877 [tagnames="$withval"])
2878
2879 if test -f "$ltmain" && test -n "$tagnames"; then
2880 if test ! -f "${ofile}"; then
2881 AC_MSG_WARN([output file `$ofile' does not exist])
2882 fi
2883
2884 if test -z "$LTCC"; then
2885 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2886 if test -z "$LTCC"; then
2887 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2888 else
2889 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2890 fi
2891 fi
2892
2893 # Extract list of available tagged configurations in $ofile.
2894 # Note that this assumes the entire list is on one line.
2895 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2896
2897 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2898 for tagname in $tagnames; do
2899 IFS="$lt_save_ifs"
2900 # Check whether tagname contains only valid characters
2901 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2902 "") ;;
2903 *) AC_MSG_ERROR([invalid tag name: $tagname])
2904 ;;
2905 esac
2906
2907 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2908 then
2909 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2910 fi
2911
2912 # Update the list of available tags.
2913 if test -n "$tagname"; then
2914 echo appending configuration tag \"$tagname\" to $ofile
2915
2916 case $tagname in
2917 CXX)
2918 if test -n "$CXX" && test "X$CXX" != "Xno"; then
2919 AC_LIBTOOL_LANG_CXX_CONFIG
2920 else
2921 tagname=""
2922 fi
2923 ;;
2924
2925 F77)
2926 if test -n "$F77" && test "X$F77" != "Xno"; then
2927 AC_LIBTOOL_LANG_F77_CONFIG
2928 else
2929 tagname=""
2930 fi
2931 ;;
2932
2933 GCJ)
2934 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2935 AC_LIBTOOL_LANG_GCJ_CONFIG
2936 else
2937 tagname=""
2938 fi
2939 ;;
2940
2941 RC)
2942 AC_LIBTOOL_LANG_RC_CONFIG
2943 ;;
2944
2945 *)
2946 AC_MSG_ERROR([Unsupported tag name: $tagname])
2947 ;;
2948 esac
2949
2950 # Append the new tag name to the list of available tags.
2951 if test -n "$tagname" ; then
2952 available_tags="$available_tags $tagname"
2953 fi
2954 fi
2955 done
2956 IFS="$lt_save_ifs"
2957
2958 # Now substitute the updated list of available tags.
2959 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2960 mv "${ofile}T" "$ofile"
2961 chmod +x "$ofile"
2962 else
2963 rm -f "${ofile}T"
2964 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2965 fi
2966 fi
2967 ])# _LT_AC_TAGCONFIG
2968
2969
2970 # AC_LIBTOOL_DLOPEN
2971 # -----------------
2972 # enable checks for dlopen support
2973 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2974 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2975 ])# AC_LIBTOOL_DLOPEN
2976
2977
2978 # AC_LIBTOOL_WIN32_DLL
2979 # --------------------
2980 # declare package support for building win32 dll's
2981 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2982 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2983 ])# AC_LIBTOOL_WIN32_DLL
2984
2985
2986 # AC_ENABLE_SHARED([DEFAULT])
2987 # ---------------------------
2988 # implement the --enable-shared flag
2989 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2990 AC_DEFUN([AC_ENABLE_SHARED],
2991 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2992 AC_ARG_ENABLE([shared],
2993 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2994 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2995 [p=${PACKAGE-default}
2996 case $enableval in
2997 yes) enable_shared=yes ;;
2998 no) enable_shared=no ;;
2999 *)
3000 enable_shared=no
3001 # Look at the argument we got. We use all the common list separators.
3002 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3003 for pkg in $enableval; do
3004 IFS="$lt_save_ifs"
3005 if test "X$pkg" = "X$p"; then
3006 enable_shared=yes
3007 fi
3008 done
3009 IFS="$lt_save_ifs"
3010 ;;
3011 esac],
3012 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3013 ])# AC_ENABLE_SHARED
3014
3015
3016 # AC_DISABLE_SHARED
3017 # -----------------
3018 #- set the default shared flag to --disable-shared
3019 AC_DEFUN([AC_DISABLE_SHARED],
3020 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3021 AC_ENABLE_SHARED(no)
3022 ])# AC_DISABLE_SHARED
3023
3024
3025 # AC_ENABLE_STATIC([DEFAULT])
3026 # ---------------------------
3027 # implement the --enable-static flag
3028 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3029 AC_DEFUN([AC_ENABLE_STATIC],
3030 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3031 AC_ARG_ENABLE([static],
3032 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3033 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3034 [p=${PACKAGE-default}
3035 case $enableval in
3036 yes) enable_static=yes ;;
3037 no) enable_static=no ;;
3038 *)
3039 enable_static=no
3040 # Look at the argument we got. We use all the common list separators.
3041 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3042 for pkg in $enableval; do
3043 IFS="$lt_save_ifs"
3044 if test "X$pkg" = "X$p"; then
3045 enable_static=yes
3046 fi
3047 done
3048 IFS="$lt_save_ifs"
3049 ;;
3050 esac],
3051 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3052 ])# AC_ENABLE_STATIC
3053
3054
3055 # AC_DISABLE_STATIC
3056 # -----------------
3057 # set the default static flag to --disable-static
3058 AC_DEFUN([AC_DISABLE_STATIC],
3059 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3060 AC_ENABLE_STATIC(no)
3061 ])# AC_DISABLE_STATIC
3062
3063
3064 # AC_ENABLE_FAST_INSTALL([DEFAULT])
3065 # ---------------------------------
3066 # implement the --enable-fast-install flag
3067 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3068 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3069 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3070 AC_ARG_ENABLE([fast-install],
3071 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3072 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3073 [p=${PACKAGE-default}
3074 case $enableval in
3075 yes) enable_fast_install=yes ;;
3076 no) enable_fast_install=no ;;
3077 *)
3078 enable_fast_install=no
3079 # Look at the argument we got. We use all the common list separators.
3080 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3081 for pkg in $enableval; do
3082 IFS="$lt_save_ifs"
3083 if test "X$pkg" = "X$p"; then
3084 enable_fast_install=yes
3085 fi
3086 done
3087 IFS="$lt_save_ifs"
3088 ;;
3089 esac],
3090 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3091 ])# AC_ENABLE_FAST_INSTALL
3092
3093
3094 # AC_DISABLE_FAST_INSTALL
3095 # -----------------------
3096 # set the default to --disable-fast-install
3097 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3098 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3099 AC_ENABLE_FAST_INSTALL(no)
3100 ])# AC_DISABLE_FAST_INSTALL
3101
3102
3103 # AC_LIBTOOL_PICMODE([MODE])
3104 # --------------------------
3105 # implement the --with-pic flag
3106 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3107 AC_DEFUN([AC_LIBTOOL_PICMODE],
3108 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3109 pic_mode=ifelse($#,1,$1,default)
3110 ])# AC_LIBTOOL_PICMODE
3111
3112
3113 # AC_PROG_EGREP
3114 # -------------
3115 # This is predefined starting with Autoconf 2.54, so this conditional
3116 # definition can be removed once we require Autoconf 2.54 or later.
3117 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3118 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3119 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3120 then ac_cv_prog_egrep='grep -E'
3121 else ac_cv_prog_egrep='egrep'
3122 fi])
3123 EGREP=$ac_cv_prog_egrep
3124 AC_SUBST([EGREP])
3125 ])])
3126
3127
3128 # AC_PATH_TOOL_PREFIX
3129 # -------------------
3130 # find a file program which can recognise shared library
3131 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3132 [AC_REQUIRE([AC_PROG_EGREP])dnl
3133 AC_MSG_CHECKING([for $1])
3134 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3135 [case $MAGIC_CMD in
3136 [[\\/*] | ?:[\\/]*])
3137 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3138 ;;
3139 *)
3140 lt_save_MAGIC_CMD="$MAGIC_CMD"
3141 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3142 dnl $ac_dummy forces splitting on constant user-supplied paths.
3143 dnl POSIX.2 word splitting is done only on the output of word expansions,
3144 dnl not every word. This closes a longstanding sh security hole.
3145 ac_dummy="ifelse([$2], , $PATH, [$2])"
3146 for ac_dir in $ac_dummy; do
3147 IFS="$lt_save_ifs"
3148 test -z "$ac_dir" && ac_dir=.
3149 if test -f $ac_dir/$1; then
3150 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3151 if test -n "$file_magic_test_file"; then
3152 case $deplibs_check_method in
3153 "file_magic "*)
3154 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3155 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3156 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3157 $EGREP "$file_magic_regex" > /dev/null; then
3158 :
3159 else
3160 cat <<EOF 1>&2
3161
3162 *** Warning: the command libtool uses to detect shared libraries,
3163 *** $file_magic_cmd, produces output that libtool cannot recognize.
3164 *** The result is that libtool may fail to recognize shared libraries
3165 *** as such. This will affect the creation of libtool libraries that
3166 *** depend on shared libraries, but programs linked with such libtool
3167 *** libraries will work regardless of this problem. Nevertheless, you
3168 *** may want to report the problem to your system manager and/or to
3169 *** bug-libtool@gnu.org
3170
3171 EOF
3172 fi ;;
3173 esac
3174 fi
3175 break
3176 fi
3177 done
3178 IFS="$lt_save_ifs"
3179 MAGIC_CMD="$lt_save_MAGIC_CMD"
3180 ;;
3181 esac])
3182 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3183 if test -n "$MAGIC_CMD"; then
3184 AC_MSG_RESULT($MAGIC_CMD)
3185 else
3186 AC_MSG_RESULT(no)
3187 fi
3188 ])# AC_PATH_TOOL_PREFIX
3189
3190
3191 # AC_PATH_MAGIC
3192 # -------------
3193 # find a file program which can recognise a shared library
3194 AC_DEFUN([AC_PATH_MAGIC],
3195 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3196 if test -z "$lt_cv_path_MAGIC_CMD"; then
3197 if test -n "$ac_tool_prefix"; then
3198 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3199 else
3200 MAGIC_CMD=:
3201 fi
3202 fi
3203 ])# AC_PATH_MAGIC
3204
3205
3206 # AC_PROG_LD
3207 # ----------
3208 # find the path to the GNU or non-GNU linker
3209 AC_DEFUN([AC_PROG_LD],
3210 [AC_ARG_WITH([gnu-ld],
3211 [AC_HELP_STRING([--with-gnu-ld],
3212 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3213 [test "$withval" = no || with_gnu_ld=yes],
3214 [with_gnu_ld=no])
3215 AC_REQUIRE([LT_AC_PROG_SED])dnl
3216 AC_REQUIRE([AC_PROG_CC])dnl
3217 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3218 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3219 ac_prog=ld
3220 if test "$GCC" = yes; then
3221 # Check if gcc -print-prog-name=ld gives a path.
3222 AC_MSG_CHECKING([for ld used by $CC])
3223 case $host in
3224 *-*-mingw*)
3225 # gcc leaves a trailing carriage return which upsets mingw
3226 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3227 *)
3228 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3229 esac
3230 case $ac_prog in
3231 # Accept absolute paths.
3232 [[\\/]]* | ?:[[\\/]]*)
3233 re_direlt='/[[^/]][[^/]]*/\.\./'
3234 # Canonicalize the path of ld
3235 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3236 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3237 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3238 done
3239 test -z "$LD" && LD="$ac_prog"
3240 ;;
3241 "")
3242 # If it fails, then pretend we aren't using GCC.
3243 ac_prog=ld
3244 ;;
3245 *)
3246 # If it is relative, then search for the first ld in PATH.
3247 with_gnu_ld=unknown
3248 ;;
3249 esac
3250 elif test "$with_gnu_ld" = yes; then
3251 AC_MSG_CHECKING([for GNU ld])
3252 else
3253 AC_MSG_CHECKING([for non-GNU ld])
3254 fi
3255 AC_CACHE_VAL(lt_cv_path_LD,
3256 [if test -z "$LD"; then
3257 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3258 for ac_dir in $PATH; do
3259 IFS="$lt_save_ifs"
3260 test -z "$ac_dir" && ac_dir=.
3261 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3262 lt_cv_path_LD="$ac_dir/$ac_prog"
3263 # Check to see if the program is GNU ld. I'd rather use --version,
3264 # but apparently some GNU ld's only accept -v.
3265 # Break only if it was the GNU/non-GNU ld that we prefer.
3266 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3267 *GNU* | *'with BFD'*)
3268 test "$with_gnu_ld" != no && break
3269 ;;
3270 *)
3271 test "$with_gnu_ld" != yes && break
3272 ;;
3273 esac
3274 fi
3275 done
3276 IFS="$lt_save_ifs"
3277 else
3278 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3279 fi])
3280 LD="$lt_cv_path_LD"
3281 if test -n "$LD"; then
3282 AC_MSG_RESULT($LD)
3283 else
3284 AC_MSG_RESULT(no)
3285 fi
3286 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3287 AC_PROG_LD_GNU
3288 ])# AC_PROG_LD
3289
3290
3291 # AC_PROG_LD_GNU
3292 # --------------
3293 AC_DEFUN([AC_PROG_LD_GNU],
3294 [AC_REQUIRE([AC_PROG_EGREP])dnl
3295 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3296 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3297 case `"$LD" -v 2>&1 </dev/null` in
3298 *GNU* | *'with BFD'*)
3299 lt_cv_prog_gnu_ld=yes
3300 ;;
3301 *)
3302 lt_cv_prog_gnu_ld=no
3303 ;;
3304 esac])
3305 with_gnu_ld=$lt_cv_prog_gnu_ld
3306 ])# AC_PROG_LD_GNU
3307
3308
3309 # AC_PROG_LD_RELOAD_FLAG
3310 # ----------------------
3311 # find reload flag for linker
3312 # -- PORTME Some linkers may need a different reload flag.
3313 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3314 [AC_CACHE_CHECK([for $LD option to reload object files],
3315 lt_cv_ld_reload_flag,
3316 [lt_cv_ld_reload_flag='-r'])
3317 reload_flag=$lt_cv_ld_reload_flag
3318 case $reload_flag in
3319 "" | " "*) ;;
3320 *) reload_flag=" $reload_flag" ;;
3321 esac
3322 reload_cmds='$CC -nostdlib -Xlinker$reload_flag $archargs -o $output$reload_objs'
3323 ])# AC_PROG_LD_RELOAD_FLAG
3324
3325
3326 # AC_DEPLIBS_CHECK_METHOD
3327 # -----------------------
3328 # how to check for library dependencies
3329 # -- PORTME fill in with the dynamic library characteristics
3330 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3331 [AC_CACHE_CHECK([how to recognise dependent libraries],
3332 lt_cv_deplibs_check_method,
3333 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3334 lt_cv_file_magic_test_file=
3335 lt_cv_deplibs_check_method='unknown'
3336 # Need to set the preceding variable on all platforms that support
3337 # interlibrary dependencies.
3338 # 'none' -- dependencies not supported.
3339 # `unknown' -- same as none, but documents that we really don't know.
3340 # 'pass_all' -- all dependencies passed with no checks.
3341 # 'test_compile' -- check by making test program.
3342 # 'file_magic [[regex]]' -- check by looking for files in library path
3343 # which responds to the $file_magic_cmd with a given extended regex.
3344 # If you have `file' or equivalent on your system and you're not sure
3345 # whether `pass_all' will *always* work, you probably want this one.
3346
3347 case $host_os in
3348 aix4* | aix5*)
3349 lt_cv_deplibs_check_method=pass_all
3350 ;;
3351
3352 beos*)
3353 lt_cv_deplibs_check_method=pass_all
3354 ;;
3355
3356 bsdi4*)
3357 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3358 lt_cv_file_magic_cmd='/usr/bin/file -L'
3359 lt_cv_file_magic_test_file=/shlib/libc.so
3360 ;;
3361
3362 cygwin* | mingw* | pw32*)
3363 # win32_libid is a shell function defined in ltmain.sh
3364 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3365 lt_cv_file_magic_cmd='win32_libid'
3366 ;;
3367
3368 darwin* | rhapsody*)
3369 # this will be overwritten by pass_all, but leave it in just in case
3370 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3371 lt_cv_file_magic_cmd='/usr/bin/file -L'
3372 case "$host_os" in
3373 rhapsody* | darwin1.[[012]])
3374 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
3375 ;;
3376 *) # Darwin 1.3 on
3377 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3378 ;;
3379 esac
3380 lt_cv_deplibs_check_method=pass_all
3381 ;;
3382
3383 freebsd*)
3384 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3385 case $host_cpu in
3386 i*86 )
3387 # Not sure whether the presence of OpenBSD here was a mistake.
3388 # Let's accept both of them until this is cleared up.
3389 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3390 lt_cv_file_magic_cmd=/usr/bin/file
3391 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3392 ;;
3393 esac
3394 else
3395 lt_cv_deplibs_check_method=pass_all
3396 fi
3397 ;;
3398
3399 gnu*)
3400 lt_cv_deplibs_check_method=pass_all
3401 ;;
3402
3403 hpux10.20* | hpux11*)
3404 lt_cv_file_magic_cmd=/usr/bin/file
3405 case "$host_cpu" in
3406 ia64*)
3407 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3408 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3409 ;;
3410 hppa*64*)
3411 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3412 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3413 ;;
3414 *)
3415 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3416 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3417 ;;
3418 esac
3419 ;;
3420
3421 irix5* | irix6* | nonstopux*)
3422 case $host_os in
3423 irix5* | nonstopux*)
3424 # this will be overridden with pass_all, but let us keep it just in case
3425 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3426 ;;
3427 *)
3428 case $LD in
3429 *-32|*"-32 ") libmagic=32-bit;;
3430 *-n32|*"-n32 ") libmagic=N32;;
3431 *-64|*"-64 ") libmagic=64-bit;;
3432 *) libmagic=never-match;;
3433 esac
3434 # this will be overridden with pass_all, but let us keep it just in case
3435 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3436 ;;
3437 esac
3438 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3439 lt_cv_deplibs_check_method=pass_all
3440 ;;
3441
3442 # This must be Linux ELF.
3443 linux*)
3444 case $host_cpu in
3445 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
3446 lt_cv_deplibs_check_method=pass_all ;;
3447 *)
3448 # glibc up to 2.1.1 does not perform some relocations on ARM
3449 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3450 esac
3451 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3452 ;;
3453
3454 netbsd*)
3455 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3456 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3457 else
3458 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3459 fi
3460 ;;
3461
3462 newos6*)
3463 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3464 lt_cv_file_magic_cmd=/usr/bin/file
3465 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3466 ;;
3467
3468 nto-qnx)
3469 lt_cv_deplibs_check_method=unknown
3470 ;;
3471
3472 openbsd*)
3473 lt_cv_file_magic_cmd=/usr/bin/file
3474 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3475 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3476 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3477 else
3478 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3479 fi
3480 ;;
3481
3482 osf3* | osf4* | osf5*)
3483 # this will be overridden with pass_all, but let us keep it just in case
3484 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3485 lt_cv_file_magic_test_file=/shlib/libc.so
3486 lt_cv_deplibs_check_method=pass_all
3487 ;;
3488
3489 sco3.2v5*)
3490 lt_cv_deplibs_check_method=pass_all
3491 ;;
3492
3493 solaris*)
3494 lt_cv_deplibs_check_method=pass_all
3495 lt_cv_file_magic_test_file=/lib/libc.so
3496 ;;
3497
3498 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3499 case $host_vendor in
3500 motorola)
3501 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3502 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3503 ;;
3504 ncr)
3505 lt_cv_deplibs_check_method=pass_all
3506 ;;
3507 sequent)
3508 lt_cv_file_magic_cmd='/bin/file'
3509 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3510 ;;
3511 sni)
3512 lt_cv_file_magic_cmd='/bin/file'
3513 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3514 lt_cv_file_magic_test_file=/lib/libc.so
3515 ;;
3516 siemens)
3517 lt_cv_deplibs_check_method=pass_all
3518 ;;
3519 esac
3520 ;;
3521
3522 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3523 lt_cv_deplibs_check_method=pass_all
3524 ;;
3525 esac
3526 ])
3527 file_magic_cmd=$lt_cv_file_magic_cmd
3528 deplibs_check_method=$lt_cv_deplibs_check_method
3529 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3530 ])# AC_DEPLIBS_CHECK_METHOD
3531
3532
3533 # AC_PROG_NM
3534 # ----------
3535 # find the path to a BSD-compatible name lister
3536 AC_DEFUN([AC_PROG_NM],
3537 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3538 [if test -n "$NM"; then
3539 # Let the user override the test.
3540 lt_cv_path_NM="$NM"
3541 else
3542 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3543 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3544 IFS="$lt_save_ifs"
3545 test -z "$ac_dir" && ac_dir=.
3546 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3547 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3548 # Check to see if the nm accepts a BSD-compat flag.
3549 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3550 # nm: unknown option "B" ignored
3551 # Tru64's nm complains that /dev/null is an invalid object file
3552 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3553 */dev/null* | *'Invalid file or object type'*)
3554 lt_cv_path_NM="$tmp_nm -B"
3555 break
3556 ;;
3557 *)
3558 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3559 */dev/null*)
3560 lt_cv_path_NM="$tmp_nm -p"
3561 break
3562 ;;
3563 *)
3564 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3565 continue # so that we can try to find one that supports BSD flags
3566 ;;
3567 esac
3568 esac
3569 fi
3570 done
3571 IFS="$lt_save_ifs"
3572 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3573 fi])
3574 NM="$lt_cv_path_NM"
3575 ])# AC_PROG_NM
3576
3577
3578 # AC_CHECK_LIBM
3579 # -------------
3580 # check for math library
3581 AC_DEFUN([AC_CHECK_LIBM],
3582 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3583 LIBM=
3584 case $host in
3585 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3586 # These system don't have libm, or don't need it
3587 ;;
3588 *-ncr-sysv4.3*)
3589 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3590 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3591 ;;
3592 *)
3593 AC_CHECK_LIB(m, cos, LIBM="-lm")
3594 ;;
3595 esac
3596 ])# AC_CHECK_LIBM
3597
3598
3599 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3600 # -----------------------------------
3601 # sets LIBLTDL to the link flags for the libltdl convenience library and
3602 # LTDLINCL to the include flags for the libltdl header and adds
3603 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3604 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3605 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3606 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3607 # '${top_srcdir}/' (note the single quotes!). If your package is not
3608 # flat and you're not using automake, define top_builddir and
3609 # top_srcdir appropriately in the Makefiles.
3610 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3611 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3612 case $enable_ltdl_convenience in
3613 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3614 "") enable_ltdl_convenience=yes
3615 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3616 esac
3617 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3618 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3619 # For backwards non-gettext consistent compatibility...
3620 INCLTDL="$LTDLINCL"
3621 ])# AC_LIBLTDL_CONVENIENCE
3622
3623
3624 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3625 # -----------------------------------
3626 # sets LIBLTDL to the link flags for the libltdl installable library and
3627 # LTDLINCL to the include flags for the libltdl header and adds
3628 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3629 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3630 # DIRECTORY is not provided and an installed libltdl is not found, it is
3631 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3632 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3633 # quotes!). If your package is not flat and you're not using automake,
3634 # define top_builddir and top_srcdir appropriately in the Makefiles.
3635 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3636 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3637 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3638 AC_CHECK_LIB(ltdl, lt_dlinit,
3639 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3640 [if test x"$enable_ltdl_install" = xno; then
3641 AC_MSG_WARN([libltdl not installed, but installation disabled])
3642 else
3643 enable_ltdl_install=yes
3644 fi
3645 ])
3646 if test x"$enable_ltdl_install" = x"yes"; then
3647 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3648 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3649 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3650 else
3651 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3652 LIBLTDL="-lltdl"
3653 LTDLINCL=
3654 fi
3655 # For backwards non-gettext consistent compatibility...
3656 INCLTDL="$LTDLINCL"
3657 ])# AC_LIBLTDL_INSTALLABLE
3658
3659
3660 # AC_LIBTOOL_CXX
3661 # --------------
3662 # enable support for C++ libraries
3663 AC_DEFUN([AC_LIBTOOL_CXX],
3664 [AC_REQUIRE([_LT_AC_LANG_CXX])
3665 ])# AC_LIBTOOL_CXX
3666
3667
3668 # _LT_AC_LANG_CXX
3669 # ---------------
3670 AC_DEFUN([_LT_AC_LANG_CXX],
3671 [AC_REQUIRE([AC_PROG_CXX])
3672 AC_REQUIRE([AC_PROG_CXXCPP])
3673 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
3674 ])# _LT_AC_LANG_CXX
3675
3676
3677 # AC_LIBTOOL_F77
3678 # --------------
3679 # enable support for Fortran 77 libraries
3680 AC_DEFUN([AC_LIBTOOL_F77],
3681 [AC_REQUIRE([_LT_AC_LANG_F77])
3682 ])# AC_LIBTOOL_F77
3683
3684
3685 # _LT_AC_LANG_F77
3686 # ---------------
3687 AC_DEFUN([_LT_AC_LANG_F77],
3688 [AC_REQUIRE([AC_PROG_F77])
3689 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
3690 ])# _LT_AC_LANG_F77
3691
3692
3693 # AC_LIBTOOL_GCJ
3694 # --------------
3695 # enable support for GCJ libraries
3696 AC_DEFUN([AC_LIBTOOL_GCJ],
3697 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3698 ])# AC_LIBTOOL_GCJ
3699
3700
3701 # _LT_AC_LANG_GCJ
3702 # ---------------
3703 AC_DEFUN([_LT_AC_LANG_GCJ],
3704 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3705 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3706 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3707 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3708 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3709 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3710 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
3711 ])# _LT_AC_LANG_GCJ
3712
3713
3714 # AC_LIBTOOL_RC
3715 # --------------
3716 # enable support for Windows resource files
3717 AC_DEFUN([AC_LIBTOOL_RC],
3718 [AC_REQUIRE([LT_AC_PROG_RC])
3719 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
3720 ])# AC_LIBTOOL_RC
3721
3722
3723 # AC_LIBTOOL_LANG_C_CONFIG
3724 # ------------------------
3725 # Ensure that the configuration vars for the C compiler are
3726 # suitably defined. Those variables are subsequently used by
3727 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3728 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3729 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3730 [lt_save_CC="$CC"
3731 AC_LANG_PUSH(C)
3732
3733 # Source file extension for C test sources.
3734 ac_ext=c
3735
3736 # Object file extension for compiled C test sources.
3737 objext=o
3738 _LT_AC_TAGVAR(objext, $1)=$objext
3739
3740 # Code to be used in simple compile tests
3741 lt_simple_compile_test_code="int some_variable = 0;\n"
3742
3743 # Code to be used in simple link tests
3744 lt_simple_link_test_code='int main(){return(0);}\n'
3745
3746 _LT_AC_SYS_COMPILER
3747
3748 #
3749 # Check for any special shared library compilation flags.
3750 #
3751 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3752 if test "$GCC" = no; then
3753 case $host_os in
3754 sco3.2v5*)
3755 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3756 ;;
3757 esac
3758 fi
3759 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3760 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3761 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
3762 else
3763 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3764 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3765 fi
3766 fi
3767
3768
3769 #
3770 # Check to make sure the static flag actually works.
3771 #
3772 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3773 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3774 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3775 [],
3776 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3777
3778
3779 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3780 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3781 AC_LIBTOOL_PROG_CC_C_O($1)
3782 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3783 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3784 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3785 AC_LIBTOOL_SYS_LIB_STRIP
3786 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3787 AC_LIBTOOL_DLOPEN_SELF($1)
3788
3789 # Report which librarie types wil actually be built
3790 AC_MSG_CHECKING([if libtool supports shared libraries])
3791 AC_MSG_RESULT([$can_build_shared])
3792
3793 AC_MSG_CHECKING([whether to build shared libraries])
3794 test "$can_build_shared" = "no" && enable_shared=no
3795
3796 # On AIX, shared libraries and static libraries use the same namespace, and
3797 # are all built from PIC.
3798 case "$host_os" in
3799 aix3*)
3800 test "$enable_shared" = yes && enable_static=no
3801 if test -n "$RANLIB"; then
3802 archive_cmds="$archive_cmds\${_S_}\$RANLIB \$lib"
3803 postinstall_cmds='$RANLIB $lib'
3804 fi
3805 ;;
3806
3807 aix4*)
3808 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3809 test "$enable_shared" = yes && enable_static=no
3810 fi
3811 ;;
3812 darwin* | rhapsody*)
3813 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
3814 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3815 case "$host_os" in
3816 rhapsody* | darwin1.[[012]])
3817 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3818 ;;
3819 darwin1.* | darwin[[2-6]].*) # Darwin 1.3 on, but less than 7.0
3820 test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3821 ;;
3822 *) # Darwin 7.0 on
3823 case "${MACOSX_DEPLOYMENT_TARGET-10.1}" in
3824 10.[[012]])
3825 test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3826 ;;
3827 *) # 10.3 on
3828 if test -z ${LD_TWOLEVEL_NAMESPACE}; then
3829 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3830 else
3831 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3832 fi
3833 ;;
3834 esac
3835 ;;
3836 esac
3837 # FIXME: Relying on posixy $() will cause problems for
3838 # cross-compilation, but unfortunately the echo tests do not
3839 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
3840 # `"' quotes if we put them in here... so don't!
3841 output_verbose_link_cmd='echo'
3842 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $archargs $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3843 _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $archargs $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3844 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's