root/wifidog/wifidog-1.1.3_beta4/aclocal.m4

Revision 98, 255.8 kB (checked in by syrus, 2 years ago)

version initiale

Line 
1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005  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 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15
16 # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
17
18
19 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20 # -----------------------------------------------------------
21 # If this macro is not defined by Autoconf, define it here.
22 m4_ifdef([AC_PROVIDE_IFELSE],
23          [],
24          [m4_define([AC_PROVIDE_IFELSE],
25                  [m4_ifdef([AC_PROVIDE_$1],
26                            [$2], [$3])])])
27
28
29 # AC_PROG_LIBTOOL
30 # ---------------
31 AC_DEFUN([AC_PROG_LIBTOOL],
32 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35   AC_PROVIDE_IFELSE([AC_PROG_CXX],
36     [AC_LIBTOOL_CXX],
37     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
38   ])])
39 dnl And a similar setup for Fortran 77 support
40   AC_PROVIDE_IFELSE([AC_PROG_F77],
41     [AC_LIBTOOL_F77],
42     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
43 ])])
44
45 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
49     [AC_LIBTOOL_GCJ],
50     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
51       [AC_LIBTOOL_GCJ],
52       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
53         [AC_LIBTOOL_GCJ],
54       [ifdef([AC_PROG_GCJ],
55              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56        ifdef([A][M_PROG_GCJ],
57              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58        ifdef([LT_AC_PROG_GCJ],
59              [define([LT_AC_PROG_GCJ],
60                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
61 ])])# AC_PROG_LIBTOOL
62
63
64 # _AC_PROG_LIBTOOL
65 # ----------------
66 AC_DEFUN([_AC_PROG_LIBTOOL],
67 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
68 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
71
72 # This can be used to rebuild libtool when needed
73 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
74
75 # Always use our own libtool.
76 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
77 AC_SUBST(LIBTOOL)dnl
78
79 # Prevent multiple expansion
80 define([AC_PROG_LIBTOOL], [])
81 ])# _AC_PROG_LIBTOOL
82
83
84 # AC_LIBTOOL_SETUP
85 # ----------------
86 AC_DEFUN([AC_LIBTOOL_SETUP],
87 [AC_PREREQ(2.50)dnl
88 AC_REQUIRE([AC_ENABLE_SHARED])dnl
89 AC_REQUIRE([AC_ENABLE_STATIC])dnl
90 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91 AC_REQUIRE([AC_CANONICAL_HOST])dnl
92 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
93 AC_REQUIRE([AC_PROG_CC])dnl
94 AC_REQUIRE([AC_PROG_LD])dnl
95 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96 AC_REQUIRE([AC_PROG_NM])dnl
97
98 AC_REQUIRE([AC_PROG_LN_S])dnl
99 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
100 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
101 AC_REQUIRE([AC_OBJEXT])dnl
102 AC_REQUIRE([AC_EXEEXT])dnl
103 dnl
104
105 AC_LIBTOOL_SYS_MAX_CMD_LEN
106 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
107 AC_LIBTOOL_OBJDIR
108
109 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
110 _LT_AC_PROG_ECHO_BACKSLASH
111
112 case $host_os in
113 aix3*)
114   # AIX sometimes has problems with the GCC collect2 program.  For some
115   # reason, if we set the COLLECT_NAMES environment variable, the problems
116   # vanish in a puff of smoke.
117   if test "X${COLLECT_NAMES+set}" != Xset; then
118     COLLECT_NAMES=
119     export COLLECT_NAMES
120   fi
121   ;;
122 esac
123
124 # Sed substitution that helps us do robust quoting.  It backslashifies
125 # metacharacters that are still active within double-quoted strings.
126 Xsed='sed -e 1s/^X//'
127 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128
129 # Same as above, but do not quote variable references.
130 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
131
132 # Sed substitution to delay expansion of an escaped shell variable in a
133 # double_quote_subst'ed string.
134 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
135
136 # Sed substitution to avoid accidental globbing in evaled expressions
137 no_glob_subst='s/\*/\\\*/g'
138
139 # Constants:
140 rm="rm -f"
141
142 # Global variables:
143 default_ofile=libtool
144 can_build_shared=yes
145
146 # All known linkers require a `.a' archive for static linking (except MSVC,
147 # which needs '.lib').
148 libext=a
149 ltmain="$ac_aux_dir/ltmain.sh"
150 ofile="$default_ofile"
151 with_gnu_ld="$lt_cv_prog_gnu_ld"
152
153 AC_CHECK_TOOL(AR, ar, false)
154 AC_CHECK_TOOL(RANLIB, ranlib, :)
155 AC_CHECK_TOOL(STRIP, strip, :)
156
157 old_CC="$CC"
158 old_CFLAGS="$CFLAGS"
159
160 # Set sane defaults for various variables
161 test -z "$AR" && AR=ar
162 test -z "$AR_FLAGS" && AR_FLAGS=cru
163 test -z "$AS" && AS=as
164 test -z "$CC" && CC=cc
165 test -z "$LTCC" && LTCC=$CC
166 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
167 test -z "$DLLTOOL" && DLLTOOL=dlltool
168 test -z "$LD" && LD=ld
169 test -z "$LN_S" && LN_S="ln -s"
170 test -z "$MAGIC_CMD" && MAGIC_CMD=file
171 test -z "$NM" && NM=nm
172 test -z "$SED" && SED=sed
173 test -z "$OBJDUMP" && OBJDUMP=objdump
174 test -z "$RANLIB" && RANLIB=:
175 test -z "$STRIP" && STRIP=:
176 test -z "$ac_objext" && ac_objext=o
177
178 # Determine commands to create old-style static archives.
179 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
180 old_postinstall_cmds='chmod 644 $oldlib'
181 old_postuninstall_cmds=
182
183 if test -n "$RANLIB"; then
184   case $host_os in
185   openbsd*)
186     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
187     ;;
188   *)
189     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
190     ;;
191   esac
192   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
193 fi
194
195 _LT_CC_BASENAME([$compiler])
196
197 # Only perform the check for file, if the check method requires it
198 case $deplibs_check_method in
199 file_magic*)
200   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
201     AC_PATH_MAGIC
202   fi
203   ;;
204 esac
205
206 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
207 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
208 enable_win32_dll=yes, enable_win32_dll=no)
209
210 AC_ARG_ENABLE([libtool-lock],
211     [AC_HELP_STRING([--disable-libtool-lock],
212         [avoid locking (might break parallel builds)])])
213 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
214
215 AC_ARG_WITH([pic],
216     [AC_HELP_STRING([--with-pic],
217         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
218     [pic_mode="$withval"],
219     [pic_mode=default])
220 test -z "$pic_mode" && pic_mode=default
221
222 # Use C for the default configuration in the libtool script
223 tagname=
224 AC_LIBTOOL_LANG_C_CONFIG
225 _LT_AC_TAGCONFIG
226 ])# AC_LIBTOOL_SETUP
227
228
229 # _LT_AC_SYS_COMPILER
230 # -------------------
231 AC_DEFUN([_LT_AC_SYS_COMPILER],
232 [AC_REQUIRE([AC_PROG_CC])dnl
233
234 # If no C compiler was specified, use CC.
235 LTCC=${LTCC-"$CC"}
236
237 # If no C compiler flags were specified, use CFLAGS.
238 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
239
240 # Allow CC to be a program name with arguments.
241 compiler=$CC
242 ])# _LT_AC_SYS_COMPILER
243
244
245 # _LT_CC_BASENAME(CC)
246 # -------------------
247 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
248 AC_DEFUN([_LT_CC_BASENAME],
249 [for cc_temp in $1""; do
250   case $cc_temp in
251     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
252     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
253     \-*) ;;
254     *) break;;
255   esac
256 done
257 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
258 ])
259
260
261 # _LT_COMPILER_BOILERPLATE
262 # ------------------------
263 # Check for compiler boilerplate output or warnings with
264 # the simple compiler test code.
265 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
266 [ac_outfile=conftest.$ac_objext
267 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
268 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
269 _lt_compiler_boilerplate=`cat conftest.err`
270 $rm conftest*
271 ])# _LT_COMPILER_BOILERPLATE
272
273
274 # _LT_LINKER_BOILERPLATE
275 # ----------------------
276 # Check for linker boilerplate output or warnings with
277 # the simple link test code.
278 AC_DEFUN([_LT_LINKER_BOILERPLATE],
279 [ac_outfile=conftest.$ac_objext
280 printf "$lt_simple_link_test_code" >conftest.$ac_ext
281 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
282 _lt_linker_boilerplate=`cat conftest.err`
283 $rm conftest*
284 ])# _LT_LINKER_BOILERPLATE
285
286
287 # _LT_AC_SYS_LIBPATH_AIX
288 # ----------------------
289 # Links a minimal program and checks the executable
290 # for the system default hardcoded library path. In most cases,
291 # this is /usr/lib:/lib, but when the MPI compilers are used
292 # the location of the communication and MPI libs are included too.
293 # If we don't find anything, use the default library path according
294 # to the aix ld manual.
295 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
296 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
297 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
298 }'`
299 # Check for a 64-bit object if we didn't find anything.
300 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; }
301 }'`; fi],[])
302 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
303 ])# _LT_AC_SYS_LIBPATH_AIX
304
305
306 # _LT_AC_SHELL_INIT(ARG)
307 # ----------------------
308 AC_DEFUN([_LT_AC_SHELL_INIT],
309 [ifdef([AC_DIVERSION_NOTICE],
310              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
311          [AC_DIVERT_PUSH(NOTICE)])
312 $1
313 AC_DIVERT_POP
314 ])# _LT_AC_SHELL_INIT
315
316
317 # _LT_AC_PROG_ECHO_BACKSLASH
318 # --------------------------
319 # Add some code to the start of the generated configure script which
320 # will find an echo command which doesn't interpret backslashes.
321 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
322 [_LT_AC_SHELL_INIT([
323 # Check that we are running under the correct shell.
324 SHELL=${CONFIG_SHELL-/bin/sh}
325
326 case X$ECHO in
327 X*--fallback-echo)
328   # Remove one level of quotation (which was required for Make).
329   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
330   ;;
331 esac
332
333 echo=${ECHO-echo}
334 if test "X[$]1" = X--no-reexec; then
335   # Discard the --no-reexec flag, and continue.
336   shift
337 elif test "X[$]1" = X--fallback-echo; then
338   # Avoid inline document here, it may be left over
339   :
340 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
341   # Yippee, $echo works!
342   :
343 else
344   # Restart under the correct shell.
345   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
346 fi
347
348 if test "X[$]1" = X--fallback-echo; then
349   # used as fallback echo
350   shift
351   cat <<EOF
352 [$]*
353 EOF
354   exit 0
355 fi
356
357 # The HP-UX ksh and POSIX shell print the target directory to stdout
358 # if CDPATH is set.
359 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
360
361 if test -z "$ECHO"; then
362 if test "X${echo_test_string+set}" != Xset; then
363 # find a string as large as possible, as long as the shell can cope with it
364   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
365     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
366     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
367        echo_test_string=`eval $cmd` &&
368        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
369     then
370       break
371     fi
372   done
373 fi
374
375 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
376    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
377    test "X$echo_testing_string" = "X$echo_test_string"; then
378   :
379 else
380   # The Solaris, AIX, and Digital Unix default echo programs unquote
381   # backslashes.  This makes it impossible to quote backslashes using
382   #   echo "$something" | sed 's/\\/\\\\/g'
383   #
384   # So, first we look for a working echo in the user's PATH.
385
386   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
387   for dir in $PATH /usr/ucb; do
388     IFS="$lt_save_ifs"
389     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
390        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
391        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
392        test "X$echo_testing_string" = "X$echo_test_string"; then
393       echo="$dir/echo"
394       break
395     fi
396   done
397   IFS="$lt_save_ifs"
398
399   if test "X$echo" = Xecho; then
400     # We didn't find a better echo, so look for alternatives.
401     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
402        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
403        test "X$echo_testing_string" = "X$echo_test_string"; then
404       # This shell has a builtin print -r that does the trick.
405       echo='print -r'
406     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
407          test "X$CONFIG_SHELL" != X/bin/ksh; then
408       # If we have ksh, try running configure again with it.
409       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
410       export ORIGINAL_CONFIG_SHELL
411       CONFIG_SHELL=/bin/ksh
412       export CONFIG_SHELL
413       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
414     else
415       # Try using printf.
416       echo='printf %s\n'
417       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
418          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
419          test "X$echo_testing_string" = "X$echo_test_string"; then
420         # Cool, printf works
421         :
422       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
423            test "X$echo_testing_string" = 'X\t' &&
424            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
425            test "X$echo_testing_string" = "X$echo_test_string"; then
426         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
427         export CONFIG_SHELL
428         SHELL="$CONFIG_SHELL"
429         export SHELL
430         echo="$CONFIG_SHELL [$]0 --fallback-echo"
431       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
432            test "X$echo_testing_string" = 'X\t' &&
433            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
434            test "X$echo_testing_string" = "X$echo_test_string"; then
435         echo="$CONFIG_SHELL [$]0 --fallback-echo"
436       else
437         # maybe with a smaller string...
438         prev=:
439
440         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
441           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
442           then
443             break
444           fi
445           prev="$cmd"
446         done
447
448         if test "$prev" != 'sed 50q "[$]0"'; then
449           echo_test_string=`eval $prev`
450           export echo_test_string
451           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
452         else
453           # Oops.  We lost completely, so just stick with echo.
454           echo=echo
455         fi
456       fi
457     fi
458   fi
459 fi
460 fi
461
462 # Copy echo and quote the copy suitably for passing to libtool from
463 # the Makefile, instead of quoting the original, which is used later.
464 ECHO=$echo
465 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
466    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
467 fi
468
469 AC_SUBST(ECHO)
470 ])])# _LT_AC_PROG_ECHO_BACKSLASH
471
472
473 # _LT_AC_LOCK
474 # -----------
475 AC_DEFUN([_LT_AC_LOCK],
476 [AC_ARG_ENABLE([libtool-lock],
477     [AC_HELP_STRING([--disable-libtool-lock],
478         [avoid locking (might break parallel builds)])])
479 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
480
481 # Some flags need to be propagated to the compiler or linker for good
482 # libtool support.
483 case $host in
484 ia64-*-hpux*)
485   # Find out which ABI we are using.
486   echo 'int i;' > conftest.$ac_ext
487   if AC_TRY_EVAL(ac_compile); then
488     case `/usr/bin/file conftest.$ac_objext` in
489     *ELF-32*)
490       HPUX_IA64_MODE="32"
491       ;;
492     *ELF-64*)
493       HPUX_IA64_MODE="64"
494       ;;
495     esac
496   fi
497   rm -rf conftest*
498   ;;
499 *-*-irix6*)
500   # Find out which ABI we are using.
501   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
502   if AC_TRY_EVAL(ac_compile); then
503    if test "$lt_cv_prog_gnu_ld" = yes; then
504     case `/usr/bin/file conftest.$ac_objext` in
505     *32-bit*)
506       LD="${LD-ld} -melf32bsmip"
507       ;;
508     *N32*)
509       LD="${LD-ld} -melf32bmipn32"
510       ;;
511     *64-bit*)
512       LD="${LD-ld} -melf64bmip"
513       ;;
514     esac
515    else
516     case `/usr/bin/file conftest.$ac_objext` in
517     *32-bit*)
518       LD="${LD-ld} -32"
519       ;;
520     *N32*)
521       LD="${LD-ld} -n32"
522       ;;
523     *64-bit*)
524       LD="${LD-ld} -64"
525       ;;
526     esac
527    fi
528   fi
529   rm -rf conftest*
530   ;;
531
532 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
533   # Find out which ABI we are using.
534   echo 'int i;' > conftest.$ac_ext
535   if AC_TRY_EVAL(ac_compile); then
536     case `/usr/bin/file conftest.o` in
537     *32-bit*)
538       case $host in
539         x86_64-*linux*)
540           LD="${LD-ld} -m elf_i386"
541           ;;
542         ppc64-*linux*|powerpc64-*linux*)
543           LD="${LD-ld} -m elf32ppclinux"
544           ;;
545         s390x-*linux*)
546           LD="${LD-ld} -m elf_s390"
547           ;;
548         sparc64-*linux*)
549           LD="${LD-ld} -m elf32_sparc"
550           ;;
551       esac
552       ;;
553     *64-bit*)
554       case $host in
555         x86_64-*linux*)
556           LD="${LD-ld} -m elf_x86_64"
557           ;;
558         ppc*-*linux*|powerpc*-*linux*)
559           LD="${LD-ld} -m elf64ppc"
560           ;;
561         s390*-*linux*)
562           LD="${LD-ld} -m elf64_s390"
563           ;;
564         sparc*-*linux*)
565           LD="${LD-ld} -m elf64_sparc"
566           ;;
567       esac
568       ;;
569     esac
570   fi
571   rm -rf conftest*
572   ;;
573
574 *-*-sco3.2v5*)
575   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
576   SAVE_CFLAGS="$CFLAGS"
577   CFLAGS="$CFLAGS -belf"
578   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
579     [AC_LANG_PUSH(C)
580      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
581      AC_LANG_POP])
582   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
583     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
584     CFLAGS="$SAVE_CFLAGS"
585   fi
586   ;;
587 sparc*-*solaris*)
588   # Find out which ABI we are using.
589   echo 'int i;' > conftest.$ac_ext
590   if AC_TRY_EVAL(ac_compile); then
591     case `/usr/bin/file conftest.o` in
592     *64-bit*)
593       case $lt_cv_prog_gnu_ld in
594       yes*) LD="${LD-ld} -m elf64_sparc" ;;
595       *)    LD="${LD-ld} -64" ;;
596       esac
597       ;;
598     esac
599   fi
600   rm -rf conftest*
601   ;;
602
603 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
604 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
605   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
606   AC_CHECK_TOOL(AS, as, false)
607   AC_CHECK_TOOL(OBJDUMP, objdump, false)
608   ;;
609   ])
610 esac
611
612 need_locks="$enable_libtool_lock"
613
614 ])# _LT_AC_LOCK
615
616
617 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
618 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
619 # ----------------------------------------------------------------
620 # Check whether the given compiler option works
621 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
622 [AC_REQUIRE([LT_AC_PROG_SED])
623 AC_CACHE_CHECK([$1], [$2],
624   [$2=no
625   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
626    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
627    lt_compiler_flag="$3"
628    # Insert the option either (1) after the last *FLAGS variable, or
629    # (2) before a word containing "conftest.", or (3) at the end.
630    # Note that $ac_compile itself does not contain backslashes and begins
631    # with a dollar sign (not a hyphen), so the echo should work correctly.
632    # The option is referenced via a variable to avoid confusing sed.
633    lt_compile=`echo "$ac_compile" | $SED \
634    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
635    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
636    -e 's:$: $lt_compiler_flag:'`
637    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
638    (eval "$lt_compile" 2>conftest.err)
639    ac_status=$?
640    cat conftest.err >&AS_MESSAGE_LOG_FD
641    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
642    if (exit $ac_status) && test -s "$ac_outfile"; then
643      # The compiler can only warn and ignore the option if not recognized
644      # So say no if there are warnings other than the usual output.
645      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
646      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
647      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
648        $2=yes
649      fi
650    fi
651    $rm conftest*
652 ])
653
654 if test x"[$]$2" = xyes; then
655     ifelse([$5], , :, [$5])
656 else
657     ifelse([$6], , :, [$6])
658 fi
659 ])# AC_LIBTOOL_COMPILER_OPTION
660
661
662 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
663 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
664 # ------------------------------------------------------------
665 # Check whether the given compiler option works
666 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
667 [AC_CACHE_CHECK([$1], [$2],
668   [$2=no
669    save_LDFLAGS="$LDFLAGS"
670    LDFLAGS="$LDFLAGS $3"
671    printf "$lt_simple_link_test_code" > conftest.$ac_ext
672    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
673      # The linker can only warn and ignore the option if not recognized
674      # So say no if there are warnings
675      if test -s conftest.err; then
676        # Append any errors to the config.log.
677        cat conftest.err 1>&AS_MESSAGE_LOG_FD
678        $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
679        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
680        if diff conftest.exp conftest.er2 >/dev/null; then
681          $2=yes
682        fi
683      else
684        $2=yes
685      fi
686    fi
687    $rm conftest*
688    LDFLAGS="$save_LDFLAGS"
689 ])
690
691 if test x"[$]$2" = xyes; then
692     ifelse([$4], , :, [$4])
693 else
694     ifelse([$5], , :, [$5])
695 fi
696 ])# AC_LIBTOOL_LINKER_OPTION
697
698
699 # AC_LIBTOOL_SYS_MAX_CMD_LEN
700 # --------------------------
701 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
702 [# find the maximum length of command line arguments
703 AC_MSG_CHECKING([the maximum length of command line arguments])
704 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
705   i=0
706   teststring="ABCD"
707
708   case $build_os in
709   msdosdjgpp*)
710     # On DJGPP, this test can blow up pretty badly due to problems in libc
711     # (any single argument exceeding 2000 bytes causes a buffer overrun
712     # during glob expansion).  Even if it were fixed, the result of this
713     # check would be larger than it should be.
714     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
715     ;;
716
717   gnu*)
718     # Under GNU Hurd, this test is not required because there is
719     # no limit to the length of command line arguments.
720     # Libtool will interpret -1 as no limit whatsoever
721     lt_cv_sys_max_cmd_len=-1;
722     ;;
723
724   cygwin* | mingw*)
725     # On Win9x/ME, this test blows up -- it succeeds, but takes
726     # about 5 minutes as the teststring grows exponentially.
727     # Worse, since 9x/ME are not pre-emptively multitasking,
728     # you end up with a "frozen" computer, even though with patience
729     # the test eventually succeeds (with a max line length of 256k).
730     # Instead, let's just punt: use the minimum linelength reported by
731     # all of the supported platforms: 8192 (on NT/2K/XP).
732     lt_cv_sys_max_cmd_len=8192;
733     ;;
734
735   amigaos*)
736     # On AmigaOS with pdksh, this test takes hours, literally.
737     # So we just punt and use a minimum line length of 8192.
738     lt_cv_sys_max_cmd_len=8192;
739     ;;
740
741   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
742     # This has been around since 386BSD, at least.  Likely further.
743     if test -x /sbin/sysctl; then
744       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
745     elif test -x /usr/sbin/sysctl; then
746       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
747     else
748       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
749     fi
750     # And add a safety zone
751     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
752     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
753     ;;
754
755   interix*)
756     # We know the value 262144 and hardcode it with a safety zone (like BSD)
757     lt_cv_sys_max_cmd_len=196608
758     ;;
759
760   osf*)
761     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
762     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
763     # nice to cause kernel panics so lets avoid the loop below.
764     # First set a reasonable default.
765     lt_cv_sys_max_cmd_len=16384
766     #
767     if test -x /sbin/sysconfig; then
768       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
769         *1*) lt_cv_sys_max_cmd_len=-1 ;;
770       esac
771     fi
772     ;;
773   sco3.2v5*)
774     lt_cv_sys_max_cmd_len=102400
775     ;;
776   sysv5* | sco5v6* | sysv4.2uw2*)
777     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
778     if test -n "$kargmax"; then
779       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
780     else
781       lt_cv_sys_max_cmd_len=32768
782     fi
783     ;;
784   *)
785     # If test is not a shell built-in, we'll probably end up computing a
786     # maximum length that is only half of the actual maximum length, but
787     # we can't tell.
788     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
789     while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
790                = "XX$teststring") >/dev/null 2>&1 &&
791             new_result=`expr "X$teststring" : ".*" 2>&1` &&
792             lt_cv_sys_max_cmd_len=$new_result &&
793             test $i != 17 # 1/2 MB should be enough
794     do
795       i=`expr $i + 1`
796       teststring=$teststring$teststring
797     done
798     teststring=
799     # Add a significant safety factor because C++ compilers can tack on massive
800     # amounts of additional arguments before passing them to the linker.
801     # It appears as though 1/2 is a usable value.
802     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
803     ;;
804   esac
805 ])
806 if test -n $lt_cv_sys_max_cmd_len ; then
807   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
808 else
809   AC_MSG_RESULT(none)
810 fi
811 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
812
813
814 # _LT_AC_CHECK_DLFCN
815 # ------------------
816 AC_DEFUN([_LT_AC_CHECK_DLFCN],
817 [AC_CHECK_HEADERS(dlfcn.h)dnl
818 ])# _LT_AC_CHECK_DLFCN
819
820
821 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
822 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
823 # ---------------------------------------------------------------------
824 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
825 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
826 if test "$cross_compiling" = yes; then :
827   [$4]
828 else
829   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
830   lt_status=$lt_dlunknown
831   cat > conftest.$ac_ext <<EOF
832 [#line __oline__ "configure"
833 #include "confdefs.h"
834
835 #if HAVE_DLFCN_H
836 #include <dlfcn.h>
837 #endif
838
839 #include <stdio.h>
840
841 #ifdef RTLD_GLOBAL
842 #  define LT_DLGLOBAL           RTLD_GLOBAL
843 #else
844 #  ifdef DL_GLOBAL
845 #    define LT_DLGLOBAL         DL_GLOBAL
846 #  else
847 #    define LT_DLGLOBAL         0
848 #  endif
849 #endif
850
851 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
852    find out it does not work in some platform. */
853 #ifndef LT_DLLAZY_OR_NOW
854 #  ifdef RTLD_LAZY
855 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
856 #  else
857 #    ifdef DL_LAZY
858 #      define LT_DLLAZY_OR_NOW          DL_LAZY
859 #    else
860 #      ifdef RTLD_NOW
861 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
862 #      else
863 #        ifdef DL_NOW
864 #          define LT_DLLAZY_OR_NOW      DL_NOW
865 #        else
866 #          define LT_DLLAZY_OR_NOW      0
867 #        endif
868 #      endif
869 #    endif
870 #  endif
871 #endif
872
873 #ifdef __cplusplus
874 extern "C" void exit (int);
875 #endif
876
877 void fnord() { int i=42;}
878 int main ()
879 {
880   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
881   int status = $lt_dlunknown;
882
883   if (self)
884     {
885       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
886       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
887       /* dlclose (self); */
888     }
889   else
890     puts (dlerror ());
891
892     exit (status);
893 }]
894 EOF
895   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
896     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
897     lt_status=$?
898     case x$lt_status in
899       x$lt_dlno_uscore) $1 ;;
900       x$lt_dlneed_uscore) $2 ;;
901       x$lt_dlunknown|x*) $3 ;;
902     esac
903   else :
904     # compilation failed
905     $3
906   fi
907 fi
908 rm -fr conftest*
909 ])# _LT_AC_TRY_DLOPEN_SELF
910
911
912 # AC_LIBTOOL_DLOPEN_SELF
913 # ----------------------
914 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
915 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
916 if test "x$enable_dlopen" != xyes; then
917   enable_dlopen=unknown
918   enable_dlopen_self=unknown
919   enable_dlopen_self_static=unknown
920 else
921   lt_cv_dlopen=no
922   lt_cv_dlopen_libs=
923
924   case $host_os in
925   beos*)
926     lt_cv_dlopen="load_add_on"
927     lt_cv_dlopen_libs=
928     lt_cv_dlopen_self=yes
929     ;;
930
931   mingw* | pw32*)
932     lt_cv_dlopen="LoadLibrary"
933     lt_cv_dlopen_libs=
934    ;;
935
936   cygwin*)
937     lt_cv_dlopen="dlopen"
938     lt_cv_dlopen_libs=
939    ;;
940
941   darwin*)
942   # if libdl is installed we need to link against it
943     AC_CHECK_LIB([dl], [dlopen],
944                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
945     lt_cv_dlopen="dyld"
946     lt_cv_dlopen_libs=
947     lt_cv_dlopen_self=yes
948     ])
949    ;;
950
951   *)
952     AC_CHECK_FUNC([shl_load],
953           [lt_cv_dlopen="shl_load"],
954       [AC_CHECK_LIB([dld], [shl_load],
955             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
956         [AC_CHECK_FUNC([dlopen],
957               [lt_cv_dlopen="dlopen"],
958           [AC_CHECK_LIB([dl], [dlopen],
959                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
960             [AC_CHECK_LIB([svld], [dlopen],
961                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
962               [AC_CHECK_LIB([dld], [dld_link],
963                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
964               ])
965             ])
966           ])
967         ])
968       ])
969     ;;
970   esac
971
972   if test "x$lt_cv_dlopen" != xno; then
973     enable_dlopen=yes
974   else
975     enable_dlopen=no
976   fi
977
978   case $lt_cv_dlopen in
979   dlopen)
980     save_CPPFLAGS="$CPPFLAGS"
981     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
982
983     save_LDFLAGS="$LDFLAGS"
984     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
985
986     save_LIBS="$LIBS"
987     LIBS="$lt_cv_dlopen_libs $LIBS"
988
989     AC_CACHE_CHECK([whether a program can dlopen itself],
990           lt_cv_dlopen_self, [dnl
991           _LT_AC_TRY_DLOPEN_SELF(
992             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
993             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
994     ])
995
996     if test "x$lt_cv_dlopen_self" = xyes; then
997       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
998       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
999           lt_cv_dlopen_self_static, [dnl
1000           _LT_AC_TRY_DLOPEN_SELF(
1001             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1002             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1003       ])
1004     fi
1005
1006     CPPFLAGS="$save_CPPFLAGS"
1007     LDFLAGS="$save_LDFLAGS"
1008     LIBS="$save_LIBS"
1009     ;;
1010   esac
1011
1012   case $lt_cv_dlopen_self in
1013   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1014   *) enable_dlopen_self=unknown ;;
1015   esac
1016
1017   case $lt_cv_dlopen_self_static in
1018   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1019   *) enable_dlopen_self_static=unknown ;;
1020   esac
1021 fi
1022 ])# AC_LIBTOOL_DLOPEN_SELF
1023
1024
1025 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1026 # ---------------------------------
1027 # Check to see if options -c and -o are simultaneously supported by compiler
1028 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1029 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1030 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1031   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1032   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1033    $rm -r conftest 2>/dev/null
1034    mkdir conftest
1035    cd conftest
1036    mkdir out
1037    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1038
1039    lt_compiler_flag="-o out/conftest2.$ac_objext"
1040    # Insert the option either (1) after the last *FLAGS variable, or
1041    # (2) before a word containing "conftest.", or (3) at the end.
1042    # Note that $ac_compile itself does not contain backslashes and begins
1043    # with a dollar sign (not a hyphen), so the echo should work correctly.
1044    lt_compile=`echo "$ac_compile" | $SED \
1045    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1046    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1047    -e 's:$: $lt_compiler_flag:'`
1048    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1049    (eval "$lt_compile" 2>out/conftest.err)
1050    ac_status=$?
1051    cat out/conftest.err >&AS_MESSAGE_LOG_FD
1052    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1053    if (exit $ac_status) && test -s out/conftest2.$ac_objext
1054    then
1055      # The compiler can only warn and ignore the option if not recognized
1056      # So say no if there are warnings
1057      $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1058      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1059      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1060        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1061      fi
1062    fi
1063    chmod u+w . 2>&AS_MESSAGE_LOG_FD
1064    $rm conftest*
1065    # SGI C++ compiler will create directory out/ii_files/ for
1066    # template instantiation
1067    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1068    $rm out/* && rmdir out
1069    cd ..
1070    rmdir conftest
1071    $rm conftest*
1072 ])
1073 ])# AC_LIBTOOL_PROG_CC_C_O
1074
1075
1076 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1077 # -----------------------------------------
1078 # Check to see if we can do hard links to lock some files if needed
1079 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1080 [AC_REQUIRE([_LT_AC_LOCK])dnl
1081
1082 hard_links="nottested"
1083 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1084   # do not overwrite the value of need_locks provided by the user
1085   AC_MSG_CHECKING([if we can lock with hard links])
1086   hard_links=yes
1087   $rm conftest*
1088   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1089   touch conftest.a
1090   ln conftest.a conftest.b 2>&5 || hard_links=no
1091   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1092   AC_MSG_RESULT([$hard_links])
1093   if test "$hard_links" = no; then
1094     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1095     need_locks=warn
1096   fi
1097 else
1098   need_locks=no
1099 fi
1100 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1101
1102
1103 # AC_LIBTOOL_OBJDIR
1104 # -----------------
1105 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1106 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1107 [rm -f .libs 2>/dev/null
1108 mkdir .libs 2>/dev/null
1109 if test -d .libs; then
1110   lt_cv_objdir=.libs
1111 else
1112   # MS-DOS does not allow filenames that begin with a dot.
1113   lt_cv_objdir=_libs
1114 fi
1115 rmdir .libs 2>/dev/null])
1116 objdir=$lt_cv_objdir
1117 ])# AC_LIBTOOL_OBJDIR
1118
1119
1120 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1121 # ----------------------------------------------
1122 # Check hardcoding attributes.
1123 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1124 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1125 _LT_AC_TAGVAR(hardcode_action, $1)=
1126 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1127    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1128    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1129
1130   # We can hardcode non-existant directories.
1131   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1132      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1133      # have to relink, otherwise we might link with an installed library
1134      # when we should be linking with a yet-to-be-installed one
1135      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1136      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1137     # Linking always hardcodes the temporary library directory.
1138     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1139   else
1140     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1141     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1142   fi
1143 else
1144   # We cannot hardcode anything, or else we can only hardcode existing
1145   # directories.
1146   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1147 fi
1148 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1149
1150 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1151   # Fast installation is not supported
1152   enable_fast_install=no
1153 elif test "$shlibpath_overrides_runpath" = yes ||
1154      test "$enable_shared" = no; then
1155   # Fast installation is not necessary
1156   enable_fast_install=needless
1157 fi
1158 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1159
1160
1161 # AC_LIBTOOL_SYS_LIB_STRIP
1162 # ------------------------
1163 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1164 [striplib=
1165 old_striplib=
1166 AC_MSG_CHECKING([whether stripping libraries is possible])
1167 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1168   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1169   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1170   AC_MSG_RESULT([yes])
1171 else
1172 # FIXME - insert some real tests, host_os isn't really good enough
1173   case $host_os in
1174    darwin*)
1175        if test -n "$STRIP" ; then
1176          striplib="$STRIP -x"
1177          AC_MSG_RESULT([yes])
1178        else
1179   AC_MSG_RESULT([no])
1180 fi
1181        ;;
1182    *)
1183   AC_MSG_RESULT([no])
1184     ;;
1185   esac
1186 fi
1187 ])# AC_LIBTOOL_SYS_LIB_STRIP
1188
1189
1190 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1191 # -----------------------------
1192 # PORTME Fill in your ld.so characteristics
1193 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1194 [AC_MSG_CHECKING([dynamic linker characteristics])
1195 library_names_spec=
1196 libname_spec='lib$name'
1197 soname_spec=
1198 shrext_cmds=".so"
1199 postinstall_cmds=
1200 postuninstall_cmds=
1201 finish_cmds=
1202 finish_eval=
1203 shlibpath_var=
1204 shlibpath_overrides_runpath=unknown
1205 version_type=none
1206 dynamic_linker="$host_os ld.so"
1207 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1208 if test "$GCC" = yes; then
1209   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1210   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1211     # if the path contains ";" then we assume it to be the separator
1212     # otherwise default to the standard path separator (i.e. ":") - it is
1213     # assumed that no part of a normal pathname contains ";" but that should
1214     # okay in the real world where ";" in dirpaths is itself problematic.
1215     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1216   else
1217     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1218   fi
1219 else
1220   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1221 fi
1222 need_lib_prefix=unknown
1223 hardcode_into_libs=no
1224
1225 # when you set need_version to no, make sure it does not cause -set_version
1226 # flags to be left without arguments
1227 need_version=unknown
1228
1229 case $host_os in
1230 aix3*)
1231   version_type=linux
1232   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1233   shlibpath_var=LIBPATH
1234
1235   # AIX 3 has no versioning support, so we append a major version to the name.
1236   soname_spec='${libname}${release}${shared_ext}$major'
1237   ;;
1238
1239 aix4* | aix5*)
1240   version_type=linux
1241   need_lib_prefix=no
1242   need_version=no
1243   hardcode_into_libs=yes
1244   if test "$host_cpu" = ia64; then
1245     # AIX 5 supports IA64
1246     library_names_spec='${libnam