fix php compilation when mysql is enabled
[tomato.git] / release / src / router / php / ext / mysqlnd / aclocal.m4
blob299c27a6ff519d2b0482b914767220dc8c801165
1 dnl
2 dnl $Id$
3 dnl
4 dnl This file contains local autoconf functions.
5 dnl
7 dnl -------------------------------------------------------------------------
8 dnl Output stylize macros for configure (help/runtime)
9 dnl -------------------------------------------------------------------------
11 dnl
12 dnl PHP_HELP_SEPARATOR(title)
13 dnl
14 dnl Adds separator title into the configure --help display.
15 dnl 
16 AC_DEFUN([PHP_HELP_SEPARATOR],[
17 AC_ARG_ENABLE([],[
19 ],[])
22 dnl
23 dnl PHP_CONFIGURE_PART(title)
24 dnl
25 dnl Adds separator title configure output (idea borrowed from mm)
26 dnl
27 AC_DEFUN([PHP_CONFIGURE_PART],[
28   AC_MSG_RESULT()
29   AC_MSG_RESULT([${T_MD}$1${T_ME}])
32 dnl -------------------------------------------------------------------------
33 dnl Build system helper macros
34 dnl -------------------------------------------------------------------------
36 dnl
37 dnl PHP_DEF_HAVE(what)
38 dnl
39 dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
40 dnl
41 AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
43 dnl
44 dnl PHP_RUN_ONCE(namespace, variable, code)
45 dnl
46 dnl execute code, if variable is not set in namespace
47 dnl
48 AC_DEFUN([PHP_RUN_ONCE],[
49   changequote({,})
50   unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'`
51   changequote([,])
52   cmd="echo $ac_n \"\$$1$unique$ac_c\""
53   if test -n "$unique" && test "`eval $cmd`" = "" ; then
54     eval "$1$unique=set"
55     $3
56   fi
59 dnl
60 dnl PHP_EXPAND_PATH(path, variable)
61 dnl
62 dnl expands path to an absolute path and assigns it to variable
63 dnl
64 AC_DEFUN([PHP_EXPAND_PATH],[
65   if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
66     $2=$1
67   else
68     changequote({,})
69     ep_dir=`echo $1|$SED 's%/*[^/][^/]*/*$%%'`
70     changequote([,])
71     ep_realdir=`(cd "$ep_dir" && pwd)`
72     $2="$ep_realdir"/`basename "$1"`
73   fi
76 dnl
77 dnl PHP_DEFINE(WHAT [, value[, directory]])
78 dnl
79 dnl Creates builddir/include/what.h and in there #define WHAT value
80 dnl
81 AC_DEFUN([PHP_DEFINE],[
82   [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
85 dnl
86 dnl PHP_SUBST(varname)
87 dnl
88 dnl Adds variable with it's value into Makefile, e.g.:
89 dnl CC = gcc
90 dnl
91 AC_DEFUN([PHP_SUBST],[
92   PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
95 dnl
96 dnl PHP_SUBST_OLD(varname)
97 dnl
98 dnl Same as PHP_SUBST() but also substitutes all @VARNAME@
99 dnl instances in every file passed to AC_OUTPUT()
101 AC_DEFUN([PHP_SUBST_OLD],[
102   PHP_SUBST($1)
103   AC_SUBST($1)
107 dnl PHP_OUTPUT(file)
109 dnl Adds "file" to the list of files generated by AC_OUTPUT
110 dnl This macro can be used several times.
112 AC_DEFUN([PHP_OUTPUT],[
113   PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
117 dnl -------------------------------------------------------------------------
118 dnl Build system base macros
119 dnl -------------------------------------------------------------------------
122 dnl PHP_CANONICAL_HOST_TARGET
124 AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
125   AC_REQUIRE([AC_CANONICAL_HOST])dnl
126   AC_REQUIRE([AC_CANONICAL_TARGET])dnl
127   dnl Make sure we do not continue if host_alias is empty.
128   if test -z "$host_alias" && test -n "$host"; then
129     host_alias=$host
130   fi
131   if test -z "$host_alias"; then
132     AC_MSG_ERROR([host_alias is not set!])
133   fi
137 dnl PHP_INIT_BUILD_SYSTEM
139 AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
140 AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
141 test -d include || $php_shtool mkdir include
142 > Makefile.objects
143 > Makefile.fragments
144 dnl We need to play tricks here to avoid matching the grep line itself
145 pattern=define
146 $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
150 dnl PHP_GEN_GLOBAL_MAKEFILE
151 dnl 
152 dnl Generates the global makefile.
154 AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
155   cat >Makefile <<EOF
156 srcdir = $abs_srcdir
157 builddir = $abs_builddir
158 top_srcdir = $abs_srcdir
159 top_builddir = $abs_builddir
161   for i in $PHP_VAR_SUBST; do
162     eval echo "$i = \$$i" >> Makefile
163   done
165   cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile
169 dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile [, ext_srcdir [, ext_builddir]]])
171 dnl Processes a file called Makefile.frag in the source directory
172 dnl of the most recently added extension. $(srcdir) and $(builddir)
173 dnl are substituted with the proper paths. Can be used to supply
174 dnl custom rules and/or additional targets.
176 AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[
177   ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1)
178   ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2)
179   ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3)
180   test -f "$src" && $SED -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src  >> Makefile.fragments
184 dnl PHP_ADD_SOURCES(source-path, sources [, special-flags [, type]])
186 dnl Adds sources which are located relative to source-path to the 
187 dnl array of type type.  Sources are processed with optional 
188 dnl special-flags which are passed to the compiler.  Sources
189 dnl can be either written in C or C++ (filenames shall end in .c 
190 dnl or .cpp, respectively).
192 dnl Note: If source-path begins with a "/", the "/" is removed and
193 dnl the path is interpreted relative to the top build-directory.
195 dnl which array to append to?
196 AC_DEFUN([PHP_ADD_SOURCES],[
197   PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))
201 dnl _PHP_ASSIGN_BUILD_VARS(type)
202 dnl internal, don't use
203 AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[
204 ifelse($1,shared,[
205   b_c_pre=$shared_c_pre
206   b_cxx_pre=$shared_cxx_pre
207   b_c_meta=$shared_c_meta
208   b_cxx_meta=$shared_cxx_meta
209   b_c_post=$shared_c_post
210   b_cxx_post=$shared_cxx_post
212   b_c_pre=$php_c_pre
213   b_cxx_pre=$php_cxx_pre
214   b_c_meta=$php_c_meta
215   b_cxx_meta=$php_cxx_meta
216   b_c_post=$php_c_post
217   b_cxx_post=$php_cxx_post
218 ])dnl
219   b_lo=[$]$1_lo
223 dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]])
225 dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the
226 dnl name of the array target-var directly, as well as whether
227 dnl shared objects will be built from the sources.
229 dnl Should not be used directly.
230 dnl 
231 AC_DEFUN([PHP_ADD_SOURCES_X],[
232 dnl relative to source- or build-directory?
233 dnl ac_srcdir/ac_bdir include trailing slash
234   case $1 in
235   ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;;
236   /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;;
237   *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;;
238   esac
239   
240 dnl how to build .. shared or static?
241   ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php))
243 dnl iterate over the sources
244   old_IFS=[$]IFS
245   for ac_src in $2; do
246   
247 dnl remove the suffix
248       IFS=.
249       set $ac_src
250       ac_obj=[$]1
251       IFS=$old_IFS
252       
253 dnl append to the array which has been dynamically chosen at m4 time
254       $4="[$]$4 [$]ac_bdir[$]ac_obj.lo"
256 dnl choose the right compiler/flags/etc. for the source-file
257       case $ac_src in
258         *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
259         *.s[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
260         *.S[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;;
261         *.cpp|*.cc|*.cxx[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;;
262       esac
264 dnl create a rule for the object/source combo
265     cat >>Makefile.objects<<EOF
266 $ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src
267         $ac_comp
269   done
272 dnl -------------------------------------------------------------------------
273 dnl Compiler characteristics checks
274 dnl -------------------------------------------------------------------------
277 dnl PHP_TARGET_RDYNAMIC
279 dnl Checks whether -rdynamic is supported by the compiler.  This
280 dnl is necessary for some targets to populate the global symbol
281 dnl table.  Otherwise, dynamic modules would not be able to resolve
282 dnl PHP-related symbols.
284 dnl If successful, adds -rdynamic to PHP_LDFLAGS.
286 AC_DEFUN([PHP_TARGET_RDYNAMIC],[
287   if test -n "$GCC"; then
288     dnl we should use a PHP-specific macro here
289     PHP_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes)
290     if test "$gcc_rdynamic" = "yes"; then
291       PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic"
292     fi
293   fi
297 dnl PHP_RUNPATH_SWITCH
299 dnl Checks for -R, etc. switch
301 AC_DEFUN([PHP_RUNPATH_SWITCH],[
302 AC_MSG_CHECKING([if compiler supports -R])
303 AC_CACHE_VAL(php_cv_cc_dashr,[
304   SAVE_LIBS=$LIBS
305   LIBS="-R /usr/$PHP_LIBDIR $LIBS"
306   AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
307   LIBS=$SAVE_LIBS])
308 AC_MSG_RESULT([$php_cv_cc_dashr])
309 if test $php_cv_cc_dashr = "yes"; then
310   ld_runpath_switch=-R
311 else
312   AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
313   AC_CACHE_VAL(php_cv_cc_rpath,[
314     SAVE_LIBS=$LIBS
315     LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
316     AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
317     LIBS=$SAVE_LIBS])
318   AC_MSG_RESULT([$php_cv_cc_rpath])
319   if test $php_cv_cc_rpath = "yes"; then
320     ld_runpath_switch=-Wl,-rpath,
321   else
322     dnl something innocuous
323     ld_runpath_switch=-L
324   fi
326 if test "$PHP_RPATH" = "no"; then
327   ld_runpath_switch=
332 dnl PHP_CHECK_GCC_ARG(arg, action-if-found, action-if-not-found)
334 AC_DEFUN([PHP_CHECK_GCC_ARG],[
335   gcc_arg_name=[ac_cv_gcc_arg]translit($1,A-Z-,a-z_)
336   AC_CACHE_CHECK([whether $CC supports $1], [ac_cv_gcc_arg]translit($1,A-Z-,a-z_), [
337   echo 'void somefunc() { };' > conftest.c
338   cmd='$CC $1 -c conftest.c'
339   if eval $cmd 2>&1 | $EGREP -e $1 >/dev/null ; then
340     ac_result=no
341   else
342     ac_result=yes
343   fi
344   eval $gcc_arg_name=$ac_result
345   rm -f conftest.*
346   ])
347   if eval test "\$$gcc_arg_name" = "yes"; then
348     $2
349   else
350     :
351     $3
352   fi
356 dnl PHP_LIBGCC_LIBPATH(gcc)
358 dnl Stores the location of libgcc in libgcc_libpath
360 AC_DEFUN([PHP_LIBGCC_LIBPATH],[
361   changequote({,})
362   libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`
363   changequote([,])
366 dnl -------------------------------------------------------------------------
367 dnl Macros to modify LIBS, INCLUDES, etc. variables 
368 dnl -------------------------------------------------------------------------
371 dnl PHP_REMOVE_USR_LIB(NAME)
373 dnl Removes all -L/usr/$PHP_LIBDIR entries from variable NAME
375 AC_DEFUN([PHP_REMOVE_USR_LIB],[
376   unset ac_new_flags
377   for i in [$]$1; do
378     case [$]i in
379     -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;
380     *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
381     esac
382   done
383   $1=[$]ac_new_flags
387 dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
389 dnl Use this macro, if you need to add libraries and or library search
390 dnl paths to the PHP build system which are only given in compiler
391 dnl notation.
393 AC_DEFUN([PHP_EVAL_LIBLINE],[
394   for ac_i in $1; do
395     case $ac_i in
396     -pthread[)]
397       if test "$ext_shared" = "yes"; then
398         $2="[$]$2 -pthread"
399       else
400         PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
401       fi
402     ;;
403     -l*[)]
404       ac_ii=`echo $ac_i|cut -c 3-`
405       PHP_ADD_LIBRARY($ac_ii,1,$2)
406     ;;
407     -L*[)]
408       ac_ii=`echo $ac_i|cut -c 3-`
409       PHP_ADD_LIBPATH($ac_ii,$2)
410     ;;
411     esac
412   done
416 dnl PHP_EVAL_INCLINE(headerline)
418 dnl Use this macro, if you need to add header search paths to the PHP
419 dnl build system which are only given in compiler notation.
421 AC_DEFUN([PHP_EVAL_INCLINE],[
422   for ac_i in $1; do
423     case $ac_i in
424     -I*[)]
425       ac_ii=`echo $ac_i|cut -c 3-`
426       PHP_ADD_INCLUDE($ac_ii)
427     ;;
428     esac
429   done
432 dnl internal, don't use
433 AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
434   PHP_RUN_ONCE(LIBPATH, $1, [
435     test "x$PHP_RPATH" != "xno" &&
436     test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
437     LDFLAGS="$LDFLAGS -L$1"
438     PHP_RPATHS="$PHP_RPATHS $1"
439   ])
440 ])dnl
443 dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
445 dnl Adds a path to linkpath/runpath (LDFLAGS)
447 AC_DEFUN([PHP_ADD_LIBPATH],[
448   if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib"; then
449     PHP_EXPAND_PATH($1, ai_p)
450     ifelse([$2],,[
451       _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
452     ],[
453       if test "$ext_shared" = "yes"; then
454         $2="-L$ai_p [$]$2"
455         test "x$PHP_RPATH" != "xno" && \
456         test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2"
457       else
458         _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
459       fi
460     ])
461   fi
465 dnl PHP_UTILIZE_RPATHS()
467 dnl builds RPATHS/LDFLAGS from PHP_RPATHS
469 AC_DEFUN([PHP_UTILIZE_RPATHS],[
470   OLD_RPATHS=$PHP_RPATHS
471   unset PHP_RPATHS
473   for i in $OLD_RPATHS; do
474 dnl Can be passed to native cc/libtool
475     PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
476 dnl Libtool-specific
477     PHP_RPATHS="$PHP_RPATHS -R $i"
478 dnl cc-specific
479     NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
480   done
482   if test "$PHP_RPATH" = "no"; then
483     unset PHP_RPATHS
484     unset NATIVE_RPATHS
485   fi
489 dnl PHP_ADD_INCLUDE(path [,before])
491 dnl add an include path. 
492 dnl if before is 1, add in the beginning of INCLUDES.
494 AC_DEFUN([PHP_ADD_INCLUDE],[
495   if test "$1" != "/usr/include"; then
496     PHP_EXPAND_PATH($1, ai_p)
497     PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
498       if test "$2"; then
499         INCLUDES="-I$ai_p $INCLUDES"
500       else
501         INCLUDES="$INCLUDES -I$ai_p"
502       fi
503     ])
504   fi
507 dnl internal, don't use
508 AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
509   ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
510 ])dnl
512 dnl internal, don't use
513 AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
514   case $1 in
515   c|c_r|pthread*[)] ;;
516   *[)] ifelse($3,,[
517     _PHP_X_ADD_LIBRARY($1,$2,$5)
518   ],[
519     if test "$ext_shared" = "yes"; then
520       _PHP_X_ADD_LIBRARY($1,$2,$3)
521     else
522       $4($1,$2)
523     fi
524   ]) ;;
525   esac
526 ])dnl
529 dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
531 dnl add a library to the link line
533 AC_DEFUN([PHP_ADD_LIBRARY],[
534   _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
538 dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
540 dnl add a library to the link line (deferred, not used during configure)
542 AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
543   _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
547 dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
549 dnl add a library to the link line and path to linkpath/runpath.
550 dnl if shared-libadd is not empty and $ext_shared is yes,
551 dnl shared-libadd will be assigned the library information
553 AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
554 ifelse($3,,[
555   if test -n "$2"; then
556     PHP_ADD_LIBPATH($2)
557   fi
558   PHP_ADD_LIBRARY($1)
560   if test "$ext_shared" = "yes"; then
561     $3="-l$1 [$]$3"
562     if test -n "$2"; then
563       PHP_ADD_LIBPATH($2,$3)
564     fi
565   else
566     PHP_ADD_LIBRARY_WITH_PATH($1,$2)
567   fi
572 dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
574 dnl add a library to the link line (deferred)
575 dnl and path to linkpath/runpath (not deferred)
576 dnl if shared-libadd is not empty and $ext_shared is yes,
577 dnl shared-libadd will be assigned the library information
579 AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
580 ifelse($3,,[
581   if test -n "$2"; then
582     PHP_ADD_LIBPATH($2)
583   fi
584   PHP_ADD_LIBRARY_DEFER($1)
586   if test "$ext_shared" = "yes"; then
587     $3="-l$1 [$]$3"
588     if test -n "$2"; then
589       PHP_ADD_LIBPATH($2,$3)
590     fi
591   else
592     PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
593   fi
598 dnl PHP_ADD_FRAMEWORK(framework [,before])
600 dnl add a (Darwin / Mac OS X) framework to the link
601 dnl line. if before is 1, the framework is added
602 dnl to the beginning of the line.
604 AC_DEFUN([PHP_ADD_FRAMEWORK], [
605   PHP_RUN_ONCE(FRAMEWORKS, $1, [
606     if test "$2"; then
607       PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS"
608     else
609       PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1"
610     fi
611   ])
615 dnl PHP_ADD_FRAMEWORKPATH(path [,before])
617 dnl add a (Darwin / Mac OS X) framework path to the link
618 dnl and include lines. default paths include (but are
619 dnl not limited to) /Local/Library/Frameworks and
620 dnl /System/Library/Frameworks, so these don't need
621 dnl to be specifically added. if before is 1, the
622 dnl framework path is added to the beginning of the
623 dnl relevant lines.
625 AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
626   PHP_EXPAND_PATH($1, ai_p)
627   PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [
628     if test "$2"; then
629       PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"
630     else
631       PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"
632     fi
633   ])
637 dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
639 dnl Adds a (Darwin / Mac OS X) framework path and the
640 dnl framework itself to the link and include lines.
642 AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
643   PHP_ADD_FRAMEWORKPATH($2)
644   PHP_ADD_FRAMEWORK($1)
648 dnl PHP_SET_LIBTOOL_VARIABLE(var)
650 dnl Set libtool variable
652 AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
653   if test -z "$LIBTOOL"; then
654     LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
655   else
656     LIBTOOL="$LIBTOOL $1"
657   fi
660 dnl -------------------------------------------------------------------------
661 dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
662 dnl -------------------------------------------------------------------------
664 dnl PHP_ARG_ANALYZE_EX
665 dnl internal
666 AC_DEFUN([PHP_ARG_ANALYZE_EX],[
667 ext_output="yes, shared"
668 ext_shared=yes
669 case [$]$1 in
670 shared,*[)]
671   $1=`echo "[$]$1"|$SED 's/^shared,//'`
672   ;;
673 shared[)]
674   $1=yes
675   ;;
676 no[)]
677   ext_output=no
678   ext_shared=no
679   ;;
680 *[)]
681   ext_output=yes
682   ext_shared=no
683   ;;
684 esac
686 PHP_ALWAYS_SHARED([$1])
689 dnl PHP_ARG_ANALYZE
690 dnl internal
691 AC_DEFUN([PHP_ARG_ANALYZE],[
692 ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)])
693 ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
697 dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
698 dnl Sets PHP_ARG_NAME either to the user value or to the default value.
699 dnl default-val defaults to no.  This will also set the variable ext_shared,
700 dnl and will overwrite any previous variable of that name.
701 dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
702 dnl the PHP_ARG_ANALYZE_EX.
704 AC_DEFUN([PHP_ARG_WITH],[
705 php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
706 PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
709 dnl PHP_REAL_ARG_WITH
710 dnl internal
711 AC_DEFUN([PHP_REAL_ARG_WITH],[
712 ifelse([$2],,,[AC_MSG_CHECKING([$2])])
713 AC_ARG_WITH($1,[$3],$5=[$]withval,
715   $5=ifelse($4,,no,$4)
716   ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
718 PHP_ARG_ANALYZE($5,[$2],$6)
722 dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
723 dnl Sets PHP_ARG_NAME either to the user value or to the default value.
724 dnl default-val defaults to no.  This will also set the variable ext_shared,
725 dnl and will overwrite any previous variable of that name.
726 dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
727 dnl the PHP_ARG_ANALYZE_EX.
729 AC_DEFUN([PHP_ARG_ENABLE],[
730 php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
731 PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
734 dnl PHP_REAL_ARG_ENABLE
735 dnl internal
736 AC_DEFUN([PHP_REAL_ARG_ENABLE],[
737 ifelse([$2],,,[AC_MSG_CHECKING([$2])])
738 AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
740   $5=ifelse($4,,no,$4)
741   ifelse($6,yes,[test "$PHP_ENABLE_ALL" && $5=$PHP_ENABLE_ALL])
743 PHP_ARG_ANALYZE($5,[$2],$6)
746 dnl -------------------------------------------------------------------------
747 dnl Build macros
748 dnl -------------------------------------------------------------------------
751 dnl PHP_BUILD_THREAD_SAFE
753 AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
754   enable_maintainer_zts=yes
755   if test "$pthreads_working" != "yes"; then
756     AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
757   fi
761 dnl PHP_REQUIRE_CXX
763 AC_DEFUN([PHP_REQUIRE_CXX],[
764   if test -z "$php_cxx_done"; then
765     AC_PROG_CXX
766     AC_PROG_CXXCPP
767     PHP_ADD_LIBRARY(stdc++)
768     php_cxx_done=yes
769   fi
773 dnl PHP_BUILD_SHARED
775 AC_DEFUN([PHP_BUILD_SHARED],[
776   PHP_BUILD_PROGRAM
777   OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
778   php_sapi_module=shared
779   
780   php_c_pre=$shared_c_pre
781   php_c_meta=$shared_c_meta
782   php_c_post=$shared_c_post
783   php_cxx_pre=$shared_cxx_pre
784   php_cxx_meta=$shared_cxx_meta
785   php_cxx_post=$shared_cxx_post
786   php_lo=$shared_lo
790 dnl PHP_BUILD_STATIC
792 AC_DEFUN([PHP_BUILD_STATIC],[
793   PHP_BUILD_PROGRAM
794   OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
795   php_sapi_module=static
799 dnl PHP_BUILD_BUNDLE
801 AC_DEFUN([PHP_BUILD_BUNDLE],[
802   PHP_BUILD_PROGRAM
803   OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle]
804   php_sapi_module=static
808 dnl PHP_BUILD_PROGRAM
810 AC_DEFUN([PHP_BUILD_PROGRAM],[
811   php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
812   php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
813   php_c_post=
814   php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
815   php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
816   php_cxx_post=
817   php_lo=lo
819   case $with_pic in
820     yes) pic_setting='-prefer-pic';;
821     no)  pic_setting='-prefer-non-pic';;
822   esac
824   shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
825   shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
826   shared_c_post=
827   shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
828   shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
829   shared_cxx_post=
830   shared_lo=lo
834 dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx, zend_ext)
836 dnl Basically sets up the link-stage for building module-name
837 dnl from object_var in build-dir.
839 AC_DEFUN([PHP_SHARED_MODULE],[
840   install_modules="install-modules"
842   case $host_alias in
843     *aix*[)]
844       suffix=so
845       link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -Wl,-G -o '$3'/$1.la -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD) && mv -f '$3'/.libs/$1.so '$3'/$1.so'
846       ;;
847     *netware*[)]
848       suffix=nlm
849       link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -shared -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) ifelse($1, php5lib, , -L$(top_builddir)/netware -lphp5lib) $(translit(ifelse($1, php5lib, $1, m4_substr($1, 3)),a-z_-,A-Z__)_SHARED_LIBADD)'
850       ;;
851     *[)]
852       suffix=la
853       link_cmd='$(LIBTOOL) --mode=link ifelse($4,,[$(CC)],[$(CXX)]) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o [$]@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $($2) $(translit($1,a-z_-,A-Z__)_SHARED_LIBADD)'
854       ;;
855   esac
857   if test "x$5" = "xyes"; then
858     PHP_ZEND_EX="$PHP_ZEND_EX \$(phplibdir)/$1.$suffix"
859   else
860     PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
861   fi
862   PHP_SUBST($2)
863   cat >>Makefile.objects<<EOF
864 \$(phplibdir)/$1.$suffix: $3/$1.$suffix
865         \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
867 $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
868         $link_cmd
874 dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
876 dnl Selects the SAPI name and type (static, shared, bundle, program)
877 dnl and optionally also the source-files for the SAPI-specific
878 dnl objects.
880 AC_DEFUN([PHP_SELECT_SAPI],[
881   if test "$2" = "program"; then
882     PHP_BINARIES="$PHP_BINARIES $1"
883   elif test "$PHP_SAPI" != "none"; then
884     AC_MSG_ERROR([
885 +--------------------------------------------------------------------+
886 |                        *** ATTENTION ***                           |
887 |                                                                    |
888 | You've configured multiple SAPIs to be build. You can build only   |
889 | one SAPI module plus CGI, CLI and FPM binaries at the same time.   |
890 +--------------------------------------------------------------------+
892   else
893     PHP_SAPI=$1
894   fi  
896   PHP_ADD_BUILD_DIR([sapi/$1])
898   PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS $1"
900   ifelse($2,program,[
901     PHP_BUILD_PROGRAM
902     install_binaries="install-binaries"
903     install_binary_targets="$install_binary_targets install-$1"
904     PHP_SUBST(PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)
905     ifelse($3,,,[PHP_ADD_SOURCES_X([sapi/$1],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)])
906   ],[
907     case "$2" in
908     static[)] PHP_BUILD_STATIC;;
909     shared[)] PHP_BUILD_SHARED;;
910     bundle[)] PHP_BUILD_BUNDLE;;
911     esac
912     install_sapi="install-sapi"
913     ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
914   ])
917 dnl deprecated
918 AC_DEFUN([PHP_EXTENSION],[
919   sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
921   PHP_NEW_EXTENSION($1, $sources, $2, $3)
923   if test -r "$ext_srcdir/Makefile.frag"; then
924     PHP_ADD_MAKEFILE_FRAGMENT
925   fi
928 AC_DEFUN([PHP_ADD_BUILD_DIR],[
929   ifelse($2,,[
930     BUILD_DIR="$BUILD_DIR $1"
931   ], [
932     $php_shtool mkdir -p $1
933   ])
936 AC_DEFUN([PHP_GEN_BUILD_DIRS],[
937   $php_shtool mkdir -p $BUILD_DIR
941 dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
943 dnl Includes an extension in the build.
945 dnl "extname" is the name of the ext/ subdir where the extension resides.
946 dnl "sources" is a list of files relative to the subdir which are used
947 dnl to build the extension.
948 dnl "shared" can be set to "shared" or "yes" to build the extension as
949 dnl a dynamically loadable library. Optional parameter "sapi_class" can
950 dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
951 dnl "extra-cflags" are passed to the compiler, with 
952 dnl @ext_srcdir@ and @ext_builddir@ being substituted.
953 dnl "cxx" can be used to indicate that a C++ shared module is desired.
954 dnl "zend_ext" indicates a zend extension.
955 AC_DEFUN([PHP_NEW_EXTENSION],[
956   ext_builddir=[]PHP_EXT_BUILDDIR($1)
957   ext_srcdir=[]PHP_EXT_SRCDIR($1)
959   ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
961   if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
962 dnl ---------------------------------------------- Static module
963     [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
964     PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
965     EXT_STATIC="$EXT_STATIC $1"
966     if test "$3" != "nocli"; then
967       EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
968     fi
969   else
970     if test "$3" = "shared" || test "$3" = "yes"; then
971 dnl ---------------------------------------------- Shared module
972       [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
973       PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
974       case $host_alias in
975         *netware*[)]
976           PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6, $7)
977           ;;
978         *[)]
979           PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6, $7)
980           ;;
981       esac
982       AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
983     fi
984   fi
986   if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
987 dnl ---------------------------------------------- CLI static module
988     [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
989     case "$PHP_SAPI" in
990       cgi|embed[)]
991         PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
992         EXT_STATIC="$EXT_STATIC $1"
993         ;;
994       *[)]
995         PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
996         ;;
997     esac
998     EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
999   fi
1000   PHP_ADD_BUILD_DIR($ext_builddir)
1002 dnl Set for phpize builds only
1003 dnl --------------------------- 
1004   if test "$ext_builddir" = "."; then
1005     PHP_PECL_EXTENSION=$1
1006     PHP_SUBST(PHP_PECL_EXTENSION)
1007   fi
1011 dnl PHP_WITH_SHARED
1013 dnl Checks whether $withval is "shared" or starts with "shared,XXX"
1014 dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
1015 dnl from $withval.
1017 AC_DEFUN([PHP_WITH_SHARED],[
1018   PHP_ARG_ANALYZE_EX(withval)
1019   shared=$ext_shared
1020   unset ext_shared ext_output
1024 dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])
1026 dnl This macro is scanned by genif.sh when it builds the internal functions
1027 dnl list, so that modules can be init'd in the correct order
1028 dnl $1 = name of extension, $2 = extension upon which it depends
1029 dnl $3 = optional: if true, it's ok for $2 to have not been configured
1030 dnl default is false and should halt the build.
1031 dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
1032 dnl The extension on which it depends must also have been configured.
1033 dnl See ADD_EXTENSION_DEP in win32 build 
1035 AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
1036   am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
1037   is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED]
1038   is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__)
1039   if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
1040     AC_MSG_ERROR([
1041 You've configured extension $1 to build statically, but it
1042 depends on extension $2, which you've configured to build shared.
1043 You either need to build $1 shared or build $2 statically for the
1044 build to be successful.
1046   fi
1047   if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
1048     AC_MSG_ERROR([
1049 You've configured extension $1, which depends on extension $2,
1050 but you've either not enabled $2, or have disabled it.
1052   fi
1053   dnl Some systems require that we link $2 to $1 when building
1056 dnl -------------------------------------------------------------------------
1057 dnl Checks for structures, typedefs, broken functions, etc.
1058 dnl -------------------------------------------------------------------------
1060 dnl Internal helper macros
1062 dnl _PHP_DEF_HAVE_FILE(what, filename)
1063 AC_DEFUN([_PHP_DEF_HAVE_FILE], [
1064   php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' `
1065   echo "#define $php_def_have_what 1" >> $2
1068 dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
1070 AC_DEFUN([_PHP_CHECK_SIZEOF], [
1071   php_cache_value=php_cv_sizeof_[]$1
1072   AC_CACHE_VAL(php_cv_sizeof_[]$1, [
1073     old_LIBS=$LIBS
1074     LIBS=
1075     old_LDFLAGS=$LDFLAGS
1076     LDFLAGS=
1077     AC_TRY_RUN([#include <stdio.h>
1078 #if STDC_HEADERS
1079 #include <stdlib.h>
1080 #include <stddef.h>
1081 #endif
1082 #ifdef HAVE_INTTYPES_H
1083 #include <inttypes.h>
1084 #endif
1085 #ifdef HAVE_UNISTD_H
1086 #include <unistd.h>
1087 #endif
1090 int main()
1092         FILE *fp = fopen("conftestval", "w");
1093         if (!fp) return(1);
1094         fprintf(fp, "%d\n", sizeof($1));
1095         return(0);
1097   ], [
1098     eval $php_cache_value=`cat conftestval`
1099   ], [
1100     eval $php_cache_value=0
1101   ], [
1102     ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2])
1104   LDFLAGS=$old_LDFLAGS
1105   LIBS=$old_LIBS
1107   if eval test "\$$php_cache_value" != "0"; then
1108 ifelse([$4],[],:,[$4])
1109 ifelse([$5],[],,[else $5])
1110   fi
1114 dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
1116 AC_DEFUN([PHP_CHECK_SIZEOF], [
1117   AC_MSG_CHECKING([size of $1])
1118   _PHP_CHECK_SIZEOF($1, $2, $3, [
1119     AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
1120     AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
1121   ])
1122   AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
1126 dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers])
1128 AC_DEFUN([PHP_CHECK_TYPES], [
1129   for php_typename in $1; do
1130     AC_MSG_CHECKING([whether $php_typename exists])
1131     _PHP_CHECK_SIZEOF($php_typename, 0, $3, [
1132       _PHP_DEF_HAVE_FILE($php_typename, $2)
1133       AC_MSG_RESULT([yes])
1134     ], [
1135       AC_MSG_RESULT([no])
1136     ])
1137   done
1141 dnl PHP_CHECK_IN_ADDR_T
1143 AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
1144 dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
1145 AC_MSG_CHECKING([for in_addr_t])
1146 AC_CACHE_VAL(ac_cv_type_in_addr_t,
1147 [AC_EGREP_CPP(dnl
1148 changequote(<<,>>)dnl
1149 <<in_addr_t[^a-zA-Z_0-9]>>dnl
1150 changequote([,]), [#include <sys/types.h>
1151 #if STDC_HEADERS
1152 #include <stdlib.h>
1153 #include <stddef.h>
1154 #endif
1155 #ifdef HAVE_NETINET_IN_H
1156 #include <netinet/in.h>
1157 #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl
1158 AC_MSG_RESULT([$ac_cv_type_in_addr_t])
1159 if test $ac_cv_type_in_addr_t = no; then
1160   AC_DEFINE(in_addr_t, u_int, [ ])
1165 dnl PHP_TIME_R_TYPE
1167 dnl Check type of reentrant time-related functions
1168 dnl Type can be: irix, hpux or POSIX
1170 AC_DEFUN([PHP_TIME_R_TYPE],[
1171 AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
1172 AC_TRY_RUN([
1173 #include <time.h>
1175 main() {
1176 char buf[27];
1177 struct tm t;
1178 time_t old = 0;
1179 int r, s;
1181 s = gmtime_r(&old, &t);
1182 r = (int) asctime_r(&t, buf, 26);
1183 if (r == s && s == 0) return (0);
1184 return (1);
1187   ac_cv_time_r_type=hpux
1189   AC_TRY_RUN([
1190 #include <time.h>
1191 main() {
1192   struct tm t, *s;
1193   time_t old = 0;
1194   char buf[27], *p;
1195   
1196   s = gmtime_r(&old, &t);
1197   p = asctime_r(&t, buf, 26);
1198   if (p == buf && s == &t) return (0);
1199   return (1);
1201   ],[
1202     ac_cv_time_r_type=irix
1203   ],[
1204     ac_cv_time_r_type=POSIX
1205   ],[
1206     ac_cv_time_r_type=POSIX
1207   ])
1209   ac_cv_time_r_type=POSIX
1212   case $ac_cv_time_r_type in
1213   hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
1214   irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
1215   esac
1219 dnl PHP_DOES_PWRITE_WORK
1220 dnl internal
1221 AC_DEFUN([PHP_DOES_PWRITE_WORK],[
1222   AC_TRY_RUN([
1223 #include <sys/types.h>
1224 #include <sys/stat.h>
1225 #include <fcntl.h>
1226 #include <unistd.h>
1227 #include <errno.h>
1229     main() {
1230     int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
1232     if (fd < 0) exit(1);
1233     if (pwrite(fd, "text", 4, 0) != 4) exit(1);
1234     /* Linux glibc breakage until 2.2.5 */
1235     if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
1236     exit(0);
1237     }
1239   ],[
1240     ac_cv_pwrite=no
1241   ],[
1242     ac_cv_pwrite=no
1243   ],[
1244     ac_cv_pwrite=no
1245   ])
1248 dnl PHP_DOES_PREAD_WORK
1249 dnl internal
1250 AC_DEFUN([PHP_DOES_PREAD_WORK],[
1251   echo test > conftest_in
1252   AC_TRY_RUN([
1253 #include <sys/types.h>
1254 #include <sys/stat.h>
1255 #include <fcntl.h>
1256 #include <unistd.h>
1257 #include <errno.h>
1259     main() {
1260     char buf[3]; 
1261     int fd = open("conftest_in", O_RDONLY);
1262     if (fd < 0) exit(1);
1263     if (pread(fd, buf, 2, 0) != 2) exit(1);
1264     /* Linux glibc breakage until 2.2.5 */
1265     if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
1266     exit(0);
1267     }
1268   ],[
1269     ac_cv_pread=no
1270   ],[
1271     ac_cv_pread=no
1272   ],[
1273     ac_cv_pread=no
1274   ])
1275   rm -f conftest_in
1279 dnl PHP_PWRITE_TEST
1281 AC_DEFUN([PHP_PWRITE_TEST],[
1282   AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
1283     PHP_DOES_PWRITE_WORK
1284     if test "$ac_cv_pwrite" = "no"; then
1285       PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])
1286       if test "$ac_cv_pwrite" = "yes"; then
1287         ac_cv_pwrite=64
1288       fi
1289     fi
1290   ])
1292   if test "$ac_cv_pwrite" != "no"; then
1293     AC_DEFINE(HAVE_PWRITE, 1, [ ])
1294     if test "$ac_cv_pwrite" = "64"; then
1295       AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
1296     fi
1297   fi  
1301 dnl PHP_PREAD_TEST
1303 AC_DEFUN([PHP_PREAD_TEST],[
1304   AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
1305     PHP_DOES_PREAD_WORK
1306     if test "$ac_cv_pread" = "no"; then
1307       PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])
1308       if test "$ac_cv_pread" = "yes"; then
1309         ac_cv_pread=64
1310       fi
1311     fi
1312   ])
1314   if test "$ac_cv_pread" != "no"; then
1315     AC_DEFINE(HAVE_PREAD, 1, [ ])
1316     if test "$ac_cv_pread" = "64"; then
1317       AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
1318     fi
1319   fi  
1323 dnl PHP_MISSING_TIME_R_DECL
1325 AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
1326   AC_MSG_CHECKING([for missing declarations of reentrant functions])
1327   AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
1328     :
1329   ],[
1330     AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
1331   ])
1332   AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
1333     :
1334   ],[
1335     AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
1336   ])
1337   AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
1338     :
1339   ],[
1340     AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
1341   ])
1342   AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
1343     :
1344   ],[
1345     AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
1346   ])
1347   AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
1348     :
1349   ],[
1350     AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
1351   ])
1352   AC_MSG_RESULT([done])
1356 dnl PHP_READDIR_R_TYPE
1357 dnl 
1358 AC_DEFUN([PHP_READDIR_R_TYPE],[
1359   dnl HAVE_READDIR_R is also defined by libmysql
1360   AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
1361   if test "$ac_cv_func_readdir_r" = "yes"; then
1362   AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
1363     AC_TRY_RUN([
1364 #define _REENTRANT
1365 #include <sys/types.h>
1366 #include <dirent.h>
1368 #ifndef PATH_MAX
1369 #define PATH_MAX 1024
1370 #endif
1372 main() {
1373   DIR *dir;
1374   char entry[sizeof(struct dirent)+PATH_MAX];
1375   struct dirent *pentry = (struct dirent *) &entry;
1377   dir = opendir("/");
1378   if (!dir) 
1379     exit(1);
1380   if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
1381     exit(0);
1382   exit(1);
1384     ],[
1385       ac_cv_what_readdir_r=POSIX
1386     ],[
1387       AC_TRY_CPP([
1388 #define _REENTRANT
1389 #include <sys/types.h>
1390 #include <dirent.h>
1391 int readdir_r(DIR *, struct dirent *);
1392         ],[
1393           ac_cv_what_readdir_r=old-style
1394         ],[
1395           ac_cv_what_readdir_r=none
1396       ])
1397     ],[
1398       ac_cv_what_readdir_r=none
1399    ])
1400   ])
1401     case $ac_cv_what_readdir_r in
1402     POSIX)
1403       AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
1404     old-style)
1405       AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
1406     esac
1407   fi
1411 dnl PHP_TM_GMTOFF
1412 dnl 
1413 AC_DEFUN([PHP_TM_GMTOFF],[
1414 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
1415 [AC_TRY_COMPILE([#include <sys/types.h>
1416 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
1417   ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
1419 if test "$ac_cv_struct_tm_gmtoff" = yes; then
1420   AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
1425 dnl PHP_STRUCT_FLOCK
1427 AC_DEFUN([PHP_STRUCT_FLOCK],[
1428 AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
1429     AC_TRY_COMPILE([
1430 #include <unistd.h>
1431 #include <fcntl.h>
1432         ],
1433         [struct flock x;],
1434         [
1435           ac_cv_struct_flock=yes
1436         ],[
1437           ac_cv_struct_flock=no
1438         ])
1440 if test "$ac_cv_struct_flock" = "yes" ; then
1441     AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
1446 dnl PHP_SOCKLEN_T
1448 AC_DEFUN([PHP_SOCKLEN_T],[
1449 AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
1450   AC_TRY_COMPILE([
1451 #include <sys/types.h>
1452 #include <sys/socket.h>
1454 socklen_t x;
1456   ac_cv_socklen_t=yes
1458   ac_cv_socklen_t=no
1460 if test "$ac_cv_socklen_t" = "yes"; then
1461   AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
1466 dnl PHP_MISSING_FCLOSE_DECL
1468 dnl See if we have broken header files like SunOS has.
1470 AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[
1471   AC_MSG_CHECKING([for fclose declaration])
1472   AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
1473     AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
1474     AC_MSG_RESULT([ok])
1475   ],[
1476     AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
1477     AC_MSG_RESULT([missing])
1478   ])
1482 dnl PHP_AC_BROKEN_SPRINTF
1484 dnl Check for broken sprintf(), C99 conformance
1486 AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
1487   AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
1488     AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
1489       ac_cv_broken_sprintf=no
1490     ],[
1491       ac_cv_broken_sprintf=yes
1492     ],[
1493       ac_cv_broken_sprintf=no
1494     ])
1495   ])
1496   if test "$ac_cv_broken_sprintf" = "yes"; then
1497     AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform])
1498   else
1499     AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform])
1500   fi
1504 dnl PHP_AC_BROKEN_SNPRINTF
1506 dnl Check for broken snprintf(), C99 conformance
1508 AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
1509   AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[
1510     AC_TRY_RUN([
1511 #define NULL (0L)
1512 main() {
1513   char buf[20];
1514   int res = 0;
1515   res = res || (snprintf(buf, 2, "marcus") != 6); 
1516   res = res || (buf[1] != '\0');
1517   /* Implementations may consider this as an encoding error */
1518   snprintf(buf, 0, "boerger");
1519   /* However, they MUST ignore the pointer */
1520   res = res || (buf[0] != 'm');
1521   res = res || (snprintf(NULL, 0, "boerger") != 7);
1522   res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
1523   exit(res); 
1525     ],[
1526       ac_cv_broken_snprintf=no
1527     ],[
1528       ac_cv_broken_snprintf=yes
1529     ],[
1530       ac_cv_broken_snprintf=no
1531     ])
1532   ])
1533   if test "$ac_cv_broken_snprintf" = "yes"; then
1534     AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform])
1535   else
1536     AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform])
1537   fi
1541 dnl PHP_SOLARIS_PIC_WEIRDNESS
1543 dnl Solaris requires main code to be position independent in order
1544 dnl to let shared objects find symbols.  Weird.  Ugly.
1546 dnl Must be run after all --with-NN options that let the user
1547 dnl choose dynamic extensions, and after the gcc test.
1549 AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
1550   AC_MSG_CHECKING([whether -fPIC is required])
1551   if test -n "$EXT_SHARED"; then
1552     os=`uname -sr 2>/dev/null`
1553     case $os in
1554       "SunOS 5.6"|"SunOS 5.7"[)]
1555         case $CC in
1556           gcc*|egcs*)
1557             CFLAGS="$CFLAGS -fPIC";;
1558           *[)]
1559             CFLAGS="$CFLAGS -fpic";;
1560         esac
1561         AC_MSG_RESULT([yes]);;
1562       *[)]
1563         AC_MSG_RESULT([no]);;
1564     esac
1565   else
1566     AC_MSG_RESULT([no])
1567   fi
1571 dnl PHP_SYS_LFS
1573 dnl The problem is that the default compilation flags in Solaris 2.6 won't
1574 dnl let programs access large files;  you need to tell the compiler that
1575 dnl you actually want your programs to work on large files.  For more
1576 dnl details about this brain damage please see:
1577 dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
1579 dnl Written by Paul Eggert <eggert@twinsun.com>.
1581 AC_DEFUN([PHP_SYS_LFS],
1582 [dnl
1583   # If available, prefer support for large files unless the user specified
1584   # one of the CPPFLAGS, LDFLAGS, or LIBS variables.
1585   AC_MSG_CHECKING([whether large file support needs explicit enabling])
1586   ac_getconfs=''
1587   ac_result=yes
1588   ac_set=''
1589   ac_shellvars='CPPFLAGS LDFLAGS LIBS'
1590   for ac_shellvar in $ac_shellvars; do
1591     case $ac_shellvar in
1592       CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
1593       *[)] ac_lfsvar=LFS_$ac_shellvar ;;
1594     esac
1595     eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
1596     (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
1597     ac_getconf=`getconf $ac_lfsvar`
1598     ac_getconfs=$ac_getconfs$ac_getconf
1599     eval ac_test_$ac_shellvar=\$ac_getconf
1600   done
1601   case "$ac_result$ac_getconfs" in
1602     yes[)] ac_result=no ;;
1603   esac
1604   case "$ac_result$ac_set" in
1605     yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
1606   esac
1607   AC_MSG_RESULT([$ac_result])
1608   case $ac_result in
1609     yes[)]
1610       for ac_shellvar in $ac_shellvars; do
1611         eval $ac_shellvar=\$ac_test_$ac_shellvar
1612       done ;;
1613   esac
1617 dnl PHP_SOCKADDR_CHECKS
1619 AC_DEFUN([PHP_SOCKADDR_CHECKS], [
1620   dnl Check for struct sockaddr_storage exists
1621   AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
1622     [AC_TRY_COMPILE([#include <sys/types.h>
1623 #include <sys/socket.h>],
1624     [struct sockaddr_storage s; s],
1625     [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])
1626   ])
1627   if test "$ac_cv_sockaddr_storage" = "yes"; then
1628     AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
1629   fi
1630   dnl Check if field sa_len exists in struct sockaddr 
1631   AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
1632     AC_TRY_COMPILE([#include <sys/types.h>
1633 #include <sys/socket.h>],
1634     [static struct sockaddr sa; int n = (int) sa.sa_len; return n;],
1635     [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])
1636   ])
1637   if test "$ac_cv_sockaddr_sa_len" = "yes"; then
1638     AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])
1639   fi
1643 dnl PHP_DECLARED_TIMEZONE
1645 AC_DEFUN([PHP_DECLARED_TIMEZONE],[
1646   AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
1647     AC_TRY_COMPILE([
1648 #include <sys/types.h>
1649 #include <time.h>
1650 #ifdef HAVE_SYS_TIME_H
1651 #include <sys/time.h>
1652 #endif
1654     time_t foo = (time_t) timezone;
1656   ac_cv_declared_timezone=yes
1658   ac_cv_declared_timezone=no
1659 ])])
1660   if test "$ac_cv_declared_timezone" = "yes"; then
1661     AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
1662   fi
1666 dnl PHP_EBCDIC
1668 AC_DEFUN([PHP_EBCDIC], [
1669   AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
1670   AC_TRY_RUN( [
1671 int main(void) { 
1672   return (unsigned char)'A' != (unsigned char)0xC1; 
1675   ac_cv_ebcdic=yes
1677   ac_cv_ebcdic=no
1679   ac_cv_ebcdic=no
1680 ])])
1681   if test "$ac_cv_ebcdic" = "yes"; then
1682     AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
1683   fi
1687 dnl PHP_BROKEN_GETCWD
1689 dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
1690 dnl component of the path has execute but not read permissions
1692 AC_DEFUN([PHP_BROKEN_GETCWD],[
1693   AC_MSG_CHECKING([for broken getcwd])
1694   os=`uname -sr 2>/dev/null`
1695   case $os in
1696     SunOS*[)]
1697       AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
1698       AC_MSG_RESULT([yes]);;
1699     *[)]
1700       AC_MSG_RESULT([no]);;
1701   esac
1705 dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
1707 AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
1708   AC_MSG_CHECKING([for broken libc stdio])
1709   AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
1710   AC_TRY_RUN([
1711 #include <stdio.h>
1712 int main(int argc, char *argv[])
1714   FILE *fp;
1715   long position;
1716   char *filename = tmpnam(NULL);
1717   
1718   fp = fopen(filename, "w");
1719   if (fp == NULL) {
1720     perror("fopen");
1721     exit(2);
1722   }
1723   fputs("foobar", fp);
1724   fclose(fp);
1726   fp = fopen(filename, "a+");
1727   position = ftell(fp);
1728   fclose(fp);
1729   unlink(filename);
1730   if (position == 0)
1731   return 1;
1732   return 0;
1735 [_cv_have_broken_glibc_fopen_append=no],
1736 [_cv_have_broken_glibc_fopen_append=yes ],
1737 AC_TRY_COMPILE([
1738 #include <features.h>
1740 #if !__GLIBC_PREREQ(2,2)
1741 choke me
1742 #endif
1744 [_cv_have_broken_glibc_fopen_append=yes],
1745 [_cv_have_broken_glibc_fopen_append=no ])
1748   if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
1749     AC_MSG_RESULT(yes)
1750     AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
1751   else
1752     AC_MSG_RESULT(no)
1753   fi
1757 dnl PHP_FOPENCOOKIE
1759 AC_DEFUN([PHP_FOPENCOOKIE], [
1760   AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
1762   if test "$have_glibc_fopencookie" = "yes"; then
1763 dnl this comes in two flavors:
1764 dnl newer glibcs (since 2.1.2 ? )
1765 dnl have a type called cookie_io_functions_t
1766 AC_TRY_COMPILE([
1767 #define _GNU_SOURCE
1768 #include <stdio.h>
1769 ], [cookie_io_functions_t cookie;], [have_cookie_io_functions_t=yes], [])
1771     if test "$have_cookie_io_functions_t" = "yes"; then
1772       cookie_io_functions_t=cookie_io_functions_t
1773       have_fopen_cookie=yes
1775 dnl even newer glibcs have a different seeker definition...
1776 AC_TRY_RUN([
1777 #define _GNU_SOURCE
1778 #include <stdio.h>
1780 struct cookiedata {
1781   __off64_t pos;
1784 __ssize_t reader(void *cookie, char *buffer, size_t size)
1785 { return size; }
1786 __ssize_t writer(void *cookie, const char *buffer, size_t size)
1787 { return size; }
1788 int closer(void *cookie)
1789 { return 0; }
1790 int seeker(void *cookie, __off64_t *position, int whence)
1791 { ((struct cookiedata*)cookie)->pos = *position; return 0; }
1793 cookie_io_functions_t funcs = {reader, writer, seeker, closer};
1795 main() {
1796   struct cookiedata g = { 0 };
1797   FILE *fp = fopencookie(&g, "r", funcs);
1799   if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
1800     exit(0);
1801   exit(1);
1804 ], [
1805   cookie_io_functions_use_off64_t=yes
1806 ], [
1807   cookie_io_functions_use_off64_t=no
1808 ], [
1809   cookie_io_functions_use_off64_t=no
1811     
1812     else
1814 dnl older glibc versions (up to 2.1.2 ?)
1815 dnl call it _IO_cookie_io_functions_t
1816 AC_TRY_COMPILE([
1817 #define _GNU_SOURCE
1818 #include <stdio.h>
1819 ], [ _IO_cookie_io_functions_t cookie; ], [have_IO_cookie_io_functions_t=yes], [])
1820       if test "$have_cookie_io_functions_t" = "yes" ; then
1821         cookie_io_functions_t=_IO_cookie_io_functions_t
1822         have_fopen_cookie=yes
1823       fi
1824     fi
1826     if test "$have_fopen_cookie" = "yes" ; then
1827       AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
1828       AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
1829       if test "$cookie_io_functions_use_off64_t" = "yes" ; then
1830         AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
1831       fi
1832     fi
1833   fi
1836 dnl -------------------------------------------------------------------------
1837 dnl Library/function existence and build sanity checks
1838 dnl -------------------------------------------------------------------------
1841 dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
1843 dnl Wrapper for AC_CHECK_LIB
1845 AC_DEFUN([PHP_CHECK_LIBRARY], [
1846   save_old_LDFLAGS=$LDFLAGS
1847   ac_stuff="$5"
1848   
1849   save_ext_shared=$ext_shared
1850   ext_shared=yes
1851   PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
1852   AC_CHECK_LIB([$1],[$2],[
1853     LDFLAGS=$save_old_LDFLAGS
1854     ext_shared=$save_ext_shared
1855     $3
1856   ],[
1857     LDFLAGS=$save_old_LDFLAGS
1858     ext_shared=$save_ext_shared
1859     unset ac_cv_lib_$1[]_$2
1860     $4
1861   ])dnl
1865 dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
1867 dnl El cheapo wrapper for AC_CHECK_LIB
1869 AC_DEFUN([PHP_CHECK_FRAMEWORK], [
1870   save_old_LDFLAGS=$LDFLAGS
1871   LDFLAGS="-framework $1 $LDFLAGS"
1872   dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
1873   dnl rewriting AC_CHECK_LIB is overkill and this only affects
1874   dnl the "checking.." output anyway.
1875   AC_CHECK_LIB(c,[$2],[
1876     LDFLAGS=$save_old_LDFLAGS
1877     $3
1878   ],[
1879     LDFLAGS=$save_old_LDFLAGS
1880     $4
1881   ])
1885 dnl PHP_CHECK_FUNC_LIB(func, libs)
1887 dnl This macro checks whether 'func' or '__func' exists
1888 dnl in the specified library.
1889 dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1890 dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
1893 dnl autoconf undefines the builtin "shift" :-(
1894 dnl If possible, we use the builtin shift anyway, otherwise we use
1895 dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
1896 ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
1897 define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
1900 AC_DEFUN([PHP_CHECK_FUNC_LIB],[
1901   ifelse($2,,:,[
1902   unset ac_cv_lib_$2[]_$1
1903   unset ac_cv_lib_$2[]___$1
1904   unset found
1905   AC_CHECK_LIB($2, $1, [found=yes], [
1906     AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
1907   ])
1909   if test "$found" = "yes"; then
1910     ac_libs=$LIBS
1911     LIBS="$LIBS -l$2"
1912     AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
1913     LIBS=$ac_libs
1914   fi
1916   if test "$found" = "yes"; then
1917     PHP_ADD_LIBRARY($2)
1918     PHP_DEF_HAVE($1)
1919     PHP_DEF_HAVE(lib$2)
1920     ac_cv_func_$1=yes
1921   else
1922     PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
1923   fi
1924   ])
1928 dnl PHP_CHECK_FUNC(func, ...)
1930 dnl This macro checks whether 'func' or '__func' exists
1931 dnl in the default libraries and as a fall back in the specified library.
1932 dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1934 AC_DEFUN([PHP_CHECK_FUNC],[
1935   unset ac_cv_func_$1
1936   unset ac_cv_func___$1
1937   unset found
1938   
1939   AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
1941   case $found in
1942   yes[)] 
1943     PHP_DEF_HAVE($1)
1944     ac_cv_func_$1=yes
1945   ;;
1946   ifelse($#,1,,[
1947     *[)] PHP_CHECK_FUNC_LIB($@) ;;
1948   ])
1949   esac
1953 dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
1955 dnl This macro checks whether build works and given function exists.
1957 AC_DEFUN([PHP_TEST_BUILD], [
1958   old_LIBS=$LIBS
1959   LIBS="$4 $LIBS"
1960   AC_TRY_RUN([
1961     $5
1962     char $1();
1963     int main() {
1964       $1();
1965       return 0;
1966     }
1967   ], [
1968     LIBS=$old_LIBS
1969     $2
1970   ],[
1971     LIBS=$old_LIBS
1972     $3
1973   ],[
1974     LIBS=$old_LIBS
1975   ])
1978 dnl -------------------------------------------------------------------------
1979 dnl Platform characteristics checks
1980 dnl -------------------------------------------------------------------------
1983 dnl PHP_SHLIB_SUFFIX_NAMES
1985 dnl Determines link library suffix SHLIB_SUFFIX_NAME
1986 dnl which can be: .so, .sl or .dylib
1988 dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
1989 dnl suffix can be: .so or .sl
1991 AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
1992  AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
1993  PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
1994  PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)
1995  SHLIB_SUFFIX_NAME=so
1996  SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
1997  case $host_alias in
1998  *hpux*[)]
1999    SHLIB_SUFFIX_NAME=sl
2000    SHLIB_DL_SUFFIX_NAME=sl
2001    ;;
2002  *darwin*[)]
2003    SHLIB_SUFFIX_NAME=dylib
2004    SHLIB_DL_SUFFIX_NAME=so
2005    ;;
2006  esac
2010 dnl PHP_CHECK_64BIT([do if 32], [do if 64])
2012 dnl This macro is used to detect if we're at 64-bit platform or not.
2013 dnl It could be useful for those external libs, that have different precompiled 
2014 dnl versions in different directories.
2016 AC_DEFUN([PHP_CHECK_64BIT],[
2017   AC_CHECK_SIZEOF(long int, 4)
2018   AC_MSG_CHECKING([checking if we're at 64-bit platform])
2019   if test "$ac_cv_sizeof_long_int" = "4" ; then
2020     AC_MSG_RESULT([no])
2021     $1
2022   else
2023     AC_MSG_RESULT([yes])
2024     $2
2025   fi
2029 dnl PHP_C_BIGENDIAN
2031 dnl Replacement macro for AC_C_BIGENDIAN
2033 AC_DEFUN([PHP_C_BIGENDIAN],
2034 [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
2036   ac_cv_c_bigendian_php=unknown
2037   AC_TRY_RUN(
2038   [
2039 int main(void)
2041   short one = 1;
2042   char *cp = (char *)&one;
2044   if (*cp == 0) {
2045     return(0);
2046   } else {
2047     return(1);
2048   }
2050   ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
2051  ])
2052  if test $ac_cv_c_bigendian_php = yes; then
2053    AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
2054  fi
2057 dnl -------------------------------------------------------------------------
2058 dnl Checks for programs: PHP_PROG_<program>
2059 dnl -------------------------------------------------------------------------
2062 dnl PHP_PROG_SENDMAIL
2064 dnl Search for the sendmail binary
2066 AC_DEFUN([PHP_PROG_SENDMAIL], [
2067   PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
2068   AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
2069   PHP_SUBST(PROG_SENDMAIL)
2073 dnl PHP_PROG_AWK
2075 dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
2077 AC_DEFUN([PHP_PROG_AWK], [
2078   AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
2079   case "$AWK" in
2080     *mawk)
2081       AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
2082       ;;
2083     *gawk)  
2084       ;;
2085     bork)   
2086       AC_MSG_ERROR([Could not find awk; Install GNU awk])
2087       ;;
2088     *)
2089       AC_MSG_CHECKING([if $AWK is broken])
2090       if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
2091         AC_MSG_RESULT([yes])
2092         AC_MSG_ERROR([You should install GNU awk])
2093       else
2094         AC_MSG_RESULT([no])
2095       fi
2096       ;;
2097   esac
2098   PHP_SUBST(AWK)
2102 dnl PHP_PROG_BISON
2104 dnl Search for bison and check it's version
2106 AC_DEFUN([PHP_PROG_BISON], [
2107   AC_PROG_YACC
2108   LIBZEND_BISON_CHECK
2109   PHP_SUBST(YACC)
2113 dnl PHP_PROG_LEX
2115 dnl Search for (f)lex and check it's version
2117 AC_DEFUN([PHP_PROG_LEX], [
2118 dnl we only support certain flex versions
2119   flex_version_list="2.5.4"
2120    
2121   AC_PROG_LEX
2122   if test "$LEX" = "flex"; then
2123 dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX
2124 dnl this is what causes that annoying "PHP_PROG_LEX is expanded from" warning with autoconf 2.50+
2125 dnl it should be removed once we drop support of autoconf 2.13 (if ever)
2126     AC_DECL_YYTEXT
2127     :
2128   fi
2129   dnl ## Make flex scanners use const if they can, even if __STDC__ is not
2130   dnl ## true, for compilers like Sun's that only set __STDC__ true in
2131   dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
2132   AC_C_CONST
2133   if test "$ac_cv_c_const" = "yes" ; then
2134     LEX_CFLAGS="-DYY_USE_CONST"
2135   fi
2137   if test "$LEX" = "flex"; then
2138     AC_CACHE_CHECK([for flex version], php_cv_flex_version, [
2139       flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
2140       php_cv_flex_version=invalid
2141       for flex_check_version in $flex_version_list; do
2142         if test "$flex_version" = "$flex_check_version"; then
2143           php_cv_flex_version="$flex_check_version (ok)"
2144         fi
2145       done
2146     ])
2147   else
2148     flex_version=none
2149   fi
2150   
2151   case $php_cv_flex_version in
2152     ""|invalid[)]
2153       if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
2154         AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list  (found: $flex_version)])
2155       else
2156         flex_msg="Supported flex versions are: $flex_version_list"
2157         if test "$flex_version" = "none"; then
2158           flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg"
2159         else
2160           flex_msg="Found invalid flex version: $flex_version. $flex_msg"
2161         fi
2162         AC_MSG_ERROR([$flex_msg])
2163       fi
2164       LEX="exit 0;"
2165       ;;
2166   esac
2167   PHP_SUBST(LEX)
2171 dnl PHP_PROG_RE2C
2173 dnl Search for the re2c binary and check the version
2175 AC_DEFUN([PHP_PROG_RE2C],[
2176   AC_CHECK_PROG(RE2C, re2c, re2c)
2177   if test -n "$RE2C"; then
2178     AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
2179       re2c_vernum=`$RE2C --vernum 2>/dev/null`
2180       if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1304"; then
2181         php_cv_re2c_version=invalid
2182       else
2183         php_cv_re2c_version="`$RE2C --version | cut -d ' ' -f 2  2>/dev/null` (ok)"
2184       fi 
2185     ])
2186   fi
2187   case $php_cv_re2c_version in
2188     ""|invalid[)]
2189       AC_MSG_WARN([You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.])
2190       RE2C="exit 0;"
2191       ;;
2192   esac
2193   PHP_SUBST(RE2C)
2196 dnl -------------------------------------------------------------------------
2197 dnl Common setup macros: PHP_SETUP_<what>
2198 dnl -------------------------------------------------------------------------
2201 dnl PHP_SETUP_ICU([shared-add])
2203 dnl Common setup macro for ICU
2205 AC_DEFUN([PHP_SETUP_ICU],[
2206   PHP_ARG_WITH(icu-dir,,
2207   [  --with-icu-dir=DIR      Specify where ICU libraries and headers can be found], DEFAULT, no)
2209   if test "$PHP_ICU_DIR" = "no"; then
2210     PHP_ICU_DIR=DEFAULT
2211   fi
2213   if test "$PHP_ICU_DIR" = "DEFAULT"; then
2214     dnl Try to find icu-config
2215     AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
2216   else
2217     ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
2218   fi
2220   AC_MSG_CHECKING([for location of ICU headers and libraries])
2222   dnl Trust icu-config to know better what the install prefix is..
2223   icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
2224   if test "$?" != "0" || test -z "$icu_install_prefix"; then
2225     AC_MSG_RESULT([not found])
2226     AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
2227   else
2228     AC_MSG_RESULT([$icu_install_prefix])
2230     dnl Check ICU version
2231     AC_MSG_CHECKING([for ICU 3.4 or greater])
2232     icu_version_full=`$ICU_CONFIG --version`
2233     ac_IFS=$IFS
2234     IFS="."
2235     set $icu_version_full
2236     IFS=$ac_IFS
2237     icu_version=`expr [$]1 \* 1000 + [$]2`
2238     AC_MSG_RESULT([found $icu_version_full])
2240     if test "$icu_version" -lt "3004"; then
2241       AC_MSG_ERROR([ICU version 3.4 or later is required])
2242     fi
2244     ICU_VERSION=$icu_version
2245     ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
2246     ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
2247     PHP_EVAL_INCLINE($ICU_INCS)
2248     PHP_EVAL_LIBLINE($ICU_LIBS, $1)
2249   fi
2253 dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
2255 dnl Common setup macro for kerberos
2257 AC_DEFUN([PHP_SETUP_KERBEROS],[
2258   found_kerberos=no
2259   unset KERBEROS_CFLAGS
2260   unset KERBEROS_LIBS
2262   dnl First try to find krb5-config
2263   if test -z "$KRB5_CONFIG"; then
2264     AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
2265   fi
2267   dnl If krb5-config is found try using it
2268   if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
2269     KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
2270     KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
2272     if test -n "$KERBEROS_LIBS"; then
2273       found_kerberos=yes
2274       PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
2275       PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
2276     fi
2277   fi
2279   dnl If still not found use old skool method
2280   if test "$found_kerberos" = "no"; then
2282     if test "$PHP_KERBEROS" = "yes"; then
2283       PHP_KERBEROS="/usr/kerberos /usr/local /usr"
2284     fi
2286     for i in $PHP_KERBEROS; do
2287       if test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/$DEB_HOST_MULTIARCH/libkrb5.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libkrb5.a; then
2288         PHP_KERBEROS_DIR=$i
2289         break
2290       fi
2291     done
2293     if test "$PHP_KERBEROS_DIR"; then
2294       found_kerberos=yes
2295       PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1)
2296       PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
2297       PHP_ADD_LIBRARY(krb5, 1, $1)
2298       PHP_ADD_LIBRARY(k5crypto, 1, $1)
2299       PHP_ADD_LIBRARY(com_err,  1, $1)
2300       PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
2301     fi
2302   fi
2304   if test "$found_kerberos" = "yes"; then
2305 ifelse([$2],[],:,[$2])
2306 ifelse([$3],[],,[else $3])
2307   fi
2310 dnl 
2311 dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
2313 dnl Common setup macro for openssl
2315 AC_DEFUN([PHP_SETUP_OPENSSL],[
2316   found_openssl=no
2317   unset OPENSSL_INCDIR
2318   unset OPENSSL_LIBDIR
2320   dnl Empty variable means 'no'
2321   test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
2322   test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
2324   dnl Fallbacks for different configure options
2325   if test "$PHP_OPENSSL" != "no"; then
2326     PHP_OPENSSL_DIR=$PHP_OPENSSL
2327   elif test "$PHP_IMAP_SSL" != "no"; then
2328     PHP_OPENSSL_DIR=$PHP_IMAP_SSL
2329   fi
2331   dnl First try to find pkg-config
2332   if test -z "$PKG_CONFIG"; then
2333     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2334   fi
2336   dnl If pkg-config is found try using it
2337   if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
2338     if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
2339       found_openssl=yes
2340       OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
2341       OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
2342       OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
2343     else
2344       AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2345     fi
2347     if test -n "$OPENSSL_LIBS"; then
2348       PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
2349     fi
2350     if test -n "$OPENSSL_INCS"; then
2351       PHP_EVAL_INCLINE($OPENSSL_INCS)
2352     fi
2353   fi
2355   dnl If pkg-config fails for some reason, revert to the old method
2356   if test "$found_openssl" = "no"; then
2357   
2358     if test "$PHP_OPENSSL_DIR" = "yes"; then
2359       PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
2360     fi
2362     for i in $PHP_OPENSSL_DIR; do
2363       if test -r $i/include/openssl/evp.h; then
2364         OPENSSL_INCDIR=$i/include
2365       fi
2366       if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/$DEB_HOST_MULTIARCH/libssl.$SHLIB_SUFFIX_NAME -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
2367         OPENSSL_LIBDIR=$i/$PHP_LIBDIR
2368       fi
2369       test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
2370     done
2372     if test -z "$OPENSSL_INCDIR"; then
2373       AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
2374     fi
2376     if test -z "$OPENSSL_LIBDIR"; then
2377       AC_MSG_ERROR([Cannot find OpenSSL's libraries])
2378     fi
2380     old_CPPFLAGS=$CPPFLAGS
2381     CPPFLAGS=-I$OPENSSL_INCDIR
2382     AC_MSG_CHECKING([for OpenSSL version])
2383     AC_EGREP_CPP(yes,[
2384 #include <openssl/opensslv.h>
2385 #if OPENSSL_VERSION_NUMBER >= 0x0090600fL
2386   yes
2387 #endif
2388     ],[
2389       AC_MSG_RESULT([>= 0.9.6])
2390     ],[
2391       AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2392     ])
2393     CPPFLAGS=$old_CPPFLAGS
2395     PHP_ADD_INCLUDE($OPENSSL_INCDIR)
2396   
2397     PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [:],[
2398       AC_MSG_ERROR([libcrypto not found!])
2399     ],[
2400       -L$OPENSSL_LIBDIR
2401     ])
2403     old_LIBS=$LIBS
2404     LIBS="$LIBS -lcrypto"
2405     PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
2406       found_openssl=yes
2407     ],[
2408       AC_MSG_ERROR([libssl not found!])
2409     ],[
2410       -L$OPENSSL_LIBDIR
2411     ])
2412     LIBS=$old_LIBS
2413     PHP_ADD_LIBRARY(ssl,,$1)
2414     PHP_ADD_LIBRARY(crypto,,$1)
2416     PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
2417   fi
2419   if test "$found_openssl" = "yes"; then
2420   dnl For apache 1.3.x static build
2421   OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
2422   AC_SUBST(OPENSSL_INCDIR_OPT)
2424 ifelse([$2],[],:,[$2])
2425 ifelse([$3],[],,[else $3])
2426   fi
2429 dnl 
2430 dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
2432 dnl Common setup macro for iconv
2434 AC_DEFUN([PHP_SETUP_ICONV], [
2435   found_iconv=no
2436   unset ICONV_DIR
2438   # Create the directories for a VPATH build:
2439   $php_shtool mkdir -p ext/iconv
2441   echo > ext/iconv/php_have_bsd_iconv.h
2442   echo > ext/iconv/php_have_ibm_iconv.h
2443   echo > ext/iconv/php_have_glibc_iconv.h
2444   echo > ext/iconv/php_have_libiconv.h
2445   echo > ext/iconv/php_have_iconv.h
2446   echo > ext/iconv/php_php_iconv_impl.h
2447   echo > ext/iconv/php_iconv_aliased_libiconv.h
2448   echo > ext/iconv/php_php_iconv_h_path.h
2449   echo > ext/iconv/php_iconv_supports_errno.h
2451   dnl
2452   dnl Check libc first if no path is provided in --with-iconv
2453   dnl
2455   if test "$PHP_ICONV" = "yes"; then
2456     dnl Reset LIBS temporarily as it may have already been included
2457     dnl -liconv in.
2458     LIBS_save="$LIBS"
2459     LIBS=
2460     AC_CHECK_FUNC(iconv, [
2461       found_iconv=yes
2462     ],[
2463       AC_CHECK_FUNC(libiconv,[
2464         PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2465         AC_DEFINE(HAVE_LIBICONV, 1, [ ])
2466         found_iconv=yes
2467       ])
2468     ])
2469     LIBS="$LIBS_save"
2470   fi
2472   dnl
2473   dnl Check external libs for iconv funcs
2474   dnl
2475   if test "$found_iconv" = "no"; then
2477     for i in $PHP_ICONV /usr/local /usr; do
2478       if test -r $i/include/giconv.h; then
2479         AC_DEFINE(HAVE_GICONV_H, 1, [ ])
2480         ICONV_DIR=$i
2481         iconv_lib_name=giconv
2482         break
2483       elif test -r $i/include/iconv.h; then
2484         ICONV_DIR=$i
2485         iconv_lib_name=iconv
2486         break
2487       fi
2488     done
2490     if test -z "$ICONV_DIR"; then
2491       AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
2492     fi
2493   
2494     if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
2495        test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
2496     then
2497       PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
2498         found_iconv=yes
2499         PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2500         AC_DEFINE(HAVE_LIBICONV,1,[ ])
2501         PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])
2502         AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])
2503       ], [
2504         PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
2505           found_iconv=yes
2506         ], [], [
2507           -L$ICONV_DIR/$PHP_LIBDIR
2508         ])
2509       ], [
2510         -L$ICONV_DIR/$PHP_LIBDIR
2511       ])
2512     fi
2513   fi
2515   if test "$found_iconv" = "yes"; then
2516     PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
2517     AC_DEFINE(HAVE_ICONV,1,[ ])
2518     if test -n "$ICONV_DIR"; then
2519       PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
2520       PHP_ADD_INCLUDE($ICONV_DIR/include)
2521     fi
2522     $2
2523 ifelse([$3],[],,[else $3])
2524   fi
2527 dnl 
2528 dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
2530 dnl Common setup macro for libxml
2532 AC_DEFUN([PHP_SETUP_LIBXML], [
2533 AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
2535   for i in $PHP_LIBXML_DIR /usr/local /usr; do
2536     if test -x "$i/bin/xml2-config"; then
2537       ac_cv_php_xml2_config_path="$i/bin/xml2-config"
2538       break
2539     fi
2540   done
2543   if test -x "$ac_cv_php_xml2_config_path"; then
2544     XML2_CONFIG="$ac_cv_php_xml2_config_path"
2545     libxml_full_version=`$XML2_CONFIG --version`
2546     ac_IFS=$IFS
2547     IFS="."
2548     set $libxml_full_version
2549     IFS=$ac_IFS
2550     LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
2551     if test "$LIBXML_VERSION" -ge "2006011"; then
2552       LIBXML_LIBS=`$XML2_CONFIG --libs`
2553       LIBXML_INCS=`$XML2_CONFIG --cflags`
2554       PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
2555       PHP_EVAL_INCLINE($LIBXML_INCS)
2557       dnl Check that build works with given libs
2558       AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
2559         PHP_TEST_BUILD(xmlInitParser,
2560         [
2561           php_cv_libxml_build_works=yes
2562         ], [
2563           AC_MSG_RESULT(no)
2564           AC_MSG_ERROR([build test failed.  Please check the config.log for details.])
2565         ], [
2566           [$]$1
2567         ])
2568       ])
2569       if test "$php_cv_libxml_build_works" = "yes"; then
2570         AC_DEFINE(HAVE_LIBXML, 1, [ ])
2571       fi
2572       $2
2573     else
2574       AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
2575     fi
2576 ifelse([$3],[],,[else $3])
2577   fi
2580 dnl -------------------------------------------------------------------------
2581 dnl Misc. macros
2582 dnl -------------------------------------------------------------------------
2584 dnl 
2585 dnl PHP_INSTALL_HEADERS(path [, file ...])
2587 dnl PHP header files to be installed
2589 AC_DEFUN([PHP_INSTALL_HEADERS],[
2590   ifelse([$2],[],[
2591     for header_file in $1; do
2592       PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
2593         INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
2594       ])
2595     done 
2596   ], [
2597     header_path=$1
2598     for header_file in $2; do
2599       hp_hf="$header_path/$header_file"
2600       PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
2601         INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
2602       ])
2603     done 
2604   ])
2608 dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
2610 dnl This macro is used to get a comparable
2611 dnl version for apache1/2.
2613 AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
2614   ac_output=`$1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
2615   ac_IFS=$IFS
2616 IFS="- /.
2618   set $ac_output
2619   IFS=$ac_IFS
2621   APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
2625 dnl PHP_DEBUG_MACRO(filename)
2626 dnl 
2627 AC_DEFUN([PHP_DEBUG_MACRO],[
2628   DEBUG_LOG=$1
2629   cat >$1 <<X
2630 CONFIGURE:  $CONFIGURE_COMMAND
2631 CC:         $CC
2632 CFLAGS:     $CFLAGS
2633 CPPFLAGS:   $CPPFLAGS
2634 CXX:        $CXX
2635 CXXFLAGS:   $CXXFLAGS
2636 INCLUDES:   $INCLUDES
2637 LDFLAGS:    $LDFLAGS
2638 LIBS:       $LIBS
2639 DLIBS:      $DLIBS
2640 SAPI:       $PHP_SAPI
2641 PHP_RPATHS: $PHP_RPATHS
2642 uname -a:   `uname -a`
2645     cat >conftest.$ac_ext <<X
2646 main()
2648   exit(0);
2651     (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
2652     rm -fr conftest*
2656 dnl PHP_CONFIG_NICE(filename)
2658 dnl Generates the config.nice file
2660 AC_DEFUN([PHP_CONFIG_NICE],[
2661   AC_REQUIRE([AC_PROG_EGREP])
2662   AC_REQUIRE([LT_AC_PROG_SED])
2663   PHP_SUBST_OLD(EGREP)
2664   PHP_SUBST_OLD(SED)
2665   test -f $1 && mv $1 $1.old
2666   rm -f $1.old
2667   cat >$1<<EOF
2668 #! /bin/sh
2670 # Created by configure
2674   for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
2675     eval val=\$$var
2676     if test -n "$val"; then
2677       echo "$var='$val' \\" >> $1
2678     fi
2679   done
2681   echo "'[$]0' \\" >> $1
2682   if test `expr -- [$]0 : "'.*"` = 0; then
2683     CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
2684   else 
2685     CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
2686   fi
2687   for arg in $ac_configure_args; do
2688     if test `expr -- $arg : "'.*"` = 0; then
2689       if test `expr -- $arg : "--.*"` = 0; then
2690         break;
2691       fi
2692       echo "'[$]arg' \\" >> $1
2693       CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
2694     else
2695       if test `expr -- $arg : "'--.*"` = 0; then
2696         break;
2697       fi
2698       echo "[$]arg \\" >> $1
2699       CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
2700     fi
2701   done
2702   echo '"[$]@"' >> $1
2703   chmod +x $1
2704   CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
2705   PHP_SUBST_OLD(CONFIGURE_COMMAND)
2706   PHP_SUBST_OLD(CONFIGURE_OPTIONS)
2710 dnl PHP_CHECK_CONFIGURE_OPTIONS
2712 AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
2713   for arg in $ac_configure_args; do
2714     case $arg in
2715       --with-*[)]
2716         arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
2717         ;;
2718       --without-*[)]
2719         arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
2720         ;;
2721       --enable-*[)]
2722         arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
2723         ;;
2724       --disable-*[)]
2725         arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
2726         ;;
2727       *[)]
2728         continue
2729         ;;
2730     esac
2731     case $arg_name in
2732       # Allow --disable-all / --enable-all
2733       enable-all[)];;
2735       # Allow certain libtool options
2736       enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
2738       # Allow certain TSRM options
2739       with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads[)];;
2741       # Allow certain Zend options
2742       with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
2744       # All the rest must be set using the PHP_ARG_* macros
2745       # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name>
2746       *[)]
2747         # Options that exist before PHP 6
2748         if test "$PHP_MAJOR_VERSION" -lt "6"; then
2749           case $arg_name in
2750             enable-zend-multibyte[)] continue;;
2751           esac 
2752         fi
2754         is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
2755         if eval test "x\$$is_arg_set" = "x"; then
2756           PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
2757 [$]arg"
2758         fi
2759         ;;
2760     esac
2761   done
2765 dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
2767 AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
2768   AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [
2769     AC_MSG_CHECKING([for PDO includes])
2770     if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
2771       pdo_cv_inc_path=$abs_srcdir/ext
2772     elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
2773       pdo_cv_inc_path=$abs_srcdir/ext
2774     elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
2775       pdo_cv_inc_path=$prefix/include/php/ext
2776     fi
2777   ])
2778   if test -n "$pdo_cv_inc_path"; then
2779 ifelse([$1],[],:,[$1])
2780   else
2781 ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
2782   fi
2786 dnl PHP_DETECT_ICC
2787 dnl Detect Intel C++ Compiler and unset $GCC if ICC found
2788 AC_DEFUN([PHP_DETECT_ICC],
2790   ICC="no"
2791   AC_MSG_CHECKING([for icc])
2792   AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
2793     ICC="no"
2794     AC_MSG_RESULT([no]),
2795     ICC="yes"
2796     GCC="no"
2797     AC_MSG_RESULT([yes])
2798   )
2801 dnl PHP_DETECT_SUNCC
2802 dnl Detect if the systems default compiler is suncc.
2803 dnl We also set some useful CFLAGS if the user didn't set any
2804 AC_DEFUN([PHP_DETECT_SUNCC],[
2805   SUNCC="no"
2806   AC_MSG_CHECKING([for suncc])
2807   AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
2808     SUNCC="no"
2809     AC_MSG_RESULT([no]),
2810     SUNCC="yes"
2811     GCC="no"
2812     test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
2813     GCC=""
2814     AC_MSG_RESULT([yes])
2815   )
2819 dnl PHP_CRYPT_R_STYLE
2820 dnl detect the style of crypt_r() is any is available
2821 dnl see APR_CHECK_CRYPT_R_STYLE() for original version
2823 AC_DEFUN([PHP_CRYPT_R_STYLE],
2825   AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[
2826     php_cv_crypt_r_style=none
2827     AC_TRY_COMPILE([
2828 #define _REENTRANT 1
2829 #include <crypt.h>
2831 CRYPTD buffer;
2832 crypt_r("passwd", "hash", &buffer);
2833 ], 
2834 php_cv_crypt_r_style=cryptd)
2836     if test "$php_cv_crypt_r_style" = "none"; then
2837       AC_TRY_COMPILE([
2838 #define _REENTRANT 1
2839 #include <crypt.h>
2841 struct crypt_data buffer;
2842 crypt_r("passwd", "hash", &buffer);
2843 ], 
2844 php_cv_crypt_r_style=struct_crypt_data)
2845     fi
2847     if test "$php_cv_crypt_r_style" = "none"; then
2848       AC_TRY_COMPILE([
2849 #define _REENTRANT 1
2850 #define _GNU_SOURCE
2851 #include <crypt.h>
2853 struct crypt_data buffer;
2854 crypt_r("passwd", "hash", &buffer);
2855 ], 
2856 php_cv_crypt_r_style=struct_crypt_data_gnu_source)
2857     fi
2858     ])
2860   if test "$php_cv_crypt_r_style" = "cryptd"; then
2861     AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
2862   fi
2863   if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2864     AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
2865   fi
2866   if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2867     AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])
2868   fi
2869   if test "$php_cv_crypt_r_style" = "none"; then
2870     AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
2871   fi
2875 dnl PHP_TEST_WRITE_STDOUT
2877 AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
2878   AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
2879     AC_TRY_RUN([
2880 #ifdef HAVE_UNISTD_H
2881 #include <unistd.h>
2882 #endif
2884 #define TEXT "This is the test message -- "
2886 main()
2888   int n;
2890   n = write(1, TEXT, sizeof(TEXT)-1);
2891   return (!(n == sizeof(TEXT)-1));
2893     ],[
2894       ac_cv_write_stdout=yes
2895     ],[
2896       ac_cv_write_stdout=no
2897     ],[
2898       ac_cv_write_stdout=no
2899     ])
2900   ])
2901   if test "$ac_cv_write_stdout" = "yes"; then
2902     AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
2903   fi
2907 dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])
2909 AC_DEFUN([PHP_INIT_DTRACE],[
2910 dnl Set paths properly when called from extension
2911   case "$4" in
2912     ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir;;
2913     /*[)] ac_srcdir=`echo "$4"|cut -c 2-`"/"; ac_bdir=$ac_srcdir;;
2914     *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$4/";;
2915   esac
2917 dnl providerdesc
2918   ac_provsrc=$1
2919   old_IFS=[$]IFS
2920   IFS=.
2921   set $ac_provsrc
2922   ac_provobj=[$]1
2923   IFS=$old_IFS
2925 dnl header-file
2926   ac_hdrobj=$2
2928 dnl Add providerdesc.o or .lo into global objects when needed
2929   case $host_alias in
2930   *freebsd*)
2931     PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o"
2932     PHP_LDFLAGS="$PHP_LDFLAGS -lelf"
2933     ;;
2934   *solaris*)
2935     PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
2936     ;;
2937   *linux*)
2938     PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.lo"
2939     ;;
2940   esac
2942 dnl DTrace objects
2943   old_IFS=[$]IFS
2944   for ac_src in $3; do
2945     IFS=.
2946     set $ac_src
2947     ac_obj=[$]1
2948     IFS=$old_IFS
2950     PHP_DTRACE_OBJS="[$]PHP_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo"
2951   done;
2953   case [$]php_sapi_module in
2954   shared[)]
2955     for ac_lo in $PHP_DTRACE_OBJS; do
2956       dtrace_objs="[$]dtrace_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
2957     done;
2958     ;;
2959   *[)]
2960     dtrace_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
2961     ;;
2962   esac
2964 dnl Generate Makefile.objects entries
2965 dnl The empty $ac_provsrc command stops an implicit circular dependency
2966 dnl in GNU Make which causes the .d file to be overwritten (Bug 61268)
2967   cat>>Makefile.objects<<EOF
2969 $abs_srcdir/$ac_provsrc:;
2971 $ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc
2972         CFLAGS="\$(CFLAGS_CLEAN)" dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@.bak && \$(SED) -e 's,PHP_,DTRACE_,g' \$[]@.bak > \$[]@
2974 \$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj
2978   case $host_alias in
2979   *solaris*|*linux*)
2980     dtrace_prov_name="`echo $ac_provsrc | $SED -e 's#\(.*\)\/##'`.o"
2981     dtrace_lib_dir="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/[^/]*#\1#'`/.libs"
2982     dtrace_d_obj="`echo $ac_bdir[$]ac_provsrc | $SED -e 's#\(.*\)/\([^/]*\)#\1/.libs/\2#'`.o"
2983     dtrace_nolib_objs='$(PHP_DTRACE_OBJS:.lo=.o)'
2984     for ac_lo in $PHP_DTRACE_OBJS; do
2985       dtrace_lib_objs="[$]dtrace_lib_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`"
2986     done;
2987 dnl Always attempt to create both PIC and non-PIC DTrace objects (Bug 63692)
2988     cat>>Makefile.objects<<EOF
2989 $ac_bdir[$]ac_provsrc.lo: \$(PHP_DTRACE_OBJS)
2990         echo "[#] Generated by Makefile for libtool" > \$[]@
2991         @test -d "$dtrace_lib_dir" || mkdir $dtrace_lib_dir
2992         if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $dtrace_d_obj -s $abs_srcdir/$ac_provsrc $dtrace_lib_objs 2> /dev/null && test -f "$dtrace_d_obj"; then [\\]
2993           echo "pic_object=['].libs/$dtrace_prov_name[']" >> \$[]@ [;\\]
2994         else [\\]
2995           echo "pic_object='none'" >> \$[]@ [;\\]
2996         fi
2997         if CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o $ac_bdir[$]ac_provsrc.o -s $abs_srcdir/$ac_provsrc $dtrace_nolib_objs 2> /dev/null && test -f "$ac_bdir[$]ac_provsrc.o"; then [\\]
2998           echo "non_pic_object=[']$dtrace_prov_name[']" >> \$[]@ [;\\]
2999         else [\\]
3000           echo "non_pic_object='none'" >> \$[]@ [;\\]
3001         fi
3005     ;;
3006   *)
3007 cat>>Makefile.objects<<EOF
3008 $ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS)
3009         CFLAGS="\$(CFLAGS_CLEAN)" dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs
3012     ;;
3013   esac
3015 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3017 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3018 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
3019 #                 Foundation, Inc.
3020 #   Written by Gordon Matzigkeit, 1996
3022 # This file is free software; the Free Software Foundation gives
3023 # unlimited permission to copy and/or distribute it, with or without
3024 # modifications, as long as this notice is preserved.
3026 m4_define([_LT_COPYING], [dnl
3027 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3028 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
3029 #                 Foundation, Inc.
3030 #   Written by Gordon Matzigkeit, 1996
3032 #   This file is part of GNU Libtool.
3034 # GNU Libtool is free software; you can redistribute it and/or
3035 # modify it under the terms of the GNU General Public License as
3036 # published by the Free Software Foundation; either version 2 of
3037 # the License, or (at your option) any later version.
3039 # As a special exception to the GNU General Public License,
3040 # if you distribute this file as part of a program or library that
3041 # is built using GNU Libtool, you may include this file under the
3042 # same distribution terms that you use for the rest of that program.
3044 # GNU Libtool is distributed in the hope that it will be useful,
3045 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3046 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3047 # GNU General Public License for more details.
3049 # You should have received a copy of the GNU General Public License
3050 # along with GNU Libtool; see the file COPYING.  If not, a copy
3051 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
3052 # obtained by writing to the Free Software Foundation, Inc.,
3053 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3056 # serial 57 LT_INIT
3059 # LT_PREREQ(VERSION)
3060 # ------------------
3061 # Complain and exit if this libtool version is less that VERSION.
3062 m4_defun([LT_PREREQ],
3063 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
3064        [m4_default([$3],
3065                    [m4_fatal([Libtool version $1 or higher is required],
3066                              63)])],
3067        [$2])])
3070 # _LT_CHECK_BUILDDIR
3071 # ------------------
3072 # Complain if the absolute build directory name contains unusual characters
3073 m4_defun([_LT_CHECK_BUILDDIR],
3074 [case `pwd` in
3075   *\ * | *\     *)
3076     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
3077 esac
3081 # LT_INIT([OPTIONS])
3082 # ------------------
3083 AC_DEFUN([LT_INIT],
3084 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
3085 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
3086 AC_BEFORE([$0], [LT_LANG])dnl
3087 AC_BEFORE([$0], [LT_OUTPUT])dnl
3088 AC_BEFORE([$0], [LTDL_INIT])dnl
3089 m4_require([_LT_CHECK_BUILDDIR])dnl
3091 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
3092 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
3093 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
3094 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
3095 dnl unless we require an AC_DEFUNed macro:
3096 AC_REQUIRE([LTOPTIONS_VERSION])dnl
3097 AC_REQUIRE([LTSUGAR_VERSION])dnl
3098 AC_REQUIRE([LTVERSION_VERSION])dnl
3099 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
3100 m4_require([_LT_PROG_LTMAIN])dnl
3102 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
3104 dnl Parse OPTIONS
3105 _LT_SET_OPTIONS([$0], [$1])
3107 # This can be used to rebuild libtool when needed
3108 LIBTOOL_DEPS="$ltmain"
3110 # Always use our own libtool.
3111 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3112 AC_SUBST(LIBTOOL)dnl
3114 _LT_SETUP
3116 # Only expand once:
3117 m4_define([LT_INIT])
3118 ])# LT_INIT
3120 # Old names:
3121 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
3122 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
3123 dnl aclocal-1.4 backwards compatibility:
3124 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
3125 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
3128 # _LT_CC_BASENAME(CC)
3129 # -------------------
3130 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
3131 m4_defun([_LT_CC_BASENAME],
3132 [for cc_temp in $1""; do
3133   case $cc_temp in
3134     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
3135     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
3136     \-*) ;;
3137     *) break;;
3138   esac
3139 done
3140 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
3144 # _LT_FILEUTILS_DEFAULTS
3145 # ----------------------
3146 # It is okay to use these file commands and assume they have been set
3147 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
3148 m4_defun([_LT_FILEUTILS_DEFAULTS],
3149 [: ${CP="cp -f"}
3150 : ${MV="mv -f"}
3151 : ${RM="rm -f"}
3152 ])# _LT_FILEUTILS_DEFAULTS
3155 # _LT_SETUP
3156 # ---------
3157 m4_defun([_LT_SETUP],
3158 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3159 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3160 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
3161 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
3163 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
3165 _LT_DECL([], [host_alias], [0], [The host system])dnl
3166 _LT_DECL([], [host], [0])dnl
3167 _LT_DECL([], [host_os], [0])dnl
3169 _LT_DECL([], [build_alias], [0], [The build system])dnl
3170 _LT_DECL([], [build], [0])dnl
3171 _LT_DECL([], [build_os], [0])dnl
3173 AC_REQUIRE([AC_PROG_CC])dnl
3174 AC_REQUIRE([LT_PATH_LD])dnl
3175 AC_REQUIRE([LT_PATH_NM])dnl
3177 AC_REQUIRE([AC_PROG_LN_S])dnl
3178 test -z "$LN_S" && LN_S="ln -s"
3179 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
3181 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
3182 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
3183 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
3185 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3186 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3187 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
3188 m4_require([_LT_CMD_RELOAD])dnl
3189 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
3190 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
3191 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
3192 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3193 m4_require([_LT_WITH_SYSROOT])dnl
3195 _LT_CONFIG_LIBTOOL_INIT([
3196 # See if we are running on zsh, and set the options which allow our
3197 # commands through without removal of \ escapes INIT.
3198 if test -n "\${ZSH_VERSION+set}" ; then
3199    setopt NO_GLOB_SUBST
3202 if test -n "${ZSH_VERSION+set}" ; then
3203    setopt NO_GLOB_SUBST
3206 _LT_CHECK_OBJDIR
3208 m4_require([_LT_TAG_COMPILER])dnl
3210 case $host_os in
3211 aix3*)
3212   # AIX sometimes has problems with the GCC collect2 program.  For some
3213   # reason, if we set the COLLECT_NAMES environment variable, the problems
3214   # vanish in a puff of smoke.
3215   if test "X${COLLECT_NAMES+set}" != Xset; then
3216     COLLECT_NAMES=
3217     export COLLECT_NAMES
3218   fi
3219   ;;
3220 esac
3222 # Global variables:
3223 ofile=libtool
3224 can_build_shared=yes
3226 # All known linkers require a `.a' archive for static linking (except MSVC,
3227 # which needs '.lib').
3228 libext=a
3230 with_gnu_ld="$lt_cv_prog_gnu_ld"
3232 old_CC="$CC"
3233 old_CFLAGS="$CFLAGS"
3235 # Set sane defaults for various variables
3236 test -z "$CC" && CC=cc
3237 test -z "$LTCC" && LTCC=$CC
3238 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
3239 test -z "$LD" && LD=ld
3240 test -z "$ac_objext" && ac_objext=o
3242 _LT_CC_BASENAME([$compiler])
3244 # Only perform the check for file, if the check method requires it
3245 test -z "$MAGIC_CMD" && MAGIC_CMD=file
3246 case $deplibs_check_method in
3247 file_magic*)
3248   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3249     _LT_PATH_MAGIC
3250   fi
3251   ;;
3252 esac
3254 # Use C for the default configuration in the libtool script
3255 LT_SUPPORTED_TAG([CC])
3256 _LT_LANG_C_CONFIG
3257 _LT_LANG_DEFAULT_CONFIG
3258 _LT_CONFIG_COMMANDS
3259 ])# _LT_SETUP
3262 # _LT_PREPARE_SED_QUOTE_VARS
3263 # --------------------------
3264 # Define a few sed substitution that help us do robust quoting.
3265 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
3266 [# Backslashify metacharacters that are still active within
3267 # double-quoted strings.
3268 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
3270 # Same as above, but do not quote variable references.
3271 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
3273 # Sed substitution to delay expansion of an escaped shell variable in a
3274 # double_quote_subst'ed string.
3275 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3277 # Sed substitution to delay expansion of an escaped single quote.
3278 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3280 # Sed substitution to avoid accidental globbing in evaled expressions
3281 no_glob_subst='s/\*/\\\*/g'
3284 # _LT_PROG_LTMAIN
3285 # ---------------
3286 # Note that this code is called both from `configure', and `config.status'
3287 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
3288 # `config.status' has no value for ac_aux_dir unless we are using Automake,
3289 # so we pass a copy along to make sure it has a sensible value anyway.
3290 m4_defun([_LT_PROG_LTMAIN],
3291 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
3292 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
3293 ltmain="$ac_aux_dir/ltmain.sh"
3294 ])# _LT_PROG_LTMAIN
3297 ## ------------------------------------- ##
3298 ## Accumulate code for creating libtool. ##
3299 ## ------------------------------------- ##
3301 # So that we can recreate a full libtool script including additional
3302 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
3303 # in macros and then make a single call at the end using the `libtool'
3304 # label.
3307 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3308 # ----------------------------------------
3309 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3310 m4_define([_LT_CONFIG_LIBTOOL_INIT],
3311 [m4_ifval([$1],
3312           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3313                      [$1
3314 ])])])
3316 # Initialize.
3317 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
3320 # _LT_CONFIG_LIBTOOL([COMMANDS])
3321 # ------------------------------
3322 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3323 m4_define([_LT_CONFIG_LIBTOOL],
3324 [m4_ifval([$1],
3325           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3326                      [$1
3327 ])])])
3329 # Initialize.
3330 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3333 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3334 # -----------------------------------------------------
3335 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
3336 [_LT_CONFIG_LIBTOOL([$1])
3337 _LT_CONFIG_LIBTOOL_INIT([$2])
3341 # _LT_FORMAT_COMMENT([COMMENT])
3342 # -----------------------------
3343 # Add leading comment marks to the start of each line, and a trailing
3344 # full-stop to the whole comment if one is not present already.
3345 m4_define([_LT_FORMAT_COMMENT],
3346 [m4_ifval([$1], [
3347 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3348               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3353 ## ------------------------ ##
3354 ## FIXME: Eliminate VARNAME ##
3355 ## ------------------------ ##
3358 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3359 # -------------------------------------------------------------------
3360 # CONFIGNAME is the name given to the value in the libtool script.
3361 # VARNAME is the (base) name used in the configure script.
3362 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3363 # VARNAME.  Any other value will be used directly.
3364 m4_define([_LT_DECL],
3365 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3366     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3367         [m4_ifval([$1], [$1], [$2])])
3368     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3369     m4_ifval([$4],
3370         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3371     lt_dict_add_subkey([lt_decl_dict], [$2],
3372         [tagged?], [m4_ifval([$5], [yes], [no])])])
3376 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3377 # --------------------------------------------------------
3378 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3381 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3382 # ------------------------------------------------
3383 m4_define([lt_decl_tag_varnames],
3384 [_lt_decl_filter([tagged?], [yes], $@)])
3387 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3388 # ---------------------------------------------------------
3389 m4_define([_lt_decl_filter],
3390 [m4_case([$#],
3391   [0], [m4_fatal([$0: too few arguments: $#])],
3392   [1], [m4_fatal([$0: too few arguments: $#: $1])],
3393   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3394   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3395   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3399 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3400 # --------------------------------------------------
3401 m4_define([lt_decl_quote_varnames],
3402 [_lt_decl_filter([value], [1], $@)])
3405 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
3406 # ---------------------------------------------------
3407 m4_define([lt_decl_dquote_varnames],
3408 [_lt_decl_filter([value], [2], $@)])
3411 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
3412 # ---------------------------------------------------
3413 m4_define([lt_decl_varnames_tagged],
3414 [m4_assert([$# <= 2])dnl
3415 _$0(m4_quote(m4_default([$1], [[, ]])),
3416     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
3417     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
3418 m4_define([_lt_decl_varnames_tagged],
3419 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
3422 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
3423 # ------------------------------------------------
3424 m4_define([lt_decl_all_varnames],
3425 [_$0(m4_quote(m4_default([$1], [[, ]])),
3426      m4_if([$2], [],
3427            m4_quote(lt_decl_varnames),
3428         m4_quote(m4_shift($@))))[]dnl
3430 m4_define([_lt_decl_all_varnames],
3431 [lt_join($@, lt_decl_varnames_tagged([$1],
3432                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
3436 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
3437 # ------------------------------------
3438 # Quote a variable value, and forward it to `config.status' so that its
3439 # declaration there will have the same value as in `configure'.  VARNAME
3440 # must have a single quote delimited value for this to work.
3441 m4_define([_LT_CONFIG_STATUS_DECLARE],
3442 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
3445 # _LT_CONFIG_STATUS_DECLARATIONS
3446 # ------------------------------
3447 # We delimit libtool config variables with single quotes, so when
3448 # we write them to config.status, we have to be sure to quote all
3449 # embedded single quotes properly.  In configure, this macro expands
3450 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
3452 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
3453 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
3454 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
3455     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
3458 # _LT_LIBTOOL_TAGS
3459 # ----------------
3460 # Output comment and list of tags supported by the script
3461 m4_defun([_LT_LIBTOOL_TAGS],
3462 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
3463 available_tags="_LT_TAGS"dnl
3467 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
3468 # -----------------------------------
3469 # Extract the dictionary values for VARNAME (optionally with TAG) and
3470 # expand to a commented shell variable setting:
3472 #    # Some comment about what VAR is for.
3473 #    visible_name=$lt_internal_name
3474 m4_define([_LT_LIBTOOL_DECLARE],
3475 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
3476                                            [description])))[]dnl
3477 m4_pushdef([_libtool_name],
3478     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
3479 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
3480     [0], [_libtool_name=[$]$1],
3481     [1], [_libtool_name=$lt_[]$1],
3482     [2], [_libtool_name=$lt_[]$1],
3483     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
3484 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
3488 # _LT_LIBTOOL_CONFIG_VARS
3489 # -----------------------
3490 # Produce commented declarations of non-tagged libtool config variables
3491 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
3492 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
3493 # section) are produced by _LT_LIBTOOL_TAG_VARS.
3494 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
3495 [m4_foreach([_lt_var],
3496     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
3497     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
3500 # _LT_LIBTOOL_TAG_VARS(TAG)
3501 # -------------------------
3502 m4_define([_LT_LIBTOOL_TAG_VARS],
3503 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
3504     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
3507 # _LT_TAGVAR(VARNAME, [TAGNAME])
3508 # ------------------------------
3509 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
3512 # _LT_CONFIG_COMMANDS
3513 # -------------------
3514 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
3515 # variables for single and double quote escaping we saved from calls
3516 # to _LT_DECL, we can put quote escaped variables declarations
3517 # into `config.status', and then the shell code to quote escape them in
3518 # for loops in `config.status'.  Finally, any additional code accumulated
3519 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
3520 m4_defun([_LT_CONFIG_COMMANDS],
3521 [AC_PROVIDE_IFELSE([LT_OUTPUT],
3522         dnl If the libtool generation code has been placed in $CONFIG_LT,
3523         dnl instead of duplicating it all over again into config.status,
3524         dnl then we will have config.status run $CONFIG_LT later, so it
3525         dnl needs to know what name is stored there:
3526         [AC_CONFIG_COMMANDS([libtool],
3527             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
3528     dnl If the libtool generation code is destined for config.status,
3529     dnl expand the accumulated commands and init code now:
3530     [AC_CONFIG_COMMANDS([libtool],
3531         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
3532 ])#_LT_CONFIG_COMMANDS
3535 # Initialize.
3536 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
3539 # The HP-UX ksh and POSIX shell print the target directory to stdout
3540 # if CDPATH is set.
3541 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3543 sed_quote_subst='$sed_quote_subst'
3544 double_quote_subst='$double_quote_subst'
3545 delay_variable_subst='$delay_variable_subst'
3546 _LT_CONFIG_STATUS_DECLARATIONS
3547 LTCC='$LTCC'
3548 LTCFLAGS='$LTCFLAGS'
3549 compiler='$compiler_DEFAULT'
3551 # A function that is used when there is no print builtin or printf.
3552 func_fallback_echo ()
3554   eval 'cat <<_LTECHO_EOF
3555 \$[]1
3556 _LTECHO_EOF'
3559 # Quote evaled strings.
3560 for var in lt_decl_all_varnames([[ \
3561 ]], lt_decl_quote_varnames); do
3562     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3563     *[[\\\\\\\`\\"\\\$]]*)
3564       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
3565       ;;
3566     *)
3567       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3568       ;;
3569     esac
3570 done
3572 # Double-quote double-evaled strings.
3573 for var in lt_decl_all_varnames([[ \
3574 ]], lt_decl_dquote_varnames); do
3575     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3576     *[[\\\\\\\`\\"\\\$]]*)
3577       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
3578       ;;
3579     *)
3580       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3581       ;;
3582     esac
3583 done
3585 _LT_OUTPUT_LIBTOOL_INIT
3588 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
3589 # ------------------------------------
3590 # Generate a child script FILE with all initialization necessary to
3591 # reuse the environment learned by the parent script, and make the
3592 # file executable.  If COMMENT is supplied, it is inserted after the
3593 # `#!' sequence but before initialization text begins.  After this
3594 # macro, additional text can be appended to FILE to form the body of
3595 # the child script.  The macro ends with non-zero status if the
3596 # file could not be fully written (such as if the disk is full).
3597 m4_ifdef([AS_INIT_GENERATED],
3598 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
3599 [m4_defun([_LT_GENERATED_FILE_INIT],
3600 [m4_require([AS_PREPARE])]dnl
3601 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
3602 [lt_write_fail=0
3603 cat >$1 <<_ASEOF || lt_write_fail=1
3604 #! $SHELL
3605 # Generated by $as_me.
3607 SHELL=\${CONFIG_SHELL-$SHELL}
3608 export SHELL
3609 _ASEOF
3610 cat >>$1 <<\_ASEOF || lt_write_fail=1
3611 AS_SHELL_SANITIZE
3612 _AS_PREPARE
3613 exec AS_MESSAGE_FD>&1
3614 _ASEOF
3615 test $lt_write_fail = 0 && chmod +x $1[]dnl
3616 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
3618 # LT_OUTPUT
3619 # ---------
3620 # This macro allows early generation of the libtool script (before
3621 # AC_OUTPUT is called), incase it is used in configure for compilation
3622 # tests.
3623 AC_DEFUN([LT_OUTPUT],
3624 [: ${CONFIG_LT=./config.lt}
3625 AC_MSG_NOTICE([creating $CONFIG_LT])
3626 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
3627 [# Run this file to recreate a libtool stub with the current configuration.])
3629 cat >>"$CONFIG_LT" <<\_LTEOF
3630 lt_cl_silent=false
3631 exec AS_MESSAGE_LOG_FD>>config.log
3633   echo
3634   AS_BOX([Running $as_me.])
3635 } >&AS_MESSAGE_LOG_FD
3637 lt_cl_help="\
3638 \`$as_me' creates a local libtool stub from the current configuration,
3639 for use in further configure time tests before the real libtool is
3640 generated.
3642 Usage: $[0] [[OPTIONS]]
3644   -h, --help      print this help, then exit
3645   -V, --version   print version number, then exit
3646   -q, --quiet     do not print progress messages
3647   -d, --debug     don't remove temporary files
3649 Report bugs to <bug-libtool@gnu.org>."
3651 lt_cl_version="\
3652 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
3653 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
3654 configured by $[0], generated by m4_PACKAGE_STRING.
3656 Copyright (C) 2011 Free Software Foundation, Inc.
3657 This config.lt script is free software; the Free Software Foundation
3658 gives unlimited permision to copy, distribute and modify it."
3660 while test $[#] != 0
3662   case $[1] in
3663     --version | --v* | -V )
3664       echo "$lt_cl_version"; exit 0 ;;
3665     --help | --h* | -h )
3666       echo "$lt_cl_help"; exit 0 ;;
3667     --debug | --d* | -d )
3668       debug=: ;;
3669     --quiet | --q* | --silent | --s* | -q )
3670       lt_cl_silent=: ;;
3672     -*) AC_MSG_ERROR([unrecognized option: $[1]
3673 Try \`$[0] --help' for more information.]) ;;
3675     *) AC_MSG_ERROR([unrecognized argument: $[1]
3676 Try \`$[0] --help' for more information.]) ;;
3677   esac
3678   shift
3679 done
3681 if $lt_cl_silent; then
3682   exec AS_MESSAGE_FD>/dev/null
3684 _LTEOF
3686 cat >>"$CONFIG_LT" <<_LTEOF
3687 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3688 _LTEOF
3690 cat >>"$CONFIG_LT" <<\_LTEOF
3691 AC_MSG_NOTICE([creating $ofile])
3692 _LT_OUTPUT_LIBTOOL_COMMANDS
3693 AS_EXIT(0)
3694 _LTEOF
3695 chmod +x "$CONFIG_LT"
3697 # configure is writing to config.log, but config.lt does its own redirection,
3698 # appending to config.log, which fails on DOS, as config.log is still kept
3699 # open by configure.  Here we exec the FD to /dev/null, effectively closing
3700 # config.log, so it can be properly (re)opened and appended to by config.lt.
3701 lt_cl_success=:
3702 test "$silent" = yes &&
3703   lt_config_lt_args="$lt_config_lt_args --quiet"
3704 exec AS_MESSAGE_LOG_FD>/dev/null
3705 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3706 exec AS_MESSAGE_LOG_FD>>config.log
3707 $lt_cl_success || AS_EXIT(1)
3708 ])# LT_OUTPUT
3711 # _LT_CONFIG(TAG)
3712 # ---------------
3713 # If TAG is the built-in tag, create an initial libtool script with a
3714 # default configuration from the untagged config vars.  Otherwise add code
3715 # to config.status for appending the configuration named by TAG from the
3716 # matching tagged config vars.
3717 m4_defun([_LT_CONFIG],
3718 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3719 _LT_CONFIG_SAVE_COMMANDS([
3720   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3721   m4_if(_LT_TAG, [C], [
3722     # See if we are running on zsh, and set the options which allow our
3723     # commands through without removal of \ escapes.
3724     if test -n "${ZSH_VERSION+set}" ; then
3725       setopt NO_GLOB_SUBST
3726     fi
3728     cfgfile="${ofile}T"
3729     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3730     $RM "$cfgfile"
3732     cat <<_LT_EOF >> "$cfgfile"
3733 #! $SHELL
3735 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3736 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3737 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3738 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3740 _LT_COPYING
3741 _LT_LIBTOOL_TAGS
3743 # ### BEGIN LIBTOOL CONFIG
3744 _LT_LIBTOOL_CONFIG_VARS
3745 _LT_LIBTOOL_TAG_VARS
3746 # ### END LIBTOOL CONFIG
3748 _LT_EOF
3750   case $host_os in
3751   aix3*)
3752     cat <<\_LT_EOF >> "$cfgfile"
3753 # AIX sometimes has problems with the GCC collect2 program.  For some
3754 # reason, if we set the COLLECT_NAMES environment variable, the problems
3755 # vanish in a puff of smoke.
3756 if test "X${COLLECT_NAMES+set}" != Xset; then
3757   COLLECT_NAMES=
3758   export COLLECT_NAMES
3760 _LT_EOF
3761     ;;
3762   esac
3764   _LT_PROG_LTMAIN
3766   # We use sed instead of cat because bash on DJGPP gets confused if
3767   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3768   # text mode, it properly converts lines to CR/LF.  This bash problem
3769   # is reportedly fixed, but why not run on old versions too?
3770   sed '$q' "$ltmain" >> "$cfgfile" \
3771      || (rm -f "$cfgfile"; exit 1)
3773   _LT_PROG_REPLACE_SHELLFNS
3775    mv -f "$cfgfile" "$ofile" ||
3776     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3777   chmod +x "$ofile"
3779 [cat <<_LT_EOF >> "$ofile"
3781 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3782 dnl in a comment (ie after a #).
3783 # ### BEGIN LIBTOOL TAG CONFIG: $1
3784 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
3785 # ### END LIBTOOL TAG CONFIG: $1
3786 _LT_EOF
3787 ])dnl /m4_if
3789 [m4_if([$1], [], [
3790     PACKAGE='$PACKAGE'
3791     VERSION='$VERSION'
3792     TIMESTAMP='$TIMESTAMP'
3793     RM='$RM'
3794     ofile='$ofile'], [])
3795 ])dnl /_LT_CONFIG_SAVE_COMMANDS
3796 ])# _LT_CONFIG
3799 # LT_SUPPORTED_TAG(TAG)
3800 # ---------------------
3801 # Trace this macro to discover what tags are supported by the libtool
3802 # --tag option, using:
3803 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3804 AC_DEFUN([LT_SUPPORTED_TAG], [])
3807 # C support is built-in for now
3808 m4_define([_LT_LANG_C_enabled], [])
3809 m4_define([_LT_TAGS], [])
3812 # LT_LANG(LANG)
3813 # -------------
3814 # Enable libtool support for the given language if not already enabled.
3815 AC_DEFUN([LT_LANG],
3816 [AC_BEFORE([$0], [LT_OUTPUT])dnl
3817 m4_case([$1],
3818   [C],                  [_LT_LANG(C)],
3819   [C++],                [_LT_LANG(CXX)],
3820   [Go],                 [_LT_LANG(GO)],
3821   [Java],               [_LT_LANG(GCJ)],
3822   [Fortran 77],         [_LT_LANG(F77)],
3823   [Fortran],            [_LT_LANG(FC)],
3824   [Windows Resource],   [_LT_LANG(RC)],
3825   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3826     [_LT_LANG($1)],
3827     [m4_fatal([$0: unsupported language: "$1"])])])dnl
3828 ])# LT_LANG
3831 # _LT_LANG(LANGNAME)
3832 # ------------------
3833 m4_defun([_LT_LANG],
3834 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
3835   [LT_SUPPORTED_TAG([$1])dnl
3836   m4_append([_LT_TAGS], [$1 ])dnl
3837   m4_define([_LT_LANG_]$1[_enabled], [])dnl
3838   _LT_LANG_$1_CONFIG($1)])dnl
3839 ])# _LT_LANG
3842 m4_ifndef([AC_PROG_GO], [
3843 ############################################################
3844 # NOTE: This macro has been submitted for inclusion into   #
3845 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
3846 #  a released version of Autoconf we should remove this    #
3847 #  macro and use it instead.                               #
3848 ############################################################
3849 m4_defun([AC_PROG_GO],
3850 [AC_LANG_PUSH(Go)dnl
3851 AC_ARG_VAR([GOC],     [Go compiler command])dnl
3852 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
3853 _AC_ARG_VAR_LDFLAGS()dnl
3854 AC_CHECK_TOOL(GOC, gccgo)
3855 if test -z "$GOC"; then
3856   if test -n "$ac_tool_prefix"; then
3857     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
3858   fi
3860 if test -z "$GOC"; then
3861   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
3863 ])#m4_defun
3864 ])#m4_ifndef
3867 # _LT_LANG_DEFAULT_CONFIG
3868 # -----------------------
3869 m4_defun([_LT_LANG_DEFAULT_CONFIG],
3870 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
3871   [LT_LANG(CXX)],
3872   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3874 AC_PROVIDE_IFELSE([AC_PROG_F77],
3875   [LT_LANG(F77)],
3876   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3878 AC_PROVIDE_IFELSE([AC_PROG_FC],
3879   [LT_LANG(FC)],
3880   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3882 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3883 dnl pulling things in needlessly.
3884 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3885   [LT_LANG(GCJ)],
3886   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3887     [LT_LANG(GCJ)],
3888     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3889       [LT_LANG(GCJ)],
3890       [m4_ifdef([AC_PROG_GCJ],
3891         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3892        m4_ifdef([A][M_PROG_GCJ],
3893         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3894        m4_ifdef([LT_PROG_GCJ],
3895         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3897 AC_PROVIDE_IFELSE([AC_PROG_GO],
3898   [LT_LANG(GO)],
3899   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
3901 AC_PROVIDE_IFELSE([LT_PROG_RC],
3902   [LT_LANG(RC)],
3903   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3904 ])# _LT_LANG_DEFAULT_CONFIG
3906 # Obsolete macros:
3907 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3908 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3909 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3910 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3911 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3912 dnl aclocal-1.4 backwards compatibility:
3913 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3914 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3915 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3916 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3917 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3920 # _LT_TAG_COMPILER
3921 # ----------------
3922 m4_defun([_LT_TAG_COMPILER],
3923 [AC_REQUIRE([AC_PROG_CC])dnl
3925 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3926 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3927 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3928 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3930 # If no C compiler was specified, use CC.
3931 LTCC=${LTCC-"$CC"}
3933 # If no C compiler flags were specified, use CFLAGS.
3934 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3936 # Allow CC to be a program name with arguments.
3937 compiler=$CC
3938 ])# _LT_TAG_COMPILER
3941 # _LT_COMPILER_BOILERPLATE
3942 # ------------------------
3943 # Check for compiler boilerplate output or warnings with
3944 # the simple compiler test code.
3945 m4_defun([_LT_COMPILER_BOILERPLATE],
3946 [m4_require([_LT_DECL_SED])dnl
3947 ac_outfile=conftest.$ac_objext
3948 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3949 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3950 _lt_compiler_boilerplate=`cat conftest.err`
3951 $RM conftest*
3952 ])# _LT_COMPILER_BOILERPLATE
3955 # _LT_LINKER_BOILERPLATE
3956 # ----------------------
3957 # Check for linker boilerplate output or warnings with
3958 # the simple link test code.
3959 m4_defun([_LT_LINKER_BOILERPLATE],
3960 [m4_require([_LT_DECL_SED])dnl
3961 ac_outfile=conftest.$ac_objext
3962 echo "$lt_simple_link_test_code" >conftest.$ac_ext
3963 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3964 _lt_linker_boilerplate=`cat conftest.err`
3965 $RM -r conftest*
3966 ])# _LT_LINKER_BOILERPLATE
3968 # _LT_REQUIRED_DARWIN_CHECKS
3969 # -------------------------
3970 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3971   case $host_os in
3972     rhapsody* | darwin*)
3973     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3974     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3975     AC_CHECK_TOOL([LIPO], [lipo], [:])
3976     AC_CHECK_TOOL([OTOOL], [otool], [:])
3977     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3978     _LT_DECL([], [DSYMUTIL], [1],
3979       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3980     _LT_DECL([], [NMEDIT], [1],
3981       [Tool to change global to local symbols on Mac OS X])
3982     _LT_DECL([], [LIPO], [1],
3983       [Tool to manipulate fat objects and archives on Mac OS X])
3984     _LT_DECL([], [OTOOL], [1],
3985       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3986     _LT_DECL([], [OTOOL64], [1],
3987       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3989     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3990       [lt_cv_apple_cc_single_mod=no
3991       if test -z "${LT_MULTI_MODULE}"; then
3992         # By default we will add the -single_module flag. You can override
3993         # by either setting the environment variable LT_MULTI_MODULE
3994         # non-empty at configure time, or by adding -multi_module to the
3995         # link flags.
3996         rm -rf libconftest.dylib*
3997         echo "int foo(void){return 1;}" > conftest.c
3998         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3999 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
4000         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4001           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
4002         _lt_result=$?
4003         # If there is a non-empty error log, and "single_module"
4004         # appears in it, assume the flag caused a linker warning
4005         if test -s conftest.err && $GREP single_module conftest.err; then
4006           cat conftest.err >&AS_MESSAGE_LOG_FD
4007         # Otherwise, if the output was created with a 0 exit code from
4008         # the compiler, it worked.
4009         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
4010           lt_cv_apple_cc_single_mod=yes
4011         else
4012           cat conftest.err >&AS_MESSAGE_LOG_FD
4013         fi
4014         rm -rf libconftest.dylib*
4015         rm -f conftest.*
4016       fi])
4018     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
4019       [lt_cv_ld_exported_symbols_list],
4020       [lt_cv_ld_exported_symbols_list=no
4021       save_LDFLAGS=$LDFLAGS
4022       echo "_main" > conftest.sym
4023       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
4024       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4025         [lt_cv_ld_exported_symbols_list=yes],
4026         [lt_cv_ld_exported_symbols_list=no])
4027         LDFLAGS="$save_LDFLAGS"
4028     ])
4030     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
4031       [lt_cv_ld_force_load=no
4032       cat > conftest.c << _LT_EOF
4033 int forced_loaded() { return 2;}
4034 _LT_EOF
4035       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
4036       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
4037       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
4038       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
4039       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
4040       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
4041       cat > conftest.c << _LT_EOF
4042 int main() { return 0;}
4043 _LT_EOF
4044       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
4045       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
4046       _lt_result=$?
4047       if test -s conftest.err && $GREP force_load conftest.err; then
4048         cat conftest.err >&AS_MESSAGE_LOG_FD
4049       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
4050         lt_cv_ld_force_load=yes
4051       else
4052         cat conftest.err >&AS_MESSAGE_LOG_FD
4053       fi
4054         rm -f conftest.err libconftest.a conftest conftest.c
4055         rm -rf conftest.dSYM
4056     ])
4057     case $host_os in
4058     rhapsody* | darwin1.[[012]])
4059       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
4060     darwin1.*)
4061       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
4062     darwin*) # darwin 5.x on
4063       # if running on 10.5 or later, the deployment target defaults
4064       # to the OS version, if on x86, and 10.4, the deployment
4065       # target defaults to 10.4. Don't you love it?
4066       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
4067         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
4068           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
4069         10.[[012]]*)
4070           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
4071         10.*)
4072           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
4073       esac
4074     ;;
4075   esac
4076     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
4077       _lt_dar_single_mod='$single_module'
4078     fi
4079     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
4080       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
4081     else
4082       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
4083     fi
4084     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
4085       _lt_dsymutil='~$DSYMUTIL $lib || :'
4086     else
4087       _lt_dsymutil=
4088     fi
4089     ;;
4090   esac
4094 # _LT_DARWIN_LINKER_FEATURES([TAG])
4095 # ---------------------------------
4096 # Checks for linker and compiler features on darwin
4097 m4_defun([_LT_DARWIN_LINKER_FEATURES],
4099   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
4100   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4101   _LT_TAGVAR(hardcode_direct, $1)=no
4102   _LT_TAGVAR(hardcode_automatic, $1)=yes
4103   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4104   if test "$lt_cv_ld_force_load" = "yes"; then
4105     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
4106     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
4107                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
4108   else
4109     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4110   fi
4111   _LT_TAGVAR(link_all_deplibs, $1)=yes
4112   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
4113   case $cc_basename in
4114      ifort*) _lt_dar_can_shared=yes ;;
4115      *) _lt_dar_can_shared=$GCC ;;
4116   esac
4117   if test "$_lt_dar_can_shared" = "yes"; then
4118     output_verbose_link_cmd=func_echo_all
4119     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
4120     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
4121     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
4122     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
4123     m4_if([$1], [CXX],
4124 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
4125       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
4126       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
4127     fi
4128 ],[])
4129   else
4130   _LT_TAGVAR(ld_shlibs, $1)=no
4131   fi
4134 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
4135 # ----------------------------------
4136 # Links a minimal program and checks the executable
4137 # for the system default hardcoded library path. In most cases,
4138 # this is /usr/lib:/lib, but when the MPI compilers are used
4139 # the location of the communication and MPI libs are included too.
4140 # If we don't find anything, use the default library path according
4141 # to the aix ld manual.
4142 # Store the results from the different compilers for each TAGNAME.
4143 # Allow to override them for all tags through lt_cv_aix_libpath.
4144 m4_defun([_LT_SYS_MODULE_PATH_AIX],
4145 [m4_require([_LT_DECL_SED])dnl
4146 if test "${lt_cv_aix_libpath+set}" = set; then
4147   aix_libpath=$lt_cv_aix_libpath
4148 else
4149   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
4150   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
4151   lt_aix_libpath_sed='[
4152       /Import File Strings/,/^$/ {
4153           /^0/ {
4154               s/^0  *\([^ ]*\) *$/\1/
4155               p
4156           }
4157       }]'
4158   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4159   # Check for a 64-bit object if we didn't find anything.
4160   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4161     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4162   fi],[])
4163   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4164     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
4165   fi
4166   ])
4167   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
4169 ])# _LT_SYS_MODULE_PATH_AIX
4172 # _LT_SHELL_INIT(ARG)
4173 # -------------------
4174 m4_define([_LT_SHELL_INIT],
4175 [m4_divert_text([M4SH-INIT], [$1
4176 ])])# _LT_SHELL_INIT
4180 # _LT_PROG_ECHO_BACKSLASH
4181 # -----------------------
4182 # Find how we can fake an echo command that does not interpret backslash.
4183 # In particular, with Autoconf 2.60 or later we add some code to the start
4184 # of the generated configure script which will find a shell with a builtin
4185 # printf (which we can use as an echo command).
4186 m4_defun([_LT_PROG_ECHO_BACKSLASH],
4187 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4188 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4189 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4191 AC_MSG_CHECKING([how to print strings])
4192 # Test print first, because it will be a builtin if present.
4193 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4194    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4195   ECHO='print -r --'
4196 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4197   ECHO='printf %s\n'
4198 else
4199   # Use this function as a fallback that always works.
4200   func_fallback_echo ()
4201   {
4202     eval 'cat <<_LTECHO_EOF
4203 $[]1
4204 _LTECHO_EOF'
4205   }
4206   ECHO='func_fallback_echo'
4209 # func_echo_all arg...
4210 # Invoke $ECHO with all args, space-separated.
4211 func_echo_all ()
4213     $ECHO "$*" 
4216 case "$ECHO" in
4217   printf*) AC_MSG_RESULT([printf]) ;;
4218   print*) AC_MSG_RESULT([print -r]) ;;
4219   *) AC_MSG_RESULT([cat]) ;;
4220 esac
4222 m4_ifdef([_AS_DETECT_SUGGESTED],
4223 [_AS_DETECT_SUGGESTED([
4224   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
4225     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4226     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4227     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4228     PATH=/empty FPATH=/empty; export PATH FPATH
4229     test "X`printf %s $ECHO`" = "X$ECHO" \
4230       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
4232 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
4233 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
4234 ])# _LT_PROG_ECHO_BACKSLASH
4237 # _LT_WITH_SYSROOT
4238 # ----------------
4239 AC_DEFUN([_LT_WITH_SYSROOT],
4240 [AC_MSG_CHECKING([for sysroot])
4241 AC_ARG_WITH([sysroot],
4242 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
4243                         (or the compiler's sysroot if not specified).],
4244 [], [with_sysroot=no])
4246 dnl lt_sysroot will always be passed unquoted.  We quote it here
4247 dnl in case the user passed a directory name.
4248 lt_sysroot=
4249 case ${with_sysroot} in #(
4250  yes)
4251    if test "$GCC" = yes; then
4252      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
4253    fi
4254    ;; #(
4255  /*)
4256    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
4257    ;; #(
4258  no|'')
4259    ;; #(
4260  *)
4261    AC_MSG_RESULT([${with_sysroot}])
4262    AC_MSG_ERROR([The sysroot must be an absolute path.])
4263    ;;
4264 esac
4266  AC_MSG_RESULT([${lt_sysroot:-no}])
4267 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
4268 [dependent libraries, and in which our libraries should be installed.])])
4270 # _LT_ENABLE_LOCK
4271 # ---------------
4272 m4_defun([_LT_ENABLE_LOCK],
4273 [AC_ARG_ENABLE([libtool-lock],
4274   [AS_HELP_STRING([--disable-libtool-lock],
4275     [avoid locking (might break parallel builds)])])
4276 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4278 # Some flags need to be propagated to the compiler or linker for good
4279 # libtool support.
4280 case $host in
4281 ia64-*-hpux*)
4282   # Find out which ABI we are using.
4283   echo 'int i;' > conftest.$ac_ext
4284   if AC_TRY_EVAL(ac_compile); then
4285     case `/usr/bin/file conftest.$ac_objext` in
4286       *ELF-32*)
4287         HPUX_IA64_MODE="32"
4288         ;;
4289       *ELF-64*)
4290         HPUX_IA64_MODE="64"
4291         ;;
4292     esac
4293   fi
4294   rm -rf conftest*
4295   ;;
4296 *-*-irix6*)
4297   # Find out which ABI we are using.
4298   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
4299   if AC_TRY_EVAL(ac_compile); then
4300     if test "$lt_cv_prog_gnu_ld" = yes; then
4301       case `/usr/bin/file conftest.$ac_objext` in
4302         *32-bit*)
4303           LD="${LD-ld} -melf32bsmip"
4304           ;;
4305         *N32*)
4306           LD="${LD-ld} -melf32bmipn32"
4307           ;;
4308         *64-bit*)
4309           LD="${LD-ld} -melf64bmip"
4310         ;;
4311       esac
4312     else
4313       case `/usr/bin/file conftest.$ac_objext` in
4314         *32-bit*)
4315           LD="${LD-ld} -32"
4316           ;;
4317         *N32*)
4318           LD="${LD-ld} -n32"
4319           ;;
4320         *64-bit*)
4321           LD="${LD-ld} -64"
4322           ;;
4323       esac
4324     fi
4325   fi
4326   rm -rf conftest*
4327   ;;
4329 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
4330 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
4331   # Find out which ABI we are using.
4332   echo 'int i;' > conftest.$ac_ext
4333   if AC_TRY_EVAL(ac_compile); then
4334     case `/usr/bin/file conftest.o` in
4335       *32-bit*)
4336         case $host in
4337           x86_64-*kfreebsd*-gnu)
4338             LD="${LD-ld} -m elf_i386_fbsd"
4339             ;;
4340           x86_64-*linux*)
4341             LD="${LD-ld} -m elf_i386"
4342             ;;
4343           ppc64-*linux*|powerpc64-*linux*)
4344             LD="${LD-ld} -m elf32ppclinux"
4345             ;;
4346           s390x-*linux*)
4347             LD="${LD-ld} -m elf_s390"
4348             ;;
4349           sparc64-*linux*)
4350             LD="${LD-ld} -m elf32_sparc"
4351             ;;
4352         esac
4353         ;;
4354       *64-bit*)
4355         case $host in
4356           x86_64-*kfreebsd*-gnu)
4357             LD="${LD-ld} -m elf_x86_64_fbsd"
4358             ;;
4359           x86_64-*linux*)
4360             LD="${LD-ld} -m elf_x86_64"
4361             ;;
4362           ppc*-*linux*|powerpc*-*linux*)
4363             LD="${LD-ld} -m elf64ppc"
4364             ;;
4365           s390*-*linux*|s390*-*tpf*)
4366             LD="${LD-ld} -m elf64_s390"
4367             ;;
4368           sparc*-*linux*)
4369             LD="${LD-ld} -m elf64_sparc"
4370             ;;
4371         esac
4372         ;;
4373     esac
4374   fi
4375   rm -rf conftest*
4376   ;;
4378 *-*-sco3.2v5*)
4379   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4380   SAVE_CFLAGS="$CFLAGS"
4381   CFLAGS="$CFLAGS -belf"
4382   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
4383     [AC_LANG_PUSH(C)
4384      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
4385      AC_LANG_POP])
4386   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4387     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4388     CFLAGS="$SAVE_CFLAGS"
4389   fi
4390   ;;
4391 *-*solaris*)
4392   # Find out which ABI we are using.
4393   echo 'int i;' > conftest.$ac_ext
4394   if AC_TRY_EVAL(ac_compile); then
4395     case `/usr/bin/file conftest.o` in
4396     *64-bit*)
4397       case $lt_cv_prog_gnu_ld in
4398       yes*)
4399         case $host in
4400         i?86-*-solaris*)
4401           LD="${LD-ld} -m elf_x86_64"
4402           ;;
4403         sparc*-*-solaris*)
4404           LD="${LD-ld} -m elf64_sparc"
4405           ;;
4406         esac
4407         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
4408         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
4409           LD="${LD-ld}_sol2"
4410         fi
4411         ;;
4412       *)
4413         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
4414           LD="${LD-ld} -64"
4415         fi
4416         ;;
4417       esac
4418       ;;
4419     esac
4420   fi
4421   rm -rf conftest*
4422   ;;
4423 esac
4425 need_locks="$enable_libtool_lock"
4426 ])# _LT_ENABLE_LOCK
4429 # _LT_PROG_AR
4430 # -----------
4431 m4_defun([_LT_PROG_AR],
4432 [AC_CHECK_TOOLS(AR, [ar], false)
4433 : ${AR=ar}
4434 : ${AR_FLAGS=cru}
4435 _LT_DECL([], [AR], [1], [The archiver])
4436 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
4438 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
4439   [lt_cv_ar_at_file=no
4440    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
4441      [echo conftest.$ac_objext > conftest.lst
4442       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
4443       AC_TRY_EVAL([lt_ar_try])
4444       if test "$ac_status" -eq 0; then
4445         # Ensure the archiver fails upon bogus file names.
4446         rm -f conftest.$ac_objext libconftest.a
4447         AC_TRY_EVAL([lt_ar_try])
4448         if test "$ac_status" -ne 0; then
4449           lt_cv_ar_at_file=@
4450         fi
4451       fi
4452       rm -f conftest.* libconftest.a
4453      ])
4454   ])
4456 if test "x$lt_cv_ar_at_file" = xno; then
4457   archiver_list_spec=
4458 else
4459   archiver_list_spec=$lt_cv_ar_at_file
4461 _LT_DECL([], [archiver_list_spec], [1],
4462   [How to feed a file listing to the archiver])
4463 ])# _LT_PROG_AR
4466 # _LT_CMD_OLD_ARCHIVE
4467 # -------------------
4468 m4_defun([_LT_CMD_OLD_ARCHIVE],
4469 [_LT_PROG_AR
4471 AC_CHECK_TOOL(STRIP, strip, :)
4472 test -z "$STRIP" && STRIP=:
4473 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
4475 AC_CHECK_TOOL(RANLIB, ranlib, :)
4476 test -z "$RANLIB" && RANLIB=:
4477 _LT_DECL([], [RANLIB], [1],
4478     [Commands used to install an old-style archive])
4480 # Determine commands to create old-style static archives.
4481 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
4482 old_postinstall_cmds='chmod 644 $oldlib'
4483 old_postuninstall_cmds=
4485 if test -n "$RANLIB"; then
4486   case $host_os in
4487   openbsd*)
4488     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
4489     ;;
4490   *)
4491     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
4492     ;;
4493   esac
4494   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
4497 case $host_os in
4498   darwin*)
4499     lock_old_archive_extraction=yes ;;
4500   *)
4501     lock_old_archive_extraction=no ;;
4502 esac
4503 _LT_DECL([], [old_postinstall_cmds], [2])
4504 _LT_DECL([], [old_postuninstall_cmds], [2])
4505 _LT_TAGDECL([], [old_archive_cmds], [2],
4506     [Commands used to build an old-style archive])
4507 _LT_DECL([], [lock_old_archive_extraction], [0],
4508     [Whether to use a lock for old archive extraction])
4509 ])# _LT_CMD_OLD_ARCHIVE
4512 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
4513 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
4514 # ----------------------------------------------------------------
4515 # Check whether the given compiler option works
4516 AC_DEFUN([_LT_COMPILER_OPTION],
4517 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4518 m4_require([_LT_DECL_SED])dnl
4519 AC_CACHE_CHECK([$1], [$2],
4520   [$2=no
4521    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
4522    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4523    lt_compiler_flag="$3"
4524    # Insert the option either (1) after the last *FLAGS variable, or
4525    # (2) before a word containing "conftest.", or (3) at the end.
4526    # Note that $ac_compile itself does not contain backslashes and begins
4527    # with a dollar sign (not a hyphen), so the echo should work correctly.
4528    # The option is referenced via a variable to avoid confusing sed.
4529    lt_compile=`echo "$ac_compile" | $SED \
4530    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4531    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4532    -e 's:$: $lt_compiler_flag:'`
4533    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4534    (eval "$lt_compile" 2>conftest.err)
4535    ac_status=$?
4536    cat conftest.err >&AS_MESSAGE_LOG_FD
4537    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4538    if (exit $ac_status) && test -s "$ac_outfile"; then
4539      # The compiler can only warn and ignore the option if not recognized
4540      # So say no if there are warnings other than the usual output.
4541      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
4542      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
4543      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
4544        $2=yes
4545      fi
4546    fi
4547    $RM conftest*
4550 if test x"[$]$2" = xyes; then
4551     m4_if([$5], , :, [$5])
4552 else
4553     m4_if([$6], , :, [$6])
4555 ])# _LT_COMPILER_OPTION
4557 # Old name:
4558 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
4559 dnl aclocal-1.4 backwards compatibility:
4560 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
4563 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
4564 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
4565 # ----------------------------------------------------
4566 # Check whether the given linker option works
4567 AC_DEFUN([_LT_LINKER_OPTION],
4568 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4569 m4_require([_LT_DECL_SED])dnl
4570 AC_CACHE_CHECK([$1], [$2],
4571   [$2=no
4572    save_LDFLAGS="$LDFLAGS"
4573    LDFLAGS="$LDFLAGS $3"
4574    echo "$lt_simple_link_test_code" > conftest.$ac_ext
4575    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
4576      # The linker can only warn and ignore the option if not recognized
4577      # So say no if there are warnings
4578      if test -s conftest.err; then
4579        # Append any errors to the config.log.
4580        cat conftest.err 1>&AS_MESSAGE_LOG_FD
4581        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
4582        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
4583        if diff conftest.exp conftest.er2 >/dev/null; then
4584          $2=yes
4585        fi
4586      else
4587        $2=yes
4588      fi
4589    fi
4590    $RM -r conftest*
4591    LDFLAGS="$save_LDFLAGS"
4594 if test x"[$]$2" = xyes; then
4595     m4_if([$4], , :, [$4])
4596 else
4597     m4_if([$5], , :, [$5])
4599 ])# _LT_LINKER_OPTION
4601 # Old name:
4602 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
4603 dnl aclocal-1.4 backwards compatibility:
4604 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
4607 # LT_CMD_MAX_LEN
4608 #---------------
4609 AC_DEFUN([LT_CMD_MAX_LEN],
4610 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4611 # find the maximum length of command line arguments
4612 AC_MSG_CHECKING([the maximum length of command line arguments])
4613 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
4614   i=0
4615   teststring="ABCD"
4617   case $build_os in
4618   msdosdjgpp*)
4619     # On DJGPP, this test can blow up pretty badly due to problems in libc
4620     # (any single argument exceeding 2000 bytes causes a buffer overrun
4621     # during glob expansion).  Even if it were fixed, the result of this
4622     # check would be larger than it should be.
4623     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
4624     ;;
4626   gnu*)
4627     # Under GNU Hurd, this test is not required because there is
4628     # no limit to the length of command line arguments.
4629     # Libtool will interpret -1 as no limit whatsoever
4630     lt_cv_sys_max_cmd_len=-1;
4631     ;;
4633   cygwin* | mingw* | cegcc*)
4634     # On Win9x/ME, this test blows up -- it succeeds, but takes
4635     # about 5 minutes as the teststring grows exponentially.
4636     # Worse, since 9x/ME are not pre-emptively multitasking,
4637     # you end up with a "frozen" computer, even though with patience
4638     # the test eventually succeeds (with a max line length of 256k).
4639     # Instead, let's just punt: use the minimum linelength reported by
4640     # all of the supported platforms: 8192 (on NT/2K/XP).
4641     lt_cv_sys_max_cmd_len=8192;
4642     ;;
4644   mint*)
4645     # On MiNT this can take a long time and run out of memory.
4646     lt_cv_sys_max_cmd_len=8192;
4647     ;;
4649   amigaos*)
4650     # On AmigaOS with pdksh, this test takes hours, literally.
4651     # So we just punt and use a minimum line length of 8192.
4652     lt_cv_sys_max_cmd_len=8192;
4653     ;;
4655   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
4656     # This has been around since 386BSD, at least.  Likely further.
4657     if test -x /sbin/sysctl; then
4658       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4659     elif test -x /usr/sbin/sysctl; then
4660       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4661     else
4662       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
4663     fi
4664     # And add a safety zone
4665     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4666     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4667     ;;
4669   interix*)
4670     # We know the value 262144 and hardcode it with a safety zone (like BSD)
4671     lt_cv_sys_max_cmd_len=196608
4672     ;;
4674   os2*)
4675     # The test takes a long time on OS/2.
4676     lt_cv_sys_max_cmd_len=8192
4677     ;;
4679   osf*)
4680     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4681     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4682     # nice to cause kernel panics so lets avoid the loop below.
4683     # First set a reasonable default.
4684     lt_cv_sys_max_cmd_len=16384
4685     #
4686     if test -x /sbin/sysconfig; then
4687       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4688         *1*) lt_cv_sys_max_cmd_len=-1 ;;
4689       esac
4690     fi
4691     ;;
4692   sco3.2v5*)
4693     lt_cv_sys_max_cmd_len=102400
4694     ;;
4695   sysv5* | sco5v6* | sysv4.2uw2*)
4696     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4697     if test -n "$kargmax"; then
4698       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
4699     else
4700       lt_cv_sys_max_cmd_len=32768
4701     fi
4702     ;;
4703   *)
4704     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
4705     if test -n "$lt_cv_sys_max_cmd_len"; then
4706       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4707       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4708     else
4709       # Make teststring a little bigger before we do anything with it.
4710       # a 1K string should be a reasonable start.
4711       for i in 1 2 3 4 5 6 7 8 ; do
4712         teststring=$teststring$teststring
4713       done
4714       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4715       # If test is not a shell built-in, we'll probably end up computing a
4716       # maximum length that is only half of the actual maximum length, but
4717       # we can't tell.
4718       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
4719                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
4720               test $i != 17 # 1/2 MB should be enough
4721       do
4722         i=`expr $i + 1`
4723         teststring=$teststring$teststring
4724       done
4725       # Only check the string length outside the loop.
4726       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4727       teststring=
4728       # Add a significant safety factor because C++ compilers can tack on
4729       # massive amounts of additional arguments before passing them to the
4730       # linker.  It appears as though 1/2 is a usable value.
4731       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4732     fi
4733     ;;
4734   esac
4736 if test -n $lt_cv_sys_max_cmd_len ; then
4737   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
4738 else
4739   AC_MSG_RESULT(none)
4741 max_cmd_len=$lt_cv_sys_max_cmd_len
4742 _LT_DECL([], [max_cmd_len], [0],
4743     [What is the maximum length of a command?])
4744 ])# LT_CMD_MAX_LEN
4746 # Old name:
4747 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
4748 dnl aclocal-1.4 backwards compatibility:
4749 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
4752 # _LT_HEADER_DLFCN
4753 # ----------------
4754 m4_defun([_LT_HEADER_DLFCN],
4755 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
4756 ])# _LT_HEADER_DLFCN
4759 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
4760 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
4761 # ----------------------------------------------------------------
4762 m4_defun([_LT_TRY_DLOPEN_SELF],
4763 [m4_require([_LT_HEADER_DLFCN])dnl
4764 if test "$cross_compiling" = yes; then :
4765   [$4]
4766 else
4767   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4768   lt_status=$lt_dlunknown
4769   cat > conftest.$ac_ext <<_LT_EOF
4770 [#line $LINENO "configure"
4771 #include "confdefs.h"
4773 #if HAVE_DLFCN_H
4774 #include <dlfcn.h>
4775 #endif
4777 #include <stdio.h>
4779 #ifdef RTLD_GLOBAL
4780 #  define LT_DLGLOBAL           RTLD_GLOBAL
4781 #else
4782 #  ifdef DL_GLOBAL
4783 #    define LT_DLGLOBAL         DL_GLOBAL
4784 #  else
4785 #    define LT_DLGLOBAL         0
4786 #  endif
4787 #endif
4789 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4790    find out it does not work in some platform. */
4791 #ifndef LT_DLLAZY_OR_NOW
4792 #  ifdef RTLD_LAZY
4793 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
4794 #  else
4795 #    ifdef DL_LAZY
4796 #      define LT_DLLAZY_OR_NOW          DL_LAZY
4797 #    else
4798 #      ifdef RTLD_NOW
4799 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
4800 #      else
4801 #        ifdef DL_NOW
4802 #          define LT_DLLAZY_OR_NOW      DL_NOW
4803 #        else
4804 #          define LT_DLLAZY_OR_NOW      0
4805 #        endif
4806 #      endif
4807 #    endif
4808 #  endif
4809 #endif
4811 /* When -fvisbility=hidden is used, assume the code has been annotated
4812    correspondingly for the symbols needed.  */
4813 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4814 int fnord () __attribute__((visibility("default")));
4815 #endif
4817 int fnord () { return 42; }
4818 int main ()
4820   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4821   int status = $lt_dlunknown;
4823   if (self)
4824     {
4825       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4826       else
4827         {
4828           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
4829           else puts (dlerror ());
4830         }
4831       /* dlclose (self); */
4832     }
4833   else
4834     puts (dlerror ());
4836   return status;
4838 _LT_EOF
4839   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4840     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4841     lt_status=$?
4842     case x$lt_status in
4843       x$lt_dlno_uscore) $1 ;;
4844       x$lt_dlneed_uscore) $2 ;;
4845       x$lt_dlunknown|x*) $3 ;;
4846     esac
4847   else :
4848     # compilation failed
4849     $3
4850   fi
4852 rm -fr conftest*
4853 ])# _LT_TRY_DLOPEN_SELF
4856 # LT_SYS_DLOPEN_SELF
4857 # ------------------
4858 AC_DEFUN([LT_SYS_DLOPEN_SELF],
4859 [m4_require([_LT_HEADER_DLFCN])dnl
4860 if test "x$enable_dlopen" != xyes; then
4861   enable_dlopen=unknown
4862   enable_dlopen_self=unknown
4863   enable_dlopen_self_static=unknown
4864 else
4865   lt_cv_dlopen=no
4866   lt_cv_dlopen_libs=
4868   case $host_os in
4869   beos*)
4870     lt_cv_dlopen="load_add_on"
4871     lt_cv_dlopen_libs=
4872     lt_cv_dlopen_self=yes
4873     ;;
4875   mingw* | pw32* | cegcc*)
4876     lt_cv_dlopen="LoadLibrary"
4877     lt_cv_dlopen_libs=
4878     ;;
4880   cygwin*)
4881     lt_cv_dlopen="dlopen"
4882     lt_cv_dlopen_libs=
4883     ;;
4885   darwin*)
4886   # if libdl is installed we need to link against it
4887     AC_CHECK_LIB([dl], [dlopen],
4888                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4889     lt_cv_dlopen="dyld"
4890     lt_cv_dlopen_libs=
4891     lt_cv_dlopen_self=yes
4892     ])
4893     ;;
4895   *)
4896     AC_CHECK_FUNC([shl_load],
4897           [lt_cv_dlopen="shl_load"],
4898       [AC_CHECK_LIB([dld], [shl_load],
4899             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4900         [AC_CHECK_FUNC([dlopen],
4901               [lt_cv_dlopen="dlopen"],
4902           [AC_CHECK_LIB([dl], [dlopen],
4903                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4904             [AC_CHECK_LIB([svld], [dlopen],
4905                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4906               [AC_CHECK_LIB([dld], [dld_link],
4907                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4908               ])
4909             ])
4910           ])
4911         ])
4912       ])
4913     ;;
4914   esac
4916   if test "x$lt_cv_dlopen" != xno; then
4917     enable_dlopen=yes
4918   else
4919     enable_dlopen=no
4920   fi
4922   case $lt_cv_dlopen in
4923   dlopen)
4924     save_CPPFLAGS="$CPPFLAGS"
4925     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4927     save_LDFLAGS="$LDFLAGS"
4928     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4930     save_LIBS="$LIBS"
4931     LIBS="$lt_cv_dlopen_libs $LIBS"
4933     AC_CACHE_CHECK([whether a program can dlopen itself],
4934           lt_cv_dlopen_self, [dnl
4935           _LT_TRY_DLOPEN_SELF(
4936             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4937             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4938     ])
4940     if test "x$lt_cv_dlopen_self" = xyes; then
4941       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4942       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4943           lt_cv_dlopen_self_static, [dnl
4944           _LT_TRY_DLOPEN_SELF(
4945             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4946             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4947       ])
4948     fi
4950     CPPFLAGS="$save_CPPFLAGS"
4951     LDFLAGS="$save_LDFLAGS"
4952     LIBS="$save_LIBS"
4953     ;;
4954   esac
4956   case $lt_cv_dlopen_self in
4957   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4958   *) enable_dlopen_self=unknown ;;
4959   esac
4961   case $lt_cv_dlopen_self_static in
4962   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4963   *) enable_dlopen_self_static=unknown ;;
4964   esac
4966 _LT_DECL([dlopen_support], [enable_dlopen], [0],
4967          [Whether dlopen is supported])
4968 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4969          [Whether dlopen of programs is supported])
4970 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4971          [Whether dlopen of statically linked programs is supported])
4972 ])# LT_SYS_DLOPEN_SELF
4974 # Old name:
4975 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4976 dnl aclocal-1.4 backwards compatibility:
4977 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4980 # _LT_COMPILER_C_O([TAGNAME])
4981 # ---------------------------
4982 # Check to see if options -c and -o are simultaneously supported by compiler.
4983 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
4984 m4_defun([_LT_COMPILER_C_O],
4985 [m4_require([_LT_DECL_SED])dnl
4986 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4987 m4_require([_LT_TAG_COMPILER])dnl
4988 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4989   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4990   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4991    $RM -r conftest 2>/dev/null
4992    mkdir conftest
4993    cd conftest
4994    mkdir out
4995    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4997    lt_compiler_flag="-o out/conftest2.$ac_objext"
4998    # Insert the option either (1) after the last *FLAGS variable, or
4999    # (2) before a word containing "conftest.", or (3) at the end.
5000    # Note that $ac_compile itself does not contain backslashes and begins
5001    # with a dollar sign (not a hyphen), so the echo should work correctly.
5002    lt_compile=`echo "$ac_compile" | $SED \
5003    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
5004    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5005    -e 's:$: $lt_compiler_flag:'`
5006    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5007    (eval "$lt_compile" 2>out/conftest.err)
5008    ac_status=$?
5009    cat out/conftest.err >&AS_MESSAGE_LOG_FD
5010    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5011    if (exit $ac_status) && test -s out/conftest2.$ac_objext
5012    then
5013      # The compiler can only warn and ignore the option if not recognized
5014      # So say no if there are warnings
5015      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
5016      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
5017      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
5018        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5019      fi
5020    fi
5021    chmod u+w . 2>&AS_MESSAGE_LOG_FD
5022    $RM conftest*
5023    # SGI C++ compiler will create directory out/ii_files/ for
5024    # template instantiation
5025    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
5026    $RM out/* && rmdir out
5027    cd ..
5028    $RM -r conftest
5029    $RM conftest*
5031 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
5032         [Does compiler simultaneously support -c and -o options?])
5033 ])# _LT_COMPILER_C_O
5036 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
5037 # ----------------------------------
5038 # Check to see if we can do hard links to lock some files if needed
5039 m4_defun([_LT_COMPILER_FILE_LOCKS],
5040 [m4_require([_LT_ENABLE_LOCK])dnl
5041 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5042 _LT_COMPILER_C_O([$1])
5044 hard_links="nottested"
5045 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
5046   # do not overwrite the value of need_locks provided by the user
5047   AC_MSG_CHECKING([if we can lock with hard links])
5048   hard_links=yes
5049   $RM conftest*
5050   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5051   touch conftest.a
5052   ln conftest.a conftest.b 2>&5 || hard_links=no
5053   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5054   AC_MSG_RESULT([$hard_links])
5055   if test "$hard_links" = no; then
5056     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
5057     need_locks=warn
5058   fi
5059 else
5060   need_locks=no
5062 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
5063 ])# _LT_COMPILER_FILE_LOCKS
5066 # _LT_CHECK_OBJDIR
5067 # ----------------
5068 m4_defun([_LT_CHECK_OBJDIR],
5069 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
5070 [rm -f .libs 2>/dev/null
5071 mkdir .libs 2>/dev/null
5072 if test -d .libs; then
5073   lt_cv_objdir=.libs
5074 else
5075   # MS-DOS does not allow filenames that begin with a dot.
5076   lt_cv_objdir=_libs
5078 rmdir .libs 2>/dev/null])
5079 objdir=$lt_cv_objdir
5080 _LT_DECL([], [objdir], [0],
5081          [The name of the directory that contains temporary libtool files])dnl
5082 m4_pattern_allow([LT_OBJDIR])dnl
5083 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
5084   [Define to the sub-directory in which libtool stores uninstalled libraries.])
5085 ])# _LT_CHECK_OBJDIR
5088 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
5089 # --------------------------------------
5090 # Check hardcoding attributes.
5091 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
5092 [AC_MSG_CHECKING([how to hardcode library paths into programs])
5093 _LT_TAGVAR(hardcode_action, $1)=
5094 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
5095    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
5096    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
5098   # We can hardcode non-existent directories.
5099   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
5100      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5101      # have to relink, otherwise we might link with an installed library
5102      # when we should be linking with a yet-to-be-installed one
5103      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
5104      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
5105     # Linking always hardcodes the temporary library directory.
5106     _LT_TAGVAR(hardcode_action, $1)=relink
5107   else
5108     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5109     _LT_TAGVAR(hardcode_action, $1)=immediate
5110   fi
5111 else
5112   # We cannot hardcode anything, or else we can only hardcode existing
5113   # directories.
5114   _LT_TAGVAR(hardcode_action, $1)=unsupported
5116 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
5118 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
5119    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
5120   # Fast installation is not supported
5121   enable_fast_install=no
5122 elif test "$shlibpath_overrides_runpath" = yes ||
5123      test "$enable_shared" = no; then
5124   # Fast installation is not necessary
5125   enable_fast_install=needless
5127 _LT_TAGDECL([], [hardcode_action], [0],
5128     [How to hardcode a shared library path into an executable])
5129 ])# _LT_LINKER_HARDCODE_LIBPATH
5132 # _LT_CMD_STRIPLIB
5133 # ----------------
5134 m4_defun([_LT_CMD_STRIPLIB],
5135 [m4_require([_LT_DECL_EGREP])
5136 striplib=
5137 old_striplib=
5138 AC_MSG_CHECKING([whether stripping libraries is possible])
5139 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
5140   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5141   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5142   AC_MSG_RESULT([yes])
5143 else
5144 # FIXME - insert some real tests, host_os isn't really good enough
5145   case $host_os in
5146   darwin*)
5147     if test -n "$STRIP" ; then
5148       striplib="$STRIP -x"
5149       old_striplib="$STRIP -S"
5150       AC_MSG_RESULT([yes])
5151     else
5152       AC_MSG_RESULT([no])
5153     fi
5154     ;;
5155   *)
5156     AC_MSG_RESULT([no])
5157     ;;
5158   esac
5160 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
5161 _LT_DECL([], [striplib], [1])
5162 ])# _LT_CMD_STRIPLIB
5165 # _LT_SYS_DYNAMIC_LINKER([TAG])
5166 # -----------------------------
5167 # PORTME Fill in your ld.so characteristics
5168 m4_defun([_LT_SYS_DYNAMIC_LINKER],
5169 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5170 m4_require([_LT_DECL_EGREP])dnl
5171 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5172 m4_require([_LT_DECL_OBJDUMP])dnl
5173 m4_require([_LT_DECL_SED])dnl
5174 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
5175 AC_MSG_CHECKING([dynamic linker characteristics])
5176 m4_if([$1],
5177         [], [
5178 if test "$GCC" = yes; then
5179   case $host_os in
5180     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
5181     *) lt_awk_arg="/^libraries:/" ;;
5182   esac
5183   case $host_os in
5184     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
5185     *) lt_sed_strip_eq="s,=/,/,g" ;;
5186   esac
5187   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
5188   case $lt_search_path_spec in
5189   *\;*)
5190     # if the path contains ";" then we assume it to be the separator
5191     # otherwise default to the standard path separator (i.e. ":") - it is
5192     # assumed that no part of a normal pathname contains ";" but that should
5193     # okay in the real world where ";" in dirpaths is itself problematic.
5194     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
5195     ;;
5196   *)
5197     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
5198     ;;
5199   esac
5200   # Ok, now we have the path, separated by spaces, we can step through it
5201   # and add multilib dir if necessary.
5202   lt_tmp_lt_search_path_spec=
5203   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
5204   for lt_sys_path in $lt_search_path_spec; do
5205     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
5206       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
5207     else
5208       test -d "$lt_sys_path" && \
5209         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
5210     fi
5211   done
5212   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
5213 BEGIN {RS=" "; FS="/|\n";} {
5214   lt_foo="";
5215   lt_count=0;
5216   for (lt_i = NF; lt_i > 0; lt_i--) {
5217     if ($lt_i != "" && $lt_i != ".") {
5218       if ($lt_i == "..") {
5219         lt_count++;
5220       } else {
5221         if (lt_count == 0) {
5222           lt_foo="/" $lt_i lt_foo;
5223         } else {
5224           lt_count--;
5225         }
5226       }
5227     }
5228   }
5229   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
5230   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
5232   # AWK program above erroneously prepends '/' to C:/dos/paths
5233   # for these hosts.
5234   case $host_os in
5235     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
5236       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
5237   esac
5238   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
5239 else
5240   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5241 fi])
5242 library_names_spec=
5243 libname_spec='lib$name'
5244 soname_spec=
5245 shrext_cmds=".so"
5246 postinstall_cmds=
5247 postuninstall_cmds=
5248 finish_cmds=
5249 finish_eval=
5250 shlibpath_var=
5251 shlibpath_overrides_runpath=unknown
5252 version_type=none
5253 dynamic_linker="$host_os ld.so"
5254 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5255 need_lib_prefix=unknown
5256 hardcode_into_libs=no
5258 # when you set need_version to no, make sure it does not cause -set_version
5259 # flags to be left without arguments
5260 need_version=unknown
5262 case $host_os in
5263 aix3*)
5264   version_type=linux # correct to gnu/linux during the next big refactor
5265   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
5266   shlibpath_var=LIBPATH
5268   # AIX 3 has no versioning support, so we append a major version to the name.
5269   soname_spec='${libname}${release}${shared_ext}$major'
5270   ;;
5272 aix[[4-9]]*)
5273   version_type=linux # correct to gnu/linux during the next big refactor
5274   need_lib_prefix=no
5275   need_version=no
5276   hardcode_into_libs=yes
5277   if test "$host_cpu" = ia64; then
5278     # AIX 5 supports IA64
5279     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
5280     shlibpath_var=LD_LIBRARY_PATH
5281   else
5282     # With GCC up to 2.95.x, collect2 would create an import file
5283     # for dependence libraries.  The import file would start with
5284     # the line `#! .'.  This would cause the generated library to
5285     # depend on `.', always an invalid library.  This was fixed in
5286     # development snapshots of GCC prior to 3.0.
5287     case $host_os in
5288       aix4 | aix4.[[01]] | aix4.[[01]].*)
5289       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5290            echo ' yes '
5291            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
5292         :
5293       else
5294         can_build_shared=no
5295       fi
5296       ;;
5297     esac
5298     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
5299     # soname into executable. Probably we can add versioning support to
5300     # collect2, so additional links can be useful in future.
5301     if test "$aix_use_runtimelinking" = yes; then
5302       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5303       # instead of lib<name>.a to let people know that these are not
5304       # typical AIX shared libraries.
5305       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5306     else
5307       # We preserve .a as extension for shared libraries through AIX4.2
5308       # and later when we are not doing run time linking.
5309       library_names_spec='${libname}${release}.a $libname.a'
5310       soname_spec='${libname}${release}${shared_ext}$major'
5311     fi
5312     shlibpath_var=LIBPATH
5313   fi
5314   ;;
5316 amigaos*)
5317   case $host_cpu in
5318   powerpc)
5319     # Since July 2007 AmigaOS4 officially supports .so libraries.
5320     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
5321     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5322     ;;
5323   m68k)
5324     library_names_spec='$libname.ixlibrary $libname.a'
5325     # Create ${libname}_ixlibrary.a entries in /sys/libs.
5326     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
5327     ;;
5328   esac
5329   ;;
5331 beos*)
5332   library_names_spec='${libname}${shared_ext}'
5333   dynamic_linker="$host_os ld.so"
5334   shlibpath_var=LIBRARY_PATH
5335   ;;
5337 bsdi[[45]]*)
5338   version_type=linux # correct to gnu/linux during the next big refactor
5339   need_version=no
5340   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5341   soname_spec='${libname}${release}${shared_ext}$major'
5342   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5343   shlibpath_var=LD_LIBRARY_PATH
5344   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5345   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5346   # the default ld.so.conf also contains /usr/contrib/lib and
5347   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5348   # libtool to hard-code these into programs
5349   ;;
5351 cygwin* | mingw* | pw32* | cegcc*)
5352   version_type=windows
5353   shrext_cmds=".dll"
5354   need_version=no
5355   need_lib_prefix=no
5357   case $GCC,$cc_basename in
5358   yes,*)
5359     # gcc
5360     library_names_spec='$libname.dll.a'
5361     # DLL is installed to $(libdir)/../bin by postinstall_cmds
5362     postinstall_cmds='base_file=`basename \${file}`~
5363       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
5364       dldir=$destdir/`dirname \$dlpath`~
5365       test -d \$dldir || mkdir -p \$dldir~
5366       $install_prog $dir/$dlname \$dldir/$dlname~
5367       chmod a+x \$dldir/$dlname~
5368       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
5369         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
5370       fi'
5371     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
5372       dlpath=$dir/\$dldll~
5373        $RM \$dlpath'
5374     shlibpath_overrides_runpath=yes
5376     case $host_os in
5377     cygwin*)
5378       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
5379       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
5380 m4_if([$1], [],[
5381       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
5382       ;;
5383     mingw* | cegcc*)
5384       # MinGW DLLs use traditional 'lib' prefix
5385       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
5386       ;;
5387     pw32*)
5388       # pw32 DLLs use 'pw' prefix rather than 'lib'
5389       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
5390       ;;
5391     esac
5392     dynamic_linker='Win32 ld.exe'
5393     ;;
5395   *,cl*)
5396     # Native MSVC
5397     libname_spec='$name'
5398     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
5399     library_names_spec='${libname}.dll.lib'
5401     case $build_os in
5402     mingw*)
5403       sys_lib_search_path_spec=
5404       lt_save_ifs=$IFS
5405       IFS=';'
5406       for lt_path in $LIB
5407       do
5408         IFS=$lt_save_ifs
5409         # Let DOS variable expansion print the short 8.3 style file name.
5410         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
5411         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
5412       done
5413       IFS=$lt_save_ifs
5414       # Convert to MSYS style.
5415       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
5416       ;;
5417     cygwin*)
5418       # Convert to unix form, then to dos form, then back to unix form
5419       # but this time dos style (no spaces!) so that the unix form looks
5420       # like /cygdrive/c/PROGRA~1:/cygdr...
5421       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
5422       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
5423       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
5424       ;;
5425     *)
5426       sys_lib_search_path_spec="$LIB"
5427       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
5428         # It is most probably a Windows format PATH.
5429         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
5430       else
5431         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
5432       fi
5433       # FIXME: find the short name or the path components, as spaces are
5434       # common. (e.g. "Program Files" -> "PROGRA~1")
5435       ;;
5436     esac
5438     # DLL is installed to $(libdir)/../bin by postinstall_cmds
5439     postinstall_cmds='base_file=`basename \${file}`~
5440       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
5441       dldir=$destdir/`dirname \$dlpath`~
5442       test -d \$dldir || mkdir -p \$dldir~
5443       $install_prog $dir/$dlname \$dldir/$dlname'
5444     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
5445       dlpath=$dir/\$dldll~
5446        $RM \$dlpath'
5447     shlibpath_overrides_runpath=yes
5448     dynamic_linker='Win32 link.exe'
5449     ;;
5451   *)
5452     # Assume MSVC wrapper
5453     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
5454     dynamic_linker='Win32 ld.exe'
5455     ;;
5456   esac
5457   # FIXME: first we should search . and the directory the executable is in
5458   shlibpath_var=PATH
5459   ;;
5461 darwin* | rhapsody*)
5462   dynamic_linker="$host_os dyld"
5463   version_type=darwin
5464   need_lib_prefix=no
5465   need_version=no
5466   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
5467   soname_spec='${libname}${release}${major}$shared_ext'
5468   shlibpath_overrides_runpath=yes
5469   shlibpath_var=DYLD_LIBRARY_PATH
5470   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
5471 m4_if([$1], [],[
5472   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
5473   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
5474   ;;
5476 dgux*)
5477   version_type=linux # correct to gnu/linux during the next big refactor
5478   need_lib_prefix=no
5479   need_version=no
5480   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
5481   soname_spec='${libname}${release}${shared_ext}$major'
5482   shlibpath_var=LD_LIBRARY_PATH
5483   ;;
5485 freebsd* | dragonfly*)
5486   # DragonFly does not have aout.  When/if they implement a new
5487   # versioning mechanism, adjust this.
5488   if test -x /usr/bin/objformat; then
5489     objformat=`/usr/bin/objformat`
5490   else
5491     case $host_os in
5492     freebsd[[23]].*) objformat=aout ;;
5493     *) objformat=elf ;;
5494     esac
5495   fi
5496   version_type=freebsd-$objformat
5497   case $version_type in
5498     freebsd-elf*)
5499       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5500       need_version=no
5501       need_lib_prefix=no
5502       ;;
5503     freebsd-*)
5504       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
5505       need_version=yes
5506       ;;
5507   esac
5508   shlibpath_var=LD_LIBRARY_PATH
5509   case $host_os in
5510   freebsd2.*)
5511     shlibpath_overrides_runpath=yes
5512     ;;
5513   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
5514     shlibpath_overrides_runpath=yes
5515     hardcode_into_libs=yes
5516     ;;
5517   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
5518   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
5519     shlibpath_overrides_runpath=no
5520     hardcode_into_libs=yes
5521     ;;
5522   *) # from 4.6 on, and DragonFly
5523     shlibpath_overrides_runpath=yes
5524     hardcode_into_libs=yes
5525     ;;
5526   esac
5527   ;;
5529 haiku*)
5530   version_type=linux # correct to gnu/linux during the next big refactor
5531   need_lib_prefix=no
5532   need_version=no
5533   dynamic_linker="$host_os runtime_loader"
5534   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
5535   soname_spec='${libname}${release}${shared_ext}$major'
5536   shlibpath_var=LIBRARY_PATH
5537   shlibpath_overrides_runpath=yes
5538   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
5539   hardcode_into_libs=yes
5540   ;;
5542 hpux9* | hpux10* | hpux11*)
5543   # Give a soname corresponding to the major version so that dld.sl refuses to
5544   # link against other versions.
5545   version_type=sunos
5546   need_lib_prefix=no
5547   need_version=no
5548   case $host_cpu in
5549   ia64*)
5550     shrext_cmds='.so'
5551     hardcode_into_libs=yes
5552     dynamic_linker="$host_os dld.so"
5553     shlibpath_var=LD_LIBRARY_PATH
5554     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
5555     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5556     soname_spec='${libname}${release}${shared_ext}$major'
5557     if test "X$HPUX_IA64_MODE" = X32; then
5558       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
5559     else
5560       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
5561     fi
5562     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
5563     ;;
5564   hppa*64*)
5565     shrext_cmds='.sl'
5566     hardcode_into_libs=yes
5567     dynamic_linker="$host_os dld.sl"
5568     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
5569     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
5570     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5571     soname_spec='${libname}${release}${shared_ext}$major'
5572     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
5573     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
5574     ;;
5575   *)
5576     shrext_cmds='.sl'
5577     dynamic_linker="$host_os dld.sl"
5578     shlibpath_var=SHLIB_PATH
5579     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
5580     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5581     soname_spec='${libname}${release}${shared_ext}$major'
5582     ;;
5583   esac
5584   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
5585   postinstall_cmds='chmod 555 $lib'
5586   # or fails outright, so override atomically:
5587   install_override_mode=555
5588   ;;
5590 interix[[3-9]]*)
5591   version_type=linux # correct to gnu/linux during the next big refactor
5592   need_lib_prefix=no
5593   need_version=no
5594   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5595   soname_spec='${libname}${release}${shared_ext}$major'
5596   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
5597   shlibpath_var=LD_LIBRARY_PATH
5598   shlibpath_overrides_runpath=no
5599   hardcode_into_libs=yes
5600   ;;
5602 irix5* | irix6* | nonstopux*)
5603   case $host_os in
5604     nonstopux*) version_type=nonstopux ;;
5605     *)
5606         if test "$lt_cv_prog_gnu_ld" = yes; then
5607                 version_type=linux # correct to gnu/linux during the next big refactor
5608         else
5609                 version_type=irix
5610         fi ;;
5611   esac
5612   need_lib_prefix=no
5613   need_version=no
5614   soname_spec='${libname}${release}${shared_ext}$major'
5615   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
5616   case $host_os in
5617   irix5* | nonstopux*)
5618     libsuff= shlibsuff=
5619     ;;
5620   *)
5621     case $LD in # libtool.m4 will add one of these switches to LD
5622     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
5623       libsuff= shlibsuff= libmagic=32-bit;;
5624     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
5625       libsuff=32 shlibsuff=N32 libmagic=N32;;
5626     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
5627       libsuff=64 shlibsuff=64 libmagic=64-bit;;
5628     *) libsuff= shlibsuff= libmagic=never-match;;
5629     esac
5630     ;;
5631   esac
5632   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
5633   shlibpath_overrides_runpath=no
5634   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
5635   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
5636   hardcode_into_libs=yes
5637   ;;
5639 # No shared lib support for Linux oldld, aout, or coff.
5640 linux*oldld* | linux*aout* | linux*coff*)
5641   dynamic_linker=no
5642   ;;
5644 # This must be glibc/ELF.
5645 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5646   version_type=linux # correct to gnu/linux during the next big refactor
5647   need_lib_prefix=no
5648   need_version=no
5649   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5650   soname_spec='${libname}${release}${shared_ext}$major'
5651   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
5652   shlibpath_var=LD_LIBRARY_PATH
5653   shlibpath_overrides_runpath=no
5655   # Some binutils ld are patched to set DT_RUNPATH
5656   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
5657     [lt_cv_shlibpath_overrides_runpath=no
5658     save_LDFLAGS=$LDFLAGS
5659     save_libdir=$libdir
5660     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
5661          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
5662     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
5663       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
5664          [lt_cv_shlibpath_overrides_runpath=yes])])
5665     LDFLAGS=$save_LDFLAGS
5666     libdir=$save_libdir
5667     ])
5668   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
5670   # This implies no fast_install, which is unacceptable.
5671   # Some rework will be needed to allow for fast_install
5672   # before this can be enabled.
5673   hardcode_into_libs=yes
5675   # Append ld.so.conf contents to the search path
5676   if test -f /etc/ld.so.conf; then
5677     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
5678     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
5679   fi
5681   # We used to test for /lib/ld.so.1 and disable shared libraries on
5682   # powerpc, because MkLinux only supported shared libraries with the
5683   # GNU dynamic linker.  Since this was broken with cross compilers,
5684   # most powerpc-linux boxes support dynamic linking these days and
5685   # people can always --disable-shared, the test was removed, and we
5686   # assume the GNU/Linux dynamic linker is in use.
5687   dynamic_linker='GNU/Linux ld.so'
5688   ;;
5690 netbsdelf*-gnu)
5691   version_type=linux
5692   need_lib_prefix=no
5693   need_version=no
5694   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5695   soname_spec='${libname}${release}${shared_ext}$major'
5696   shlibpath_var=LD_LIBRARY_PATH
5697   shlibpath_overrides_runpath=no
5698   hardcode_into_libs=yes
5699   dynamic_linker='NetBSD ld.elf_so'
5700   ;;
5702 netbsd*)
5703   version_type=sunos
5704   need_lib_prefix=no
5705   need_version=no
5706   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5707     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5708     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5709     dynamic_linker='NetBSD (a.out) ld.so'
5710   else
5711     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5712     soname_spec='${libname}${release}${shared_ext}$major'
5713     dynamic_linker='NetBSD ld.elf_so'
5714   fi
5715   shlibpath_var=LD_LIBRARY_PATH
5716   shlibpath_overrides_runpath=yes
5717   hardcode_into_libs=yes
5718   ;;
5720 newsos6)
5721   version_type=linux # correct to gnu/linux during the next big refactor
5722   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5723   shlibpath_var=LD_LIBRARY_PATH
5724   shlibpath_overrides_runpath=yes
5725   ;;
5727 *nto* | *qnx*)
5728   version_type=qnx
5729   need_lib_prefix=no
5730   need_version=no
5731   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5732   soname_spec='${libname}${release}${shared_ext}$major'
5733   shlibpath_var=LD_LIBRARY_PATH
5734   shlibpath_overrides_runpath=no
5735   hardcode_into_libs=yes
5736   dynamic_linker='ldqnx.so'
5737   ;;
5739 openbsd*)
5740   version_type=sunos
5741   sys_lib_dlsearch_path_spec="/usr/lib"
5742   need_lib_prefix=no
5743   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
5744   case $host_os in
5745     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
5746     *)                          need_version=no  ;;
5747   esac
5748   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5749   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5750   shlibpath_var=LD_LIBRARY_PATH
5751   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5752     case $host_os in
5753       openbsd2.[[89]] | openbsd2.[[89]].*)
5754         shlibpath_overrides_runpath=no
5755         ;;
5756       *)
5757         shlibpath_overrides_runpath=yes
5758         ;;
5759       esac
5760   else
5761     shlibpath_overrides_runpath=yes
5762   fi
5763   ;;
5765 os2*)
5766   libname_spec='$name'
5767   shrext_cmds=".dll"
5768   need_lib_prefix=no
5769   library_names_spec='$libname${shared_ext} $libname.a'
5770   dynamic_linker='OS/2 ld.exe'
5771   shlibpath_var=LIBPATH
5772   ;;
5774 osf3* | osf4* | osf5*)
5775   version_type=osf
5776   need_lib_prefix=no
5777   need_version=no
5778   soname_spec='${libname}${release}${shared_ext}$major'
5779   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5780   shlibpath_var=LD_LIBRARY_PATH
5781   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5782   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
5783   ;;
5785 rdos*)
5786   dynamic_linker=no
5787   ;;
5789 solaris*)
5790   version_type=linux # correct to gnu/linux during the next big refactor
5791   need_lib_prefix=no
5792   need_version=no
5793   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5794   soname_spec='${libname}${release}${shared_ext}$major'
5795   shlibpath_var=LD_LIBRARY_PATH
5796   shlibpath_overrides_runpath=yes
5797   hardcode_into_libs=yes
5798   # ldd complains unless libraries are executable
5799   postinstall_cmds='chmod +x $lib'
5800   ;;
5802 sunos4*)
5803   version_type=sunos
5804   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5805   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
5806   shlibpath_var=LD_LIBRARY_PATH
5807   shlibpath_overrides_runpath=yes
5808   if test "$with_gnu_ld" = yes; then
5809     need_lib_prefix=no
5810   fi
5811   need_version=yes
5812   ;;
5814 sysv4 | sysv4.3*)
5815   version_type=linux # correct to gnu/linux during the next big refactor
5816   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5817   soname_spec='${libname}${release}${shared_ext}$major'
5818   shlibpath_var=LD_LIBRARY_PATH
5819   case $host_vendor in
5820     sni)
5821       shlibpath_overrides_runpath=no
5822       need_lib_prefix=no
5823       runpath_var=LD_RUN_PATH
5824       ;;
5825     siemens)
5826       need_lib_prefix=no
5827       ;;
5828     motorola)
5829       need_lib_prefix=no
5830       need_version=no
5831       shlibpath_overrides_runpath=no
5832       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
5833       ;;
5834   esac
5835   ;;
5837 sysv4*MP*)
5838   if test -d /usr/nec ;then
5839     version_type=linux # correct to gnu/linux during the next big refactor
5840     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
5841     soname_spec='$libname${shared_ext}.$major'
5842     shlibpath_var=LD_LIBRARY_PATH
5843   fi
5844   ;;
5846 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5847   version_type=freebsd-elf
5848   need_lib_prefix=no
5849   need_version=no
5850   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5851   soname_spec='${libname}${release}${shared_ext}$major'
5852   shlibpath_var=LD_LIBRARY_PATH
5853   shlibpath_overrides_runpath=yes
5854   hardcode_into_libs=yes
5855   if test "$with_gnu_ld" = yes; then
5856     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5857   else
5858     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5859     case $host_os in
5860       sco3.2v5*)
5861         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5862         ;;
5863     esac
5864   fi
5865   sys_lib_dlsearch_path_spec='/usr/lib'
5866   ;;
5868 tpf*)
5869   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5870   version_type=linux # correct to gnu/linux during the next big refactor
5871   need_lib_prefix=no
5872   need_version=no
5873   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5874   shlibpath_var=LD_LIBRARY_PATH
5875   shlibpath_overrides_runpath=no
5876   hardcode_into_libs=yes
5877   ;;
5879 uts4*)
5880   version_type=linux # correct to gnu/linux during the next big refactor
5881   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5882   soname_spec='${libname}${release}${shared_ext}$major'
5883   shlibpath_var=LD_LIBRARY_PATH
5884   ;;
5887   dynamic_linker=no
5888   ;;
5889 esac
5890 AC_MSG_RESULT([$dynamic_linker])
5891 test "$dynamic_linker" = no && can_build_shared=no
5893 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5894 if test "$GCC" = yes; then
5895   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5898 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5899   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5901 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5902   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5905 _LT_DECL([], [variables_saved_for_relink], [1],
5906     [Variables whose values should be saved in libtool wrapper scripts and
5907     restored at link time])
5908 _LT_DECL([], [need_lib_prefix], [0],
5909     [Do we need the "lib" prefix for modules?])
5910 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5911 _LT_DECL([], [version_type], [0], [Library versioning type])
5912 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5913 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5914 _LT_DECL([], [shlibpath_overrides_runpath], [0],
5915     [Is shlibpath searched before the hard-coded library search path?])
5916 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5917 _LT_DECL([], [library_names_spec], [1],
5918     [[List of archive names.  First name is the real one, the rest are links.
5919     The last name is the one that the linker finds with -lNAME]])
5920 _LT_DECL([], [soname_spec], [1],
5921     [[The coded name of the library, if different from the real name]])
5922 _LT_DECL([], [install_override_mode], [1],
5923     [Permission mode override for installation of shared libraries])
5924 _LT_DECL([], [postinstall_cmds], [2],
5925     [Command to use after installation of a shared archive])
5926 _LT_DECL([], [postuninstall_cmds], [2],
5927     [Command to use after uninstallation of a shared archive])
5928 _LT_DECL([], [finish_cmds], [2],
5929     [Commands used to finish a libtool library installation in a directory])
5930 _LT_DECL([], [finish_eval], [1],
5931     [[As "finish_cmds", except a single script fragment to be evaled but
5932     not shown]])
5933 _LT_DECL([], [hardcode_into_libs], [0],
5934     [Whether we should hardcode library paths into libraries])
5935 _LT_DECL([], [sys_lib_search_path_spec], [2],
5936     [Compile-time system search path for libraries])
5937 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5938     [Run-time system search path for libraries])
5939 ])# _LT_SYS_DYNAMIC_LINKER
5942 # _LT_PATH_TOOL_PREFIX(TOOL)
5943 # --------------------------
5944 # find a file program which can recognize shared library
5945 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5946 [m4_require([_LT_DECL_EGREP])dnl
5947 AC_MSG_CHECKING([for $1])
5948 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5949 [case $MAGIC_CMD in
5950 [[\\/*] |  ?:[\\/]*])
5951   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5952   ;;
5954   lt_save_MAGIC_CMD="$MAGIC_CMD"
5955   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5956 dnl $ac_dummy forces splitting on constant user-supplied paths.
5957 dnl POSIX.2 word splitting is done only on the output of word expansions,
5958 dnl not every word.  This closes a longstanding sh security hole.
5959   ac_dummy="m4_if([$2], , $PATH, [$2])"
5960   for ac_dir in $ac_dummy; do
5961     IFS="$lt_save_ifs"
5962     test -z "$ac_dir" && ac_dir=.
5963     if test -f $ac_dir/$1; then
5964       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5965       if test -n "$file_magic_test_file"; then
5966         case $deplibs_check_method in
5967         "file_magic "*)
5968           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5969           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5970           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5971             $EGREP "$file_magic_regex" > /dev/null; then
5972             :
5973           else
5974             cat <<_LT_EOF 1>&2
5976 *** Warning: the command libtool uses to detect shared libraries,
5977 *** $file_magic_cmd, produces output that libtool cannot recognize.
5978 *** The result is that libtool may fail to recognize shared libraries
5979 *** as such.  This will affect the creation of libtool libraries that
5980 *** depend on shared libraries, but programs linked with such libtool
5981 *** libraries will work regardless of this problem.  Nevertheless, you
5982 *** may want to report the problem to your system manager and/or to
5983 *** bug-libtool@gnu.org
5985 _LT_EOF
5986           fi ;;
5987         esac
5988       fi
5989       break
5990     fi
5991   done
5992   IFS="$lt_save_ifs"
5993   MAGIC_CMD="$lt_save_MAGIC_CMD"
5994   ;;
5995 esac])
5996 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5997 if test -n "$MAGIC_CMD"; then
5998   AC_MSG_RESULT($MAGIC_CMD)
5999 else
6000   AC_MSG_RESULT(no)
6002 _LT_DECL([], [MAGIC_CMD], [0],
6003          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
6004 ])# _LT_PATH_TOOL_PREFIX
6006 # Old name:
6007 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
6008 dnl aclocal-1.4 backwards compatibility:
6009 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
6012 # _LT_PATH_MAGIC
6013 # --------------
6014 # find a file program which can recognize a shared library
6015 m4_defun([_LT_PATH_MAGIC],
6016 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
6017 if test -z "$lt_cv_path_MAGIC_CMD"; then
6018   if test -n "$ac_tool_prefix"; then
6019     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
6020   else
6021     MAGIC_CMD=:
6022   fi
6024 ])# _LT_PATH_MAGIC
6027 # LT_PATH_LD
6028 # ----------
6029 # find the pathname to the GNU or non-GNU linker
6030 AC_DEFUN([LT_PATH_LD],
6031 [AC_REQUIRE([AC_PROG_CC])dnl
6032 AC_REQUIRE([AC_CANONICAL_HOST])dnl
6033 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6034 m4_require([_LT_DECL_SED])dnl
6035 m4_require([_LT_DECL_EGREP])dnl
6036 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
6038 AC_ARG_WITH([gnu-ld],
6039     [AS_HELP_STRING([--with-gnu-ld],
6040         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
6041     [test "$withval" = no || with_gnu_ld=yes],
6042     [with_gnu_ld=no])dnl
6044 ac_prog=ld
6045 if test "$GCC" = yes; then
6046   # Check if gcc -print-prog-name=ld gives a path.
6047   AC_MSG_CHECKING([for ld used by $CC])
6048   case $host in
6049   *-*-mingw*)
6050     # gcc leaves a trailing carriage return which upsets mingw
6051     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6052   *)
6053     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6054   esac
6055   case $ac_prog in
6056     # Accept absolute paths.
6057     [[\\/]]* | ?:[[\\/]]*)
6058       re_direlt='/[[^/]][[^/]]*/\.\./'
6059       # Canonicalize the pathname of ld
6060       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6061       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6062         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6063       done
6064       test -z "$LD" && LD="$ac_prog"
6065       ;;
6066   "")
6067     # If it fails, then pretend we aren't using GCC.
6068     ac_prog=ld
6069     ;;
6070   *)
6071     # If it is relative, then search for the first ld in PATH.
6072     with_gnu_ld=unknown
6073     ;;
6074   esac
6075 elif test "$with_gnu_ld" = yes; then
6076   AC_MSG_CHECKING([for GNU ld])
6077 else
6078   AC_MSG_CHECKING([for non-GNU ld])
6080 AC_CACHE_VAL(lt_cv_path_LD,
6081 [if test -z "$LD"; then
6082   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6083   for ac_dir in $PATH; do
6084     IFS="$lt_save_ifs"
6085     test -z "$ac_dir" && ac_dir=.
6086     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6087       lt_cv_path_LD="$ac_dir/$ac_prog"
6088       # Check to see if the program is GNU ld.  I'd rather use --version,
6089       # but apparently some variants of GNU ld only accept -v.
6090       # Break only if it was the GNU/non-GNU ld that we prefer.
6091       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6092       *GNU* | *'with BFD'*)
6093         test "$with_gnu_ld" != no && break
6094         ;;
6095       *)
6096         test "$with_gnu_ld" != yes && break
6097         ;;
6098       esac
6099     fi
6100   done
6101   IFS="$lt_save_ifs"
6102 else
6103   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6104 fi])
6105 LD="$lt_cv_path_LD"
6106 if test -n "$LD"; then
6107   AC_MSG_RESULT($LD)
6108 else
6109   AC_MSG_RESULT(no)
6111 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6112 _LT_PATH_LD_GNU
6113 AC_SUBST([LD])
6115 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
6116 ])# LT_PATH_LD
6118 # Old names:
6119 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
6120 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
6121 dnl aclocal-1.4 backwards compatibility:
6122 dnl AC_DEFUN([AM_PROG_LD], [])
6123 dnl AC_DEFUN([AC_PROG_LD], [])
6126 # _LT_PATH_LD_GNU
6127 #- --------------
6128 m4_defun([_LT_PATH_LD_GNU],
6129 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
6130 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
6131 case `$LD -v 2>&1 </dev/null` in
6132 *GNU* | *'with BFD'*)
6133   lt_cv_prog_gnu_ld=yes
6134   ;;
6136   lt_cv_prog_gnu_ld=no
6137   ;;
6138 esac])
6139 with_gnu_ld=$lt_cv_prog_gnu_ld
6140 ])# _LT_PATH_LD_GNU
6143 # _LT_CMD_RELOAD
6144 # --------------
6145 # find reload flag for linker
6146 #   -- PORTME Some linkers may need a different reload flag.
6147 m4_defun([_LT_CMD_RELOAD],
6148 [AC_CACHE_CHECK([for $LD option to reload object files],
6149   lt_cv_ld_reload_flag,
6150   [lt_cv_ld_reload_flag='-r'])
6151 reload_flag=$lt_cv_ld_reload_flag
6152 case $reload_flag in
6153 "" | " "*) ;;
6154 *) reload_flag=" $reload_flag" ;;
6155 esac
6156 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6157 case $host_os in
6158   cygwin* | mingw* | pw32* | cegcc*)
6159     if test "$GCC" != yes; then
6160       reload_cmds=false
6161     fi
6162     ;;
6163   darwin*)
6164     if test "$GCC" = yes; then
6165       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
6166     else
6167       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6168     fi
6169     ;;
6170 esac
6171 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
6172 _LT_TAGDECL([], [reload_cmds], [2])dnl
6173 ])# _LT_CMD_RELOAD
6176 # _LT_CHECK_MAGIC_METHOD
6177 # ----------------------
6178 # how to check for library dependencies
6179 #  -- PORTME fill in with the dynamic library characteristics
6180 m4_defun([_LT_CHECK_MAGIC_METHOD],
6181 [m4_require([_LT_DECL_EGREP])
6182 m4_require([_LT_DECL_OBJDUMP])
6183 AC_CACHE_CHECK([how to recognize dependent libraries],
6184 lt_cv_deplibs_check_method,
6185 [lt_cv_file_magic_cmd='$MAGIC_CMD'
6186 lt_cv_file_magic_test_file=
6187 lt_cv_deplibs_check_method='unknown'
6188 # Need to set the preceding variable on all platforms that support
6189 # interlibrary dependencies.
6190 # 'none' -- dependencies not supported.
6191 # `unknown' -- same as none, but documents that we really don't know.
6192 # 'pass_all' -- all dependencies passed with no checks.
6193 # 'test_compile' -- check by making test program.
6194 # 'file_magic [[regex]]' -- check by looking for files in library path
6195 # which responds to the $file_magic_cmd with a given extended regex.
6196 # If you have `file' or equivalent on your system and you're not sure
6197 # whether `pass_all' will *always* work, you probably want this one.
6199 case $host_os in
6200 aix[[4-9]]*)
6201   lt_cv_deplibs_check_method=pass_all
6202   ;;
6204 beos*)
6205   lt_cv_deplibs_check_method=pass_all
6206   ;;
6208 bsdi[[45]]*)
6209   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
6210   lt_cv_file_magic_cmd='/usr/bin/file -L'
6211   lt_cv_file_magic_test_file=/shlib/libc.so
6212   ;;
6214 cygwin*)
6215   # func_win32_libid is a shell function defined in ltmain.sh
6216   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6217   lt_cv_file_magic_cmd='func_win32_libid'
6218   ;;
6220 mingw* | pw32*)
6221   # Base MSYS/MinGW do not provide the 'file' command needed by
6222   # func_win32_libid shell function, so use a weaker test based on 'objdump',
6223   # unless we find 'file', for example because we are cross-compiling.
6224   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
6225   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
6226     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6227     lt_cv_file_magic_cmd='func_win32_libid'
6228   else
6229     # Keep this pattern in sync with the one in func_win32_libid.
6230     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6231     lt_cv_file_magic_cmd='$OBJDUMP -f'
6232   fi
6233   ;;
6235 cegcc*)
6236   # use the weaker test based on 'objdump'. See mingw*.
6237   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6238   lt_cv_file_magic_cmd='$OBJDUMP -f'
6239   ;;
6241 darwin* | rhapsody*)
6242   lt_cv_deplibs_check_method=pass_all
6243   ;;
6245 freebsd* | dragonfly*)
6246   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6247     case $host_cpu in
6248     i*86 )
6249       # Not sure whether the presence of OpenBSD here was a mistake.
6250       # Let's accept both of them until this is cleared up.
6251       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
6252       lt_cv_file_magic_cmd=/usr/bin/file
6253       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6254       ;;
6255     esac
6256   else
6257     lt_cv_deplibs_check_method=pass_all
6258   fi
6259   ;;
6261 haiku*)
6262   lt_cv_deplibs_check_method=pass_all
6263   ;;
6265 hpux10.20* | hpux11*)
6266   lt_cv_file_magic_cmd=/usr/bin/file
6267   case $host_cpu in
6268   ia64*)
6269     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
6270     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6271     ;;
6272   hppa*64*)
6273     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
6274     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6275     ;;
6276   *)
6277     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
6278     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6279     ;;
6280   esac
6281   ;;
6283 interix[[3-9]]*)
6284   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6285   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
6286   ;;
6288 irix5* | irix6* | nonstopux*)
6289   case $LD in
6290   *-32|*"-32 ") libmagic=32-bit;;
6291   *-n32|*"-n32 ") libmagic=N32;;
6292   *-64|*"-64 ") libmagic=64-bit;;
6293   *) libmagic=never-match;;
6294   esac
6295   lt_cv_deplibs_check_method=pass_all
6296   ;;
6298 # This must be glibc/ELF.
6299 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6300   lt_cv_deplibs_check_method=pass_all
6301   ;;
6303 netbsd* | netbsdelf*-gnu)
6304   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6305     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
6306   else
6307     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
6308   fi
6309   ;;
6311 newos6*)
6312   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
6313   lt_cv_file_magic_cmd=/usr/bin/file
6314   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6315   ;;
6317 *nto* | *qnx*)
6318   lt_cv_deplibs_check_method=pass_all
6319   ;;
6321 openbsd*)
6322   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6323     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
6324   else
6325     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
6326   fi
6327   ;;
6329 osf3* | osf4* | osf5*)
6330   lt_cv_deplibs_check_method=pass_all
6331   ;;
6333 rdos*)
6334   lt_cv_deplibs_check_method=pass_all
6335   ;;
6337 solaris*)
6338   lt_cv_deplibs_check_method=pass_all
6339   ;;
6341 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6342   lt_cv_deplibs_check_method=pass_all
6343   ;;
6345 sysv4 | sysv4.3*)
6346   case $host_vendor in
6347   motorola)
6348     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]]'
6349     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6350     ;;
6351   ncr)
6352     lt_cv_deplibs_check_method=pass_all
6353     ;;
6354   sequent)
6355     lt_cv_file_magic_cmd='/bin/file'
6356     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
6357     ;;
6358   sni)
6359     lt_cv_file_magic_cmd='/bin/file'
6360     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
6361     lt_cv_file_magic_test_file=/lib/libc.so
6362     ;;
6363   siemens)
6364     lt_cv_deplibs_check_method=pass_all
6365     ;;
6366   pc)
6367     lt_cv_deplibs_check_method=pass_all
6368     ;;
6369   esac
6370   ;;
6372 tpf*)
6373   lt_cv_deplibs_check_method=pass_all
6374   ;;
6375 esac
6378 file_magic_glob=
6379 want_nocaseglob=no
6380 if test "$build" = "$host"; then
6381   case $host_os in
6382   mingw* | pw32*)
6383     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6384       want_nocaseglob=yes
6385     else
6386       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
6387     fi
6388     ;;
6389   esac
6392 file_magic_cmd=$lt_cv_file_magic_cmd
6393 deplibs_check_method=$lt_cv_deplibs_check_method
6394 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6396 _LT_DECL([], [deplibs_check_method], [1],
6397     [Method to check whether dependent libraries are shared objects])
6398 _LT_DECL([], [file_magic_cmd], [1],
6399     [Command to use when deplibs_check_method = "file_magic"])
6400 _LT_DECL([], [file_magic_glob], [1],
6401     [How to find potential files when deplibs_check_method = "file_magic"])
6402 _LT_DECL([], [want_nocaseglob], [1],
6403     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
6404 ])# _LT_CHECK_MAGIC_METHOD
6407 # LT_PATH_NM
6408 # ----------
6409 # find the pathname to a BSD- or MS-compatible name lister
6410 AC_DEFUN([LT_PATH_NM],
6411 [AC_REQUIRE([AC_PROG_CC])dnl
6412 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
6413 [if test -n "$NM"; then
6414   # Let the user override the test.
6415   lt_cv_path_NM="$NM"
6416 else
6417   lt_nm_to_check="${ac_tool_prefix}nm"
6418   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
6419     lt_nm_to_check="$lt_nm_to_check nm"
6420   fi
6421   for lt_tmp_nm in $lt_nm_to_check; do
6422     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6423     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
6424       IFS="$lt_save_ifs"
6425       test -z "$ac_dir" && ac_dir=.
6426       tmp_nm="$ac_dir/$lt_tmp_nm"
6427       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6428         # Check to see if the nm accepts a BSD-compat flag.
6429         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6430         #   nm: unknown option "B" ignored
6431         # Tru64's nm complains that /dev/null is an invalid object file
6432         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6433         */dev/null* | *'Invalid file or object type'*)
6434           lt_cv_path_NM="$tmp_nm -B"
6435           break
6436           ;;
6437         *)
6438           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6439           */dev/null*)
6440             lt_cv_path_NM="$tmp_nm -p"
6441             break
6442             ;;
6443           *)
6444             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6445             continue # so that we can try to find one that supports BSD flags
6446             ;;
6447           esac
6448           ;;
6449         esac
6450       fi
6451     done
6452     IFS="$lt_save_ifs"
6453   done
6454   : ${lt_cv_path_NM=no}
6455 fi])
6456 if test "$lt_cv_path_NM" != "no"; then
6457   NM="$lt_cv_path_NM"
6458 else
6459   # Didn't find any BSD compatible name lister, look for dumpbin.
6460   if test -n "$DUMPBIN"; then :
6461     # Let the user override the test.
6462   else
6463     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
6464     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
6465     *COFF*)
6466       DUMPBIN="$DUMPBIN -symbols"
6467       ;;
6468     *)
6469       DUMPBIN=:
6470       ;;
6471     esac
6472   fi
6473   AC_SUBST([DUMPBIN])
6474   if test "$DUMPBIN" != ":"; then
6475     NM="$DUMPBIN"
6476   fi
6478 test -z "$NM" && NM=nm
6479 AC_SUBST([NM])
6480 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
6482 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
6483   [lt_cv_nm_interface="BSD nm"
6484   echo "int some_variable = 0;" > conftest.$ac_ext
6485   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
6486   (eval "$ac_compile" 2>conftest.err)
6487   cat conftest.err >&AS_MESSAGE_LOG_FD
6488   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
6489   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
6490   cat conftest.err >&AS_MESSAGE_LOG_FD
6491   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
6492   cat conftest.out >&AS_MESSAGE_LOG_FD
6493   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
6494     lt_cv_nm_interface="MS dumpbin"
6495   fi
6496   rm -f conftest*])
6497 ])# LT_PATH_NM
6499 # Old names:
6500 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
6501 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
6502 dnl aclocal-1.4 backwards compatibility:
6503 dnl AC_DEFUN([AM_PROG_NM], [])
6504 dnl AC_DEFUN([AC_PROG_NM], [])
6506 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
6507 # --------------------------------
6508 # how to determine the name of the shared library
6509 # associated with a specific link library.
6510 #  -- PORTME fill in with the dynamic library characteristics
6511 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
6512 [m4_require([_LT_DECL_EGREP])
6513 m4_require([_LT_DECL_OBJDUMP])
6514 m4_require([_LT_DECL_DLLTOOL])
6515 AC_CACHE_CHECK([how to associate runtime and link libraries],
6516 lt_cv_sharedlib_from_linklib_cmd,
6517 [lt_cv_sharedlib_from_linklib_cmd='unknown'
6519 case $host_os in
6520 cygwin* | mingw* | pw32* | cegcc*)
6521   # two different shell functions defined in ltmain.sh
6522   # decide which to use based on capabilities of $DLLTOOL
6523   case `$DLLTOOL --help 2>&1` in
6524   *--identify-strict*)
6525     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6526     ;;
6527   *)
6528     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6529     ;;
6530   esac
6531   ;;
6533   # fallback: assume linklib IS sharedlib
6534   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6535   ;;
6536 esac
6538 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6539 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6541 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
6542     [Command to associate shared and link libraries])
6543 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
6546 # _LT_PATH_MANIFEST_TOOL
6547 # ----------------------
6548 # locate the manifest tool
6549 m4_defun([_LT_PATH_MANIFEST_TOOL],
6550 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
6551 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6552 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
6553   [lt_cv_path_mainfest_tool=no
6554   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
6555   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6556   cat conftest.err >&AS_MESSAGE_LOG_FD
6557   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6558     lt_cv_path_mainfest_tool=yes
6559   fi
6560   rm -f conftest*])
6561 if test "x$lt_cv_path_mainfest_tool" != xyes; then
6562   MANIFEST_TOOL=:
6564 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
6565 ])# _LT_PATH_MANIFEST_TOOL
6568 # LT_LIB_M
6569 # --------
6570 # check for math library
6571 AC_DEFUN([LT_LIB_M],
6572 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
6573 LIBM=
6574 case $host in
6575 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
6576   # These system don't have libm, or don't need it
6577   ;;
6578 *-ncr-sysv4.3*)
6579   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
6580   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
6581   ;;
6583   AC_CHECK_LIB(m, cos, LIBM="-lm")
6584   ;;
6585 esac
6586 AC_SUBST([LIBM])
6587 ])# LT_LIB_M
6589 # Old name:
6590 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
6591 dnl aclocal-1.4 backwards compatibility:
6592 dnl AC_DEFUN([AC_CHECK_LIBM], [])
6595 # _LT_COMPILER_NO_RTTI([TAGNAME])
6596 # -------------------------------
6597 m4_defun([_LT_COMPILER_NO_RTTI],
6598 [m4_require([_LT_TAG_COMPILER])dnl
6600 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6602 if test "$GCC" = yes; then
6603   case $cc_basename in
6604   nvcc*)
6605     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
6606   *)
6607     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
6608   esac
6610   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6611     lt_cv_prog_compiler_rtti_exceptions,
6612     [-fno-rtti -fno-exceptions], [],
6613     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6615 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
6616         [Compiler flag to turn off builtin functions])
6617 ])# _LT_COMPILER_NO_RTTI
6620 # _LT_CMD_GLOBAL_SYMBOLS
6621 # ----------------------
6622 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
6623 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
6624 AC_REQUIRE([AC_PROG_CC])dnl
6625 AC_REQUIRE([AC_PROG_AWK])dnl
6626 AC_REQUIRE([LT_PATH_NM])dnl
6627 AC_REQUIRE([LT_PATH_LD])dnl
6628 m4_require([_LT_DECL_SED])dnl
6629 m4_require([_LT_DECL_EGREP])dnl
6630 m4_require([_LT_TAG_COMPILER])dnl
6632 # Check for command to grab the raw symbol name followed by C symbol from nm.
6633 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6634 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6636 # These are sane defaults that work on at least a few old systems.
6637 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6639 # Character class describing NM global symbol codes.
6640 symcode='[[BCDEGRST]]'
6642 # Regexp to match symbols that can be accessed directly from C.
6643 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6645 # Define system-specific variables.
6646 case $host_os in
6647 aix*)
6648   symcode='[[BCDT]]'
6649   ;;
6650 cygwin* | mingw* | pw32* | cegcc*)
6651   symcode='[[ABCDGISTW]]'
6652   ;;
6653 hpux*)
6654   if test "$host_cpu" = ia64; then
6655     symcode='[[ABCDEGRST]]'
6656   fi
6657   ;;
6658 irix* | nonstopux*)
6659   symcode='[[BCDEGRST]]'
6660   ;;
6661 osf*)
6662   symcode='[[BCDEGQRST]]'
6663   ;;
6664 solaris*)
6665   symcode='[[BDRT]]'
6666   ;;
6667 sco3.2v5*)
6668   symcode='[[DT]]'
6669   ;;
6670 sysv4.2uw2*)
6671   symcode='[[DT]]'
6672   ;;
6673 sysv5* | sco5v6* | unixware* | OpenUNIX*)
6674   symcode='[[ABDT]]'
6675   ;;
6676 sysv4)
6677   symcode='[[DFNSTU]]'
6678   ;;
6679 esac
6681 # If we're using GNU nm, then use its standard symbol codes.
6682 case `$NM -V 2>&1` in
6683 *GNU* | *'with BFD'*)
6684   symcode='[[ABCDGIRSTW]]' ;;
6685 esac
6687 # Transform an extracted symbol line into a proper C declaration.
6688 # Some systems (esp. on ia64) link data and code symbols differently,
6689 # so use this general approach.
6690 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6692 # Transform an extracted symbol line into symbol name and symbol address
6693 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
6694 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
6696 # Handle CRLF in mingw tool chain
6697 opt_cr=
6698 case $build_os in
6699 mingw*)
6700   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6701   ;;
6702 esac
6704 # Try without a prefix underscore, then with it.
6705 for ac_symprfx in "" "_"; do
6707   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6708   symxfrm="\\1 $ac_symprfx\\2 \\2"
6710   # Write the raw and C identifiers.
6711   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6712     # Fake it for dumpbin and say T for any non-static function
6713     # and D for any global variable.
6714     # Also find C++ and __fastcall symbols from MSVC++,
6715     # which start with @ or ?.
6716     lt_cv_sys_global_symbol_pipe="$AWK ['"\
6717 "     {last_section=section; section=\$ 3};"\
6718 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
6719 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6720 "     \$ 0!~/External *\|/{next};"\
6721 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
6722 "     {if(hide[section]) next};"\
6723 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
6724 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
6725 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
6726 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
6727 "     ' prfx=^$ac_symprfx]"
6728   else
6729     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6730   fi
6731   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
6733   # Check to see that the pipe works correctly.
6734   pipe_works=no
6736   rm -f conftest*
6737   cat > conftest.$ac_ext <<_LT_EOF
6738 #ifdef __cplusplus
6739 extern "C" {
6740 #endif
6741 char nm_test_var;
6742 void nm_test_func(void);
6743 void nm_test_func(void){}
6744 #ifdef __cplusplus
6746 #endif
6747 int main(){nm_test_var='a';nm_test_func();return(0);}
6748 _LT_EOF
6750   if AC_TRY_EVAL(ac_compile); then
6751     # Now try to grab the symbols.
6752     nlist=conftest.nm
6753     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
6754       # Try sorting and uniquifying the output.
6755       if sort "$nlist" | uniq > "$nlist"T; then
6756         mv -f "$nlist"T "$nlist"
6757       else
6758         rm -f "$nlist"T
6759       fi
6761       # Make sure that we snagged all the symbols we need.
6762       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
6763         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
6764           cat <<_LT_EOF > conftest.$ac_ext
6765 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
6766 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
6767 /* DATA imports from DLLs on WIN32 con't be const, because runtime
6768    relocations are performed -- see ld's documentation on pseudo-relocs.  */
6769 # define LT@&t@_DLSYM_CONST
6770 #elif defined(__osf__)
6771 /* This system does not cope well with relocations in const data.  */
6772 # define LT@&t@_DLSYM_CONST
6773 #else
6774 # define LT@&t@_DLSYM_CONST const
6775 #endif
6777 #ifdef __cplusplus
6778 extern "C" {
6779 #endif
6781 _LT_EOF
6782           # Now generate the symbol file.
6783           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
6785           cat <<_LT_EOF >> conftest.$ac_ext
6787 /* The mapping between symbol names and symbols.  */
6788 LT@&t@_DLSYM_CONST struct {
6789   const char *name;
6790   void       *address;
6792 lt__PROGRAM__LTX_preloaded_symbols[[]] =
6794   { "@PROGRAM@", (void *) 0 },
6795 _LT_EOF
6796           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
6797           cat <<\_LT_EOF >> conftest.$ac_ext
6798   {0, (void *) 0}
6801 /* This works around a problem in FreeBSD linker */
6802 #ifdef FREEBSD_WORKAROUND
6803 static const void *lt_preloaded_setup() {
6804   return lt__PROGRAM__LTX_preloaded_symbols;
6806 #endif
6808 #ifdef __cplusplus
6810 #endif
6811 _LT_EOF
6812           # Now try linking the two files.
6813           mv conftest.$ac_objext conftstm.$ac_objext
6814           lt_globsym_save_LIBS=$LIBS
6815           lt_globsym_save_CFLAGS=$CFLAGS
6816           LIBS="conftstm.$ac_objext"
6817           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6818           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6819             pipe_works=yes
6820           fi
6821           LIBS=$lt_globsym_save_LIBS
6822           CFLAGS=$lt_globsym_save_CFLAGS
6823         else
6824           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6825         fi
6826       else
6827         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6828       fi
6829     else
6830       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6831     fi
6832   else
6833     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6834     cat conftest.$ac_ext >&5
6835   fi
6836   rm -rf conftest* conftst*
6838   # Do not use the global_symbol_pipe unless it works.
6839   if test "$pipe_works" = yes; then
6840     break
6841   else
6842     lt_cv_sys_global_symbol_pipe=
6843   fi
6844 done
6846 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6847   lt_cv_sys_global_symbol_to_cdecl=
6849 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6850   AC_MSG_RESULT(failed)
6851 else
6852   AC_MSG_RESULT(ok)
6855 # Response file support.
6856 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6857   nm_file_list_spec='@'
6858 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
6859   nm_file_list_spec='@'
6862 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6863     [Take the output of nm and produce a listing of raw symbols and C names])
6864 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6865     [Transform the output of nm in a proper C declaration])
6866 _LT_DECL([global_symbol_to_c_name_address],
6867     [lt_cv_sys_global_symbol_to_c_name_address], [1],
6868     [Transform the output of nm in a C name address pair])
6869 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6870     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6871     [Transform the output of nm in a C name address pair when lib prefix is needed])
6872 _LT_DECL([], [nm_file_list_spec], [1],
6873     [Specify filename containing input files for $NM])
6874 ]) # _LT_CMD_GLOBAL_SYMBOLS
6877 # _LT_COMPILER_PIC([TAGNAME])
6878 # ---------------------------
6879 m4_defun([_LT_COMPILER_PIC],
6880 [m4_require([_LT_TAG_COMPILER])dnl
6881 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
6882 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6883 _LT_TAGVAR(lt_prog_compiler_static, $1)=
6885 m4_if([$1], [CXX], [
6886   # C++ specific cases for pic, static, wl, etc.
6887   if test "$GXX" = yes; then
6888     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6889     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6891     case $host_os in
6892     aix*)
6893       # All AIX code is PIC.
6894       if test "$host_cpu" = ia64; then
6895         # AIX 5 now supports IA64 processor
6896         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6897       fi
6898       ;;
6900     amigaos*)
6901       case $host_cpu in
6902       powerpc)
6903             # see comment about AmigaOS4 .so support
6904             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6905         ;;
6906       m68k)
6907             # FIXME: we need at least 68020 code to build shared libraries, but
6908             # adding the `-m68020' flag to GCC prevents building anything better,
6909             # like `-m68040'.
6910             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6911         ;;
6912       esac
6913       ;;
6915     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6916       # PIC is the default for these OSes.
6917       ;;
6918     mingw* | cygwin* | os2* | pw32* | cegcc*)
6919       # This hack is so that the source file can tell whether it is being
6920       # built for inclusion in a dll (and should export symbols for example).
6921       # Although the cygwin gcc ignores -fPIC, still need this for old-style
6922       # (--disable-auto-import) libraries
6923       m4_if([$1], [GCJ], [],
6924         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6925       ;;
6926     darwin* | rhapsody*)
6927       # PIC is the default on this platform
6928       # Common symbols not allowed in MH_DYLIB files
6929       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6930       ;;
6931     *djgpp*)
6932       # DJGPP does not support shared libraries at all
6933       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6934       ;;
6935     haiku*)
6936       # PIC is the default for Haiku.
6937       # The "-static" flag exists, but is broken.
6938       _LT_TAGVAR(lt_prog_compiler_static, $1)=
6939       ;;
6940     interix[[3-9]]*)
6941       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6942       # Instead, we relocate shared libraries at runtime.
6943       ;;
6944     sysv4*MP*)
6945       if test -d /usr/nec; then
6946         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6947       fi
6948       ;;
6949     hpux*)
6950       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6951       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6952       # sets the default TLS model and affects inlining.
6953       case $host_cpu in
6954       hppa*64*)
6955         ;;
6956       *)
6957         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6958         ;;
6959       esac
6960       ;;
6961     *qnx* | *nto*)
6962       # QNX uses GNU C++, but need to define -shared option too, otherwise
6963       # it will coredump.
6964       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6965       ;;
6966     *)
6967       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6968       ;;
6969     esac
6970   else
6971     case $host_os in
6972       aix[[4-9]]*)
6973         # All AIX code is PIC.
6974         if test "$host_cpu" = ia64; then
6975           # AIX 5 now supports IA64 processor
6976           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6977         else
6978           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6979         fi
6980         ;;
6981       chorus*)
6982         case $cc_basename in
6983         cxch68*)
6984           # Green Hills C++ Compiler
6985           # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
6986           ;;
6987         esac
6988         ;;
6989       mingw* | cygwin* | os2* | pw32* | cegcc*)
6990         # This hack is so that the source file can tell whether it is being
6991         # built for inclusion in a dll (and should export symbols for example).
6992         m4_if([$1], [GCJ], [],
6993           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6994         ;;
6995       dgux*)
6996         case $cc_basename in
6997           ec++*)
6998             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6999             ;;
7000           ghcx*)
7001             # Green Hills C++ Compiler
7002             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7003             ;;
7004           *)
7005             ;;
7006         esac
7007         ;;
7008       freebsd* | dragonfly*)
7009         # FreeBSD uses GNU C++
7010         ;;
7011       hpux9* | hpux10* | hpux11*)
7012         case $cc_basename in
7013           CC*)
7014             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7015             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7016             if test "$host_cpu" != ia64; then
7017               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7018             fi
7019             ;;
7020           aCC*)
7021             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7022             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7023             case $host_cpu in
7024             hppa*64*|ia64*)
7025               # +Z the default
7026               ;;
7027             *)
7028               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7029               ;;
7030             esac
7031             ;;
7032           *)
7033             ;;
7034         esac
7035         ;;
7036       interix*)
7037         # This is c89, which is MS Visual C++ (no shared libs)
7038         # Anyone wants to do a port?
7039         ;;
7040       irix5* | irix6* | nonstopux*)
7041         case $cc_basename in
7042           CC*)
7043             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7044             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7045             # CC pic flag -KPIC is the default.
7046             ;;
7047           *)
7048             ;;
7049         esac
7050         ;;
7051       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7052         case $cc_basename in
7053           KCC*)
7054             # KAI C++ Compiler
7055             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7056             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7057             ;;
7058           ecpc* )
7059             # old Intel C++ for x86_64 which still supported -KPIC.
7060             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7061             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7062             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7063             ;;
7064           icpc* )
7065             # Intel C++, used to be incompatible with GCC.
7066             # ICC 10 doesn't accept -KPIC any more.
7067             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7068             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7069             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7070             ;;
7071           pgCC* | pgcpp*)
7072             # Portland Group C++ compiler
7073             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7074             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7075             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7076             ;;
7077           cxx*)
7078             # Compaq C++
7079             # Make sure the PIC flag is empty.  It appears that all Alpha
7080             # Linux and Compaq Tru64 Unix objects are PIC.
7081             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7082             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7083             ;;
7084           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
7085             # IBM XL 8.0, 9.0 on PPC and BlueGene
7086             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7087             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
7088             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
7089             ;;
7090           *)
7091             case `$CC -V 2>&1 | sed 5q` in
7092             *Sun\ C*)
7093               # Sun C++ 5.9
7094               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7095               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7096               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7097               ;;
7098             esac
7099             ;;
7100         esac
7101         ;;
7102       lynxos*)
7103         ;;
7104       m88k*)
7105         ;;
7106       mvs*)
7107         case $cc_basename in
7108           cxx*)
7109             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7110             ;;
7111           *)
7112             ;;
7113         esac
7114         ;;
7115       netbsd* | netbsdelf*-gnu)
7116         ;;
7117       *qnx* | *nto*)
7118         # QNX uses GNU C++, but need to define -shared option too, otherwise
7119         # it will coredump.
7120         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7121         ;;
7122       osf3* | osf4* | osf5*)
7123         case $cc_basename in
7124           KCC*)
7125             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7126             ;;
7127           RCC*)
7128             # Rational C++ 2.4.1
7129             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7130             ;;
7131           cxx*)
7132             # Digital/Compaq C++
7133             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7134             # Make sure the PIC flag is empty.  It appears that all Alpha
7135             # Linux and Compaq Tru64 Unix objects are PIC.
7136             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7137             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7138             ;;
7139           *)
7140             ;;
7141         esac
7142         ;;
7143       psos*)
7144         ;;
7145       solaris*)
7146         case $cc_basename in
7147           CC* | sunCC*)
7148             # Sun C++ 4.2, 5.x and Centerline C++
7149             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7150             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7151             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7152             ;;
7153           gcx*)
7154             # Green Hills C++ Compiler
7155             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7156             ;;
7157           *)
7158             ;;
7159         esac
7160         ;;
7161       sunos4*)
7162         case $cc_basename in
7163           CC*)
7164             # Sun C++ 4.x
7165             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7166             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7167             ;;
7168           lcc*)
7169             # Lucid
7170             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7171             ;;
7172           *)
7173             ;;
7174         esac
7175         ;;
7176       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7177         case $cc_basename in
7178           CC*)
7179             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7180             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7181             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7182             ;;
7183         esac
7184         ;;
7185       tandem*)
7186         case $cc_basename in
7187           NCC*)
7188             # NonStop-UX NCC 3.20
7189             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7190             ;;
7191           *)
7192             ;;
7193         esac
7194         ;;
7195       vxworks*)
7196         ;;
7197       *)
7198         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7199         ;;
7200     esac
7201   fi
7204   if test "$GCC" = yes; then
7205     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7206     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7208     case $host_os in
7209       aix*)
7210       # All AIX code is PIC.
7211       if test "$host_cpu" = ia64; then
7212         # AIX 5 now supports IA64 processor
7213         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7214       fi
7215       ;;
7217     amigaos*)
7218       case $host_cpu in
7219       powerpc)
7220             # see comment about AmigaOS4 .so support
7221             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7222         ;;
7223       m68k)
7224             # FIXME: we need at least 68020 code to build shared libraries, but
7225             # adding the `-m68020' flag to GCC prevents building anything better,
7226             # like `-m68040'.
7227             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7228         ;;
7229       esac
7230       ;;
7232     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7233       # PIC is the default for these OSes.
7234       ;;
7236     mingw* | cygwin* | pw32* | os2* | cegcc*)
7237       # This hack is so that the source file can tell whether it is being
7238       # built for inclusion in a dll (and should export symbols for example).
7239       # Although the cygwin gcc ignores -fPIC, still need this for old-style
7240       # (--disable-auto-import) libraries
7241       m4_if([$1], [GCJ], [],
7242         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7243       ;;
7245     darwin* | rhapsody*)
7246       # PIC is the default on this platform
7247       # Common symbols not allowed in MH_DYLIB files
7248       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7249       ;;
7251     haiku*)
7252       # PIC is the default for Haiku.
7253       # The "-static" flag exists, but is broken.
7254       _LT_TAGVAR(lt_prog_compiler_static, $1)=
7255       ;;
7257     hpux*)
7258       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7259       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
7260       # sets the default TLS model and affects inlining.
7261       case $host_cpu in
7262       hppa*64*)
7263         # +Z the default
7264         ;;
7265       *)
7266         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7267         ;;
7268       esac
7269       ;;
7271     interix[[3-9]]*)
7272       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7273       # Instead, we relocate shared libraries at runtime.
7274       ;;
7276     msdosdjgpp*)
7277       # Just because we use GCC doesn't mean we suddenly get shared libraries
7278       # on systems that don't support them.
7279       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7280       enable_shared=no
7281       ;;
7283     *nto* | *qnx*)
7284       # QNX uses GNU C++, but need to define -shared option too, otherwise
7285       # it will coredump.
7286       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7287       ;;
7289     sysv4*MP*)
7290       if test -d /usr/nec; then
7291         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7292       fi
7293       ;;
7295     *)
7296       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7297       ;;
7298     esac
7300     case $cc_basename in
7301     nvcc*) # Cuda Compiler Driver 2.2
7302       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
7303       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
7304         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
7305       fi
7306       ;;
7307     esac
7308   else
7309     # PORTME Check for flag to pass linker flags through the system compiler.
7310     case $host_os in
7311     aix*)
7312       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7313       if test "$host_cpu" = ia64; then
7314         # AIX 5 now supports IA64 processor
7315         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7316       else
7317         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7318       fi
7319       ;;
7321     mingw* | cygwin* | pw32* | os2* | cegcc*)
7322       # This hack is so that the source file can tell whether it is being
7323       # built for inclusion in a dll (and should export symbols for example).
7324       m4_if([$1], [GCJ], [],
7325         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7326       ;;
7328     hpux9* | hpux10* | hpux11*)
7329       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7330       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7331       # not for PA HP-UX.
7332       case $host_cpu in
7333       hppa*64*|ia64*)
7334         # +Z the default
7335         ;;
7336       *)
7337         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7338         ;;
7339       esac
7340       # Is there a better lt_prog_compiler_static that works with the bundled CC?
7341       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7342       ;;
7344     irix5* | irix6* | nonstopux*)
7345       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7346       # PIC (with -KPIC) is the default.
7347       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7348       ;;
7350     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7351       case $cc_basename in
7352       # old Intel for x86_64 which still supported -KPIC.
7353       ecc*)
7354         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7355         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7356         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7357         ;;
7358       # icc used to be incompatible with GCC.
7359       # ICC 10 doesn't accept -KPIC any more.
7360       icc* | ifort*)
7361         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7362         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7363         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7364         ;;
7365       # Lahey Fortran 8.1.
7366       lf95*)
7367         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7368         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
7369         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
7370         ;;
7371       nagfor*)
7372         # NAG Fortran compiler
7373         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
7374         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7375         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7376         ;;
7377       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
7378         # Portland Group compilers (*not* the Pentium gcc compiler,
7379         # which looks to be a dead project)
7380         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7381         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7382         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7383         ;;
7384       ccc*)
7385         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7386         # All Alpha code is PIC.
7387         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7388         ;;
7389       xl* | bgxl* | bgf* | mpixl*)
7390         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
7391         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7392         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
7393         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
7394         ;;
7395       *)
7396         case `$CC -V 2>&1 | sed 5q` in
7397         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
7398           # Sun Fortran 8.3 passes all unrecognized flags to the linker
7399           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7400           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7401           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
7402           ;;
7403         *Sun\ F* | *Sun*Fortran*)
7404           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7405           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7406           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7407           ;;
7408         *Sun\ C*)
7409           # Sun C 5.9
7410           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7411           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7412           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7413           ;;
7414         *Intel*\ [[CF]]*Compiler*)
7415           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7416           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7417           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7418           ;;
7419         *Portland\ Group*)
7420           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7421           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7422           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7423           ;;
7424         esac
7425         ;;
7426       esac
7427       ;;
7429     newsos6)
7430       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7431       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7432       ;;
7434     *nto* | *qnx*)
7435       # QNX uses GNU C++, but need to define -shared option too, otherwise
7436       # it will coredump.
7437       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7438       ;;
7440     osf3* | osf4* | osf5*)
7441       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7442       # All OSF/1 code is PIC.
7443       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7444       ;;
7446     rdos*)
7447       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7448       ;;
7450     solaris*)
7451       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7452       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7453       case $cc_basename in
7454       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
7455         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
7456       *)
7457         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
7458       esac
7459       ;;
7461     sunos4*)
7462       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7463       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7464       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7465       ;;
7467     sysv4 | sysv4.2uw2* | sysv4.3*)
7468       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7469       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7470       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7471       ;;
7473     sysv4*MP*)
7474       if test -d /usr/nec ;then
7475         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
7476         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7477       fi
7478       ;;
7480     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7481       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7482       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7483       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7484       ;;
7486     unicos*)
7487       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7488       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7489       ;;
7491     uts4*)
7492       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7493       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7494       ;;
7496     *)
7497       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7498       ;;
7499     esac
7500   fi
7502 case $host_os in
7503   # For platforms which do not support PIC, -DPIC is meaningless:
7504   *djgpp*)
7505     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7506     ;;
7507   *)
7508     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
7509     ;;
7510 esac
7512 AC_CACHE_CHECK([for $compiler option to produce PIC],
7513   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
7514   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
7515 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
7518 # Check to make sure the PIC flag actually works.
7520 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
7521   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
7522     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
7523     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
7524     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
7525      "" | " "*) ;;
7526      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
7527      esac],
7528     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
7529      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
7531 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
7532         [Additional compiler flags for building library objects])
7534 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
7535         [How to pass a linker flag through the compiler])
7537 # Check to make sure the static flag actually works.
7539 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
7540 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
7541   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
7542   $lt_tmp_static_flag,
7543   [],
7544   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
7545 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
7546         [Compiler flag to prevent dynamic linking])
7547 ])# _LT_COMPILER_PIC
7550 # _LT_LINKER_SHLIBS([TAGNAME])
7551 # ----------------------------
7552 # See if the linker supports building shared libraries.
7553 m4_defun([_LT_LINKER_SHLIBS],
7554 [AC_REQUIRE([LT_PATH_LD])dnl
7555 AC_REQUIRE([LT_PATH_NM])dnl
7556 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7557 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7558 m4_require([_LT_DECL_EGREP])dnl
7559 m4_require([_LT_DECL_SED])dnl
7560 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
7561 m4_require([_LT_TAG_COMPILER])dnl
7562 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7563 m4_if([$1], [CXX], [
7564   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7565   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7566   case $host_os in
7567   aix[[4-9]]*)
7568     # If we're using GNU nm, then we don't want the "-C" option.
7569     # -C means demangle to AIX nm, but means don't demangle with GNU nm
7570     # Also, AIX nm treats weak defined symbols like other global defined
7571     # symbols, whereas GNU nm marks them as "W".
7572     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7573       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
7574     else
7575       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
7576     fi
7577     ;;
7578   pw32*)
7579     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7580     ;;
7581   cygwin* | mingw* | cegcc*)
7582     case $cc_basename in
7583     cl*)
7584       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7585       ;;
7586     *)
7587       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
7588       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7589       ;;
7590     esac
7591     ;;
7592   linux* | k*bsd*-gnu | gnu*)
7593     _LT_TAGVAR(link_all_deplibs, $1)=no
7594     ;;
7595   *)
7596     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7597     ;;
7598   esac
7599 ], [
7600   runpath_var=
7601   _LT_TAGVAR(allow_undefined_flag, $1)=
7602   _LT_TAGVAR(always_export_symbols, $1)=no
7603   _LT_TAGVAR(archive_cmds, $1)=
7604   _LT_TAGVAR(archive_expsym_cmds, $1)=
7605   _LT_TAGVAR(compiler_needs_object, $1)=no
7606   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7607   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7608   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7609   _LT_TAGVAR(hardcode_automatic, $1)=no
7610   _LT_TAGVAR(hardcode_direct, $1)=no
7611   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7612   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7613   _LT_TAGVAR(hardcode_libdir_separator, $1)=
7614   _LT_TAGVAR(hardcode_minus_L, $1)=no
7615   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7616   _LT_TAGVAR(inherit_rpath, $1)=no
7617   _LT_TAGVAR(link_all_deplibs, $1)=unknown
7618   _LT_TAGVAR(module_cmds, $1)=
7619   _LT_TAGVAR(module_expsym_cmds, $1)=
7620   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
7621   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7622   _LT_TAGVAR(thread_safe_flag_spec, $1)=
7623   _LT_TAGVAR(whole_archive_flag_spec, $1)=
7624   # include_expsyms should be a list of space-separated symbols to be *always*
7625   # included in the symbol list
7626   _LT_TAGVAR(include_expsyms, $1)=
7627   # exclude_expsyms can be an extended regexp of symbols to exclude
7628   # it will be wrapped by ` (' and `)$', so one must not match beginning or
7629   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7630   # as well as any symbol that contains `d'.
7631   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7632   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7633   # platforms (ab)use it in PIC code, but their linkers get confused if
7634   # the symbol is explicitly referenced.  Since portable code cannot
7635   # rely on this symbol name, it's probably fine to never include it in
7636   # preloaded symbol tables.
7637   # Exclude shared library initialization/finalization symbols.
7638 dnl Note also adjust exclude_expsyms for C++ above.
7639   extract_expsyms_cmds=
7641   case $host_os in
7642   cygwin* | mingw* | pw32* | cegcc*)
7643     # FIXME: the MSVC++ port hasn't been tested in a loooong time
7644     # When not using gcc, we currently assume that we are using
7645     # Microsoft Visual C++.
7646     if test "$GCC" != yes; then
7647       with_gnu_ld=no
7648     fi
7649     ;;
7650   interix*)
7651     # we just hope/assume this is gcc and not c89 (= MSVC++)
7652     with_gnu_ld=yes
7653     ;;
7654   openbsd*)
7655     with_gnu_ld=no
7656     ;;
7657   linux* | k*bsd*-gnu | gnu*)
7658     _LT_TAGVAR(link_all_deplibs, $1)=no
7659     ;;
7660   esac
7662   _LT_TAGVAR(ld_shlibs, $1)=yes
7664   # On some targets, GNU ld is compatible enough with the native linker
7665   # that we're better off using the native interface for both.
7666   lt_use_gnu_ld_interface=no
7667   if test "$with_gnu_ld" = yes; then
7668     case $host_os in
7669       aix*)
7670         # The AIX port of GNU ld has always aspired to compatibility
7671         # with the native linker.  However, as the warning in the GNU ld
7672         # block says, versions before 2.19.5* couldn't really create working
7673         # shared libraries, regardless of the interface used.
7674         case `$LD -v 2>&1` in
7675           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
7676           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
7677           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
7678           *)
7679             lt_use_gnu_ld_interface=yes
7680             ;;
7681         esac
7682         ;;
7683       *)
7684         lt_use_gnu_ld_interface=yes
7685         ;;
7686     esac
7687   fi
7689   if test "$lt_use_gnu_ld_interface" = yes; then
7690     # If archive_cmds runs LD, not CC, wlarc should be empty
7691     wlarc='${wl}'
7693     # Set some defaults for GNU ld with shared library support. These
7694     # are reset later if shared libraries are not supported. Putting them
7695     # here allows them to be overridden if necessary.
7696     runpath_var=LD_RUN_PATH
7697     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7698     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7699     # ancient GNU ld didn't support --whole-archive et. al.
7700     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
7701       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7702     else
7703       _LT_TAGVAR(whole_archive_flag_spec, $1)=
7704     fi
7705     supports_anon_versioning=no
7706     case `$LD -v 2>&1` in
7707       *GNU\ gold*) supports_anon_versioning=yes ;;
7708       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7709       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7710       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7711       *\ 2.11.*) ;; # other 2.11 versions
7712       *) supports_anon_versioning=yes ;;
7713     esac
7715     # See if GNU ld supports shared libraries.
7716     case $host_os in
7717     aix[[3-9]]*)
7718       # On AIX/PPC, the GNU linker is very broken
7719       if test "$host_cpu" != ia64; then
7720         _LT_TAGVAR(ld_shlibs, $1)=no
7721         cat <<_LT_EOF 1>&2
7723 *** Warning: the GNU linker, at least up to release 2.19, is reported
7724 *** to be unable to reliably create shared libraries on AIX.
7725 *** Therefore, libtool is disabling shared libraries support.  If you
7726 *** really care for shared libraries, you may want to install binutils
7727 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
7728 *** You will then need to restart the configuration process.
7730 _LT_EOF
7731       fi
7732       ;;
7734     amigaos*)
7735       case $host_cpu in
7736       powerpc)
7737             # see comment about AmigaOS4 .so support
7738             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7739             _LT_TAGVAR(archive_expsym_cmds, $1)=''
7740         ;;
7741       m68k)
7742             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7743             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7744             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7745         ;;
7746       esac
7747       ;;
7749     beos*)
7750       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7751         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7752         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7753         # support --undefined.  This deserves some investigation.  FIXME
7754         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7755       else
7756         _LT_TAGVAR(ld_shlibs, $1)=no
7757       fi
7758       ;;
7760     cygwin* | mingw* | pw32* | cegcc*)
7761       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7762       # as there is no search path for DLLs.
7763       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7764       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7765       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7766       _LT_TAGVAR(always_export_symbols, $1)=no
7767       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7768       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
7769       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7771       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7772         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7773         # If the export-symbols file already is a .def file (1st line
7774         # is EXPORTS), use it as is; otherwise, prepend...
7775         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7776           cp $export_symbols $output_objdir/$soname.def;
7777         else
7778           echo EXPORTS > $output_objdir/$soname.def;
7779           cat $export_symbols >> $output_objdir/$soname.def;
7780         fi~
7781         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7782       else
7783         _LT_TAGVAR(ld_shlibs, $1)=no
7784       fi
7785       ;;
7787     haiku*)
7788       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7789       _LT_TAGVAR(link_all_deplibs, $1)=yes
7790       ;;
7792     interix[[3-9]]*)
7793       _LT_TAGVAR(hardcode_direct, $1)=no
7794       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7795       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7796       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7797       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7798       # Instead, shared libraries are loaded at an image base (0x10000000 by
7799       # default) and relocated if they conflict, which is a slow very memory
7800       # consuming and fragmenting process.  To avoid this, we pick a random,
7801       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7802       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7803       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7804       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7805       ;;
7807     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
7808       tmp_diet=no
7809       if test "$host_os" = linux-dietlibc; then
7810         case $cc_basename in
7811           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
7812         esac
7813       fi
7814       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
7815          && test "$tmp_diet" = no
7816       then
7817         tmp_addflag=' $pic_flag'
7818         tmp_sharedflag='-shared'
7819         case $cc_basename,$host_cpu in
7820         pgcc*)                          # Portland Group C compiler
7821           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7822           tmp_addflag=' $pic_flag'
7823           ;;
7824         pgf77* | pgf90* | pgf95* | pgfortran*)
7825                                         # Portland Group f77 and f90 compilers
7826           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7827           tmp_addflag=' $pic_flag -Mnomain' ;;
7828         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
7829           tmp_addflag=' -i_dynamic' ;;
7830         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
7831           tmp_addflag=' -i_dynamic -nofor_main' ;;
7832         ifc* | ifort*)                  # Intel Fortran compiler
7833           tmp_addflag=' -nofor_main' ;;
7834         lf95*)                          # Lahey Fortran 8.1
7835           _LT_TAGVAR(whole_archive_flag_spec, $1)=
7836           tmp_sharedflag='--shared' ;;
7837         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
7838           tmp_sharedflag='-qmkshrobj'
7839           tmp_addflag= ;;
7840         nvcc*)  # Cuda Compiler Driver 2.2
7841           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7842           _LT_TAGVAR(compiler_needs_object, $1)=yes
7843           ;;
7844         esac
7845         case `$CC -V 2>&1 | sed 5q` in
7846         *Sun\ C*)                       # Sun C 5.9
7847           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7848           _LT_TAGVAR(compiler_needs_object, $1)=yes
7849           tmp_sharedflag='-G' ;;
7850         *Sun\ F*)                       # Sun Fortran 8.3
7851           tmp_sharedflag='-G' ;;
7852         esac
7853         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7855         if test "x$supports_anon_versioning" = xyes; then
7856           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7857             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7858             echo "local: *; };" >> $output_objdir/$libname.ver~
7859             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7860         fi
7862         case $cc_basename in
7863         xlf* | bgf* | bgxlf* | mpixlf*)
7864           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7865           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7866           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7867           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7868           if test "x$supports_anon_versioning" = xyes; then
7869             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7870               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7871               echo "local: *; };" >> $output_objdir/$libname.ver~
7872               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7873           fi
7874           ;;
7875         esac
7876       else
7877         _LT_TAGVAR(ld_shlibs, $1)=no
7878       fi
7879       ;;
7881     netbsd* | netbsdelf*-gnu)
7882       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7883         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7884         wlarc=
7885       else
7886         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7887         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7888       fi
7889       ;;
7891     solaris*)
7892       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
7893         _LT_TAGVAR(ld_shlibs, $1)=no
7894         cat <<_LT_EOF 1>&2
7896 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
7897 *** create shared libraries on Solaris systems.  Therefore, libtool
7898 *** is disabling shared libraries support.  We urge you to upgrade GNU
7899 *** binutils to release 2.9.1 or newer.  Another option is to modify
7900 *** your PATH or compiler configuration so that the native linker is
7901 *** used, and then restart.
7903 _LT_EOF
7904       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7905         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7906         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7907       else
7908         _LT_TAGVAR(ld_shlibs, $1)=no
7909       fi
7910       ;;
7912     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7913       case `$LD -v 2>&1` in
7914         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7915         _LT_TAGVAR(ld_shlibs, $1)=no
7916         cat <<_LT_EOF 1>&2
7918 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7919 *** reliably create shared libraries on SCO systems.  Therefore, libtool
7920 *** is disabling shared libraries support.  We urge you to upgrade GNU
7921 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7922 *** your PATH or compiler configuration so that the native linker is
7923 *** used, and then restart.
7925 _LT_EOF
7926         ;;
7927         *)
7928           # For security reasons, it is highly recommended that you always
7929           # use absolute paths for naming shared libraries, and exclude the
7930           # DT_RUNPATH tag from executables and libraries.  But doing so
7931           # requires that you compile everything twice, which is a pain.
7932           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7933             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7934             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7935             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7936           else
7937             _LT_TAGVAR(ld_shlibs, $1)=no
7938           fi
7939         ;;
7940       esac
7941       ;;
7943     sunos4*)
7944       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7945       wlarc=
7946       _LT_TAGVAR(hardcode_direct, $1)=yes
7947       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7948       ;;
7950     *)
7951       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7952         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7953         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7954       else
7955         _LT_TAGVAR(ld_shlibs, $1)=no
7956       fi
7957       ;;
7958     esac
7960     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
7961       runpath_var=
7962       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7963       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7964       _LT_TAGVAR(whole_archive_flag_spec, $1)=
7965     fi
7966   else
7967     # PORTME fill in a description of your system's linker (not GNU ld)
7968     case $host_os in
7969     aix3*)
7970       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7971       _LT_TAGVAR(always_export_symbols, $1)=yes
7972       _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7973       # Note: this linker hardcodes the directories in LIBPATH if there
7974       # are no directories specified by -L.
7975       _LT_TAGVAR(hardcode_minus_L, $1)=yes
7976       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7977         # Neither direct hardcoding nor static linking is supported with a
7978         # broken collect2.
7979         _LT_TAGVAR(hardcode_direct, $1)=unsupported
7980       fi
7981       ;;
7983     aix[[4-9]]*)
7984       if test "$host_cpu" = ia64; then
7985         # On IA64, the linker does run time linking by default, so we don't
7986         # have to do anything special.
7987         aix_use_runtimelinking=no
7988         exp_sym_flag='-Bexport'
7989         no_entry_flag=""
7990       else
7991         # If we're using GNU nm, then we don't want the "-C" option.
7992         # -C means demangle to AIX nm, but means don't demangle with GNU nm
7993         # Also, AIX nm treats weak defined symbols like other global
7994         # defined symbols, whereas GNU nm marks them as "W".
7995         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7996           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
7997         else
7998           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
7999         fi
8000         aix_use_runtimelinking=no
8002         # Test if we are trying to use run time linking or normal
8003         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8004         # need to do runtime linking.
8005         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8006           for ld_flag in $LDFLAGS; do
8007           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8008             aix_use_runtimelinking=yes
8009             break
8010           fi
8011           done
8012           ;;
8013         esac
8015         exp_sym_flag='-bexport'
8016         no_entry_flag='-bnoentry'
8017       fi
8019       # When large executables or shared objects are built, AIX ld can
8020       # have problems creating the table of contents.  If linking a library
8021       # or program results in "error TOC overflow" add -mminimal-toc to
8022       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8023       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8025       _LT_TAGVAR(archive_cmds, $1)=''
8026       _LT_TAGVAR(hardcode_direct, $1)=yes
8027       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8028       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8029       _LT_TAGVAR(link_all_deplibs, $1)=yes
8030       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
8032       if test "$GCC" = yes; then
8033         case $host_os in aix4.[[012]]|aix4.[[012]].*)
8034         # We only want to do this on AIX 4.2 and lower, the check
8035         # below for broken collect2 doesn't work under 4.3+
8036           collect2name=`${CC} -print-prog-name=collect2`
8037           if test -f "$collect2name" &&
8038            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8039           then
8040           # We have reworked collect2
8041           :
8042           else
8043           # We have old collect2
8044           _LT_TAGVAR(hardcode_direct, $1)=unsupported
8045           # It fails to find uninstalled libraries when the uninstalled
8046           # path is not listed in the libpath.  Setting hardcode_minus_L
8047           # to unsupported forces relinking
8048           _LT_TAGVAR(hardcode_minus_L, $1)=yes
8049           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8050           _LT_TAGVAR(hardcode_libdir_separator, $1)=
8051           fi
8052           ;;
8053         esac
8054         shared_flag='-shared'
8055         if test "$aix_use_runtimelinking" = yes; then
8056           shared_flag="$shared_flag "'${wl}-G'
8057         fi
8058         _LT_TAGVAR(link_all_deplibs, $1)=no
8059       else
8060         # not using gcc
8061         if test "$host_cpu" = ia64; then
8062         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8063         # chokes on -Wl,-G. The following line is correct:
8064           shared_flag='-G'
8065         else
8066           if test "$aix_use_runtimelinking" = yes; then
8067             shared_flag='${wl}-G'
8068           else
8069             shared_flag='${wl}-bM:SRE'
8070           fi
8071         fi
8072       fi
8074       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8075       # It seems that -bexpall does not export symbols beginning with
8076       # underscore (_), so it is better to generate a list of symbols to export.
8077       _LT_TAGVAR(always_export_symbols, $1)=yes
8078       if test "$aix_use_runtimelinking" = yes; then
8079         # Warning - without using the other runtime loading flags (-brtl),
8080         # -berok will link without error, but may produce a broken library.
8081         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8082         # Determine the default libpath from the value encoded in an
8083         # empty executable.
8084         _LT_SYS_MODULE_PATH_AIX([$1])
8085         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8086         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8087       else
8088         if test "$host_cpu" = ia64; then
8089           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8090           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8091           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8092         else
8093          # Determine the default libpath from the value encoded in an
8094          # empty executable.
8095          _LT_SYS_MODULE_PATH_AIX([$1])
8096          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8097           # Warning - without using the other run time loading flags,
8098           # -berok will link without error, but may produce a broken library.
8099           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8100           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8101           if test "$with_gnu_ld" = yes; then
8102             # We only use this code for GNU lds that support --whole-archive.
8103             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8104           else
8105             # Exported symbols can be pulled into shared objects from archives
8106             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8107           fi
8108           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8109           # This is similar to how AIX traditionally builds its shared libraries.
8110           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8111         fi
8112       fi
8113       ;;
8115     amigaos*)
8116       case $host_cpu in
8117       powerpc)
8118             # see comment about AmigaOS4 .so support
8119             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8120             _LT_TAGVAR(archive_expsym_cmds, $1)=''
8121         ;;
8122       m68k)
8123             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8124             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8125             _LT_TAGVAR(hardcode_minus_L, $1)=yes
8126         ;;
8127       esac
8128       ;;
8130     bsdi[[45]]*)
8131       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
8132       ;;
8134     cygwin* | mingw* | pw32* | cegcc*)
8135       # When not using gcc, we currently assume that we are using
8136       # Microsoft Visual C++.
8137       # hardcode_libdir_flag_spec is actually meaningless, as there is
8138       # no search path for DLLs.
8139       case $cc_basename in
8140       cl*)
8141         # Native MSVC
8142         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8143         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8144         _LT_TAGVAR(always_export_symbols, $1)=yes
8145         _LT_TAGVAR(file_list_spec, $1)='@'
8146         # Tell ltmain to make .lib files, not .a files.
8147         libext=lib
8148         # Tell ltmain to make .dll files, not .so files.
8149         shrext_cmds=".dll"
8150         # FIXME: Setting linknames here is a bad hack.
8151         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
8152         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8153             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
8154           else
8155             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
8156           fi~
8157           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8158           linknames='
8159         # The linker will not automatically build a static lib if we build a DLL.
8160         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8161         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8162         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8163         _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
8164         # Don't use ranlib
8165         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8166         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8167           lt_tool_outputfile="@TOOL_OUTPUT@"~
8168           case $lt_outputfile in
8169             *.exe|*.EXE) ;;
8170             *)
8171               lt_outputfile="$lt_outputfile.exe"
8172               lt_tool_outputfile="$lt_tool_outputfile.exe"
8173               ;;
8174           esac~
8175           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
8176             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8177             $RM "$lt_outputfile.manifest";
8178           fi'
8179         ;;
8180       *)
8181         # Assume MSVC wrapper
8182         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8183         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8184         # Tell ltmain to make .lib files, not .a files.
8185         libext=lib
8186         # Tell ltmain to make .dll files, not .so files.
8187         shrext_cmds=".dll"
8188         # FIXME: Setting linknames here is a bad hack.
8189         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
8190         # The linker will automatically build a .lib file if we build a DLL.
8191         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8192         # FIXME: Should let the user specify the lib program.
8193         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
8194         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8195         ;;
8196       esac
8197       ;;
8199     darwin* | rhapsody*)
8200       _LT_DARWIN_LINKER_FEATURES($1)
8201       ;;
8203     dgux*)
8204       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8205       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8206       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8207       ;;
8209     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8210     # support.  Future versions do this automatically, but an explicit c++rt0.o
8211     # does not break anything, and helps significantly (at the cost of a little
8212     # extra space).
8213     freebsd2.2*)
8214       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8215       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8216       _LT_TAGVAR(hardcode_direct, $1)=yes
8217       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8218       ;;
8220     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8221     freebsd2.*)
8222       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8223       _LT_TAGVAR(hardcode_direct, $1)=yes
8224       _LT_TAGVAR(hardcode_minus_L, $1)=yes
8225       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8226       ;;
8228     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8229     freebsd* | dragonfly*)
8230       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8231       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8232       _LT_TAGVAR(hardcode_direct, $1)=yes
8233       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8234       ;;
8236     hpux9*)
8237       if test "$GCC" = yes; then
8238         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8239       else
8240         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8241       fi
8242       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8243       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8244       _LT_TAGVAR(hardcode_direct, $1)=yes
8246       # hardcode_minus_L: Not really in the search PATH,
8247       # but as the default location of the library.
8248       _LT_TAGVAR(hardcode_minus_L, $1)=yes
8249       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8250       ;;
8252     hpux10*)
8253       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
8254         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8255       else
8256         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8257       fi
8258       if test "$with_gnu_ld" = no; then
8259         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8260         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8261         _LT_TAGVAR(hardcode_direct, $1)=yes
8262         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8263         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8264         # hardcode_minus_L: Not really in the search PATH,
8265         # but as the default location of the library.
8266         _LT_TAGVAR(hardcode_minus_L, $1)=yes
8267       fi
8268       ;;
8270     hpux11*)
8271       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
8272         case $host_cpu in
8273         hppa*64*)
8274           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8275           ;;
8276         ia64*)
8277           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8278           ;;
8279         *)
8280           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8281           ;;
8282         esac
8283       else
8284         case $host_cpu in
8285         hppa*64*)
8286           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8287           ;;
8288         ia64*)
8289           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8290           ;;
8291         *)
8292         m4_if($1, [], [
8293           # Older versions of the 11.00 compiler do not understand -b yet
8294           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
8295           _LT_LINKER_OPTION([if $CC understands -b],
8296             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
8297             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
8298             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
8299           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
8300           ;;
8301         esac
8302       fi
8303       if test "$with_gnu_ld" = no; then
8304         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8305         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8307         case $host_cpu in
8308         hppa*64*|ia64*)
8309           _LT_TAGVAR(hardcode_direct, $1)=no
8310           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8311           ;;
8312         *)
8313           _LT_TAGVAR(hardcode_direct, $1)=yes
8314           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8315           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8317           # hardcode_minus_L: Not really in the search PATH,
8318           # but as the default location of the library.
8319           _LT_TAGVAR(hardcode_minus_L, $1)=yes
8320           ;;
8321         esac
8322       fi
8323       ;;
8325     irix5* | irix6* | nonstopux*)
8326       if test "$GCC" = yes; then
8327         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8328         # Try to use the -exported_symbol ld option, if it does not
8329         # work, assume that -exports_file does not work either and
8330         # implicitly export all symbols.
8331         # This should be the same for all languages, so no per-tag cache variable.
8332         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
8333           [lt_cv_irix_exported_symbol],
8334           [save_LDFLAGS="$LDFLAGS"
8335            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
8336            AC_LINK_IFELSE(
8337              [AC_LANG_SOURCE(
8338                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
8339                               [C++], [[int foo (void) { return 0; }]],
8340                               [Fortran 77], [[
8341       subroutine foo
8342       end]],
8343                               [Fortran], [[
8344       subroutine foo
8345       end]])])],
8346               [lt_cv_irix_exported_symbol=yes],
8347               [lt_cv_irix_exported_symbol=no])
8348            LDFLAGS="$save_LDFLAGS"])
8349         if test "$lt_cv_irix_exported_symbol" = yes; then
8350           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
8351         fi
8352       else
8353         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8354         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
8355       fi
8356       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
8357       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8358       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8359       _LT_TAGVAR(inherit_rpath, $1)=yes
8360       _LT_TAGVAR(link_all_deplibs, $1)=yes
8361       ;;
8363     netbsd* | netbsdelf*-gnu)
8364       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8365         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
8366       else
8367         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
8368       fi
8369       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8370       _LT_TAGVAR(hardcode_direct, $1)=yes
8371       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8372       ;;
8374     newsos6)
8375       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8376       _LT_TAGVAR(hardcode_direct, $1)=yes
8377       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8378       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8379       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8380       ;;
8382     *nto* | *qnx*)
8383       ;;
8385     openbsd*)
8386       if test -f /usr/libexec/ld.so; then
8387         _LT_TAGVAR(hardcode_direct, $1)=yes
8388         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8389         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8390         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8391           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8392           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8393           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8394           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8395         else
8396           case $host_os in
8397            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
8398              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8399              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8400              ;;
8401            *)
8402              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8403              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8404              ;;
8405           esac
8406         fi
8407       else
8408         _LT_TAGVAR(ld_shlibs, $1)=no
8409       fi
8410       ;;
8412     os2*)
8413       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8414       _LT_TAGVAR(hardcode_minus_L, $1)=yes
8415       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8416       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
8417       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8418       ;;
8420     osf3*)
8421       if test "$GCC" = yes; then
8422         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8423         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8424       else
8425         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8426         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8427       fi
8428       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
8429       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8430       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8431       ;;
8433     osf4* | osf5*)      # as osf3* with the addition of -msym flag
8434       if test "$GCC" = yes; then
8435         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8436         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8437         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8438       else
8439         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8440         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
8441         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
8442         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
8444         # Both c and cxx compiler support -rpath directly
8445         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8446       fi
8447       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
8448       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8449       ;;
8451     solaris*)
8452       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
8453       if test "$GCC" = yes; then
8454         wlarc='${wl}'
8455         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8456         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8457           $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8458       else
8459         case `$CC -V 2>&1` in
8460         *"Compilers 5.0"*)
8461           wlarc=''
8462           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8463           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8464           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
8465           ;;
8466         *)
8467           wlarc='${wl}'
8468           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
8469           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8470           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8471           ;;
8472         esac
8473       fi
8474       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8475       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8476       case $host_os in
8477       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8478       *)
8479         # The compiler driver will combine and reorder linker options,
8480         # but understands `-z linker_flag'.  GCC discards it without `$wl',
8481         # but is careful enough not to reorder.
8482         # Supported since Solaris 2.6 (maybe 2.5.1?)
8483         if test "$GCC" = yes; then
8484           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8485         else
8486           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8487         fi
8488         ;;
8489       esac
8490       _LT_TAGVAR(link_all_deplibs, $1)=yes
8491       ;;
8493     sunos4*)
8494       if test "x$host_vendor" = xsequent; then
8495         # Use $CC to link under sequent, because it throws in some extra .o
8496         # files that make .init and .fini sections work.
8497         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8498       else
8499         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8500       fi
8501       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8502       _LT_TAGVAR(hardcode_direct, $1)=yes
8503       _LT_TAGVAR(hardcode_minus_L, $1)=yes
8504       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8505       ;;
8507     sysv4)
8508       case $host_vendor in
8509         sni)
8510           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8511           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
8512         ;;
8513         siemens)
8514           ## LD is ld it makes a PLAMLIB
8515           ## CC just makes a GrossModule.
8516           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8517           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
8518           _LT_TAGVAR(hardcode_direct, $1)=no
8519         ;;
8520         motorola)
8521           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8522           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
8523         ;;
8524       esac
8525       runpath_var='LD_RUN_PATH'
8526       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8527       ;;
8529     sysv4.3*)
8530       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8531       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8532       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
8533       ;;
8535     sysv4*MP*)
8536       if test -d /usr/nec; then
8537         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8538         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8539         runpath_var=LD_RUN_PATH
8540         hardcode_runpath_var=yes
8541         _LT_TAGVAR(ld_shlibs, $1)=yes
8542       fi
8543       ;;
8545     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8546       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8547       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8548       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8549       runpath_var='LD_RUN_PATH'
8551       if test "$GCC" = yes; then
8552         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8553         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8554       else
8555         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8556         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8557       fi
8558       ;;
8560     sysv5* | sco3.2v5* | sco5v6*)
8561       # Note: We can NOT use -z defs as we might desire, because we do not
8562       # link with -lc, and that would cause any symbols used from libc to
8563       # always be unresolved, which means just about no library would
8564       # ever link correctly.  If we're not using GNU ld we use -z text
8565       # though, which does catch some bad symbols but isn't as heavy-handed
8566       # as -z defs.
8567       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8568       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8569       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8570       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8571       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8572       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8573       _LT_TAGVAR(link_all_deplibs, $1)=yes
8574       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8575       runpath_var='LD_RUN_PATH'
8577       if test "$GCC" = yes; then
8578         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8579         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8580       else
8581         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8582         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8583       fi
8584       ;;
8586     uts4*)
8587       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8588       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8589       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8590       ;;
8592     *)
8593       _LT_TAGVAR(ld_shlibs, $1)=no
8594       ;;
8595     esac
8597     if test x$host_vendor = xsni; then
8598       case $host in
8599       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8600         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
8601         ;;
8602       esac
8603     fi
8604   fi
8606 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8607 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8609 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
8611 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
8612 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
8613 _LT_DECL([], [extract_expsyms_cmds], [2],
8614     [The commands to extract the exported symbol list from a shared archive])
8617 # Do we need to explicitly link libc?
8619 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
8620 x|xyes)
8621   # Assume -lc should be added
8622   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8624   if test "$enable_shared" = yes && test "$GCC" = yes; then
8625     case $_LT_TAGVAR(archive_cmds, $1) in
8626     *'~'*)
8627       # FIXME: we may have to deal with multi-command sequences.
8628       ;;
8629     '$CC '*)
8630       # Test whether the compiler implicitly links with -lc since on some
8631       # systems, -lgcc has to come before -lc. If gcc already passes -lc
8632       # to ld, don't add -lc before -lgcc.
8633       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
8634         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
8635         [$RM conftest*
8636         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8638         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8639           soname=conftest
8640           lib=conftest
8641           libobjs=conftest.$ac_objext
8642           deplibs=
8643           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
8644           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
8645           compiler_flags=-v
8646           linker_flags=-v
8647           verstring=
8648           output_objdir=.
8649           libname=conftest
8650           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
8651           _LT_TAGVAR(allow_undefined_flag, $1)=
8652           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
8653           then
8654             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8655           else
8656             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8657           fi
8658           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8659         else
8660           cat conftest.err 1>&5
8661         fi
8662         $RM conftest*
8663         ])
8664       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
8665       ;;
8666     esac
8667   fi
8668   ;;
8669 esac
8671 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
8672     [Whether or not to add -lc for building shared libraries])
8673 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
8674     [enable_shared_with_static_runtimes], [0],
8675     [Whether or not to disallow shared libs when runtime libs are static])
8676 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
8677     [Compiler flag to allow reflexive dlopens])
8678 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
8679     [Compiler flag to generate shared objects directly from archives])
8680 _LT_TAGDECL([], [compiler_needs_object], [1],
8681     [Whether the compiler copes with passing no objects directly])
8682 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
8683     [Create an old-style archive from a shared archive])
8684 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
8685     [Create a temporary old-style archive to link instead of a shared archive])
8686 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
8687 _LT_TAGDECL([], [archive_expsym_cmds], [2])
8688 _LT_TAGDECL([], [module_cmds], [2],
8689     [Commands used to build a loadable module if different from building
8690     a shared archive.])
8691 _LT_TAGDECL([], [module_expsym_cmds], [2])
8692 _LT_TAGDECL([], [with_gnu_ld], [1],
8693     [Whether we are building with GNU ld or not])
8694 _LT_TAGDECL([], [allow_undefined_flag], [1],
8695     [Flag that allows shared libraries with undefined symbols to be built])
8696 _LT_TAGDECL([], [no_undefined_flag], [1],
8697     [Flag that enforces no undefined symbols])
8698 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
8699     [Flag to hardcode $libdir into a binary during linking.
8700     This must work even if $libdir does not exist])
8701 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
8702     [Whether we need a single "-rpath" flag with a separated argument])
8703 _LT_TAGDECL([], [hardcode_direct], [0],
8704     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
8705     DIR into the resulting binary])
8706 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
8707     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
8708     DIR into the resulting binary and the resulting library dependency is
8709     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
8710     library is relocated])
8711 _LT_TAGDECL([], [hardcode_minus_L], [0],
8712     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
8713     into the resulting binary])
8714 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
8715     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
8716     into the resulting binary])
8717 _LT_TAGDECL([], [hardcode_automatic], [0],
8718     [Set to "yes" if building a shared library automatically hardcodes DIR
8719     into the library and all subsequent libraries and executables linked
8720     against it])
8721 _LT_TAGDECL([], [inherit_rpath], [0],
8722     [Set to yes if linker adds runtime paths of dependent libraries
8723     to runtime path list])
8724 _LT_TAGDECL([], [link_all_deplibs], [0],
8725     [Whether libtool must link a program against all its dependency libraries])
8726 _LT_TAGDECL([], [always_export_symbols], [0],
8727     [Set to "yes" if exported symbols are required])
8728 _LT_TAGDECL([], [export_symbols_cmds], [2],
8729     [The commands to list exported symbols])
8730 _LT_TAGDECL([], [exclude_expsyms], [1],
8731     [Symbols that should not be listed in the preloaded symbols])
8732 _LT_TAGDECL([], [include_expsyms], [1],
8733     [Symbols that must always be exported])
8734 _LT_TAGDECL([], [prelink_cmds], [2],
8735     [Commands necessary for linking programs (against libraries) with templates])
8736 _LT_TAGDECL([], [postlink_cmds], [2],
8737     [Commands necessary for finishing linking programs])
8738 _LT_TAGDECL([], [file_list_spec], [1],
8739     [Specify filename containing input files])
8740 dnl FIXME: Not yet implemented
8741 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
8742 dnl    [Compiler flag to generate thread safe objects])
8743 ])# _LT_LINKER_SHLIBS
8746 # _LT_LANG_C_CONFIG([TAG])
8747 # ------------------------
8748 # Ensure that the configuration variables for a C compiler are suitably
8749 # defined.  These variables are subsequently used by _LT_CONFIG to write
8750 # the compiler configuration to `libtool'.
8751 m4_defun([_LT_LANG_C_CONFIG],
8752 [m4_require([_LT_DECL_EGREP])dnl
8753 lt_save_CC="$CC"
8754 AC_LANG_PUSH(C)
8756 # Source file extension for C test sources.
8757 ac_ext=c
8759 # Object file extension for compiled C test sources.
8760 objext=o
8761 _LT_TAGVAR(objext, $1)=$objext
8763 # Code to be used in simple compile tests
8764 lt_simple_compile_test_code="int some_variable = 0;"
8766 # Code to be used in simple link tests
8767 lt_simple_link_test_code='int main(){return(0);}'
8769 _LT_TAG_COMPILER
8770 # Save the default compiler, since it gets overwritten when the other
8771 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8772 compiler_DEFAULT=$CC
8774 # save warnings/boilerplate of simple test code
8775 _LT_COMPILER_BOILERPLATE
8776 _LT_LINKER_BOILERPLATE
8778 ## CAVEAT EMPTOR:
8779 ## There is no encapsulation within the following macros, do not change
8780 ## the running order or otherwise move them around unless you know exactly
8781 ## what you are doing...
8782 if test -n "$compiler"; then
8783   _LT_COMPILER_NO_RTTI($1)
8784   _LT_COMPILER_PIC($1)
8785   _LT_COMPILER_C_O($1)
8786   _LT_COMPILER_FILE_LOCKS($1)
8787   _LT_LINKER_SHLIBS($1)
8788   _LT_SYS_DYNAMIC_LINKER($1)
8789   _LT_LINKER_HARDCODE_LIBPATH($1)
8790   LT_SYS_DLOPEN_SELF
8791   _LT_CMD_STRIPLIB
8793   # Report which library types will actually be built
8794   AC_MSG_CHECKING([if libtool supports shared libraries])
8795   AC_MSG_RESULT([$can_build_shared])
8797   AC_MSG_CHECKING([whether to build shared libraries])
8798   test "$can_build_shared" = "no" && enable_shared=no
8800   # On AIX, shared libraries and static libraries use the same namespace, and
8801   # are all built from PIC.
8802   case $host_os in
8803   aix3*)
8804     test "$enable_shared" = yes && enable_static=no
8805     if test -n "$RANLIB"; then
8806       archive_cmds="$archive_cmds~\$RANLIB \$lib"
8807       postinstall_cmds='$RANLIB $lib'
8808     fi
8809     ;;
8811   aix[[4-9]]*)
8812     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8813       test "$enable_shared" = yes && enable_static=no
8814     fi
8815     ;;
8816   esac
8817   AC_MSG_RESULT([$enable_shared])
8819   AC_MSG_CHECKING([whether to build static libraries])
8820   # Make sure either enable_shared or enable_static is yes.
8821   test "$enable_shared" = yes || enable_static=yes
8822   AC_MSG_RESULT([$enable_static])
8824   _LT_CONFIG($1)
8826 AC_LANG_POP
8827 CC="$lt_save_CC"
8828 ])# _LT_LANG_C_CONFIG
8831 # _LT_LANG_CXX_CONFIG([TAG])
8832 # --------------------------
8833 # Ensure that the configuration variables for a C++ compiler are suitably
8834 # defined.  These variables are subsequently used by _LT_CONFIG to write
8835 # the compiler configuration to `libtool'.
8836 m4_defun([_LT_LANG_CXX_CONFIG],
8837 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8838 m4_require([_LT_DECL_EGREP])dnl
8839 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8840 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
8841     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
8842     (test "X$CXX" != "Xg++"))) ; then
8843   AC_PROG_CXXCPP
8844 else
8845   _lt_caught_CXX_error=yes
8848 AC_LANG_PUSH(C++)
8849 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8850 _LT_TAGVAR(allow_undefined_flag, $1)=
8851 _LT_TAGVAR(always_export_symbols, $1)=no
8852 _LT_TAGVAR(archive_expsym_cmds, $1)=
8853 _LT_TAGVAR(compiler_needs_object, $1)=no
8854 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8855 _LT_TAGVAR(hardcode_direct, $1)=no
8856 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8858 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8859 _LT_TAGVAR(hardcode_minus_L, $1)=no
8860 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8861 _LT_TAGVAR(hardcode_automatic, $1)=no
8862 _LT_TAGVAR(inherit_rpath, $1)=no
8863 _LT_TAGVAR(module_cmds, $1)=
8864 _LT_TAGVAR(module_expsym_cmds, $1)=
8865 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8866 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8867 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8868 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8869 _LT_TAGVAR(no_undefined_flag, $1)=
8870 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8871 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8873 # Source file extension for C++ test sources.
8874 ac_ext=cpp
8876 # Object file extension for compiled C++ test sources.
8877 objext=o
8878 _LT_TAGVAR(objext, $1)=$objext
8880 # No sense in running all these tests if we already determined that
8881 # the CXX compiler isn't working.  Some variables (like enable_shared)
8882 # are currently assumed to apply to all compilers on this platform,
8883 # and will be corrupted by setting them based on a non-working compiler.
8884 if test "$_lt_caught_CXX_error" != yes; then
8885   # Code to be used in simple compile tests
8886   lt_simple_compile_test_code="int some_variable = 0;"
8888   # Code to be used in simple link tests
8889   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
8891   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8892   _LT_TAG_COMPILER
8894   # save warnings/boilerplate of simple test code
8895   _LT_COMPILER_BOILERPLATE
8896   _LT_LINKER_BOILERPLATE
8898   # Allow CC to be a program name with arguments.
8899   lt_save_CC=$CC
8900   lt_save_CFLAGS=$CFLAGS
8901   lt_save_LD=$LD
8902   lt_save_GCC=$GCC
8903   GCC=$GXX
8904   lt_save_with_gnu_ld=$with_gnu_ld
8905   lt_save_path_LD=$lt_cv_path_LD
8906   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8907     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8908   else
8909     $as_unset lt_cv_prog_gnu_ld
8910   fi
8911   if test -n "${lt_cv_path_LDCXX+set}"; then
8912     lt_cv_path_LD=$lt_cv_path_LDCXX
8913   else
8914     $as_unset lt_cv_path_LD
8915   fi
8916   test -z "${LDCXX+set}" || LD=$LDCXX
8917   CC=${CXX-"c++"}
8918   CFLAGS=$CXXFLAGS
8919   compiler=$CC
8920   _LT_TAGVAR(compiler, $1)=$CC
8921   _LT_CC_BASENAME([$compiler])
8923   if test -n "$compiler"; then
8924     # We don't want -fno-exception when compiling C++ code, so set the
8925     # no_builtin_flag separately
8926     if test "$GXX" = yes; then
8927       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8928     else
8929       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8930     fi
8932     if test "$GXX" = yes; then
8933       # Set up default GNU C++ configuration
8935       LT_PATH_LD
8937       # Check if GNU C++ uses GNU ld as the underlying linker, since the
8938       # archiving commands below assume that GNU ld is being used.
8939       if test "$with_gnu_ld" = yes; then
8940         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8941         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8943         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8944         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8946         # If archive_cmds runs LD, not CC, wlarc should be empty
8947         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8948         #     investigate it a little bit more. (MM)
8949         wlarc='${wl}'
8951         # ancient GNU ld didn't support --whole-archive et. al.
8952         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
8953           $GREP 'no-whole-archive' > /dev/null; then
8954           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8955         else
8956           _LT_TAGVAR(whole_archive_flag_spec, $1)=
8957         fi
8958       else
8959         with_gnu_ld=no
8960         wlarc=
8962         # A generic and very simple default shared library creation
8963         # command for GNU C++ for the case where it uses the native
8964         # linker, instead of GNU ld.  If possible, this setting should
8965         # overridden to take advantage of the native linker features on
8966         # the platform it is being used on.
8967         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8968       fi
8970       # Commands to make compiler produce verbose output that lists
8971       # what "hidden" libraries, object files and flags are used when
8972       # linking a shared library.
8973       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8975     else
8976       GXX=no
8977       with_gnu_ld=no
8978       wlarc=
8979     fi
8981     # PORTME: fill in a description of your system's C++ link characteristics
8982     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8983     _LT_TAGVAR(ld_shlibs, $1)=yes
8984     case $host_os in
8985       aix3*)
8986         # FIXME: insert proper C++ library support
8987         _LT_TAGVAR(ld_shlibs, $1)=no
8988         ;;
8989       aix[[4-9]]*)
8990         if test "$host_cpu" = ia64; then
8991           # On IA64, the linker does run time linking by default, so we don't
8992           # have to do anything special.
8993           aix_use_runtimelinking=no
8994           exp_sym_flag='-Bexport'
8995           no_entry_flag=""
8996         else
8997           aix_use_runtimelinking=no
8999           # Test if we are trying to use run time linking or normal
9000           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9001           # need to do runtime linking.
9002           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
9003             for ld_flag in $LDFLAGS; do
9004               case $ld_flag in
9005               *-brtl*)
9006                 aix_use_runtimelinking=yes
9007                 break
9008                 ;;
9009               esac
9010             done
9011             ;;
9012           esac
9014           exp_sym_flag='-bexport'
9015           no_entry_flag='-bnoentry'
9016         fi
9018         # When large executables or shared objects are built, AIX ld can
9019         # have problems creating the table of contents.  If linking a library
9020         # or program results in "error TOC overflow" add -mminimal-toc to
9021         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9022         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9024         _LT_TAGVAR(archive_cmds, $1)=''
9025         _LT_TAGVAR(hardcode_direct, $1)=yes
9026         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9027         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9028         _LT_TAGVAR(link_all_deplibs, $1)=yes
9029         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
9031         if test "$GXX" = yes; then
9032           case $host_os in aix4.[[012]]|aix4.[[012]].*)
9033           # We only want to do this on AIX 4.2 and lower, the check
9034           # below for broken collect2 doesn't work under 4.3+
9035           collect2name=`${CC} -print-prog-name=collect2`
9036           if test -f "$collect2name" &&
9037              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9038           then
9039             # We have reworked collect2
9040             :
9041           else
9042             # We have old collect2
9043             _LT_TAGVAR(hardcode_direct, $1)=unsupported
9044             # It fails to find uninstalled libraries when the uninstalled
9045             # path is not listed in the libpath.  Setting hardcode_minus_L
9046             # to unsupported forces relinking
9047             _LT_TAGVAR(hardcode_minus_L, $1)=yes
9048             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9049             _LT_TAGVAR(hardcode_libdir_separator, $1)=
9050           fi
9051           esac
9052           shared_flag='-shared'
9053           if test "$aix_use_runtimelinking" = yes; then
9054             shared_flag="$shared_flag "'${wl}-G'
9055           fi
9056         else
9057           # not using gcc
9058           if test "$host_cpu" = ia64; then
9059           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9060           # chokes on -Wl,-G. The following line is correct:
9061           shared_flag='-G'
9062           else
9063             if test "$aix_use_runtimelinking" = yes; then
9064               shared_flag='${wl}-G'
9065             else
9066               shared_flag='${wl}-bM:SRE'
9067             fi
9068           fi
9069         fi
9071         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
9072         # It seems that -bexpall does not export symbols beginning with
9073         # underscore (_), so it is better to generate a list of symbols to
9074         # export.
9075         _LT_TAGVAR(always_export_symbols, $1)=yes
9076         if test "$aix_use_runtimelinking" = yes; then
9077           # Warning - without using the other runtime loading flags (-brtl),
9078           # -berok will link without error, but may produce a broken library.
9079           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
9080           # Determine the default libpath from the value encoded in an empty
9081           # executable.
9082           _LT_SYS_MODULE_PATH_AIX([$1])
9083           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
9085           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
9086         else
9087           if test "$host_cpu" = ia64; then
9088             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
9089             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
9090             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
9091           else
9092             # Determine the default libpath from the value encoded in an
9093             # empty executable.
9094             _LT_SYS_MODULE_PATH_AIX([$1])
9095             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
9096             # Warning - without using the other run time loading flags,
9097             # -berok will link without error, but may produce a broken library.
9098             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
9099             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
9100             if test "$with_gnu_ld" = yes; then
9101               # We only use this code for GNU lds that support --whole-archive.
9102               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9103             else
9104               # Exported symbols can be pulled into shared objects from archives
9105               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
9106             fi
9107             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9108             # This is similar to how AIX traditionally builds its shared
9109             # libraries.
9110             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
9111           fi
9112         fi
9113         ;;
9115       beos*)
9116         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9117           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9118           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9119           # support --undefined.  This deserves some investigation.  FIXME
9120           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9121         else
9122           _LT_TAGVAR(ld_shlibs, $1)=no
9123         fi
9124         ;;
9126       chorus*)
9127         case $cc_basename in
9128           *)
9129           # FIXME: insert proper C++ library support
9130           _LT_TAGVAR(ld_shlibs, $1)=no
9131           ;;
9132         esac
9133         ;;
9135       cygwin* | mingw* | pw32* | cegcc*)
9136         case $GXX,$cc_basename in
9137         ,cl* | no,cl*)
9138           # Native MSVC
9139           # hardcode_libdir_flag_spec is actually meaningless, as there is
9140           # no search path for DLLs.
9141           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9142           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9143           _LT_TAGVAR(always_export_symbols, $1)=yes
9144           _LT_TAGVAR(file_list_spec, $1)='@'
9145           # Tell ltmain to make .lib files, not .a files.
9146           libext=lib
9147           # Tell ltmain to make .dll files, not .so files.
9148           shrext_cmds=".dll"
9149           # FIXME: Setting linknames here is a bad hack.
9150           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
9151           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9152               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
9153             else
9154               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
9155             fi~
9156             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9157             linknames='
9158           # The linker will not automatically build a static lib if we build a DLL.
9159           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
9160           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9161           # Don't use ranlib
9162           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
9163           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
9164             lt_tool_outputfile="@TOOL_OUTPUT@"~
9165             case $lt_outputfile in
9166               *.exe|*.EXE) ;;
9167               *)
9168                 lt_outputfile="$lt_outputfile.exe"
9169                 lt_tool_outputfile="$lt_tool_outputfile.exe"
9170                 ;;
9171             esac~
9172             func_to_tool_file "$lt_outputfile"~
9173             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
9174               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9175               $RM "$lt_outputfile.manifest";
9176             fi'
9177           ;;
9178         *)
9179           # g++
9180           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
9181           # as there is no search path for DLLs.
9182           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9183           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
9184           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9185           _LT_TAGVAR(always_export_symbols, $1)=no
9186           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9188           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9189             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9190             # If the export-symbols file already is a .def file (1st line
9191             # is EXPORTS), use it as is; otherwise, prepend...
9192             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9193               cp $export_symbols $output_objdir/$soname.def;
9194             else
9195               echo EXPORTS > $output_objdir/$soname.def;
9196               cat $export_symbols >> $output_objdir/$soname.def;
9197             fi~
9198             $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9199           else
9200             _LT_TAGVAR(ld_shlibs, $1)=no
9201           fi
9202           ;;
9203         esac
9204         ;;
9205       darwin* | rhapsody*)
9206         _LT_DARWIN_LINKER_FEATURES($1)
9207         ;;
9209       dgux*)
9210         case $cc_basename in
9211           ec++*)
9212             # FIXME: insert proper C++ library support
9213             _LT_TAGVAR(ld_shlibs, $1)=no
9214             ;;
9215           ghcx*)
9216             # Green Hills C++ Compiler
9217             # FIXME: insert proper C++ library support
9218             _LT_TAGVAR(ld_shlibs, $1)=no
9219             ;;
9220           *)
9221             # FIXME: insert proper C++ library support
9222             _LT_TAGVAR(ld_shlibs, $1)=no
9223             ;;
9224         esac
9225         ;;
9227       freebsd2.*)
9228         # C++ shared libraries reported to be fairly broken before
9229         # switch to ELF
9230         _LT_TAGVAR(ld_shlibs, $1)=no
9231         ;;
9233       freebsd-elf*)
9234         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9235         ;;
9237       freebsd* | dragonfly*)
9238         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
9239         # conventions
9240         _LT_TAGVAR(ld_shlibs, $1)=yes
9241         ;;
9243       haiku*)
9244         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9245         _LT_TAGVAR(link_all_deplibs, $1)=yes
9246         ;;
9248       hpux9*)
9249         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9250         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9251         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9252         _LT_TAGVAR(hardcode_direct, $1)=yes
9253         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9254                                              # but as the default
9255                                              # location of the library.
9257         case $cc_basename in
9258           CC*)
9259             # FIXME: insert proper C++ library support
9260             _LT_TAGVAR(ld_shlibs, $1)=no
9261             ;;
9262           aCC*)
9263             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9264             # Commands to make compiler produce verbose output that lists
9265             # what "hidden" libraries, object files and flags are used when
9266             # linking a shared library.
9267             #
9268             # There doesn't appear to be a way to prevent this compiler from
9269             # explicitly linking system object files so we need to strip them
9270             # from the output so that they don't get included in the library
9271             # dependencies.
9272             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
9273             ;;
9274           *)
9275             if test "$GXX" = yes; then
9276               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9277             else
9278               # FIXME: insert proper C++ library support
9279               _LT_TAGVAR(ld_shlibs, $1)=no
9280             fi
9281             ;;
9282         esac
9283         ;;
9285       hpux10*|hpux11*)
9286         if test $with_gnu_ld = no; then
9287           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
9288           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9290           case $host_cpu in
9291             hppa*64*|ia64*)
9292               ;;
9293             *)
9294               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9295               ;;
9296           esac
9297         fi
9298         case $host_cpu in
9299           hppa*64*|ia64*)
9300             _LT_TAGVAR(hardcode_direct, $1)=no
9301             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9302             ;;
9303           *)
9304             _LT_TAGVAR(hardcode_direct, $1)=yes
9305             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9306             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
9307                                                  # but as the default
9308                                                  # location of the library.
9309             ;;
9310         esac
9312         case $cc_basename in
9313           CC*)
9314             # FIXME: insert proper C++ library support
9315             _LT_TAGVAR(ld_shlibs, $1)=no
9316             ;;
9317           aCC*)
9318             case $host_cpu in
9319               hppa*64*)
9320                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9321                 ;;
9322               ia64*)
9323                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9324                 ;;
9325               *)
9326                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9327                 ;;
9328             esac
9329             # Commands to make compiler produce verbose output that lists
9330             # what "hidden" libraries, object files and flags are used when
9331             # linking a shared library.
9332             #
9333             # There doesn't appear to be a way to prevent this compiler from
9334             # explicitly linking system object files so we need to strip them
9335             # from the output so that they don't get included in the library
9336             # dependencies.
9337             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
9338             ;;
9339           *)
9340             if test "$GXX" = yes; then
9341               if test $with_gnu_ld = no; then
9342                 case $host_cpu in
9343                   hppa*64*)
9344                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9345                     ;;
9346                   ia64*)
9347                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9348                     ;;
9349                   *)
9350                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9351                     ;;
9352                 esac
9353               fi
9354             else
9355               # FIXME: insert proper C++ library support
9356               _LT_TAGVAR(ld_shlibs, $1)=no
9357             fi
9358             ;;
9359         esac
9360         ;;
9362       interix[[3-9]]*)
9363         _LT_TAGVAR(hardcode_direct, $1)=no
9364         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9365         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9366         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9367         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9368         # Instead, shared libraries are loaded at an image base (0x10000000 by
9369         # default) and relocated if they conflict, which is a slow very memory
9370         # consuming and fragmenting process.  To avoid this, we pick a random,
9371         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9372         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
9373         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9374         _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9375         ;;
9376       irix5* | irix6*)
9377         case $cc_basename in
9378           CC*)
9379             # SGI C++
9380             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9382             # Archives containing C++ object files must be created using
9383             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
9384             # necessary to make sure instantiated templates are included
9385             # in the archive.
9386             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
9387             ;;
9388           *)
9389             if test "$GXX" = yes; then
9390               if test "$with_gnu_ld" = no; then
9391                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9392               else
9393                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
9394               fi
9395             fi
9396             _LT_TAGVAR(link_all_deplibs, $1)=yes
9397             ;;
9398         esac
9399         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9400         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9401         _LT_TAGVAR(inherit_rpath, $1)=yes
9402         ;;
9404       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9405         case $cc_basename in
9406           KCC*)
9407             # Kuck and Associates, Inc. (KAI) C++ Compiler
9409             # KCC will only create a shared library if the output file
9410             # ends with ".so" (or ".sl" for HP-UX), so rename the library
9411             # to its proper name (with version) after linking.
9412             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
9413             _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
9414             # Commands to make compiler produce verbose output that lists
9415             # what "hidden" libraries, object files and flags are used when
9416             # linking a shared library.
9417             #
9418             # There doesn't appear to be a way to prevent this compiler from
9419             # explicitly linking system object files so we need to strip them
9420             # from the output so that they don't get included in the library
9421             # dependencies.
9422             output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
9424             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9425             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9427             # Archives containing C++ object files must be created using
9428             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
9429             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9430             ;;
9431           icpc* | ecpc* )
9432             # Intel C++
9433             with_gnu_ld=yes
9434             # version 8.0 and above of icpc choke on multiply defined symbols
9435             # if we add $predep_objects and $postdep_objects, however 7.1 and
9436             # earlier do not add the objects themselves.
9437             case `$CC -V 2>&1` in
9438               *"Version 7."*)
9439                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9440                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9441                 ;;
9442               *)  # Version 8.0 or newer
9443                 tmp_idyn=
9444                 case $host_cpu in
9445                   ia64*) tmp_idyn=' -i_dynamic';;
9446                 esac
9447                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9448                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9449                 ;;
9450             esac
9451             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9452             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9453             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9454             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
9455             ;;
9456           pgCC* | pgcpp*)
9457             # Portland Group C++ compiler
9458             case `$CC -V` in
9459             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
9460               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
9461                 rm -rf $tpldir~
9462                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
9463                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
9464               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
9465                 rm -rf $tpldir~
9466                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
9467                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
9468                 $RANLIB $oldlib'
9469               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
9470                 rm -rf $tpldir~
9471                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
9472                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
9473               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
9474                 rm -rf $tpldir~
9475                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
9476                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
9477               ;;
9478             *) # Version 6 and above use weak symbols
9479               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
9480               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
9481               ;;
9482             esac
9484             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
9485             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9486             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9487             ;;
9488           cxx*)
9489             # Compaq C++
9490             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
9491             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
9493             runpath_var=LD_RUN_PATH
9494             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9495             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9497             # Commands to make compiler produce verbose output that lists
9498             # what "hidden" libraries, object files and flags are used when
9499             # linking a shared library.
9500             #
9501             # There doesn't appear to be a way to prevent this compiler from
9502             # explicitly linking system object files so we need to strip them
9503             # from the output so that they don't get included in the library
9504             # dependencies.
9505             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
9506             ;;
9507           xl* | mpixl* | bgxl*)
9508             # IBM XL 8.0 on PPC, with GNU ld
9509             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9510             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
9511             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9512             if test "x$supports_anon_versioning" = xyes; then
9513               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
9514                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9515                 echo "local: *; };" >> $output_objdir/$libname.ver~
9516                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9517             fi
9518             ;;
9519           *)
9520             case `$CC -V 2>&1 | sed 5q` in
9521             *Sun\ C*)
9522               # Sun C++ 5.9
9523               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9524               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9525               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
9526               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9527               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
9528               _LT_TAGVAR(compiler_needs_object, $1)=yes
9530               # Not sure whether something based on
9531               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
9532               # would be better.
9533               output_verbose_link_cmd='func_echo_all'
9535               # Archives containing C++ object files must be created using
9536               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9537               # necessary to make sure instantiated templates are included
9538               # in the archive.
9539               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9540               ;;
9541             esac
9542             ;;
9543         esac
9544         ;;
9546       lynxos*)
9547         # FIXME: insert proper C++ library support
9548         _LT_TAGVAR(ld_shlibs, $1)=no
9549         ;;
9551       m88k*)
9552         # FIXME: insert proper C++ library support
9553         _LT_TAGVAR(ld_shlibs, $1)=no
9554         ;;
9556       mvs*)
9557         case $cc_basename in
9558           cxx*)
9559             # FIXME: insert proper C++ library support
9560             _LT_TAGVAR(ld_shlibs, $1)=no
9561             ;;
9562           *)
9563             # FIXME: insert proper C++ library support
9564             _LT_TAGVAR(ld_shlibs, $1)=no
9565             ;;
9566         esac
9567         ;;
9569       netbsd*)
9570         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9571           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
9572           wlarc=
9573           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9574           _LT_TAGVAR(hardcode_direct, $1)=yes
9575           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9576         fi
9577         # Workaround some broken pre-1.5 toolchains
9578         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
9579         ;;
9581       *nto* | *qnx*)
9582         _LT_TAGVAR(ld_shlibs, $1)=yes
9583         ;;
9585       openbsd2*)
9586         # C++ shared libraries are fairly broken
9587         _LT_TAGVAR(ld_shlibs, $1)=no
9588         ;;
9590       openbsd*)
9591         if test -f /usr/libexec/ld.so; then
9592           _LT_TAGVAR(hardcode_direct, $1)=yes
9593           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9594           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9595           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9596           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9597           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9598             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
9599             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
9600             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9601           fi
9602           output_verbose_link_cmd=func_echo_all
9603         else
9604           _LT_TAGVAR(ld_shlibs, $1)=no
9605         fi
9606         ;;
9608       osf3* | osf4* | osf5*)
9609         case $cc_basename in
9610           KCC*)
9611             # Kuck and Associates, Inc. (KAI) C++ Compiler
9613             # KCC will only create a shared library if the output file
9614             # ends with ".so" (or ".sl" for HP-UX), so rename the library
9615             # to its proper name (with version) after linking.
9616             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
9618             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
9619             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9621             # Archives containing C++ object files must be created using
9622             # the KAI C++ compiler.
9623             case $host in
9624               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
9625               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
9626             esac
9627             ;;
9628           RCC*)
9629             # Rational C++ 2.4.1
9630             # FIXME: insert proper C++ library support
9631             _LT_TAGVAR(ld_shlibs, $1)=no
9632             ;;
9633           cxx*)
9634             case $host in
9635               osf3*)
9636                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9637                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9638                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9639                 ;;
9640               *)
9641                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9642                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9643                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9644                   echo "-hidden">> $lib.exp~
9645                   $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
9646                   $RM $lib.exp'
9647                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9648                 ;;
9649             esac
9651             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9653             # Commands to make compiler produce verbose output that lists
9654             # what "hidden" libraries, object files and flags are used when
9655             # linking a shared library.
9656             #
9657             # There doesn't appear to be a way to prevent this compiler from
9658             # explicitly linking system object files so we need to strip them
9659             # from the output so that they don't get included in the library
9660             # dependencies.
9661             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
9662             ;;
9663           *)
9664             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9665               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
9666               case $host in
9667                 osf3*)
9668                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9669                   ;;
9670                 *)
9671                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9672                   ;;
9673               esac
9675               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
9676               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9678               # Commands to make compiler produce verbose output that lists
9679               # what "hidden" libraries, object files and flags are used when
9680               # linking a shared library.
9681               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9683             else
9684               # FIXME: insert proper C++ library support
9685               _LT_TAGVAR(ld_shlibs, $1)=no
9686             fi
9687             ;;
9688         esac
9689         ;;
9691       psos*)
9692         # FIXME: insert proper C++ library support
9693         _LT_TAGVAR(ld_shlibs, $1)=no
9694         ;;
9696       sunos4*)
9697         case $cc_basename in
9698           CC*)
9699             # Sun C++ 4.x
9700             # FIXME: insert proper C++ library support
9701             _LT_TAGVAR(ld_shlibs, $1)=no
9702             ;;
9703           lcc*)
9704             # Lucid
9705             # FIXME: insert proper C++ library support
9706             _LT_TAGVAR(ld_shlibs, $1)=no
9707             ;;
9708           *)
9709             # FIXME: insert proper C++ library support
9710             _LT_TAGVAR(ld_shlibs, $1)=no
9711             ;;
9712         esac
9713         ;;
9715       solaris*)
9716         case $cc_basename in
9717           CC* | sunCC*)
9718             # Sun C++ 4.2, 5.x and Centerline C++
9719             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
9720             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9721             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9722             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9723               $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9725             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9726             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9727             case $host_os in
9728               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9729               *)
9730                 # The compiler driver will combine and reorder linker options,
9731                 # but understands `-z linker_flag'.
9732                 # Supported since Solaris 2.6 (maybe 2.5.1?)
9733                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9734                 ;;
9735             esac
9736             _LT_TAGVAR(link_all_deplibs, $1)=yes
9738             output_verbose_link_cmd='func_echo_all'
9740             # Archives containing C++ object files must be created using
9741             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9742             # necessary to make sure instantiated templates are included
9743             # in the archive.
9744             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9745             ;;
9746           gcx*)
9747             # Green Hills C++ Compiler
9748             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9750             # The C++ compiler must be used to create the archive.
9751             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9752             ;;
9753           *)
9754             # GNU C++ compiler with Solaris linker
9755             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9756               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9757               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
9758                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9759                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9760                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9762                 # Commands to make compiler produce verbose output that lists
9763                 # what "hidden" libraries, object files and flags are used when
9764                 # linking a shared library.
9765                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9766               else
9767                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
9768                 # platform.
9769                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9770                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9771                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9773                 # Commands to make compiler produce verbose output that lists
9774                 # what "hidden" libraries, object files and flags are used when
9775                 # linking a shared library.
9776                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9777               fi
9779               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9780               case $host_os in
9781                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9782                 *)
9783                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9784                   ;;
9785               esac
9786             fi
9787             ;;
9788         esac
9789         ;;
9791     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9792       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9793       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9794       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9795       runpath_var='LD_RUN_PATH'
9797       case $cc_basename in
9798         CC*)
9799           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9800           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9801           ;;
9802         *)
9803           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9804           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9805           ;;
9806       esac
9807       ;;
9809       sysv5* | sco3.2v5* | sco5v6*)
9810         # Note: We can NOT use -z defs as we might desire, because we do not
9811         # link with -lc, and that would cause any symbols used from libc to
9812         # always be unresolved, which means just about no library would
9813         # ever link correctly.  If we're not using GNU ld we use -z text
9814         # though, which does catch some bad symbols but isn't as heavy-handed
9815         # as -z defs.
9816         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9817         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9818         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9819         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9820         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
9821         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9822         _LT_TAGVAR(link_all_deplibs, $1)=yes
9823         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9824         runpath_var='LD_RUN_PATH'
9826         case $cc_basename in
9827           CC*)
9828             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9829             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9830             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
9831               '"$_LT_TAGVAR(old_archive_cmds, $1)"
9832             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
9833               '"$_LT_TAGVAR(reload_cmds, $1)"
9834             ;;
9835           *)
9836             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9837             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9838             ;;
9839         esac
9840       ;;
9842       tandem*)
9843         case $cc_basename in
9844           NCC*)
9845             # NonStop-UX NCC 3.20
9846             # FIXME: insert proper C++ library support
9847             _LT_TAGVAR(ld_shlibs, $1)=no
9848             ;;
9849           *)
9850             # FIXME: insert proper C++ library support
9851             _LT_TAGVAR(ld_shlibs, $1)=no
9852             ;;
9853         esac
9854         ;;
9856       vxworks*)
9857         # FIXME: insert proper C++ library support
9858         _LT_TAGVAR(ld_shlibs, $1)=no
9859         ;;
9861       *)
9862         # FIXME: insert proper C++ library support
9863         _LT_TAGVAR(ld_shlibs, $1)=no
9864         ;;
9865     esac
9867     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9868     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9870     _LT_TAGVAR(GCC, $1)="$GXX"
9871     _LT_TAGVAR(LD, $1)="$LD"
9873     ## CAVEAT EMPTOR:
9874     ## There is no encapsulation within the following macros, do not change
9875     ## the running order or otherwise move them around unless you know exactly
9876     ## what you are doing...
9877     _LT_SYS_HIDDEN_LIBDEPS($1)
9878     _LT_COMPILER_PIC($1)
9879     _LT_COMPILER_C_O($1)
9880     _LT_COMPILER_FILE_LOCKS($1)
9881     _LT_LINKER_SHLIBS($1)
9882     _LT_SYS_DYNAMIC_LINKER($1)
9883     _LT_LINKER_HARDCODE_LIBPATH($1)
9885     _LT_CONFIG($1)
9886   fi # test -n "$compiler"
9888   CC=$lt_save_CC
9889   CFLAGS=$lt_save_CFLAGS
9890   LDCXX=$LD
9891   LD=$lt_save_LD
9892   GCC=$lt_save_GCC
9893   with_gnu_ld=$lt_save_with_gnu_ld
9894   lt_cv_path_LDCXX=$lt_cv_path_LD
9895   lt_cv_path_LD=$lt_save_path_LD
9896   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9897   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9898 fi # test "$_lt_caught_CXX_error" != yes
9900 AC_LANG_POP
9901 ])# _LT_LANG_CXX_CONFIG
9904 # _LT_FUNC_STRIPNAME_CNF
9905 # ----------------------
9906 # func_stripname_cnf prefix suffix name
9907 # strip PREFIX and SUFFIX off of NAME.
9908 # PREFIX and SUFFIX must not contain globbing or regex special
9909 # characters, hashes, percent signs, but SUFFIX may contain a leading
9910 # dot (in which case that matches only a dot).
9912 # This function is identical to the (non-XSI) version of func_stripname,
9913 # except this one can be used by m4 code that may be executed by configure,
9914 # rather than the libtool script.
9915 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
9916 AC_REQUIRE([_LT_DECL_SED])
9917 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
9918 func_stripname_cnf ()
9920   case ${2} in
9921   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9922   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9923   esac
9924 } # func_stripname_cnf
9925 ])# _LT_FUNC_STRIPNAME_CNF
9927 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
9928 # ---------------------------------
9929 # Figure out "hidden" library dependencies from verbose
9930 # compiler output when linking a shared library.
9931 # Parse the compiler output and extract the necessary
9932 # objects, libraries and library flags.
9933 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
9934 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9935 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
9936 # Dependencies to place before and after the object being linked:
9937 _LT_TAGVAR(predep_objects, $1)=
9938 _LT_TAGVAR(postdep_objects, $1)=
9939 _LT_TAGVAR(predeps, $1)=
9940 _LT_TAGVAR(postdeps, $1)=
9941 _LT_TAGVAR(compiler_lib_search_path, $1)=
9943 dnl we can't use the lt_simple_compile_test_code here,
9944 dnl because it contains code intended for an executable,
9945 dnl not a library.  It's possible we should let each
9946 dnl tag define a new lt_????_link_test_code variable,
9947 dnl but it's only used here...
9948 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
9949 int a;
9950 void foo (void) { a = 0; }
9951 _LT_EOF
9952 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
9953 class Foo
9955 public:
9956   Foo (void) { a = 0; }
9957 private:
9958   int a;
9960 _LT_EOF
9961 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
9962       subroutine foo
9963       implicit none
9964       integer*4 a
9965       a=0
9966       return
9967       end
9968 _LT_EOF
9969 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
9970       subroutine foo
9971       implicit none
9972       integer a
9973       a=0
9974       return
9975       end
9976 _LT_EOF
9977 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
9978 public class foo {
9979   private int a;
9980   public void bar (void) {
9981     a = 0;
9982   }
9984 _LT_EOF
9985 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
9986 package foo
9987 func foo() {
9989 _LT_EOF
9992 _lt_libdeps_save_CFLAGS=$CFLAGS
9993 case "$CC $CFLAGS " in #(
9994 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
9995 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
9996 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
9997 esac
9999 dnl Parse the compiler output and extract the necessary
10000 dnl objects, libraries and library flags.
10001 if AC_TRY_EVAL(ac_compile); then
10002   # Parse the compiler output and extract the necessary
10003   # objects, libraries and library flags.
10005   # Sentinel used to keep track of whether or not we are before
10006   # the conftest object file.
10007   pre_test_object_deps_done=no
10009   for p in `eval "$output_verbose_link_cmd"`; do
10010     case ${prev}${p} in
10012     -L* | -R* | -l*)
10013        # Some compilers place space between "-{L,R}" and the path.
10014        # Remove the space.
10015        if test $p = "-L" ||
10016           test $p = "-R"; then
10017          prev=$p
10018          continue
10019        fi
10021        # Expand the sysroot to ease extracting the directories later.
10022        if test -z "$prev"; then
10023          case $p in
10024          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
10025          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
10026          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
10027          esac
10028        fi
10029        case $p in
10030        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
10031        esac
10032        if test "$pre_test_object_deps_done" = no; then
10033          case ${prev} in
10034          -L | -R)
10035            # Internal compiler library paths should come after those
10036            # provided the user.  The postdeps already come after the
10037            # user supplied libs so there is no need to process them.
10038            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
10039              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
10040            else
10041              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
10042            fi
10043            ;;
10044          # The "-l" case would never come before the object being
10045          # linked, so don't bother handling this case.
10046          esac
10047        else
10048          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
10049            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
10050          else
10051            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
10052          fi
10053        fi
10054        prev=
10055        ;;
10057     *.lto.$objext) ;; # Ignore GCC LTO objects
10058     *.$objext)
10059        # This assumes that the test object file only shows up
10060        # once in the compiler output.
10061        if test "$p" = "conftest.$objext"; then
10062          pre_test_object_deps_done=yes
10063          continue
10064        fi
10066        if test "$pre_test_object_deps_done" = no; then
10067          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
10068            _LT_TAGVAR(predep_objects, $1)="$p"
10069          else
10070            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
10071          fi
10072        else
10073          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
10074            _LT_TAGVAR(postdep_objects, $1)="$p"
10075          else
10076            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
10077          fi
10078        fi
10079        ;;
10081     *) ;; # Ignore the rest.
10083     esac
10084   done
10086   # Clean up.
10087   rm -f a.out a.exe
10088 else
10089   echo "libtool.m4: error: problem compiling $1 test program"
10092 $RM -f confest.$objext
10093 CFLAGS=$_lt_libdeps_save_CFLAGS
10095 # PORTME: override above test on systems where it is broken
10096 m4_if([$1], [CXX],
10097 [case $host_os in
10098 interix[[3-9]]*)
10099   # Interix 3.5 installs completely hosed .la files for C++, so rather than
10100   # hack all around it, let's just trust "g++" to DTRT.
10101   _LT_TAGVAR(predep_objects,$1)=
10102   _LT_TAGVAR(postdep_objects,$1)=
10103   _LT_TAGVAR(postdeps,$1)=
10104   ;;
10106 linux*)
10107   case `$CC -V 2>&1 | sed 5q` in
10108   *Sun\ C*)
10109     # Sun C++ 5.9
10111     # The more standards-conforming stlport4 library is
10112     # incompatible with the Cstd library. Avoid specifying
10113     # it if it's in CXXFLAGS. Ignore libCrun as
10114     # -library=stlport4 depends on it.
10115     case " $CXX $CXXFLAGS " in
10116     *" -library=stlport4 "*)
10117       solaris_use_stlport4=yes
10118       ;;
10119     esac
10121     if test "$solaris_use_stlport4" != yes; then
10122       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
10123     fi
10124     ;;
10125   esac
10126   ;;
10128 solaris*)
10129   case $cc_basename in
10130   CC* | sunCC*)
10131     # The more standards-conforming stlport4 library is
10132     # incompatible with the Cstd library. Avoid specifying
10133     # it if it's in CXXFLAGS. Ignore libCrun as
10134     # -library=stlport4 depends on it.
10135     case " $CXX $CXXFLAGS " in
10136     *" -library=stlport4 "*)
10137       solaris_use_stlport4=yes
10138       ;;
10139     esac
10141     # Adding this requires a known-good setup of shared libraries for
10142     # Sun compiler versions before 5.6, else PIC objects from an old
10143     # archive will be linked into the output, leading to subtle bugs.
10144     if test "$solaris_use_stlport4" != yes; then
10145       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
10146     fi
10147     ;;
10148   esac
10149   ;;
10150 esac
10153 case " $_LT_TAGVAR(postdeps, $1) " in
10154 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
10155 esac
10156  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
10157 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
10158  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
10160 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
10161     [The directories searched by this compiler when creating a shared library])
10162 _LT_TAGDECL([], [predep_objects], [1],
10163     [Dependencies to place before and after the objects being linked to
10164     create a shared library])
10165 _LT_TAGDECL([], [postdep_objects], [1])
10166 _LT_TAGDECL([], [predeps], [1])
10167 _LT_TAGDECL([], [postdeps], [1])
10168 _LT_TAGDECL([], [compiler_lib_search_path], [1],
10169     [The library search path used internally by the compiler when linking
10170     a shared library])
10171 ])# _LT_SYS_HIDDEN_LIBDEPS
10174 # _LT_LANG_F77_CONFIG([TAG])
10175 # --------------------------
10176 # Ensure that the configuration variables for a Fortran 77 compiler are
10177 # suitably defined.  These variables are subsequently used by _LT_CONFIG
10178 # to write the compiler configuration to `libtool'.
10179 m4_defun([_LT_LANG_F77_CONFIG],
10180 [AC_LANG_PUSH(Fortran 77)
10181 if test -z "$F77" || test "X$F77" = "Xno"; then
10182   _lt_disable_F77=yes
10185 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10186 _LT_TAGVAR(allow_undefined_flag, $1)=
10187 _LT_TAGVAR(always_export_symbols, $1)=no
10188 _LT_TAGVAR(archive_expsym_cmds, $1)=
10189 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
10190 _LT_TAGVAR(hardcode_direct, $1)=no
10191 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
10192 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
10193 _LT_TAGVAR(hardcode_libdir_separator, $1)=
10194 _LT_TAGVAR(hardcode_minus_L, $1)=no
10195 _LT_TAGVAR(hardcode_automatic, $1)=no
10196 _LT_TAGVAR(inherit_rpath, $1)=no
10197 _LT_TAGVAR(module_cmds, $1)=
10198 _LT_TAGVAR(module_expsym_cmds, $1)=
10199 _LT_TAGVAR(link_all_deplibs, $1)=unknown
10200 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10201 _LT_TAGVAR(reload_flag, $1)=$reload_flag
10202 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10203 _LT_TAGVAR(no_undefined_flag, $1)=
10204 _LT_TAGVAR(whole_archive_flag_spec, $1)=
10205 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10207 # Source file extension for f77 test sources.
10208 ac_ext=f
10210 # Object file extension for compiled f77 test sources.
10211 objext=o
10212 _LT_TAGVAR(objext, $1)=$objext
10214 # No sense in running all these tests if we already determined that
10215 # the F77 compiler isn't working.  Some variables (like enable_shared)
10216 # are currently assumed to apply to all compilers on this platform,
10217 # and will be corrupted by setting them based on a non-working compiler.
10218 if test "$_lt_disable_F77" != yes; then
10219   # Code to be used in simple compile tests
10220   lt_simple_compile_test_code="\
10221       subroutine t
10222       return
10223       end
10226   # Code to be used in simple link tests
10227   lt_simple_link_test_code="\
10228       program t
10229       end
10232   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10233   _LT_TAG_COMPILER
10235   # save warnings/boilerplate of simple test code
10236   _LT_COMPILER_BOILERPLATE
10237   _LT_LINKER_BOILERPLATE
10239   # Allow CC to be a program name with arguments.
10240   lt_save_CC="$CC"
10241   lt_save_GCC=$GCC
10242   lt_save_CFLAGS=$CFLAGS
10243   CC=${F77-"f77"}
10244   CFLAGS=$FFLAGS
10245   compiler=$CC
10246   _LT_TAGVAR(compiler, $1)=$CC
10247   _LT_CC_BASENAME([$compiler])
10248   GCC=$G77
10249   if test -n "$compiler"; then
10250     AC_MSG_CHECKING([if libtool supports shared libraries])
10251     AC_MSG_RESULT([$can_build_shared])
10253     AC_MSG_CHECKING([whether to build shared libraries])
10254     test "$can_build_shared" = "no" && enable_shared=no
10256     # On AIX, shared libraries and static libraries use the same namespace, and
10257     # are all built from PIC.
10258     case $host_os in
10259       aix3*)
10260         test "$enable_shared" = yes && enable_static=no
10261         if test -n "$RANLIB"; then
10262           archive_cmds="$archive_cmds~\$RANLIB \$lib"
10263           postinstall_cmds='$RANLIB $lib'
10264         fi
10265         ;;
10266       aix[[4-9]]*)
10267         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10268           test "$enable_shared" = yes && enable_static=no
10269         fi
10270         ;;
10271     esac
10272     AC_MSG_RESULT([$enable_shared])
10274     AC_MSG_CHECKING([whether to build static libraries])
10275     # Make sure either enable_shared or enable_static is yes.
10276     test "$enable_shared" = yes || enable_static=yes
10277     AC_MSG_RESULT([$enable_static])
10279     _LT_TAGVAR(GCC, $1)="$G77"
10280     _LT_TAGVAR(LD, $1)="$LD"
10282     ## CAVEAT EMPTOR:
10283     ## There is no encapsulation within the following macros, do not change
10284     ## the running order or otherwise move them around unless you know exactly
10285     ## what you are doing...
10286     _LT_COMPILER_PIC($1)
10287     _LT_COMPILER_C_O($1)
10288     _LT_COMPILER_FILE_LOCKS($1)
10289     _LT_LINKER_SHLIBS($1)
10290     _LT_SYS_DYNAMIC_LINKER($1)
10291     _LT_LINKER_HARDCODE_LIBPATH($1)
10293     _LT_CONFIG($1)
10294   fi # test -n "$compiler"
10296   GCC=$lt_save_GCC
10297   CC="$lt_save_CC"
10298   CFLAGS="$lt_save_CFLAGS"
10299 fi # test "$_lt_disable_F77" != yes
10301 AC_LANG_POP
10302 ])# _LT_LANG_F77_CONFIG
10305 # _LT_LANG_FC_CONFIG([TAG])
10306 # -------------------------
10307 # Ensure that the configuration variables for a Fortran compiler are
10308 # suitably defined.  These variables are subsequently used by _LT_CONFIG
10309 # to write the compiler configuration to `libtool'.
10310 m4_defun([_LT_LANG_FC_CONFIG],
10311 [AC_LANG_PUSH(Fortran)
10313 if test -z "$FC" || test "X$FC" = "Xno"; then
10314   _lt_disable_FC=yes
10317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10318 _LT_TAGVAR(allow_undefined_flag, $1)=
10319 _LT_TAGVAR(always_export_symbols, $1)=no
10320 _LT_TAGVAR(archive_expsym_cmds, $1)=
10321 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
10322 _LT_TAGVAR(hardcode_direct, $1)=no
10323 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
10324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
10325 _LT_TAGVAR(hardcode_libdir_separator, $1)=
10326 _LT_TAGVAR(hardcode_minus_L, $1)=no
10327 _LT_TAGVAR(hardcode_automatic, $1)=no
10328 _LT_TAGVAR(inherit_rpath, $1)=no
10329 _LT_TAGVAR(module_cmds, $1)=
10330 _LT_TAGVAR(module_expsym_cmds, $1)=
10331 _LT_TAGVAR(link_all_deplibs, $1)=unknown
10332 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10333 _LT_TAGVAR(reload_flag, $1)=$reload_flag
10334 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10335 _LT_TAGVAR(no_undefined_flag, $1)=
10336 _LT_TAGVAR(whole_archive_flag_spec, $1)=
10337 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10339 # Source file extension for fc test sources.
10340 ac_ext=${ac_fc_srcext-f}
10342 # Object file extension for compiled fc test sources.
10343 objext=o
10344 _LT_TAGVAR(objext, $1)=$objext
10346 # No sense in running all these tests if we already determined that
10347 # the FC compiler isn't working.  Some variables (like enable_shared)
10348 # are currently assumed to apply to all compilers on this platform,
10349 # and will be corrupted by setting them based on a non-working compiler.
10350 if test "$_lt_disable_FC" != yes; then
10351   # Code to be used in simple compile tests
10352   lt_simple_compile_test_code="\
10353       subroutine t
10354       return
10355       end
10358   # Code to be used in simple link tests
10359   lt_simple_link_test_code="\
10360       program t
10361       end
10364   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10365   _LT_TAG_COMPILER
10367   # save warnings/boilerplate of simple test code
10368   _LT_COMPILER_BOILERPLATE
10369   _LT_LINKER_BOILERPLATE
10371   # Allow CC to be a program name with arguments.
10372   lt_save_CC="$CC"
10373   lt_save_GCC=$GCC
10374   lt_save_CFLAGS=$CFLAGS
10375   CC=${FC-"f95"}
10376   CFLAGS=$FCFLAGS
10377   compiler=$CC
10378   GCC=$ac_cv_fc_compiler_gnu
10380   _LT_TAGVAR(compiler, $1)=$CC
10381   _LT_CC_BASENAME([$compiler])
10383   if test -n "$compiler"; then
10384     AC_MSG_CHECKING([if libtool supports shared libraries])
10385     AC_MSG_RESULT([$can_build_shared])
10387     AC_MSG_CHECKING([whether to build shared libraries])
10388     test "$can_build_shared" = "no" && enable_shared=no
10390     # On AIX, shared libraries and static libraries use the same namespace, and
10391     # are all built from PIC.
10392     case $host_os in
10393       aix3*)
10394         test "$enable_shared" = yes && enable_static=no
10395         if test -n "$RANLIB"; then
10396           archive_cmds="$archive_cmds~\$RANLIB \$lib"
10397           postinstall_cmds='$RANLIB $lib'
10398         fi
10399         ;;
10400       aix[[4-9]]*)
10401         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10402           test "$enable_shared" = yes && enable_static=no
10403         fi
10404         ;;
10405     esac
10406     AC_MSG_RESULT([$enable_shared])
10408     AC_MSG_CHECKING([whether to build static libraries])
10409     # Make sure either enable_shared or enable_static is yes.
10410     test "$enable_shared" = yes || enable_static=yes
10411     AC_MSG_RESULT([$enable_static])
10413     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
10414     _LT_TAGVAR(LD, $1)="$LD"
10416     ## CAVEAT EMPTOR:
10417     ## There is no encapsulation within the following macros, do not change
10418     ## the running order or otherwise move them around unless you know exactly
10419     ## what you are doing...
10420     _LT_SYS_HIDDEN_LIBDEPS($1)
10421     _LT_COMPILER_PIC($1)
10422     _LT_COMPILER_C_O($1)
10423     _LT_COMPILER_FILE_LOCKS($1)
10424     _LT_LINKER_SHLIBS($1)
10425     _LT_SYS_DYNAMIC_LINKER($1)
10426     _LT_LINKER_HARDCODE_LIBPATH($1)
10428     _LT_CONFIG($1)
10429   fi # test -n "$compiler"
10431   GCC=$lt_save_GCC
10432   CC=$lt_save_CC
10433   CFLAGS=$lt_save_CFLAGS
10434 fi # test "$_lt_disable_FC" != yes
10436 AC_LANG_POP
10437 ])# _LT_LANG_FC_CONFIG
10440 # _LT_LANG_GCJ_CONFIG([TAG])
10441 # --------------------------
10442 # Ensure that the configuration variables for the GNU Java Compiler compiler
10443 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
10444 # to write the compiler configuration to `libtool'.
10445 m4_defun([_LT_LANG_GCJ_CONFIG],
10446 [AC_REQUIRE([LT_PROG_GCJ])dnl
10447 AC_LANG_SAVE
10449 # Source file extension for Java test sources.
10450 ac_ext=java
10452 # Object file extension for compiled Java test sources.
10453 objext=o
10454 _LT_TAGVAR(objext, $1)=$objext
10456 # Code to be used in simple compile tests
10457 lt_simple_compile_test_code="class foo {}"
10459 # Code to be used in simple link tests
10460 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
10462 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10463 _LT_TAG_COMPILER
10465 # save warnings/boilerplate of simple test code
10466 _LT_COMPILER_BOILERPLATE
10467 _LT_LINKER_BOILERPLATE
10469 # Allow CC to be a program name with arguments.
10470 lt_save_CC=$CC
10471 lt_save_CFLAGS=$CFLAGS
10472 lt_save_GCC=$GCC
10473 GCC=yes
10474 CC=${GCJ-"gcj"}
10475 CFLAGS=$GCJFLAGS
10476 compiler=$CC
10477 _LT_TAGVAR(compiler, $1)=$CC
10478 _LT_TAGVAR(LD, $1)="$LD"
10479 _LT_CC_BASENAME([$compiler])
10481 # GCJ did not exist at the time GCC didn't implicitly link libc in.
10482 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10484 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10485 _LT_TAGVAR(reload_flag, $1)=$reload_flag
10486 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10488 ## CAVEAT EMPTOR:
10489 ## There is no encapsulation within the following macros, do not change
10490 ## the running order or otherwise move them around unless you know exactly
10491 ## what you are doing...
10492 if test -n "$compiler"; then
10493   _LT_COMPILER_NO_RTTI($1)
10494   _LT_COMPILER_PIC($1)
10495   _LT_COMPILER_C_O($1)
10496   _LT_COMPILER_FILE_LOCKS($1)
10497   _LT_LINKER_SHLIBS($1)
10498   _LT_LINKER_HARDCODE_LIBPATH($1)
10500   _LT_CONFIG($1)
10503 AC_LANG_RESTORE
10505 GCC=$lt_save_GCC
10506 CC=$lt_save_CC
10507 CFLAGS=$lt_save_CFLAGS
10508 ])# _LT_LANG_GCJ_CONFIG
10511 # _LT_LANG_GO_CONFIG([TAG])
10512 # --------------------------
10513 # Ensure that the configuration variables for the GNU Go compiler
10514 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
10515 # to write the compiler configuration to `libtool'.
10516 m4_defun([_LT_LANG_GO_CONFIG],
10517 [AC_REQUIRE([LT_PROG_GO])dnl
10518 AC_LANG_SAVE
10520 # Source file extension for Go test sources.
10521 ac_ext=go
10523 # Object file extension for compiled Go test sources.
10524 objext=o
10525 _LT_TAGVAR(objext, $1)=$objext
10527 # Code to be used in simple compile tests
10528 lt_simple_compile_test_code="package main; func main() { }"
10530 # Code to be used in simple link tests
10531 lt_simple_link_test_code='package main; func main() { }'
10533 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10534 _LT_TAG_COMPILER
10536 # save warnings/boilerplate of simple test code
10537 _LT_COMPILER_BOILERPLATE
10538 _LT_LINKER_BOILERPLATE
10540 # Allow CC to be a program name with arguments.
10541 lt_save_CC=$CC
10542 lt_save_CFLAGS=$CFLAGS
10543 lt_save_GCC=$GCC
10544 GCC=yes
10545 CC=${GOC-"gccgo"}
10546 CFLAGS=$GOFLAGS
10547 compiler=$CC
10548 _LT_TAGVAR(compiler, $1)=$CC
10549 _LT_TAGVAR(LD, $1)="$LD"
10550 _LT_CC_BASENAME([$compiler])
10552 # Go did not exist at the time GCC didn't implicitly link libc in.
10553 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10555 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10556 _LT_TAGVAR(reload_flag, $1)=$reload_flag
10557 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10559 ## CAVEAT EMPTOR:
10560 ## There is no encapsulation within the following macros, do not change
10561 ## the running order or otherwise move them around unless you know exactly
10562 ## what you are doing...
10563 if test -n "$compiler"; then
10564   _LT_COMPILER_NO_RTTI($1)
10565   _LT_COMPILER_PIC($1)
10566   _LT_COMPILER_C_O($1)
10567   _LT_COMPILER_FILE_LOCKS($1)
10568   _LT_LINKER_SHLIBS($1)
10569   _LT_LINKER_HARDCODE_LIBPATH($1)
10571   _LT_CONFIG($1)
10574 AC_LANG_RESTORE
10576 GCC=$lt_save_GCC
10577 CC=$lt_save_CC
10578 CFLAGS=$lt_save_CFLAGS
10579 ])# _LT_LANG_GO_CONFIG
10582 # _LT_LANG_RC_CONFIG([TAG])
10583 # -------------------------
10584 # Ensure that the configuration variables for the Windows resource compiler
10585 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
10586 # to write the compiler configuration to `libtool'.
10587 m4_defun([_LT_LANG_RC_CONFIG],
10588 [AC_REQUIRE([LT_PROG_RC])dnl
10589 AC_LANG_SAVE
10591 # Source file extension for RC test sources.
10592 ac_ext=rc
10594 # Object file extension for compiled RC test sources.
10595 objext=o
10596 _LT_TAGVAR(objext, $1)=$objext
10598 # Code to be used in simple compile tests
10599 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
10601 # Code to be used in simple link tests
10602 lt_simple_link_test_code="$lt_simple_compile_test_code"
10604 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10605 _LT_TAG_COMPILER
10607 # save warnings/boilerplate of simple test code
10608 _LT_COMPILER_BOILERPLATE
10609 _LT_LINKER_BOILERPLATE
10611 # Allow CC to be a program name with arguments.
10612 lt_save_CC="$CC"
10613 lt_save_CFLAGS=$CFLAGS
10614 lt_save_GCC=$GCC
10615 GCC=
10616 CC=${RC-"windres"}
10617 CFLAGS=
10618 compiler=$CC
10619 _LT_TAGVAR(compiler, $1)=$CC
10620 _LT_CC_BASENAME([$compiler])
10621 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10623 if test -n "$compiler"; then
10624   :
10625   _LT_CONFIG($1)
10628 GCC=$lt_save_GCC
10629 AC_LANG_RESTORE
10630 CC=$lt_save_CC
10631 CFLAGS=$lt_save_CFLAGS
10632 ])# _LT_LANG_RC_CONFIG
10635 # LT_PROG_GCJ
10636 # -----------
10637 AC_DEFUN([LT_PROG_GCJ],
10638 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
10639   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
10640     [AC_CHECK_TOOL(GCJ, gcj,)
10641       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
10642       AC_SUBST(GCJFLAGS)])])[]dnl
10645 # Old name:
10646 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
10647 dnl aclocal-1.4 backwards compatibility:
10648 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
10651 # LT_PROG_GO
10652 # ----------
10653 AC_DEFUN([LT_PROG_GO],
10654 [AC_CHECK_TOOL(GOC, gccgo,)
10658 # LT_PROG_RC
10659 # ----------
10660 AC_DEFUN([LT_PROG_RC],
10661 [AC_CHECK_TOOL(RC, windres,)
10664 # Old name:
10665 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
10666 dnl aclocal-1.4 backwards compatibility:
10667 dnl AC_DEFUN([LT_AC_PROG_RC], [])
10670 # _LT_DECL_EGREP
10671 # --------------
10672 # If we don't have a new enough Autoconf to choose the best grep
10673 # available, choose the one first in the user's PATH.
10674 m4_defun([_LT_DECL_EGREP],
10675 [AC_REQUIRE([AC_PROG_EGREP])dnl
10676 AC_REQUIRE([AC_PROG_FGREP])dnl
10677 test -z "$GREP" && GREP=grep
10678 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
10679 _LT_DECL([], [EGREP], [1], [An ERE matcher])
10680 _LT_DECL([], [FGREP], [1], [A literal string matcher])
10681 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
10682 AC_SUBST([GREP])
10686 # _LT_DECL_OBJDUMP
10687 # --------------
10688 # If we don't have a new enough Autoconf to choose the best objdump
10689 # available, choose the one first in the user's PATH.
10690 m4_defun([_LT_DECL_OBJDUMP],
10691 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
10692 test -z "$OBJDUMP" && OBJDUMP=objdump
10693 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
10694 AC_SUBST([OBJDUMP])
10697 # _LT_DECL_DLLTOOL
10698 # ----------------
10699 # Ensure DLLTOOL variable is set.
10700 m4_defun([_LT_DECL_DLLTOOL],
10701 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10702 test -z "$DLLTOOL" && DLLTOOL=dlltool
10703 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
10704 AC_SUBST([DLLTOOL])
10707 # _LT_DECL_SED
10708 # ------------
10709 # Check for a fully-functional sed program, that truncates
10710 # as few characters as possible.  Prefer GNU sed if found.
10711 m4_defun([_LT_DECL_SED],
10712 [AC_PROG_SED
10713 test -z "$SED" && SED=sed
10714 Xsed="$SED -e 1s/^X//"
10715 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
10716 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
10717     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
10718 ])# _LT_DECL_SED
10720 m4_ifndef([AC_PROG_SED], [
10721 ############################################################
10722 # NOTE: This macro has been submitted for inclusion into   #
10723 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
10724 #  a released version of Autoconf we should remove this    #
10725 #  macro and use it instead.                               #
10726 ############################################################
10728 m4_defun([AC_PROG_SED],
10729 [AC_MSG_CHECKING([for a sed that does not truncate output])
10730 AC_CACHE_VAL(lt_cv_path_SED,
10731 [# Loop through the user's path and test for sed and gsed.
10732 # Then use that list of sed's as ones to test for truncation.
10733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10734 for as_dir in $PATH
10736   IFS=$as_save_IFS
10737   test -z "$as_dir" && as_dir=.
10738   for lt_ac_prog in sed gsed; do
10739     for ac_exec_ext in '' $ac_executable_extensions; do
10740       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
10741         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
10742       fi
10743     done
10744   done
10745 done
10746 IFS=$as_save_IFS
10747 lt_ac_max=0
10748 lt_ac_count=0
10749 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
10750 # along with /bin/sed that truncates output.
10751 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
10752   test ! -f $lt_ac_sed && continue
10753   cat /dev/null > conftest.in
10754   lt_ac_count=0
10755   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
10756   # Check for GNU sed and select it if it is found.
10757   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
10758     lt_cv_path_SED=$lt_ac_sed
10759     break
10760   fi
10761   while true; do
10762     cat conftest.in conftest.in >conftest.tmp
10763     mv conftest.tmp conftest.in
10764     cp conftest.in conftest.nl
10765     echo >>conftest.nl
10766     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
10767     cmp -s conftest.out conftest.nl || break
10768     # 10000 chars as input seems more than enough
10769     test $lt_ac_count -gt 10 && break
10770     lt_ac_count=`expr $lt_ac_count + 1`
10771     if test $lt_ac_count -gt $lt_ac_max; then
10772       lt_ac_max=$lt_ac_count
10773       lt_cv_path_SED=$lt_ac_sed
10774     fi
10775   done
10776 done
10778 SED=$lt_cv_path_SED
10779 AC_SUBST([SED])
10780 AC_MSG_RESULT([$SED])
10781 ])#AC_PROG_SED
10782 ])#m4_ifndef
10784 # Old name:
10785 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
10786 dnl aclocal-1.4 backwards compatibility:
10787 dnl AC_DEFUN([LT_AC_PROG_SED], [])
10790 # _LT_CHECK_SHELL_FEATURES
10791 # ------------------------
10792 # Find out whether the shell is Bourne or XSI compatible,
10793 # or has some other useful features.
10794 m4_defun([_LT_CHECK_SHELL_FEATURES],
10795 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
10796 # Try some XSI features
10797 xsi_shell=no
10798 ( _lt_dummy="a/b/c"
10799   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
10800       = c,a/b,b/c, \
10801     && eval 'test $(( 1 + 1 )) -eq 2 \
10802     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
10803   && xsi_shell=yes
10804 AC_MSG_RESULT([$xsi_shell])
10805 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
10807 AC_MSG_CHECKING([whether the shell understands "+="])
10808 lt_shell_append=no
10809 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
10810     >/dev/null 2>&1 \
10811   && lt_shell_append=yes
10812 AC_MSG_RESULT([$lt_shell_append])
10813 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
10815 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10816   lt_unset=unset
10817 else
10818   lt_unset=false
10820 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
10822 # test EBCDIC or ASCII
10823 case `echo X|tr X '\101'` in
10824  A) # ASCII based system
10825     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
10826   lt_SP2NL='tr \040 \012'
10827   lt_NL2SP='tr \015\012 \040\040'
10828   ;;
10829  *) # EBCDIC based system
10830   lt_SP2NL='tr \100 \n'
10831   lt_NL2SP='tr \r\n \100\100'
10832   ;;
10833 esac
10834 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
10835 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
10836 ])# _LT_CHECK_SHELL_FEATURES
10839 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
10840 # ------------------------------------------------------
10841 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
10842 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
10843 m4_defun([_LT_PROG_FUNCTION_REPLACE],
10844 [dnl {
10845 sed -e '/^$1 ()$/,/^} # $1 /c\
10846 $1 ()\
10848 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
10849 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
10850   && mv -f "$cfgfile.tmp" "$cfgfile" \
10851     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10852 test 0 -eq $? || _lt_function_replace_fail=:
10856 # _LT_PROG_REPLACE_SHELLFNS
10857 # -------------------------
10858 # Replace existing portable implementations of several shell functions with
10859 # equivalent extended shell implementations where those features are available..
10860 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
10861 [if test x"$xsi_shell" = xyes; then
10862   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
10863     case ${1} in
10864       */*) func_dirname_result="${1%/*}${2}" ;;
10865       *  ) func_dirname_result="${3}" ;;
10866     esac])
10868   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
10869     func_basename_result="${1##*/}"])
10871   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
10872     case ${1} in
10873       */*) func_dirname_result="${1%/*}${2}" ;;
10874       *  ) func_dirname_result="${3}" ;;
10875     esac
10876     func_basename_result="${1##*/}"])
10878   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
10879     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
10880     # positional parameters, so assign one to ordinary parameter first.
10881     func_stripname_result=${3}
10882     func_stripname_result=${func_stripname_result#"${1}"}
10883     func_stripname_result=${func_stripname_result%"${2}"}])
10885   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
10886     func_split_long_opt_name=${1%%=*}
10887     func_split_long_opt_arg=${1#*=}])
10889   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
10890     func_split_short_opt_arg=${1#??}
10891     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
10893   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
10894     case ${1} in
10895       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
10896       *)    func_lo2o_result=${1} ;;
10897     esac])
10899   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
10901   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
10903   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
10906 if test x"$lt_shell_append" = xyes; then
10907   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
10909   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
10910     func_quote_for_eval "${2}"
10911 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
10912     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
10914   # Save a `func_append' function call where possible by direct use of '+='
10915   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
10916     && mv -f "$cfgfile.tmp" "$cfgfile" \
10917       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10918   test 0 -eq $? || _lt_function_replace_fail=:
10919 else
10920   # Save a `func_append' function call even when '+=' is not available
10921   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
10922     && mv -f "$cfgfile.tmp" "$cfgfile" \
10923       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10924   test 0 -eq $? || _lt_function_replace_fail=:
10927 if test x"$_lt_function_replace_fail" = x":"; then
10928   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
10932 # _LT_PATH_CONVERSION_FUNCTIONS
10933 # -----------------------------
10934 # Determine which file name conversion functions should be used by
10935 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
10936 # for certain cross-compile configurations and native mingw.
10937 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
10938 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
10939 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
10940 AC_MSG_CHECKING([how to convert $build file names to $host format])
10941 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
10942 [case $host in
10943   *-*-mingw* )
10944     case $build in
10945       *-*-mingw* ) # actually msys
10946         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
10947         ;;
10948       *-*-cygwin* )
10949         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
10950         ;;
10951       * ) # otherwise, assume *nix
10952         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
10953         ;;
10954     esac
10955     ;;
10956   *-*-cygwin* )
10957     case $build in
10958       *-*-mingw* ) # actually msys
10959         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
10960         ;;
10961       *-*-cygwin* )
10962         lt_cv_to_host_file_cmd=func_convert_file_noop
10963         ;;
10964       * ) # otherwise, assume *nix
10965         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
10966         ;;
10967     esac
10968     ;;
10969   * ) # unhandled hosts (and "normal" native builds)
10970     lt_cv_to_host_file_cmd=func_convert_file_noop
10971     ;;
10972 esac
10974 to_host_file_cmd=$lt_cv_to_host_file_cmd
10975 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
10976 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
10977          [0], [convert $build file names to $host format])dnl
10979 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
10980 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
10981 [#assume ordinary cross tools, or native build.
10982 lt_cv_to_tool_file_cmd=func_convert_file_noop
10983 case $host in
10984   *-*-mingw* )
10985     case $build in
10986       *-*-mingw* ) # actually msys
10987         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
10988         ;;
10989     esac
10990     ;;
10991 esac
10993 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10994 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
10995 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
10996          [0], [convert $build files to toolchain format])dnl
10997 ])# _LT_PATH_CONVERSION_FUNCTIONS
10998 # Helper functions for option handling.                    -*- Autoconf -*-
11000 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
11001 #   Inc.
11002 #   Written by Gary V. Vaughan, 2004
11004 # This file is free software; the Free Software Foundation gives
11005 # unlimited permission to copy and/or distribute it, with or without
11006 # modifications, as long as this notice is preserved.
11008 # serial 7 ltoptions.m4
11010 # This is to help aclocal find these macros, as it can't see m4_define.
11011 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
11014 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
11015 # ------------------------------------------
11016 m4_define([_LT_MANGLE_OPTION],
11017 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
11020 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
11021 # ---------------------------------------
11022 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
11023 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
11024 # saved as a flag.
11025 m4_define([_LT_SET_OPTION],
11026 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
11027 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
11028         _LT_MANGLE_DEFUN([$1], [$2]),
11029     [m4_warning([Unknown $1 option `$2'])])[]dnl
11033 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
11034 # ------------------------------------------------------------
11035 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11036 m4_define([_LT_IF_OPTION],
11037 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
11040 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
11041 # -------------------------------------------------------
11042 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
11043 # are set.
11044 m4_define([_LT_UNLESS_OPTIONS],
11045 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
11046             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
11047                       [m4_define([$0_found])])])[]dnl
11048 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
11049 ])[]dnl
11053 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
11054 # ----------------------------------------
11055 # OPTION-LIST is a space-separated list of Libtool options associated
11056 # with MACRO-NAME.  If any OPTION has a matching handler declared with
11057 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
11058 # the unknown option and exit.
11059 m4_defun([_LT_SET_OPTIONS],
11060 [# Set options
11061 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
11062     [_LT_SET_OPTION([$1], _LT_Option)])
11064 m4_if([$1],[LT_INIT],[
11065   dnl
11066   dnl Simply set some default values (i.e off) if boolean options were not
11067   dnl specified:
11068   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
11069   ])
11070   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
11071   ])
11072   dnl
11073   dnl If no reference was made to various pairs of opposing options, then
11074   dnl we run the default mode handler for the pair.  For example, if neither
11075   dnl `shared' nor `disable-shared' was passed, we enable building of shared
11076   dnl archives by default:
11077   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
11078   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
11079   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
11080   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
11081                    [_LT_ENABLE_FAST_INSTALL])
11082   ])
11083 ])# _LT_SET_OPTIONS
11086 ## --------------------------------- ##
11087 ## Macros to handle LT_INIT options. ##
11088 ## --------------------------------- ##
11090 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
11091 # -----------------------------------------
11092 m4_define([_LT_MANGLE_DEFUN],
11093 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
11096 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
11097 # -----------------------------------------------
11098 m4_define([LT_OPTION_DEFINE],
11099 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
11100 ])# LT_OPTION_DEFINE
11103 # dlopen
11104 # ------
11105 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
11108 AU_DEFUN([AC_LIBTOOL_DLOPEN],
11109 [_LT_SET_OPTION([LT_INIT], [dlopen])
11110 AC_DIAGNOSE([obsolete],
11111 [$0: Remove this warning and the call to _LT_SET_OPTION when you
11112 put the `dlopen' option into LT_INIT's first parameter.])
11115 dnl aclocal-1.4 backwards compatibility:
11116 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
11119 # win32-dll
11120 # ---------
11121 # Declare package support for building win32 dll's.
11122 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
11123 [enable_win32_dll=yes
11125 case $host in
11126 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
11127   AC_CHECK_TOOL(AS, as, false)
11128   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
11129   AC_CHECK_TOOL(OBJDUMP, objdump, false)
11130   ;;
11131 esac
11133 test -z "$AS" && AS=as
11134 _LT_DECL([], [AS],      [1], [Assembler program])dnl
11136 test -z "$DLLTOOL" && DLLTOOL=dlltool
11137 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
11139 test -z "$OBJDUMP" && OBJDUMP=objdump
11140 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
11141 ])# win32-dll
11143 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
11144 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
11145 _LT_SET_OPTION([LT_INIT], [win32-dll])
11146 AC_DIAGNOSE([obsolete],
11147 [$0: Remove this warning and the call to _LT_SET_OPTION when you
11148 put the `win32-dll' option into LT_INIT's first parameter.])
11151 dnl aclocal-1.4 backwards compatibility:
11152 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
11155 # _LT_ENABLE_SHARED([DEFAULT])
11156 # ----------------------------
11157 # implement the --enable-shared flag, and supports the `shared' and
11158 # `disable-shared' LT_INIT options.
11159 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
11160 m4_define([_LT_ENABLE_SHARED],
11161 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
11162 AC_ARG_ENABLE([shared],
11163     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
11164         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
11165     [p=${PACKAGE-default}
11166     case $enableval in
11167     yes) enable_shared=yes ;;
11168     no) enable_shared=no ;;
11169     *)
11170       enable_shared=no
11171       # Look at the argument we got.  We use all the common list separators.
11172       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11173       for pkg in $enableval; do
11174         IFS="$lt_save_ifs"
11175         if test "X$pkg" = "X$p"; then
11176           enable_shared=yes
11177         fi
11178       done
11179       IFS="$lt_save_ifs"
11180       ;;
11181     esac],
11182     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
11184     _LT_DECL([build_libtool_libs], [enable_shared], [0],
11185         [Whether or not to build shared libraries])
11186 ])# _LT_ENABLE_SHARED
11188 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
11189 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
11191 # Old names:
11192 AC_DEFUN([AC_ENABLE_SHARED],
11193 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
11196 AC_DEFUN([AC_DISABLE_SHARED],
11197 [_LT_SET_OPTION([LT_INIT], [disable-shared])
11200 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
11201 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
11203 dnl aclocal-1.4 backwards compatibility:
11204 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
11205 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
11209 # _LT_ENABLE_STATIC([DEFAULT])
11210 # ----------------------------
11211 # implement the --enable-static flag, and support the `static' and
11212 # `disable-static' LT_INIT options.
11213 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
11214 m4_define([_LT_ENABLE_STATIC],
11215 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
11216 AC_ARG_ENABLE([static],
11217     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
11218         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
11219     [p=${PACKAGE-default}
11220     case $enableval in
11221     yes) enable_static=yes ;;
11222     no) enable_static=no ;;
11223     *)
11224      enable_static=no
11225       # Look at the argument we got.  We use all the common list separators.
11226       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11227       for pkg in $enableval; do
11228         IFS="$lt_save_ifs"
11229         if test "X$pkg" = "X$p"; then
11230           enable_static=yes
11231         fi
11232       done
11233       IFS="$lt_save_ifs"
11234       ;;
11235     esac],
11236     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
11238     _LT_DECL([build_old_libs], [enable_static], [0],
11239         [Whether or not to build static libraries])
11240 ])# _LT_ENABLE_STATIC
11242 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
11243 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
11245 # Old names:
11246 AC_DEFUN([AC_ENABLE_STATIC],
11247 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
11250 AC_DEFUN([AC_DISABLE_STATIC],
11251 [_LT_SET_OPTION([LT_INIT], [disable-static])
11254 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
11255 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
11257 dnl aclocal-1.4 backwards compatibility:
11258 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
11259 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
11263 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
11264 # ----------------------------------
11265 # implement the --enable-fast-install flag, and support the `fast-install'
11266 # and `disable-fast-install' LT_INIT options.
11267 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
11268 m4_define([_LT_ENABLE_FAST_INSTALL],
11269 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
11270 AC_ARG_ENABLE([fast-install],
11271     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
11272     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
11273     [p=${PACKAGE-default}
11274     case $enableval in
11275     yes) enable_fast_install=yes ;;
11276     no) enable_fast_install=no ;;
11277     *)
11278       enable_fast_install=no
11279       # Look at the argument we got.  We use all the common list separators.
11280       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11281       for pkg in $enableval; do
11282         IFS="$lt_save_ifs"
11283         if test "X$pkg" = "X$p"; then
11284           enable_fast_install=yes
11285         fi
11286       done
11287       IFS="$lt_save_ifs"
11288       ;;
11289     esac],
11290     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
11292 _LT_DECL([fast_install], [enable_fast_install], [0],
11293          [Whether or not to optimize for fast installation])dnl
11294 ])# _LT_ENABLE_FAST_INSTALL
11296 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
11297 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
11299 # Old names:
11300 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
11301 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
11302 AC_DIAGNOSE([obsolete],
11303 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
11304 the `fast-install' option into LT_INIT's first parameter.])
11307 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
11308 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
11309 AC_DIAGNOSE([obsolete],
11310 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
11311 the `disable-fast-install' option into LT_INIT's first parameter.])
11314 dnl aclocal-1.4 backwards compatibility:
11315 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
11316 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
11319 # _LT_WITH_PIC([MODE])
11320 # --------------------
11321 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
11322 # LT_INIT options.
11323 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
11324 m4_define([_LT_WITH_PIC],
11325 [AC_ARG_WITH([pic],
11326     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
11327         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
11328     [lt_p=${PACKAGE-default}
11329     case $withval in
11330     yes|no) pic_mode=$withval ;;
11331     *)
11332       pic_mode=default
11333       # Look at the argument we got.  We use all the common list separators.
11334       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11335       for lt_pkg in $withval; do
11336         IFS="$lt_save_ifs"
11337         if test "X$lt_pkg" = "X$lt_p"; then
11338           pic_mode=yes
11339         fi
11340       done
11341       IFS="$lt_save_ifs"
11342       ;;
11343     esac],
11344     [pic_mode=default])
11346 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
11348 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
11349 ])# _LT_WITH_PIC
11351 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
11352 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
11354 # Old name:
11355 AU_DEFUN([AC_LIBTOOL_PICMODE],
11356 [_LT_SET_OPTION([LT_INIT], [pic-only])
11357 AC_DIAGNOSE([obsolete],
11358 [$0: Remove this warning and the call to _LT_SET_OPTION when you
11359 put the `pic-only' option into LT_INIT's first parameter.])
11362 dnl aclocal-1.4 backwards compatibility:
11363 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
11365 ## ----------------- ##
11366 ## LTDL_INIT Options ##
11367 ## ----------------- ##
11369 m4_define([_LTDL_MODE], [])
11370 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
11371                  [m4_define([_LTDL_MODE], [nonrecursive])])
11372 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
11373                  [m4_define([_LTDL_MODE], [recursive])])
11374 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
11375                  [m4_define([_LTDL_MODE], [subproject])])
11377 m4_define([_LTDL_TYPE], [])
11378 LT_OPTION_DEFINE([LTDL_INIT], [installable],
11379                  [m4_define([_LTDL_TYPE], [installable])])
11380 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
11381                  [m4_define([_LTDL_TYPE], [convenience])])
11382 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
11384 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
11385 # Written by Gary V. Vaughan, 2004
11387 # This file is free software; the Free Software Foundation gives
11388 # unlimited permission to copy and/or distribute it, with or without
11389 # modifications, as long as this notice is preserved.
11391 # serial 6 ltsugar.m4
11393 # This is to help aclocal find these macros, as it can't see m4_define.
11394 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
11397 # lt_join(SEP, ARG1, [ARG2...])
11398 # -----------------------------
11399 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
11400 # associated separator.
11401 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
11402 # versions in m4sugar had bugs.
11403 m4_define([lt_join],
11404 [m4_if([$#], [1], [],
11405        [$#], [2], [[$2]],
11406        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
11407 m4_define([_lt_join],
11408 [m4_if([$#$2], [2], [],
11409        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
11412 # lt_car(LIST)
11413 # lt_cdr(LIST)
11414 # ------------
11415 # Manipulate m4 lists.
11416 # These macros are necessary as long as will still need to support
11417 # Autoconf-2.59 which quotes differently.
11418 m4_define([lt_car], [[$1]])
11419 m4_define([lt_cdr],
11420 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
11421        [$#], 1, [],
11422        [m4_dquote(m4_shift($@))])])
11423 m4_define([lt_unquote], $1)
11426 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
11427 # ------------------------------------------
11428 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
11429 # Note that neither SEPARATOR nor STRING are expanded; they are appended
11430 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
11431 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
11432 # than defined and empty).
11434 # This macro is needed until we can rely on Autoconf 2.62, since earlier
11435 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
11436 m4_define([lt_append],
11437 [m4_define([$1],
11438            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
11442 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
11443 # ----------------------------------------------------------
11444 # Produce a SEP delimited list of all paired combinations of elements of
11445 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
11446 # has the form PREFIXmINFIXSUFFIXn.
11447 # Needed until we can rely on m4_combine added in Autoconf 2.62.
11448 m4_define([lt_combine],
11449 [m4_if(m4_eval([$# > 3]), [1],
11450        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
11451 [[m4_foreach([_Lt_prefix], [$2],
11452              [m4_foreach([_Lt_suffix],
11453                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
11454         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
11457 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
11458 # -----------------------------------------------------------------------
11459 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
11460 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
11461 m4_define([lt_if_append_uniq],
11462 [m4_ifdef([$1],
11463           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
11464                  [lt_append([$1], [$2], [$3])$4],
11465                  [$5])],
11466           [lt_append([$1], [$2], [$3])$4])])
11469 # lt_dict_add(DICT, KEY, VALUE)
11470 # -----------------------------
11471 m4_define([lt_dict_add],
11472 [m4_define([$1($2)], [$3])])
11475 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
11476 # --------------------------------------------
11477 m4_define([lt_dict_add_subkey],
11478 [m4_define([$1($2:$3)], [$4])])
11481 # lt_dict_fetch(DICT, KEY, [SUBKEY])
11482 # ----------------------------------
11483 m4_define([lt_dict_fetch],
11484 [m4_ifval([$3],
11485         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
11486     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
11489 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
11490 # -----------------------------------------------------------------
11491 m4_define([lt_if_dict_fetch],
11492 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
11493         [$5],
11494     [$6])])
11497 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
11498 # --------------------------------------------------------------
11499 m4_define([lt_dict_filter],
11500 [m4_if([$5], [], [],
11501   [lt_join(m4_quote(m4_default([$4], [[, ]])),
11502            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
11503                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
11505 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
11507 #   Copyright (C) 2004 Free Software Foundation, Inc.
11508 #   Written by Scott James Remnant, 2004
11510 # This file is free software; the Free Software Foundation gives
11511 # unlimited permission to copy and/or distribute it, with or without
11512 # modifications, as long as this notice is preserved.
11514 # @configure_input@
11516 # serial 3337 ltversion.m4
11517 # This file is part of GNU Libtool
11519 m4_define([LT_PACKAGE_VERSION], [2.4.2])
11520 m4_define([LT_PACKAGE_REVISION], [1.3337])
11522 AC_DEFUN([LTVERSION_VERSION],
11523 [macro_version='2.4.2'
11524 macro_revision='1.3337'
11525 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
11526 _LT_DECL(, macro_revision, 0)
11528 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
11530 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
11531 #   Written by Scott James Remnant, 2004.
11533 # This file is free software; the Free Software Foundation gives
11534 # unlimited permission to copy and/or distribute it, with or without
11535 # modifications, as long as this notice is preserved.
11537 # serial 5 lt~obsolete.m4
11539 # These exist entirely to fool aclocal when bootstrapping libtool.
11541 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
11542 # which have later been changed to m4_define as they aren't part of the
11543 # exported API, or moved to Autoconf or Automake where they belong.
11545 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
11546 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
11547 # using a macro with the same name in our local m4/libtool.m4 it'll
11548 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
11549 # and doesn't know about Autoconf macros at all.)
11551 # So we provide this file, which has a silly filename so it's always
11552 # included after everything else.  This provides aclocal with the
11553 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
11554 # because those macros already exist, or will be overwritten later.
11555 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
11557 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
11558 # Yes, that means every name once taken will need to remain here until
11559 # we give up compatibility with versions before 1.7, at which point
11560 # we need to keep only those names which we still refer to.
11562 # This is to help aclocal find these macros, as it can't see m4_define.
11563 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
11565 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
11566 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
11567 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
11568 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
11569 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
11570 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
11571 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
11572 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
11573 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
11574 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
11575 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
11576 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
11577 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
11578 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
11579 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
11580 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
11581 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
11582 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
11583 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
11584 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
11585 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
11586 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
11587 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
11588 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
11589 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
11590 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
11591 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
11592 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
11593 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
11594 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
11595 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
11596 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
11597 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
11598 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
11599 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
11600 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
11601 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
11602 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
11603 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
11604 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
11605 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
11606 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
11607 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
11608 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
11609 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
11610 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
11611 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
11612 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
11613 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
11614 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
11615 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
11616 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
11617 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
11618 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
11619 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
11620 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
11621 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
11622 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
11623 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
11624 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
11625 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])